Mercurial > illumos > git > illumos-omnios
changeset 23886:9a84eaebcbd2
13361 bhyve should mask RDT cpuid info
Reviewed by: Andy Fiddaman <andy@omnios.org>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Robert Mustacchi <rm@fingolfin.org>
author | Patrick Mooney <pmooney@pfmooney.com> |
---|---|
date | Thu, 10 Dec 2020 22:40:37 +0000 |
parents | 37aafd26785f |
children | 67d85b95cbf0 |
files | usr/src/uts/i86pc/io/vmm/x86.c usr/src/uts/i86pc/io/vmm/x86.h |
diffstat | 2 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/io/vmm/x86.c Tue Oct 13 14:36:54 2020 +0100 +++ b/usr/src/uts/i86pc/io/vmm/x86.c Thu Dec 10 22:40:37 2020 +0000 @@ -585,6 +585,24 @@ } break; + case CPUID_0000_000F: + case CPUID_0000_0010: + /* + * Do not report any Resource Director Technology + * capabilities. Exposing control of cache or memory + * controller resource partitioning to the guest is not + * at all sensible. + * + * This is already hidden at a high level by masking of + * leaf 0x7. Even still, a guest may look here for + * detailed capability information. + */ + regs[0] = 0; + regs[1] = 0; + regs[2] = 0; + regs[3] = 0; + break; + case CPUID_0000_0015: /* * Don't report CPU TSC/Crystal ratio and clock
--- a/usr/src/uts/i86pc/io/vmm/x86.h Tue Oct 13 14:36:54 2020 +0100 +++ b/usr/src/uts/i86pc/io/vmm/x86.h Thu Dec 10 22:40:37 2020 +0000 @@ -41,6 +41,8 @@ #define CPUID_0000_000A (0xA) #define CPUID_0000_000B (0xB) #define CPUID_0000_000D (0xD) +#define CPUID_0000_000F (0xF) +#define CPUID_0000_0010 (0x10) #define CPUID_0000_0015 (0x15) #define CPUID_8000_0000 (0x80000000) #define CPUID_8000_0001 (0x80000001)