From: Paolo Bonzini <pbonzini@redhat.com>
To: Nadav Amit <namit@cs.technion.ac.il>, bsd@redhat.com, joro@8bytes.org
Cc: kvm@vger.kernel.org, Yang Zhang <yang.z.zhang@intel.com>
Subject: Re: [PATCH v3] KVM: x86: INIT and reset sequences are different
Date: Thu, 1 Oct 2015 14:55:00 +0200 [thread overview]
Message-ID: <560D2D24.9090805@redhat.com> (raw)
In-Reply-To: <1428924848-28212-1-git-send-email-namit@cs.technion.ac.il>
On 13/04/2015 13:34, Nadav Amit wrote:
> x86 architecture defines differences between the reset and INIT sequences.
> INIT does not initialize the FPU (including MMX, XMM, YMM, etc.), TSC, PMU,
> MSRs (in general), MTRRs machine-check, APIC ID, APIC arbitration ID and BSP.
>
> References (from Intel SDM):
>
> "If the MP protocol has completed and a BSP is chosen, subsequent INITs (either
> to a specific processor or system wide) do not cause the MP protocol to be
> repeated." [8.4.2: MP Initialization Protocol Requirements and Restrictions]
>
> [Table 9-1. IA-32 Processor States Following Power-up, Reset, or INIT]
>
> "If the processor is reset by asserting the INIT# pin, the x87 FPU state is not
> changed." [9.2: X87 FPU INITIALIZATION]
>
> "The state of the local APIC following an INIT reset is the same as it is after
> a power-up or hardware reset, except that the APIC ID and arbitration ID
> registers are not affected." [10.4.7.3: Local APIC State After an INIT Reset
> (“Wait-for-SIPI” State)]
>
> Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
>
> ---
>
> v3:
>
> - Leave EFER unchanged on INIT. Instead, set cr0 correctly so vmx_set_cr0 would
> recognize that paging was changed from on to off and clear LMA.
I wonder if this change from v2 to v3 was correct.
It means that a 32-bit firmware cannot enter paging mode without
clearing EFER.LME first (which it should not know about).
Yang, can you check what real hardware does to EFER on an INIT? Perhaps
it only clears EFER.LME (in addition of course to EFER.LMA, which is
cleared as a side effect of writing CR0).
Thanks,
Paolo
next prev parent reply other threads:[~2015-10-01 12:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 11:34 [PATCH v3] KVM: x86: INIT and reset sequences are different Nadav Amit
2015-04-13 14:45 ` Paolo Bonzini
2015-10-01 12:55 ` Paolo Bonzini [this message]
2015-10-09 8:06 ` Zhang, Yang Z
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=560D2D24.9090805@redhat.com \
--to=pbonzini@redhat.com \
--cc=bsd@redhat.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=namit@cs.technion.ac.il \
--cc=yang.z.zhang@intel.com \
/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).