[PATCH 0/4] target/i386: fix position of accel_cpu_instance_init

Paolo Bonzini posted 4 patches 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250711000603.438312-1-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Zhao Liu <zhao1.liu@intel.com>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>, Marcelo Tosatti <mtosatti@redhat.com>, Reinoud Zandijk <reinoud@netbsd.org>, Sunil Muthuswamy <sunilmut@microsoft.com>
target/i386/cpu.h           |  2 +-
target/i386/cpu.c           | 41 ++++++++++++++++++++++---------------
target/i386/hvf/hvf-cpu.c   |  3 ++-
target/i386/kvm/kvm-cpu.c   |  7 +++++--
target/i386/nvmm/nvmm-all.c | 23 +++++++++++++++++++++
target/i386/whpx/whpx-all.c | 23 +++++++++++++++++++++
6 files changed, 78 insertions(+), 21 deletions(-)
[PATCH 0/4] target/i386: fix position of accel_cpu_instance_init
Posted by Paolo Bonzini 5 months ago
With the reordering of instance_post_init callbacks that is new in 10.1
accel_cpu_instance_init must execute in .instance_init as is already
the case for RISC-V.  Otherwise, for example, setting the vendor
property is broken when using KVM or Hypervisor.framework.

Adjust x86 code to allow this movement, and perform it in patch 4.

Paolo

Paolo Bonzini (4):
  target/i386: move max_features to class
  target/i386: nvmm, whpx: add accel/CPU class that sets host vendor
  target/i386: allow reordering max_x86_cpu_initfn vs accel CPU init
  target/i386: move accel_cpu_instance_init to .instance_init

 target/i386/cpu.h           |  2 +-
 target/i386/cpu.c           | 41 ++++++++++++++++++++++---------------
 target/i386/hvf/hvf-cpu.c   |  3 ++-
 target/i386/kvm/kvm-cpu.c   |  7 +++++--
 target/i386/nvmm/nvmm-all.c | 23 +++++++++++++++++++++
 target/i386/whpx/whpx-all.c | 23 +++++++++++++++++++++
 6 files changed, 78 insertions(+), 21 deletions(-)

-- 
2.50.0