[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200425124909.GO30814@suse.de>
Date: Sat, 25 Apr 2020 14:49:09 +0200
From: Joerg Roedel <jroedel@...e.de>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Tom Lendacky <thomas.lendacky@....com>,
Mike Stunes <mstunes@...are.com>, joro@...tes.org,
dan.j.williams@...el.com, dave.hansen@...ux.intel.com,
hpa@...or.com, jgross@...e.com, jslaby@...e.cz,
keescook@...omium.org, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, luto@...nel.org,
peterz@...radead.org, thellstrom@...are.com,
virtualization@...ts.linux-foundation.org, x86@...nel.org,
Sean Christopherson <sean.j.christopherson@...el.com>
Subject: Re: [PATCH] Allow RDTSC and RDTSCP from userspace
Hi Dave,
On Fri, Apr 24, 2020 at 03:53:09PM -0700, Dave Hansen wrote:
> Ahh, so any instruction that can have an instruction intercept set
> potentially needs to be able to tolerate a #VC? Those instruction
> intercepts are under the control of the (untrusted relative to the
> guest) hypervisor, right?
>
> >From the main sev-es series:
>
> +#ifdef CONFIG_AMD_MEM_ENCRYPT
> +idtentry vmm_communication do_vmm_communication has_error_code=1
> +#endif
The next version of the patch-set (which I will hopefully have ready
next week) will have this changed. The #VC exception handler uses an IST
stack and is set to paranoid=1 and shift_ist. The IST stacks for the #VC
handler are only allocated when SEV-ES is active.
> That's a fun point because it means that the (untrusted) hypervisor can
> cause endless faults. I *guess* we have mitigation for this with our
> stack guard pages, but it's still a bit nasty that the hypervisor can
> arbitrarily land a guest in the double-fault handler.
>
> It just all seems a bit weak for the hypervisor to be considered
> untrusted. But, it's _certainly_ a steep in the right direction from SEV.
Yeah, a malicious hypervisor can do bad things to an SEV-ES VM, but it
can't easily steal its secrets from memory or registers. The #VC handler
does its best to just crash the VM if unexpected hypervisor behavior is
detected.
Regards,
Joerg
Powered by blists - more mailing lists