qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] pci: Restore bus-master memory mapping state af


From: Hans de Goede
Subject: [Qemu-devel] [PATCH 2/2] pci: Restore bus-master memory mapping state after migration
Date: Thu, 8 Nov 2012 12:54:27 +0100

This fixes dma reads / writes from pci-devices no longer working after
migration.

Signed-off-by: Hans de Goede <address@hidden>
---
 hw/pci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/pci.c b/hw/pci.c
index dceda0b..6666651 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -367,6 +367,10 @@ static int get_pci_config_device(QEMUFile *f, void *pv, 
size_t size)
 
     pci_update_mappings(s);
 
+    memory_region_set_enabled(&s->bus_master_enable_region,
+                              pci_get_word(s->config + PCI_COMMAND)
+                                & PCI_COMMAND_MASTER);
+
     g_free(config);
     return 0;
 }
-- 
1.7.12.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]