From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-26.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F6B8C433E6 for ; Wed, 10 Feb 2021 18:43:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73C4E64E2E for ; Wed, 10 Feb 2021 18:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234424AbhBJSm6 (ORCPT ); Wed, 10 Feb 2021 13:42:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234228AbhBJS2R (ORCPT ); Wed, 10 Feb 2021 13:28:17 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86DC5C06121C for ; Wed, 10 Feb 2021 10:26:27 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id f127so3371025ybf.12 for ; Wed, 10 Feb 2021 10:26:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=k5i+QStGtQxdagBNJrvuN+hHOAh+jl0k4jqWkBv5Txo=; b=k+HQLP7ZAGZeXAn/ix0c4UhVWLdldPjZ/ibyMGb3EcJ5r7/SSlasbZ+peiPz4/dfeA uEH5B6bRD+SOmm4eWj6xiJndkk0yc+3PpNeQKqMFVbkxN3167GuPxWYqF4f3xVIx/Oee 8EHYOGRtFSQxw+kOEtOxOGUOeCFlFcNpRE+ntpQoinGKhiX9laJ3bfuEgAacn/YQM+cl vzcse75GvtyndIQxoxO3ATIPRX76hclb2stNW5gWjzQSbBGryw8cQXTlVxRdSyakt/h0 R/oS7dLb4gGHZJcOE86Y68qbBHhKMYJCQM1hvpuCHqh3g45VuoSTYRdnlnOepU+04GUk 9Umw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=k5i+QStGtQxdagBNJrvuN+hHOAh+jl0k4jqWkBv5Txo=; b=YUVy5q7/doEvDOQz55WusFZMOh5QQx2FvWXVPDEck7tukloBd9OjVpjNmt7E9Y96tp hAVrYEqRNxVw7X/+gyVAyTTcqFuZf+hzwBoPsuq7rC7jzvsk9tiX8dPJF40doWaKqUbU 0LjoahDPqxtZtuFoQlCzlKud8TDB9wW/O/52yq56hkp72KD5wPR2csWq45Ny2ZwW65B/ CP3OS/tvL/aCfDlHCFbZeeZ/nrhB0GG04L9RPMheTvlNLxWKa6zy61nvqaNTNZ2lB0EK 3vqJ0Wfror1GAi7eliAJS3sjUkM+7Y9MAjTweRveT4+iHpYTsYHB308zkdUfMvJl4GAW 0j+A== X-Gm-Message-State: AOAM532fb9qrvFQcn7Iu0hwqSfVHM2GUz2SLXaqK0Hb00ufnCjnIP+wO sKRs9V7XDbPW4tY6r1nFqLc8iTCrn8M= X-Google-Smtp-Source: ABdhPJwsbfpnnRhdi/WJEW0HkFZzjg18vDB3jDEI9My/tl73gxM0LcJP75gzxbp7QADg77Mvqm7ahgtBfPQ= Sender: "seanjc via sendgmr" X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:f:10:11fc:33d:bf1:4cb8]) (user=seanjc job=sendgmr) by 2002:a25:1e42:: with SMTP id e63mr5919281ybe.270.1612981586793; Wed, 10 Feb 2021 10:26:26 -0800 (PST) Reply-To: Sean Christopherson Date: Wed, 10 Feb 2021 10:26:09 -0800 In-Reply-To: <20210210182609.435200-1-seanjc@google.com> Message-Id: <20210210182609.435200-6-seanjc@google.com> Mime-Version: 1.0 References: <20210210182609.435200-1-seanjc@google.com> X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH 5/5] KVM: x86/xen: Explicitly pad struct compat_vcpu_info to 64 bytes From: Sean Christopherson To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, David Woodhouse Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a 2 byte pad to struct compat_vcpu_info so that the sum size of its fields is actually 64 bytes. The effective size without the padding is also 64 bytes due to the compiler aligning evtchn_pending_sel to a 4-byte boundary, but depending on compiler alignment is subtle and unnecessary. Opportunistically replace spaces with tables in the other fields. Cc: David Woodhouse Signed-off-by: Sean Christopherson --- arch/x86/kvm/xen.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/xen.h b/arch/x86/kvm/xen.h index 4b32489c0cec..b66a921776f4 100644 --- a/arch/x86/kvm/xen.h +++ b/arch/x86/kvm/xen.h @@ -49,11 +49,12 @@ struct compat_arch_vcpu_info { }; struct compat_vcpu_info { - uint8_t evtchn_upcall_pending; - uint8_t evtchn_upcall_mask; - uint32_t evtchn_pending_sel; - struct compat_arch_vcpu_info arch; - struct pvclock_vcpu_time_info time; + uint8_t evtchn_upcall_pending; + uint8_t evtchn_upcall_mask; + uint16_t pad; + uint32_t evtchn_pending_sel; + struct compat_arch_vcpu_info arch; + struct pvclock_vcpu_time_info time; }; /* 64 bytes (x86) */ struct compat_arch_shared_info { -- 2.30.0.478.g8a0d178c01-goog