Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1478115
| From | Julien Grall <julien.grall@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping |
| Date | 2016-09-07 11:40 +0200 |
| Message-ID | <seHuN-6ml-15@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <sdYHo-1W2-13@gated-at.bofh.it> <se7KF-83d-15@gated-at.bofh.it> <sek5c-7Zs-9@gated-at.bofh.it> <sesYO-5oF-41@gated-at.bofh.it> <seH1L-6cX-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Vitaly,
On 07/09/2016 10:07, Vitaly Kuznetsov wrote:
> Stefano Stabellini <sstabellini@kernel.org> writes:
>> I don't know that much about cpuid, but the virtual MPIDR is constructed
>> from the vcpu id right now:
>>
>> v->arch.vmpidr = MPIDR_SMP | vcpuid_to_vaffinity(v->vcpu_id);
>>
>> [...]
>>
>> static inline register_t vcpuid_to_vaffinity(unsigned int vcpuid)
>> {
>> register_t vaff;
>>
>> vaff = (vcpuid & 0x0f) << MPIDR_LEVEL_SHIFT(0);
>> vaff |= ((vcpuid >> 4) & MPIDR_LEVEL_MASK) << MPIDR_LEVEL_SHIFT(1);
>>
>> return vaff;
>> }
>
> This could work but only in case there is a way to get MPIDR for _other_
> cpu (e.g. CPU0 needs to get MPIDR of CPU1 when CPU1 is not yet runnning)
> or we'll have to change the machinery of how we bring up secondary CPUs
> - e.g. CPUn starts, writes its id somewhere and 'hangs' waiting for CPU0
> to set up event channels.
You can get the MPIDR from both the device tree and ACPI. The firmware
table is parsed at boot time and the value is stored in cpu_logical_map().
Regards,
--
Julien Grall
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Julien Grall <julien.grall@arm.com> - 2016-09-02 17:40 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-09-04 23:20 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-09-05 11:50 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Stefano Stabellini <sstabellini@kernel.org> - 2016-09-05 21:30 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-09-06 10:40 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Stefano Stabellini <sstabellini@kernel.org> - 2016-09-06 20:10 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-09-07 11:10 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping David Vrabel <david.vrabel@citrix.com> - 2016-09-07 11:20 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Julien Grall <julien.grall@arm.com> - 2016-09-07 11:40 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-09-07 13:30 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Julien Grall <julien.grall@arm.com> - 2016-09-07 15:00 +0200
Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping Wei Chen <Wei.Chen@arm.com> - 2016-09-08 08:40 +0200
csiph-web