diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-04-27 02:54:02 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-04-27 02:54:02 +0000 |
commit | afc9f5f7c709f32c21a16e9f8448c436e8dcf9c5 (patch) | |
tree | 19a6cbac39c6d12e84ff828aa1b9b3b74b0b0126 /sys | |
parent | e8127e77f696d22642050255edf730b8fc5b7160 (diff) |
implement test for running in a hypervisor on amd64/i386
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_device.c b/sys/dev/pci/drm/radeon/radeon_device.c index ec631f66cd9..33d4ea7d8af 100644 --- a/sys/dev/pci/drm/radeon/radeon_device.c +++ b/sys/dev/pci/drm/radeon/radeon_device.c @@ -650,8 +650,8 @@ void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) */ static bool radeon_device_is_virtual(void) { -#ifdef CONFIG_X86 - return boot_cpu_has(X86_FEATURE_HYPERVISOR); +#if defined(__amd64__) || defined(__i386__) + return (cpu_ecxfeature & CPUIDECX_HV); #else return false; #endif |