Re: [PATCHv10 05/18] x86/kexec: Keep CR4.MCE set during kexec for TDX guest

2024-04-09 Thread Sean Christopherson
On Tue, Apr 09, 2024, Kirill A. Shutemov wrote: > Depending on setup, TDX guests might be allowed to clear CR4.MCE. > Attempt to clear it leads to #VE. > > Use alternatives to keep the flag during kexec for TDX guests. > > The change doesn't affect non-TDX-guest environments. > > Signed-off-by:

Re: [PATCHv4 05/14] x86/kvm: Do not try to disable kvmclock if it was not enabled

2024-01-09 Thread Sean Christopherson
On Thu, Jan 04, 2024, Kirill A. Shutemov wrote: > On Wed, Dec 13, 2023 at 09:22:34AM -0800, Sean Christopherson wrote: > > On Tue, Dec 12, 2023, Kirill A. Shutemov wrote: > > > On Tue, Dec 05, 2023 at 03:45:01AM +0300, Kirill A. Shutemov wrote: > > > > kvm_guest_

Re: [PATCHv4 05/14] x86/kvm: Do not try to disable kvmclock if it was not enabled

2023-12-13 Thread Sean Christopherson
M paravirt > > features. > > > > Do not disable kvmclock if it was not enabled. > > > > Signed-off-by: Kirill A. Shutemov > > Fixes: c02027b5742b ("x86/kvm: Disable kvmclock on all CPUs on shutdown") > > Reviewed-by: Sean Christopherson >

Re: [PATCH v2 1/2] KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown

2023-12-11 Thread Sean Christopherson
On Mon, Dec 11, 2023, Sean Christopherson wrote: > On Sat, Dec 09, 2023, James Gowans wrote: > > Hi Sean, > > > > Blast from the past but I've just been bitten by this patch when > > rebasing across v6.4. > > > > On Fri, 2023-05-12 at 16:31 -070

Re: [PATCH v2 1/2] KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown

2023-12-11 Thread Sean Christopherson
On Sat, Dec 09, 2023, James Gowans wrote: > Hi Sean, > > Blast from the past but I've just been bitten by this patch when > rebasing across v6.4. > > On Fri, 2023-05-12 at 16:31 -0700, Sean Christopherson wrote: > > Use syscore_ops.shutdown to disable hardware virtualiza

Re: [PATCH v7 10/13] kexec: Secure Launch kexec SEXIT support

2023-11-10 Thread Sean Christopherson
On Fri, Nov 10, 2023, Ross Philipson wrote: > Prior to running the next kernel via kexec, the Secure Launch code > closes down private SMX resources and does an SEXIT. This allows the > next kernel to start normally without any issues starting the APs etc. > > Signed-off-by: Ross Philipson > ---

Re: [PATCHv2 04/13] x86/kvm: Do not try to disable kvmclock if it was not enabled

2023-10-23 Thread Sean Christopherson
On Mon, Oct 23, 2023, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > > > On Fri, Oct 20, 2023, Vitaly Kuznetsov wrote: > >> diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c > >> index b8ab9ee5896c..1ee49c98e70a 100644 > >> --- a/arch/x86/

Re: [PATCHv2 04/13] x86/kvm: Do not try to disable kvmclock if it was not enabled

2023-10-20 Thread Sean Christopherson
On Fri, Oct 20, 2023, Vitaly Kuznetsov wrote: > > --- > > arch/x86/kernel/kvmclock.c | 12 > > 1 file changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c > > index fb8f52149be9..f2fff625576d 100644 > > ---

Re: [PATCHv2 04/13] x86/kvm: Do not try to disable kvmclock if it was not enabled

2023-10-20 Thread Sean Christopherson
l A. Shutemov > Fixes: c02027b5742b ("x86/kvm: Disable kvmclock on all CPUs on shutdown") > Cc: Paolo Bonzini > Cc: Wanpeng Li > Cc: Vitaly Kuznetsov > Cc: Sean Christopherson > --- Reviewed-by: Sean Christopherson ___ k

Re: [PATCH 10/13] x86/tdx: Convert shared memory back to private on kexec

2023-10-06 Thread Sean Christopherson
On Thu, Oct 05, 2023, Kirill A. Shutemov wrote: > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 7368d254d01f..b5acf9fb4c70 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -884,6 +884,7 @@ config INTEL_TDX_GUEST > select X86_MEM_ENCRYPT > select X86_MCE >

Re: [PATCH 04/13] x86/kvm: Do not try to disable kvmclock if it was not enabled

2023-10-06 Thread Sean Christopherson
+Paolo Please use get_maintainers... On Thu, Oct 05, 2023, Kirill A. Shutemov wrote: > kvm_guest_cpu_offline() tries to disable kvmclock regardless if it is > present in the VM. It leads to write to a MSR that doesn't exist on some > configurations, namely in TDX guest: > > unchecked MSR

Re: [PATCH v3 05/10] x86/sev: Setup code to park APs in the AP Jump Table

2022-02-07 Thread Sean Christopherson
On Thu, Jan 27, 2022, Joerg Roedel wrote: > +static int __init sev_setup_ap_jump_table(void) This name is really confusing. AFAICT, it's specific to SEV-ES, but used only "sev" for the namespace because sev_es_setup_ap_jump_table() already exists. I assume this variant is purely for

Re: [PATCH v3 04/10] x86/sev: Cache AP Jump Table Address

2022-02-07 Thread Sean Christopherson
On Thu, Jan 27, 2022, Joerg Roedel wrote: > From: Joerg Roedel > > Store the physical address of the AP jump table in kernel memory so > that it does not need to be fetched from the Hypervisor again. This doesn't explain why the kernel would retrieve the jump table more than once, e.g. at this

Re: [PATCH 11/12] x86/sev: Handle CLFLUSH MMIO events

2021-07-30 Thread Sean Christopherson
On Wed, Jul 21, 2021, Joerg Roedel wrote: > From: Joerg Roedel > > Handle CLFLUSH instruction to MMIO memory in the #VC handler. The ^ |- emulated > instruction is ignored by the handler, as the Hypervisor is > responsible for cache

Re: [PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-07-30 Thread Sean Christopherson
On Tue, Jul 27, 2021, Tom Lendacky wrote: > @@ -451,7 +450,7 @@ void __init mem_encrypt_free_decrypted_mem(void) >* The unused memory range was mapped decrypted, change the encryption >* attribute from decrypted to encrypted before freeing it. >*/ > - if

Re: [PATCH 1/2] kexec: Allow architecture code to opt-out at runtime

2021-05-06 Thread Sean Christopherson
On Thu, May 06, 2021, Joerg Roedel wrote: > From: Joerg Roedel > > Allow a runtime opt-out of kexec support for architecture code in case > the kernel is running in an environment where kexec is not properly > supported yet. > > This will be used on x86 when the kernel is running as an SEV-ES >