From: Bjorn Helgaas <helgaas@kernel.org>
To: Jake Oshins <jakeo@microsoft.com>
Cc: "bhelgaas@google.com" <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
KY Srinivasan <kys@microsoft.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"olaf@aepfle.de" <olaf@aepfle.de>,
"apw@canonical.com" <apw@canonical.com>,
"vkuznets@redhat.com" <vkuznets@redhat.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
Haiyang Zhang <haiyangz@microsoft.com>,
"marc.zyngier@arm.com" <marc.zyngier@arm.com>,
Hadden Hoppert <haddenh@microsoft.com>
Subject: Re: [PATCH RESEND v2 3/3] PCI: hv: New paravirtual PCI front-end for Hyper-V VMs
Date: Tue, 16 Feb 2016 16:44:15 -0600 [thread overview]
Message-ID: <20160216224415.GA11805@localhost> (raw)
In-Reply-To: <DM2PR0301MB1232A3F01DC9DB4F3BF97C18ABAD0@DM2PR0301MB1232.namprd03.prod.outlook.com>
On Tue, Feb 16, 2016 at 09:46:55PM +0000, Jake Oshins wrote:
> > -----Original Message-----
> > From: Bjorn Helgaas [mailto:helgaas@kernel.org]
> > Sent: Tuesday, February 16, 2016 8:46 AM
> > To: Jake Oshins <jakeo@microsoft.com>
> > Cc: bhelgaas@google.com; linux-pci@vger.kernel.org;
> > gregkh@linuxfoundation.org; KY Srinivasan <kys@microsoft.com>; linux-
> > kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de;
> > apw@canonical.com; vkuznets@redhat.com; tglx@linutronix.de; Haiyang
> > Zhang <haiyangz@microsoft.com>; marc.zyngier@arm.com; Hadden
> > Hoppert <haddenh@microsoft.com>
> > Subject: Re: [PATCH RESEND v2 3/3] PCI: hv: New paravirtual PCI front-end
> > for Hyper-V VMs
> >
> > Hi Jake,
> >
> > Looks good to me overall; I marked a few nits below.
> >
> > The only real question I have is about domain number allocation. See
> > the note below.
> >
> [snip]
> > > +
> > > + /*
> > > + * The PCI bus "domain" is what is called "segment" in
> > > + * ACPI and other specs. Pull it from the instance ID,
> > > + * to get something unique. Bytes 8 and 9 are what is used
> > > + * in Windows guests, so do the same thing for consistency.
> > > + */
> > > +
> > > + hbus->sysdata.domain = hdev->dev_instance.b[9] |
> > > + hdev->dev_instance.b[8] << 8;
> >
> > How do we know this is unique? We don't have any idea what the
> > platform will put in _SEG, so I think there's a potential conflict
> > here. The Intel VMD driver (arch/x86/pci/vmd.c) has a similar
> > problem, and it looks for unused domain numbers starting at 0x10000
> > (see vmd_find_free_domain()).
> >
>
> Bjorn, thank you for your very thorough reviews. I deeply appreciate it. I checked the Hyper-V code and it currently does guarantee that these values are unique. When I resend the series, I'll add a comment to that effect. I'll also add a comment to Hyper-V that says that it has to stay that way.
I'm not familiar with how Hyper-V works, but I guess you're saying
that Hyper-V controls what the guest sees via _SEG as well as what it
sees via the instance ID.
Bjorn
next prev parent reply other threads:[~2016-02-16 22:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 19:24 [PATCH RESEND v2 0/3] PCI: hv: New paravirtual PCI front-end driver jakeo
2016-02-09 19:24 ` [PATCH RESEND v2 1/3] PCI: Add fwnode_handle to pci_sysdata jakeo
2016-02-09 19:24 ` [PATCH RESEND v2 2/3] PCI: irqdomain: Look up IRQ domain by fwnode_handle jakeo
2016-02-09 19:24 ` [PATCH RESEND v2 3/3] PCI: hv: New paravirtual PCI front-end for Hyper-V VMs jakeo
2016-02-16 16:45 ` Bjorn Helgaas
2016-02-16 21:46 ` Jake Oshins
2016-02-16 22:44 ` Bjorn Helgaas [this message]
2016-02-16 22:48 ` Jake Oshins
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=20160216224415.GA11805@localhost \
--to=helgaas@kernel.org \
--cc=apw@canonical.com \
--cc=bhelgaas@google.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=haddenh@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=jakeo@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=olaf@aepfle.de \
--cc=tglx@linutronix.de \
--cc=vkuznets@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;
as well as URLs for NNTP newsgroup(s).