Received: by 10.223.185.116 with SMTP id b49csp103841wrg; Thu, 8 Mar 2018 13:41:45 -0800 (PST) X-Google-Smtp-Source: AG47ELt+f3vqezaarVv+Pm8kVv6KjaqLSC9hCnlek2dltxu8/2HS7xmQLe/YTrzZdVbUCk60Yse8 X-Received: by 10.101.69.66 with SMTP id x2mr22175126pgr.438.1520545305199; Thu, 08 Mar 2018 13:41:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520545305; cv=none; d=google.com; s=arc-20160816; b=uRtVOP/EhfM15xRPhZh6ZbWyeP6dhyaEDzhK2MJq53R+9zIz7hyFS0GdNixAJpPDCJ B06EwRJdNEKj2lXMRNrrCwywbkadImr6RA/YWXi14haE0LQHUHlEVPLmm1JJd2wqVyCP xTU9KmBe2qbnezoh3fRajalo5MhZuvRXhj/+FJ0dyk//d10uysbD2OY+sOaSEDQJyV6n avUniJ+J9mpQMoomhmZn2bSR2oJfCMHTz4q/aXaOHjApTgT0VnEW/xZoKchBY5Bf0V/L aKUAcZ1YRlD51WE562OnI5aOBd8Ksluj2LVO9J/Q4j4eg4sST7m9n7h306DiREpjDJTp nUxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=zmC6Jrb9heYOzmwRLJ6zv3odLhsqKGJOhVX3ihbktiQ=; b=aJgFeqvShldHGkpcBYIA2dbO30oY70nj3BAUcGWg2kxLqbwLDM9YVszItwcnGEl1ZN uosbHhgdVWzMfUaJTO5FxTqLcdjKGQD3LQuj3yUhqDnxk9Lka5rpzsbt1DSeUlG8D+Oi B42yc81woSRSXegGxSvOEleMmbA35lhMAZs5IuiLUbp3UVNTwDgzbZIwSf9Vg7DH+UMe vxqfKexual0SiJDt4K7gzY4yVJlyzwaptPLc0Y4Dt91e8ckh//LQFAVIXXhFCT1lFVGR FTdZPjT2xcSELG7ykKfF1Tg/bIjKgIgfBtsnbMd0RKnKEEkhYejS3139DE8kE2ESqDsn ZrVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=sN9UW2xw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v70si7224441pgb.198.2018.03.08.13.41.30; Thu, 08 Mar 2018 13:41:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=sN9UW2xw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751122AbeCHVk3 (ORCPT + 99 others); Thu, 8 Mar 2018 16:40:29 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:34770 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751086AbeCHVkZ (ORCPT ); Thu, 8 Mar 2018 16:40:25 -0500 Received: by mail-io0-f195.google.com with SMTP id e7so1328912ioj.1 for ; Thu, 08 Mar 2018 13:40:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zmC6Jrb9heYOzmwRLJ6zv3odLhsqKGJOhVX3ihbktiQ=; b=sN9UW2xwz5vNNw4Ufmq2eyK0gOnNwWEZq57q4A0QfcEo/LryreIRo9ywWRnq4gR/Uv h11m8aX6aAUGpj8EUymb66Xp3uH//r26egBNRt21vsZcbOYoAxfzR4nrK+qwIuaKSJNm SFUTyOoR9aDIyrxS3m5zMIIjsNXBozO3BMlTVgnz8EuicLP3utohxwlW5/IP60g948CZ v01RPCYfrcIDHGFqfgcl2DurCgin0OhvyU6+7RJby7kppyKCQXLcmSl/Gf+JJ7BP8YhF J2CqNwClRmj5MMWriNBpu1XXgDfxQ4dBvoHK1HkS7Hi9YdIohha/ujhP+YsaOD8vss+t gbGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zmC6Jrb9heYOzmwRLJ6zv3odLhsqKGJOhVX3ihbktiQ=; b=IEuJDkhE3yZNdeMe9V/Cp2ca6G5HeBJJiGuigRenpRniy/wYOBmfAfr0O+yd6ii15g z1bCMIi8h4zYjHWX8qKZ2GRKzMCWDglwPURmiESTItjIiy+p09X/YKZnW7cLRuldgq20 IqXYxE4Cg8Chss0SDzZi1V1u7lzk9JbvdEu5r1vNP2UI0X1I48tnLYw5zzc+9vWOYBlI exaW08D7ovTAn/UxRf3oeiprJNh8KXMfvI/eQOsUMD1gqoYkLA6uwt53+2jI2KtAoxwH TPVBMDzCgU7716zgTRo9iY3vDqQ5tcV/3u/V1kHK+ThHLdmeP5Ub6dwOZoEbJTq9UbAd uc7Q== X-Gm-Message-State: APf1xPA/Vc0FH6RRSEPpNOJg02RHAAeJ4EVMp7G7Cbg6HGnFuypjfFik BqPLZUdQVvwEQGng6TEqa85JLxYzrSbWi0DO5Ms7 X-Received: by 10.107.213.5 with SMTP id m5mr33903039iog.62.1520545224433; Thu, 08 Mar 2018 13:40:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.69.12 with HTTP; Thu, 8 Mar 2018 13:40:04 -0800 (PST) In-Reply-To: References: From: Bjorn Helgaas Date: Thu, 8 Mar 2018 13:40:04 -0800 Message-ID: Subject: Re: [PATCH] PCI BUS domain ID corruption To: Sridhar Pitchai Cc: Jake Oshins , Haiyang Zhang , Stephen Hemminger , Dexuan Cui , KY Srinivasan , David Davis , "devel@linuxdriverproject.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Lorenzo Pieralisi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc Lorenzo] On Thu, Mar 8, 2018 at 12:55 PM, Sridhar Pitchai wrote: > Hi, > > I would like to submit the following patch. This patch addresses the issue > when we try to add a VMBUS, the domain ID for the PCI bus is overwritten. Hi Sridhar, Thanks for the patch! This area is maintained by Lorenzo now (cc'd), so please copy him on the next round. We can't apply it as-is because it contains no Signed-off-by (see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst). This email is also too fancy (HTML, etc) and I think will be rejected by the mailing lists (see http://vger.kernel.org/majordomo-info.html#taboo). What you want is a plain-text email. Please also run "git log drivers/pci/host/pci-hyperv.c" and make your subject and changelog match the format and style of previous patches. It looks like this basically reverts 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain"), so you should explain what was wrong with that commit. Also, it doesn't look like this would apply cleanly to v4.16-rc1. Your patch shows this: - hbus->sysdata.domain = desc->ser & 0xFFFF; but v4.16-rc1 has this: hbus->sysdata.domain = desc->ser; Bjorn > srpitcha@ linux srpitcha/patch >cat 0001-PCI-BUS-domain-ID-curruption.patch > > From a0c407f3e2d57c84ac349f064dcee1d2961e5ca3 Mon Sep 17 00:00:00 2001 > > From: Sridhar Pitchai > > Date: Thu, 8 Mar 2018 12:33:50 -0800 > > Subject: [PATCH] PCI BUS domain ID corruption > > > > When PCI BUS is added, PCI_BUS domain ID is set. When PCI_BUS and device > to > > the bus is racing against each other, the first device tends to > overwrite > > the domain ID. In order to avoid the race, this patch make sure when a > > device is added to a bus it never updates the bus domain ID. Since we > have > > the transparent SRIOV mode now, the short VF device name is no longer > > needed. > > > > diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c > > index 1713bfc..6d43f81 100644 > > --- a/drivers/pci/host/pci-hyperv.c > > +++ b/drivers/pci/host/pci-hyperv.c > > @@ -1321,19 +1321,6 @@ static struct hv_pci_dev *new_pcichild_device(struct > hv_pcibus_device *hbus, > > get_pcichild(hpdev, hv_pcidev_ref_childlist); > > spin_lock_irqsave(&hbus->device_list_lock, flags); > > > > - /* > > - * When a device is being added to the bus, we set the PCI domain > > - * number to be the device serial number, which is non-zero and > > - * unique on the same VM. The serial numbers start with 1, and > > - * increase by 1 for each device. So device names including this > > - * 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 & 0xFFFF; > > list_add_tail(&hpdev->list_entry, &hbus->children); > > spin_unlock_irqrestore(&hbus->device_list_lock, flags); > > return hpdev; > > -- > > 2.7.4 > > > > srpitcha@ linux srpitcha/patch >