Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1435350
| From | "Jan Beulich" <JBeulich@suse.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping |
| Date | 2016-07-01 16:00 +0200 |
| Message-ID | <rQ798-7jz-5@gated-at.bofh.it> (permalink) |
| References | (15 earlier) <rP93j-3WI-15@gated-at.bofh.it> <qMbGy-5lD-21@gated-at.bofh.it> <rQ798-7jz-11@gated-at.bofh.it> <rQ798-7jz-13@gated-at.bofh.it> <rQ5qG-6tm-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
>>> On 01.07.16 at 14:06, <vkuznets@redhat.com> wrote:
> "Jan Beulich" <JBeulich@suse.com> writes:
>
>>>>> On 29.06.16 at 18:27, <andrew.cooper3@citrix.com> wrote:
>>> On 29/06/16 17:19, Vitaly Kuznetsov wrote:
>>>> To explain better what I'm trying to suggest here please take a look at
>>>> the attached patch. If we can guarantee long term that ACPI id always
>>>> equals to Xen's idea of vCPU id this is probably the easiest way.
>>>>
>>>> -- Vitaly
>>>
>>> The code in hvmloader which sets up the MADT does:
>>>
>>> for ( i = 0; i < hvm_info->nr_vcpus; i++ )
>>> {
>>> memset(lapic, 0, sizeof(*lapic));
>>> lapic->type = ACPI_PROCESSOR_LOCAL_APIC;
>>> lapic->length = sizeof(*lapic);
>>> /* Processor ID must match processor-object IDs in the DSDT. */
>>> lapic->acpi_processor_id = i;
>>> lapic->apic_id = LAPIC_ID(i);
>>> lapic->flags = (test_bit(i, hvm_info->vcpu_online)
>>> ? ACPI_LOCAL_APIC_ENABLED : 0);
>>> lapic++;
>>> }
>>>
>>> So relying on the acpi_processor_id does look to be reliable. That code
>>> hasn't changed since 2007, and that was only a bugfix. I would go so
>>> far as to say it is reasonable for us to guarantee this in the guest ABI.
>>
>> In fact - is there any other way a guest could learn the vCPU IDs
>> of its CPUs in a reliable way? I don't think so, and hence this de
>> facto already is part of the ABI; we should of course spell it out
>> somewhere.
>
> I'm unsure about the right place in the hypervisor tree to put this
> information to. At the very least users of VCPUOP_* and EVTCHNOP_*
> hypervcalls need to know this so xen/include/public/{event_channel.h,
> vcpu.h} are the candidates. Or is there a better place?
I'd probably put this in public/hvm/hvm_info_table.h or
public/hvm/hvm_vcpu.h; the two headers you name shouldn't be
cluttered with information like this not pertaining to all guests.
Jan
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH linux 2/8] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-28 18:50 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping Andrew Cooper <andrew.cooper3@citrix.com> - 2016-06-28 19:30 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-29 14:20 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping Andrew Cooper <andrew.cooper3@citrix.com> - 2016-06-29 14:40 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-29 15:00 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-06-29 18:30 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping "Jan Beulich" <JBeulich@suse.com> - 2016-06-30 11:20 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping Vitaly Kuznetsov <vkuznets@redhat.com> - 2016-07-01 14:10 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping "Jan Beulich" <JBeulich@suse.com> - 2016-07-01 16:00 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2016-07-05 17:40 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping "Jan Beulich" <JBeulich@suse.com> - 2016-07-05 17:50 +0200
Re: [Xen-devel] [PATCH linux 2/8] xen: introduce xen_vcpu_id mapping Joao Martins <joao.m.martins@oracle.com> - 2016-07-07 12:20 +0200
csiph-web