Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/nvmm/x86 Mask CPUID leaf 0x0A on Intel, because we d...
details: https://anonhg.NetBSD.org/src/rev/3212bf6ccb4e
branches: trunk
changeset: 464848:3212bf6ccb4e
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Oct 27 11:11:09 2019 +0000
description:
Mask CPUID leaf 0x0A on Intel, because we don't want the guest to try (and
fail) to probe the PMC MSRs. This avoids "Unexpected WRMSR" warnings in
qemu-nvmm.
diffstat:
sys/dev/nvmm/x86/nvmm_x86_vmx.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r f9d38ce1f2f2 -r 3212bf6ccb4e sys/dev/nvmm/x86/nvmm_x86_vmx.c
--- a/sys/dev/nvmm/x86/nvmm_x86_vmx.c Sun Oct 27 11:08:04 2019 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_vmx.c Sun Oct 27 11:11:09 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvmm_x86_vmx.c,v 1.41 2019/10/27 10:28:55 maxv Exp $ */
+/* $NetBSD: nvmm_x86_vmx.c,v 1.42 2019/10/27 11:11:09 maxv Exp $ */
/*
* Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.41 2019/10/27 10:28:55 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.42 2019/10/27 11:11:09 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1172,6 +1172,12 @@
cpudata->gprs[NVMM_X64_GPR_RCX] &= nvmm_cpuid_00000007.ecx;
cpudata->gprs[NVMM_X64_GPR_RDX] &= nvmm_cpuid_00000007.edx;
break;
+ case 0x0000000A:
+ cpudata->gprs[NVMM_X64_GPR_RAX] = 0;
+ cpudata->gprs[NVMM_X64_GPR_RBX] = 0;
+ cpudata->gprs[NVMM_X64_GPR_RCX] = 0;
+ cpudata->gprs[NVMM_X64_GPR_RDX] = 0;
+ break;
case 0x0000000D:
if (vmx_xcr0_mask == 0) {
break;
Home |
Main Index |
Thread Index |
Old Index