qemu-e2k/target/i386/hvf
Philippe Mathieu-Daudé ee1004bba6 bulk: Access existing variables initialized to &S->F when available
When a variable is initialized to &struct->field, use it
in place. Rationale: while this makes the code more concise,
this also helps static analyzers.

Mechanical change using the following Coccinelle spatch script:

 @@
 type S, F;
 identifier s, m, v;
 @@
      S *s;
      ...
      F *v = &s->m;
      <+...
 -    &s->m
 +    v
      ...+>

Inspired-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240129164514.73104-2-philmd@linaro.org>
Acked-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
[thuth: Dropped hunks that need a rebase, and fixed sizeof() in pmu_realize()]
Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-03-12 11:46:16 +01:00
..
hvf-cpu.c sysemu/kvm: Restrict hvf_get_supported_cpuid() to x86 targets 2023-10-07 19:02:32 +02:00
hvf-i386.h sysemu/kvm: Restrict hvf_get_supported_cpuid() to x86 targets 2023-10-07 19:02:32 +02:00
hvf.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
panic.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
README.md system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
vmcs.h hvf: Enable RDTSCP support 2022-07-13 00:05:39 +02:00
vmx.h accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState 2023-06-28 14:14:22 +02:00
x86_cpuid.c sysemu/kvm: Restrict hvf_get_supported_cpuid() to x86 targets 2023-10-07 19:02:32 +02:00
x86_decode.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
x86_decode.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_descr.c accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState 2023-06-28 14:14:22 +02:00
x86_descr.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_emu.c target/i386/hvf: Rename 'X86CPU *x86_cpu' variable as 'cpu' 2023-11-07 12:13:27 +01:00
x86_emu.h target/i386/hvf: Use env_archcpu() in simulate_[rdmsr/wrmsr]() 2023-11-07 12:13:27 +01:00
x86_flags.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
x86_flags.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_mmu.c accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState 2023-06-28 14:14:22 +02:00
x86_mmu.h x86 hvf cpus: Fix Lesser GPL version number 2020-11-15 16:45:27 +01:00
x86_task.c accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState 2023-06-28 14:14:22 +02:00
x86_task.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
x86.c accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState 2023-06-28 14:14:22 +02:00
x86.h hvf: Use standard CR0 and CR4 register definitions 2022-03-15 13:36:33 +01:00
x86hvf.c bulk: Access existing variables initialized to &S->F when available 2024-03-12 11:46:16 +01:00
x86hvf.h accel: Rename 'cpu_state' -> 'cs' 2023-06-28 13:55:35 +02:00

OS X Hypervisor.framework support in QEMU

These sources (and ../hvf-all.c) are adapted from Veertu Inc's vdhh (Veertu Desktop Hosted Hypervisor) (last known location: https://github.com/veertuinc/vdhh) with some minor changes, the most significant of which were:

  1. Adapt to our current QEMU's CPUState structure and address_space_rw API; many struct members have been moved around (emulated x86 state, xsave_buf) due to historical differences + QEMU needing to handle more emulation targets.
  2. Removal of apic_page and hyperv-related functionality.
  3. More relaxed use of bql_lock.