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

Re: [PATCH V3 1/2] xen: Update dm_op.h from Xen public header


  • To: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 25 Jul 2023 09:18:05 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=lfkmAbvaGhDvplXe8kl8ESjTuPx4xFgu5vAhX9Q5f/o=; b=VBpTy7NuMcLRyEuqGj6p9bVFE+pUnPr/iziQBfAh+LAM3cNnBJIfIVU+YC11NuchSeBUXIaf0EIORAeSXYgF1hs8crm3jEg09QtXs19P4Aqy+YfsvkSDcS0FECljriIAfnYqLLxoH6gQNVzYC/HAWfL0wAZbiyQXN5ImbbfXRyTzdpc7NYXZ5dFTOeqhMdPkuucdMunRurMN1zogQxU6YY2Yzm0FB33KezC7JzhZB7wuI6HFw6rDuQi4Aq+QV1pdtfBKaZQIgNnNb+uRRTfeC8M3nP5Tt51PmjNtpqgy7J8Rb+1q4dgxOcz9RqH7TkO4yzdxepH94PEdo5vNkME9sA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FYpZ1omjT7q2tA+UB7+wbhAh+ypxd1cgWzxRVVJ4vSiXDIpQTgo0nIE2GAK61wwkV5CabkMN6g66XmeTmF83XPAvy/ClDKOt4PjC5ORQjcnl0JwojJdNZM2Mfi5Ep72G4V21yIyT7GbNGa0UYBJC+h234gZDx8TuCCn3W+ldbgpkuyHj4m+N5PQ5bilLluCPL8N9eQcTdjBU/nwMeqKVDy+DqanCbb5LBwXo/De0MpKTq6Vkq/1IEOon3HJ+S0P/WPk40LJ4yJQW61wp88eva0YtOLVHMzm73TLk6+cmQG1WFdvSmpQD2aMv0Q3Rccc2YtrNw6Up2GCKDrZ/2bDixw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, stratos-dev@xxxxxxxxxxxxxxxxxxx, Erik Schilling <erik.schilling@xxxxxxxxxx>, Manos Pitsidianakis <manos.pitsidianakis@xxxxxxxxxx>, Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
  • Delivery-date: Tue, 25 Jul 2023 07:18:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.07.2023 09:09, Viresh Kumar wrote:
> On 25-07-23, 09:04, Jan Beulich wrote:
>> On 25.07.2023 08:47, Viresh Kumar wrote:
>>> +struct xen_dm_op {
>>> +    uint32_t op;
>>> +    uint32_t pad;
>>> +    union {
>>> +        struct xen_dm_op_create_ioreq_server create_ioreq_server;
>>> +        struct xen_dm_op_get_ioreq_server_info get_ioreq_server_info;
>>> +        struct xen_dm_op_ioreq_server_range map_io_range_to_ioreq_server;
>>> +        struct xen_dm_op_ioreq_server_range 
>>> unmap_io_range_from_ioreq_server;
>>> +        struct xen_dm_op_set_ioreq_server_state set_ioreq_server_state;
>>> +        struct xen_dm_op_destroy_ioreq_server destroy_ioreq_server;
>>> +        struct xen_dm_op_track_dirty_vram track_dirty_vram;
>>> +        struct xen_dm_op_set_pci_intx_level set_pci_intx_level;
>>> +        struct xen_dm_op_set_isa_irq_level set_isa_irq_level;
>>> +        struct xen_dm_op_set_irq_level set_irq_level;
>>> +        struct xen_dm_op_set_pci_link_route set_pci_link_route;
>>> +        struct xen_dm_op_modified_memory modified_memory;
>>> +        struct xen_dm_op_set_mem_type set_mem_type;
>>> +        struct xen_dm_op_inject_event inject_event;
>>> +        struct xen_dm_op_inject_msi inject_msi;
>>> +        struct xen_dm_op_map_mem_type_to_ioreq_server 
>>> map_mem_type_to_ioreq_server;
>>> +        struct xen_dm_op_remote_shutdown remote_shutdown;
>>> +        struct xen_dm_op_relocate_memory relocate_memory;
>>> +        struct xen_dm_op_pin_memory_cacheattr pin_memory_cacheattr;
>>> +        struct xen_dm_op_nr_vcpus nr_vcpus;
>>> +    } u;
>>> +};
>>
>> Is sync-ing for the sake of sync-ing really useful? For example, are any
>> of the ioreq server elements halfway likely to ever be used in the kernel?
> 
> The only field, out of the union, I am using for now is:
> 
>         struct xen_dm_op_set_irq_level set_irq_level;
> 
> I am not sure if some of the others are going to be used or not in the
> future.

I question that use, btw, but it is not up to me to decide whether to
accept such a layering violation in Linux. dm-op is, as its name says,
for device models to use. Your intended use doesn't fall in that
category, aiui. Imo the present contents of dm_op.h in Linux is indeed
all a kernel is supposed to know about, unless it was to gain in-kernel
device models.

Jan



 


Rackspace

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