aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-11-27 11:21:38 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-11-27 11:21:38 +0000
commit4822f1ee9efa8df56e29db0a68323b484bdb0335 (patch)
treee6b6aefcccf8d46f4c758d1b699abaef21bd0cff
parentd5d31c9a8ab5e87db4230602a6fd5da8eb13135c (diff)
parente1ca8f7e1915496148f6e0ce1f7c2309af013312 (diff)
downloadqemu-4822f1ee9efa8df56e29db0a68323b484bdb0335.zip
qemu-4822f1ee9efa8df56e29db0a68323b484bdb0335.tar.gz
qemu-4822f1ee9efa8df56e29db0a68323b484bdb0335.tar.bz2
Merge remote-tracking branch 'remotes/kraxel/tags/fixes-31-20181127-pull-request' into staging
various bugfixes for 3.1: fmops, ps2, cirrus, hda, usb-host, qapi # gpg: Signature made Tue 27 Nov 2018 06:49:13 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/fixes-31-20181127-pull-request: qapi: add query-display-options command usb-host: set ifs.detached as true if kernel driver is not active audio/hda: fix guest triggerable assert cirrus_vga/migration: update the bank offset before use ps2kbd: default to scan enabled after reset fmops: fix off-by-one in AR_TABLE and DR_TABLE array size Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/audio/fmopl.h4
-rw-r--r--hw/audio/intel-hda.c6
-rw-r--r--hw/display/cirrus_vga.c5
-rw-r--r--hw/input/ps2.c2
-rw-r--r--hw/usb/host-libusb.c3
-rw-r--r--qapi/ui.json13
-rw-r--r--vl.c6
7 files changed, 34 insertions, 5 deletions
diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h
index e7e578a..e008e72 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;
diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c
index 23a2cf6..33e333c 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);
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index d9b854d..a0e7146 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_bank_ptr(s, 0);
+ cirrus_update_bank_ptr(s, 1);
cirrus_update_memory_access(s);
/* force refresh */
s->vga.graphic_mode = -1;
- cirrus_update_bank_ptr(s, 0);
- cirrus_update_bank_ptr(s, 1);
+
return 0;
}
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 6c43fc2..eb33ee9 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;
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index f31e9cb..b6602de 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);
diff --git a/qapi/ui.json b/qapi/ui.json
index e000024..fd39acb 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' }
diff --git a/vl.c b/vl.c
index fa25d1a..d6fd95c 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;