Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-23 Thread Sean Christopherson
On Tue, Nov 22, 2022, Chao Peng wrote: > On Fri, Nov 18, 2022 at 03:59:12PM +, Sean Christopherson wrote: > > On Fri, Nov 18, 2022, Alex Benn?e wrote: > > > > We don't actually need a new bit, the opposite side of private is > > > > shared, i.e. flags with KVM_MEMORY_EXIT_FLAG_PRIVATE cleared e

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-22 Thread Chao Peng
On Fri, Nov 18, 2022 at 03:59:12PM +, Sean Christopherson wrote: > On Fri, Nov 18, 2022, Alex Benn?e wrote: > > > > Chao Peng writes: > > > > > On Thu, Nov 17, 2022 at 03:08:17PM +, Alex Benn?e wrote: > > >> >> I think this should be explicit rather than implied by the absence of > > >>

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-18 Thread Sean Christopherson
On Fri, Nov 18, 2022, Alex Bennée wrote: > > Chao Peng writes: > > > On Thu, Nov 17, 2022 at 03:08:17PM +, Alex Bennée wrote: > >> >> I think this should be explicit rather than implied by the absence of > >> >> another flag. Sean suggested you might want flags for RWX failures so > >> >> ma

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-18 Thread Alex Bennée
Chao Peng writes: > On Thu, Nov 17, 2022 at 03:08:17PM +, Alex Bennée wrote: >> >> >> >> > + >> >> >> > +/* KVM_EXIT_MEMORY_FAULT */ >> >> >> > +struct { >> >> >> > + #define KVM_MEMORY_EXIT_FLAG_PRIVATE (1 << 0) >> >> >> > +__u32 flags; >

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-17 Thread Chao Peng
On Thu, Nov 17, 2022 at 03:08:17PM +, Alex Bennée wrote: > > Chao Peng writes: > > > On Wed, Nov 16, 2022 at 07:03:49PM +, Alex Bennée wrote: > >> > >> Chao Peng writes: > >> > >> > On Tue, Nov 15, 2022 at 04:56:12PM +, Alex Bennée wrote: > >> >> > >> >> Chao Peng writes: > >> >

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-17 Thread Alex Bennée
Chao Peng writes: > On Wed, Nov 16, 2022 at 07:03:49PM +, Alex Bennée wrote: >> >> Chao Peng writes: >> >> > On Tue, Nov 15, 2022 at 04:56:12PM +, Alex Bennée wrote: >> >> >> >> Chao Peng writes: >> >> >> >> > This new KVM exit allows userspace to handle memory-related errors. It

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-17 Thread Chao Peng
On Wed, Nov 16, 2022 at 07:03:49PM +, Alex Bennée wrote: > > Chao Peng writes: > > > On Tue, Nov 15, 2022 at 04:56:12PM +, Alex Bennée wrote: > >> > >> Chao Peng writes: > >> > >> > This new KVM exit allows userspace to handle memory-related errors. It > >> > indicates an error happen

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-17 Thread Chao Peng
On Wed, Nov 16, 2022 at 06:48:43PM +, Sean Christopherson wrote: > On Wed, Nov 16, 2022, Andy Lutomirski wrote: > > > > > > On Tue, Oct 25, 2022, at 8:13 AM, Chao Peng wrote: > > > diff --git a/Documentation/virt/kvm/api.rst > > > b/Documentation/virt/kvm/api.rst > > > index f3fa75649a78..97

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-16 Thread Alex Bennée
Chao Peng writes: > On Tue, Nov 15, 2022 at 04:56:12PM +, Alex Bennée wrote: >> >> Chao Peng writes: >> >> > This new KVM exit allows userspace to handle memory-related errors. It >> > indicates an error happens in KVM at guest memory range [gpa, gpa+size). >> > The flags includes additi

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-16 Thread Sean Christopherson
On Wed, Nov 16, 2022, Andy Lutomirski wrote: > > > On Tue, Oct 25, 2022, at 8:13 AM, Chao Peng wrote: > > diff --git a/Documentation/virt/kvm/api.rst > > b/Documentation/virt/kvm/api.rst > > index f3fa75649a78..975688912b8c 100644 > > --- a/Documentation/virt/kvm/api.rst > > +++ b/Documentation/

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-16 Thread Andy Lutomirski
On Tue, Oct 25, 2022, at 8:13 AM, Chao Peng wrote: > This new KVM exit allows userspace to handle memory-related errors. It > indicates an error happens in KVM at guest memory range [gpa, gpa+size). > The flags includes additional information for userspace to handle the > error. Currently bit 0

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-15 Thread Chao Peng
On Tue, Nov 15, 2022 at 04:56:12PM +, Alex Bennée wrote: > > Chao Peng writes: > > > This new KVM exit allows userspace to handle memory-related errors. It > > indicates an error happens in KVM at guest memory range [gpa, gpa+size). > > The flags includes additional information for userspace

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-15 Thread Alex Bennée
Chao Peng writes: > This new KVM exit allows userspace to handle memory-related errors. It > indicates an error happens in KVM at guest memory range [gpa, gpa+size). > The flags includes additional information for userspace to handle the > error. Currently bit 0 is defined as 'private memory' w

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-10-27 Thread Chao Peng
On Thu, Oct 27, 2022 at 11:27:05AM +0100, Fuad Tabba wrote: > Hi, > > On Tue, Oct 25, 2022 at 4:19 PM Chao Peng wrote: > > > > This new KVM exit allows userspace to handle memory-related errors. It > > indicates an error happens in KVM at guest memory range [gpa, gpa+size). > > The flags includes

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-10-27 Thread Fuad Tabba
Hi, On Tue, Oct 25, 2022 at 4:19 PM Chao Peng wrote: > > This new KVM exit allows userspace to handle memory-related errors. It > indicates an error happens in KVM at guest memory range [gpa, gpa+size). > The flags includes additional information for userspace to handle the > error. Currently bit

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-10-25 Thread Sean Christopherson
On Tue, Oct 25, 2022, Peter Maydell wrote: > On Tue, 25 Oct 2022 at 16:21, Chao Peng wrote: > > diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst > > index f3fa75649a78..975688912b8c 100644 > > --- a/Documentation/virt/kvm/api.rst > > +++ b/Documentation/virt/kvm/api.rst

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-10-25 Thread Peter Maydell
On Tue, 25 Oct 2022 at 16:21, Chao Peng wrote: > > This new KVM exit allows userspace to handle memory-related errors. It > indicates an error happens in KVM at guest memory range [gpa, gpa+size). > The flags includes additional information for userspace to handle the > error. Currently bit 0 is d

[PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-10-25 Thread Chao Peng
This new KVM exit allows userspace to handle memory-related errors. It indicates an error happens in KVM at guest memory range [gpa, gpa+size). The flags includes additional information for userspace to handle the error. Currently bit 0 is defined as 'private memory' where '1' indicates error happe