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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Date: Fri, 17 May 2024 09:28:51 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • 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=DRtjy8UEl8ifJ30kOfJdmlhWDEHW6vaTf9cB80QFjbI=; b=UMSMAlloqzEq5jD+lsG6LKY4HFUyjG2wotzYExKbYYbZAtMvvfFUWtH9Gozy/cLXQhymD/l1WA3G33e8opI69x52/4hS2jowUKuM/LwALFC67AI3Vi9F3k/2Sdd/g8pj6QCqcUbZZqR2U7gqoe6bln0SoA7lw7W5daULdgUzKsB+sBteWFF0Pl10aK3UrSmoB5TqMYraTqoJbFWxNMQZbKJUTCoVPpLiRUwQvll8+2JzwRCzYhAgExsKsgraZWvPUkFnmXtjmTFupIrmr4EaSe53SOe+4XYSTnm7xCMjyQaZu7Qwy5+Y4xO5KvNICUQJieu/o3l3W5pIr5QOiUGigw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rs/9wyTk0qOi69I40OuS02bZkkCJbEw8x3fRnAm0Fp8wFmNVLP1x/Q2i7Kkt9zQucgQ5unxitEJ4AFuT9cw6VQCt0PuY0CUel9naT264X55w/wFfL7irAChA6ygiV21MZQEb0T6xKK2onITmlx610cuTSq6B9Q+pfvzjUKExpqlutv4djRHB/xsiwkWjiRp0lr+6iMY9RiChCHweh5OM5FwwBxu/ODpfiKCGAaeqXMMBvTdll39k9iY3209ey5QRTItZd1dafA/9nZUEzAcDat2+R5zRZIlF9i4tAqbWMvyK4fXzOS0KaKYmxFGygaXOe4eHBUMcqiCXKkDug2/e8g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: 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@xxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Hildebrand, Stewart" <Stewart.Hildebrand@xxxxxxx>, "Huang, Ray" <Ray.Huang@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Daniel P . Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
  • Delivery-date: Fri, 17 May 2024 09:29:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHap3bYcGtlWtrcpEyRLTK5fjq5SLGZ1UMAgAFwSAD//9GPgIAAlWQA
  • Thread-topic: [XEN PATCH v8 1/5] xen/vpci: Clear all vpci status of device

On 2024/5/17 16:20, Jan Beulich wrote:
> On 17.05.2024 10:08, Chen, Jiqian wrote:
>> On 2024/5/16 21:08, Jan Beulich wrote:
>>> On 16.05.2024 11:52, Jiqian Chen wrote:
>>>>  struct physdev_pci_device {
>>>>      /* IN */
>>>>      uint16_t seg;
>>>
>>> Is re-using this struct for this new sub-op sufficient? IOW are all
>>> possible resets equal, and hence it doesn't need specifying what kind of
>>> reset was done? For example, other than FLR most reset variants reset all
>>> functions in one go aiui. Imo that would better require only a single
>>> hypercall, just to avoid possible confusion. It also reads as if FLR would
>>> not reset as many registers as other reset variants would.
>> If I understood correctly that you mean in this hypercall it needs to 
>> support resetting both one function and all functions of a slot(dev)?
>> But it can be done for caller to use a cycle to call this reset hypercall 
>> for each slot function.
> 
> It could, yes, but since (aiui) there needs to be an indication of the
> kind of reset anyway, we can as well avoid relying on the caller doing
> so (and at the same time simplify what the caller needs to do).
Since the corresponding kernel patch has been merged into linux_next branch
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20240515&id=b272722511d5e8ae580f01830687b8a6b2717f01,
if it's not very mandatory and necessary, just let the caller handle it 
temporarily.
Or it can add a new hypercall to reset all functions in one go in future 
potential requirement, like PHYSDEVOP_pci_device_state_reset_all_func.

> 
> Jan

-- 
Best regards,
Jiqian Chen.

 


Rackspace

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