Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp265917rdb; Thu, 25 Jan 2024 14:58:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkgLmOwl7pbaPMDCNZC9pJCaPtUvOWIS4qQQH3lxxxHFwoNW7BPubUpbMzscTnR53EFt2J X-Received: by 2002:a17:90a:2dcd:b0:290:8eb8:aca8 with SMTP id q13-20020a17090a2dcd00b002908eb8aca8mr31013pjm.21.1706223526802; Thu, 25 Jan 2024 14:58:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706223526; cv=pass; d=google.com; s=arc-20160816; b=APqo3pgRLLzOmUQMa0ew9CXeQVh4exi5csvEt+TaCm3kiztUPvsqaUvU4v3MRoICYf St59tXGx9DaAmUwlGh92Out6Qq/qa4Fi489KII/x0RD1B0niji2iMnqgEVsGEM40PeNS l8YX9Yiay85mSU62+2BzW0JkOWH/bCKN90qA6QHS6gNlJlQZqYDiDvgKDQk4LIBZMt1y DEBjrASmTrvPLRED3uJgfHA6ww2opdVRyRcdDfLoJmVVgw03DF6W/I3d73lczKP05D+1 ZRFgMSiPywNCwC2QSmgjnGSv6kjbXirR2N1K+xB9TCLJ18zMoSjHY9BvfNbouJvWKI9D FyFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2FcJ0y8NFfuXCEfad7FVZRFQBMW2B2FwtGevEF8U6+E=; fh=sSogWyj+Vu8/ulRvHfp7io+SpkLUhCnDFJY1TUYNJRY=; b=nyO3ua+VQxVOCSm5ShJwvU1BP2o1m2E+48XsABy+Kcr1AZYeATBvwiMhLtyRNSv61n kmh0ngJSVIfuOkJu9r9359qDq+gRb7MmOAm7uOhrna/5iJAj/oHo+sTmawPirbvrE31l ijo57bai0lxWmhHnZMiyLBvSS6OtCQezrpBlL8kQ0EP67lJUOuNBCSjf5iLWRFbwj2EN EJMxaLkWFrAonxU1MSa0zvThOpTVv5OMUHWa2vqheWhAhjKI2R/NntvUmCLIsGANIyTd +ooNG9aw9RfWDB8EDkk0Ii806wdIEn3E6/lT4v9OMhwn40XOvfgZoOh5vmkuFuuW4Wmf gklg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CEyN+OJI; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-39373-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39373-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a2-20020a17090a688200b0029045a7dceesi46451pjd.136.2024.01.25.14.58.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 14:58:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39373-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CEyN+OJI; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-39373-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39373-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 05DD1B251F1 for ; Thu, 25 Jan 2024 22:48:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B956211CBD; Thu, 25 Jan 2024 22:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CEyN+OJI" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04FE110A24 for ; Thu, 25 Jan 2024 22:48:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706222892; cv=none; b=Jurf9QkV6i213VqRAqiLC2zzv7228sFqg3EX5C9ss03I+C/VCkHvws1gEQ/lfwHxYFzVmucQ+nQt4s9M4VU65ODwbxTskgJK9C9IIuegstGrGBDPNT1MKlpF5Sb/mYU6VveXPvCRu2MMBu6fLuhSqckodD1m4qWiGhwj19tQl/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706222892; c=relaxed/simple; bh=Ozpy2C3AVxBhEeZpBWtDgZqOuPhFK4pg9APHglEez3o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fDr3C/HyWPyHWpIYIQ6s0i6D3HZOXvBOLoIWuvQBUQR+HmOkMwnLe6xK+ZG45wNtyPr/Bu7yxbgp8Dv7U804nGhMCwFNmc+/eFOw/c0BVJPLIZNI1NlDHtOU/EDXWEkd7rAqBYU0WbHirMUC+utNn1O2cqzxVoPae16JwHajqLo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=CEyN+OJI; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706222889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2FcJ0y8NFfuXCEfad7FVZRFQBMW2B2FwtGevEF8U6+E=; b=CEyN+OJIIigfeNCvtE+/z5SlMUbB7h5YlqWTpzC0LQDtNHDOKDkxua5zvk8Y5LSknVQ6zT rcUDdCS5jVpA0xzOIBL2ZOPRh7M2pTzFmkD8t4Xos2x2oAm4ODJy0jKGTpGxIVyiFhKH+O 0ERBzOCCr1K5BkCSYzpgh8iyE3Nkn8E= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-50-qtp4vxoZPwORwKpyhW-IGA-1; Thu, 25 Jan 2024 17:48:08 -0500 X-MC-Unique: qtp4vxoZPwORwKpyhW-IGA-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-40e4478a3afso5603695e9.1 for ; Thu, 25 Jan 2024 14:48:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706222887; x=1706827687; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2FcJ0y8NFfuXCEfad7FVZRFQBMW2B2FwtGevEF8U6+E=; b=D6fU5MQLSvRGuMfze1+4rQIviHY79Tg4fKQ7okusYNMiwKwYiMoSiylN+NvSKYE8Oy Cp7PYn6drA8Txb1z/vKPNBso2D8c/lnz6YMUXkV4UOlhCkKH8brNp3yXOx/2IjCLmQIE bvGXsOwo+PxUUcOms87DwcgcjcA91Lw/3m/vVeAtfHs8+xYVrX8sPE46FbIVKyqj6goa oAjhhfBcuWe/0LzJ/Jo8ONDyiQgFf/AmlBFu2pW+6a6BAOhALqWjg7fEpVLyOVwp9Oz2 LlYPL4ATkx4mGf+ciOvCfwy6aaDEq6HwBzNzURyzDQsqCxUQJX7Ak0gRBB4cn6HzhaCk HWoQ== X-Gm-Message-State: AOJu0Yyd3HL5WnZv+b1ndeXIw5SnqMaQa9ZkgcgfHHRtlCQP4kKgX+aT Y/+H5l3TMbiXDUt4jHaEuq4EDKpEZDK9QKzVkRwl6WghwmKYtEQTVIifGasROK4h84gbDiDy0w/ YU5YyHKE8S3eKqqHWDedAvik0i5j9IosP3FwPnwo8588HQByR+IPoFv3IIYZ7LA== X-Received: by 2002:a05:600c:1f81:b0:40d:87b9:3525 with SMTP id je1-20020a05600c1f8100b0040d87b93525mr6948wmb.9.1706222886837; Thu, 25 Jan 2024 14:48:06 -0800 (PST) X-Received: by 2002:a05:600c:1f81:b0:40d:87b9:3525 with SMTP id je1-20020a05600c1f8100b0040d87b93525mr6940wmb.9.1706222886528; Thu, 25 Jan 2024 14:48:06 -0800 (PST) Received: from redhat.com ([2.52.130.36]) by smtp.gmail.com with ESMTPSA id b14-20020a05600c4e0e00b0040e559e0ba7sm3941969wmq.26.2024.01.25.14.48.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 14:48:05 -0800 (PST) Date: Thu, 25 Jan 2024 17:48:02 -0500 From: "Michael S. Tsirkin" To: Suzuki K Poulose Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Feng Liu , Yishai Hadas , Alex Williamson , Jean-Philippe Brucker Subject: Re: [PATCH] virtio: uapi: Drop __packed attribute in linux/virtio_pci.h: Message-ID: <20240125174705-mutt-send-email-mst@kernel.org> References: <20240124172345.853129-1-suzuki.poulose@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240124172345.853129-1-suzuki.poulose@arm.com> On Wed, Jan 24, 2024 at 05:23:45PM +0000, Suzuki K Poulose wrote: > 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: commit 92792ac752aa ("virtio-pci: Introduce admin command sending function") Proper form is: Fixes: 92792ac752aa ("virtio-pci: Introduce admin command sending function") > Cc: Feng Liu > Cc: Michael S. Tsirkin > Cc: Yishai Hadas > Cc: Alex Williamson > Cc: Jean-Philippe Brucker > Signed-off-by: Suzuki K Poulose > --- > include/uapi/linux/virtio_pci.h | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h > index ef3810dee7ef..a8208492e822 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]; Acked-by: Michael S. Tsirkin I will queue this. > -- > 2.34.1