All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches
@ 2018-11-27  6:49 Gerd Hoffmann
  2018-11-27  6:49 ` [Qemu-devel] [PULL 1/6] fmops: fix off-by-one in AR_TABLE and DR_TABLE array size Gerd Hoffmann
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2018-11-27  6:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Eric Blake, Gerd Hoffmann, Markus Armbruster

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

-- 
2.9.3

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

* [Qemu-devel] [PULL 1/6] fmops: fix off-by-one in AR_TABLE and DR_TABLE array size
  2018-11-27  6:49 [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Gerd Hoffmann
@ 2018-11-27  6:49 ` Gerd Hoffmann
  2018-11-27  6:49 ` [Qemu-devel] [PULL 2/6] ps2kbd: default to scan enabled after reset Gerd Hoffmann
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2018-11-27  6:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Eric Blake, Gerd Hoffmann, Markus Armbruster, P J P

Cc: P J P <ppandit@redhat.com>
Reported-by: Wangjunqing <wangjunqing@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20181030082340.17170-1-kraxel@redhat.com
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/audio/fmopl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h
index e7e578a48e..e008e72d7a 100644
--- a/hw/audio/fmopl.h
+++ b/hw/audio/fmopl.h
@@ -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;
-- 
2.9.3

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

* [Qemu-devel] [PULL 2/6] ps2kbd: default to scan enabled after reset
  2018-11-27  6:49 [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Gerd Hoffmann
  2018-11-27  6:49 ` [Qemu-devel] [PULL 1/6] fmops: fix off-by-one in AR_TABLE and DR_TABLE array size Gerd Hoffmann
@ 2018-11-27  6:49 ` Gerd Hoffmann
  2018-11-27  6:49 ` [Qemu-devel] [PULL 3/6] cirrus_vga/migration: update the bank offset before use Gerd Hoffmann
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2018-11-27  6:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Eric Blake, Gerd Hoffmann, Markus Armbruster,
	Hervé Poussineau

From: Hervé Poussineau <hpoussin@reactos.org>

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.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20181021190721.2148-1-hpoussin@reactos.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/input/ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 6c43fc2912..eb33ee9b6f 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -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;
-- 
2.9.3

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

* [Qemu-devel] [PULL 3/6] cirrus_vga/migration: update the bank offset before use
  2018-11-27  6:49 [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Gerd Hoffmann
  2018-11-27  6:49 ` [Qemu-devel] [PULL 1/6] fmops: fix off-by-one in AR_TABLE and DR_TABLE array size Gerd Hoffmann
  2018-11-27  6:49 ` [Qemu-devel] [PULL 2/6] ps2kbd: default to scan enabled after reset Gerd Hoffmann
@ 2018-11-27  6:49 ` Gerd Hoffmann
  2018-11-27  6:49 ` [Qemu-devel] [PULL 4/6] audio/hda: fix guest triggerable assert Gerd Hoffmann
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2018-11-27  6:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Eric Blake, Gerd Hoffmann, Markus Armbruster, Wang Xin

From: Wang Xin <wangxinxin.wang@huawei.com>

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

Signed-off-by: Wang Xin <wangxinxin.wang@huawei.com>
Message-id: 20181123064646.23036-1-linzhecheng@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/cirrus_vga.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index d9b854d74d..a0e71469f4 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -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;
 }
 
-- 
2.9.3

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

