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

Re: [PATCH 2/2] xen/dm: arm: Introduce inject_msi2 DM op


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Tue, 18 Mar 2025 09:10:53 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=g7qzA0JPm2wgHSuhNzotUZoZfUebMo43h+G7IRulgvA=; b=g2z+ml3emVSsrBmUB4bVJlu3Y9cHvazmFOjI4f0Pw6uW9z12F9QCKRqI/JwRdnXNUVJf+ZEN2dlxbRlh6qlUqoyM4RHGUT6PHSqQRtF59izzfoKfNLfDqa6/Tw9mn8D6inWBY+B/E5t5fScgrgK6njWtZjWr9Vi36xdhoZgQa73DNXeZbTqh+uPByXsEep9vkE/gglm8RfzOY17xpNthkFgoay6W8Ij0C5Js16Dl56u+J7XSyNh9Nw07NawFHbVlcwIJs+HxKIjON4KTAafpdCDUOqKziARnomQQRKjgMu0D0hu2EtHSbLOhoz4wxuAmwqlsz0e0rg7AnFLvbNKiVg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hcs5Qn6SdE7l/1dUF3FxLTIIfhrRnjyLNM12Kf7N88Fxy25suOhYJ2wRLETplmf5HubpeMy39A6OCkx2bCh+3RECWbmZpg5zLosBP7TGZlDfEzXikTnedTaqhlDoFW4AOaXpIOnFbDKwJ2JbwwIVut7Sapy1hHRvS+H4sWPE+j+0RIQ6rUT081ryDde2Tu/fCSMnhvenKO5BSngVH7rKFlfdcV79ry5WDD4kiAPTy9sFyFzgtOqrlDhUhUU8IF4yDiQsGNwdSaSn5uuYX6y2Pak7Zm86BRTUWolMaQac2OgvYAAZ4879dpZAs9FJEYyS9jHH908nfjeIPtWvJ6jG0Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 18 Mar 2025 09:11:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHaRWELmXttIq3ydUeKyfZPAZRMh7DaobyAgqCezQA=
  • Thread-topic: [PATCH 2/2] xen/dm: arm: Introduce inject_msi2 DM op

On 15.01.24 11:35, Jan Beulich wrote:
> On 14.01.2024 11:01, Mykyta Poturai wrote:
>> --- a/xen/include/public/hvm/dm_op.h
>> +++ b/xen/include/public/hvm/dm_op.h
>> @@ -444,6 +444,17 @@ struct xen_dm_op_nr_vcpus {
>>   };
>>   typedef struct xen_dm_op_nr_vcpus xen_dm_op_nr_vcpus_t;
>>   
>> +#define XEN_DMOP_inject_msi2 21
>> +#define XEN_DMOP_MSI_SOURCE_ID_VALID (1u << 0)
>> +
>> +struct xen_dm_op_inject_msi2 {
>> +    uint64_aligned_t addr;
>> +    uint32_t data;
>> +    uint32_t source_id; /* PCI SBDF */
> 
> Since the comment says SBDF (not BDF), how are multiple segments handled
> here? At least on x86 (VT-d and V-i) source IDs are only 16 bits iirc,
> and are local to the respective segment. It would feel wrong to use a
> 32-bit quantity there; IOW I'd rather see this as being two 16-bit fields
> (segment and source_id).
> 
Hi Jan,

I'm planning on resuming this series in the near future and want to 
clarify the DM op interface.

Wouldn't it be better to keep things consistent and use 
XEN_DMOP_PCI_SBDF as it's done in xen_dm_op_ioreq_server_range? Also 
with this, the value can be easily casted to pci_sbdf_t later and split 
to segment and BDF if needed.

>> +    uint32_t flags;
>> +};
> 
> Just like in struct xen_dm_op_inject_msi padding wants making explicit,
> and then wants checking for being zero.
> 
> Jan

Will do.

-- 
Mykyta

 


Rackspace

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