[PATCH] ppc/spapr: Fix ubsan warning with unaligned pointer access

2023-12-16 Thread Daniel Hoffman
Found while running QTest with UBsan. Unaligned pointers appear to be valid, so moving the read to an explicit memcpy to an intermediate. --- hw/ppc/vof.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c index e3b430a81f4..609a51c645d 100644 ---

[PATCH] hw/core: define stack variable to NULL to fix qtest with sanitizers

2023-11-23 Thread Daniel Hoffman
This was the only failure preventing `make check` from passing with sanitizers enabled on my configuration. Signed-off-by: Daniel Hoffman --- hw/core/qdev-properties.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index

[PATCH v3] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-19 Thread Daniel Hoffman
be the first term) and this was causing some builds to emit references to undefined symbols. An example of such a configuration is clang 16.0.6 with the following configure: ./configure --enable-debug --without-default-features --target-list=x86_64-softmmu --enable-tcg-interpreter Signed-off-by: Daniel

[PATCH v2] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-19 Thread Daniel Hoffman
be the first term) and this was causing some builds to emit references to undefined symbols. Signed-off-by: Daniel Hoffman --- hw/i386/x86.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index b3d054889bb..2b6291ad8d5 100644

[PATCH] hw/timer/hpet: Convert DPRINTF to trace events

2023-11-18 Thread Daniel Hoffman
This conversion is pretty straight-forward. Standardized some formatting so the +0 and +4 offset cases can recycle the same message. Signed-off-by: Daniel Hoffman --- hw/timer/hpet.c | 55 +-- hw/timer/trace-events | 16 + 2 files

[PATCH] hw/i386: fix short-circuit logic with non-optimizing builds

2023-11-18 Thread Daniel Hoffman
be the first term) and this was causing some builds to emit references to undefined symbols. Signed-off-by: Daniel Hoffman --- hw/i386/x86.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index b3d054889bb..d339c8f3ef8 100644 --- a/hw/i386/x86

[PATCH v2] hw/i386: fix microvm segfault with virtio cmdline

2023-02-25 Thread Daniel Hoffman
the cmdline in the fw_cfg so the read to append happens before the first write in the multiboot case and to explcitly re-write the value to update the length. Fixes: eac7a7791b ("x86: don't let decompressed kernel image clobber setup_data") Signed-off-by: Daniel Hoffman --- hw/i386/mic

[PATCH] hw/i386: fix microvm segfault with virtio cmdline

2023-02-22 Thread Daniel Hoffman
the cmdline in the fw_cfg so the read to append happens before the first write in the multiboot case, and to explcitly re-write the value to update the length. Fixes: eac7a7791b Signed-off-by: Daniel Hoffman --- hw/i386/microvm.c | 3 ++- hw/i386/x86.c | 4 2 files changed, 6 insertions(+), 1

[PATCH] accel/tcg: Fix undefined jump with x86_cpu_tlb_fill

2022-11-30 Thread Daniel Hoffman
Signed-off-by: Daniel Hoffman --- target/i386/tcg/sysemu/excp_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c index 405a5d414a..6a93e96eb7 100644 --- a/target/i386/tcg/sysemu/excp_helper.c

[PATCH] hw/virtio: added virtio-serial test cases

2022-11-11 Thread Daniel Hoffman
with a socketpair connected via fork-exec). Signed-off-by: Daniel Hoffman --- tests/qtest/libqos/virtio-serial.c | 51 + tests/qtest/libqos/virtio-serial.h | 2 + tests/qtest/virtio-serial-test.c | 177 - 3 files changed, 228 insertions(+), 2 deletions(-) diff