Re: Libvirt on little.BIG ARM systems unable to start guest if no cpuset is provided

2021-12-13 Thread Marc Zyngier
On Mon, 13 Dec 2021 16:06:14 +, Peter Maydell wrote: > > KVM on big.little setups is a kernel-level question really; I've > cc'd the kvmarm list. Thanks Peter for throwing us under the big-little bus! ;-) > > On Mon, 13 Dec 2021 at 15:02, Qu Wenruo wrote: > > > > > > > > On 2021/12/13 21:

Re: Libvirt on little.BIG ARM systems unable to start guest if no cpuset is provided

2021-12-13 Thread Peter Maydell
KVM on big.little setups is a kernel-level question really; I've cc'd the kvmarm list. On Mon, 13 Dec 2021 at 15:02, Qu Wenruo wrote: > > > > On 2021/12/13 21:17, Michal Prívozník wrote: > > On 12/11/21 02:58, Qu Wenruo wrote: > >> Hi, > >> > >> Recently I got my libvirt setup on both RK3399 (Roc

[PATCH v3 4/4] KVM: arm64: Refuse to run VCPU if the PMU doesn't match the physical CPU

2021-12-13 Thread Alexandru Elisei
Userspace can assign a PMU to a VCPU with the KVM_ARM_VCPU_PMU_V3_SET_PMU device ioctl. If the VCPU is scheduled on a physical CPU which has a different PMU, the perf events needed to emulate a guest PMU won't be scheduled in and the guest performance counters will stop counting. Treat it as an use

[PATCH v3 3/4] KVM: arm64: Add KVM_ARM_VCPU_PMU_V3_SET_PMU attribute

2021-12-13 Thread Alexandru Elisei
When KVM creates an event and there are more than one PMUs present on the system, perf_init_event() will go through the list of available PMUs and will choose the first one that can create the event. The order of the PMUs in the PMU list depends on the probe order, which can change under various ci

[PATCH v3 2/4] KVM: arm64: Keep a list of probed PMUs

2021-12-13 Thread Alexandru Elisei
The ARM PMU driver calls kvm_host_pmu_init() after probing to tell KVM that a hardware PMU is available for guest emulation. Heterogeneous systems can have more than one PMU present, and the callback gets called multiple times, once for each of them. Keep track of all the PMUs available to KVM, as

[PATCH v3 1/4] perf: Fix wrong name in comment for struct perf_cpu_context

2021-12-13 Thread Alexandru Elisei
Commit 0793a61d4df8 ("performance counters: core code") added the perf subsystem (then called Performance Counters) to Linux, creating the struct perf_cpu_context. The comment for the struct referred to it as a "struct perf_counter_cpu_context". Commit cdd6c482c9ff ("perf: Do the big rename: Perfo

[PATCH v3 0/4] KVM: arm64: Improve PMU support on heterogeneous systems

2021-12-13 Thread Alexandru Elisei
(CC'ing Peter Maydell in case this might be of interest to qemu) The series can be found on a branch at [1], and the kvmtool support at [2]. The kvmtool patches are also on the mailing list [3] and haven't changed since v1. Detailed explanation of the issue and symptoms that the patches attempt t

Re: [PATCH] KVM: arm64: Use defined value for SCTLR_ELx_EE

2021-12-13 Thread Will Deacon
On Wed, Dec 08, 2021 at 07:28:10PM +, Fuad Tabba wrote: > Replace the hardcoded value with the existing definition. > > No functional change intended. > > Signed-off-by: Fuad Tabba > --- > arch/arm64/include/asm/kvm_emulate.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH v3 03/15] KVM: arm64: Refcount hyp stage-1 pgtable pages

2021-12-13 Thread Will Deacon
On Fri, Dec 10, 2021 at 02:34:16PM +, Quentin Perret wrote: > On Thursday 09 Dec 2021 at 10:29:24 (+), Will Deacon wrote: > > On Wed, Dec 01, 2021 at 05:03:57PM +, Quentin Perret wrote: > > > To prepare the ground for allowing hyp stage-1 mappings to be removed at > > > run-time, update

Re: Some problems about TZASC configuration

2021-12-13 Thread Marc Zyngier
Wang, On 2021-12-12 19:52, Chenxu Wang wrote: Hi all, I have some problems about KVM+QEMU when it runs on a FVP with TZASC and VHE enabled. If I configure some DRAM region as "secure only", will KVM generate some fault (e.g. SError) when creating a VM? If the memory ends up being used by NS,

Re: Configuring the host GIC for guest to guest IPI

2021-12-13 Thread Marc Zyngier
Hi Alex, On Mon, 13 Dec 2021 11:40:41 +, Alex Bennée wrote: > > Hi GIC experts, > > This came up last week in the Stratos sync call when we were discussing > Vincent's SCMI setup: > > > https://linaro.atlassian.net/wiki/spaces/STR/pages/28665741503/2021-12-09+Project+Stratos+Meeting+Note

Configuring the host GIC for guest to guest IPI

2021-12-13 Thread Alex Bennée
Hi GIC experts, This came up last week in the Stratos sync call when we were discussing Vincent's SCMI setup: https://linaro.atlassian.net/wiki/spaces/STR/pages/28665741503/2021-12-09+Project+Stratos+Meeting+Notes with the shared memory between the two guests the only reason we currently exi

Re: [PATCH v2 0/4] KVM: arm64: Improve PMU support on heterogeneous systems

2021-12-13 Thread Alexandru Elisei
Hi Reiji, On Sun, Dec 12, 2021 at 10:36:52PM -0800, Reiji Watanabe wrote: > On Wed, Dec 8, 2021 at 12:05 AM Marc Zyngier wrote: > > > > Reji, > > > > On 2021-12-08 02:36, Reiji Watanabe wrote: > > > Hi Alex, > > > > > > On Mon, Dec 6, 2021 at 9:02 AM Alexandru Elisei > > > wrote: > > >> > > >> (