Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1649938 > unrolled thread
| Started by | Haiyang Zhang <haiyangz@exchange.microsoft.com> |
|---|---|
| First post | 2017-05-24 22:50 +0200 |
| Last post | 2017-05-25 10:00 +0200 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] pci-hyperv: Use only 16 bit integer for PCI domain Haiyang Zhang <haiyangz@exchange.microsoft.com> - 2017-05-24 22:50 +0200
RE: [PATCH] pci-hyperv: Use only 16 bit integer for PCI domain Haiyang Zhang <haiyangz@microsoft.com> - 2017-05-24 22:50 +0200
Re: [PATCH] pci-hyperv: Use only 16 bit integer for PCI domain Stephen Hemminger <stephen@networkplumber.org> - 2017-05-25 18:00 +0200
Re: [PATCH] pci-hyperv: Use only 16 bit integer for PCI domain Christoph Hellwig <hch@infradead.org> - 2017-05-25 10:00 +0200
| From | Haiyang Zhang <haiyangz@exchange.microsoft.com> |
|---|---|
| Date | 2017-05-24 22:50 +0200 |
| Subject | [PATCH] pci-hyperv: Use only 16 bit integer for PCI domain |
| Message-ID | <tKLod-76t-5@gated-at.bofh.it> |
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. 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
[toc] | [next] | [standalone]
| From | Haiyang Zhang <haiyangz@microsoft.com> |
|---|---|
| Date | 2017-05-24 22:50 +0200 |
| Message-ID | <tKLoe-76t-19@gated-at.bofh.it> |
| In reply to | #1649938 |
> -----Original Message----- > From: Haiyang Zhang [mailto:haiyangz@exchange.microsoft.com] > Sent: Wednesday, May 24, 2017 4:39 PM > To: bhelgaas@google.com; linux-pci@vger.kernel.org > Cc: Haiyang Zhang <haiyangz@microsoft.com>; KY Srinivasan > <kys@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>; > olaf@aepfle.de; vkuznets@redhat.com; driverdev- > devel@linuxdriverproject.org; linux-kernel@vger.kernel.org > Subject: [PATCH] pci-hyperv: Use only 16 bit integer for PCI domain > > [This sender failed our fraud detection checks and may not be who they > appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing] > > 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. > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> > --- According to Stephen Hemminger <sthemmin@microsoft.com>, there are additional programs, like X.org, DPDK, are also using 16-bit only PCI domain numbers. So, I'm submitting this patch for re-consideration. Thanks, - Haiyang
[toc] | [prev] | [next] | [standalone]
| From | Stephen Hemminger <stephen@networkplumber.org> |
|---|---|
| Date | 2017-05-25 18:00 +0200 |
| Message-ID | <tL3l7-1E0-3@gated-at.bofh.it> |
| In reply to | #1649945 |
On Thu, 25 May 2017 14:19:55 +0100 Alan Cox <gnomes@lxorguk.ukuu.org.uk> wrote: > > > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> > > > --- > > > > According to Stephen Hemminger <sthemmin@microsoft.com>, there are > > additional programs, like X.org, DPDK, are also using 16-bit only > > PCI domain numbers. So, I'm submitting this patch for re-consideration. > > The correct way to handle this is to send the needed patches to DPDK and > to X.org both of whom will I am sure be delighted to get it fixed in > their codebase. Both projects have stable ABI requirements. And the lead time to get the change propagated out to applications is long (>5yrs) even longer with the Enterprise distro's. As developers we can all just pass the buck but this doesn't help users in any reasonable time fram. It is not as simple as just making a patch or pull request for their upstream code bases.
[toc] | [prev] | [next] | [standalone]
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Date | 2017-05-25 10:00 +0200 |
| Message-ID | <tKVQB-5n9-11@gated-at.bofh.it> |
| In reply to | #1649938 |
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. And they will all break behind VMD for example, so NAK. Linux domains are 32 bits.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web