From: "Michael S. Tsirkin" <mst@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] pci: fix pci_find_space()
Date: Sun, 11 Apr 2010 12:19:30 +0300 [thread overview]
Message-ID: <20100411091930.GC7383@redhat.com> (raw)
In-Reply-To: <20100409102048.GD14603@valinux.co.jp>
On Fri, Apr 09, 2010 at 07:20:48PM +0900, Isaku Yamahata wrote:
> pci capability must be in PCI space.
> It can't lay in PCIe extended config space.
>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
I guess the point is that we'll need another API to allocate
extended capabilities?
> ---
> hw/pci.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/hw/pci.c b/hw/pci.c
> index 2f6907b..f50568c 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -1701,10 +1701,9 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name)
>
> static int pci_find_space(PCIDevice *pdev, uint8_t size)
> {
> - int config_size = pci_config_size(pdev);
> int offset = PCI_CONFIG_HEADER_SIZE;
> int i;
> - for (i = PCI_CONFIG_HEADER_SIZE; i < config_size; ++i)
> + for (i = PCI_CONFIG_HEADER_SIZE; i < PCI_CONFIG_SPACE_SIZE - size; ++i)
> if (pdev->used[i])
> offset = i + 1;
> else if (i - offset + 1 == size)
> --
> 1.6.6.1
next prev parent reply other threads:[~2010-04-11 9:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-09 10:20 [Qemu-devel] [PATCH] pci: fix pci_find_space() Isaku Yamahata
2010-04-11 9:19 ` Michael S. Tsirkin [this message]
2010-04-12 1:59 ` [Qemu-devel] " Isaku Yamahata
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=20100411091930.GC7383@redhat.com \
--to=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yamahata@valinux.co.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.