[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 12 Dec 2018 18:43:23 +0100
From: Vitaly Kuznetsov <vkuznets@...hat.com>
To: kvm@...r.kernel.org
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
linux-kernel@...r.kernel.org, Roman Kagan <rkagan@...tuozzo.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>, x86@...nel.org,
"Michael Kelley \(EOSG\)" <Michael.H.Kelley@...rosoft.com>,
Nadav Amit <nadav.amit@...il.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v3] x86/hyper-v: Mark TLFS structures packed
Vitaly Kuznetsov <vkuznets@...hat.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
Powered by blists - more mailing lists