[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC XEN PATCH v5 1/5] xen/vpci: Clear all vpci status of device


  • To: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Thu, 22 Feb 2024 09:37:31 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JL/sZFRb6nwZUYNapXnnprE+amw5XNd3uGcjchCdbqo=; b=IioYlcoRCLeMni+/InoQdXWfrecvdDCyv8DR22H/eSau+ILHDCHqg89taE42SJYuX9AyEVbL4+4+RyzUwNscPnQOJkMfVshoydQK+KNEHDXz2BuBQwR4x0sAEnQ9RmHcCGnTOnOC5fHBqWsyfaPZX19VlOgUMhNqDAiriD9/PTosWsPwylYyehHUed4c0erGkVYe71KF3AuMErq21YGF+BIKlozXPLYqn4c+e/e4HC4mHvV2v3+qrV96b1xVIeXBgn/Md61IgwDQZNjzYaLRRQRgN4aHZYJkC4TQnYRoBX2OB1glWTNt1BUEHehrwatWSn6h8Wv5QHPYDcFhaem1cA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y0PXmEDdcmKPjQ8np0+yfFpqyDkZ0J5garsEBqTk9xXn/g30UfRaE4VWqv98+tjORO35oQ/N8UPpsL1cYbUPN9xFDZBVbuiYdiHDyt0F2IO/7yplOxFi4B2pyEzYp+25jduZ6avVtnpNGDTbAoptD3OPj3rf9n38TGoQYEQgsYv/DxWhozT8GKr8V9K3ywG63Sw8rjCTu6m44w0RStnbhWYHqluen1Wf3SsGDDB/i/iaT18vEkzQeN2OeUTOdUUG6pATZMPiHkhpd7hcPJ3rqMz5KMAeWCnjBUwrxdGt/YY8/eRTWdsbF+5sb8CO9JD8iUZeQ1fklQj1jeErd1C0Tw==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Daniel P . Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "Huang, Ray" <Ray.Huang@xxxxxxx>
  • Delivery-date: Thu, 22 Feb 2024 14:37:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2/22/24 01:22, Chen, Jiqian wrote:
> Hi Stewart,
> 
> On 2024/2/10 02:02, Stewart Hildebrand wrote:
>> On 1/12/24 01:13, Jiqian Chen wrote:
>>> When a device has been reset on dom0 side, the vpci on Xen
>>> side won't get notification, so the cached state in vpci is
>>> all out of date compare with the real device state.
>>> To solve that problem, add a new hypercall to clear all vpci
>>> device state. When the state of device is reset on dom0 side,
>>> dom0 can call this hypercall to notify vpci.
>>>
>>> Co-developed-by: Huang Rui <ray.huang@xxxxxxx>
>>> Signed-off-by: Jiqian Chen <Jiqian.Chen@xxxxxxx>
>>
>> Reviewed-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
> Thanks, I will add in next version.
> 
>>
>> If you send another version, the RFC tag may be dropped.
> Does only this one patch, or all patches of this series, need to drop RFC tag?

In my opinion at least patches 1, 2, and 3. If you decide to retain the
RFC tag on e.g. patches 4 and/or 5, you may want to include after the
commit description a scissors line --- followed by a brief explanation
for the RFC tag. For example:

---
RFC: discussions ongoing on the Linux side where/how to expose the gsi

>>
>> One thing to keep an eye out for below (not requesting any changes).
> Thanks for reminding me, I will always keep rebasing my code from latest 
> staging branch before sending new version.
> 
>>
>>> ---
>>> diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c
>>> index 72ef277c4f8e..c6df2c6a9561 100644
>>> --- a/xen/drivers/vpci/vpci.c
>>> +++ b/xen/drivers/vpci/vpci.c
>>> @@ -107,6 +107,16 @@ int vpci_add_handlers(struct pci_dev *pdev)
>>>  
>>>      return rc;
>>>  }
>>> +
>>> +int vpci_reset_device_state(struct pci_dev *pdev)
>>> +{
>>> +    ASSERT(pcidevs_locked());
>>> +    ASSERT(rw_is_write_locked(&pdev->domain->pci_lock));
>>> +
>>> +    vpci_remove_device(pdev);
>>> +    return vpci_add_handlers(pdev);
>>
>> Note that these two functions may be renamed soon by the patch at [1].
>> Whichever patch goes in later will need to be rebased to account for the
>> rename.
>>
>> [1] 
>> https://lists.xenproject.org/archives/html/xen-devel/2024-02/msg00134.html
>>
>>> +}
>>> +
>>>  #endif /* __XEN__ */
>>>  
>>>  static int vpci_register_cmp(const struct vpci_register *r1,
>>
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.