All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH] x86/HVM: adjust hvm_interrupt_blocked()
Date: Fri, 12 Oct 2018 17:37:36 +0100	[thread overview]
Message-ID: <ed21e605-fd60-bdaf-0178-e6b173bd680c@citrix.com> (raw)
In-Reply-To: <5BC0C4B602000078001F1258@prv1-mh.provo.novell.com>

On 12/10/18 16:58, Jan Beulich wrote:
> First of all, hvm_intsrc_mce was not considered here at all, yet nothing
> blocks #MC (other than an already in-progress #MC, but dealing with this
> is not the purpose of this patch).

I don't believe we've got sufficient infrastructure to fix this
reasonably yet, but for the record, the real behaviour for MCEs is:

If intel
    broadcast to every thread covered by the MCE bank
else if AMD
    sent to the thread with the lowest id covered by the MCE bank

When trying to inject:

if !CR4.MCE or MCG_STATUS.MCIP
    shutdown

Furthermore, I believe even #MC is blocked by the MOVSS shadow, because
the purpose of the shadow is to indicate "my stack is not safe to take
an exception".

> Additionally STI-shadow only blocks maskable interrupts, but not NMI.

This has been discussed on LKML in the past, but `STI; HLT` will
deadlock if NMIs don't respect the STI shadow.

An NMI which hits that instruction boundary will IRET with IF clear, at
which point the core will halt and never wake up.

I believe the input from the vendor architects was that some very old
cores suffer from this problem, but anything you can get yours hand on
today will respect the STI shadow.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-10-12 16:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 15:58 [PATCH] x86/HVM: adjust hvm_interrupt_blocked() Jan Beulich
2018-10-12 16:37 ` Andrew Cooper [this message]
2018-10-25  9:10   ` Jan Beulich
2018-10-25 11:30   ` Jan Beulich
2018-10-26 12:56   ` Jan Beulich
2023-08-31 10:42 ` [Xen-devel] " Roger Pau Monné
2023-08-31 10:57   ` Roger Pau Monné
2023-09-04 13:40     ` Jan Beulich
2023-09-05 10:36       ` Roger Pau Monné
2023-09-04 13:55   ` Jan Beulich

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=ed21e605-fd60-bdaf-0178-e6b173bd680c@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=wei.liu2@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 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.