Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1545641pxb; Wed, 10 Feb 2021 10:46:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQPEB3RbDoxDIQbB4DY85wq4bkQZ8T8BZZNPsoSnIkGLmlmr8HSORhehnR8g17M5ivgIqt X-Received: by 2002:a17:906:80b:: with SMTP id e11mr4275124ejd.269.1612982778269; Wed, 10 Feb 2021 10:46:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612982778; cv=none; d=google.com; s=arc-20160816; b=QWnkDe0Diqlb4sLQdD518kHCTXJkP169TN8TRtv8pgZQi4RlevN7qeWev/ufklWWHt oijqEAbt4lpeKROBopnGhnF8kjJySi/yVCQ0aOoGUnBhycvpreZB6GHsxIxGCrVVF+bO IF2MK+iB2uuBsOM41m5vA30Oj9NTL9+qdyinp5IEZnLkRL2nf/PUTXj7goC55ICmBLR2 UHVpUR9FPs3Ft4RGTQgDr1W2KPkfm0umpkj/76Bqzdz1wsWbUa5sCtpT6lRJycsElMr7 fVA9rc1fz7RACb4nvgAbtp1KCpYBzxE5MGIS5EnFFEVAQW2MaY9fNmOOZBc7yipecYzy yrvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:reply-to:sender:dkim-signature; bh=k5i+QStGtQxdagBNJrvuN+hHOAh+jl0k4jqWkBv5Txo=; b=efIfIhjEHfcsY7uHEgIGQM+lxUqSydcP8vH+zQcLGB2B5abOZb0eOTzALxP4+Ya371 ePTNj34iBkD1/1Hi7MlC0SlepkOjD7HUGhJN6IPH1pg7mWyudZxtcVb2ANvKYS9OG/yC 31BgxtkwtHBnHeZ9cMu5yT+Hi22Ux6v7IawoH87y1icwhsh5dKLipSpSPSbQ4nCuDK2N iQCmmGQAA0XEgCJpfo4whA53vWhJQNbVRj5+7nUN3eKahhIhf5fQym9etaKO8vmIrwBe HGq67M/e5EVz4APTMOnp/Qac0Va5a2PZ06O6t2dIYYrk86XfBAw9CvT18w3tAZ/lRpYk MndA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=k+HQLP7Z; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jy25si1654202ejc.530.2021.02.10.10.45.50; Wed, 10 Feb 2021 10:46:18 -0800 (PST) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=k+HQLP7Z; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234317AbhBJSmy (ORCPT + 99 others); Wed, 10 Feb 2021 13:42:54 -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= 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