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

2020-12-15 Thread zhukeqian
Hi Alex, On 2020/12/15 8:04, Alex Williamson wrote: > 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

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

2020-12-10 Thread zhukeqian
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 dirty bit >> in bitmap. Clearing added dirty bit when unwind pin,

Re: [PATCH] iommu: Up front sanity check in the arm_lpae_map

2020-12-07 Thread zhukeqian
Hi Robin, On 2020/12/7 20:46, Robin Murphy wrote: > On 2020-12-07 12:15, zhukeqian wrote: >> Hi, >> >> On 2020/12/7 20:05, Will Deacon wrote: >>> On Mon, Dec 07, 2020 at 12:01:09PM +, Robin Murphy wrote: >>>> On 2020-12-05 08:29, Keqian Zhu wrote: &g

Re: [PATCH] iommu: Up front sanity check in the arm_lpae_map

2020-12-07 Thread zhukeqian
Hi, On 2020/12/7 20:05, Will Deacon wrote: > On Mon, Dec 07, 2020 at 12:01:09PM +, Robin Murphy wrote: >> On 2020-12-05 08:29, Keqian Zhu wrote: >>> ... then we have more chance to detect wrong code logic. >> >> I don't follow that justification - it's still the same check with the same >>

Re: [PATCH] iommu: Up front sanity check in the arm_lpae_map

2020-12-07 Thread zhukeqian
Hi Will, On 2020/12/7 18:59, Will Deacon wrote: > On Sat, Dec 05, 2020 at 04:29:57PM +0800, Keqian Zhu wrote: >> ... then we have more chance to detect wrong code logic. > > This could do with being a bit more explicit. Something like: > > Although handling a mapping request with no

Re: [PATCH v2 1/2] clocksource: arm_arch_timer: Use stable count reader in erratum sne

2020-12-03 Thread zhukeqian
Hi Marc, On 2020/12/3 22:58, Marc Zyngier wrote: > On 2020-08-18 04:28, Keqian Zhu wrote: >> In commit 0ea415390cd3 ("clocksource/arm_arch_timer: Use >> arch_timer_read_counter >> to access stable counters"), we separate stable and normal count reader to >> omit >> unnecessary overhead on

Re: [PATCH v2 2/2] clocksource: arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI

2020-12-03 Thread zhukeqian
Hi Marc, On 2020/12/3 22:57, Marc Zyngier wrote: > On 2020-08-18 04:28, Keqian Zhu wrote: >> ARM virtual counter supports event stream, it can only trigger an event >> when the trigger bit (the value of CNTKCTL_EL1.EVNTI) of CNTVCT_EL0 changes, >> so the actual period of event stream is

Re: [PATCH v2 1/2] KVM: arm64: Some fixes of PV-time interface document

2020-12-03 Thread zhukeqian
On 2020/12/3 23:04, Marc Zyngier wrote: > On 2020-08-17 12:07, Keqian Zhu wrote: >> Rename PV_FEATURES to PV_TIME_FEATURES. >> >> Signed-off-by: Keqian Zhu >> Reviewed-by: Andrew Jones >> Reviewed-by: Steven Price >> --- >> Documentation/virt/kvm/arm/pvtime.rst | 6 +++--- >> 1 file

Re: [PATCH v2 0/2] clocksource: arm_arch_timer: Some fixes

2020-12-03 Thread zhukeqian
Hi Marc, Found that this bugfix series is not applied for now. Does it need some modification? Wish you can pick it up :-) Thanks, Keqian On 2020/8/18 11:28, Keqian Zhu wrote: > change log: > > v2: > - Do not revert commit 0ea415390cd3, fix it instead. > - Correct the tags of second patch. >

Re: [PATCH v2 0/2] KVM: arm64: Some fixes and code adjustments for pvtime ST

2020-12-03 Thread zhukeqian
Hi Marc, Found that this series is not applied for now. Does it need some modification? Wish you can pick it up :-) Thanks, Keqian On 2020/8/17 19:07, Keqian Zhu wrote: > During picking up pvtime LPT support for arm64, I do some trivial fixes for > pvtime ST. > > change log: > > v2: > - Add

