summaryrefslogtreecommitdiffstats
path: root/sys/amd64/vmm
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-10-17 06:23:04 +0000
committerneel <neel@FreeBSD.org>2014-10-17 06:23:04 +0000
commit170f49cd346e3fe89bb5fd6322940694477b7002 (patch)
tree9baa9d2ee53784635790097d5cbbde652089891e /sys/amd64/vmm
parentb194fc5a2b8dd89544329e2aaa9569f23c24b990 (diff)
downloadFreeBSD-src-170f49cd346e3fe89bb5fd6322940694477b7002.zip
FreeBSD-src-170f49cd346e3fe89bb5fd6322940694477b7002.tar.gz
Don't advertise the Instruction Based Sampling feature because it requires
emulating a large number of MSRs. Ignore writes to a couple more AMD-specific MSRs and return 0 on read. This further reduces the unimplemented MSRs accessed by a Linux guest on boot.
Diffstat (limited to 'sys/amd64/vmm')
-rw-r--r--sys/amd64/vmm/x86.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c
index 3c5ca19..0b32eef 100644
--- a/sys/amd64/vmm/x86.c
+++ b/sys/amd64/vmm/x86.c
@@ -167,6 +167,11 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id,
regs[2] &= ~AMDID2_PTSCEL2I;
/*
+ * Don't advertise Instruction Based Sampling feature.
+ */
+ regs[2] &= ~AMDID2_IBS;
+
+ /*
* Hide rdtscp/ia32_tsc_aux until we know how
* to deal with them.
*/
OpenPOWER on IntegriCloud