xen/pciback: For XEN_PCI_OP_disable_msi[|x] only disable if device has MSI(X) enabled.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 1 Apr 2015 14:49:47 +0000 (10:49 -0400)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Feb 2017 22:32:49 +0000 (23:32 +0100)
commit4c2e2fd22095d210b8ec2db4f82cdd0a1c8e49a6
tree8f40a87e275a3e92bc8532093436ef37df25ca6f
parent5701f8a13c9bde54f047cfcad6f527e97eef6d4e
xen/pciback: For XEN_PCI_OP_disable_msi[|x] only disable if device has MSI(X) enabled.

commit 7cfb905b9638982862f0331b36ccaaca5d383b49 upstream.

Otherwise just continue on, returning the same values as
previously (return of 0, and op->result has the PIRQ value).

This does not change the behavior of XEN_PCI_OP_disable_msi[|x].

The pci_disable_msi or pci_disable_msix have the checks for
msi_enabled or msix_enabled so they will error out immediately.

However the guest can still call these operations and cause
us to disable the 'ack_intr'. That means the backend IRQ handler
for the legacy interrupt will not respond to interrupts anymore.

This will lead to (if the device is causing an interrupt storm)
for the Linux generic code to disable the interrupt line.

Naturally this will only happen if the device in question
is plugged in on the motherboard on shared level interrupt GSI.

This is part of XSA-157

Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/xen/xen-pciback/pciback_ops.c