|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC v1 38/74] x86/pv-shim: Force CPUID faulting in pv-shim mode
From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
This is necessary to prevent the PV guest seeing HVM Xen leaves via native
cpuid.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/cpu/common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c
index a1f1a04776..6543690988 100644
--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -12,6 +12,7 @@
#include <mach_apic.h>
#include <asm/setup.h>
#include <public/sysctl.h> /* for XEN_INVALID_{SOCKET,CORE}_ID */
+#include <asm/guest.h>
#include "cpu.h"
@@ -177,7 +178,8 @@ void ctxt_switch_levelling(const struct vcpu *next)
* generating the maximum full cpuid policy into Xen, at which
* this problem will disappear.
*/
- set_cpuid_faulting(nextd && !is_control_domain(nextd) &&
+ set_cpuid_faulting(nextd &&
+ (pv_shim || !is_control_domain(nextd)) &&
(is_pv_domain(nextd) ||
next->arch.msr->
misc_features_enables.cpuid_faulting));
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |