From mboxrd@z Thu Jan 1 00:00:00 1970 From: julien.grall@citrix.com (Julien Grall) Date: Wed, 14 Oct 2015 23:32:45 +0100 Subject: [PATCH 3/3] xen/arm: don't try to re-register vcpu_info on cpu_hotplug. In-Reply-To: <1444844997-27314-3-git-send-email-stefano.stabellini@eu.citrix.com> References: <1444844997-27314-3-git-send-email-stefano.stabellini@eu.citrix.com> Message-ID: <561ED80D.9020905@citrix.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Stefano, On 14/10/2015 18:49, Stefano Stabellini wrote: > Signed-off-by: Stefano Stabellini > --- > arch/arm/xen/enlighten.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c > index 6c09cc4..59f5421 100644 > --- a/arch/arm/xen/enlighten.c > +++ b/arch/arm/xen/enlighten.c > @@ -93,6 +93,12 @@ static void xen_percpu_init(void) > int err; > int cpu = get_cpu(); > > + /* vcpu_info already registered, can happen with cpu-hotplug */ Can you please add more comment and explain in the commit message why this is necessary for cpu-hotplug? I had to look at the x86 code to fully understand that it's not possible to call VCPUOP_register_vcpu_info twice because there is no hypercall to remove the vcpu shared page. > + if (per_cpu(xen_vcpu, cpu) != NULL) { > + put_cpu(); > + return; > + } > + > pr_info("Xen: initializing cpu%d\n", cpu); > vcpup = per_cpu_ptr(xen_vcpu_info, cpu); > > Regards, -- Julien Grall From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 3/3] xen/arm: don't try to re-register vcpu_info on cpu_hotplug. Date: Wed, 14 Oct 2015 23:32:45 +0100 Message-ID: <561ED80D.9020905@citrix.com> References: <1444844997-27314-3-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1444844997-27314-3-git-send-email-stefano.stabellini@eu.citrix.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Stefano Stabellini , xen-devel@lists.xensource.com Cc: linux-arm-kernel@lists.infradead.org List-Id: xen-devel@lists.xenproject.org Hi Stefano, On 14/10/2015 18:49, Stefano Stabellini wrote: > Signed-off-by: Stefano Stabellini > --- > arch/arm/xen/enlighten.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c > index 6c09cc4..59f5421 100644 > --- a/arch/arm/xen/enlighten.c > +++ b/arch/arm/xen/enlighten.c > @@ -93,6 +93,12 @@ static void xen_percpu_init(void) > int err; > int cpu = get_cpu(); > > + /* vcpu_info already registered, can happen with cpu-hotplug */ Can you please add more comment and explain in the commit message why this is necessary for cpu-hotplug? I had to look at the x86 code to fully understand that it's not possible to call VCPUOP_register_vcpu_info twice because there is no hypercall to remove the vcpu shared page. > + if (per_cpu(xen_vcpu, cpu) != NULL) { > + put_cpu(); > + return; > + } > + > pr_info("Xen: initializing cpu%d\n", cpu); > vcpup = per_cpu_ptr(xen_vcpu_info, cpu); > > Regards, -- Julien Grall