--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h +++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h @@ -225,11 +225,21 @@ DECLINLINE(unsigned long) msecs_to_jiffi #undef bool /* - * There are post-2.6.24 kernels (confusingly with unchanged version number) - * which eliminate macros which were marked as deprecated. + * The 2.6.25 kernel eliminates macros that were marked as deprecated and eliminates + * routine change_page_attr() in favor of the set_pages_* API. */ -#ifndef __attribute_used__ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) #define __attribute_used__ __used + +static inline int my_change_page_attr(struct page *page, int numpages, pgprot_t prot) +{ + /* use the set_pages_* API */ + if (pgprot_val(prot) & _PAGE_NX) + set_pages_nx(page, numpages); + set_pages_uc(page, numpages); + return 0; +} +#define change_page_attr(a,b,c) my_change_page_attr((a), (b), (c)) #endif #endif