From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751230AbdJ1K4I (ORCPT ); Sat, 28 Oct 2017 06:56:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:39825 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750930AbdJ1K4G (ORCPT ); Sat, 28 Oct 2017 06:56:06 -0400 Date: Sat, 28 Oct 2017 12:55:46 +0200 From: Borislav Petkov To: Juergen Gross Cc: Vitaly Kuznetsov , Dou Liyang , linux-kernel@vger.kernel.org, x86@kernel.org, xen-devel@lists.xenproject.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, boris.ostrovsky@oracle.com, luto@kernel.org Subject: Re: [PATCH][tip] x86/paravirt: Make the virt_spin_lock_key setup after jump_label_init() Message-ID: <20171028105546.67mlbqfjv3g562v7@pd.tnic> References: <1509120120-5386-1-git-send-email-douly.fnst@cn.fujitsu.com> <87bmkszfeb.fsf@vitty.brq.redhat.com> <5c60e12c-1900-cf45-0db9-e5b67b0920d2@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5c60e12c-1900-cf45-0db9-e5b67b0920d2@suse.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 27, 2017 at 07:25:04PM +0200, Juergen Gross wrote: > >> This is assuming CPU 0 is the boot cpu. I think you want boot_cpu_data.cpu_index here or whatever is used on xen to identify the BSP reliably. > > > > It seems both PV and PVHVM call xen_init_lock_cpu(0) so 0 here is > > Linux's idea of CPU id, not Xen's. > > > > In case Xen's idea is needed xen_vcpu_id mapping should be used. But I > > don't think it's the case here. > > > > Correct. If it is Linux's idea of the BSP, then you need to check against boot_cpu_data.cpu_index. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --