qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [6609] Parse full PCI device addresses (Markus Armbruster)
Date: Thu, 12 Feb 2009 13:56:05 -0200	[thread overview]
Message-ID: <20090212155605.GA18654@amt.cnet> (raw)
In-Reply-To: <200902121539.26892.paul@codesourcery.com>

On Thu, Feb 12, 2009 at 03:39:26PM +0000, Paul Brook wrote:
> > This code parses full PCI device addresses.  It then rejects domains
> > other than zero, because these are not supported in QEMU.
> >...
> > + * Parse [[<domain>:]<bus>:]<slot>, return -1 on error
> > + */
> > +static int pci_parse_devaddr(const char *addr, int *domp, int *busp,
> > unsigned *slotp) +{
> 
> If we're rejecting nonzero domains then having the parse routine return a 
> domain value seems wrong. It's just going to make it harder to verify correct 
> operation when domains are implemented.

+    /* Note: QEMU doesn't implement domains other than 0 */
+    if (dom != 0 || pci_find_bus(bus) == NULL) {
+       fprintf(stderr, "PCI device address %s not supported", addr);
+       return -1;
+    }

+    if (!strcmp(devaddr, "auto")) {
+        *domp = *busp = 0;
+        *slotp = -1;
+        /* want to support dom/bus auto-assign at some point */
+        return 0;
+    }

We return domain 0. I considered domain 0 as implicit at the moment, is
that wrong?

I can't see where you're getting at.

  reply	other threads:[~2009-02-12 15:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 15:21 [Qemu-devel] [6609] Parse full PCI device addresses (Markus Armbruster) Anthony Liguori
2009-02-12 15:39 ` Paul Brook
2009-02-12 15:56   ` Marcelo Tosatti [this message]
2009-02-12 16:18     ` Paul Brook
2009-02-12 18:27       ` 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=20090212155605.GA18654@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).