From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: anthony@codemonkey.ws
Cc: anthony.perard@citrix.com, xen-devel@lists.xen,
qemu-devel@nongnu.org,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [Qemu-devel] [PULL 3/3] xen_pt: Fix passthrough of device with ROM.
Date: Fri, 17 Jan 2014 15:39:12 +0000 [thread overview]
Message-ID: <1389973152-12997-3-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1401171537140.21510@kaball.uk.xensource.com>
From: Anthony PERARD <anthony.perard@citrix.com>
QEMU does not need and should not allocate memory for the ROM of a
passthrough PCI device. So this patch initialize the particular region
like any other PCI BAR of a passthrough device.
When a guest will access the ROM, Xen will take care of the IO, QEMU
will not be involved in it.
Xen set a limit of memory available for each guest, allocating memory
for a ROM can hit this limit.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reported-and-Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
hw/xen/xen_pt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index eee4354..be4220b 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -440,8 +440,8 @@ static int xen_pt_register_regions(XenPCIPassthroughState *s)
s->bases[PCI_ROM_SLOT].access.maddr = d->rom.base_addr;
- memory_region_init_rom_device(&s->rom, OBJECT(s), NULL, NULL,
- "xen-pci-pt-rom", d->rom.size);
+ memory_region_init_io(&s->rom, OBJECT(s), &ops, &s->dev,
+ "xen-pci-pt-rom", d->rom.size);
pci_register_bar(&s->dev, PCI_ROM_SLOT, PCI_BASE_ADDRESS_MEM_PREFETCH,
&s->rom);
--
1.7.10.4
next prev parent reply other threads:[~2014-01-17 15:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 15:38 [Qemu-devel] [PULL 0/3] xen-170114 Stefano Stabellini
2014-01-17 15:39 ` [Qemu-devel] [PULL 1/3] xenfb: map framebuffer read-only and handle unmap errors Stefano Stabellini
2014-01-17 15:39 ` [Qemu-devel] [PULL 2/3] xen_pt: Fix debug output Stefano Stabellini
2014-01-17 15:39 ` Stefano Stabellini [this message]
2014-01-30 14:18 ` [Qemu-devel] [PULL 0/3] xen-170114 Stefano Stabellini
2014-01-31 0:23 ` Peter Maydell
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=1389973152-12997-3-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=anthony.perard@citrix.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=xen-devel@lists.xen \
/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).