Re: [PATCH v2 00/94] KVM: arm64: ARMv8.3/8.4 Nested Virtualization support

2020-04-16 Thread Marc Zyngier
Hi Zengtao, On 2020-04-16 02:38, Zengtao (B) wrote: Hi Marc: Got it. Really a bit patch set :) Well, yeah... ;-) BTW, I have done a basic kvm unit test git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git And I find that after apply the patch KVM: arm64: VNCR-ize ELR_EL1, The psci

Re: [PATCH 8/8] arm64: cpufeature: Add an overview comment for the cpufeature framework

2020-04-16 Thread Will Deacon
On Thu, Apr 16, 2020 at 03:59:39PM +0100, Suzuki K Poulose wrote: > On 04/14/2020 10:31 PM, Will Deacon wrote: > > Now that Suzuki isn't within throwing distance, I thought I'd better add > > a rough overview comment to cpufeature.c so that it doesn't take me days > > to remember how it works next

Re: [PATCH] KVM: arm64: Drop PTE_S2_MEMATTR_MASK

2020-04-16 Thread Marc Zyngier
On 2020-04-16 18:05, Will Deacon wrote: On Thu, Apr 16, 2020 at 04:36:05PM +0100, Marc Zyngier wrote: On Wed, 15 Apr 2020 18:57:46 +0800 Zenghui Yu wrote: > The only user of PTE_S2_MEMATTR_MASK macro had been removed since > commit a501e32430d4 ("arm64: Clean up the default pgprot setting").

Re: [PATCH 2/2] KVM: arm64: vgic-its: Fix memory leak on the error path of vgic_add_lpi()

2020-04-16 Thread Marc Zyngier
On 2020-04-16 02:17, Zenghui Yu wrote: On 2020/4/14 11:03, Zenghui Yu wrote: If we're going to fail out the vgic_add_lpi(), let's make sure the allocated vgic_irq memory is also freed. Though it seems that both cases are unlikely to fail. Cc: Zengruan Ye Signed-off-by: Zenghui Yu ---

Re: [PATCH] KVM: arm64: Drop PTE_S2_MEMATTR_MASK

2020-04-16 Thread Will Deacon
On Thu, Apr 16, 2020 at 04:36:05PM +0100, Marc Zyngier wrote: > On Wed, 15 Apr 2020 18:57:46 +0800 > Zenghui Yu wrote: > > > The only user of PTE_S2_MEMATTR_MASK macro had been removed since > > commit a501e32430d4 ("arm64: Clean up the default pgprot setting"). > > It has been about six years

Re: [PATCH v2] KVM/arm64: Support enabling dirty log gradually in small chunks

