[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging-4.17] xen/hvm: Don't skip MSR_READ trace record



commit e336a160eb1df488bca2044a0d2aea70abeb70d8
Author:     George Dunlap <george.dunlap@xxxxxxxxx>
AuthorDate: Thu Aug 8 13:57:10 2024 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Aug 8 13:57:10 2024 +0200

    xen/hvm: Don't skip MSR_READ trace record
    
    Commit 37f074a3383 ("x86/msr: introduce guest_rdmsr()") introduced a
    function to combine the MSR_READ handling between PV and HVM.
    Unfortunately, by returning directly, it skipped the trace generation,
    leading to gaps in the trace record, as well as xenalyze errors like
    this:
    
    hvm_generic_postprocess: d2v0 Strange, exit 7c(VMEXIT_MSR) missing a handler
    
    Replace the `return` with `goto out`.
    
    Fixes: 37f074a3383 ("x86/msr: introduce guest_rdmsr()")
    Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    master commit: bc8a43fff61ae4162a95d84f4e148d6773667cd2
    master date: 2024-08-02 08:42:09 +0200
---
 xen/arch/x86/hvm/hvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 558dc3eddc..6ae15e04f3 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3524,7 +3524,7 @@ int hvm_msr_read_intercept(unsigned int msr, uint64_t 
*msr_content)
     fixed_range_base = (uint64_t *)v->arch.hvm.mtrr.fixed_ranges;
 
     if ( (ret = guest_rdmsr(v, msr, msr_content)) != X86EMUL_UNHANDLEABLE )
-        return ret;
+        goto out;
 
     ret = X86EMUL_OKAY;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.17



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.