aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-12-19 14:34:17 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-12-19 14:34:17 +0000
commitadf02c4419e9ac4b3d9a16efdb7e3089c19ae246 (patch)
tree64fa9e44b78ec9de53545f2b32f32eec550bcf45 /hw
parente85c577158a2e8e252414959da9ef15c12eec63d (diff)
parentce1a1aec47877a281d69dbc2e65f86bfe8fea231 (diff)
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2018-12-18' into staging
QAPI patches for 2018-12-18 # gpg: Signature made Tue 18 Dec 2018 07:20:11 GMT # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2018-12-18: qapi: fix flat union on uncovered branches conditionals qmp hmp: Make system_wakeup check wake-up support and run state qga: update guest-suspend-ram and guest-suspend-hybrid descriptions qmp: query-current-machine with wakeup-suspend-support qmp: Split ShutdownCause host-qmp into quit and system-reset qmp: Add reason to SHUTDOWN and RESET events qapi: Turn ShutdownCause into QAPI enum Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/acpi/core.c9
-rw-r--r--hw/char/serial.c2
-rw-r--r--hw/i386/xen/xen-hvm.c5
-rw-r--r--hw/input/ps2.c6
-rw-r--r--hw/timer/mc146818rtc.c2
5 files changed, 18 insertions, 6 deletions
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index aafdc61648..d6f0709691 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -514,7 +514,8 @@ static uint32_t acpi_pm_tmr_get(ACPIREGS *ar)
static void acpi_pm_tmr_timer(void *opaque)
{
ACPIREGS *ar = opaque;
- qemu_system_wakeup_request(QEMU_WAKEUP_REASON_PMTIMER);
+
+ qemu_system_wakeup_request(QEMU_WAKEUP_REASON_PMTIMER, NULL);
ar->tmr.update_sci(ar);
}
@@ -617,6 +618,12 @@ void acpi_pm1_cnt_init(ACPIREGS *ar, MemoryRegion *parent,
ar->pm1.cnt.s4_val = s4_val;
ar->wakeup.notify = acpi_notify_wakeup;
qemu_register_wakeup_notifier(&ar->wakeup);
+
+ /*
+ * Register wake-up support in QMP query-current-machine API
+ */
+ qemu_register_wakeup_support();
+
memory_region_init_io(&ar->pm1.cnt.io, memory_region_owner(parent),
&acpi_pm_cnt_ops, ar, "acpi-cnt", 2);
memory_region_add_subregion(parent, 4, &ar->pm1.cnt.io);
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 02463e3388..7c42a2abfc 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -611,7 +611,7 @@ static void serial_receive1(void *opaque, const uint8_t *buf, int size)
SerialState *s = opaque;
if (s->wakeup) {
- qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
+ qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER, NULL);
}
if(s->fcr & UART_FCR_FE) {
int i;
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 935a3676c8..2143d33b18 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -1405,6 +1405,11 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory)
state->wakeup.notify = xen_wakeup_notifier;
qemu_register_wakeup_notifier(&state->wakeup);
+ /*
+ * Register wake-up support in QMP query-current-machine API
+ */
+ qemu_register_wakeup_support();
+
rc = xen_map_ioreq_server(state);
if (rc < 0) {
goto err;
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index eb33ee9b6f..d3161f1e7c 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -255,7 +255,7 @@ static void ps2_put_keycode(void *opaque, int keycode)
PS2KbdState *s = opaque;
trace_ps2_put_keycode(opaque, keycode);
- qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
+ qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER, NULL);
if (s->translate) {
if (keycode == 0xf0) {
@@ -285,7 +285,7 @@ static void ps2_keyboard_event(DeviceState *dev, QemuConsole *src,
return;
}
- qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
+ qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER, NULL);
assert(evt->type == INPUT_EVENT_KIND_KEY);
qcode = qemu_input_key_value_to_qcode(key->key);
@@ -748,7 +748,7 @@ static void ps2_mouse_sync(DeviceState *dev)
}
if (s->mouse_buttons) {
- qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
+ qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER, NULL);
}
if (!(s->mouse_status & MOUSE_STATUS_REMOTE)) {
/* if not remote, send event. Multiple events are sent if
diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c
index e4e4de8b8a..69483152c3 100644
--- a/hw/timer/mc146818rtc.c
+++ b/hw/timer/mc146818rtc.c
@@ -455,7 +455,7 @@ static void rtc_update_timer(void *opaque)
if (qemu_clock_get_ns(rtc_clock) >= s->next_alarm_time) {
irqs |= REG_C_AF;
if (s->cmos_data[RTC_REG_B] & REG_B_AIE) {
- qemu_system_wakeup_request(QEMU_WAKEUP_REASON_RTC);
+ qemu_system_wakeup_request(QEMU_WAKEUP_REASON_RTC, NULL);
}
}