qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Question] Regarding PMU initialization within the QEMU for ARM VCPU


From: Igor Mammedov
Subject: Re: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs
Date: Fri, 5 Jun 2020 17:24:05 +0200

On Wed, 3 Jun 2020 12:21:16 +0200
Andrew Jones <drjones@redhat.com> wrote:

> On Wed, Jun 03, 2020 at 11:59:23AM +0200, Auger Eric wrote:
> > Hi Drew,
> > 
> > On 6/3/20 11:37 AM, Andrew Jones wrote:  
> > > On Mon, Jun 01, 2020 at 03:04:33PM +0000, Salil Mehta wrote:  
> > >> Hello,
> > >> I could see below within function fdt_add_pmu_nodes() part of
> > >> hw/arm/virt.c during virt machine initialization time:
> > >>
> > >> Observation:
> > >> In below function, support of PMU feature is being checked for
> > >> each vcpu and if the PMU is found part of the features then PMU
> > >> is initialized with in the host/KVM. But if there is even one
> > >> vcpu which is found to not support the PMU then loop is exited
> > >> and PMU is not initialized for the rest of the vcpus as well.
> > >>
> > >> Questions:
> > >> Q1. Not sure what is the logic of the premature exit and not
> > >>     continuing with further checks and initialization of other
> > >>     VCPU PMUs?  
> > > 
> > > KVM requires all VCPUs to have a PMU if one does.  
> > 
> > I fail to find where this is enforced? Do you know the place?  
> 
> kvm_vcpu_set_target(), called from KVM_ARM_VCPU_INIT. It ensures
> all VCPUs have identical features selected. The PMU requires a
> VCPU feature (KVM_ARM_VCPU_PMU_V3) to be set.

perhaps add a check at cpu_preplug time to ensure that it's so before cpu is 
create
instead of much later FDT initialization?

> 
> Thanks,
> drew




reply via email to

[Prev in Thread] Current Thread [Next in Thread]