From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Juergen Gross <jgross@suse.com>,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Cc: Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH v2] xen/events: remove event handling recursion detection
Date: Thu, 28 Nov 2019 16:37:27 -0500 [thread overview]
Message-ID: <b0a86e66-2366-ff94-e867-2fc5cfdae38d@oracle.com> (raw)
In-Reply-To: <20191128084545.13831-1-jgross@suse.com>
On 11/28/19 3:45 AM, Juergen Gross wrote:
> -
> static void __xen_evtchn_do_upcall(void)
> {
> struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
> - int cpu = get_cpu();
> - unsigned count;
> + int cpu = smp_processor_id();
>
> do {
> vcpu_info->evtchn_upcall_pending = 0;
>
> - if (__this_cpu_inc_return(xed_nesting_count) - 1)
> - goto out;
> -
> xen_evtchn_handle_events(cpu);
>
> BUG_ON(!irqs_disabled());
>
> - count = __this_cpu_read(xed_nesting_count);
> - __this_cpu_write(xed_nesting_count, 0);
> - } while (count != 1 || vcpu_info->evtchn_upcall_pending);
> -
> -out:
> + rmb(); /* Hypervisor can set upcall pending. */
virt_rmb() perhaps then?
-boris
>
> - put_cpu();
> + } while (vcpu_info->evtchn_upcall_pending);
> }
>
> void xen_evtchn_do_upcall(struct pt_regs *regs)
next prev parent reply other threads:[~2019-11-28 21:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 8:45 [PATCH v2] xen/events: remove event handling recursion detection Juergen Gross
2019-11-28 21:37 ` Boris Ostrovsky [this message]
2019-11-29 5:59 ` 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=b0a86e66-2366-ff94-e867-2fc5cfdae38d@oracle.com \
--to=boris.ostrovsky@oracle.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;
as well as URLs for NNTP newsgroup(s).