Re: [PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-09 Thread James Morse
Hi Marc, On 09/04/2020 09:27, Marc Zyngier wrote: > On Wed, 8 Apr 2020 12:16:01 +0100 > James Morse wrote: >> On 08/04/2020 11:07, Marc Zyngier wrote: >>> I don't fully agree with the analysis, Remember we are looking at the >>> state of the physical interrupt associated with a virtual

Re: [PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-09 Thread André Przywara
On 09/04/2020 09:08, Marc Zyngier wrote: Hi Marc, > On Wed, 8 Apr 2020 17:50:09 +0100 > André Przywara wrote: > >> On 08/04/2020 15:19, Marc Zyngier wrote: >> >> Hi Marc, >> >>> On 2020-04-08 13:13, André Przywara wrote: On 08/04/2020 11:07, Marc Zyngier wrote: Hi Marc,

Re: [PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-09 Thread Marc Zyngier
Hi James, On Wed, 8 Apr 2020 12:16:01 +0100 James Morse wrote: > Hi Marc, > > On 08/04/2020 11:07, Marc Zyngier wrote: > > On Mon, 6 Apr 2020 16:03:55 +0100 > > James Morse wrote: > > > >> kvm_arch_timer_get_input_level() needs to get the arch_timer_context for > >> a particular vcpu, and

Re: [PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-09 Thread Marc Zyngier
On Wed, 8 Apr 2020 17:50:09 +0100 André Przywara wrote: > On 08/04/2020 15:19, Marc Zyngier wrote: > > Hi Marc, > > > On 2020-04-08 13:13, André Przywara wrote: > >> On 08/04/2020 11:07, Marc Zyngier wrote: > >> > >> Hi Marc, > >> > >>> Hi James, > >>> > >>> Thanks for looking into this. >

Re: [PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-08 Thread André Przywara
On 08/04/2020 15:19, Marc Zyngier wrote: Hi Marc, > On 2020-04-08 13:13, André Przywara wrote: >> On 08/04/2020 11:07, Marc Zyngier wrote: >> >> Hi Marc, >> >>> Hi James, >>> >>> Thanks for looking into this. >>> >>> On Mon,  6 Apr 2020 16:03:55 +0100 >>> James Morse wrote: >>>

Re: [PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-08 Thread Marc Zyngier
Hi Andre, On 2020-04-08 13:13, André Przywara wrote: On 08/04/2020 11:07, Marc Zyngier wrote: Hi Marc, Hi James, Thanks for looking into this. On Mon, 6 Apr 2020 16:03:55 +0100 James Morse wrote: kvm_arch_timer_get_input_level() needs to get the arch_timer_context for a particular

Re: [PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-08 Thread André Przywara
On 08/04/2020 11:07, Marc Zyngier wrote: Hi Marc, > Hi James, > > Thanks for looking into this. > > On Mon, 6 Apr 2020 16:03:55 +0100 > James Morse wrote: > >> kvm_arch_timer_get_input_level() needs to get the arch_timer_context for >> a particular vcpu, and uses kvm_get_running_vcpu() to

Re: [PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-08 Thread James Morse
Hi Marc, On 08/04/2020 11:07, Marc Zyngier wrote: > On Mon, 6 Apr 2020 16:03:55 +0100 > James Morse wrote: > >> kvm_arch_timer_get_input_level() needs to get the arch_timer_context for >> a particular vcpu, and uses kvm_get_running_vcpu() to find it. >> >> kvm_arch_timer_get_input_level() may

Re: [PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-08 Thread Marc Zyngier
Hi James, Thanks for looking into this. On Mon, 6 Apr 2020 16:03:55 +0100 James Morse wrote: > kvm_arch_timer_get_input_level() needs to get the arch_timer_context for > a particular vcpu, and uses kvm_get_running_vcpu() to find it. > > kvm_arch_timer_get_input_level() may be called to

[PATCH] KVM: arm64: arch_timer shouldn't assume the vcpu is loaded

2020-04-06 Thread James Morse
kvm_arch_timer_get_input_level() needs to get the arch_timer_context for a particular vcpu, and uses kvm_get_running_vcpu() to find it. kvm_arch_timer_get_input_level() may be called to handle a user-space write to the redistributor, where the vcpu is not loaded. This causes