target-i386: kernel_irqchip=off fix for KVM

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJXsv8+AAoJECgHk2+YTcWm4vYP/AgT3GrHxCEaL03sRTjmdT80
 ydqnp3kljfrybAO4Zk4DyZdgmIqCPlJomxB8eFNhbt4VN7VwXBwsA4EwJMtug+Vw
 wCMZRweaLYj2sa+clsCIFFvZ7KA3Nss63VODK3hzF4KdFfBuEDfXhD4sOTHuR1zS
 +t2rmOCzuM0pz/9WQa608O7iF0UxvaWV6hGhrzRTSN+dKU1j+Oz8By74mVvWBrSZ
 TvvHRFExAiWcBMsuGsJkACRf2f7BFl6D3V9PGX3sWATS34qiRTpXPLF5E1KlNOPg
 TvV1otkGmtvpWw7XiIOJzj40a/UmwLAsxuczDhLoI9EKJKgt742CXpOtsr1IvCxw
 k6tRrjopBt771XdaPmXL2uEZ5MGtlhbk9EwzmqLszQObjt/i1uCUSYCHuruUyD5g
 qKP5kMSs5fJ4MYgljdqf6UCzuuL4Ior4apgutf+iyxx1h1cZNUUOP6qANeSgNJ0l
 KQqEb/kYTgNmLRBpk/xLNwNI0A88+tMgurOHG6SgRCMRsgNb7L4+dZ4glcxTIxNe
 AawS4BoSVDt8bt4jkpgj7T8FS98SVc/JmWv8+32/O6NX4z+L0NODVYKFYx/Mh1Tu
 YcKm6nTVXY9C73OMbRdoKRqdV48HYpx7ANsj4Xs6tjEVDacfveUOLTE9tgh/b+K9
 xlByBflRz34KcBrssTmD
 =52gO
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging

target-i386: kernel_irqchip=off fix for KVM

# gpg: Signature made Tue 16 Aug 2016 12:55:42 BST
# gpg:                using RSA key 0x2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/x86-pull-request:
  target-i386: kvm: Report kvm_pv_unhalt as unsupported w/o kernel_irqchip

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2016-08-16 13:03:15 +01:00
commit 725092ede5
1 changed files with 7 additions and 0 deletions

View File

@ -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 */