Disregard this for now, there's another bug to work out then will submit a newer patch.
AMD PauseFilterThreshold support
Out of bounds memory access in memory.cc
AMD SVM VMCBPTR not saved on snapshot
Ok I'm kinda getting closer. What's happening is first the MSR KernelGSBase (0xC0000102) is being accessed and this is in the MSR bitmap and NOT being intercepted, so that occurs in the guest without VMEXIT. Now when the MSR 0x40000071 follows, this somehow leads to a memory access exception (still need to trace where exactly). But if I intercept all MSRs, meaning the KernelGSBase MSR leads to a VMEXIT instead, then it works fine and the following 0x40000071 MSR VMEXITs and doesn't cause any more...
Actually no, I'm so confused. When guest does wrmsr to 0x40000071, MSR is 0x40000071. However somehow when I check "if(msr == 0x40000071)" the if fails? And I know MSR is 0x40000071 from BX_INFO printing it, yet somehow it also passes the checks "else if ((msr >= 0xc0000000) && (msr <= 0xc0001fff))" and enters this if? When it shouldn't? So confused whats going on here at the moment haha.
Hey man, New issue to fix, this one is why I hate C lol. in SVM.cc you have SvmInterceptMSR, theres a bunch of if and else if statements like: if (msr <= 0x1fff) msr_map_offset = 0; else if (msr >= 0xc0000000 && msr <= 0xc0001fff) msr_map_offset = 2048; else if (msr >= 0xc0010000 && msr <= 0xc0011fff) msr_map_offset = 4096; Theres a problem here, specifically the double conditions inside the brackets like "msr >= 0xc0000000 && msr <= 0xc0001fff" Its not being calculated properly because you need...
Yep, with these changes AMD Hyper-V boots and works! Thanks for you assistance with finding the bugs and patches