[PATCH qemu 7/7] hvf: use GTree to store memory slots instead of fixed-size array

2022-02-28 Thread ~ubzeme
From: Yan-Jie Wang Currently, there are only 32 memory slots in the fixed size array. It is not scalable. Instead of using fixed size array, use GTree (from glib library) and dynamically-allocated structures to store memory slots. Signed-off-by: Yan-Jie Wang --- accel/hvf/hvf-mem.c | 63 ++

[PATCH qemu 5/7] hvf: fix memory dirty-tracking

2022-02-28 Thread ~ubzeme
From: Yan-Jie Wang Dirty-tracking in HVF is not properly implemented. On Intel Macs, Ubuntu ISO boot menu does not show properly. On Apple Silicon, using bochs-display may cause the guest crashes because the guest may uses load/store instructions on framebuffer which causes vmexits and the exce

[PATCH qemu 0/7] Many improvements to HVF memory-related codes

2022-02-28 Thread ~ubzeme
I recently bought a Mac with M1 Pro chip, and use QEMU to setup a Linux virtual machine. QEMU crashed when I started a VM with HVF accelerator enabled and with the device, bochs-display, added. After digging into the source code, I found that dirty-tracking in HVF did not work properly, which mad

[PATCH qemu 1/7] hvf: move memory related functions from hvf-accel-ops.c to hvf-mem.c

2022-02-28 Thread ~ubzeme
From: Yan-Jie Wang Signed-off-by: Yan-Jie Wang --- accel/hvf/hvf-accel-ops.c | 220 + accel/hvf/hvf-mem.c | 252 ++ accel/hvf/meson.build | 1 + include/sysemu/hvf_int.h | 2 + 4 files changed, 256 insertions(+),

[PATCH qemu-web] move 'clear: both;' in #footer from 'style-desktop.css' to 'style.css'

2022-02-28 Thread ~ubzeme
From: Yan-Jie Wang This fixes the mobile version of the website. Resolves: https://gitlab.com/qemu-project/qemu-web/-/issues/5 Signed-off-by: Yan-Jie Wang --- assets/css/style-desktop.css | 9 - assets/css/style.css | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff -

[PATCH qemu 4/7] hvf: rename struct hvf_slot to HVFSlot

2022-02-28 Thread ~ubzeme
From: Yan-Jie Wang Follow the QEMU coding style. Structured type names are in CamelCase. Signed-off-by: Yan-Jie Wang --- accel/hvf/hvf-mem.c | 14 +++--- include/sysemu/hvf_int.h | 8 target/i386/hvf/hvf.c| 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-)

[PATCH qemu 3/7] hvf: use correct data types for addresses in memory related functions

2022-02-28 Thread ~ubzeme
From: Yan-Jie Wang Follow the QEMU coding style. Use hwaddr for guest physical address. Signed-off-by: Yan-Jie Wang --- accel/hvf/hvf-mem.c | 2 +- include/sysemu/hvf_int.h | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/accel/hvf/hvf-mem.c b/accel/hvf/hvf-mem

[PATCH qemu 2/7] hvf: simplify data structures and codes of memory related functions

2022-02-28 Thread ~ubzeme
From: Yan-Jie Wang * Remove mac_slot and use hvf_slot only. The function of the two structures are similar. * Refactor function hvf_set_phys_mem(): - Remove unnecessary checks because any modified memory sections will be removed first (region_del called first) before being added. Theref

[PATCH qemu 6/7] hvf: add a lock for memory related functions

2022-02-28 Thread ~ubzeme
From: Yan-Jie Wang We follow how KVM accel does in its memory listener (kvm-all.c) and add a lock for the memory related functions. Signed-off-by: Yan-Jie Wang --- accel/hvf/hvf-mem.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/accel/hvf/hvf-mem.c b/accel/hvf/hvf-me