From: "Richard W.M. Jones" <rjones@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PULL v2 01/36] target/i386: add missing bits to CR4_RESERVED_MASK
Date: Mon, 6 Sep 2021 16:55:40 +0100 [thread overview]
Message-ID: <20210906155540.GT26415@redhat.com> (raw)
In-Reply-To: <20210906152657.72046-2-pbonzini@redhat.com>
On Mon, Sep 06, 2021 at 05:26:57PM +0200, Paolo Bonzini wrote:
> From: Daniel P. Berrangé <berrange@redhat.com>
>
> Booting Fedora kernels with -cpu max hangs very early in boot. Disabling
> the la57 CPUID bit fixes the problem. git bisect traced the regression to
>
> commit 213ff024a2f92020290296cb9dc29c2af3d4a221 (HEAD, refs/bisect/bad)
> Author: Lara Lazier <laramglazier@gmail.com>
> Date: Wed Jul 21 17:26:50 2021 +0200
>
> target/i386: Added consistency checks for CR4
>
> All MBZ bits in CR4 must be zero. (APM2 15.5)
> Added reserved bitmask and added checks in both
> helper_vmrun and helper_write_crN.
>
> Signed-off-by: Lara Lazier <laramglazier@gmail.com>
> Message-Id: <20210721152651.14683-2-laramglazier@gmail.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>
> In this commit CR4_RESERVED_MASK is missing CR4_LA57_MASK and
> two others. Adding this lets Fedora kernels boot once again.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> Tested-by: Richard W.M. Jones <rjones@redhat.com>
I tested it again and it still works:
$ LIBGUESTFS_BACKEND_SETTINGS=force_tcg LIBGUESTFS_HV=$PWD/qemu-system-x86_64 libguestfs-test-tool
...
===== TEST FINISHED OK =====
(versus without the patch where it appears to hang in very early kernel)
Rich.
> Message-Id: <20210831175033.175584-1-berrange@redhat.com>
> [Removed VMXE/SMXE, matching the commit message. - Paolo]
> Fixes: 213ff024a2 ("target/i386: Added consistency checks for CR4", 2021-07-22)
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> target/i386/cpu.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> index 6c50d3ab4f..21b33fbe2e 100644
> --- a/target/i386/cpu.h
> +++ b/target/i386/cpu.h
> @@ -257,6 +257,7 @@ typedef enum X86Seg {
> | CR4_DE_MASK | CR4_PSE_MASK | CR4_PAE_MASK \
> | CR4_MCE_MASK | CR4_PGE_MASK | CR4_PCE_MASK \
> | CR4_OSFXSR_MASK | CR4_OSXMMEXCPT_MASK |CR4_UMIP_MASK \
> + | CR4_LA57_MASK \
> | CR4_FSGSBASE_MASK | CR4_PCIDE_MASK | CR4_OSXSAVE_MASK \
> | CR4_SMEP_MASK | CR4_SMAP_MASK | CR4_PKE_MASK | CR4_PKS_MASK))
>
> --
> 2.31.1
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
next prev parent reply other threads:[~2021-09-06 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 15:26 [PULL v2 00/36] (Mostly) x86 changes for 2021-09-06 Paolo Bonzini
2021-09-06 15:26 ` [PULL v2 01/36] target/i386: add missing bits to CR4_RESERVED_MASK Paolo Bonzini
2021-09-06 15:55 ` Richard W.M. Jones [this message]
2021-09-06 15:45 ` [PULL v2 00/36] (Mostly) x86 changes for 2021-09-06 Peter Maydell
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=20210906155540.GT26415@redhat.com \
--to=rjones@redhat.com \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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).