Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2009274pxa; Mon, 24 Aug 2020 02:22:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOXDwa+oMIz15SyIsJ5rDujqfkiF7XbquH3PIZ51KuS+7D/zjO+CbHXuYiMW1AtJbotFwl X-Received: by 2002:a17:906:3f82:: with SMTP id b2mr4844982ejj.240.1598260923725; Mon, 24 Aug 2020 02:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598260923; cv=none; d=google.com; s=arc-20160816; b=yjCe1+quA0+yyeeM6AgkgqWFMazkZ2rf8F5yk74S99VMAcw10qoobt/1RMimcS6APy 82DzexqijRiuLY+Ku+hddh2HKs5+gQixxQ/I5BP3MEBCHbcA6vcywvMv/Y2fWdLCBFKx uMih9R+f7oJo5groxSg7deaa2kSmGTNLcaw8zqZh7IMcq3ZMKFp3lUtjNHuQessV6uep wTZI6W2fZAp0QQuc+kZh9Rx05WRozgYatDvoD/ZU09pf8NYv35o7N9EMv/AELxaucNBF 0O1d8cpKWooqBMVpkhayZSlNBCmBHSqPXAbfiqLQaTPvyafAXhR+NhsSJxc8tUqKqGHf ou8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=acXZYqOp9V3UVB0eu6j265Yk3t1zKiEpH7j6sJZQNic=; b=ZtQzcOt2ND5UMQaVvE50ffIni40lIN3uLG6j5UvVoezjhX+SVxCtuidzUO+2KWY6gJ XNEAA1suqMIF+RXphIYYyk9eESOAV0OpukwNwvS7ygogyk+s0N5dCvbjcrWtx6bFiQ9w GIGD2C56WwjA0rXpkfFmHsUeZUp2ZfM8kJCBIznCQaNmfILfdrckGxmSqyIJHs1zq9wq CxPGYz8ouHwN2IDCq2h2RjfHy11JWfn9U+kdrEeDpasbhTu697e0Hmte1crHBhwxwdeG zs7BbB02WfWHbp/7obAczWp3CtMWGwXB10bExszpf0rif4uyQmRjfOsPyelNhU76g93p 8RZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p4si8353177edi.81.2020.08.24.02.21.41; Mon, 24 Aug 2020 02:22:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730456AbgHXJTG (ORCPT + 99 others); Mon, 24 Aug 2020 05:19:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728997AbgHXIzz (ORCPT ); Mon, 24 Aug 2020 04:55:55 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B64D0C061574; Mon, 24 Aug 2020 01:55:54 -0700 (PDT) Received: from cap.home.8bytes.org (p4ff2bb8d.dip0.t-ipconnect.de [79.242.187.141]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by theia.8bytes.org (Postfix) with ESMTPSA id 5A5B04BB; Mon, 24 Aug 2020 10:55:48 +0200 (CEST) From: Joerg Roedel To: x86@kernel.org Cc: Joerg Roedel , Joerg Roedel , Borislav Petkov , hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH v6 04/76] KVM: SVM: Use __packed shorthand Date: Mon, 24 Aug 2020 10:53:59 +0200 Message-Id: <20200824085511.7553-5-joro@8bytes.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200824085511.7553-1-joro@8bytes.org> References: <20200824085511.7553-1-joro@8bytes.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov Use the shorthand to make it more readable. No functional changes. Signed-off-by: Borislav Petkov Signed-off-by: Joerg Roedel --- arch/x86/include/asm/svm.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index 50e5fa8d3249..da38eb195355 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h @@ -150,14 +150,14 @@ struct __attribute__ ((__packed__)) vmcb_control_area { #define SVM_NESTED_CTL_NP_ENABLE BIT(0) #define SVM_NESTED_CTL_SEV_ENABLE BIT(1) -struct __attribute__ ((__packed__)) vmcb_seg { +struct vmcb_seg { u16 selector; u16 attrib; u32 limit; u64 base; -}; +} __packed; -struct __attribute__ ((__packed__)) vmcb_save_area { +struct vmcb_save_area { struct vmcb_seg es; struct vmcb_seg cs; struct vmcb_seg ss; @@ -231,7 +231,7 @@ struct __attribute__ ((__packed__)) vmcb_save_area { u64 xcr0; u8 valid_bitmap[16]; u64 x87_state_gpa; -}; +} __packed; struct ghcb { struct vmcb_save_area save; @@ -252,11 +252,11 @@ static inline void __unused_size_checks(void) BUILD_BUG_ON(sizeof(struct ghcb) != 4096); } -struct __attribute__ ((__packed__)) vmcb { +struct vmcb { struct vmcb_control_area control; u8 reserved_control[1024 - sizeof(struct vmcb_control_area)]; struct vmcb_save_area save; -}; +} __packed; #define SVM_CPUID_FUNC 0x8000000a -- 2.28.0