#
a8b5c10c |
| 11-Jun-2025 |
Stefan Hajnoczi <stefanha@redhat.com> |
Merge tag 'hw-misc-20250610' of https://github.com/philmd/qemu into staging
Misc HW patches
# -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmhILpoACgkQ4+MsLN6t # wN
Merge tag 'hw-misc-20250610' of https://github.com/philmd/qemu into staging
Misc HW patches
# -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmhILpoACgkQ4+MsLN6t # wN4FxA//U3xm1ZJLQnlS+AQp31foxgptVTNej+ZGOfvhYaUSBtFgUhoiXMPJPN4v # pKWBAFgWigaeM9f01T7H55M+Pj0Az2QLZw+Z6Bklu9RjzisZSuIdMZkPWiJXHBFC # 6OMh6pIjyxuYwYltai8gFFP5ENuILETMpFHEfFQtMiAimXhvDKvcQ5Dmi08UcamQ # hOFdia1djmVYIwJCi+V6Mwl/jwql/L1JpBrLyVOFmxGW8p5ZOjJTLL6pC7288dTP # B8Nb9MhWZpbsHiU4GalTOEXQUuAEa/KX9ZhUqW6kLVhguiD5JoCeMhTur40sX+/J # kKl8dSOhHJ0axEII5PxO4XviN1LWC4DATKfXxHjzvwNbJRH4gdBgaf8zqCeuy0TM # 7pOLzyn6ARXoJZTftS9Ezm1MCdCT5eOQ3+YMrLId8M+KBatogJ8uFMRHa8j+khhB # M08FOufxQGQYZsnz9eb+Dexh+Z3/EiUrCJt1X5icJEQ4uwvoo6lwxVnaV1RWYjRX # EnQOvFr38rctDq3UIckBGzfuVmolEc3l/QgENsNb0AIsz0K2P11Xfg3SNnnPBST8 # duFsWD1/nR53wcKrRli0PMezcH/QuUkRqzBlOc2wllcVKJrp71+m2VDClCmH6bBF # gk03V84b96rWkxwrxFB05mOVmdJKxAFAnwRRfIfYp69r9RgHx4A= # =m3BF # -----END PGP SIGNATURE----- # gpg: Signature made Tue 10 Jun 2025 09:09:46 EDT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE
* tag 'hw-misc-20250610' of https://github.com/philmd/qemu: (24 commits) hw/net/i82596: Factor configure function out hw/net/i82596: Update datasheet URL hw/misc/stm32_rcc: Fix stm32_rcc_write() arguments order hw/riscv/riscv-iommu: Remove definition of RISCVIOMMU[Pci|Sys]Class hw/gpio/aspeed: Fix definition of AspeedGPIOClass hw/virtio/virtio-pmem: Fix definition of VirtIOPMEMClass hw/virtio/virtio-mem: Fix definition of VirtIOMEMClass tests/unit/test-char: Avoid using g_alloca() backends/tpm: Avoid using g_alloca() hw/gpio/pca9552: Avoid using g_newa() hw/core/cpu: Move CacheType to general cpu.h accel/hvf: Fix TYPE_HVF_ACCEL instance size tests/functional: Add a test for the Arduino UNO machine MAINTAINERS: Update Akihiko Odaki's affiliation pc-bios: ensure installed ROMs don't have execute permissions hw/ppc/e500: Use SysBusDevice API to access TYPE_CCSR's internal resources hw/net/fsl_etsec: Set default MAC address hw/ppc/e500: Move clock and TB frequency to machine class hw/hyperv/balloon: Consolidate OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES hw/core/resetcontainer: Consolidate OBJECT_DECLARE_SIMPLE_TYPE ...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
#
6cfe590c |
| 05-Jun-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel/hvf: Fix TYPE_HVF_ACCEL instance size
Fixes: c97d6d2cdf9 ("i386: hvf: add code base from Google repo") Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson
accel/hvf: Fix TYPE_HVF_ACCEL instance size
Fixes: c97d6d2cdf9 ("i386: hvf: add code base from Google repo") Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250606164418.98655-7-philmd@linaro.org>
show more ...
|
#
0af34b1d |
| 02-Apr-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
system/hvf: Avoid including 'cpu.h'
"system/hvf.h" doesn't need to include a full "cpu.h", only "exec/vaddr.h" and "qemu/queue.h" are required.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.
system/hvf: Avoid including 'cpu.h'
"system/hvf.h" doesn't need to include a full "cpu.h", only "exec/vaddr.h" and "qemu/queue.h" are required.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20250403235821.9909-27-philmd@linaro.org>
show more ...
|
#
32cad1ff |
| 03-Dec-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
include: Rename sysemu/ -> system/
Headers in include/sysemu/ are not only related to system *emulation*, they are also used by virtualization. Rename as system/ which is clearer.
Files renamed man
include: Rename sysemu/ -> system/
Headers in include/sysemu/ are not only related to system *emulation*, they are also used by virtualization. Rename as system/ which is clearer.
Files renamed manually then mechanical change using sed tool.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Message-Id: <20241203172445.28576-1-philmd@linaro.org>
show more ...
|
#
2c760670 |
| 13-Sep-2024 |
Danny Canter <danny_canter@apple.com> |
hvf: Split up hv_vm_create logic per arch
This is preliminary work to split up hv_vm_create logic per platform so we can support creating VMs with > 64GB of RAM on Apple Silicon machines. This is do
hvf: Split up hv_vm_create logic per arch
This is preliminary work to split up hv_vm_create logic per platform so we can support creating VMs with > 64GB of RAM on Apple Silicon machines. This is done via ARM HVF's hv_vm_config_create() (and other APIs that modify this config that will be coming in future patches). This should have no behavioral difference at all as hv_vm_config_create() just assigns the same default values as if you just passed NULL to the function.
Signed-off-by: Danny Canter <danny_canter@apple.com> Message-id: 20240828111552.93482-3-danny_canter@apple.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
a3c67dfc |
| 05-Jun-2024 |
Phil Dennis-Jordan <phil@philjordan.eu> |
hvf: Makes assert_hvf_ok report failed expression
When a macOS Hypervisor.framework call fails which is checked by assert_hvf_ok(), Qemu exits printing the error value, but not the location in the c
hvf: Makes assert_hvf_ok report failed expression
When a macOS Hypervisor.framework call fails which is checked by assert_hvf_ok(), Qemu exits printing the error value, but not the location in the code, as regular assert() macro expansions would.
This change turns assert_hvf_ok() into a macro similar to other assertions, which expands to a call to the corresponding _impl() function together with information about the expression that failed the assertion and its location in the code.
Additionally, stringifying the numeric hv_return_t code is factored into a helper function that can be reused for diagnostics and debugging outside of assertions.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Message-ID: <20240605112556.43193-8-phil@philjordan.eu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
f21f0cbc |
| 05-Jun-2024 |
Phil Dennis-Jordan <phil@philjordan.eu> |
hvf: Consistent types for vCPU handles
macOS Hypervisor.framework uses different types for identifying vCPUs, hv_vcpu_t or hv_vcpuid_t, depending on host architecture. They are not just differently
hvf: Consistent types for vCPU handles
macOS Hypervisor.framework uses different types for identifying vCPUs, hv_vcpu_t or hv_vcpuid_t, depending on host architecture. They are not just differently named typedefs for the same primitive type, but reference different-width integers.
Instead of using an integer type and casting where necessary, this change introduces a typedef which resolves the active architecture’s hvf typedef. It also removes a now-unnecessary cast.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Reviewed-by: Roman Bolshakov <roman@roolebo.dev> Tested-by: Roman Bolshakov <roman@roolebo.dev> Message-ID: <20240605112556.43193-4-phil@philjordan.eu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
e6203636 |
| 24-Apr-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel/hvf: Use accel-specific per-vcpu @dirty field
HVF has a specific use of the CPUState::vcpu_dirty field (CPUState::vcpu_dirty is not used by common code). To make this field accel-specific, add
accel/hvf: Use accel-specific per-vcpu @dirty field
HVF has a specific use of the CPUState::vcpu_dirty field (CPUState::vcpu_dirty is not used by common code). To make this field accel-specific, add and use a new @dirty variable in the AccelCPUState structure.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240424174506.326-4-philmd@linaro.org>
show more ...
|
#
3b295bcb |
| 21-Jun-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState
We want all accelerators to share the same opaque pointer in CPUState.
Rename the 'hvf_vcpu_state' structure as 'AccelCPUState'.
Use the
accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState
We want all accelerators to share the same opaque pointer in CPUState.
Rename the 'hvf_vcpu_state' structure as 'AccelCPUState'.
Use the generic 'accel' field of CPUState instead of 'hvf'.
Replace g_malloc0() by g_new0() for readability.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230624174121.11508-17-philmd@linaro.org>
show more ...
|
#
eb2edc42 |
| 06-Jun-2023 |
Francesco Cagnin <fcagnin@quarkslab.com> |
hvf: add guest debugging handlers for Apple Silicon hosts
Guests can now be debugged through the gdbstub. Support is added for single-stepping, software breakpoints, hardware breakpoints and watchpo
hvf: add guest debugging handlers for Apple Silicon hosts
Guests can now be debugged through the gdbstub. Support is added for single-stepping, software breakpoints, hardware breakpoints and watchpoints. The code has been structured like the KVM counterpart.
While guest debugging is enabled, the guest can still read and write the DBG*_EL1 registers but they don't have any effect.
Signed-off-by: Francesco Cagnin <fcagnin@quarkslab.com> Message-id: 20230601153107.81955-5-fcagnin@quarkslab.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
f4152040 |
| 06-Jun-2023 |
Francesco Cagnin <fcagnin@quarkslab.com> |
hvf: add breakpoint handlers
Required for guest debugging. The code has been structured like the KVM counterpart.
Signed-off-by: Francesco Cagnin <fcagnin@quarkslab.com> Message-id: 20230601153107.
hvf: add breakpoint handlers
Required for guest debugging. The code has been structured like the KVM counterpart.
Signed-off-by: Francesco Cagnin <fcagnin@quarkslab.com> Message-id: 20230601153107.81955-4-fcagnin@quarkslab.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
219c101f |
| 16-Sep-2021 |
Peter Collingbourne <pcc@google.com> |
arm/hvf: Add a WFI handler
Sleep on WFI until the VTIMER is due but allow ourselves to be woken up on IPI.
In this implementation IPI is blocked on the CPU thread at startup and pselect() is used t
arm/hvf: Add a WFI handler
Sleep on WFI until the VTIMER is due but allow ourselves to be woken up on IPI.
In this implementation IPI is blocked on the CPU thread at startup and pselect() is used to atomically unblock the signal and begin sleeping. The signal is sent unconditionally so there's no need to worry about races between actually sleeping and the "we think we're sleeping" state. It may lead to an extra wakeup but that's better than missing it entirely.
Signed-off-by: Peter Collingbourne <pcc@google.com> Signed-off-by: Alexander Graf <agraf@csgraf.de> Acked-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210916155404.86958-6-agraf@csgraf.de [agraf: Remove unused 'set' variable, always advance PC on WFX trap, support vm stop / continue operations and cntv offsets] Signed-off-by: Alexander Graf <agraf@csgraf.de> Acked-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Sergio Lopez <slp@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
a1477da3 |
| 16-Sep-2021 |
Alexander Graf <agraf@csgraf.de> |
hvf: Add Apple Silicon support
With Apple Silicon available to the masses, it's a good time to add support for driving its virtualization extensions from QEMU.
This patch adds all necessary archite
hvf: Add Apple Silicon support
With Apple Silicon available to the masses, it's a good time to add support for driving its virtualization extensions from QEMU.
This patch adds all necessary architecture specific code to get basic VMs working, including save/restore.
Known limitations:
- WFI handling is missing (follows in later patch) - No watchpoint/breakpoint support
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Sergio Lopez <slp@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20210916155404.86958-5-agraf@csgraf.de [PMM: added missing #include] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
ce7f5b1c |
| 16-Sep-2021 |
Alexander Graf <agraf@csgraf.de> |
hvf: Introduce hvf_arch_init() callback
We will need to install a migration helper for the ARM hvf backend. Let's introduce an arch callback for the overall hvf init chain to do so.
Signed-off-by:
hvf: Introduce hvf_arch_init() callback
We will need to install a migration helper for the ARM hvf backend. Let's introduce an arch callback for the overall hvf init chain to do so.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20210916155404.86958-4-agraf@csgraf.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
b533450e |
| 03-Jun-2021 |
Alexander Graf <agraf@csgraf.de> |
hvf: Introduce hvf vcpu struct
We will need more than a single field for hvf going forward. To keep the global vcpu struct uncluttered, let's allocate a special hvf vcpu struct, similar to how hax d
hvf: Introduce hvf vcpu struct
We will need more than a single field for hvf going forward. To keep the global vcpu struct uncluttered, let's allocate a special hvf vcpu struct, similar to how hax does it.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com> Tested-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210519202253.76782-12-agraf@csgraf.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
d662ede2 |
| 03-Jun-2021 |
Alexander Graf <agraf@csgraf.de> |
hvf: Remove hvf-accel-ops.h
We can move the definition of hvf_vcpu_exec() into our internal hvf header, obsoleting the need for hvf-accel-ops.h.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Revi
hvf: Remove hvf-accel-ops.h
We can move the definition of hvf_vcpu_exec() into our internal hvf header, obsoleting the need for hvf-accel-ops.h.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210519202253.76782-11-agraf@csgraf.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
cfe58455 |
| 03-Jun-2021 |
Alexander Graf <agraf@csgraf.de> |
hvf: Split out common code on vcpu init and destroy
Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To pr
hvf: Split out common code on vcpu init and destroy
Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To prepare for support for multiple architectures, let's start moving common code out into its own accel directory.
This patch splits the vcpu init and destroy functions into a generic and an architecture specific portion. This also allows us to move the generic functions into the generic hvf code, removing exported functions.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210519202253.76782-8-agraf@csgraf.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
3f965ef4 |
| 03-Jun-2021 |
Alexander Graf <agraf@csgraf.de> |
hvf: Make hvf_set_phys_mem() static
The hvf_set_phys_mem() function is only called within the same file. Make it static.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Sergio Lopez <s
hvf: Make hvf_set_phys_mem() static
The hvf_set_phys_mem() function is only called within the same file. Make it static.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210519202253.76782-6-agraf@csgraf.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
861457ce |
| 03-Jun-2021 |
Alexander Graf <agraf@csgraf.de> |
hvf: Move hvf internal definitions into common header
Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To
hvf: Move hvf internal definitions into common header
Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To prepare for support for multiple architectures, let's start moving common code out into its own accel directory.
This patch moves a few internal struct and constant defines over.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210519202253.76782-5-agraf@csgraf.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
358e7505 |
| 03-Jun-2021 |
Alexander Graf <agraf@csgraf.de> |
hvf: Move cpu functions into common directory
Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To prepare
hvf: Move cpu functions into common directory
Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To prepare for support for multiple architectures, let's start moving common code out into its own accel directory.
This patch moves CPU and memory operations over. While at it, make sure the code is consumable on non-i386 systems.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210519202253.76782-4-agraf@csgraf.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
d57bc3c1 |
| 03-Jun-2021 |
Alexander Graf <agraf@csgraf.de> |
hvf: Move assert_hvf_ok() into common directory
Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To prepar
hvf: Move assert_hvf_ok() into common directory
Until now, Hypervisor.framework has only been available on x86_64 systems. With Apple Silicon shipping now, it extends its reach to aarch64. To prepare for support for multiple architectures, let's start moving common code out into its own accel directory.
This patch moves assert_hvf_ok() and introduces generic build infrastructure.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210519202253.76782-2-agraf@csgraf.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|