Re: [PATCH 18/70] x86/boot/compressed/64: Add stage1 #VC handler

2020-04-06 Thread Borislav Petkov
On Thu, Mar 19, 2020 at 10:13:15AM +0100, Joerg Roedel wrote: > diff --git a/arch/x86/boot/compressed/idt_handlers_64.S > b/arch/x86/boot/compressed/idt_handlers_64.S > index bfb3fc5aa144..67ddafab2943 100644 > --- a/arch/x86/boot/compressed/idt_handlers_64.S > +++

Re: [PATCH 18/70] x86/boot/compressed/64: Add stage1 #VC handler

2020-03-20 Thread Joerg Roedel
On Fri, Mar 20, 2020 at 02:16:39PM -0700, David Rientjes wrote: > On Thu, 19 Mar 2020, Joerg Roedel wrote: > > +#defineGHCB_SEV_GHCB_RESP_CODE(v) ((v) & 0xfff) > > +#defineVMGEXIT() { asm volatile("rep; > > vmmcall\n\r"); } > > Since preemption and irqs should

Re: [PATCH 18/70] x86/boot/compressed/64: Add stage1 #VC handler

2020-03-20 Thread David Rientjes via Virtualization
On Thu, 19 Mar 2020, Joerg Roedel wrote: > diff --git a/arch/x86/include/asm/sev-es.h b/arch/x86/include/asm/sev-es.h > new file mode 100644 > index ..f524b40aef07 > --- /dev/null > +++ b/arch/x86/include/asm/sev-es.h > @@ -0,0 +1,45 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/*

[PATCH 18/70] x86/boot/compressed/64: Add stage1 #VC handler

2020-03-19 Thread Joerg Roedel
From: Joerg Roedel Add the first handler for #VC exceptions. At stage 1 there is no GHCB yet becaue we might still be on the EFI page table and thus can't map memory unencrypted. The stage 1 handler is limited to the MSR based protocol to talk to the hypervisor and can only support CPUID