[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 0/3] hvf: Support AVX512 guests and cleanup
From: |
Cameron Esfahani |
Subject: |
[PATCH v1 0/3] hvf: Support AVX512 guests and cleanup |
Date: |
Mon, 30 Mar 2020 17:16:03 -0700 |
HVF had its own copy of the CR0 and CR4 register definitions. Remove
them in favor of the definitions in target/i386/cpu.h.
Change long mode enter and exit code to be clearer.
Support AVX512 guests on capable hardware. This involves two separate
changes:
- Correctly manage the OSXSAVE bit in CPUID[0x01]. cpu_x86_cpuid()
attempts to account for OSXSAVE, but it refers to env->cr[4] for the
guest copy of CR4. That field isn't up to date under HVF. Instead,
we track OSXSAVE separately, by adding OSXSAVE to CR4 mask and saving
the state. Then, when handling CPUID[0x01] in EXIT_REASON_CPUID, we
reflect the current state of CR4[OSXSAVE].
- macOS lazily enables AVX512 for processes. Explicitly enable AVX512
for QEMU.
With these two changes, guests can correctly detect and enable AVX512.
Cameron Esfahani (3):
hvf: use standard CR0 and CR4 register definitions
hvf: Make long mode enter and exit code clearer.
hvf: Support AVX512 guests on capable hardware
target/i386/cpu.h | 3 ++
target/i386/hvf/hvf.c | 69 ++++++++++++++++++++++++++++++++++++--
target/i386/hvf/vmx.h | 32 ++++++++++++------
target/i386/hvf/x86.c | 6 ++--
target/i386/hvf/x86.h | 34 -------------------
target/i386/hvf/x86_mmu.c | 2 +-
target/i386/hvf/x86_task.c | 3 +-
target/i386/hvf/x86hvf.c | 2 +-
8 files changed, 98 insertions(+), 53 deletions(-)
--
2.24.0
- [PATCH v1 0/3] hvf: Support AVX512 guests and cleanup,
Cameron Esfahani <=