Re: [RFC PATCH 0/5] KVM: arm64: Add pvtime LPT support

2020-09-06 Thread zhukeqian
Hi Marc and Steven, On 2020/9/2 18:09, Steven Price wrote: > Hi Marc, > > Sorry for the slow response, I've been on holiday. > > On 22/08/2020 11:31, Marc Zyngier wrote: >> Hi Steven, >> >> On Wed, 19 Aug 2020 09:54:40 +0100, >> Steven Price wrote: >>> >>> On 18/08/2020 15:41, Marc Zyngier

Re: [RFC PATCH 0/5] KVM: arm64: Add pvtime LPT support

2020-08-20 Thread zhukeqian
On 2020/8/19 16:54, Steven Price wrote: > On 18/08/2020 15:41, Marc Zyngier wrote: >> On 2020-08-17 09:41, Keqian Zhu wrote: >>> Hi all, >>> >>> This patch series picks up the LPT pvtime feature originally developed >>> by Steven Price: https://patchwork.kernel.org/cover/10726499/ >>> >>>

Re: [PATCH 2/2] clocksource: arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI

2020-08-17 Thread zhukeqian
Hi Marc, On 2020/8/17 20:56, Marc Zyngier wrote: > On 2020-08-17 13:24, Keqian Zhu wrote: >> ARM virtual counter supports event stream, it can only trigger an event >> when the trigger bit (the value of CNTKCTL_EL1.EVNTI) of CNTVCT_EL0 changes, >> so the actual period of event stream is

Re: [PATCH 1/2] clocksource: arm_arch_timer: Simplify and fix count reader code logic

2020-08-17 Thread zhukeqian
Hi Marc, On 2020/8/17 20:52, Marc Zyngier wrote: > On 2020-08-17 13:24, Keqian Zhu wrote: >> In commit 0ea415390cd3 (clocksource/arm_arch_timer: Use >> arch_timer_read_counter >> to access stable counters), we separate stable and normal count reader. >> Actually >> the stable reader can

Re: [PATCH 2/3] KVM: uapi: Remove KVM_DEV_TYPE_ARM_PV_TIME in kvm_device_type

2020-08-17 Thread zhukeqian
Hi Steven, On 2020/8/17 17:49, Steven Price wrote: > On 17/08/2020 09:43, zhukeqian wrote: >> Hi Marc, >> [...] >>> >>> It is pretty unfortunate that PV time has turned into such a train wreck, >>> but that's what we have now, and it has to stay

Re: [PATCH 1/3] KVM: arm64: Some fixes of PV-time interface document

2020-08-17 Thread zhukeqian
Hi Andrew, On 2020/8/17 16:47, Andrew Jones wrote: > On Mon, Aug 17, 2020 at 11:37:27AM +0800, Keqian Zhu wrote: >> Rename PV_FEATURES tp PV_TIME_FEATURES >> >> Signed-off-by: Keqian Zhu >> --- >> Documentation/virt/kvm/arm/pvtime.rst | 6 +++--- >> 1 file changed, 3 insertions(+), 3

Re: [PATCH 2/3] KVM: uapi: Remove KVM_DEV_TYPE_ARM_PV_TIME in kvm_device_type

2020-08-17 Thread zhukeqian
Hi Marc, On 2020/8/17 15:39, Marc Zyngier wrote: > On 2020-08-17 04:37, Keqian Zhu wrote: >> ARM64 PV-time ST is configured by userspace through vCPU attribute, >> and KVM_DEV_TYPE_ARM_PV_TIME is unused. >> >> Signed-off-by: Keqian Zhu >> --- >> include/uapi/linux/kvm.h | 2 -- >>

Re: [PATCH 0/9] arm64: Stolen time support

2020-07-28 Thread zhukeqian
Hi Steven, On 2020/7/27 18:48, Steven Price wrote: > On 21/07/2020 04:26, zhukeqian wrote: >> Hi Steven, > > Hi Keqian, > >> On 2019/8/2 22:50, Steven Price wrote: >>> This series add support for paravirtualized time for arm64 guests and >>> KVM

Re: [RESEND PATCH] drivers: arm arch timer: Correct fault programming of CNTKCTL_EL1.EVNTI

