From: Juergen Gross <jgross@suse.com>
To: Borislav Petkov <bp@suse.de>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
Dou Liyang <douly.fnst@cn.fujitsu.com>,
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()
Date: Sun, 29 Oct 2017 13:15:34 +0100 [thread overview]
Message-ID: <f676b7cc-8619-6288-9c80-a652dce972ec@suse.com> (raw)
In-Reply-To: <20171028105546.67mlbqfjv3g562v7@pd.tnic>
On 28/10/17 12:55, Borislav Petkov wrote:
> 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.
The idea is to set the static key on the first call of
xen_init_lock_cpu(). As this first call is done with 0 as parameter
the correct check is against 0.
Juergen
next prev parent reply other threads:[~2017-10-29 12:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 16:02 Dou Liyang
2017-10-27 16:52 ` Boris Petkov
2017-10-27 17:09 ` Vitaly Kuznetsov
2017-10-27 17:25 ` Juergen Gross
2017-10-28 10:55 ` Borislav Petkov
2017-10-29 12:15 ` Juergen Gross [this message]
2017-10-27 17:27 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f676b7cc-8619-6288-9c80-a652dce972ec@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@suse.de \
--cc=douly.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®