mirror of https://gitee.com/openkylin/qemu.git
vfio-pci: fix kvm disabled path
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJQxjIpAAoJECObm247sIsiRBkP/3TRWKLD9Ha9aOwRF+DKTe47 +ghXaxUOKHQ7kD5WqI1tVC5vaON1gJ8ZtFHA4mn4NdJW82LAuYcxvpRGUfQ10jY/ 208rUtk/6T3tRiyPwNHPEc1qi2V6on31eDQ5b5eNi8tCEZWkHNfFiTyQwrsLtUpW 0mhy/gTKEVrUqVZwdNPI7L8W5hwMfO+GwuxS13zTla6in6t+/LRgYhLC14OSlAm6 gcp1wk6/RxRfZSiJL9dejeySBxrScZka6JixU45BE9ogHi/5WMCRG4RB0CIkeQWX OFSxGkeJrXQvF318LzwgHyepKJ9380fDxtjowTkEAR8lOXvxDEZMeIIkR1QT9PO6 L5WsU4hfBbLn9occl32/VWN4MpnygVk6Dl4f/HmrEzjr67sZebuO+INim8S4AFCc Q1U3FgFeuDIWLevcuxmwFSs2bEeFqLsdI+4FM2XFcVTmz8Qj3kxJhZMvNfcqf4AP PIhgRtaDLu5Q7cpZ+vJe7Gdzd0MTINkc3cxl0iITPnQwlfJyAyqIuNyxS6ZKI3vK WhpGFcB0HsqRaCfukkVf3gVQpW1dInkDg97ZFxsrQjVaFTNoPmxpSuL2vUWRl9pV aPk7Oo+5J1WCa6LHxjHWFVC/I6sXuVFcAmVnMGzwLjD04q4bG45KtuanmMVXWlc5 t63HBQ0qOMS3aNlQQ9EM =z6K1 -----END PGP SIGNATURE----- qMerge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121210.0' into staging vfio-pci: fix kvm disabled path * awilliam/tags/vfio-pci-for-qemu-20121210.0: vfio-pci: Don't use kvm_irqchip_in_kernel Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
commit
5a58598090
|
@ -275,7 +275,7 @@ static void vfio_enable_intx_kvm(VFIODevice *vdev)
|
|||
int ret, argsz;
|
||||
int32_t *pfd;
|
||||
|
||||
if (!kvm_irqchip_in_kernel() ||
|
||||
if (!kvm_irqfds_enabled() ||
|
||||
vdev->intx.route.mode != PCI_INTX_ENABLED ||
|
||||
!kvm_check_extension(kvm_state, KVM_CAP_IRQFD_RESAMPLE)) {
|
||||
return;
|
||||
|
@ -438,7 +438,8 @@ static int vfio_enable_intx(VFIODevice *vdev)
|
|||
* Only conditional to avoid generating error messages on platforms
|
||||
* where we won't actually use the result anyway.
|
||||
*/
|
||||
if (kvm_check_extension(kvm_state, KVM_CAP_IRQFD_RESAMPLE)) {
|
||||
if (kvm_irqfds_enabled() &&
|
||||
kvm_check_extension(kvm_state, KVM_CAP_IRQFD_RESAMPLE)) {
|
||||
vdev->intx.route = pci_device_route_intx_to_irq(&vdev->pdev,
|
||||
vdev->intx.pin);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue