]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 30 Jun 2016 15:56:38 +0000 (17:56 +0200)
committerBob Liu <bob.liu@oracle.com>
Thu, 20 Oct 2016 08:02:22 +0000 (04:02 -0400)
commit9fb02b7d7bb24c83336594d27f9747a1a293dedf
tree36c5f47d421d772cdadb67b46ba4637b3d5a5cc6
parent3b42f4a8aee6fb24d9851bda2c3514d9f9f43e0d
x86/xen: use xen_vcpu_id mapping for HYPERVISOR_vcpu_op

HYPERVISOR_vcpu_op() passes Linux's idea of vCPU id as a parameter
while Xen's idea is expected. In some cases these ideas diverge so we
need to do remapping.

Convert all callers of HYPERVISOR_vcpu_op() to use xen_vcpu_nr().

Leave xen_fill_possible_map() and xen_filter_cpu_maps() intact as
they're only being called by PV guests before perpu areas are
initialized. While the issue could be solved by switching to
early_percpu for xen_vcpu_id I think it's not worth it: PV guests will
probably never get to the point where their idea of vCPU id diverges
from Xen's.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit ad5475f9faf5186b7f59de2c6481ee3e211f1ed7)
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Orabug: 24820937

 Conflicts:
arch/x86/xen/enlighten.c
arch/x86/xen/time.c
arch/arm/xen/enlighten.c
arch/x86/xen/enlighten.c
arch/x86/xen/irq.c
arch/x86/xen/smp.c
arch/x86/xen/time.c
drivers/xen/events/events_base.c
drivers/xen/time.c