All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Mattson <jmattson@google.com>
To: kvm@vger.kernel.org, pbonzini@redhat.com, aaronlewis@google.com
Cc: Jim Mattson <jmattson@google.com>
Subject: [kvm-unit-tests PATCH] x86: VMX: Require 16-byte alignment for struct vmx_msr_entry
Date: Thu, 14 Apr 2022 11:58:53 -0700	[thread overview]
Message-ID: <20220414185853.342787-1-jmattson@google.com> (raw)

The MSR-store area and the MSR-load areas must be 16-byte aligned, per
the hardware specification.

Fixes: bd1bf2d6af77a ("VMX: Test MSR load/store feature")
Signed-off-by: Jim Mattson <jmattson@google.com>
---
 x86/vmx_tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index df931985ec46..4d98b7cb08dd 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -1959,7 +1959,7 @@ struct vmx_msr_entry {
 	u32 index;
 	u32 reserved;
 	u64 value;
-} __attribute__((packed));
+} __attribute__((packed, aligned(16)));
 
 #define MSR_MAGIC 0x31415926
 struct vmx_msr_entry *exit_msr_store, *entry_msr_load, *exit_msr_load;
-- 
2.36.0.rc0.470.gd361397f0d-goog


             reply	other threads:[~2022-04-14 18:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 18:58 Jim Mattson [this message]
2022-04-14 19:55 ` [kvm-unit-tests PATCH] x86: VMX: Require 16-byte alignment for struct vmx_msr_entry Aaron Lewis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220414185853.342787-1-jmattson@google.com \
    --to=jmattson@google.com \
    --cc=aaronlewis@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.