From: "Jan Beulich" <JBeulich@suse.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: xen-devel@lists.xenproject.org, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] xen: fix reboot with a PVH Dom0
Date: Thu, 05 Jun 2014 08:30:07 +0100 [thread overview]
Message-ID: <5390389F020000780001811B@mail.emea.novell.com> (raw)
In-Reply-To: <1401900473-43828-1-git-send-email-roger.pau@citrix.com>
>>> On 04.06.14 at 18:47, <roger.pau@citrix.com> wrote:
> The commit that introduced the clts and the FPU clearing (53a82f)
> notes that this is needed to workaround some broken BIOSes, but
> there's no mention about which specific BIOSes have this issue, so I'm
> uncertain if the following fix is appropiate, or if those broken
> BIOSes were only found on i386 hardware which Xen does no longer
> support.
We should be conservative here and hence don't leave the FPU in
a bad state. Which includes not leaving CR0.TS set, i.e. the fix you
suggest isn't the right one. Instead, how about simply making
__stop_this_cpu() call sync_local_execstate() before that FPU
handling (perhaps before anything) it does? Of course, a comment
should explain why this is needed, to avoid people wondering later
and suggesting its removal.
Otoh, it does call hvm_cpu_down(), so VMX code should be able to
know that it has no business doing anything anymore. I.e. as
Andrew already suggested, subsequent operations (__vmwrite()
for example) are bogus too considering that __vmxoff() already
happened. So perhaps the better thing would be to add an
unlikely(!this_cpu(vmxon)) check to vmx_ctxt_switch_from(). And
the same ought to be done to SVM, which shouldn't do any SVM
stuff after having cleared EFER.SVME (the whole change here
really is kind of PVH independent anyway, as the same problem
might surface if you shut down without first shutting down all
your guests).
Jan
prev parent reply other threads:[~2014-06-05 7:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 16:47 [PATCH] xen: fix reboot with a PVH Dom0 Roger Pau Monne
2014-06-04 16:54 ` Andrew Cooper
2014-06-05 7:30 ` Jan Beulich [this message]
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=5390389F020000780001811B@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=roger.pau@citrix.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 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).