Re: [RFC PATCH] KVM: x86: Fix APIC page invalidation race

2020-06-19 Thread Paolo Bonzini
On 19/06/20 07:17, Xinlong Lin wrote: >>     Because of the above race, there can be a mismatch between the >>     host physical address stored in the APIC_ACCESS_PAGE VMCS field and >>     the host physical address stored in the EPT entry for the APIC GPA >>     (0xfee).  When this happens,

Re: [RFC PATCH] KVM: x86: Fix APIC page invalidation race

2020-06-09 Thread Eiichi Tsukata
> On Jun 9, 2020, at 18:54, Paolo Bonzini wrote: > > > No need to resend, the patch is good. Here is my take on the commit message: Thank you Paolo! Your commit message is much clearer. I really appreciate your great job. Best Eiichi > >Commit b1394e745b94 ("KVM: x86: fix APIC page

Re: [RFC PATCH] KVM: x86: Fix APIC page invalidation race

2020-06-09 Thread Paolo Bonzini
On 09/06/20 03:04, Eiichi Tsukata wrote: > > >> On Jun 8, 2020, at 22:13, Paolo Bonzini wrote: >> >> On 06/06/20 06:26, Eiichi Tsukata wrote: >>> Commit b1394e745b94 ("KVM: x86: fix APIC page invalidation") tried to >>> fix inappropriate APIC page invalidation by re-introducing arch specific

Re: [RFC PATCH] KVM: x86: Fix APIC page invalidation race

2020-06-08 Thread Eiichi Tsukata
> On Jun 8, 2020, at 22:13, Paolo Bonzini wrote: > > On 06/06/20 06:26, Eiichi Tsukata wrote: >> Commit b1394e745b94 ("KVM: x86: fix APIC page invalidation") tried to >> fix inappropriate APIC page invalidation by re-introducing arch specific >> kvm_arch_mmu_notifier_invalidate_range() and

Re: [RFC PATCH] KVM: x86: Fix APIC page invalidation race

2020-06-08 Thread Paolo Bonzini
On 06/06/20 06:26, Eiichi Tsukata wrote: > Commit b1394e745b94 ("KVM: x86: fix APIC page invalidation") tried to > fix inappropriate APIC page invalidation by re-introducing arch specific > kvm_arch_mmu_notifier_invalidate_range() and calling it from > kvm_mmu_notifier_invalidate_range_start. But

Re: [RFC PATCH] KVM: x86: Fix APIC page invalidation race

2020-06-05 Thread Eiichi Tsukata
Hello The race window I mentioned in the commit message is pretty small. So it’s difficult to reproduce it. But with the following ‘delay’ patch, it can be very easy to reproduce. ``` diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c17e6eb9ad43..b6728bf80a7d 100644 ---

[RFC PATCH] KVM: x86: Fix APIC page invalidation race

2020-06-05 Thread Eiichi Tsukata
Commit b1394e745b94 ("KVM: x86: fix APIC page invalidation") tried to fix inappropriate APIC page invalidation by re-introducing arch specific kvm_arch_mmu_notifier_invalidate_range() and calling it from kvm_mmu_notifier_invalidate_range_start. But threre could be the following race because VMCS