Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1706105ybh; Tue, 14 Jul 2020 05:20:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl28ADgN0bfyjDwlJQO/HFgIoMoRbubXQjQudfBPCLMrDnShLLxttUfm3aUdHWfGcC+cJf X-Received: by 2002:a17:906:6d49:: with SMTP id a9mr4049475ejt.435.1594729209234; Tue, 14 Jul 2020 05:20:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594729209; cv=none; d=google.com; s=arc-20160816; b=zrBy5822U4Rcgs0+4A4fcGs2knGFQwexU3qkoVIsbnJk+TeeQvrQfyyyCqdDz/SRpq 7mbg/VrAHGRQ5NsD0wPM5OHMapRBow7KRPppQAkXIvCsg7RbQH56sH0uuJ9cj1NuvooH lebEaj/9AvufcSrwZJYeYU9FtFRsiWwRU+ZGfHyrF/j7anSOvYv5h8MsHFd9R2Gc/Bja ftAR8bYdUlAnzEaAH7nmPtGvqlviXzHWnxQiLNOiLEBzQ4RwFAjgouidaCL1J4ttNfJ5 1+mjwWNZsY45rcvaEjDYkf/tqxvjwqiJR+MsRx3sAOHO1Nugycu8Jcvz1fawbpm28uFC Xvbg== 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=InaKnM1A11PEeC9Z2yhxX/veevw2eL/GX3zmGd/M3PY=; b=gLLCLRwurrHWJe9FDR/QolZOpsy4rxCfAw8VLNEPxvmFsY9qzfw1sjHItih1W8YlXz Tm+9PFydzmU3dLHrjp7gQdwlxX1img/XwvzL0W0w+9XhlnN8+YZWRR+fxnLxb3PQlGhw H4XouiYkP6KN0QtCMLWHbMY3ZiIERqaRN72cS6avnY40tZ9rgo1pbF1o5ky8GCAXJ371 zKNyzkyEpoTnhbMTEV6W6vr0yuYooaPNkrVcrjrbLMlsu8JvXAWQv+ovobszGk42Q6qF NmUjB9wjSNIxOEt/ti8G66iUVtbiAGUFwIabMH2UlL0VwyRv+e262uYdEnxw0vHq2Wru 18Vw== 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 c13si10982260edw.351.2020.07.14.05.19.45; Tue, 14 Jul 2020 05:20:09 -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 S1729064AbgGNMSS (ORCPT + 99 others); Tue, 14 Jul 2020 08:18:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727909AbgGNMKh (ORCPT ); Tue, 14 Jul 2020 08:10:37 -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 52CA8C061794; Tue, 14 Jul 2020 05:10:37 -0700 (PDT) Received: from cap.home.8bytes.org (p5b006776.dip0.t-ipconnect.de [91.0.103.118]) (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 D82C32EC; Tue, 14 Jul 2020 14:10:34 +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 v4 03/75] KVM: SVM: Use __packed shorthand Date: Tue, 14 Jul 2020 14:08:05 +0200 Message-Id: <20200714120917.11253-4-joro@8bytes.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200714120917.11253-1-joro@8bytes.org> References: <20200714120917.11253-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: Joerg Roedel --- arch/x86/include/asm/svm.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index 0420250b008b..af91ced0f370 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,9 +231,9 @@ struct __attribute__ ((__packed__)) vmcb_save_area { u64 xcr0; u8 valid_bitmap[16]; u64 x87_state_gpa; -}; +} __packed; -struct __attribute__ ((__packed__)) ghcb { +struct ghcb { struct vmcb_save_area save; u8 reserved_save[2048 - sizeof(struct vmcb_save_area)]; @@ -242,7 +242,7 @@ struct __attribute__ ((__packed__)) ghcb { u8 reserved_1[10]; u16 protocol_version; /* negotiated SEV-ES/GHCB protocol version */ u32 ghcb_usage; -}; +} __packed; static inline void __unused_size_checks(void) @@ -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.27.0