x86/mm: correct PG_log_dirty definition again
PATCH 1/1 x86/mm: correct PG_log_dirty definition again
The earlier change wasn't correct as far as shim-exclusive mode goes:
Shadow mode is still to be enabled permitted there, yet the generic paging-log-dirty (and more generally domctl) part of the code still is unwanted (and cannot be used anyway, as domctl_lock_acquire() isn't available).
---
While a backwards move, properly untangling this will need to be left for later, I expect.
xen/arch/x86/include/asm/paging.h +1 -1
@@ -55,7 +55,7 @@#define PG_translate 0#define PG_external 0#endif -#ifdef CONFIG_PAGING +#if defined(CONFIG_PAGING ) && !defined(CONFIG_PV_SHIM_EXCLUSIVE )/* Enable log dirty mode */ #define PG_log_dirty (XEN_DOMCTL_SHADOW_ENABLE_LOG_DIRTY << PG_mode_shift)#else
xen/include/hypercall-defs.c +2 -2
@@ -197,7 +197,7 @@ dm_op(domid_t domid, unsigned int nr_buf#ifdef CONFIG_SYSCTL sysctl(xen_sysctl_t *u_sysctl)#endif -#if defined(CONFIG_X86 ) && defined(CONFIG_PAGING ) +#if defined(CONFIG_X86 ) && defined(CONFIG_PAGING ) && !defined(CONFIG_PV_SHIM_EXCLUSIVE ) paging_domctl_cont(xen_domctl_t *u_domctl)#endif #ifndef CONFIG_PV_SHIM_EXCLUSIVE
@@ -298,7 +298,7 @@ dm_op compa hypfs_op do do do do do#endif mca do do - - - -#if defined(CONFIG_X86 ) && defined(CONFIG_PAGING ) +#if defined(CONFIG_X86 ) && defined(CONFIG_PAGING ) && !defined(CONFIG_PV_SHIM_EXCLUSIVE ) paging_domctl_cont do do do do -#endif
Quoted 11 lines · Jan Beulich
The earlier change wasn't correct as far as shim-exclusive mode goes:
Shadow mode is still to be enabled permitted there, yet the generic paging-log-dirty (and more generally domctl) part of the code still is unwanted (and cannot be used anyway, asdomctl_lock_acquire()isn't available).Fixes 2ae8a68df21e ("x86/mm: correct PG_log_dirty definition")Signed-off-by Jan Beulich <[email protected]>---
While a backwards move, properly untangling this will need to be left for later, I expect.
I also had considered this set of changes as an alternative of the SHADOW_PAGING kconfig change I made. I tested this patch together with mine and everything looks good so far:
https://gitlab.com/xen-project/people/sstabellini/xen/-/pipelines
I'll resend both patches together for simplicity.
Quoted 32 lines
xen/arch/x86/include/asm/paging.h +1
-1@@ -55,7 +55,7 @@#define PG_translate 0#define PG_external 0#endif -#ifdef CONFIG_PAGING +#if defined(CONFIG_PAGING ) && !defined(CONFIG_PV_SHIM_EXCLUSIVE )/* Enable log dirty mode */ #define PG_log_dirty (XEN_DOMCTL_SHADOW_ENABLE_LOG_DIRTY << PG_mode_shift)#else xen/include/hypercall-defs.c +2
-2@@ -197,7 +197,7 @@ dm_op(domid_t domid, unsigned int nr_buf#ifdef CONFIG_SYSCTL sysctl(xen_sysctl_t *u_sysctl)#endif -#if defined(CONFIG_X86 ) && defined(CONFIG_PAGING ) +#if defined(CONFIG_X86 ) && defined(CONFIG_PAGING ) && !defined(CONFIG_PV_SHIM_EXCLUSIVE ) paging_domctl_cont(xen_domctl_t *u_domctl)#endif #ifndef CONFIG_PV_SHIM_EXCLUSIVE @@ -298,7 +298,7 @@ dm_op compa hypfs_op do do do do do#endif mca do do - - - -#if defined(CONFIG_X86 ) && defined(CONFIG_PAGING ) +#if defined(CONFIG_X86 ) && defined(CONFIG_PAGING ) && !defined(CONFIG_PV_SHIM_EXCLUSIVE ) paging_domctl_cont do do do do -#endif