From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Kevin Tian <kevin.tian@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH 2/2] x86: package up context switch hook pointers
Date: Wed, 15 Feb 2017 04:40:08 -0700 [thread overview]
Message-ID: <58A44C28020000780013A2E5@prv-mh.provo.novell.com> (raw)
In-Reply-To: <9ff37f11-2720-e730-0376-aebfd347eb78@citrix.com>
>>> On 15.02.17 at 12:34, <andrew.cooper3@citrix.com> wrote:
> On 15/02/17 08:42, Jan Beulich wrote:
>>>>> On 14.02.17 at 16:26, <andrew.cooper3@citrix.com> wrote:
>>> On 14/02/17 10:29, Jan Beulich wrote:
>>>> @@ -2066,6 +2073,15 @@ static void __context_switch(void)
>>>> per_cpu(curr_vcpu, cpu) = n;
>>>> }
>>>>
>>>> +/*
>>>> + * Schedule tail *should* be a terminal function pointer, but leave a
> bugframe
>>>> + * around just incase it returns, to save going back into the context
>>>> + * switching code and leaving a far more subtle crash to diagnose.
>>>> + */
>>>> +#define schedule_tail(vcpu) do { \
>>>> + (((vcpu)->domain->arch.ctxt_switch->tail)(vcpu)); \
>>>> + BUG(); \
>>>> + } while (0)
>>> schedule_tail() is used only twice. I'd suggest dropping it entirely
>>> and calling the ->tail() function pointer normally, rather than hiding
>>> it this.
>> I had considered this too, and now that you ask for it I'll happily
>> do so.
>
> Thinking more, it would be a good idea to annotate the respective
> functions noreturn, so the compiler will catch anyone who accidently
> puts a return statement in.
Right, but in another patch I would say.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-02-15 11:40 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 10:23 [PATCH 0/2] x86: context switch handling adjustments Jan Beulich
2017-02-14 10:28 ` [PATCH 1/2] VMX: fix VMCS race on context-switch paths Jan Beulich
2017-02-14 15:16 ` Andrew Cooper
2017-02-15 8:37 ` Jan Beulich
2017-02-15 11:29 ` Andrew Cooper
2017-02-15 10:27 ` Sergey Dyasli
2017-02-15 11:00 ` Jan Beulich
2017-02-15 11:13 ` Sergey Dyasli
2017-02-15 11:24 ` Jan Beulich
2017-02-15 11:39 ` Jan Beulich
2017-02-15 11:48 ` Sergey Dyasli
2017-02-15 11:55 ` Jan Beulich
2017-02-15 13:03 ` Jan Beulich
2017-02-15 13:40 ` Sergey Dyasli
2017-02-15 14:29 ` Jan Beulich
2017-02-15 14:44 ` Jan Beulich
2017-02-15 13:20 ` Jan Beulich
2017-02-15 14:55 ` Sergey Dyasli
2017-02-15 15:15 ` Jan Beulich
2017-02-16 8:29 ` Sergey Dyasli
2017-02-16 9:26 ` Jan Beulich
2017-02-14 10:29 ` [PATCH 2/2] x86: package up context switch hook pointers Jan Beulich
2017-02-14 15:26 ` Andrew Cooper
2017-02-15 8:42 ` Jan Beulich
2017-02-15 11:34 ` Andrew Cooper
2017-02-15 11:40 ` Jan Beulich [this message]
2017-02-14 22:18 ` Boris Ostrovsky
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=58A44C28020000780013A2E5@prv-mh.provo.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=suravee.suthikulpanit@amd.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.