1 |
commit: a9f3f483c3d2f0667fc7f7cccfd3f50402712456 |
2 |
Author: Jason Baron <jbaron <AT> redhat <DOT> com> |
3 |
AuthorDate: Tue Sep 4 20:22:46 2012 +0000 |
4 |
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 24 07:07:21 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qemu-kvm.git;a=commit;h=a9f3f483 |
7 |
|
8 |
pcie_aer: clear cmask for Advanced Error Interrupt Message Number |
9 |
|
10 |
The Advanced Error Interrupt Message Number (bits 31:27 of the Root |
11 |
Error Status Register) is updated when the number of msi messages assigned to a |
12 |
device changes. Migration of windows 7 on q35 chipset failed because the check |
13 |
in get_pci_config_device() fails due to cmask being set on these bits. Its valid |
14 |
to update these bits and we must restore this state across migration. |
15 |
|
16 |
Signed-off-by: Jason Baron <jbaron <AT> redhat.com> |
17 |
Signed-off-by: Michael S. Tsirkin <mst <AT> redhat.com> |
18 |
(cherry picked from commit 0e180d9c8a7429c55d23d2e7855f1e490a063aaa) |
19 |
|
20 |
--- |
21 |
hw/pcie_aer.c | 5 +++++ |
22 |
1 files changed, 5 insertions(+), 0 deletions(-) |
23 |
|
24 |
diff --git a/hw/pcie_aer.c b/hw/pcie_aer.c |
25 |
index 3b6981c..b04c164 100644 |
26 |
--- a/hw/pcie_aer.c |
27 |
+++ b/hw/pcie_aer.c |
28 |
@@ -738,6 +738,11 @@ void pcie_aer_root_init(PCIDevice *dev) |
29 |
PCI_ERR_ROOT_CMD_EN_MASK); |
30 |
pci_set_long(dev->w1cmask + pos + PCI_ERR_ROOT_STATUS, |
31 |
PCI_ERR_ROOT_STATUS_REPORT_MASK); |
32 |
+ /* PCI_ERR_ROOT_IRQ is RO but devices change it using a |
33 |
+ * device-specific method. |
34 |
+ */ |
35 |
+ pci_set_long(dev->cmask + pos + PCI_ERR_ROOT_STATUS, |
36 |
+ ~PCI_ERR_ROOT_IRQ); |
37 |
} |
38 |
|
39 |
void pcie_aer_root_reset(PCIDevice *dev) |