pci: Honour wmask when resetting PCI_INTERRUPT_LINE
commit7ff81d6357ad3ce31bc96f830b000bac37dafb41
authorBALATON Zoltan <balaton@eik.bme.hu>
Fri, 13 Mar 2020 08:24:40 +0000 (13 08:24 +0000)
committerJohn Snow <jsnow@redhat.com>
Tue, 17 Mar 2020 01:08:21 +0000 (16 21:08 -0400)
tree8d02f9fbdefef905be992428ab8a01c0b964b8ec
parentc06cde44eb41a6762fc4b79827dda84ea8842d2a
pci: Honour wmask when resetting PCI_INTERRUPT_LINE

The pci_do_device_reset() function (called from pci_device_reset)
clears the PCI_INTERRUPT_LINE config reg of devices on the bus but did
this without taking wmask into account. We'll have a device model now
that needs to set a constant value for this reg and this patch allows
to do that without additional workaround in device emulation to
reverse the effect of this PCI bus reset function.

Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 20200313082444.2439-4-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
hw/pci/pci.c