All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/6] Fixes for QEMU 7.1-rc1
@ 2022-07-29 15:04 Paolo Bonzini
  2022-07-29 15:04 ` [PULL 1/6] ui: dbus-display requires CONFIG_GBM Paolo Bonzini
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-29 15:04 UTC (permalink / raw)
  To: qemu-devel

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(-)
-- 
2.36.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PULL 1/6] ui: dbus-display requires CONFIG_GBM
  2022-07-29 15:04 [PULL 0/6] Fixes for QEMU 7.1-rc1 Paolo Bonzini
@ 2022-07-29 15:04 ` Paolo Bonzini
  2022-07-29 15:04 ` [PULL 2/6] vga: fix incorrect line height in 640x200x2 mode Paolo Bonzini
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-29 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Daniel P . Berrangé

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
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build    | 4 ++--
 ui/meson.build | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 75aaca8462..294e9a8f32 100644
--- a/meson.build
+++ b/meson.build
@@ -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') \
diff --git a/ui/meson.build b/ui/meson.build
index e9f48c5315..ec13949776 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -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',
-- 
2.36.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 2/6] vga: fix incorrect line height in 640x200x2 mode
  2022-07-29 15:04 [PULL 0/6] Fixes for QEMU 7.1-rc1 Paolo Bonzini
  2022-07-29 15:04 ` [PULL 1/6] ui: dbus-display requires CONFIG_GBM Paolo Bonzini
@ 2022-07-29 15:04 ` Paolo Bonzini
  2022-07-29 15:04 ` [PULL 3/6] stubs: update replay-tools to match replay.h types Paolo Bonzini
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-29 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Korneliusz Osmenda

When 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
Reported-by: Korneliusz Osmenda <korneliuszo@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/display/vga.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/display/vga.c b/hw/display/vga.c
index 5dca2d1528..50ecb1ad02 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -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 {
-- 
2.36.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 3/6] stubs: update replay-tools to match replay.h types
  2022-07-29 15:04 [PULL 0/6] Fixes for QEMU 7.1-rc1 Paolo Bonzini
  2022-07-29 15:04 ` [PULL 1/6] ui: dbus-display requires CONFIG_GBM Paolo Bonzini
  2022-07-29 15:04 ` [PULL 2/6] vga: fix incorrect line height in 640x200x2 mode Paolo Bonzini
@ 2022-07-29 15:04 ` Paolo Bonzini
  2022-07-29 15:04 ` [PULL 4/6] configure: Fix ppc container_cross_cc substitution Paolo Bonzini
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-29 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Claudio Fontana, Pavel Dovgalyuk, Thomas Huth

From: Claudio Fontana <cfontana@suse.de>

detected with GCC 13 [-Werror=enum-int-mismatch]

Solves Issue #1096.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Cc: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220704075832.31537-1-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 stubs/replay-tools.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/stubs/replay-tools.c b/stubs/replay-tools.c
index 43296b3d4e..f2e72bb225 100644
--- a/stubs/replay-tools.c
+++ b/stubs/replay-tools.c
@@ -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();
 }
-- 
2.36.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 4/6] configure: Fix ppc container_cross_cc substitution
  2022-07-29 15:04 [PULL 0/6] Fixes for QEMU 7.1-rc1 Paolo Bonzini
                   ` (2 preceding siblings ...)
  2022-07-29 15:04 ` [PULL 3/6] stubs: update replay-tools to match replay.h types Paolo Bonzini
@ 2022-07-29 15:04 ` Paolo Bonzini
  2022-07-29 15:04 ` [PULL 5/6] kvm: don't use perror() without useful errno Paolo Bonzini
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-29 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

From: Richard Henderson <richard.henderson@linaro.org>

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

Fixes: cd362defbbd ("tests/tcg: merge configure.sh back into main configure script")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220728183901.1290113-1-richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 2c19329d58..c4c02b8438 100755
--- a/configure
+++ b/configure
@@ -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)
-- 
2.36.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 5/6] kvm: don't use perror() without useful errno
  2022-07-29 15:04 [PULL 0/6] Fixes for QEMU 7.1-rc1 Paolo Bonzini
                   ` (3 preceding siblings ...)
  2022-07-29 15:04 ` [PULL 4/6] configure: Fix ppc container_cross_cc substitution Paolo Bonzini
@ 2022-07-29 15:04 ` Paolo Bonzini
  2022-07-29 15:04 ` [PULL 6/6] configure: pass correct cflags to container-based cross compilers Paolo Bonzini
  2022-07-29 17:30 ` [PULL 0/6] Fixes for QEMU 7.1-rc1 Richard Henderson
  6 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-29 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Cornelia Huck

From: Cornelia Huck <cohuck@redhat.com>

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.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20220728142446.438177-1-cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 accel/kvm/kvm-all.c | 2 +-
 target/arm/kvm.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index f165074e99..645f0a249a 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -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);
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 4339e1cd6e..e5c1bd50d2 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -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);
     }
 
-- 
2.36.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PULL 6/6] configure: pass correct cflags to container-based cross compilers
  2022-07-29 15:04 [PULL 0/6] Fixes for QEMU 7.1-rc1 Paolo Bonzini
                   ` (4 preceding siblings ...)
  2022-07-29 15:04 ` [PULL 5/6] kvm: don't use perror() without useful errno Paolo Bonzini
@ 2022-07-29 15:04 ` Paolo Bonzini
  2022-07-29 17:30 ` [PULL 0/6] Fixes for QEMU 7.1-rc1 Richard Henderson
  6 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2022-07-29 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Taylor Simpson

probe_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.

Reported-by: Taylor Simpson <tsimpson@quicinc.com>
Fixes: 92e288fcfb ("build: try both native and cross compilers", 2022-07-08)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configure b/configure
index c4c02b8438..72ab03f11a 100755
--- a/configure
+++ b/configure
@@ -2173,7 +2173,6 @@ probe_target_compiler() {
     build_static=
     target_cc=
     target_ccas=
-    target_cflags=
     target_ar=
     target_as=
     target_ld=
-- 
2.36.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PULL 0/6] Fixes for QEMU 7.1-rc1
  2022-07-29 15:04 [PULL 0/6] Fixes for QEMU 7.1-rc1 Paolo Bonzini
                   ` (5 preceding siblings ...)
  2022-07-29 15:04 ` [PULL 6/6] configure: pass correct cflags to container-based cross compilers Paolo Bonzini
@ 2022-07-29 17:30 ` Richard Henderson
  6 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2022-07-29 17:30 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On 7/29/22 08:04, Paolo Bonzini wrote:
> 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

Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.


r~


> 
> ----------------------------------------------------------------
> 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(-)



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-29 17:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 15:04 [PULL 0/6] Fixes for QEMU 7.1-rc1 Paolo Bonzini
2022-07-29 15:04 ` [PULL 1/6] ui: dbus-display requires CONFIG_GBM Paolo Bonzini
2022-07-29 15:04 ` [PULL 2/6] vga: fix incorrect line height in 640x200x2 mode Paolo Bonzini
2022-07-29 15:04 ` [PULL 3/6] stubs: update replay-tools to match replay.h types Paolo Bonzini
2022-07-29 15:04 ` [PULL 4/6] configure: Fix ppc container_cross_cc substitution Paolo Bonzini
2022-07-29 15:04 ` [PULL 5/6] kvm: don't use perror() without useful errno Paolo Bonzini
2022-07-29 15:04 ` [PULL 6/6] configure: pass correct cflags to container-based cross compilers Paolo Bonzini
2022-07-29 17:30 ` [PULL 0/6] Fixes for QEMU 7.1-rc1 Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.