diff options
-rw-r--r-- | MAINTAINERS | 4 | ||||
-rw-r--r-- | accel/tcg/plugin-gen.c | 6 | ||||
-rw-r--r-- | block/io.c | 2 | ||||
-rw-r--r-- | gdbstub/internals.h | 26 | ||||
-rw-r--r-- | gdbstub/system.c | 10 | ||||
-rw-r--r-- | hw/arm/smmu-common.c | 2 | ||||
-rw-r--r-- | hw/i386/kvm/xen_evtchn.c | 2 | ||||
-rw-r--r-- | hw/i386/pc.c | 4 | ||||
-rw-r--r-- | hw/net/virtio-net.c | 4 | ||||
-rw-r--r-- | hw/nvme/ctrl.c | 2 | ||||
-rw-r--r-- | plugins/loader.c | 2 | ||||
-rw-r--r-- | target/arm/hvf/hvf.c | 2 | ||||
-rw-r--r-- | target/i386/hvf/hvf.c | 2 | ||||
-rw-r--r-- | target/ppc/cpu_init.c | 4 | ||||
-rw-r--r-- | tests/qtest/libqos/ahci.c | 2 | ||||
-rw-r--r-- | tests/qtest/libqos/ahci.h | 1 |
16 files changed, 37 insertions, 38 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index a07af6b9d4..e71183eef9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1545,7 +1545,7 @@ F: pc-bios/skiboot.lid F: tests/qtest/pnv* pca955x -M: Glenn Miles <milesg@linux.vnet.ibm.com> +M: Glenn Miles <milesg@linux.ibm.com> L: qemu-ppc@nongnu.org L: qemu-arm@nongnu.org S: Odd Fixes @@ -3013,7 +3013,7 @@ F: include/qapi/error.h F: include/qemu/error-report.h F: qapi/error.json F: util/error.c -F: util/qemu-error.c +F: util/error-report.c F: scripts/coccinelle/err-bad-newline.cocci F: scripts/coccinelle/error-use-after-free.cocci F: scripts/coccinelle/error_propagate_null.cocci diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 8028786c7b..cd78ef94a1 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -57,12 +57,6 @@ #include "exec/helper-info.c.inc" #undef HELPER_H -#ifdef CONFIG_SOFTMMU -# define CONFIG_SOFTMMU_GATE 1 -#else -# define CONFIG_SOFTMMU_GATE 0 -#endif - /* * plugin_cb_start TCG op args[]: * 0: enum plugin_gen_from diff --git a/block/io.c b/block/io.c index 395bea3bac..7217cf811b 100644 --- a/block/io.c +++ b/block/io.c @@ -1730,7 +1730,7 @@ static int bdrv_pad_request(BlockDriverState *bs, * For prefetching in stream_populate(), no qiov is passed along, because * only copy-on-read matters. */ - if (qiov && *qiov) { + if (*qiov) { sliced_iov = qemu_iovec_slice(*qiov, *qiov_offset, *bytes, &sliced_head, &sliced_tail, &sliced_niov); diff --git a/gdbstub/internals.h b/gdbstub/internals.h index e83b179920..32f9f63297 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -115,7 +115,7 @@ void gdb_read_byte(uint8_t ch); /* * Packet acknowledgement - we handle this slightly differently - * between user and softmmu mode, mainly to deal with the differences + * between user and system mode, mainly to deal with the differences * between the flexible chardev and the direct fd approaches. * * We currently don't support a negotiated QStartNoAckMode @@ -125,7 +125,7 @@ void gdb_read_byte(uint8_t ch); * gdb_got_immediate_ack() - check ok to continue * * Returns true to continue, false to re-transmit for user only, the - * softmmu stub always returns true. + * system stub always returns true. */ bool gdb_got_immediate_ack(void); /* utility helpers */ @@ -135,12 +135,12 @@ CPUState *gdb_first_attached_cpu(void); void gdb_append_thread_id(CPUState *cpu, GString *buf); int gdb_get_cpu_index(CPUState *cpu); unsigned int gdb_get_max_cpus(void); /* both */ -bool gdb_can_reverse(void); /* softmmu, stub for user */ +bool gdb_can_reverse(void); /* system emulation, stub for user */ int gdb_target_sigtrap(void); /* user */ void gdb_create_default_process(GDBState *s); -/* signal mapping, common for softmmu, specialised for user-mode */ +/* signal mapping, common for system, specialised for user-mode */ int gdb_signal_to_target(int sig); int gdb_target_signal_to_gdb(int sig); @@ -157,12 +157,12 @@ void gdb_continue(void); int gdb_continue_partial(char *newstates); /* - * Helpers with separate softmmu and user implementations + * Helpers with separate system and user implementations */ void gdb_put_buffer(const uint8_t *buf, int len); /* - * Command handlers - either specialised or softmmu or user only + * Command handlers - either specialised or system or user only */ void gdb_init_gdbserver_state(void); @@ -187,7 +187,7 @@ typedef union GdbCmdVariant { #define get_param(p, i) (&g_array_index(p, GdbCmdVariant, i)) -void gdb_handle_query_rcmd(GArray *params, void *user_ctx); /* softmmu */ +void gdb_handle_query_rcmd(GArray *params, void *ctx); /* system */ void gdb_handle_query_offsets(GArray *params, void *user_ctx); /* user */ void gdb_handle_query_xfer_auxv(GArray *params, void *user_ctx); /*user */ void gdb_handle_query_xfer_siginfo(GArray *params, void *user_ctx); /*user */ @@ -201,11 +201,11 @@ void gdb_handle_query_supported_user(const char *gdb_supported); /* user */ bool gdb_handle_set_thread_user(uint32_t pid, uint32_t tid); /* user */ bool gdb_handle_detach_user(uint32_t pid); /* user */ -void gdb_handle_query_attached(GArray *params, void *user_ctx); /* both */ +void gdb_handle_query_attached(GArray *params, void *ctx); /* both */ -/* softmmu only */ -void gdb_handle_query_qemu_phy_mem_mode(GArray *params, void *user_ctx); -void gdb_handle_set_qemu_phy_mem_mode(GArray *params, void *user_ctx); +/* system only */ +void gdb_handle_query_qemu_phy_mem_mode(GArray *params, void *ctx); +void gdb_handle_set_qemu_phy_mem_mode(GArray *params, void *ctx); /* sycall handling */ void gdb_handle_file_io(GArray *params, void *user_ctx); @@ -213,11 +213,11 @@ bool gdb_handled_syscall(void); void gdb_disable_syscalls(void); void gdb_syscall_reset(void); -/* user/softmmu specific syscall handling */ +/* user/system specific syscall handling */ void gdb_syscall_handling(const char *syscall_packet); /* - * Break/Watch point support - there is an implementation for softmmu + * Break/Watch point support - there is an implementation for system * and user mode. */ bool gdb_supports_guest_debug(void); diff --git a/gdbstub/system.c b/gdbstub/system.c index 83fd452800..d235403855 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -1,5 +1,5 @@ /* - * gdb server stub - softmmu specific bits + * gdb server stub - system specific bits * * Debug integration depends on support from the individual * accelerators so most of this involves calling the ops helpers. @@ -488,13 +488,13 @@ bool gdb_can_reverse(void) */ void gdb_handle_query_qemu_phy_mem_mode(GArray *params, - void *user_ctx) + void *ctx) { g_string_printf(gdbserver_state.str_buf, "%d", phy_memory_mode); gdb_put_strbuf(); } -void gdb_handle_set_qemu_phy_mem_mode(GArray *params, void *user_ctx) +void gdb_handle_set_qemu_phy_mem_mode(GArray *params, void *ctx) { if (!params->len) { gdb_put_packet("E22"); @@ -509,7 +509,7 @@ void gdb_handle_set_qemu_phy_mem_mode(GArray *params, void *user_ctx) gdb_put_packet("OK"); } -void gdb_handle_query_rcmd(GArray *params, void *user_ctx) +void gdb_handle_query_rcmd(GArray *params, void *ctx) { const guint8 zero = 0; int len; @@ -539,7 +539,7 @@ void gdb_handle_query_rcmd(GArray *params, void *user_ctx) * Execution state helpers */ -void gdb_handle_query_attached(GArray *params, void *user_ctx) +void gdb_handle_query_attached(GArray *params, void *ctx) { gdb_put_packet("1"); } diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 4caedb4998..c4b540656c 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -197,7 +197,7 @@ void smmu_iotlb_inv_asid(SMMUState *s, uint16_t asid) g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_asid, &asid); } -inline void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid) +void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid) { trace_smmu_iotlb_inv_vmid(vmid); g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid); diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c index a5052c0ea3..07bd0c9ab8 100644 --- a/hw/i386/kvm/xen_evtchn.c +++ b/hw/i386/kvm/xen_evtchn.c @@ -1097,7 +1097,7 @@ static int close_port(XenEvtchnState *s, evtchn_port_t port, int xen_evtchn_soft_reset(void) { XenEvtchnState *s = xen_evtchn_singleton; - bool flush_kvm_routes; + bool flush_kvm_routes = false; int i; if (!s) { diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e80f02bef4..5c21b0c4db 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1738,7 +1738,9 @@ static void pc_machine_initfn(Object *obj) pcms->pcspk = isa_new(TYPE_PC_SPEAKER); object_property_add_alias(OBJECT(pcms), "pcspk-audiodev", OBJECT(pcms->pcspk), "audiodev"); - cxl_machine_init(obj, &pcms->cxl_devices_state); + if (pcmc->pci_enabled) { + cxl_machine_init(obj, &pcms->cxl_devices_state); + } pcms->machine_done.notify = pc_machine_done; qemu_add_machine_init_done_notifier(&pcms->machine_done); diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index a6ff000cd9..58014a92ad 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -2865,6 +2865,10 @@ static void virtio_net_handle_tx_bh(VirtIODevice *vdev, VirtQueue *vq) VirtIONet *n = VIRTIO_NET(vdev); VirtIONetQueue *q = &n->vqs[vq2q(virtio_get_queue_index(vq))]; + if (unlikely(n->vhost_started)) { + return; + } + if (unlikely((n->status & VIRTIO_NET_S_LINK_UP) == 0)) { virtio_net_drop_tx_queue_data(vdev, vq); return; diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index c2b17de987..127c3d2383 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -5894,7 +5894,7 @@ static uint16_t nvme_get_feature(NvmeCtrl *n, NvmeRequest *req) uint32_t dw10 = le32_to_cpu(cmd->cdw10); uint32_t dw11 = le32_to_cpu(cmd->cdw11); uint32_t nsid = le32_to_cpu(cmd->nsid); - uint32_t result; + uint32_t result = 0; uint8_t fid = NVME_GETSETFEAT_FID(dw10); NvmeGetFeatureSelect sel = NVME_GETFEAT_SELECT(dw10); uint16_t iv; diff --git a/plugins/loader.c b/plugins/loader.c index 9768b78eb6..513a429c57 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -390,7 +390,7 @@ void plugin_reset_uninstall(qemu_plugin_id_t id, bool reset) { struct qemu_plugin_reset_data *data; - struct qemu_plugin_ctx *ctx; + struct qemu_plugin_ctx *ctx = NULL; WITH_QEMU_LOCK_GUARD(&plugin.lock) { ctx = plugin_id_to_ctx_locked(id); diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index e5f0f60093..65a5601804 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2246,7 +2246,7 @@ void hvf_arch_update_guest_debug(CPUState *cpu) hvf_arch_set_traps(); } -inline bool hvf_arch_supports_guest_debug(void) +bool hvf_arch_supports_guest_debug(void) { return true; } diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 11ffdd4c69..1ed8ed5154 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -708,7 +708,7 @@ void hvf_arch_update_guest_debug(CPUState *cpu) { } -inline bool hvf_arch_supports_guest_debug(void) +bool hvf_arch_supports_guest_debug(void) { return false; } diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 22fdea093b..6241de62ce 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -1642,7 +1642,7 @@ static void register_8xx_sprs(CPUPPCState *env) /*****************************************************************************/ /* Exception vectors models */ -static void init_excp_4xx_softmmu(CPUPPCState *env) +static void init_excp_4xx(CPUPPCState *env) { #if !defined(CONFIG_USER_ONLY) env->excp_vectors[POWERPC_EXCP_CRITICAL] = 0x00000100; @@ -2120,7 +2120,7 @@ static void init_proc_405(CPUPPCState *env) env->id_tlbs = 0; env->tlb_type = TLB_EMB; #endif - init_excp_4xx_softmmu(env); + init_excp_4xx(env); env->dcache_line_size = 32; env->icache_line_size = 32; /* Allocate hardware IRQ controller */ diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c index a2c94c6e06..6d59c7551a 100644 --- a/tests/qtest/libqos/ahci.c +++ b/tests/qtest/libqos/ahci.c @@ -662,7 +662,7 @@ unsigned ahci_pick_cmd(AHCIQState *ahci, uint8_t port) g_assert_not_reached(); } -inline unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd) +static unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd) { /* Each PRD can describe up to 4MiB */ g_assert_cmphex(bytes_per_prd, <=, 4096 * 1024); diff --git a/tests/qtest/libqos/ahci.h b/tests/qtest/libqos/ahci.h index 48017864bf..a0487a1557 100644 --- a/tests/qtest/libqos/ahci.h +++ b/tests/qtest/libqos/ahci.h @@ -599,7 +599,6 @@ void ahci_port_check_cmd_sanity(AHCIQState *ahci, AHCICommand *cmd); /* Misc */ bool is_atapi(AHCIQState *ahci, uint8_t port); -unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd); /* Command: Macro level execution */ void ahci_guest_io(AHCIQState *ahci, uint8_t port, uint8_t ide_cmd, |