Skip to contentSkip to conversation

Fixes 31 20181127 patches

GIT PULL Applied Gerd Hoffmann 3 participants 9 messages Nov 27, 2018 – Nov 28, 2018

lore
Share & tools
lore
#0 lore raw

The following changes since commit 5298f4d67a911dd9cefa4c4185eed242074d64c2:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2018-11-23 08:54:52 +0000)

are available in the git repository at:

git://git.kraxel.org/qemu tags/fixes-31-20181127-pull-request

for you to fetch changes up to e1ca8f7e1915496148f6e0ce1f7c2309af013312:

qapi: add query-display-options command (2018-11-27 07:47:57 +0100)

----------------------------------------------------------------
various bugfixes for 3.1: fmops, ps2, cirrus, hda, usb-host, qapi

----------------------------------------------------------------

Gerd Hoffmann (3):
fmops: fix off-by-one in AR_TABLE and DR_TABLE array size audio/hda: fix guest triggerable assert
qapi: add query-display-options command

Hervé Poussineau (1):
ps2kbd: default to scan enabled after reset

Wang Xin (1):
cirrus_vga/migration: update the bank offset before use

linzhecheng (1):
usb-host: set ifs.detached as true if kernel driver is not active

 hw/audio/fmopl.h        |  4 ++--
 hw/audio/intel-hda.c    |  6 ++++++
 hw/display/cirrus_vga.c |  7 ++++---
 hw/input/ps2.c          |  2 +-
 hw/usb/host-libusb.c    |  3 +++
 vl.c                    |  6 ++++++
 qapi/ui.json            | 13 +++++++++++++
 7 files changed, 35 insertions(+), 6 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

[Qemu-devel] [PULL 1/6] fmops: fix off-by-one in AR_TABLE and DR_TABLE array size

Message-id: [email protected]

---
 hw/audio/fmopl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/audio/fmopl.h +2 -2
index e7e578a48e..e008e72d7a 100644
@@ -72,8 +72,8 @@ typedef struct fm_opl_f {
 	/* Rhythm sention */
 	uint8_t rhythm;		/* Rhythm mode , key flag */
 	/* time tables */
-	int32_t AR_TABLE[75];	/* atttack rate tables */
-	int32_t DR_TABLE[75];	/* decay rate tables   */
+	int32_t AR_TABLE[76];	/* attack rate tables  */
+	int32_t DR_TABLE[76];	/* decay rate tables   */
 	uint32_t FN_TABLE[1024];  /* fnumber -> increment counter */
 	/* LFO */
 	int32_t *ams_table;
Signature · 1 line
2.9.3
#2 lore raw

[Qemu-devel] [PULL 2/6] ps2kbd: default to scan enabled after reset

In reply to Gerd Hoffmann

From: Hervé Poussineau <[email protected]>

A check for scan_enabled has been added to ps2_keyboard_event in commit 143c04c7e0639e53086519592ead15d2556bfbf2 to prevent stream corruption. This works well as long as operating system is resetting keyboard, or enabling it.

This fixes IBM 40p firmware, which doesn't bother sending KBD_CMD_RESET, KBD_CMD_ENABLE or KBD_CMD_RESET_ENABLE before trying to use the keyboard.

Message-id: [email protected]

---
 hw/input/ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/input/ps2.c +1 -1
index 6c43fc2912..eb33ee9b6f 100644
@@ -942,7 +942,7 @@ static void ps2_kbd_reset(void *opaque)
 
     trace_ps2_kbd_reset(opaque);
     ps2_common_reset(&s->common);
-    s->scan_enabled = 0;
+    s->scan_enabled = 1;
     s->translate = 0;
     s->scancode_set = 2;
     s->modifiers = 0;
Signature · 1 line
2.9.3
#3 lore raw

[Qemu-devel] [PULL 3/6] cirrus_vga/migration: update the bank offset before use

In reply to Gerd Hoffmann

From: Wang Xin <[email protected]>

The cirrus bank0/1 offset should be updated before we update the vram's alias offset.

Message-id: [email protected]

---
 hw/display/cirrus_vga.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
hw/display/cirrus_vga.c +4 -3
index d9b854d74d..a0e71469f4 100644
@@ -2746,11 +2746,12 @@ static int cirrus_post_load(void *opaque, int version_id)
     s->vga.gr[0x00] = s->cirrus_shadow_gr0 & 0x0f;
     s->vga.gr[0x01] = s->cirrus_shadow_gr1 & 0x0f;
 
-    cirrus_update_memory_access(s);
-    /* force refresh */
-    s->vga.graphic_mode = -1;
     cirrus_update_bank_ptr(s, 0);
     cirrus_update_bank_ptr(s, 1);
+    cirrus_update_memory_access(s);
+    /* force refresh */
+    s->vga.graphic_mode = -1;
+
     return 0;
 }
 
Signature · 1 line
2.9.3
#4 lore raw

[Qemu-devel] [PULL 4/6] audio/hda: fix guest triggerable assert

In reply to Gerd Hoffmann

Guest writes to a readonly register trigger the assert in intel_hda_reg_write(). Add a check and just ignore them.

Message-id: [email protected]

---
 hw/audio/intel-hda.c | 6 ++++++
 1 file changed, 6 insertions(+)
hw/audio/intel-hda.c +6 -0
index 23a2cf6484..33e333cc26 100644
@@ -23,6 +23,7 @@
 #include "hw/pci/msi.h"
 #include "qemu/timer.h"
 #include "qemu/bitops.h"
+#include "qemu/log.h"
 #include "hw/audio/soundhw.h"
 #include "intel-hda.h"
 #include "intel-hda-defs.h"
