diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index e7e578a48eb8a99a4d4e0f85df01c57627da34d1..e008e72d7adb2dc80bf0b598c0c2cd7404651fe5 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 23a2cf6484ce5c4bb678b3e60986e4b27f5e2b87..33e333cc26d71f13f19f248101be828a080f9833 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 d9b854d74da7974ca77bb32ef54d36073a391c47..a0e71469f4d03634447917ff17742be90ba0b53e 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 6c43fc2912baf6426ff28e879423719e67c64a70..eb33ee9b6f0d294e8f165e1550dca8366707ba5c 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 f31e9cbbb8d190b277b1fe8bdcca7b5d2e858872..b6602ded4e1a93e1cb97a62de5fe199b73d9559b 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 e0000248d34f51d2d4d5786704346930a3d19f87..fd39acb5c39aa482de27527965cec6ecbc76082e 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 fa25d1ae2d7b08abd85dea01460d1c5b56ae7ccd..d6fd95c227d1e98096c0f1b0df356fc6196e1c05 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;