dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0001-target-i386-add-missing-bits-to-CR4_RESERVED_MASK.patch

c52739
From 45adec566b073b39f4edfc1307843d12fe8105c8 Mon Sep 17 00:00:00 2001
c1a377
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
c1a377
Date: Tue, 31 Aug 2021 18:50:33 +0100
c52739
Subject: [PATCH 1/2] target/i386: add missing bits to CR4_RESERVED_MASK
c1a377
MIME-Version: 1.0
c1a377
Content-Type: text/plain; charset=UTF-8
c1a377
Content-Transfer-Encoding: 8bit
c1a377
c1a377
Booting Fedora kernels with -cpu max hangs very early in boot. Disabling
c1a377
the la57 CPUID bit fixes the problem. git bisect traced the regression to
c1a377
c1a377
  commit 213ff024a2f92020290296cb9dc29c2af3d4a221 (HEAD, refs/bisect/bad)
c1a377
  Author: Lara Lazier <laramglazier@gmail.com>
c1a377
  Date:   Wed Jul 21 17:26:50 2021 +0200
c1a377
c1a377
    target/i386: Added consistency checks for CR4
c1a377
c1a377
    All MBZ bits in CR4 must be zero. (APM2 15.5)
c1a377
    Added reserved bitmask and added checks in both
c1a377
    helper_vmrun and helper_write_crN.
c1a377
c1a377
    Signed-off-by: Lara Lazier <laramglazier@gmail.com>
c1a377
    Message-Id: <20210721152651.14683-2-laramglazier@gmail.com>
c1a377
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
c1a377
c1a377
In this commit CR4_RESERVED_MASK is missing CR4_LA57_MASK and
c1a377
two others. Adding this lets Fedora kernels boot once again.
c1a377
c1a377
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
c1a377
---
c1a377
 target/i386/cpu.h | 1 +
c1a377
 1 file changed, 1 insertion(+)
c1a377
c1a377
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
c1a377
index 6c50d3ab4f..ce85f1a29d 100644
c1a377
--- a/target/i386/cpu.h
c1a377
+++ b/target/i386/cpu.h
c1a377
@@ -257,6 +257,7 @@ typedef enum X86Seg {
c1a377
                 | CR4_DE_MASK | CR4_PSE_MASK | CR4_PAE_MASK \
c1a377
                 | CR4_MCE_MASK | CR4_PGE_MASK | CR4_PCE_MASK \
c1a377
                 | CR4_OSFXSR_MASK | CR4_OSXMMEXCPT_MASK |CR4_UMIP_MASK \
c1a377
+                | CR4_LA57_MASK | CR4_VMXE_MASK | CR4_SMXE_MASK \
c1a377
                 | CR4_FSGSBASE_MASK | CR4_PCIDE_MASK | CR4_OSXSAVE_MASK \
c1a377
                 | CR4_SMEP_MASK | CR4_SMAP_MASK | CR4_PKE_MASK | CR4_PKS_MASK))
c1a377
 
c1a377
-- 
c1a377
2.32.0
c1a377