From: Alex Williamson <alex.williamson@redhat.com>
To: kvm@vger.kernel.org
Cc: ddutile@redhat.com, chrisw@redhat.com, gleb@redhat.com,
alex.williamson@redhat.com
Subject: [PATCH 1/3] device-assignment: Fix slow option ROM mapping
Date: Fri, 30 Jul 2010 13:40:13 -0600 [thread overview]
Message-ID: <20100730194013.10110.49327.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20100730193941.10110.92913.stgit@localhost6.localdomain6>
cpu_register_io_memory() supports individual function pointers
being NULL, not the structure itself. Create and pass the
right thing.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/device-assignment.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index c56870e..c26ff6d 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -233,6 +233,8 @@ static CPUReadMemoryFunc * const slow_bar_read[] = {
&slow_bar_readl
};
+static CPUWriteMemoryFunc * const slow_bar_null_write[] = {NULL, NULL, NULL};
+
static void assigned_dev_iomem_map_slow(PCIDevice *pci_dev, int region_num,
pcibus_t e_phys, pcibus_t e_size,
int type)
@@ -244,7 +246,7 @@ static void assigned_dev_iomem_map_slow(PCIDevice *pci_dev, int region_num,
DEBUG("%s", "slow map\n");
if (region_num == PCI_ROM_SLOT)
- m = cpu_register_io_memory(slow_bar_read, NULL, region);
+ m = cpu_register_io_memory(slow_bar_read, slow_bar_null_write, region);
else
m = cpu_register_io_memory(slow_bar_read, slow_bar_write, region);
cpu_register_physical_memory(e_phys, e_size, m);
next prev parent reply other threads:[~2010-07-30 19:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-30 19:40 [PATCH 0/3] device-assignment: PCI option ROM fixes Alex Williamson
2010-07-30 19:40 ` Alex Williamson [this message]
2010-07-31 16:54 ` [PATCH 1/3] device-assignment: Fix slow option ROM mapping Chris Wright
2010-07-30 19:40 ` [PATCH 2/3] device-assignment: Always use slow mapping for PCI option ROM Alex Williamson
2010-07-31 16:55 ` Chris Wright
2010-07-30 19:40 ` [PATCH 3/3] device-assignment: Byte-wise ROM read Alex Williamson
2010-07-31 17:08 ` Chris Wright
2010-08-17 9:49 ` [PATCH 0/3] device-assignment: PCI option ROM fixes Avi Kivity
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=20100730194013.10110.49327.stgit@localhost6.localdomain6 \
--to=alex.williamson@redhat.com \
--cc=chrisw@redhat.com \
--cc=ddutile@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.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