summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/kvm
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2018-05-14 21:39:31 -0700
committerShentubot <shentubot@google.com>2018-05-14 21:40:21 -0700
commited02ac4f668ec41063cd51cbbd451baba9e9a6e7 (patch)
treee09acdc2fef148d80fcb424b87cce95354349d2d /pkg/sentry/platform/kvm
parent2ab754cff7b2d45e1d59798562e47317aa480ecf (diff)
Disable INVPCID check; it's not used.
PiperOrigin-RevId: 196615029 Change-Id: Idfa383a9aee6a9397167a4231ce99d0b0e5b9912
Diffstat (limited to 'pkg/sentry/platform/kvm')
-rw-r--r--pkg/sentry/platform/kvm/kvm_amd64_unsafe.go18
1 files changed, 4 insertions, 14 deletions
diff --git a/pkg/sentry/platform/kvm/kvm_amd64_unsafe.go b/pkg/sentry/platform/kvm/kvm_amd64_unsafe.go
index 389412d87..834e6b96d 100644
--- a/pkg/sentry/platform/kvm/kvm_amd64_unsafe.go
+++ b/pkg/sentry/platform/kvm/kvm_amd64_unsafe.go
@@ -25,11 +25,10 @@ import (
)
var (
- runDataSize int
- hasGuestPCID bool
- hasGuestINVPCID bool
- pagetablesOpts pagetables.Opts
- cpuidSupported = cpuidEntries{nr: _KVM_NR_CPUID_ENTRIES}
+ runDataSize int
+ hasGuestPCID bool
+ pagetablesOpts pagetables.Opts
+ cpuidSupported = cpuidEntries{nr: _KVM_NR_CPUID_ENTRIES}
)
func updateSystemValues(fd int) error {
@@ -74,17 +73,8 @@ func updateSystemValues(fd int) error {
if entry.function == 1 && entry.index == 0 && entry.ecx&(1<<17) != 0 {
hasGuestPCID = true // Found matching PCID in guest feature set.
}
- if entry.function == 7 && entry.index == 0 && entry.ebx&(1<<10) != 0 {
- hasGuestINVPCID = true // Found matching INVPCID in guest feature set.
- }
}
- // A basic sanity check: ensure that we don't attempt to
- // invpcid if guest PCIDs are not supported; it's not clear
- // what the semantics of this would be (or why some CPU or
- // hypervisor would export this particular combination).
- hasGuestINVPCID = hasGuestPCID && hasGuestINVPCID
-
// Set the pagetables to use PCID if it's available.
pagetablesOpts.EnablePCID = hasGuestPCID