From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Jürgen Groß" <jgross@suse.com>, "Jan Beulich" <jbeulich@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Stefano Stabellini <sstabellini@kernel.org>,
<linux-kernel@vger.kernel.org>, <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 6/7] xen/evtch: use smp barriers for user event ring
Date: Mon, 8 Feb 2021 10:31:33 +0000 [thread overview]
Message-ID: <bac45a67-087b-636f-3a74-db266f970cda@citrix.com> (raw)
In-Reply-To: <60ca5c18-bbf5-5d3d-1af6-f4692077c44e@suse.com>
On 08/02/2021 10:25, Jürgen Groß wrote:
> On 08.02.21 11:23, Andrew Cooper wrote:
>> On 08/02/2021 09:50, Jan Beulich wrote:
>>> On 08.02.2021 10:44, Andrew Cooper wrote:
>>>> On 06/02/2021 10:49, Juergen Gross wrote:
>>>>> The ring buffer for user events is used in the local system only, so
>>>>> smp barriers are fine for ensuring consistency.
>>>>>
>>>>> Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>> These need to be virt_* to not break in UP builds (on non-x86).
>>> Initially I though so, too, but isn't the sole vCPU of such a
>>> VM getting re-scheduled to a different pCPU in the hypervisor
>>> an implied barrier anyway?
>>
>> Yes, but that isn't relevant to why UP builds break.
>>
>> smp_*() degrade to compiler barriers in UP builds, and while that's
>> mostly fine for x86 read/write, its not fine for ARM barriers.
>>
>> virt_*() exist specifically to be smp_*() which don't degrade to broken
>> in UP builds.
>
> But the barrier is really only necessary to serialize accesses within
> the guest against each other. There is no guest outside party involved.
>
> In case you are right this would mean that UP guests are all broken on
> Arm.
Oh - right. This is a ring between the interrupt handler and a task.
Not a ring between the guest and something else.
In which case smp_*() are correct. Sorry for the noise.
~Andrew
next prev parent reply other threads:[~2021-02-08 10:42 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-06 10:49 [PATCH 0/7] xen/events: bug fixes and some diagnostic aids Juergen Gross
2021-02-06 10:49 ` [PATCH 1/7] xen/events: reset affinity of 2-level event initially Juergen Gross
2021-02-06 11:20 ` Julien Grall
2021-02-06 12:09 ` Jürgen Groß
2021-02-06 12:19 ` Julien Grall
2021-02-06 10:49 ` [PATCH 2/7] xen/events: don't unmask an event channel when an eoi is pending Juergen Gross
2021-02-08 10:06 ` Jan Beulich
2021-02-08 10:21 ` Jürgen Groß
2021-02-08 10:15 ` Ross Lagerwall
2021-02-06 10:49 ` [PATCH 3/7] xen/events: fix lateeoi irq acknowledgment Juergen Gross
2021-02-06 10:49 ` [PATCH 4/7] xen/events: link interdomain events to associated xenbus device Juergen Gross
2021-02-08 23:26 ` Boris Ostrovsky
2021-02-09 13:55 ` Wei Liu
2021-02-06 10:49 ` [PATCH 5/7] xen/events: add per-xenbus device event statistics and settings Juergen Gross
2021-02-08 23:35 ` Boris Ostrovsky
2021-02-06 10:49 ` [PATCH 6/7] xen/evtch: use smp barriers for user event ring Juergen Gross
2021-02-08 9:38 ` Jan Beulich
2021-02-08 9:41 ` Jürgen Groß
2021-02-08 9:44 ` Andrew Cooper
2021-02-08 9:50 ` Jan Beulich
2021-02-08 10:23 ` Andrew Cooper
2021-02-08 10:25 ` Jürgen Groß
2021-02-08 10:31 ` Andrew Cooper [this message]
2021-02-08 10:36 ` Jan Beulich
2021-02-08 10:45 ` Andrew Cooper
2021-02-06 10:49 ` [PATCH 7/7] xen/evtchn: read producer index only once Juergen Gross
2021-02-08 9:48 ` Jan Beulich
2021-02-08 10:41 ` Jürgen Groß
2021-02-08 10:51 ` Jan Beulich
2021-02-08 10:59 ` Jürgen Groß
2021-02-08 11:50 ` Julien Grall
2021-02-08 11:54 ` Jan Beulich
2021-02-08 12:15 ` Jürgen Groß
2021-02-08 12:23 ` Jan Beulich
2021-02-08 12:26 ` Jürgen Groß
2021-02-08 11:40 ` Julien Grall
2021-02-08 11:48 ` Jürgen Groß
2021-02-08 12:03 ` Julien Grall
2021-02-06 18:46 ` [PATCH 0/7] xen/events: bug fixes and some diagnostic aids Julien Grall
2021-02-07 12:58 ` Jürgen Groß
2021-02-08 9:11 ` Julien Grall
2021-02-08 9:41 ` Jürgen Groß
2021-02-08 9:54 ` Julien Grall
2021-02-08 10:22 ` Jürgen Groß
2021-02-08 10:40 ` Julien Grall
2021-02-08 12:14 ` Jürgen Groß
2021-02-08 12:16 ` Julien Grall
2021-02-08 12:31 ` Jürgen Groß
2021-02-08 13:09 ` Julien Grall
2021-02-08 13:58 ` Jürgen Groß
2021-02-08 14:20 ` Julien Grall
2021-02-08 14:35 ` Julien Grall
2021-02-08 14:50 ` Jürgen Groß
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=bac45a67-087b-636f-3a74-db266f970cda@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sstabellini@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