From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm <kvm@vger.kernel.org>, Alex Williamson <alex.williamson@redhat.com>
Subject: [PATCH] pci-assign: Fix MSI-X MMIO page registration
Date: Wed, 12 Oct 2011 19:02:37 +0200 [thread overview]
Message-ID: <4E95C82D.3090306@siemens.com> (raw)
The MSI-X page must start below the address that comes after the end of
a region. Otherwise we risk to register it twice. This bug existed since
day #1 of the MSI-X support and was now reveal by
memory.c:1201: memory_region_add_subregion_common: Assertion `!subregion->parent' failed.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/device-assignment.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index 054b059..11efd16 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -246,7 +246,7 @@ static void assigned_dev_iomem_setup(PCIDevice *pci_dev, int region_num,
/* deal with MSI-X MMIO page */
if (real_region->base_addr <= r_dev->msix_table_addr &&
- real_region->base_addr + real_region->size >=
+ real_region->base_addr + real_region->size >
r_dev->msix_table_addr) {
int offset = r_dev->msix_table_addr - real_region->base_addr;
--
1.7.3.4
next reply other threads:[~2011-10-12 17:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 17:02 Jan Kiszka [this message]
2011-10-12 17:14 ` [PATCH] pci-assign: Fix MSI-X MMIO page registration Alex Williamson
2011-10-19 15:53 ` Marcelo Tosatti
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=4E95C82D.3090306@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/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