[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2 1/2] xen: Update dm_op.h from Xen public header
- To: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
- From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
- Date: Sat, 22 Jul 2023 15:03:05 +0000
- Accept-language: en-US, ru-RU
- 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=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=+R4ajVG3h6SMNFqmYuOHuTKxByn6UKJrQ1FcwGYWYAM=; b=M1zHdZl5Vee6Tq6+gX+LGMKr2EKKEJK8CWZUAKmz+rYbVan+FnHMMcMXZEDcWv/XNkLdeKW2vtJreWkq9FEgtlR1Mn4PXuIY4wu5H9HQRRJfq91ROfaD9k4kG5E96TgyzzysNY24btuTbqLRvRUa0aOkhoXzFIOn8YZr8f7n3Vz08j65Z8mwfGSU363/JcnXX0giFW1f4dYmWxMdqlqlUW2pc84Rd/Y2OgJdWT2NRILK2b8zHU64Ir+UBFlH3HUQ/3eFONGBJvLNWCcYqjurJu5p8cWKpgm8HbMyHQsY9p1mjUMZOn8lK7fy99cADzNzU3pzlOaECOE5+m3UrDEaFQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LB/dBvEqsnFJmPeGzo3/ccJ5l7KfVIx0RdBOyKB+s4mo3dOqcQROTZBq+dsa5qYcZkABz762L3PTLs2hd+wTx3XGFEDFk5RMN8U6TQHkO2jzjis8eqZQEJD0yq1a37M7pxs7fVffib+YgWIVtt/NOggI1WFIBjA8xe+S//q2f7vogNE4VMkeVpLvbxj4YBxPqeqs7rHSjiQ6za/FvmyWnZC2SEmFAAZKQTJx+baAMV/yETQCwC8EpEZdw4mD7op2XA2jf1DbMGGORUReXmDFH8fbdxwxMJixxsKNOBWrv6D2ZB1Gg5kESF/6xiydb4CN69I3t+org0qd810nVa/aVg==
- Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, "stratos-dev@xxxxxxxxxxxxxxxxxxx" <stratos-dev@xxxxxxxxxxxxxxxxxxx>, Erik Schilling <erik.schilling@xxxxxxxxxx>, Manos Pitsidianakis <manos.pitsidianakis@xxxxxxxxxx>, Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Sat, 22 Jul 2023 15:03:33 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZuuzPfJ0NTGNckUyWY+5pgNmcK6/F5WEA
- Thread-topic: [PATCH V2 1/2] xen: Update dm_op.h from Xen public header
On 20.07.23 12:30, Viresh Kumar wrote:
Hello Viresh
> Update the definitions in dm_op.h from Xen public header.
I think, it would be good to mention exact Xen version (commit) we are
based on.
In general patch looks good to me, just a note.
I compared with Xen's public/hvm/dm_op.h and noticed differences. I
understand, this cannot be 100% verbatim copy, because of headers
location, emacs magics, GUEST_HANDLE vs XEN_GUEST_HANDLE. The Linux
header doesn't contain any aliases the Xen header has for each "struct
xen_dm_op_xxx", for example ...
[snip]
>
> +/*
> + * XEN_DMOP_create_ioreq_server: Instantiate a new IOREQ Server for a
> + * secondary emulator.
> + *
> + * The <id> handed back is unique for target domain. The valur of
> + * <handle_bufioreq> should be one of HVM_IOREQSRV_BUFIOREQ_* defined in
> + * hvm_op.h. If the value is HVM_IOREQSRV_BUFIOREQ_OFF then the buffered
> + * ioreq ring will not be allocated and hence all emulation requests to
> + * this server will be synchronous.
> + */
> +#define XEN_DMOP_create_ioreq_server 1
> +
> +struct xen_dm_op_create_ioreq_server {
> + /* IN - should server handle buffered ioreqs */
> + uint8_t handle_bufioreq;
> + uint8_t pad[3];
> + /* OUT - server id */
> + ioservid_t id;
> +};
... this one:
typedef struct xen_dm_op_create_ioreq_server
xen_dm_op_create_ioreq_server_t;
And "struct xen_dm_op" down the file uses these aliases inside a union.
I assume, we have to diverge here in order to follow a recommendation
to avoid typedef'ing structs at [1], am I сorrect? Or is there another
reason?
I think, it would be good to mention a reason in the description.
[1] https://www.kernel.org/doc/html/v6.4/process/coding-style.html#typedefs
|