|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/3] vm_event: svm: Don't BUG() when enabling intercept on hypervisor MSR
svm_msrbits() only cover MSRs in the ranges specified in APM and returns
NULL for all the other ones (i.e hypervisor range), which triggers the
BUG_ON() that follows.
APM specifies that MSR outside the architectural and AMD specific ranges
are unconditionally intercepted, hence don't require any specific handling
by SVM logic, fix this by ignoring cases when msr_bit is NULL.
This is only reachable with CONFIG_VM_EVENT using
XEN_DOMCTL_MONITOR_EVENT_MOV_TO_MSR
to configure a MSR intercept in the hypervisor range (0x40000000–0x40001fff).
Fixes: 6e9fc4d628b6 ("hvm/svm: Enable MSR events")
Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
---
xen/arch/x86/hvm/svm/svm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index b5fc459e62..7a16289f85 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -237,7 +237,9 @@ void svm_intercept_msr(struct vcpu *v, uint32_t msr, int
flags)
const struct domain *d = v->domain;
msr_bit = svm_msrbit(v->arch.hvm.svm.msrpm, msr);
- BUG_ON(msr_bit == NULL);
+ if ( msr_bit == NULL )
+ return;
+
msr &= 0x1fff;
if ( flags & MSR_INTERCEPT_READ )
--
2.55.0
--
Teddy Astie | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |