Re: [PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2023-12-13 Thread Sean Christopherson
On Thu, Dec 14, 2023, Maxim Levitsky wrote: > On Tue, 2023-12-12 at 07:28 -0800, Sean Christopherson wrote: > > On Sun, Dec 10, 2023, Jim Mattson wrote: > > > On Thu, Dec 7, 2023 at 8:21 AM Sean Christopherson > > > wrote: > > > > Doh. We got the less obvious cases and missed the obvious one. >

Re: [PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2023-12-13 Thread Maxim Levitsky
On Wed, 2023-12-13 at 14:31 -0800, Jim Mattson wrote: > On Wed, Dec 13, 2023 at 2:25 PM Maxim Levitsky wrote: > > On Tue, 2023-12-12 at 07:28 -0800, Sean Christopherson wrote: > > > On Sun, Dec 10, 2023, Jim Mattson wrote: > > > > On Thu, Dec 7, 2023 at 8:21 AM Sean Christopherson > > > > wrote:

Re: [PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2023-12-13 Thread Jim Mattson
On Wed, Dec 13, 2023 at 2:25 PM Maxim Levitsky wrote: > > On Tue, 2023-12-12 at 07:28 -0800, Sean Christopherson wrote: > > On Sun, Dec 10, 2023, Jim Mattson wrote: > > > On Thu, Dec 7, 2023 at 8:21 AM Sean Christopherson > > > wrote: > > > > Doh. We got the less obvious cases and missed the ob

Re: [PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2023-12-13 Thread Maxim Levitsky
On Tue, 2023-12-12 at 07:28 -0800, Sean Christopherson wrote: > On Sun, Dec 10, 2023, Jim Mattson wrote: > > On Thu, Dec 7, 2023 at 8:21 AM Sean Christopherson > > wrote: > > > Doh. We got the less obvious cases and missed the obvious one. > > > > > > Ugh, and we also missed a related mess in k

Re: [PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2023-12-12 Thread Sean Christopherson
On Sun, Dec 10, 2023, Jim Mattson wrote: > On Thu, Dec 7, 2023 at 8:21 AM Sean Christopherson wrote: > > Doh. We got the less obvious cases and missed the obvious one. > > > > Ugh, and we also missed a related mess in kvm_guest_apic_has_interrupt(). > > That > > thing should really be folded in

Re: [PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2023-12-10 Thread Jim Mattson
On Thu, Dec 7, 2023 at 8:21 AM Sean Christopherson wrote: > Doh. We got the less obvious cases and missed the obvious one. > > Ugh, and we also missed a related mess in kvm_guest_apic_has_interrupt(). > That > thing should really be folded into vmx_has_nested_events(). > > Good gravy. And vmx_

Re: [PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2023-12-07 Thread Sean Christopherson
On Wed, Dec 06, 2023, Jim Mattson wrote: > kvm_vcpu_check_block() is called while not in TASK_RUNNING, and therefore > it cannot sleep. Writing to guest memory is therefore forbidden, but it > can happen on AMD processors if kvm_check_nested_events() causes a vmexit. > > Fortunately, all events t

[PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2023-12-06 Thread Jim Mattson
kvm_vcpu_check_block() is called while not in TASK_RUNNING, and therefore it cannot sleep. Writing to guest memory is therefore forbidden, but it can happen on AMD processors if kvm_check_nested_events() causes a vmexit. Fortunately, all events that are caught by kvm_check_nested_events() are als

[PATCH v4 10/12] KVM: x86: never write to memory from kvm_vcpu_check_block()

2022-09-20 Thread Sean Christopherson
From: Paolo Bonzini kvm_vcpu_check_block() is called while not in TASK_RUNNING, and therefore it cannot sleep. Writing to guest memory is therefore forbidden, but it can happen on AMD processors if kvm_check_nested_events() causes a vmexit. Fortunately, all events that are caught by kvm_check_n