[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/22] pcie: don't skip multi-mask events
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 01/22] pcie: don't skip multi-mask events |
Date: |
Tue, 2 Jul 2019 11:06:31 -0400 |
If we are trying to set multiple bits at once, testing that just one of
them is already set gives a false positive. As a result we won't
interrupt guest if e.g. presence detection change and attention button
press are both set. This happens with multi-function device removal.
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/pci/pcie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 88c30ff74c..b22527000d 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -383,7 +383,7 @@ static void pcie_cap_slot_event(PCIDevice *dev,
PCIExpressHotPlugEvent event)
{
/* Minor optimization: if nothing changed - no event is needed. */
if (pci_word_test_and_set_mask(dev->config + dev->exp.exp_cap +
- PCI_EXP_SLTSTA, event)) {
+ PCI_EXP_SLTSTA, event) == event) {
return;
}
hotplug_event_notify(dev);
--
MST
- [Qemu-devel] [PULL 00/22] virtio, pc, pci: features, fixes, cleanups, Michael S. Tsirkin, 2019/07/02
- [Qemu-devel] [PULL 01/22] pcie: don't skip multi-mask events,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 02/22] pcie: check that slt ctrl changed before deleting, Michael S. Tsirkin, 2019/07/02
- [Qemu-devel] [PULL 04/22] pcie: minor cleanups for slot control/status, Michael S. Tsirkin, 2019/07/02
- [Qemu-devel] [PULL 03/22] pcie: work around for racy guest init, Michael S. Tsirkin, 2019/07/02
- [Qemu-devel] [PULL 06/22] virtio-pci: Allow to specify additional interfaces for the base type, Michael S. Tsirkin, 2019/07/02
- [Qemu-devel] [PULL 07/22] virtio-pmem: sync linux headers, Michael S. Tsirkin, 2019/07/02