* [Qemu-devel] [PULL 4/6] audio/hda: fix guest triggerable assert
  2018-11-27  6:49 [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2018-11-27  6:49 ` [Qemu-devel] [PULL 3/6] cirrus_vga/migration: update the bank offset before use Gerd Hoffmann
@ 2018-11-27  6:49 ` Gerd Hoffmann
  2018-11-27  6:49 ` [Qemu-devel] [PULL 5/6] usb-host: set ifs.detached as true if kernel driver is not active Gerd Hoffmann
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2018-11-27  6:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Eric Blake, Gerd Hoffmann, Markus Armbruster

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

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1628433
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181123063957.9515-1-kraxel@redhat.com
---
 hw/audio/intel-hda.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 23a2cf6484..33e333cc26 100644
--- a/hw/audio/intel-hda.c
+++ b/hw/audio/intel-hda.c
@@ -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);
-- 
2.9.3

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

* [Qemu-devel] [PULL 5/6] usb-host: set ifs.detached as true if kernel driver is not active
  2018-11-27  6:49 [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Gerd Hoffmann
                   ` (3 preceding siblings ...)
  2018-11-27  6:49 ` [Qemu-devel] [PULL 4/6] audio/hda: fix guest triggerable assert Gerd Hoffmann
@ 2018-11-27  6:49 ` Gerd Hoffmann
  2018-11-27  6:49 ` [Qemu-devel] [PULL 6/6] qapi: add query-display-options command Gerd Hoffmann
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2018-11-27  6:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Eric Blake, Gerd Hoffmann, Markus Armbruster, linzhecheng

From: linzhecheng <linzhecheng@huawei.com>

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

Signed-off-by: linzhecheng <linzhecheng@huawei.com>
Message-id: 20181120083419.17716-1-linzhecheng@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/host-libusb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index f31e9cbbb8..b6602ded4e 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -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);
-- 
2.9.3

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

* [Qemu-devel] [PULL 6/6] qapi: add query-display-options command
  2018-11-27  6:49 [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Gerd Hoffmann
                   ` (4 preceding siblings ...)
  2018-11-27  6:49 ` [Qemu-devel] [PULL 5/6] usb-host: set ifs.detached as true if kernel driver is not active Gerd Hoffmann
@ 2018-11-27  6:49 ` Gerd Hoffmann
  2018-11-27 14:02 ` [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Peter Maydell
  2018-11-28 23:57 ` no-reply
  7 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2018-11-27  6:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Eric Blake, Gerd Hoffmann, Markus Armbruster

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.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Eric Blake <eblake@redhat.com>
Tested-by: Erik Skultety <eskultet@redhat.com>
Message-id: 20181122071613.2889-1-kraxel@redhat.com

[ kraxel: reworded commit message as suggested by armbru ]
---
 vl.c         |  6 ++++++
 qapi/ui.json | 13 +++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/vl.c b/vl.c
index fa25d1ae2d..d6fd95c227 100644
--- a/vl.c
+++ b/vl.c
@@ -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;
diff --git a/qapi/ui.json b/qapi/ui.json
index e0000248d3..fd39acb5c3 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -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' }
-- 
2.9.3

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

* Re: [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches
  2018-11-27  6:49 [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Gerd Hoffmann
                   ` (5 preceding siblings ...)
  2018-11-27  6:49 ` [Qemu-devel] [PULL 6/6] qapi: add query-display-options command Gerd Hoffmann
@ 2018-11-27 14:02 ` Peter Maydell
  2018-11-28 23:57 ` no-reply
  7 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2018-11-27 14:02 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers, Paolo Bonzini, Markus Armbruster

On Tue, 27 Nov 2018 at 06:51, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> 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
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

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

* Re: [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches
  2018-11-27  6:49 [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Gerd Hoffmann
                   ` (6 preceding siblings ...)
  2018-11-27 14:02 ` [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Peter Maydell
@ 2018-11-28 23:57 ` no-reply
  7 siblings, 0 replies; 9+ messages in thread
From: no-reply @ 2018-11-28 23:57 UTC (permalink / raw)
  To: kraxel; +Cc: famz, qemu-devel, pbonzini, armbru

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: 20181127064932.7299-1-kraxel@redhat.com

=== 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 patchew-devel@redhat.com

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

end of thread, other threads:[~2018-11-28 23:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27  6:49 [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Gerd Hoffmann
2018-11-27  6:49 ` [Qemu-devel] [PULL 1/6] fmops: fix off-by-one in AR_TABLE and DR_TABLE array size Gerd Hoffmann
2018-11-27  6:49 ` [Qemu-devel] [PULL 2/6] ps2kbd: default to scan enabled after reset Gerd Hoffmann
2018-11-27  6:49 ` [Qemu-devel] [PULL 3/6] cirrus_vga/migration: update the bank offset before use Gerd Hoffmann
2018-11-27  6:49 ` [Qemu-devel] [PULL 4/6] audio/hda: fix guest triggerable assert Gerd Hoffmann
2018-11-27  6:49 ` [Qemu-devel] [PULL 5/6] usb-host: set ifs.detached as true if kernel driver is not active Gerd Hoffmann
2018-11-27  6:49 ` [Qemu-devel] [PULL 6/6] qapi: add query-display-options command Gerd Hoffmann
2018-11-27 14:02 ` [Qemu-devel] [PULL 0/6] Fixes 31 20181127 patches Peter Maydell
2018-11-28 23:57 ` no-reply

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.