Re: [PATCH] KVM: stats: Remove debugfs interface for KVM stats

2021-06-11 Thread Jing Zhang
On Fri, Jun 11, 2021 at 10:18 AM Paolo Bonzini wrote: > > On 11/06/21 17:00, Jing Zhang wrote: > > To avoid duplication, remove the debugfs interface for KVM stats, > > since the fd-based binary stats interface is available. > > That would be too easy. :) We need to keep the debugfs code because

Re: [PATCH] KVM: stats: Remove debugfs interface for KVM stats

2021-06-11 Thread Jing Zhang
Hi Paolo, On Fri, Jun 11, 2021 at 10:00 AM Jing Zhang wrote: > > To avoid duplication, remove the debugfs interface for KVM stats, > since the fd-based binary stats interface is available. > > Signed-off-by: Jing Zhang > --- > arch/arm64/kvm/guest.c| 16 --- > arch/mips/kvm/mips.c |

[PATCH] KVM: stats: Remove debugfs interface for KVM stats

2021-06-11 Thread Jing Zhang
To avoid duplication, remove the debugfs interface for KVM stats, since the fd-based binary stats interface is available. Signed-off-by: Jing Zhang --- arch/arm64/kvm/guest.c| 16 --- arch/mips/kvm/mips.c | 39 -- arch/powerpc/kvm/book3s.c | 33 - arch/powerpc/kvm/booke.c |

Re: [PATCH v8 0/4] KVM statistics data fd-based binary interface

2021-06-11 Thread Jing Zhang
Hi Paolo, On Fri, Jun 11, 2021 at 8:35 AM Paolo Bonzini wrote: > > On 11/06/21 14:46, Jing Zhang wrote: > > This patchset provides a file descriptor for every VM and VCPU to read > > KVM statistics data in binary format. > > It is meant to provide a lightweight, flexible, scalable and efficient

Re: [PATCH v4 3/9] KVM: arm64: vgic: Be tolerant to the lack of maintenance interrupt masking

2021-06-11 Thread Alexandru Elisei
Hi Marc, On 6/11/21 5:38 PM, Alexandru Elisei wrote: > Hi Marc, > > On 6/1/21 11:39 AM, Marc Zyngier wrote: >> As it turns out, not all the interrupt controllers are able to >> expose a vGIC maintenance interrupt that can be independently >> enabled/disabled. >> >> And to be fair, it doesn't

[PATCH v8 3/4] KVM: stats: Add documentation for statistics data binary interface

2021-06-11 Thread Jing Zhang
Update KVM API documentation for binary statistics. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Signed-off-by: Jing Zhang --- Documentation/virt/kvm/api.rst | 174 - 1 file changed, 173 insertions(+), 1 deletion(-) diff

[PATCH v8 2/4] KVM: stats: Add fd-based API to read binary stats data

2021-06-11 Thread Jing Zhang
Provides a file descriptor per VM to read VM stats info/data. Provides a file descriptor per vCPU to read vCPU stats info/data. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Signed-off-by: Jing Zhang --- arch/arm64/kvm/guest.c| 34 +

[PATCH v8 1/4] KVM: stats: Separate generic stats from architecture specific ones

2021-06-11 Thread Jing Zhang
Put all generic statistics in a separate structure to ease statistics handling for the incoming new statistics API. No functional change intended. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Signed-off-by: Jing Zhang ---

[PATCH v8 4/4] KVM: selftests: Add selftest for KVM statistics data binary interface

2021-06-11 Thread Jing Zhang
Add selftest to check KVM stats descriptors validity. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Reviewed-by: Krish Sadhukhan Signed-off-by: Jing Zhang --- tools/testing/selftests/kvm/.gitignore| 1 + tools/testing/selftests/kvm/Makefile | 3 +

[PATCH v8 0/4] KVM statistics data fd-based binary interface

2021-06-11 Thread Jing Zhang
This patchset provides a file descriptor for every VM and VCPU to read KVM statistics data in binary format. It is meant to provide a lightweight, flexible, scalable and efficient lock-free solution for user space telemetry applications to pull the statistics data periodically for large scale

Re: [PATCH v4 3/9] KVM: arm64: vgic: Be tolerant to the lack of maintenance interrupt masking

2021-06-11 Thread Alexandru Elisei
Hi Marc, On 6/1/21 11:39 AM, Marc Zyngier wrote: > As it turns out, not all the interrupt controllers are able to > expose a vGIC maintenance interrupt that can be independently > enabled/disabled. > > And to be fair, it doesn't really matter as all we require is > for the interrupt to kick us

[kvm-unit-tests PATCH] configure: arm: Update kvmtool UART address

2021-06-11 Thread Alexandru Elisei
kvmtool commit 45b4968e0de1 ("hw/serial: ARM/arm64: Use MMIO at higher addresses") changed the UART address from 0x3f8 to 0x100. Update the UART early address accordingly when kvm-unit-tests is configured with --target=kvmtool. Users of older kvmtool versions can still enjoy having a working

Re: [PATCH] KVM: stats: Remove debugfs interface for KVM stats

