public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] pci-assign: Fix MSI-X MMIO page registration
Date: Wed, 12 Oct 2011 11:14:21 -0600	[thread overview]
Message-ID: <1318439661.29873.29.camel@bling.home> (raw)
In-Reply-To: <4E95C82D.3090306@siemens.com>

On Wed, 2011-10-12 at 19:02 +0200, Jan Kiszka wrote:
> 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;
>  

Acked-by: Alex Williamson <alex.williamson@redhat.com>


  reply	other threads:[~2011-10-12 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12 17:02 [PATCH] pci-assign: Fix MSI-X MMIO page registration Jan Kiszka
2011-10-12 17:14 ` Alex Williamson [this message]
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=1318439661.29873.29.camel@bling.home \
    --to=alex.williamson@redhat.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.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