2020-04-16 Thread Paolo Bonzini
On 16/04/20 17:09, Marc Zyngier wrote: > On Wed, 15 Apr 2020 18:13:56 +0200 > Paolo Bonzini wrote: > >> On 13/04/20 14:20, Keqian Zhu wrote: >>> There is already support of enabling dirty log graually in small chunks >>> for x86 in commit 3c9bd4006bfc ("KVM: x86: enable dirty log gradually in

Re: [PATCH] KVM: arm64: Drop PTE_S2_MEMATTR_MASK

2020-04-16 Thread Marc Zyngier
On Wed, 15 Apr 2020 18:57:46 +0800 Zenghui Yu wrote: > The only user of PTE_S2_MEMATTR_MASK macro had been removed since > commit a501e32430d4 ("arm64: Clean up the default pgprot setting"). > It has been about six years and no one has used it again. > > Let's drop it. > > Signed-off-by:

Re: [PATCH 8/8] arm64: cpufeature: Add an overview comment for the cpufeature framework

2020-04-16 Thread Marc Zyngier
On 2020-04-16 15:59, Suzuki K Poulose wrote: Hi Suzuki, [...] As you mentioned in the other response we could add information about the guest view, something like : - KVM exposes the sanitised value of the feature registers to the guests and is not affected by the FTR_VISIBLE.

Re: [PATCH v2] KVM/arm64: Support enabling dirty log gradually in small chunks

2020-04-16 Thread Marc Zyngier
On Wed, 15 Apr 2020 18:13:56 +0200 Paolo Bonzini wrote: > On 13/04/20 14:20, Keqian Zhu wrote: > > There is already support of enabling dirty log graually in small chunks > > for x86 in commit 3c9bd4006bfc ("KVM: x86: enable dirty log gradually in > > small chunks"). This adds support for arm64.

Re: [PATCH v2] KVM/arm64: Support enabling dirty log gradually in small chunks

2020-04-16 Thread Marc Zyngier
On Mon, 13 Apr 2020 20:20:23 +0800 Keqian Zhu wrote: > There is already support of enabling dirty log graually in small chunks gradually > for x86 in commit 3c9bd4006bfc ("KVM: x86: enable dirty log gradually in > small chunks"). This adds support for arm64. > > x86 still writes protect all

Re: [PATCH 8/8] arm64: cpufeature: Add an overview comment for the cpufeature framework

2020-04-16 Thread Suzuki K Poulose
Hi Will, On 04/14/2020 10:31 PM, Will Deacon wrote: Now that Suzuki isn't within throwing distance, I thought I'd better add a rough overview comment to cpufeature.c so that it doesn't take me days to remember how it works next time. Signed-off-by: Will Deacon ---

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Paolo Bonzini
On 16/04/20 07:10, Tianjia Zhang wrote: > In earlier versions of kvm, 'kvm_run' is an independent structure > and is not included in the vcpu structure. At present, 'kvm_run' > is already included in the vcpu structure, so the parameter > 'kvm_run' is redundant. > > This patch simplify the

Re: [PATCH] KVM: handle the right RAS SEA(Synchronous External Abort) type

2020-04-16 Thread James Morse
Hi Geng, On 16/04/2020 13:07, gengdongjiu wrote: > On 2020/4/14 20:18, James Morse wrote: >> On 11/04/2020 13:17, Dongjiu Geng wrote: >>> When the RAS Extension is implemented, b0b011000, 0b011100, >>> 0b011101, 0b00, and 0b01, are not used and reserved >>> to the DFSC[5:0] of ESR_ELx,

Re: [PATCH] KVM: handle the right RAS SEA(Synchronous External Abort) type

2020-04-16 Thread gengdongjiu
Hi James On 2020/4/14 20:18, James Morse wrote: > Hi Geng, > > On 11/04/2020 13:17, Dongjiu Geng wrote: >> When the RAS Extension is implemented, b0b011000, 0b011100, >> 0b011101, 0b00, and 0b01, are not used and reserved >> to the DFSC[5:0] of ESR_ELx, but the code still checks these >>

Re: [PATCH 8/8] arm64: cpufeature: Add an overview comment for the cpufeature framework

2020-04-16 Thread Will Deacon
Hi Suzuki, On Tue, Apr 14, 2020 at 10:31:14PM +0100, Will Deacon wrote: > Now that Suzuki isn't within throwing distance, I thought I'd better add > a rough overview comment to cpufeature.c so that it doesn't take me days > to remember how it works next time. > > Signed-off-by: Will Deacon >

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Tianjia Zhang
On 2020/4/16 16:28, Marc Zyngier wrote: On 2020-04-16 08:03, Vitaly Kuznetsov wrote: Tianjia Zhang writes: In earlier versions of kvm, 'kvm_run' is an independent structure and is not included in the vcpu structure. At present, 'kvm_run' is already included in the vcpu structure, so the

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Tianjia Zhang
On 2020/4/16 16:50, Cornelia Huck wrote: On Thu, 16 Apr 2020 16:45:33 +0800 Tianjia Zhang wrote: On 2020/4/16 16:28, Marc Zyngier wrote: On 2020-04-16 08:03, Vitaly Kuznetsov wrote: Tianjia Zhang writes: In earlier versions of kvm, 'kvm_run' is an independent structure and is not

Re: [PATCH v11 00/13] SMMUv3 Nested Stage Setup (IOMMU part)

2020-04-16 Thread Zhangfei Gao
On 2020/4/14 下午11:05, Eric Auger wrote: This version fixes an issue observed by Shameer on an SMMU 3.2, when moving from dual stage config to stage 1 only config. The 2 high 64b of the STE now get reset. Otherwise, leaving the S2TTB set may cause a C_BAD_STE error. This series can be found

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Vitaly Kuznetsov
Tianjia Zhang writes: > In earlier versions of kvm, 'kvm_run' is an independent structure > and is not included in the vcpu structure. At present, 'kvm_run' > is already included in the vcpu structure, so the parameter > 'kvm_run' is redundant. > > This patch simplify the function definition,

RE: [PATCH v2 00/94] KVM: arm64: ARMv8.3/8.4 Nested Virtualization support

2020-04-16 Thread Zengtao (B)
Hi Marc: Got it. Really a bit patch set :) BTW, I have done a basic kvm unit test git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git And I find that after apply the patch KVM: arm64: VNCR-ize ELR_EL1, The psci test failed for some reason, I can't understand why, this is only the test

Re: [PATCH] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Tianjia Zhang
On 2020/4/15 22:53, Paolo Bonzini wrote: On 15/04/20 11:07, Vitaly Kuznetsov wrote: In case this is no longer needed I'd suggest we drop 'kvm_run' parameter and extract it from 'struct kvm_vcpu' when needed. This looks like a natural add-on to your cleanup patch. I agree, though I think it

[PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Tianjia Zhang
In earlier versions of kvm, 'kvm_run' is an independent structure and is not included in the vcpu structure. At present, 'kvm_run' is already included in the vcpu structure, so the parameter 'kvm_run' is redundant. This patch simplify the function definition, removes the extra 'kvm_run'

Re: [PATCH RFCv1 0/7] Support Async Page Fault

2020-04-16 Thread Gavin Shan
Hi Mark, On 4/14/20 9:05 PM, Mark Rutland wrote: On Tue, Apr 14, 2020 at 03:39:56PM +1000, Gavin Shan wrote: On 4/10/20 10:52 PM, Marc Zyngier wrote: On 2020-04-10 09:58, Gavin Shan wrote: In order to fulfil the control flow and convey signals between host and guest. A IMPDEF system register

Re: [PATCH 0/8] Relax sanity checking for mismatched AArch32 EL1

2020-04-16 Thread Sai Prakash Ranjan
On 2020-04-16 14:09, Sai Prakash Ranjan wrote: On 2020-04-15 03:01, Will Deacon wrote: Hi all, For better or worse, there are SoCs in production where some, but not all of the CPUs, support AArch32 at EL1 and above. Right now, that results in "SANITY CHECK" warnings during boot and an

Re: [PATCH 0/8] Relax sanity checking for mismatched AArch32 EL1

2020-04-16 Thread Sai Prakash Ranjan
On 2020-04-15 03:01, Will Deacon wrote: Hi all, For better or worse, there are SoCs in production where some, but not all of the CPUs, support AArch32 at EL1 and above. Right now, that results in "SANITY CHECK" warnings during boot and an unconditional kernel taint. This patch series tries to

Re: [PATCH RFCv1 0/7] Support Async Page Fault

2020-04-16 Thread Will Deacon
On Thu, Apr 16, 2020 at 10:16:22AM +0100, Mark Rutland wrote: > On Thu, Apr 16, 2020 at 05:59:33PM +1000, Gavin Shan wrote: > > However, the hypercall number and behaviors are guarded by > > specification. For example, the hypercalls used by para-virtualized > > stolen time, which are defined in

Re: [PATCH RFCv1 0/7] Support Async Page Fault

2020-04-16 Thread Mark Rutland
On Thu, Apr 16, 2020 at 05:59:33PM +1000, Gavin Shan wrote: > On 4/14/20 9:05 PM, Mark Rutland wrote: > > On Tue, Apr 14, 2020 at 03:39:56PM +1000, Gavin Shan wrote: > > > On 4/10/20 10:52 PM, Marc Zyngier wrote: > > > > On 2020-04-10 09:58, Gavin Shan wrote: > > > > > In order to fulfil the

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Marc Zyngier
On 2020-04-16 09:45, Tianjia Zhang wrote: On 2020/4/16 16:28, Marc Zyngier wrote: [...] Overall, there is a large set of cleanups to be done when both the vcpu and the run structures are passed as parameters at the same time. Just grepping the tree for kvm_run is pretty instructive.  

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Cornelia Huck
On Thu, 16 Apr 2020 16:45:33 +0800 Tianjia Zhang wrote: > On 2020/4/16 16:28, Marc Zyngier wrote: > > On 2020-04-16 08:03, Vitaly Kuznetsov wrote: > >> Tianjia Zhang writes: > >> > >>> In earlier versions of kvm, 'kvm_run' is an independent structure > >>> and is not included in the vcpu

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Marc Zyngier
On 2020-04-16 08:03, Vitaly Kuznetsov wrote: Tianjia Zhang writes: In earlier versions of kvm, 'kvm_run' is an independent structure and is not included in the vcpu structure. At present, 'kvm_run' is already included in the vcpu structure, so the parameter 'kvm_run' is redundant. This patch

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Cornelia Huck
On Thu, 16 Apr 2020 13:10:57 +0800 Tianjia Zhang wrote: > In earlier versions of kvm, 'kvm_run' is an independent structure > and is not included in the vcpu structure. At present, 'kvm_run' > is already included in the vcpu structure, so the parameter > 'kvm_run' is redundant. > > This patch

Re: [PATCH v11 00/13] SMMUv3 Nested Stage Setup (IOMMU part)

2020-04-16 Thread Auger Eric
Hi Zhangfei, On 4/16/20 6:25 AM, Zhangfei Gao wrote: > > > On 2020/4/14 下午11:05, Eric Auger wrote: >> This version fixes an issue observed by Shameer on an SMMU 3.2, >> when moving from dual stage config to stage 1 only config. >> The 2 high 64b of the STE now get reset. Otherwise, leaving the