Fixes for QEMU 7.1-rc1
The following changes since commit 7b17a1a841fc2336eba53afade9cadb14bd3dd9a:
Update version for v7.1.0-rc0 release (2022-07-26 18:03:16 -0700)
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to ebc55f523c2f406e30ec8fad77bd3b9aad5d4579:
configure: pass correct cflags to container-based cross compilers (2022-07-29 00:22:19 +0200)
----------------------------------------------------------------
* Misc build system bugfixes
* Fix CGA 2-color graphics
----------------------------------------------------------------
Claudio Fontana (1):
stubs: update replay-tools to match replay.h types
Cornelia Huck (1):
kvm: don't use perror() without useful errno
Paolo Bonzini (3):
ui: dbus-display requires CONFIG_GBM
vga: fix incorrect line height in 640x200x2 mode
configure: pass correct cflags to container-based cross compilers
Richard Henderson (1):
configure: Fix ppc container_cross_cc substitution
accel/kvm/kvm-all.c | 2 +- configure | 3 +-- hw/display/vga.c | 3 ++- meson.build | 4 ++-- stubs/replay-tools.c | 9 +++++---- target/arm/kvm.c | 2 +- ui/meson.build | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-)
Signature · 1 line
2.36.1
[PULL 1/6] ui: dbus-display requires CONFIG_GBM
Without CONFIG_GBM, compiling dbus-display fails with
../ui/dbus.c: In function ‘dbus_create_context’:../ui/dbus.c:47:20: error: ‘qemu_egl_rn_ctx’ undeclared (first use in this function); did you mean ‘qemu_egl_init_ctx’?
47 | qemu_egl_rn_ctx);
| ^~~~~~~~~~~~~~~
| qemu_egl_init_ctx../ui/dbus.c:47:20: note: each undeclared identifier is reported only once for each function it appears in
and many other similar errors, because include/ui/egl-helpers.h only has these declaration if gbm is found on the system.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1108
--- meson.build | 4 ++-- ui/meson.build | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
meson.build +2 -2
@@ -1677,8 +1677,8 @@ dbus_display = get_option('dbus_display') \ error_message: '-display dbus requires --enable-modules') \ .require(gdbus_codegen.found(), error_message: '-display dbus requires gdbus-codegen') \ - .require(opengl.found(), - error_message: '-display dbus requires epoxy/egl') \ + .require(opengl.found() and gbm.found(), + error_message: '-display dbus requires epoxy/egl and gbm') \ .allowed() have_virtfs = get_option('virtfs') \
ui/meson.build +1 -1
@@ -81,7 +81,7 @@ if dbus_display '--interface-prefix', 'org.qemu.', '--c-namespace', 'QemuDBus', '--generate-c-code', '@BASENAME@']) - dbus_ss.add(when: [gio, pixman, opengl], + dbus_ss.add(when: [gio, pixman, opengl, gbm], if_true: [files( 'dbus-chardev.c', 'dbus-clipboard.c',
Signature · 1 line
2.36.1
[PULL 2/6] vga: fix incorrect line height in 640x200x2 mode
In reply to Paolo BonziniWhen in CGA modes, QEMU wants to ignore the maximum scan field (bits 0..4) of the maximum scan length register in the CRTC. It is not clear why this is needed---for example, Bochs ignores bit 7 instead. The issue is that the CGA modes are not detected correctly, and in particular mode 6 results in multi_scan==3 according to how SeaBIOS programs it. The right way to check for CGA graphics modes is to check whether bit 13 of the address is special cased by the CRT controller to achieve line interleaving, i.e. whether bit 0 of the CRTC mode control register is clear.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1020
--- hw/display/vga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
hw/display/vga.c +2 -1
@@ -1514,9 +1514,10 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) force_shadow = true; } +/* bits 5-6: 0 = 16-color mode, 1 = 4-color mode, 2 = 256-color mode. */ shift_control = (s->gr[VGA_GFX_MODE ] >>5 ) &3 ; double_scan = (s->cr[VGA_CRTC_MAX_SCAN ] >>7 ); -if (shift_control !=1 ) { +if (s->cr[VGA_CRTC_MODE ] &1 ) { multi_scan = (((s->cr[VGA_CRTC_MAX_SCAN ] &0x1f ) +1 ) << double_scan) -1 ; }else {
Signature · 1 line
2.36.1
[PULL 4/6] configure: Fix ppc container_cross_cc substitution
In reply to Paolo BonziniFrom: Richard Henderson <[email protected]>
When moving this code out of probe_target_compiler(), we failed to adjust the variable in which the target is located, resulting in e.g. powerpc64-linux-user-linux-gnu-gcc-10
Message-Id: <[email protected]>
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
@@ -2028,7 +2028,7 @@ probe_target_compiler() { ;; ppc64|ppc64le) container_image=debian-powerpc-test-cross - container_cross_prefix=powerpc${1#ppc}-linux-gnu- + container_cross_prefix=powerpc${target_arch#ppc}-linux-gnu- container_cross_cc=${container_cross_prefix}gcc-10 ;; riscv64)
Signature · 1 line
2.36.1
[PULL 6/6] configure: pass correct cflags to container-based cross compilers
In reply to Paolo Bonziniprobe_target_compiler returns nonempty $target_cc for installed toolchains and $container_cross_cc for container-based toolchains. In both cases however the flags (coming from $cross_cc_cflags_${target_arch}) must be in $target_cflags.
Therefore, do not clear them prior to returning from probe_target_compiler.
--- configure | 1 - 1 file changed, 1 deletion(-)
configure +0 -1
@@ -2173,7 +2173,6 @@ probe_target_compiler() { build_static= target_cc= target_ccas= - target_cflags= target_ar= target_as= target_ld=
Signature · 1 line
2.36.1
[PULL 5/6] kvm: don't use perror() without useful errno
In reply to Paolo BonziniFrom: Cornelia Huck <[email protected]>
perror() is designed to append the decoded errno value to a string. This, however, only makes sense if we called something that actually sets errno prior to that.
For the callers that check for split irqchip support that is not the case, and we end up with confusing error messages that end in "success". Use error_report() instead.
Message-Id: <[email protected]>
--- accel/kvm/kvm-all.c | 2 +- target/arm/kvm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
accel/kvm/kvm-all.c +1 -1
@@ -2265,7 +2265,7 @@ static void kvm_irqchip_create(KVMState *s) ret =kvm_arch_irqchip_create (s);if (ret ==0 ) {if (s->kernel_irqchip_split ==ON_OFF_AUTO_ON ) { -perror ("Split IRQ chip mode not supported." ); +error_report ("Split IRQ chip mode not supported." );exit (1 ); }else { ret =kvm_vm_ioctl (s,KVM_CREATE_IRQCHIP );
target/arm/kvm.c +1 -1
@@ -959,7 +959,7 @@ void kvm_arch_init_irq_routing(KVMState *s)int kvm_arch_irqchip_create (KVMState *s) {if (kvm_kernel_irqchip_split ()) { -perror ("-machine kernel_irqchip=split is not supported on ARM." ); +error_report ("-machine kernel_irqchip=split is not supported on ARM." );exit (1 ); }
Signature · 1 line
2.36.1
[PULL 3/6] stubs: update replay-tools to match replay.h types
In reply to Paolo BonziniFrom: Claudio Fontana <[email protected]>
detected with GCC 13 [-Werror=enum-int-mismatch]
Solves Issue #1096.
Message-Id: <[email protected]>
--- stubs/replay-tools.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
stubs/replay-tools.c +5 -4
@@ -7,13 +7,14 @@ bool replay_events_enabled(void)return false; } -int64_t replay_save_clock (unsigned int kind,int64_t clock,int64_t raw_icount) +int64_t replay_save_clock (ReplayClockKind kind, +int64_t clock,int64_t raw_icount) {abort ();return 0 ; } -int64_t replay_read_clock (unsigned int kind,int64_t raw_icount) +int64_t replay_read_clock (ReplayClockKind kind,int64_t raw_icount) {abort ();return 0 ;
@@ -48,11 +49,11 @@ void replay_mutex_unlock(void) { } -void replay_register_char_driver (Chardev *chr) +void replay_register_char_driver (struct Chardev *chr) { } -void replay_chr_be_write (Chardev *s,uint8_t *buf,int len) +void replay_chr_be_write (struct Chardev *s,uint8_t *buf,int len) {abort (); }
Signature · 1 line
2.36.1
Richard Henderson
AppliedQuoted 8 lines · Paolo Bonzini
The following changes since commit
7b17a1a841fc2336eba53afade9cadb14bd3dd9a:Update version for v7.1.0-rc0 release (2022-07-26 18:03:16 -0700)are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
Quoted 7 lines
for you to fetch changes up to
ebc55f523c2f406e30ec8fad77bd3b9aad5d4579:configure: pass correct cflags to container-based cross compilers (2022-07-29 00:22:19 +0200)
----------------------------------------------------------------
* Misc build system bugfixes
* Fix CGA 2-color graphics
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.
r~
Quoted 24 lines
----------------------------------------------------------------
Claudio Fontana (1):
stubs: update replay-tools to matchreplay.htypesCornelia Huck (1):
kvm: don't useperror()without useful errnoPaolo Bonzini (3):
ui: dbus-display requiresCONFIG_GBM
vga: fix incorrect line height in 640x200x2 mode
configure: pass correct cflags to container-based cross compilersRichard Henderson (1):
configure: Fix ppccontainer_cross_ccsubstitutionaccel/kvm/kvm-all.c | 2 +- configure | 3 +-- hw/display/vga.c | 3 ++- meson.build | 4 ++-- stubs/replay-tools.c | 9 +++++---- target/arm/kvm.c | 2 +- ui/meson.build | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-)