Re: [PATCH 1/7] vfio: iommu_type1: Clear added dirty bit when unwind pin

2020-12-14 Thread Alex Williamson
On Fri, 11 Dec 2020 14:51:47 +0800 zhukeqian wrote: > On 2020/12/11 3:16, Alex Williamson wrote: > > On Thu, 10 Dec 2020 15:34:19 +0800 > > Keqian Zhu wrote: > > > >> Currently we do not clear added dirty bit of bitmap when unwind > >> pin, so if pin failed at halfway, we set unnecessary

Re: [PATCH 4/7] vfio: iommu_type1: Fix missing dirty page when promote pinned_scope

2020-12-14 Thread Alex Williamson
On Thu, 10 Dec 2020 15:34:22 +0800 Keqian Zhu wrote: > When we pin or detach a group which is not dirty tracking capable, > we will try to promote pinned_scope of vfio_iommu. > > If we succeed to do so, vfio only report pinned_scope as dirty to > userspace next time, but these memory written

Re: [GIT PULL] KVM/arm64 updates for 5.11

2020-12-14 Thread Paolo Bonzini
On 14/12/20 18:48, Marc Zyngier wrote: Hi Paolo, Here's the initial set of KVM/arm64 updates for 5.11. The most notable change is the "PSCI relay" at EL2, which is the first "user visible" feature required by the Protected KVM effort. The rest is a mixed bag of architecture compliance (PMU

[GIT PULL] KVM/arm64 updates for 5.11

2020-12-14 Thread Marc Zyngier
Hi Paolo, Here's the initial set of KVM/arm64 updates for 5.11. The most notable change is the "PSCI relay" at EL2, which is the first "user visible" feature required by the Protected KVM effort. The rest is a mixed bag of architecture compliance (PMU accesses when no PMU is present, cache

Re: [PATCH 5/5] KVM: arm64: Remove redundant call to kvm_pmu_vcpu_reset()

2020-12-14 Thread Alexandru Elisei
Hi Eric, Thanks for having a look! On 12/14/20 1:48 PM, Auger Eric wrote: > Alexandru, > > On 12/1/20 4:01 PM, Alexandru Elisei wrote: >> KVM_ARM_VCPU_INIT ioctl calls kvm_reset_vcpu(), which in turn resets the >> PMU with a call to kvm_pmu_vcpu_reset(). The function zeroes the PMU >> chained

Re: [PATCH 5/5] KVM: arm64: Remove redundant call to kvm_pmu_vcpu_reset()

2020-12-14 Thread Auger Eric
Alexandru, On 12/1/20 4:01 PM, Alexandru Elisei wrote: > KVM_ARM_VCPU_INIT ioctl calls kvm_reset_vcpu(), which in turn resets the > PMU with a call to kvm_pmu_vcpu_reset(). The function zeroes the PMU > chained counters bitmap and stops all the counters with a perf event > attached. Because it is

Re: [PATCH 4/5] KVM: arm64: Update comment in kvm_vgic_map_resources()

2020-12-14 Thread Auger Eric
Hi Alexandru, On 12/1/20 4:01 PM, Alexandru Elisei wrote: > vgic_v3_map_resources() returns -EBUSY if the VGIC isn't initialized, > update the comment to kvm_vgic_map_resources() to match what the function > does. > > Signed-off-by: Alexandru Elisei > --- > arch/arm64/kvm/vgic/vgic-init.c | 3

Re: [PATCH 3/5] KVM: arm64: Move double-checked lock to kvm_vgic_map_resources()

2020-12-14 Thread Auger Eric
Hi Alexandru, On 12/1/20 4:01 PM, Alexandru Elisei wrote: > kvm_vgic_map_resources() is called when a VCPU if first run and it maps all > the VGIC MMIO regions. To prevent double-initialization, the VGIC uses the > ready variable to keep track of the state of resources and the global KVM > mutex

Re: [PATCH 2/5] KVM: arm64: arch_timer: Remove VGIC initialization check

2020-12-14 Thread Auger Eric
Hi Alexandru, On 12/1/20 4:01 PM, Alexandru Elisei wrote: > kvm_timer_enable() is called in kvm_vcpu_first_run_init() after > kvm_vgic_map_resources() if the VGIC wasn't ready. kvm_vgic_map_resources() > is the only place where kvm->arch.vgic.ready is set to true. > > For a v2 VGIC,