2021-06-11 Thread Paolo Bonzini
On 11/06/21 17:00, Jing Zhang wrote: To avoid duplication, remove the debugfs interface for KVM stats, since the fd-based binary stats interface is available. That would be too easy. :) We need to keep the debugfs code because it is not yet a 100% replacement for binary stats (it allows to

Re: [PATCH v8 0/4] KVM statistics data fd-based binary interface

2021-06-11 Thread Paolo Bonzini
On 11/06/21 14:46, Jing Zhang wrote: This patchset provides a file descriptor for every VM and VCPU to read KVM statistics data in binary format. It is meant to provide a lightweight, flexible, scalable and efficient lock-free solution for user space telemetry applications to pull the statistics

Re: [RFC PATCH 4/4] KVM: arm64: Introduce KVM_CAP_ARM_PROTECTED_VM

2021-06-11 Thread Alexandru Elisei
Hi Will, On 6/8/21 1:08 PM, Will Deacon wrote: > Hi Sean, > > Thanks for having a look. > > On Thu, Jun 03, 2021 at 08:15:55PM +, Sean Christopherson wrote: >> On Thu, Jun 03, 2021, Will Deacon wrote: >>> [..] >> >>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h >>> index

Re: [PATCH v4 0/6] KVM: selftests: arm64 exception handling and debug test

2021-06-11 Thread Marc Zyngier
On 2021-06-11 02:10, Ricardo Koller wrote: Hi, These patches add a debug exception test in aarch64 KVM selftests while also adding basic exception handling support. The structure of the exception handling is based on its x86 counterpart. Tests use the same calls to initialize exception

Re: [PATCH v1 00/13] KVM: arm64: Fixed features for protected VMs

2021-06-11 Thread Alexandru Elisei
Hi, On 6/8/21 3:11 PM, Fuad Tabba wrote: > Hi, > > This patch series adds support for restricting CPU features for protected VMs > in KVM [1]. > > Various feature configurations are allowed in KVM/arm64. Supporting all > these features in pKVM is difficult, as it either involves moving much of >

Re: [PATCH v3 0/7] KVM: arm64: Reduce hyp_vmemmap overhead

2021-06-11 Thread Marc Zyngier
On Tue, 8 Jun 2021 11:45:11 +, Quentin Perret wrote: > This is a v3 of the patch series previously posted here: > > https://lore.kernel.org/r/20210602094347.3730846-1-qper...@google.com > > Please refer to the cover letter of v1 for the context and motivation > behind the series. > >

Re: [PATCH v7 1/4] KVM: stats: Separate generic stats from architecture specific ones

2021-06-11 Thread Paolo Bonzini
On 11/06/21 14:08, Christian Borntraeger wrote: I always interpreted it as "number of times the KVM page table management code needed other CPUs to learn about new page tables". Whether the broadcast is done in software or hardware shouldn't matter; either way I suppose there is still some

Re: [PATCH v7 1/4] KVM: stats: Separate generic stats from architecture specific ones

2021-06-11 Thread Christian Borntraeger
On 11.06.21 14:03, Paolo Bonzini wrote: On 11/06/21 14:00, Christian Borntraeger wrote: What is the semantics of remote_tlb_flush? I always interpreted it as "number of times the KVM page table management code needed other CPUs to learn about new page tables". Whether the broadcast is

Re: [PATCH v7 1/4] KVM: stats: Separate generic stats from architecture specific ones

2021-06-11 Thread Paolo Bonzini
On 11/06/21 14:00, Christian Borntraeger wrote: What is the semantics of remote_tlb_flush? I always interpreted it as "number of times the KVM page table management code needed other CPUs to learn about new page tables". Whether the broadcast is done in software or hardware shouldn't matter;

Re: [PATCH v7 1/4] KVM: stats: Separate generic stats from architecture specific ones

2021-06-11 Thread Christian Borntraeger
On 11.06.21 12:51, Paolo Bonzini wrote: On 11/06/21 08:57, Christian Borntraeger wrote: @@ -755,12 +750,12 @@ struct kvm_vcpu_arch {   };   struct kvm_vm_stat { +    struct kvm_vm_stat_generic generic; s390 does not have remote_tlb_flush. I guess this does not hurt? It would have to be

Re: [PATCH v7 0/4] KVM statistics data fd-based binary interface

2021-06-11 Thread Paolo Bonzini
On 11/06/21 08:57, Christian Borntraeger wrote: On 03.06.21 23:14, Jing Zhang wrote: This patchset provides a file descriptor for every VM and VCPU to read KVM statistics data in binary format. It is meant to provide a lightweight, flexible, scalable and efficient lock-free solution for user

Re: [PATCH v7 0/4] KVM statistics data fd-based binary interface

2021-06-11 Thread Christian Borntraeger
On 03.06.21 23:14, Jing Zhang wrote: This patchset provides a file descriptor for every VM and VCPU to read KVM statistics data in binary format. It is meant to provide a lightweight, flexible, scalable and efficient lock-free solution for user space telemetry applications to pull the

Re: [PATCH v7 1/4] KVM: stats: Separate generic stats from architecture specific ones

2021-06-11 Thread Christian Borntraeger
On 03.06.21 23:14, Jing Zhang wrote: Put all generic statistics in a separate structure to ease statistics handling for the incoming new statistics API. No functional change intended. Reviewed-by: David Matlack Reviewed-by: Ricardo Koller Signed-off-by: Jing Zhang [...] diff --git