Patch "virtio: uapi: Drop __packed attribute in linux/virtio_pci.h" has been added to the 6.8-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    virtio: uapi: Drop __packed attribute in linux/virtio_pci.h

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     virtio-uapi-drop-__packed-attribute-in-linux-virtio_.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d155edb425be0818ad7a1b5e1c585ee9ff672fe9
Author: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
Date:   Thu Jan 25 23:20:39 2024 +0000

    virtio: uapi: Drop __packed attribute in linux/virtio_pci.h
    
    [ Upstream commit ec6ecb844d14d38b7dae8beb74e3d65db9c7b3e6 ]
    
    Commit 92792ac752aa ("virtio-pci: Introduce admin command sending function")
    added "__packed" structures to UAPI header linux/virtio_pci.h. This triggers
    build failures in the consumer userspace applications without proper "definition"
    of __packed (e.g., kvmtool build fails).
    
    Moreover, the structures are already packed well, and doesn't need explicit
    packing, similar to the rest of the structures in all virtio_* headers. Remove
    the __packed attribute.
    
    Fixes: 92792ac752aa ("virtio-pci: Introduce admin command sending function")
    Cc: Feng Liu <feliu@xxxxxxxxxx>
    Cc: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Cc: Yishai Hadas <yishaih@xxxxxxxxxx>
    Cc: Alex Williamson <alex.williamson@xxxxxxxxxx>
    Cc: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
    Reviewed-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
    Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
    Message-Id: <20240125232039.913606-1-suzuki.poulose@xxxxxxx>
    Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h
index ef3810dee7efa..a8208492e8227 100644
--- a/include/uapi/linux/virtio_pci.h
+++ b/include/uapi/linux/virtio_pci.h
@@ -240,7 +240,7 @@ struct virtio_pci_cfg_cap {
 #define VIRTIO_ADMIN_CMD_LEGACY_DEV_CFG_READ		0x5
 #define VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO		0x6
 
-struct __packed virtio_admin_cmd_hdr {
+struct virtio_admin_cmd_hdr {
 	__le16 opcode;
 	/*
 	 * 1 - SR-IOV
@@ -252,20 +252,20 @@ struct __packed virtio_admin_cmd_hdr {
 	__le64 group_member_id;
 };
 
-struct __packed virtio_admin_cmd_status {
+struct virtio_admin_cmd_status {
 	__le16 status;
 	__le16 status_qualifier;
 	/* Unused, reserved for future extensions. */
 	__u8 reserved2[4];
 };
 
-struct __packed virtio_admin_cmd_legacy_wr_data {
+struct virtio_admin_cmd_legacy_wr_data {
 	__u8 offset; /* Starting offset of the register(s) to write. */
 	__u8 reserved[7];
 	__u8 registers[];
 };
 
-struct __packed virtio_admin_cmd_legacy_rd_data {
+struct virtio_admin_cmd_legacy_rd_data {
 	__u8 offset; /* Starting offset of the register(s) to read. */
 };
 
@@ -275,7 +275,7 @@ struct __packed virtio_admin_cmd_legacy_rd_data {
 
 #define VIRTIO_ADMIN_CMD_MAX_NOTIFY_INFO 4
 
-struct __packed virtio_admin_cmd_notify_info_data {
+struct virtio_admin_cmd_notify_info_data {
 	__u8 flags; /* 0 = end of list, 1 = owner device, 2 = member device */
 	__u8 bar; /* BAR of the member or the owner device */
 	__u8 padding[6];




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux