From cba42d61a379bc1c983ddb39d479de3581d2d578 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Tue, 9 Mar 2021 14:15:10 +0300 Subject: Various spelling fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An assorted set of spelling fixes in various places. Signed-off-by: Michael Tokarev Reviewed-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-Id: <20210309111510.79495-1-mjt@msgid.tls.msk.ru> Signed-off-by: Laurent Vivier --- include/hw/s390x/css.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h index 08c869a..7901ab2 100644 --- a/include/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -133,7 +133,7 @@ struct SubchDev { bool ccw_fmt_1; bool thinint_active; uint8_t ccw_no_data_cnt; - uint16_t migrated_schid; /* used for missmatch detection */ + uint16_t migrated_schid; /* used for mismatch detection */ CcwDataStream cds; /* transport-provided data: */ int (*ccw_cb) (SubchDev *, CCW1); -- cgit v1.1 From f413e514a9133c1e63dae8f1f3a9ca0286c7a513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 25 Feb 2021 19:13:44 +0100 Subject: hw/elf_ops: Fix a typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit g_mapped_file_new_from_fd()'s parameter is named 'writable'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefano Garzarella Reviewed-by: David Edmondson Message-Id: <20210225181344.3623720-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- include/hw/elf_ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h index 78409ab..6ee458e 100644 --- a/include/hw/elf_ops.h +++ b/include/hw/elf_ops.h @@ -417,7 +417,7 @@ static int glue(load_elf, SZ)(const char *name, int fd, /* * Since we want to be able to modify the mapped buffer, we set the - * 'writeble' parameter to 'true'. Modifications to the buffer are not + * 'writable' parameter to 'true'. Modifications to the buffer are not * written back to the file. */ mapped_file = g_mapped_file_new_from_fd(fd, true, NULL); -- cgit v1.1 From 27eb3722e439ccf7ef37ec39592acc9ebc5c687f Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 15 Feb 2021 10:02:25 +0100 Subject: net: Use id_generate() in the network subsystem, too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We already got a global function called id_generate() to create unique IDs within QEMU. Let's use it in the network subsytem, too, instead of inventing our own ID scheme here. Signed-off-by: Thomas Huth Reviewed-by: Marc-André Lureau Message-Id: <20210215090225.1046239-1-thuth@redhat.com> Signed-off-by: Laurent Vivier --- include/qemu/id.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/qemu/id.h b/include/qemu/id.h index b55c406..46b759b 100644 --- a/include/qemu/id.h +++ b/include/qemu/id.h @@ -5,6 +5,7 @@ typedef enum IdSubSystems { ID_QDEV, ID_BLOCK, ID_CHR, + ID_NET, ID_MAX /* last element, used as array size */ } IdSubSystems; -- cgit v1.1 From d32335e8ed89851b0359cacc04890d0f8b7683bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 25 Feb 2021 19:20:03 +0100 Subject: exec/memory: Use struct Object typedef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We forward-declare Object typedef in "qemu/typedefs.h" since commit ca27b5eb7cd ("qom/object: Move Object typedef to 'qemu/typedefs.h'"). Use it everywhere to make the code simpler. Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson Reviewed-by: Laurent Vivier Message-Id: <20210225182003.3629342-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- include/exec/memory.h | 32 ++++++++++++++++---------------- include/hw/ppc/pnv_xscom.h | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/exec/memory.h b/include/exec/memory.h index c6fb714..54ccf1a 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -828,7 +828,7 @@ static inline bool MemoryRegionSection_eq(MemoryRegionSection *a, * @size: size of the region; any subregions beyond this size will be clipped */ void memory_region_init(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size); @@ -876,7 +876,7 @@ void memory_region_unref(MemoryRegion *mr); * @size: size of the region. */ void memory_region_init_io(MemoryRegion *mr, - struct Object *owner, + Object *owner, const MemoryRegionOps *ops, void *opaque, const char *name, @@ -898,7 +898,7 @@ void memory_region_init_io(MemoryRegion *mr, * RAM memory region to be migrated; that is the responsibility of the caller. */ void memory_region_init_ram_nomigrate(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, Error **errp); @@ -920,7 +920,7 @@ void memory_region_init_ram_nomigrate(MemoryRegion *mr, * The only difference is part of the RAM region can be remapped. */ void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, bool share, @@ -946,7 +946,7 @@ void memory_region_init_ram_shared_nomigrate(MemoryRegion *mr, * RAM memory region to be migrated; that is the responsibility of the caller. */ void memory_region_init_resizeable_ram(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, uint64_t max_size, @@ -979,7 +979,7 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr, * RAM memory region to be migrated; that is the responsibility of the caller. */ void memory_region_init_ram_from_file(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, uint64_t align, @@ -1005,7 +1005,7 @@ void memory_region_init_ram_from_file(MemoryRegion *mr, * RAM memory region to be migrated; that is the responsibility of the caller. */ void memory_region_init_ram_from_fd(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, bool share, @@ -1030,7 +1030,7 @@ void memory_region_init_ram_from_fd(MemoryRegion *mr, * RAM memory region to be migrated; that is the responsibility of the caller. */ void memory_region_init_ram_ptr(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, void *ptr); @@ -1058,7 +1058,7 @@ void memory_region_init_ram_ptr(MemoryRegion *mr, * (For RAM device memory regions, migrating the contents rarely makes sense.) */ void memory_region_init_ram_device_ptr(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, void *ptr); @@ -1076,7 +1076,7 @@ void memory_region_init_ram_device_ptr(MemoryRegion *mr, * @size: size of the region. */ void memory_region_init_alias(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, MemoryRegion *orig, hwaddr offset, @@ -1101,7 +1101,7 @@ void memory_region_init_alias(MemoryRegion *mr, * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_rom_nomigrate(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, Error **errp); @@ -1124,7 +1124,7 @@ void memory_region_init_rom_nomigrate(MemoryRegion *mr, * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_rom_device_nomigrate(MemoryRegion *mr, - struct Object *owner, + Object *owner, const MemoryRegionOps *ops, void *opaque, const char *name, @@ -1183,7 +1183,7 @@ void memory_region_init_iommu(void *_iommu_mr, * If you pass a non-NULL non-device @owner then we will assert. */ void memory_region_init_ram(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, Error **errp); @@ -1210,7 +1210,7 @@ void memory_region_init_ram(MemoryRegion *mr, * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_rom(MemoryRegion *mr, - struct Object *owner, + Object *owner, const char *name, uint64_t size, Error **errp); @@ -1241,7 +1241,7 @@ void memory_region_init_rom(MemoryRegion *mr, * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_rom_device(MemoryRegion *mr, - struct Object *owner, + Object *owner, const MemoryRegionOps *ops, void *opaque, const char *name, @@ -1254,7 +1254,7 @@ void memory_region_init_rom_device(MemoryRegion *mr, * * @mr: the memory region being queried. */ -struct Object *memory_region_owner(MemoryRegion *mr); +Object *memory_region_owner(MemoryRegion *mr); /** * memory_region_size: get a memory region's size. diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h index 8578f5a..2ff9f7a 100644 --- a/include/hw/ppc/pnv_xscom.h +++ b/include/hw/ppc/pnv_xscom.h @@ -139,7 +139,7 @@ int pnv_dt_xscom(PnvChip *chip, void *fdt, int root_offset, void pnv_xscom_add_subregion(PnvChip *chip, hwaddr offset, MemoryRegion *mr); void pnv_xscom_region_init(MemoryRegion *mr, - struct Object *owner, + Object *owner, const MemoryRegionOps *ops, void *opaque, const char *name, -- cgit v1.1 From 6d8980a38fa7a7ebcdf20120a67feb7b35488a53 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 9 Mar 2021 16:22:58 +0000 Subject: qemu-common.h: Update copyright string to 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the common copyright string that we use in -version reports, About dialogs, etc, to 2021. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20210309162258.28633-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- include/qemu-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/qemu-common.h b/include/qemu-common.h index 6546214..73bcf76 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -13,7 +13,7 @@ #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR) /* Copyright string for -version arguments, About dialogs, etc */ -#define QEMU_COPYRIGHT "Copyright (c) 2003-2020 " \ +#define QEMU_COPYRIGHT "Copyright (c) 2003-2021 " \ "Fabrice Bellard and the QEMU Project developers" /* Bug reporting information for --help arguments, About dialogs, etc */ -- cgit v1.1 From 0a38950931af0088449a6f224809acd0214d9d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 11 Jan 2021 16:20:19 +0100 Subject: sysemu/runstate: Let runstate_is_running() return bool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit runstate_check() returns a boolean. runstate_is_running() returns what runstate_check() returns, also a boolean. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Reviewed-by: Alex Bennée Message-Id: <20210111152020.1422021-2-philmd@redhat.com> Signed-off-by: Laurent Vivier --- include/sysemu/runstate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index e557f47..3ab35a0 100644 --- a/include/sysemu/runstate.h +++ b/include/sysemu/runstate.h @@ -6,7 +6,7 @@ bool runstate_check(RunState state); void runstate_set(RunState new_state); -int runstate_is_running(void); +bool runstate_is_running(void); bool runstate_needs_reset(void); bool runstate_store(char *str, size_t size); -- cgit v1.1 From 538f049704e9b7a07eeaf326af772fdd30d89576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 11 Jan 2021 16:20:20 +0100 Subject: sysemu: Let VMChangeStateHandler take boolean 'running' argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'running' argument from VMChangeStateHandler does not require other value than 0 / 1. Make it a plain boolean. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Acked-by: David Gibson Message-Id: <20210111152020.1422021-3-philmd@redhat.com> Signed-off-by: Laurent Vivier --- include/sysemu/runstate.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index 3ab35a0..a535691 100644 --- a/include/sysemu/runstate.h +++ b/include/sysemu/runstate.h @@ -10,7 +10,7 @@ bool runstate_is_running(void); bool runstate_needs_reset(void); bool runstate_store(char *str, size_t size); -typedef void VMChangeStateHandler(void *opaque, int running, RunState state); +typedef void VMChangeStateHandler(void *opaque, bool running, RunState state); VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb, void *opaque); @@ -20,7 +20,13 @@ VMChangeStateEntry *qdev_add_vm_change_state_handler(DeviceState *dev, VMChangeStateHandler *cb, void *opaque); void qemu_del_vm_change_state_handler(VMChangeStateEntry *e); -void vm_state_notify(int running, RunState state); +/** + * vm_state_notify: Notify the state of the VM + * + * @running: whether the VM is running or not. + * @state: the #RunState of the VM. + */ +void vm_state_notify(bool running, RunState state); static inline bool shutdown_caused_by_guest(ShutdownCause cause) { -- cgit v1.1