qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC V3 1/4] Use Aff1 with mpidr This is an impro


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH RFC V3 1/4] Use Aff1 with mpidr This is an improved and KVM-aware alternative to
Date: Mon, 8 Jun 2015 12:39:05 +0200

On Mon, 08 Jun 2015 12:39:56 +0300
Pavel Fedin <address@hidden> wrote:

>  Hello!
> 
> > >  I thought about it when i developed this, but in my implementation
> > > affinity bits are assigned during CPU instantiation, while feature
> > > bits can be added later, during realize. I could tweak set_feature()
> > > to sync up MPIDR value but perhaps it isn't the best thing to do.
> > 
> > Can we not just assign the whole thing at realize?
> 
>  kvm_arch_init_vcpu() is called before realize, therefore i would have to 
> track down whether KVM is active or not.

that's because call flow looks wrong.
If KVM would be fixed to use QEMU's mpidr then you can like x86 target

1. create vcpu
2. set mpidr property on it from board code
3. call cpu.realize() -> which will push mpidr to KVM


> 
> > You need to fix the 32-bit side anyway.
> 
>  Actually already done in my working tree.
> 
> > I still think that having the whole mpidr in the struct will
> > be less confusing.
> 
>  Ok, if you are really insisting on that, i can assign IDs where this is 
> currently done and add feature bits in arm_cpu_realizefn().
>  Last argument: the rest of qemu code (property assignment, lookup in PSCI, 
> etc) actually needs IDs without feature bits. The only function which needs 
> full version is mpidr_read(). So does it still worth of putting AND with 
> bitmasks everywhere? May be just rename 'mpidr' to something like 'mp_id' ?
> 
> Kind regards,
> Pavel Fedin
> Expert Engineer
> Samsung Electronics Research center Russia
> 




reply via email to

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