From: Tom Lendacky <thomas.lendacky@amd.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Sean Christopherson <seanjc@google.com>,
Wanpeng Li <wanpengli@tencent.com>,
Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Brijesh Singh <brijesh.singh@amd.com>,
Ashish Kalra <Ashish.Kalra@amd.com>,
linux-kernel@vger.kernel.org, x86@kernel.org,
kvm list <kvm@vger.kernel.org>,
Vitaly Kuznetsov <vkuznets@redhat.com>
Subject: Re: [PATCH v2] KVM: x86: Assume a 64-bit hypercall for guests with protected state
Date: Thu, 11 Nov 2021 14:46:03 -0600 [thread overview]
Message-ID: <afaf4683-deb8-ef11-97f0-d52b2b144f0f@amd.com> (raw)
In-Reply-To: <e45669fa-372f-a29d-d9c9-b4747e56b97c@amd.com>
On 10/26/21 1:03 PM, Tom Lendacky wrote:
> On 10/1/21 12:06 PM, Tom Lendacky wrote:
>> On 5/25/21 1:25 AM, Vitaly Kuznetsov wrote:
>>> Tom Lendacky <thomas.lendacky@amd.com> writes:
>>>
>>>> When processing a hypercall for a guest with protected state, currently
>>>> SEV-ES guests, the guest CS segment register can't be checked to
>>>> determine if the guest is in 64-bit mode. For an SEV-ES guest, it is
>>>> expected that communication between the guest and the hypervisor is
>>>> performed to shared memory using the GHCB. In order to use the GHCB, the
>>>> guest must have been in long mode, otherwise writes by the guest to the
>>>> GHCB would be encrypted and not be able to be comprehended by the
>>>> hypervisor.
>>>>
>>>> Create a new helper function, is_64_bit_hypercall(), that assumes the
>>>> guest is in 64-bit mode when the guest has protected state, and returns
>>>> true, otherwise invoking is_64_bit_mode() to determine the mode. Update
>>>> the hypercall related routines to use is_64_bit_hypercall() instead of
>>>> is_64_bit_mode().
>>>>
>>>> Add a WARN_ON_ONCE() to is_64_bit_mode() to catch occurences of calls to
>>>> this helper function for a guest running with protected state.
>>>>
>>>> Fixes: f1c6366e3043 ("KVM: SVM: Add required changes to support
>>>> intercepts under SEV-ES")
>>>> Reported-by: Sean Christopherson <seanjc@google.com>
>>>> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
>>>> ---
...
>>>
>>> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
>>>
>>> Thanks!
>>
>> Paolo,
>>
>> This got lost in my stack of work... any comments?
>>
>> Thanks,
>> Tom
>
> Ping
>
> Thanks,
> Tom
Another ping on this.
Paolo, you had replied "queued" on the v1, but came up with a suggestion
for a v2 that might have got lost in the replies because it never got
queued. Here are the threads:
v1: https://lore.kernel.org/kvm/d0904f0d049300267665bd4abf96c3d7e7aa4825.1621701837.git.thomas.lendacky@amd.com/
v2: https://lore.kernel.org/kvm/e0b20c770c9d0d1403f23d83e785385104211f74.1621878537.git.thomas.lendacky@amd.com/
Thanks,
Tom
>
>>
>>>
next prev parent reply other threads:[~2021-11-11 20:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 17:48 Tom Lendacky
2021-05-25 6:25 ` Vitaly Kuznetsov
2021-10-01 17:06 ` Tom Lendacky
2021-10-26 18:03 ` Tom Lendacky
2021-11-11 20:46 ` Tom Lendacky [this message]
2021-11-16 15:05 ` Paolo Bonzini
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=afaf4683-deb8-ef11-97f0-d52b2b144f0f@amd.com \
--to=thomas.lendacky@amd.com \
--cc=Ashish.Kalra@amd.com \
--cc=bp@alien8.de \
--cc=brijesh.singh@amd.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--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
all inboxes | Powered by JetHome®