On Mon, Oct 31, 2022 at 07:39:01AM -0500, Scott Cheloha wrote:
| You get a #GP in your VM when trying to rdmsr(MSR_HWCR).  My guess is
| we need to expand the MSR read bitmap for SVM.
| 
| This patch compiles, but I can't test it.  Does it fix the panic?

To test this patch, I'd have to upgrade the hypervisor.  That's a bit
more involved, I'll plan it ASAP and report back, but it may be a few
days.

Thank you Scott and Mike!

Paul

| CC dv@ mlarkin@
| 
| Index: vmm.c
| ===================================================================
| RCS file: /cvs/src/sys/arch/amd64/amd64/vmm.c,v
| retrieving revision 1.323
| diff -u -p -r1.323 vmm.c
| --- vmm.c     7 Sep 2022 18:44:09 -0000       1.323
| +++ vmm.c     31 Oct 2022 12:38:30 -0000
| @@ -2705,6 +2705,10 @@ vcpu_reset_regs_svm(struct vcpu *vcpu, s
|       /* allow reading TSC */
|       svm_setmsrbr(vcpu, MSR_TSC);
|  
| +     /* allow reading HWCR and PSTATEDEF for TSC calibration */
| +     svm_setmsrbr(vcpu, MSR_HWCR);
| +     svm_setmsrbr(vcpu, MSR_PSTATEDEF(0));
| +
|       /* Guest VCPU ASID */
|       if (vmm_alloc_vpid(&asid)) {
|               DPRINTF("%s: could not allocate asid\n", __func__);
| 

-- 
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

Reply via email to