Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1476037
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH linux v3 3/9] xen: introduce xen_vcpu_id mapping |
| Date | 2016-09-04 23:20 +0200 |
| Message-ID | <sdMZz-2No-9@gated-at.bofh.it> (permalink) |
| References | <rZ9Oq-1Wx-11@gated-at.bofh.it> <rZ9Or-1Wx-45@gated-at.bofh.it> <scYJt-1dc-39@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 09/02/2016 11:29 AM, Julien Grall wrote:
>
>> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
>> index 0f87db2..c833912 100644
>> --- a/arch/x86/xen/enlighten.c
>> +++ b/arch/x86/xen/enlighten.c
>> @@ -1795,6 +1806,12 @@ static void __init init_hvm_pv_info(void)
>>
>> xen_setup_features();
>>
>> + cpuid(base + 4, &eax, &ebx, &ecx, &edx);
>> + if (eax & XEN_HVM_CPUID_VCPU_ID_PRESENT)
>> + this_cpu_write(xen_vcpu_id, ebx);
>> + else
>> + this_cpu_write(xen_vcpu_id, smp_processor_id());
>> +
>> pv_info.name = "Xen HVM";
>>
>> xen_domain_type = XEN_HVM_DOMAIN;
>> @@ -1806,6 +1823,10 @@ static int xen_hvm_cpu_notify(struct
>> notifier_block *self, unsigned long action,
>> int cpu = (long)hcpu;
>> switch (action) {
>> case CPU_UP_PREPARE:
>> + if (cpu_acpi_id(cpu) != U32_MAX)
>> + per_cpu(xen_vcpu_id, cpu) = cpu_acpi_id(cpu);
>> + else
>> + per_cpu(xen_vcpu_id, cpu) = cpu;
>
> I have not tried myself. But looking at the code, the notifiers
> xen_hvm_cpu_notifier and evtchn_fifo_cpu_notifier have the same
> priority. So what does prevent the code above to be executed after the
> event channel callback?
We will be converting to new hotplug state machine where this order will
be guaranteed:
https://lists.xenproject.org/archives/html/xen-devel/2016-08/msg01914.html
-boris
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