Re: [RFC PATCH v11 06/29] KVM: Introduce KVM_SET_USER_MEMORY_REGION2

2023-07-31 Thread Paolo Bonzini
On 7/29/23 02:03, Sean Christopherson wrote: KVM would need to do multiple uaccess reads, but that's not a big deal. Am I missing something, or did past us just get too clever and miss the obvious solution? You would have to introduce struct kvm_userspace_memory_region2 anyway, though not a

Re: [RFC PATCH v11 06/29] KVM: Introduce KVM_SET_USER_MEMORY_REGION2

2023-07-31 Thread Quentin Perret
On Friday 28 Jul 2023 at 17:03:33 (-0700), Sean Christopherson wrote: > On Fri, Jul 28, 2023, Quentin Perret wrote: > > On Tuesday 18 Jul 2023 at 16:44:49 (-0700), Sean Christopherson wrote: > > > --- a/include/uapi/linux/kvm.h > > > +++ b/include/uapi/linux/kvm.h > > > @@ -95,6 +95,16 @@ struct

Re: [RFC PATCH v11 06/29] KVM: Introduce KVM_SET_USER_MEMORY_REGION2

2023-07-28 Thread Sean Christopherson
On Fri, Jul 28, 2023, Quentin Perret wrote: > On Tuesday 18 Jul 2023 at 16:44:49 (-0700), Sean Christopherson wrote: > > --- a/include/uapi/linux/kvm.h > > +++ b/include/uapi/linux/kvm.h > > @@ -95,6 +95,16 @@ struct kvm_userspace_memory_region { > > __u64 userspace_addr; /* start of the

Re: [RFC PATCH v11 06/29] KVM: Introduce KVM_SET_USER_MEMORY_REGION2

2023-07-28 Thread Quentin Perret
On Tuesday 18 Jul 2023 at 16:44:49 (-0700), Sean Christopherson wrote: > --- a/include/uapi/linux/kvm.h > +++ b/include/uapi/linux/kvm.h > @@ -95,6 +95,16 @@ struct kvm_userspace_memory_region { > __u64 userspace_addr; /* start of the userspace allocated memory */ > }; > > +/* for

Re: [RFC PATCH v11 06/29] KVM: Introduce KVM_SET_USER_MEMORY_REGION2

2023-07-21 Thread Paolo Bonzini
On 7/19/23 01:44, Sean Christopherson wrote: Cc: Jarkko Sakkinen Signed-off-by: Sean Christopherson --- arch/x86/kvm/x86.c | 2 +- include/linux/kvm_host.h | 4 ++-- include/uapi/linux/kvm.h | 13 + virt/kvm/kvm_main.c | 38 ++

[RFC PATCH v11 06/29] KVM: Introduce KVM_SET_USER_MEMORY_REGION2

2023-07-18 Thread Sean Christopherson
Cc: Jarkko Sakkinen Signed-off-by: Sean Christopherson --- arch/x86/kvm/x86.c | 2 +- include/linux/kvm_host.h | 4 ++-- include/uapi/linux/kvm.h | 13 + virt/kvm/kvm_main.c | 38 ++ 4 files changed, 46 insertions(+), 11 deletions(-)