]> xenbits.xensource.com Git - xen.git/commitdiff
xen/hvm: Don't skip MSR_READ trace record
authorGeorge Dunlap <george.dunlap@cloud.com>
Fri, 2 Aug 2024 06:42:09 +0000 (08:42 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 Aug 2024 06:42:09 +0000 (08:42 +0200)
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@cloud.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c

index 9f37db494d7d575e70f64bd0043d379f9185f0e3..f49e29faf753a4b064985bb0e8e7ed21fb8ccae4 100644 (file)
@@ -3557,7 +3557,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;