[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5773BFDA.1090706@citrix.com>
Date: Wed, 29 Jun 2016 13:32:26 +0100
From: David Vrabel <david.vrabel@...rix.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>,
<xen-devel@...ts.xenproject.org>
CC: Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>, <x86@...nel.org>,
<linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...hat.com>,
David Vrabel <david.vrabel@...rix.com>,
"H. Peter Anvin" <hpa@...or.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [Xen-devel] [PATCH linux 4/8] x86/xen: use xen_vcpu_id mapping
when pointing vcpu_info to the shared_info page
On 28/06/16 17:47, Vitaly Kuznetsov wrote:
> shared_info page has space for 32 vcpu info slots for first 32 vCPUs but
> these are the first 32 vCPUs from Xen's perspective and we should map them
> accordingly with the newly introduced xen_vcpu_id mapping.
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
> ---
> arch/x86/xen/enlighten.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 69f4c0c..1596626 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -189,6 +189,7 @@ static void xen_vcpu_setup(int cpu)
> struct vcpu_register_vcpu_info info;
> int err;
> struct vcpu_info *vcpup;
> + int xen_cpu = per_cpu(xen_vcpu_id, cpu);
I think there should be a
static inline int xen_vcpu_nr(int cpu)
{
return per_cpu(xen_vcpu_id, cpu);
}
helper function.
David
Powered by blists - more mailing lists