All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	QEMU-devel <qemu-devel@nongnu.org>,
	Xen Devel <xen-devel@lists.xen.org>
Subject: Re: [Qemu-devel] [PATCH V12 5/9] Revert "pci: don't export an internal function"
Date: Tue, 12 Jun 2012 18:15:57 +0300	[thread overview]
Message-ID: <20120612151557.GA10691@redhat.com> (raw)
In-Reply-To: <1339513523-1699-6-git-send-email-anthony.perard@citrix.com>

On Tue, Jun 12, 2012 at 04:05:19PM +0100, Anthony PERARD wrote:
> This reverts commit 94a09e2c846374a96719cda2b4e1312d8c4b08a7.
> 
> This function is used by a later patch to parse the BDF of the device to
> passthrough.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

You probably want to parse the host address?  You don't want to copy the
bugs in pci_parse_devaddr - write your own that has sane semantics
for host. E.g. you need to support ARI etc.

> ---
>  hw/pci.c |    2 +-
>  hw/pci.h |    2 ++
>  2 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/pci.c b/hw/pci.c
> index eec106a..5bddf7a 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -479,7 +479,7 @@ static void pci_set_default_subsystem_id(PCIDevice *pci_dev)
>   * Parse [[<domain>:]<bus>:]<slot>, return -1 on error if funcp == NULL
>   *       [[<domain>:]<bus>:]<slot>.<func>, return -1 on error
>   */
> -static int pci_parse_devaddr(const char *addr, int *domp, int *busp,
> +int pci_parse_devaddr(const char *addr, int *domp, int *busp,
>                        unsigned int *slotp, unsigned int *funcp)
>  {
>      const char *p;
> diff --git a/hw/pci.h b/hw/pci.h
> index ecf37fd..b169c0b 100644
> --- a/hw/pci.h
> +++ b/hw/pci.h
> @@ -321,6 +321,8 @@ PCIDevice *pci_find_device(PCIBus *bus, int bus_num, uint8_t devfn);
>  int pci_qdev_find_device(const char *id, PCIDevice **pdev);
>  PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr);
>  
> +int pci_parse_devaddr(const char *addr, int *domp, int *busp,
> +                      unsigned int *slotp, unsigned int *funcp);
>  int pci_read_devaddr(Monitor *mon, const char *addr, int *domp, int *busp,
>                       unsigned *slotp);
>  
> -- 
> Anthony PERARD

  parent reply	other threads:[~2012-06-12 15:15 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 15:05 [Qemu-devel] [PATCH V12 0/9] Xen PCI Passthrough Anthony PERARD
2012-06-12 15:05 ` Anthony PERARD
2012-06-12 15:05 ` [PATCH V12 1/9] pci_ids: Add INTEL_82599_SFP_VF id Anthony PERARD
2012-06-12 15:05 ` [Qemu-devel] " Anthony PERARD
2012-06-12 15:05 ` [Qemu-devel] [PATCH V12 2/9] configure: Introduce --enable-xen-pci-passthrough Anthony PERARD
2012-06-12 15:05 ` Anthony PERARD
2012-06-12 15:05 ` [Qemu-devel] [PATCH V12 3/9] Introduce XenHostPCIDevice to access a pci device on the host Anthony PERARD
2012-06-12 15:05   ` Anthony PERARD
2012-06-12 15:05 ` [Qemu-devel] [PATCH V12 4/9] pci.c: Add opaque argument to pci_for_each_device Anthony PERARD
2012-06-12 15:05 ` Anthony PERARD
2012-06-12 15:05 ` [Qemu-devel] [PATCH V12 5/9] Revert "pci: don't export an internal function" Anthony PERARD
2012-06-12 15:05   ` Anthony PERARD
2012-06-12 15:15   ` Michael S. Tsirkin
2012-06-12 15:15   ` Michael S. Tsirkin [this message]
2012-06-13 10:56     ` [Qemu-devel] " Stefano Stabellini
2012-06-13 11:06       ` Michael S. Tsirkin
2012-06-13 11:06       ` Michael S. Tsirkin
2012-06-13 10:56     ` Stefano Stabellini
2012-06-13 11:15     ` [Qemu-devel] " Jan Kiszka
2012-06-13 11:22       ` Stefano Stabellini
2012-06-13 12:00         ` Jan Kiszka
2012-06-13 12:00         ` [Qemu-devel] " Jan Kiszka
2012-06-13 12:22           ` Andreas Färber
2012-06-13 12:22           ` Andreas Färber
2012-06-13 12:48             ` Jan Kiszka
2012-06-13 12:48             ` Jan Kiszka
2012-06-13 12:40           ` Anthony PERARD
2012-06-13 12:48             ` Jan Kiszka
2012-06-13 12:48             ` [Qemu-devel] " Jan Kiszka
2012-06-14 14:39               ` Anthony PERARD
2012-06-14 15:21                 ` Jan Kiszka
2012-06-14 15:21                 ` [Qemu-devel] " Jan Kiszka
2012-06-14 16:01                   ` Anthony PERARD
2012-06-14 16:01                   ` Anthony PERARD
2012-06-14 15:30                 ` Michael S. Tsirkin
2012-06-14 15:30                 ` [Qemu-devel] " Michael S. Tsirkin
2012-06-14 15:59                   ` Anthony PERARD
2012-06-14 15:59                   ` [Qemu-devel] " Anthony PERARD
2012-06-14 14:39               ` Anthony PERARD
2012-06-13 12:40           ` Anthony PERARD
2012-06-13 11:22       ` Stefano Stabellini
2012-06-13 11:22       ` Michael S. Tsirkin
2012-06-13 11:22       ` [Qemu-devel] " Michael S. Tsirkin
2012-06-13 11:48         ` Jan Kiszka
2012-06-13 11:48         ` [Qemu-devel] " Jan Kiszka
2012-06-13 14:04           ` Michael S. Tsirkin
2012-06-13 14:04           ` Michael S. Tsirkin
2012-06-13 11:15     ` Jan Kiszka
2012-06-12 15:05 ` [Qemu-devel] [PATCH V12 6/9] Introduce Xen PCI Passthrough, qdevice (1/3) Anthony PERARD
2012-06-12 15:05   ` Anthony PERARD
2012-06-12 15:05 ` [Qemu-devel] [PATCH V12 7/9] Introduce Xen PCI Passthrough, PCI config space helpers (2/3) Anthony PERARD
2012-06-12 15:05   ` Anthony PERARD
2012-06-12 15:05 ` [Qemu-devel] [PATCH V12 8/9] Introduce apic-msidef.h Anthony PERARD
2012-06-12 15:05   ` Anthony PERARD
2012-06-12 15:05 ` [Qemu-devel] [PATCH V12 9/9] Introduce Xen PCI Passthrough, MSI (3/3) Anthony PERARD
2012-06-12 15:05   ` Anthony PERARD

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=20120612151557.GA10691@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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 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.