summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2019-02-16 01:55:49 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2019-02-16 01:55:49 +0000
commitf347f84fd96b293343e696d034c288854deee905 (patch)
tree171588234239c05f8be4b7d4cafe24911b42e3e3 /sys
parentfef6bbd3883c243666445707d7f655b728ceb982 (diff)
vmm(4): report PA bits in CPUID[0x80000008]
We were previously hiding this information from the guest but there really isn't a reason to do that. Hiding this value limits the PA size to 36 bits (64GB), which I discovered the hard way when creating some big VMs recently.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/vmm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c
index e4641072a83..d7449d0b99b 100644
--- a/sys/arch/amd64/amd64/vmm.c
+++ b/sys/arch/amd64/amd64/vmm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm.c,v 1.227 2019/02/09 04:50:35 mlarkin Exp $ */
+/* $OpenBSD: vmm.c,v 1.228 2019/02/16 01:55:48 mlarkin Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -6172,7 +6172,7 @@ vmm_handle_cpuid(struct vcpu *vcpu)
*rdx = *((uint32_t *)&vmm_hv_signature[8]);
break;
case 0x80000000: /* Extended function level */
- *rax = 0x80000007; /* curcpu()->ci_pnfeatset */
+ *rax = 0x80000008; /* curcpu()->ci_pnfeatset */
*rbx = 0;
*rcx = 0;
*rdx = 0;
@@ -6217,12 +6217,9 @@ vmm_handle_cpuid(struct vcpu *vcpu)
CPUID(0x80000007, *rax, *rbx, *rcx, *rdx);
break;
case 0x80000008: /* Phys bits info and topology (AMD) */
- DPRINTF("%s: function 0x80000008 (phys bits info) not "
- "supported\n", __func__);
- *rax = 0;
- *rbx = 0;
+ CPUID(0x80000008, *rax, *rbx, *rcx, *rdx);
+ /* Reset %rcx (topology) */
*rcx = 0;
- *rdx = 0;
break;
default:
DPRINTF("%s: unsupported rax=0x%llx\n", __func__, *rax);