diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2016-08-12 15:14:32 -0300 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2016-08-16 08:49:53 -0300 |
commit | 648774779aa6cdf755a296d1a15849ced51072f1 (patch) | |
tree | 8d3ca72192600d44c603af8388cdbc9b8b0e4d5c /target-i386 | |
parent | 1dc8a6695c731abb7461c637b2512c3670d82be4 (diff) | |
download | qemu-648774779aa6cdf755a296d1a15849ced51072f1.zip |
target-i386: kvm: Report kvm_pv_unhalt as unsupported w/o kernel_irqchip
The kvm_pv_unhalt feature doesn't work if kernel_irqchip is
disabled, so we need to report it as unsupported.
Tested-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 0b2016a77a..d1a25c5465 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -329,6 +329,13 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function, */ cpuid_1_edx = kvm_arch_get_supported_cpuid(s, 1, 0, R_EDX); ret |= cpuid_1_edx & CPUID_EXT2_AMD_ALIASES; + } else if (function == KVM_CPUID_FEATURES && reg == R_EAX) { + /* kvm_pv_unhalt is reported by GET_SUPPORTED_CPUID, but it can't + * be enabled without the in-kernel irqchip + */ + if (!kvm_irqchip_in_kernel()) { + ret &= ~(1U << KVM_FEATURE_PV_UNHALT); + } } /* fallback for older kernels */ |