Re: [tip: x86/seves] x86/kvm: Add KVM-specific VMMCALL handling under SEV-ES
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip: x86/seves] x86/kvm: Add KVM-specific VMMCALL handling under SEV-ES
- From: Joerg Roedel <jroedel@xxxxxxx>
- Date: Fri, 30 Oct 2020 11:23:14 +0100
- Cc: linux-kernel@xxxxxxxxxxxxxxx, "Lendacky, Thomas" <Thomas.Lendacky@xxxxxxx>, linux-tip-commits@xxxxxxxxxxxxxxx, Borislav Petkov <bp@xxxxxxx>, x86 <x86@xxxxxxxxxx>
- In-reply-to: <CAAYXXYwqYeXY3gaExMYX9Pt0nN_D=jbz9FWSuk1hDF8GcK-kfA@mail.gmail.com>
- References: <20200907131613.12703-64-joro@8bytes.org> <159972972598.20229.12880317872521101289.tip-bot2@tip-bot2> <CAAYXXYx=Eq4gYfUqdO7u37VRD_GpPYFQgN=GZySmAMcDc2AM=g@mail.gmail.com> <CAAYXXYw7ZKM+4ZCzn_apb4iy07R5VfcYeyus-kc0ETh_vkBkPg@mail.gmail.com> <20201028094952.GI22179@suse.de> <CAAYXXYwqYeXY3gaExMYX9Pt0nN_D=jbz9FWSuk1hDF8GcK-kfA@mail.gmail.com>
- User-agent: Mutt/1.10.1 (2018-07-13)
On Wed, Oct 28, 2020 at 11:03:05AM -0700, Erdem Aktas wrote:
> I might be missing something here but I think what you say is only
> correct for the kvm_hypercall4 cases. All other functions use a
> smaller number of registers. #VC blindly assumes that all those
> registers are used in the vmcall and exposes them.
Right, I think we should fix that in the guest and zero out the unused
registers. VMMCALL can come from userspace after all, and the #VC
handler does not look at the hypercall numbers.
Further, on the host side KVM will unconditionally read out all 4
registers too, which requires us to set them valid in the GHCB.
Regards,
Joerg
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]