From d1972be13fd7125ca86a6aaf2690539cf9196ea1 Mon Sep 17 00:00:00 2001 From: Xiaoyao Li Date: Sat, 28 Dec 2019 18:43:26 +0800 Subject: accel/kvm: Make "kernel_irqchip" default on Commit 11bc4a13d1f4 ("kvm: convert "-machine kernel_irqchip" to an accelerator property") moves kernel_irqchip property from "-machine" to "-accel kvm", but it forgets to set the default value of kernel_irqchip_allowed and kernel_irqchip_split. Also cleaning up the three useless members (kernel_irqchip_allowed, kernel_irqchip_required, kernel_irqchip_split) in struct MachineState. Fixes: 11bc4a13d1f4 ("kvm: convert "-machine kernel_irqchip" to an accelerator property") Reported-by: Vitaly Kuznetsov Signed-off-by: Xiaoyao Li Message-Id: <20191228104326.21732-1-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini --- include/hw/boards.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/hw/boards.h b/include/hw/boards.h index 61f8bb8e5a..fb1b43d5b9 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -271,9 +271,6 @@ struct MachineState { /*< public >*/ - bool kernel_irqchip_allowed; - bool kernel_irqchip_required; - bool kernel_irqchip_split; char *dtb; char *dumpdtb; int phandle_start; -- cgit v1.2.3 From 878ec29b9c1915ea0da951064b8aac3050f2f5b9 Mon Sep 17 00:00:00 2001 From: Pavel Dovgalyuk Date: Thu, 19 Dec 2019 15:50:48 +0300 Subject: replay: record and replay random number sources Record/replay feature of icount allows deterministic running of execution scenarios. Some CPUs and peripheral devices read random numbers from external sources making deterministic execution impossible. This patch adds recording and replaying of random read operations into guest-random module, which is used by the virtual hardware. Signed-off-by: Pavel Dovgalyuk Message-Id: <157675984852.14505.15709141760677102489.stgit@pasha-Precision-3630-Tower> Signed-off-by: Paolo Bonzini --- include/sysemu/replay.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index 8df517298c..5471bb514d 100644 --- a/include/sysemu/replay.h +++ b/include/sysemu/replay.h @@ -117,6 +117,13 @@ int64_t replay_read_clock(ReplayClockKind kind); ? replay_save_clock((clock), (value), cpu_get_icount_raw_locked()) \ : (value)) +/* Processing data from random generators */ + +/* Saves the values from the random number generator */ +void replay_save_random(int ret, void *buf, size_t len); +/* Loads the saved values for the random number generator */ +int replay_read_random(void *buf, size_t len); + /* Events */ /*! Called when qemu shutdown is requested. */ -- cgit v1.2.3 From 2fa9044a4fe8c6c9c215785d1abce4db6063a6f9 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 8 Jan 2020 11:14:29 +0100 Subject: chardev: use QEMUChrEvent instead of int MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This uses the QEMUChrEvent enum everywhere except in IOEventHandler. The IOEventHandler change needs to happen at once for all front ends and is done with Coccinelle in the next patch. (Extracted from a patch by Philippe Mathieu-Daudé). Signed-off-by: Paolo Bonzini --- include/chardev/char-mux.h | 2 +- include/chardev/char.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/chardev/char-mux.h b/include/chardev/char-mux.h index 572cefd517..417fe32eed 100644 --- a/include/chardev/char-mux.h +++ b/include/chardev/char-mux.h @@ -56,6 +56,6 @@ typedef struct MuxChardev { object_dynamic_cast(OBJECT(chr), TYPE_CHARDEV_MUX) void mux_set_focus(Chardev *chr, int focus); -void mux_chr_send_all_event(Chardev *chr, int event); +void mux_chr_send_all_event(Chardev *chr, QEMUChrEvent event); #endif /* CHAR_MUX_H */ diff --git a/include/chardev/char.h b/include/chardev/char.h index 087b202b62..00589a6025 100644 --- a/include/chardev/char.h +++ b/include/chardev/char.h @@ -210,7 +210,7 @@ void qemu_chr_be_update_read_handlers(Chardev *s, * * Send an event from the back end to the front end. */ -void qemu_chr_be_event(Chardev *s, int event); +void qemu_chr_be_event(Chardev *s, QEMUChrEvent event); int qemu_chr_add_client(Chardev *s, int fd); Chardev *qemu_chr_find(const char *name); @@ -273,7 +273,7 @@ typedef struct ChardevClass { void (*chr_accept_input)(Chardev *chr); void (*chr_set_echo)(Chardev *chr, bool echo); void (*chr_set_fe_open)(Chardev *chr, int fe_open); - void (*chr_be_event)(Chardev *s, int event); + void (*chr_be_event)(Chardev *s, QEMUChrEvent event); /* Return 0 if succeeded, 1 if failed */ int (*chr_machine_done)(Chardev *chr); } ChardevClass; -- cgit v1.2.3 From 083b266f69f36195aef22cb224f86b99ca0d6feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 18 Dec 2019 18:20:09 +0100 Subject: chardev: Use QEMUChrEvent enum in IOEventHandler typedef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Chardev events are listed in the QEMUChrEvent enum. By using the enum in the IOEventHandler typedef we: - make the IOEventHandler type more explicit (this handler process out-of-band information, while the IOReadHandler is in-band), - help static code analyzers. This patch was produced with the following spatch script: @match@ expression backend, opaque, context, set_open; identifier fd_can_read, fd_read, fd_event, be_change; @@ qemu_chr_fe_set_handlers(backend, fd_can_read, fd_read, fd_event, be_change, opaque, context, set_open); @depends on match@ identifier opaque, event; identifier match.fd_event; @@ static -void fd_event(void *opaque, int event) +void fd_event(void *opaque, QEMUChrEvent event) { ... } Then the typedef was modified manually in include/chardev/char-fe.h. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Corey Minyard Acked-by: Cornelia Huck Reviewed-by: Marc-André Lureau Message-Id: <20191218172009.8868-15-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- include/chardev/char-fe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index 67601dc9a4..a553843364 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -4,7 +4,7 @@ #include "chardev/char.h" #include "qemu/main-loop.h" -typedef void IOEventHandler(void *opaque, int event); +typedef void IOEventHandler(void *opaque, QEMUChrEvent event); typedef int BackendChangeHandler(void *opaque); /* This is the backend as seen by frontend, the actual backend is -- cgit v1.2.3