diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/sentry/platform/kvm/kvm_amd64_unsafe.go | 18 |
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 |