[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 40/60] WHPX workaround bug in OSVW handling
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 40/60] WHPX workaround bug in OSVW handling |
Date: |
Thu, 28 Jun 2018 22:04:50 +0200 |
From: "Justin Terry (VM)" <address@hidden>
Adds a workaround to an incorrect value setting
CPUID Fn8000_0001_ECX[bit 9 OSVW] = 1. This can cause a guest linux kernel
to panic when an issue to rdmsr C001_0140h returns 0. Disabling this feature
correctly allows the guest to boot without accessing the osv workarounds.
Signed-off-by: Justin Terry (VM) <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/whpx-all.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c
index 6b42096..99501ba 100644
--- a/target/i386/whpx-all.c
+++ b/target/i386/whpx-all.c
@@ -964,6 +964,16 @@ static int whpx_vcpu_run(CPUState *cpu)
rdx = vcpu->exit_ctx.CpuidAccess.DefaultResultRdx;
rbx = vcpu->exit_ctx.CpuidAccess.DefaultResultRbx;
break;
+ case 0x80000001:
+ rax = vcpu->exit_ctx.CpuidAccess.DefaultResultRax;
+ /* Remove any support of OSVW */
+ rcx =
+ vcpu->exit_ctx.CpuidAccess.DefaultResultRcx &
+ ~CPUID_EXT3_OSVW;
+
+ rdx = vcpu->exit_ctx.CpuidAccess.DefaultResultRdx;
+ rbx = vcpu->exit_ctx.CpuidAccess.DefaultResultRbx;
+ break;
default:
rax = vcpu->exit_ctx.CpuidAccess.DefaultResultRax;
rcx = vcpu->exit_ctx.CpuidAccess.DefaultResultRcx;
@@ -1382,12 +1392,13 @@ static int whpx_accel_init(MachineState *ms)
goto error;
}
- UINT32 cpuidExitList[] = {1};
+ UINT32 cpuidExitList[] = {1, 0x80000001};
hr = whp_dispatch.WHvSetPartitionProperty(
whpx->partition,
WHvPartitionPropertyCodeCpuidExitList,
cpuidExitList,
RTL_NUMBER_OF(cpuidExitList) * sizeof(UINT32));
+
if (FAILED(hr)) {
error_report("WHPX: Failed to set partition CpuidExitList hr=%08lx",
hr);
--
1.8.3.1
- [Qemu-devel] [PULL 27/60] nvdimm: make get_memory_region() perform checks and initialization, (continued)
- [Qemu-devel] [PULL 27/60] nvdimm: make get_memory_region() perform checks and initialization, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 28/60] pc-dimm: get_memory_region() will not fail after realize, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 29/60] numa: report all DIMM/NVDIMMs as plugged memory, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 31/60] Deprecate the -enable-hax option, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 30/60] osdep: work around Coverity parsing errors, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 32/60] pr-helper: fix --socket-path default in help, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 33/60] pr-helper: fix assertion failure on failed multipath PERSISTENT RESERVE IN, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 34/60] pr-manager-helper: avoid SIGSEGV when writing to the socket fail, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 35/60] pr-manager: put stubs in .c file, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 40/60] WHPX workaround bug in OSVW handling,
Paolo Bonzini <=
- [Qemu-devel] [PULL 36/60] pr-manager: add query-pr-managers QMP command, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 39/60] esp: remove legacy esp_init() function, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 38/60] hw/mips/jazz: create ESP device directly via qdev, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 37/60] pr-manager-helper: report event on connection/disconnection, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 41/60] WHPX: register for unrecognized MSR exits, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 43/60] target-i386: Add NMI interception to SVM, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 42/60] memory/hmp: Print owners/parents in "info mtree", Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 48/60] ioapic: some proper indents when dump info, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 46/60] doc: another fix to "info pic", Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 44/60] target-i386: Allow interrupt injection after STGI, Paolo Bonzini, 2018/06/28