2020-07-28 Thread zhukeqian
Hi Marc, On 2020/7/28 18:16, Marc Zyngier wrote: > On 2020-07-17 10:21, Keqian Zhu wrote: >> ARM virtual counter supports event stream. It can only trigger an event >> when the trigger bit of CNTVCT_EL0 changes from 0 to 1 (or from 1 to 0), >> so the actual period of event stream is 2 ^

Re: [RESEND PATCH] drivers: arm arch timer: Correct fault programming of CNTKCTL_EL1.EVNTI

2020-07-28 Thread zhukeqian
Friendly ping. Is this an effective bugfix? On 2020/7/17 17:21, Keqian Zhu wrote: > ARM virtual counter supports event stream. It can only trigger an event > when the trigger bit of CNTVCT_EL0 changes from 0 to 1 (or from 1 to 0), > so the actual period of event stream is 2 ^ (cntkctl_evnti + 1).

Re: [PATCH 0/9] arm64: Stolen time support

2020-07-20 Thread zhukeqian
Hi Steven, On 2019/8/2 22:50, Steven Price wrote: > This series add support for paravirtualized time for arm64 guests and > KVM hosts following the specification in Arm's document DEN 0057A: > > https://developer.arm.com/docs/den0057/a > > It implements support for stolen time, allowing the

Re: [PATCH v2 6/8] KVM: arm64: Add KVM_CAP_ARM_HW_DIRTY_LOG capability

2020-07-05 Thread zhukeqian
Hi, On 2020/7/2 21:55, Keqian Zhu wrote: > For that using arm64 DBM to log dirty pages has the side effect > of long time dirty log sync, we should give userspace opportunity > to enable or disable this feature, to realize some policy. > > This feature is disabled by default. > > Signed-off-by:

Re: [PATCH 03/12] KVM: arm64: Report hardware dirty status of stage2 PTE if coverred

2020-07-02 Thread zhukeqian
Hi Steven, On 2020/7/1 19:28, Steven Price wrote: > Hi, > > On 16/06/2020 10:35, Keqian Zhu wrote: >> kvm_set_pte is called to replace a target PTE with a desired one. >> We always do this without changing the desired one, but if dirty >> status set by hardware is coverred, let caller know it.

Re: [PATCH 00/12] KVM: arm64: Support stage2 hardware DBM

2020-06-17 Thread zhukeqian
Hi, On 2020/6/16 17:35, Keqian Zhu wrote: > This patch series add support for stage2 hardware DBM, and it is only > used for dirty log for now. > > It works well under some migration test cases, including VM with 4K > pages or 2M THP. I checked the SHA256 hash digest of all memory and > they

Re: [PATCH RFC] KVM: arm64: Sidestep stage2_unmap_vm() on vcpu reset when S2FWB is supported

2020-06-01 Thread zhukeqian
Hi Marc, On 2020/5/31 0:31, Marc Zyngier wrote: > Hi Alex, > > On 2020-05-30 11:46, Alexandru Elisei wrote: >> Hi, > > [...] > diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index 48d0ec44ad77..e6378162cdef 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c

Re: [RFC PATCH 2/7] KVM: arm64: Set DBM bit of PTEs if hw DBM enabled

2020-05-27 Thread zhukeqian
Hi Catalin, On 2020/5/26 19:49, Catalin Marinas wrote: > On Mon, May 25, 2020 at 07:24:01PM +0800, Keqian Zhu wrote: >> diff --git a/arch/arm64/include/asm/pgtable-prot.h >> b/arch/arm64/include/asm/pgtable-prot.h >> index 1305e28225fc..f9910ba2afd8 100644 >> ---

Re: [RFC PATCH 0/7] kvm: arm64: Support stage2 hardware DBM

2020-05-25 Thread zhukeqian
Hi Marc, On 2020/5/25 23:44, Marc Zyngier wrote: > On 2020-05-25 12:23, Keqian Zhu wrote: >> This patch series add support for stage2 hardware DBM, and it is only >> used for dirty log for now. >> >> It works well under some migration test cases, including VM with 4K >> pages or 2M THP. I checked