From: Hans de Goede <hdegoede@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] pci: Restore bus-master memory mapping state after migration
Date: Thu, 8 Nov 2012 12:54:27 +0100 [thread overview]
Message-ID: <1352375667-5077-2-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1352375667-5077-1-git-send-email-hdegoede@redhat.com>
This fixes dma reads / writes from pci-devices no longer working after
migration.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
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
prev parent reply other threads:[~2012-11-08 11:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 11:29 [Qemu-devel] [PATCH 0/2] Fix pci bus-master & ehci migration Hans de Goede
2012-11-08 11:54 ` [Qemu-devel] [PATCH 1/2] ehci-pci: Fix crash on migration / migration not working Hans de Goede
2012-11-08 11:54 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352375667-5077-2-git-send-email-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).