From: Bjorn Helgaas <helgaas@kernel.org>
To: haiyangz@microsoft.com
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
kys@microsoft.com, sthemmin@microsoft.com, olaf@aepfle.de,
vkuznets@redhat.com, driverdev-devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] pci-hyperv: Use only 16 bit integer for PCI domain
Date: Mon, 19 Jun 2017 16:07:43 -0500 [thread overview]
Message-ID: <20170619210742.GA554@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <1495658355-13103-1-git-send-email-haiyangz@exchange.microsoft.com>
[+cc Christoph]
On Wed, May 24, 2017 at 01:39:15PM -0700, Haiyang Zhang wrote:
> From: Haiyang Zhang <haiyangz@microsoft.com>
>
> This patch uses the lower 16 bits of the serial number as PCI
> domain, otherwise some drivers may not be able to handle it.
>
> Besides Nvidia drivers, we also found X.org, and DPDK handle
> only 16 bit PCI domain.
If you've sent patches to X.org and DPDK, please includes URLs to
them.
Christoph pointed out the conflict with VMD: vmd_find_free_domain()
allocates domains starting at 0x10000 to avoid the 16-bit domains
returned by ACPI _SEG.
I think we need a solution that works for both Nvidia/Hyper-V and VMD.
As it is, it looks like this will fix one place but break things
elsewhere.
If you believe that this will not break VMD, please explain.
Bjorn
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> ---
> drivers/pci/host/pci-hyperv.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
> index 8493638..51a815d 100644
> --- a/drivers/pci/host/pci-hyperv.c
> +++ b/drivers/pci/host/pci-hyperv.c
> @@ -1335,9 +1335,11 @@ static void put_pcichild(struct hv_pci_dev *hpdev,
> * can have shorter names than based on the bus instance UUID.
> * Only the first device serial number is used for domain, so the
> * domain number will not change after the first device is added.
> + * The lower 16 bits of the serial number is used, otherwise some
> + * drivers may not be able to handle it.
> */
> if (list_empty(&hbus->children))
> - hbus->sysdata.domain = desc->ser;
> + hbus->sysdata.domain = desc->ser & 0xFFFF;
> list_add_tail(&hpdev->list_entry, &hbus->children);
> spin_unlock_irqrestore(&hbus->device_list_lock, flags);
> return hpdev;
> --
> 1.7.1
>
next prev parent reply other threads:[~2017-06-19 21:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 20:39 Haiyang Zhang
2017-05-24 20:43 ` Haiyang Zhang
[not found] ` <20170525141955.6cee8fbb@alans-desktop>
2017-05-25 15:52 ` Stephen Hemminger
2017-05-25 7:56 ` Christoph Hellwig
2017-06-19 21:07 ` Bjorn Helgaas [this message]
2017-06-19 21:10 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2017-04-20 16:35 Haiyang Zhang
2017-04-20 18:33 ` Bjorn Helgaas
2017-04-20 18:37 ` Haiyang Zhang
2017-04-20 19:12 ` Christoph Hellwig
2017-04-24 23:06 ` John Hubbard
2017-04-25 13:00 ` Dan Carpenter
2017-04-25 13:14 ` Christoph Hellwig
2017-04-25 18:19 ` John Hubbard
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=20170619210742.GA554@bhelgaas-glaptop.roam.corp.google.com \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=hch@infradead.org \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=sthemmin@microsoft.com \
--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
all inboxes | Powered by JetHome®