Re: [PATCH] checkpatch: allow tags between co-developed-by and their sign-off

2023-10-23 Thread Sean Christopherson
+Mateusz On Mon, Oct 23, 2023, Przemek Kitszel wrote: > Additional tags between Co-developed-by and corresponding Signed-off-by > could include Reviewed-by tags collected by Submitter, which is also > a Co-developer, but should sign-off at the very end of tags provided by > the Submitter. ... >

Re: [RFC 01/33] KVM: x86: Decouple lapic.h from hyperv.h

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Nicolas Saenz Julienne wrote: > lapic.h has no dependencies with hyperv.h, so don't include it there. > > Additionally, cpuid.c implicitly relied on hyperv.h's inclusion through > lapic.h, so include it explicitly there. > > Signed-off-by: Nicolas Saenz Julienne > --- FWIW

Re: [RFC 29/33] KVM: VMX: Save instruction length on EPT violation

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Alexander Graf wrote: > > On 08.11.23 12:18, Nicolas Saenz Julienne wrote: > > Save the length of the instruction that triggered an EPT violation in > > struct kvm_vcpu_arch. This will be used to populate Hyper-V VSM memory > > intercept messages. > > > > Signed-off-by: Nico

Re: [RFC 25/33] KVM: Introduce a set of new memory attributes

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Alexander Graf wrote: > > On 08.11.23 12:17, Nicolas Saenz Julienne wrote: > > Introduce the following memory attributes: > > - KVM_MEMORY_ATTRIBUTE_READ > > - KVM_MEMORY_ATTRIBUTE_WRITE > > - KVM_MEMORY_ATTRIBUTE_EXECUTE > > - KVM_MEMORY_ATTRIBUTE_NO_ACCESS > > > >

Re: [RFC 0/33] KVM: x86: hyperv: Introduce VSM support

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Nicolas Saenz Julienne wrote: > This RFC series introduces the necessary infrastructure to emulate VSM > enabled guests. It is a snapshot of the progress we made so far, and its > main goal is to gather design feedback. Heh, then please provide an overview of the design, and

Re: [RFC 18/33] KVM: x86: Decouple kvm_get_memory_attributes() from struct kvm's mem_attr_array

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Nicolas Saenz Julienne wrote: > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index 631fd532c97a..4242588e3dfb 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -2385,9 +2385,10 @@ static inline void > kvm_prepare_memory_fault_

Re: [RFC 21/33] KVM: Pass memory attribute array as a MMU notifier argument

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Nicolas Saenz Julienne wrote: > Pass the memory attribute array through struct kvm_mmu_notifier_arg and > use it in kvm_arch_post_set_memory_attributes() instead of defaulting on > kvm->mem_attr_array. > > Signed-off-by: Nicolas Saenz Julienne > --- > arch/x86/kvm/mmu/mmu.c

