[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V2] xen/svm: don't clear interception for MSRs required for introspection
This patch mirrors the VMX code that doesn't allow vmx_clear_msr_intercept() to clear interception of MSRs that an introspection agent is trying to monitor. Signed-off-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> --- Changes since V1: - Fixed commit message (updated the function name to vmx_clear_msr_intercept() from vmx_disable_intercept_for_msr() --- xen/arch/x86/hvm/svm/svm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 673a38c..d313b3f 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -148,6 +148,7 @@ svm_msrbit(unsigned long *msr_bitmap, uint32_t msr) void svm_intercept_msr(struct vcpu *v, uint32_t msr, int flags) { unsigned long *msr_bit; + const struct domain *d = v->domain; msr_bit = svm_msrbit(v->arch.hvm_svm.msrpm, msr); BUG_ON(msr_bit == NULL); @@ -155,12 +156,12 @@ void svm_intercept_msr(struct vcpu *v, uint32_t msr, int flags) if ( flags & MSR_INTERCEPT_READ ) __set_bit(msr * 2, msr_bit); - else + else if ( !monitored_msr(d, msr) ) __clear_bit(msr * 2, msr_bit); if ( flags & MSR_INTERCEPT_WRITE ) __set_bit(msr * 2 + 1, msr_bit); - else + else if ( !monitored_msr(d, msr) ) __clear_bit(msr * 2 + 1, msr_bit); } -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |