pv/pvh: disable MTRR feature on cpuid for Dom0
PATCH 1/1 pv/pvh: disable MTRR feature on cpuid for Dom0
MTRR is not available for PV/PVH Dom0, so prevent cpuid from reporting it as an available feature.
--- xen/arch/x86/traps.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
xen/arch/x86/traps.c +1 -0
@@ -796,6 +796,7 @@ void pv_cpuid(struct cpu_user_regs *regs)__clear_bit (X86_FEATURE_DS , &d);__clear_bit (X86_FEATURE_ACC , &d);__clear_bit (X86_FEATURE_PBE , &d); +__clear_bit (X86_FEATURE_MTRR , &d);__clear_bit (X86_FEATURE_DTES64 %32 , &c);__clear_bit (X86_FEATURE_MWAIT %32 , &c);
Signature · 7 lines
1.7.7.5 (Apple Git-26) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 3 lines
Quoted 1 line
Quoted 1 line · Roger Pau Monne
MTRR is not available for PV/PVH Dom0, so prevent cpuid from reporting it as an available feature.
Some misunderstanding perhaps? PV certainly has MTRR support for Dom0 - see XENPF_*_memtype.
xen/arch/x86/traps.c void pv_cpuid(struct cpu_user_regs *regs) · line 799
Quoted 7 lines
xen/arch/x86/traps.c +1
-0@@ -796,6 +796,7 @@ void pv_cpuid(struct cpu_user_regs *regs)__clear_bit (X86_FEATURE_DS , &d);__clear_bit (X86_FEATURE_ACC , &d);__clear_bit (X86_FEATURE_PBE , &d); +__clear_bit (X86_FEATURE_MTRR , &d);
Thus clearing this flag should be limited to PVH.
Jan
Quoted 6 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · Roger Pau Monne
MTRR is not available for PV/PVH Dom0, so prevent cpuid from reporting it as an available feature.
Some misunderstanding perhaps? PV certainly has MTRR support for Dom0 - see XENPF_*_memtype.
OK, my bad, I was looking for a PV implementation of struct mtrr_ops in the pvops kernel, but Linux pvops doesn't use MTRR at all, also none of the XENPF_*_memtype ops seem to be used.
Quoted 10 lines
xen/arch/x86/traps.c void pv_cpuid(struct cpu_user_regs *regs) · line 799
Quoted 8 lines
xen/arch/x86/traps.c +1
-0@@ -796,6 +796,7 @@ void pv_cpuid(struct cpu_user_regs *regs)__clear_bit (X86_FEATURE_DS , &d);__clear_bit (X86_FEATURE_ACC , &d);__clear_bit (X86_FEATURE_PBE , &d); +__clear_bit (X86_FEATURE_MTRR , &d);Thus clearing this flag should be limited to PVH.
Will resend now with this fixed, thanks.
Roger.