Re: [RFC 29/33] KVM: VMX: Save instruction length on EPT violation

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Nicolas Saenz Julienne wrote: > Save the length of the instruction that triggered an EPT violation in > struct kvm_vcpu_arch. This will be used to populate Hyper-V VSM memory > intercept messages. This is silly and unnecessarily obfuscates *why* (as my response regarding SVM

Re: [RFC 14/33] KVM: x86: Add VTL to the MMU role

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Nicolas Saenz Julienne wrote: > With the upcoming introduction of per-VTL memory protections, make MMU > roles VTL aware. This will avoid sharing PTEs between vCPUs that belong > to different VTLs, and that have distinct memory access restrictions. > > Four bits are allocated

Re: [RFC 02/33] KVM: x86: Introduce KVM_CAP_APIC_ID_GROUPS

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Nicolas Saenz Julienne wrote: > From: Anel Orazgaliyeva > > Introduce KVM_CAP_APIC_ID_GROUPS, this capability segments the VM's APIC > ids into two. The lower bits, the physical APIC id, represent the part > that's exposed to the guest. The higher bits, which are private to

Re: [RFC 0/33] KVM: x86: hyperv: Introduce VSM support

2023-11-08 Thread Sean Christopherson
On Wed, Nov 08, 2023, Sean Christopherson wrote: > On Wed, Nov 08, 2023, Nicolas Saenz Julienne wrote: > > This RFC series introduces the necessary infrastructure to emulate VSM > > enabled guests. It is a snapshot of the progress we made so far, and its > > main goal is to g

Re: [RFC 0/33] KVM: x86: hyperv: Introduce VSM support

2023-11-10 Thread Sean Christopherson
On Fri, Nov 10, 2023, Nicolas Saenz Julienne wrote: > On Wed Nov 8, 2023 at 6:33 PM UTC, Sean Christopherson wrote: > > - What is the split between userspace and KVM? How did you arrive at that > > split? > > Our original design, which we discussed in the KVM forum 2023 [

Re: [RFC 16/33] KVM: x86/mmu: Expose R/W/X flags during memory fault exits

2023-11-28 Thread Sean Christopherson
On Tue, Nov 28, 2023, Maxim Levitsky wrote: > On Wed, 2023-11-08 at 11:17 +, Nicolas Saenz Julienne wrote: > > Include the fault's read, write and execute status when exiting to > > user-space. > > > > Signed-off-by: Nicolas Saenz Julienne > > --- > > arch/x86/kvm/mmu/mmu.c | 4 ++-- > > i

Re: [RFC 05/33] KVM: x86: hyper-v: Introduce VTL call/return prologues in hypercall page

2023-12-01 Thread Sean Christopherson
On Fri, Dec 01, 2023, Nicolas Saenz Julienne wrote: > > To support this I think that we can add a userspace msr filter on the > > HV_X64_MSR_HYPERCALL, > > although I am not 100% sure if a userspace msr filter overrides the > > in-kernel msr handling. > > I thought about it at the time. It's not

Re: [RFC 05/33] KVM: x86: hyper-v: Introduce VTL call/return prologues in hypercall page

2023-12-01 Thread Sean Christopherson
On Fri, Dec 01, 2023, Nicolas Saenz Julienne wrote: > On Fri Dec 1, 2023 at 4:32 PM UTC, Sean Christopherson wrote: > > On Fri, Dec 01, 2023, Nicolas Saenz Julienne wrote: > > > > To support this I think that we can add a userspace msr filter on the > > > > HV_X6

Re: [RFC 05/33] KVM: x86: hyper-v: Introduce VTL call/return prologues in hypercall page

2023-12-05 Thread Sean Christopherson
On Fri, Dec 01, 2023, Nicolas Saenz Julienne wrote: > On Fri Dec 1, 2023 at 5:47 PM UTC, Sean Christopherson wrote: > > On Fri, Dec 01, 2023, Nicolas Saenz Julienne wrote: > > > On Fri Dec 1, 2023 at 4:32 PM UTC, Sean Christopherson wrote: > > > > On Fri, Dec 01, 2023

Re: [RFC 05/33] KVM: x86: hyper-v: Introduce VTL call/return prologues in hypercall page

2023-12-05 Thread Sean Christopherson
On Tue, Dec 05, 2023, Maxim Levitsky wrote: > On Tue, 2023-12-05 at 11:21 -0800, Sean Christopherson wrote: > > On Fri, Dec 01, 2023, Nicolas Saenz Julienne wrote: > > > On Fri Dec 1, 2023 at 5:47 PM UTC, Sean Christopherson wrote: > > > > On Fri, Dec 01, 2023

Re: [PATCH 16/18] KVM: x86: Take mem attributes into account when faulting memory

2024-08-22 Thread Sean Christopherson
On Thu, Aug 22, 2024, Nicolas Saenz Julienne wrote: > On Sun Jun 9, 2024 at 3:49 PM UTC, Nicolas Saenz Julienne wrote: > > Take into account access restrictions memory attributes when faulting > > guest memory. Prohibited memory accesses will cause an user-space fault > > exit. > > > > Additionally

Re: [PATCH v2 07/25] KVM: VMX: Set intercept for FRED MSRs

2024-09-12 Thread Sean Christopherson
On Thu, Sep 05, 2024, Xin Li wrote: > On 6/12/2024 2:32 PM, Sean Christopherson wrote: > > On Fri, Apr 19, 2024, Chao Gao wrote: > > > On Wed, Feb 07, 2024 at 09:26:27AM -0800, Xin Li wrote: > > > > Add FRED MSRs to the valid passthrough MSR list and set FRED MSRs &

Re: [PATCH v8 18/27] mm: Introduce do_mmap_locked()

2019-08-19 Thread Sean Christopherson
On Tue, Aug 13, 2019 at 01:52:16PM -0700, Yu-cheng Yu wrote: > There are a few places that need do_mmap() with mm->mmap_sem held. > Create an in-line function for that. > > Signed-off-by: Yu-cheng Yu > --- > include/linux/mm.h | 18 ++ > 1 file changed, 18 insertions(+) > > diff

Re: [PATCH] doc: kvm: fix return description of KVM_SET_MSRS

2019-09-03 Thread Sean Christopherson
On Mon, Sep 02, 2019 at 06:12:14PM +0800, Xiaoyao Li wrote: It may seem silly, but a proper changelog would be helpful even here, e.g. to explain how and when a positive return value can diverge from the number of MSRs specific in struct kvm_msrs. > Signed-off-by: Xiaoyao Li > --- > Documentati

Re: [PATCH v2] doc: kvm: Fix return description of KVM_SET_MSRS

2019-09-04 Thread Sean Christopherson
On Wed, Sep 04, 2019 at 02:01:18PM +0800, Xiaoyao Li wrote: > Userspace can use ioctl KVM_SET_MSRS to update a set of MSRs of guest. > This ioctl sets specified MSRs one by one. Once it fails to set an MSR > due to setting reserved bits, the MSR is not supported/emulated by kvm, > or violating othe

Re: [PATCH v5 11/11] intel_sgx: driver documentation

2017-11-27 Thread Sean Christopherson
On Tue, 2017-11-21 at 01:08 +0200, Jarkko Sakkinen wrote: > On Sat, Nov 18, 2017 at 12:34:33AM +0100, Thomas Gleixner wrote: > > > > This is architecural. From the cursory read of that series it seems there > > are two parts to it: > > > >   1) The actual core handling, which should be in arch/x8

Re: [PATCH v5 11/11] intel_sgx: driver documentation

2017-11-27 Thread Sean Christopherson
+ Cc: KVM, Paolo and Radim On Mon, 2017-11-27 at 09:03 -0800, Sean Christopherson wrote: > On Tue, 2017-11-21 at 01:08 +0200, Jarkko Sakkinen wrote: > > > > On Sat, Nov 18, 2017 at 12:34:33AM +0100, Thomas Gleixner wrote: > > > > > > > > > This is a

Re: [PATCH v11 00/13] Intel SGX1 support

2018-12-11 Thread Sean Christopherson
On Tue, Dec 11, 2018 at 10:10:38AM -0800, Dave Hansen wrote: > On 12/10/18 3:12 PM, Josh Triplett wrote: > >> Or maybe even python/shell scripts? It looked to me like virtual > >> memory will be "interesting" for enclaves. > > Memory management doesn't seem that hard to deal with. > > The problems

[PATCH] docs: Explicitly state that the 'Fixes:' tag shouldn't split lines

2019-02-19 Thread Sean Christopherson
tags is unnecessarily painful. [1] https://lkml.kernel.org/r/20190216183433.71b7c...@canb.auug.org.au Cc: Stephen Rothwell Signed-off-by: Sean Christopherson --- Documentation/process/submitting-patches.rst | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/

gRe: [PATCH V5 1/5] KVM: X86: Memory ROE documentation

2018-10-29 Thread Sean Christopherson
On Fri, Oct 26, 2018 at 05:12:19PM +0200, Ahmed Abd El Mawgood wrote: > Following up with my previous threads on KVM assisted Anti rootkit > protections. All of the changelogs in this series need to be rewritten to adhere to Documentation/process[1]. In particular, use imperative mood and describ

Re: [PATCH V5 5/5] KVM: Small Refactoring to kvm_free_memslot

2018-10-29 Thread Sean Christopherson
On Fri, Oct 26, 2018 at 05:12:23PM +0200, Ahmed Abd El Mawgood wrote: > This should be a little bit more readable and prone to memory leaks Describe what is being, both in the subject line and continuing on in the full changelog, e.g. "Small Refactoring to kvm_free_memslot" doesn't provide any clu

Re: [PATCH 0/7] KVM: x86: Introduce new ioctl KVM_HYPERV_SET_TLB_FLUSH_INHIBIT

2024-10-14 Thread Sean Christopherson
On Fri, Oct 04, 2024, Nikolas Wipper wrote: > This series introduces a new ioctl KVM_HYPERV_SET_TLB_FLUSH_INHIBIT. It > allows hypervisors to inhibit remote TLB flushing of a vCPU coming from > Hyper-V hyper-calls (namely HvFlushVirtualAddressSpace(Ex) and > HvFlushirtualAddressList(Ex)). It is req

Re: [PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-15 Thread Sean Christopherson
On Tue, Oct 15, 2024, Vitaly Kuznetsov wrote: > Nikolas Wipper writes: > > > On 10.10.24 10:57, Vitaly Kuznetsov wrote: > > ... > > >>> int kvm_hv_vcpu_flush_tlb(struct kvm_vcpu *vcpu); > >>> + > >>> +static inline bool kvm_hv_vcpu_suspended(struct kvm_vcpu *vcpu) > >>> +{ > >>> + return vcpu-

Re: [PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-15 Thread Sean Christopherson
On Tue, Oct 15, 2024, Nicolas Saenz Julienne wrote: > Hi Sean, > > On Tue Oct 15, 2024 at 3:58 PM UTC, Sean Christopherson wrote: > > Before we spend too much time cleaning things up, I want to first settle on > > the > > overall design, because it

Re: [PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-15 Thread Sean Christopherson
On Tue, Oct 15, 2024, Nikolas Wipper wrote: > On 15.10.24 17:58, Sean Christopherson wrote: > > ... > > > > And from a performance perspective, synchronizing on kvm->srcu is going to > > be > > susceptible to random slowdowns, because writers will have to wai

Re: [PATCH v5 4/5] KVM: selftests: Add test for PSCI SYSTEM_OFF2

2024-10-16 Thread Sean Christopherson
On Tue, Oct 15, 2024, Oliver Upton wrote: > On Sat, Oct 12, 2024 at 10:28:10AM +0100, David Woodhouse wrote: > > I suspect the real answer here is that the individual tests here be > > calling ksft_test_result_pass(), and the system_off2 one should call > > ksft_test_result_skip() if it skips? > >

Re: [PATCH 2/3] KVM: x86: Add support for VMware guest specific hypercalls

2024-11-13 Thread Sean Christopherson
On Wed, Nov 13, 2024, Paolo Bonzini wrote: > Il mar 12 nov 2024, 21:44 Doug Covelli ha > scritto: > > > > Split irqchip should be the best tradeoff. Without it, moves from cr8 > > > stay in the kernel, but moves to cr8 always go to userspace with a > > > KVM_EXIT_SET_TPR exit. You also won't be a

Re: [PATCH v2 07/25] KVM: VMX: Set intercept for FRED MSRs

2024-09-30 Thread Sean Christopherson
On Fri, Sep 27, 2024, Xin Li wrote: > > > > When FRED is advertised to a guest, KVM should allow FRED SSP MSRs > > > > accesses through disabling FRED SSP MSRs interception no matter whether > > > > supervisor shadow stacks are enabled or not. > > > > > > KVM doesn't necessarily need to disabling

Re: [PATCH v2 07/25] KVM: VMX: Set intercept for FRED MSRs

2024-09-25 Thread Sean Christopherson
On Wed, Sep 18, 2024, Xin Li wrote: > > > MSR_IA32_FRED_SSP0 is an alias of the CET MSR_IA32_PL0_SSP and likely to > > > be used in the same way as FRED RSP0, i.e., host FRED SSP0 _should_ be > > > restored in arch_exit_to_user_mode_prepare(). However as of today Linux > > > has no plan to utilize

Re: [PATCH 2/3] KVM: x86: Add support for VMware guest specific hypercalls

2024-11-07 Thread Sean Christopherson
On Mon, Nov 04, 2024, Zack Rusin wrote: > On Mon, Nov 4, 2024 at 5:13 PM Paolo Bonzini wrote: > > > > On Wed, Oct 30, 2024 at 4:35 AM Zack Rusin wrote: > > > > > > VMware products handle hypercalls in userspace. Give KVM the ability > > > to run VMware guests unmodified by fowarding all hypercall

Re: [PATCH 2/3] KVM: x86: Add support for VMware guest specific hypercalls

2025-02-03 Thread Sean Christopherson
On Mon, Feb 03, 2025, Doug Covelli wrote: > On Mon, Feb 3, 2025 at 1:22 PM Paolo Bonzini wrote: > > > > On Mon, Feb 3, 2025 at 5:35 PM Doug Covelli > > wrote: > > > OK. It seems like fully embracing the in-kernel APIC is the way to go > > > especially considering it really simplifies using KVM'

Re: [PATCH 2/3] KVM: x86: Add support for VMware guest specific hypercalls

2025-02-03 Thread Sean Christopherson
On Mon, Feb 03, 2025, Paolo Bonzini wrote: > On 2/3/25 20:41, Sean Christopherson wrote: > > -EFAULT isn't the problem, KVM not being able to return useful information > > in > > all situations is the issue. > > Yes, that's why I don't want i

Re: [PATCH 00/15] KVM: x86: Introduce new ioctl KVM_TRANSLATE2

2024-12-11 Thread Sean Christopherson
On Tue, Sep 10, 2024, Nikolas Wipper wrote: > This series introduces a new ioctl KVM_TRANSLATE2, which expands on > KVM_TRANSLATE. It is required to implement Hyper-V's > HvTranslateVirtualAddress hyper-call as part of the ongoing effort to > emulate HyperV's Virtual Secure Mode (VSM) within KVM an

Re: [PATCH 14/15] KVM: x86: Implement KVM_TRANSLATE2

2024-12-11 Thread Sean Christopherson
On Tue, Sep 10, 2024, Nikolas Wipper wrote: > +int kvm_arch_vcpu_ioctl_translate2(struct kvm_vcpu *vcpu, > + struct kvm_translation2 *tr) > +{ > + int idx, set_bit_mode = 0, access = 0; > + struct x86_exception exception = { }; > + gva_t vaddr = tr->linea

Re: [PATCH 2/3] KVM: x86: Add support for VMware guest specific hypercalls

2024-12-17 Thread Sean Christopherson
On Thu, Dec 12, 2024, Doug Covelli wrote: > On Thu, Nov 14, 2024 at 10:45 AM Doug Covelli > wrote: > > > For LINT1, it should be less performance critical; if it's possible > > > to just go through all vCPUs, and do KVM_GET_LAPIC to check who you > > > should send a KVM_NMI to, then I'd do that.