@@ -929,6 +930,11 @@ static void intel_hda_reg_write(IntelHDAState *d, const IntelHDAReg *reg, uint32
     if (!reg) {
         return;
     }
+    if (!reg->wmask) {
+        qemu_log_mask(LOG_GUEST_ERROR, "intel-hda: write to r/o reg %s\n",
+                      reg->name);
+        return;
+    }
 
     if (d->debug) {
         time_t now = time(NULL);
Signature · 1 line
2.9.3
#5 lore raw

[Qemu-devel] [PULL 5/6] usb-host: set ifs.detached as true if kernel driver is not active

In reply to Gerd Hoffmann

From: linzhecheng <[email protected]>

If no kernel driver is active, we can already claim and perform I/O on it without detaching it.

Message-id: [email protected]

---
 hw/usb/host-libusb.c | 3 +++
 1 file changed, 3 insertions(+)
hw/usb/host-libusb.c +3 -0
index f31e9cbbb8..b6602ded4e 100644
@@ -1120,6 +1120,9 @@ static void usb_host_detach_kernel(USBHostDevice *s)
         rc = libusb_kernel_driver_active(s->dh, i);
         usb_host_libusb_error("libusb_kernel_driver_active", rc);
         if (rc != 1) {
+            if (rc == 0) {
+                s->ifs[i].detached = true;
+            }
             continue;
         }
         trace_usb_host_detach_kernel(s->bus_num, s->addr, i);
Signature · 1 line
2.9.3
#6 lore raw

[Qemu-devel] [PULL 6/6] qapi: add query-display-options command

In reply to Gerd Hoffmann

Add query-display-options command, which allows querying the qemu display configuration. This isn't particularly useful, except it exposes QAPI type DisplayOptions in query-qmp-schema, so that libvirt can discover recently added -display parameter rendernode (commit d4dc4ab133b). Works around lack of sufficiently powerful command line introspection.

Message-id: [email protected]

[ kraxel: reworded commit message as suggested by armbru ]

---
 vl.c         |  6 ++++++
 qapi/ui.json | 13 +++++++++++++
 2 files changed, 19 insertions(+)
vl.c +6 -0
index fa25d1ae2d..d6fd95c227 100644
@@ -128,6 +128,7 @@ int main(int argc, char **argv)
 #include "qapi/qapi-commands-block-core.h"
 #include "qapi/qapi-commands-misc.h"
 #include "qapi/qapi-commands-run-state.h"
+#include "qapi/qapi-commands-ui.h"
 #include "qapi/qmp/qerror.h"
 #include "sysemu/iothread.h"
 
@@ -2055,6 +2056,11 @@ static void parse_display_qapi(const char *optarg)
     visit_free(v);
 }
 
+DisplayOptions *qmp_query_display_options(Error **errp)
+{
+    return QAPI_CLONE(DisplayOptions, &dpy);
+}
+
 static void parse_display(const char *p)
 {
     const char *opts;
qapi/ui.json +13 -0
index e0000248d3..fd39acb5c3 100644
@@ -1102,3 +1102,16 @@
   'discriminator' : 'type',
   'data'    : { 'gtk'            : 'DisplayGTK',
                 'egl-headless'   : 'DisplayEGLHeadless'} }
+
+##
+# @query-display-options:
+#
+# Returns information about display configuration
+#
+# Returns: @DisplayOptions
+#
+# Since: 3.1
+#
+##
+{ 'command': 'query-display-options',
+  'returns': 'DisplayOptions' }
Signature · 1 line
2.9.3
#7 lore raw
In reply to Gerd Hoffmann
Quoted 9 lines · Gerd Hoffmann

The following changes since commit 5298f4d67a911dd9cefa4c4185eed242074d64c2:

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2018-11-23 08:54:52 +0000)

are available in the git repository at:

git://git.kraxel.org/qemu tags/fixes-31-20181127-pull-request

Quoted 8 lines

for you to fetch changes up to e1ca8f7e1915496148f6e0ce1f7c2309af013312:

qapi: add query-display-options command (2018-11-27 07:47:57 +0100)

----------------------------------------------------------------
various bugfixes for 3.1: fmops, ps2, cirrus, hda, usb-host, qapi

----------------------------------------------------------------

Applied, thanks.

-- PMM

#8 lore raw
In reply to Gerd Hoffmann
This series seems to have some coding style problems. See output below for more information:

Hi,

This series seems to have some coding style problems. See output below for more information:

Type: series
Subject: [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches
Message-id: [email protected]

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do

    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))

done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
47e8b7b qapi: add query-display-options command
b38268d usb-host: set ifs.detached as true if kernel driver is not active 36275b8 audio/hda: fix guest triggerable assert
a20816e cirrus_vga/migration: update the bank offset before use 93d3ea2 ps2kbd: default to scan enabled after reset
0d552dd fmops: fix off-by-one in AR_TABLE and DR_TABLE array size

=== OUTPUT BEGIN ===
Checking PATCH 1/6: fmops: fix off-by-one in AR_TABLE and DR_TABLE array size...
ERROR: code indent should never use tabs
#28: FILE: hw/audio/fmopl.h:75:
+^Iint32_t AR_TABLE[76];^I/* attack rate tables */$

ERROR: code indent should never use tabs
#29: FILE: hw/audio/fmopl.h:76:
+^Iint32_t DR_TABLE[76];^I/* decay rate tables */$

total: 2 errors, 0 warnings, 10 lines checked

Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Checking PATCH 2/6: ps2kbd: default to scan enabled after reset... Checking PATCH 3/6: cirrus_vga/migration: update the bank offset before use... Checking PATCH 4/6: audio/hda: fix guest triggerable assert...
Checking PATCH 5/6: usb-host: set ifs.detached as true if kernel driver is not active... Checking PATCH 6/6: qapi: add query-display-options command...
=== OUTPUT END ===

Test command exited with code: 1

---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]