From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
linux-kernel@vger.kernel.org,
"Roman Kagan" <rkagan@virtuozzo.com>,
"K. Y. Srinivasan" <kys@microsoft.com>,
"Haiyang Zhang" <haiyangz@microsoft.com>,
"Stephen Hemminger" <sthemmin@microsoft.com>,
x86@kernel.org,
"Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>,
"Nadav Amit" <nadav.amit@gmail.com>,
"Thomas Gleixner" <tglx@linutronix.de>
Subject: Re: [PATCH v3] x86/hyper-v: Mark TLFS structures packed
Date: Wed, 12 Dec 2018 18:43:23 +0100 [thread overview]
Message-ID: <87mupa4p50.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20181203140636.21912-1-vkuznets@redhat.com>
Vitaly Kuznetsov <vkuznets@redhat.com> writes:
> /* Define virtual processor assist page structure. */
> struct hv_vp_assist_page {
> @@ -519,7 +519,7 @@ struct hv_vp_assist_page {
> __u64 nested_enlightenments_control[2];
> __u32 enlighten_vmentry;
> __u64 current_nested_vmcs;
> -};
> +} __packed;
>
This particular structure wasn't properly padded: u32 padding is missing
between 'enlighten_vmentry' and 'current_nested_vmcs'.
> struct hv_enlightened_vmcs {
> u32 revision_id;
> @@ -693,7 +693,7 @@ struct hv_enlightened_vmcs {
> u32 nested_flush_hypercall:1;
> u32 msr_bitmap:1;
> u32 reserved:30;
> - } hv_enlightenments_control;
> + } __packed hv_enlightenments_control;
> u32 hv_vp_id;
>
> u64 hv_vm_id;
> @@ -703,7 +703,7 @@ struct hv_enlightened_vmcs {
> u64 padding64_5[7];
> u64 xss_exit_bitmap;
> u64 padding64_6[7];
> -};
> +} __packed;
struct hv_enlightened_vmcs also has a hole: we need an u16 padding after
'u16 host_tr_selector'.
Both these problems led to Enlightened VMCS for Hyper-V on KVM being
completely broken.
As this is not yet merged, v4 is coming to rescue!
--
Vitaly
prev parent reply other threads:[~2018-12-12 17:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 14:06 [PATCH v3] x86/hyper-v: Mark TLFS structures packed Vitaly Kuznetsov
2018-12-03 16:26 ` Michael Kelley
2018-12-12 17:43 ` Vitaly Kuznetsov [this message]
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=87mupa4p50.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=Michael.H.Kelley@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kvm@vger.kernel.org \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nadav.amit@gmail.com \
--cc=pbonzini@redhat.com \
--cc=rkagan@virtuozzo.com \
--cc=rkrcmar@redhat.com \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox