Trivial patches for 2015-04-30
Hello.
This is the first pull request for trivial-patches tree since 2.3 has been released. During the freeze many patches has been accumulated, and even more has been received after 2.4 developmnent has been opened.
So here we have 42 trivial patches, which is kinda too much, but that's what we have :)
Please consider applying.
Thanks,
/mjt
The following changes since commit a9392bc93c8615ad1983047e9f91ee3fa8aae75f:
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2015-04-28 16:55:03 +0100)
are available in the git repository at:
git://git.corpit.ru/qemu.git tags/pull-trivial-patches-2015-04-30
for you to fetch changes up to fe31d3e6e6945b509e5b4ab03d38aae1266fe64e:
microblaze: fix memory leak (2015-04-30 08:06:20 +0300)
----------------------------------------------------------------
trivial patches for 2015-04-30
----------------------------------------------------------------
Chih-Min Chao (5):
bitops : fix coding style
ui/vnc : fix coding style
ui/vnc : remove 'struct' of 'typedef struct' ui/console : remove 'struct' from 'typedef struct' type hw/display : remove 'struct' from 'typedef QXL struct'
Emilio G. Cota (6):
cpus: use first_cpu macro instead of QTAILQ_FIRST(&cpus)
input: remove unused mouse_handlers list
qemu-char: remove unused list node from FDCharDriver
coroutine: remove unnecessary parentheses in qemu_co_queue_empty linux-user/elfload: use QTAILQ_FOREACH instead of open-coding it
i440fx-test: remove ARRAY_SIZE redefinition
Gonglei (3):
target-mips: fix memory leak
vhost-user: remove superfluous '\n' around error_report()
microblaze: fix memory leak
Jan Kiszka (1):
hostmem: Fix mem-path property name in error report
John Snow (1):
qmp-commands: Fix typo
Laszlo Ersek (1):
docs/atomics.txt: fix two typos
Michael Tokarev (3):
qemu-options: trivial spelling fix (messsage)
libcacard: do not use full paths for include files in the same dir
microblaze: cpu: Renumber EXCP_* constants to close gap
Paolo Bonzini (3):
range: remove useless inclusions
qemu-config: remove stray inclusions of hw/ files
libcacard: stop including qemu-common.h
Peter Crosthwaite (9):
arm: cpu.h: Remove unused typdefs
configure: alphabetize tricore in target list
defconfigs: Piggyback microblazeel on microblaze
microblaze: mmu: Delete flip_um fn prototype
microblaze: cpu: Remote unused cpu_get_pc
microblaze: cpu: Remove unused CC_OP enum
microblaze: cpu: Delete EXCP_NMI
microblaze: cpu: delete unused cpu_interrupts_enabled
tcg: Delete unused cpu_pc_from_tb()
Stefan Berger (3):
tpm: Cast 64bit variables to int when used in DPRINTF
tpm: Modify DPRINTF to enable -Wformat checking
tpm: fix coding style
Stefan Weil (1):
misc: Fix new collection of typos
Thomas Huth (6):
vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags()
pci: Remove unused function ich9_d2pbr_init()
monitor: Remove unused functions
usb: Remove unused functions
util: Remove unused functions
kvm: Silence warning from valgrind
backends/hostmem-file.c | 2 +- configure | 4 +- cpus.c | 2 +- default-configs/microblazeel-softmmu.mak | 10 +---- dma-helpers.c | 1 - docs/atomics.txt | 4 +- hmp.h | 1 - hw/acpi/pcihp.c | 1 - hw/block/virtio-blk.c | 2 +- hw/display/qxl.c | 2 +- hw/i386/acpi-build.c | 1 - hw/microblaze/boot.c | 13 ++++--- hw/mips/mips_fulong2e.c | 1 + hw/mips/mips_malta.c | 1 + hw/mips/mips_r4k.c | 1 + hw/misc/edu.c | 2 +- hw/net/virtio-net.c | 2 +- hw/net/vmxnet_rx_pkt.c | 7 ---- hw/net/vmxnet_rx_pkt.h | 9 ----- hw/pci-bridge/i82801b11.c | 21 ---------- hw/ppc/spapr.c | 2 +- hw/tpm/tpm_passthrough.c | 16 ++++---- hw/tpm/tpm_tis.c | 26 ++++++------- hw/usb/core.c | 41 -------------------- hw/virtio/vhost-user.c | 22 +++++------ include/hw/i386/ich9.h | 2 - include/hw/pci-host/q35.h | 1 - include/hw/usb.h | 5 --- include/monitor/monitor.h | 1 - include/qemu-common.h | 4 -- include/qemu/bitops.h | 61 ++++++++++++++--------------- include/qemu/compatfd.h | 1 - kvm-all.c | 14 +++---- libcacard/cac.c | 5 ++- libcacard/card_7816.c | 4 +- libcacard/event.c | 2 +- libcacard/vcard.c | 4 +- libcacard/vcard_emul_nss.c | 4 +- libcacard/vcardt.c | 4 +- libcacard/vreader.c | 4 +- libcacard/vscclient.c | 8 +++- linux-user/elfload.c | 3 +- monitor.c | 13 ------- qemu-char.c | 1 - qemu-coroutine-lock.c | 2 +- qemu-options.hx | 2 +- qga/qapi-schema.json | 2 +- qmp-commands.hx | 4 +- target-arm/cpu.h | 14 ------- target-microblaze/cpu.h | 27 +++---------- target-microblaze/mmu.h | 1 - target-s390x/mmu_helper.c | 8 ++-- target-s390x/translate.c | 2 +- target-tricore/cpu.h | 5 --- tcg/tcg.h | 6 ++- tests/i440fx-test.c | 2 - tests/libqos/ahci.c | 4 +- ui/console.c | 4 +- ui/input-legacy.c | 2 - ui/spice-display.c | 8 ++-- ui/vnc-auth-vencrypt.c | 8 ++-- ui/vnc-tls.c | 10 ++--- ui/vnc-ws.c | 4 +- ui/vnc.c | 2 +- util/compatfd.c | 19 --------- util/osdep.c | 66 -------------------------------- util/qemu-config.c | 2 - 67 files changed, 156 insertions(+), 383 deletions(-)
[Qemu-devel] [PULL 02/42] tpm: Modify DPRINTF to enable -Wformat checking
From: Stefan Berger <[email protected]>
Modify DPRINTF to always enable -Wformat checking.
--- hw/tpm/tpm_passthrough.c | 16 +++++++--------- hw/tpm/tpm_tis.c | 14 ++++++-------- 2 files changed, 13 insertions(+), 17 deletions(-)
hw/tpm/tpm_passthrough.c +7 -9
@@ -34,15 +34,13 @@#include "sysemu/tpm_backend_int.h" #include "tpm_tis.h" -/* #define DEBUG_TPM */ - -#ifdef DEBUG_TPM -#define DPRINTF (fmt, ...) \ - do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) -#else -#define DPRINTF (fmt, ...) \ - do { } while (0) -#endif +#define DEBUG_TPM 0 + +#define DPRINTF (fmt, ...) do { \ + if (DEBUG_TPM) { \ + fprintf(stderr, fmt, ## __VA_ARGS__); \ + } \ +} while (0);#define TYPE_TPM_PASSTHROUGH "tpm-passthrough"#define TPM_PASSTHROUGH (obj) \
hw/tpm/tpm_tis.c +6 -8
@@ -30,15 +30,13 @@#include "qemu-common.h" #include "qemu/main-loop.h" -/*#define DEBUG_TIS */ +#define DEBUG_TIS 0 -#ifdef DEBUG_TIS -#define DPRINTF (fmt, ...) \ - do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) -#else -#define DPRINTF (fmt, ...) \ - do { } while (0) -#endif +#define DPRINTF (fmt, ...) do { \ + if (DEBUG_TIS) { \ + printf(fmt, ## __VA_ARGS__); \ + } \ +} while (0);/* whether the STS interrupt is supported */ #define RAISE_STS_IRQ
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 10/42] qemu-config: remove stray inclusions of hw/ files
In reply to Michael TokarevFrom: Paolo Bonzini <[email protected]>
--- util/qemu-config.c | 2 -- 1 file changed, 2 deletions(-)
util/qemu-config.c +0 -2
@@ -3,10 +3,8 @@#include "qemu/option.h" #include "qemu/config-file.h" #include "qapi/qmp/qerror.h" -#include "hw/qdev.h" #include "qapi/error.h" #include "qmp-commands.h" -#include "hw/i386/pc.h" static QemuOptsList *vm_config_groups[32 ];static QemuOptsList *drive_config_groups[4 ];
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 03/42] bitops : fix coding style
In reply to Michael TokarevFrom: Chih-Min Chao <[email protected]>
don't mix tab and space. The rule is 4 spaces
--- include/qemu/bitops.h | 61 ++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 30 deletions(-)
include/qemu/bitops.h +31 -30
@@ -20,10 +20,10 @@#define BITS_PER_BYTE CHAR_BIT#define BITS_PER_LONG (sizeof (unsigned long) * BITS_PER_BYTE) -#define BIT (nr) (1UL << (nr)) -#define BIT_MASK (nr) (1UL << ((nr) % BITS_PER_LONG)) -#define BIT_WORD (nr) ((nr) / BITS_PER_LONG) -#define BITS_TO_LONGS (nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) +#define BIT (nr) (1UL << (nr)) +#define BIT_MASK (nr) (1UL << ((nr) % BITS_PER_LONG)) +#define BIT_WORD (nr) ((nr) / BITS_PER_LONG) +#define BITS_TO_LONGS (nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))/** * set_bit - Set a bit in memory
@@ -32,10 +32,10 @@*/ static inline void set_bit (long nr,unsigned long *addr) { -unsigned long mask =BIT_MASK (nr); -unsigned long *p = addr +BIT_WORD (nr); +unsigned long mask =BIT_MASK (nr); +unsigned long *p = addr +BIT_WORD (nr); - *p |= mask; + *p |= mask; }/**
@@ -45,10 +45,10 @@ static inline void set_bit(long nr, unsigned long *addr)*/ static inline void clear_bit (long nr,unsigned long *addr) { -unsigned long mask =BIT_MASK (nr); -unsigned long *p = addr +BIT_WORD (nr); +unsigned long mask =BIT_MASK (nr); +unsigned long *p = addr +BIT_WORD (nr); - *p &= ~mask; + *p &= ~mask; }/**
@@ -58,10 +58,10 @@ static inline void clear_bit(long nr, unsigned long *addr)*/ static inline void change_bit (long nr,unsigned long *addr) { -unsigned long mask =BIT_MASK (nr); -unsigned long *p = addr +BIT_WORD (nr); +unsigned long mask =BIT_MASK (nr); +unsigned long *p = addr +BIT_WORD (nr); - *p ^= mask; + *p ^= mask; }/**
@@ -71,12 +71,12 @@ static inline void change_bit(long nr, unsigned long *addr)*/ static inline int test_and_set_bit (long nr,unsigned long *addr) { -unsigned long mask =BIT_MASK (nr); -unsigned long *p = addr +BIT_WORD (nr); -unsigned long old = *p; +unsigned long mask =BIT_MASK (nr); +unsigned long *p = addr +BIT_WORD (nr); +unsigned long old = *p; - *p = old | mask; -return (old & mask) !=0 ; + *p = old | mask; +return (old & mask) !=0 ; }/**
@@ -86,12 +86,12 @@ static inline int test_and_set_bit(long nr, unsigned long *addr)*/ static inline int test_and_clear_bit (long nr,unsigned long *addr) { -unsigned long mask =BIT_MASK (nr); -unsigned long *p = addr +BIT_WORD (nr); -unsigned long old = *p; +unsigned long mask =BIT_MASK (nr); +unsigned long *p = addr +BIT_WORD (nr); +unsigned long old = *p; - *p = old & ~mask; -return (old & mask) !=0 ; + *p = old & ~mask; +return (old & mask) !=0 ; }/**
@@ -101,12 +101,12 @@ static inline int test_and_clear_bit(long nr, unsigned long *addr)*/ static inline int test_and_change_bit (long nr,unsigned long *addr) { -unsigned long mask =BIT_MASK (nr); -unsigned long *p = addr +BIT_WORD (nr); -unsigned long old = *p; +unsigned long mask =BIT_MASK (nr); +unsigned long *p = addr +BIT_WORD (nr); +unsigned long old = *p; - *p = old ^ mask; -return (old & mask) !=0 ; + *p = old ^ mask; +return (old & mask) !=0 ; }/**
@@ -116,7 +116,7 @@ static inline int test_and_change_bit(long nr, unsigned long *addr)*/ static inline int test_bit (long nr,const unsigned long *addr) { -return 1UL & (addr[BIT_WORD (nr)] >> (nr & (BITS_PER_LONG -1 ))); +return 1UL & (addr[BIT_WORD (nr)] >> (nr & (BITS_PER_LONG -1 ))); }/**
@@ -136,7 +136,8 @@ unsigned long find_last_bit(const unsigned long *addr,* @size: The bitmap size in bits */ unsigned long find_next_bit (const unsigned long *addr, -unsigned long size,unsigned long offset); +unsigned long size, +unsigned long offset);/** * find_next_zero_bit - find the next cleared bit in a memory region
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 05/42] ui/vnc : remove 'struct' of 'typedef struct'
In reply to Michael TokarevFrom: Chih-Min Chao <[email protected]>
--- ui/vnc-auth-vencrypt.c | 4 ++-- ui/vnc-tls.c | 10 +++++----- ui/vnc-ws.c | 4 ++-- ui/vnc.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)
ui/vnc-auth-vencrypt.c +2 -2
@@ -65,7 +65,7 @@ static void start_auth_vencrypt_subauth(VncState *vs)static void vnc_tls_handshake_io (void *opaque); -static int vnc_start_vencrypt_handshake (struct VncState *vs) +static int vnc_start_vencrypt_handshake (VncState *vs) {int ret;
@@ -103,7 +103,7 @@ static int vnc_start_vencrypt_handshake(struct VncState *vs)static void vnc_tls_handshake_io (void *opaque) { -struct VncState *vs = (struct VncState *)opaque; +VncState *vs = (VncState *)opaque;VNC_DEBUG ("Handshake IO continue\n" );vnc_start_vencrypt_handshake (vs);
ui/vnc-tls.c +5 -5
@@ -68,7 +68,7 @@ static int vnc_tls_initialize(void)static ssize_t vnc_tls_push (gnutls_transport_ptr_t transport,const void *data,size_t len) { -struct VncState *vs = (struct VncState *)transport; +VncState *vs = (VncState *)transport;int ret; retry:
@@ -85,7 +85,7 @@ static ssize_t vnc_tls_push(gnutls_transport_ptr_t transport,static ssize_t vnc_tls_pull (gnutls_transport_ptr_t transport,void *data,size_t len) { -struct VncState *vs = (struct VncState *)transport; +VncState *vs = (VncState *)transport;int ret; retry:
@@ -170,7 +170,7 @@ static gnutls_certificate_credentials_t vnc_tls_initialize_x509_cred(VncDisplay } -int vnc_tls_validate_certificate (struct VncState *vs) +int vnc_tls_validate_certificate (VncState *vs) {int ret;unsigned int status;
@@ -332,7 +332,7 @@ static int vnc_set_gnutls_priority(gnutls_session_t s, int x509)#endif -int vnc_tls_client_setup (struct VncState *vs, +int vnc_tls_client_setup (VncState *vs,int needX509Creds) {VNC_DEBUG ("Do TLS setup\n" );if (vnc_tls_initialize () <0 ) {
@@ -410,7 +410,7 @@ int vnc_tls_client_setup(struct VncState *vs, } -void vnc_tls_client_cleanup (struct VncState *vs) +void vnc_tls_client_cleanup (VncState *vs) {if (vs->tls.session) {gnutls_deinit (vs->tls.session);
ui/vnc-ws.c +2 -2
@@ -24,7 +24,7 @@#ifdef CONFIG_VNC_TLS #include "qemu/sockets.h" -static int vncws_start_tls_handshake (struct VncState *vs) +static int vncws_start_tls_handshake (VncState *vs) {int ret =gnutls_handshake (vs->tls.session);
@@ -63,7 +63,7 @@ static int vncws_start_tls_handshake(struct VncState *vs)void vncws_tls_handshake_io (void *opaque) { -struct VncState *vs = (struct VncState *)opaque; +VncState *vs = (VncState *)opaque;if (!vs->tls.session) {VNC_DEBUG ("TLS Websocket setup\n" );
ui/vnc.c +1 -1
@@ -1046,7 +1046,7 @@ static void vnc_dpy_cursor_define(DisplayChangeListener *dcl, } } -static int find_and_clear_dirty_height (struct VncState *vs, +static int find_and_clear_dirty_height (VncState *vs,int y,int last_x,int x,int height) {int h;
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 12/42] hostmem: Fix mem-path property name in error report
In reply to Michael TokarevFrom: Jan Kiszka <[email protected]>
The subtle difference between "property not found" and "property not set" is already confusing enough.
--- backends/hostmem-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
backends/hostmem-file.c +1 -1
@@ -43,7 +43,7 @@ file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)return ; }if (!fb->mem_path) { -error_setg (errp,"mem_path property not set" ); +error_setg (errp,"mem-path property not set" );return ; }#ifndef CONFIG_LINUX
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 27/42] microblaze: cpu: Remove unused CC_OP enum
In reply to Michael TokarevFrom: Peter Crosthwaite <[email protected]>
This enum is not used by anything. Remove.
--- target-microblaze/cpu.h | 6 ------ 1 file changed, 6 deletions(-)
target-microblaze/cpu.h +0 -6
@@ -284,12 +284,6 @@ int cpu_mb_exec(CPUMBState *s);int cpu_mb_signal_handler (int host_signum,void *pinfo,void *puc); -enum { -CC_OP_DYNAMIC ,/* Use env->cc_op */ -CC_OP_FLAGS , -CC_OP_CMP , -}; -/* FIXME: MB uses variable pages down to 1K but linux only uses 4k. */ #define TARGET_PAGE_BITS 12#define MMAP_SHIFT TARGET_PAGE_BITS
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 20/42] configure: alphabetize tricore in target list
In reply to Michael TokarevFrom: Peter Crosthwaite <[email protected]>
tricore was out of alphabetical order in the target list. Fix.
--- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
@@ -5169,8 +5169,6 @@ case "$target_name" in TARGET_BASE_ARCH=mips echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak ;; - tricore) - ;; moxie) ;; or32)
@@ -5221,6 +5219,8 @@ case "$target_name" in s390x) gdb_xml_files="s390x-core64.xml s390-acr.xml s390-fpr.xml" ;; + tricore) + ;; unicore32) ;; xtensa|xtensaeb)
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 30/42] microblaze: cpu: delete unused cpu_interrupts_enabled
In reply to Michael TokarevFrom: Peter Crosthwaite <[email protected]>
This function is unused. Remove.
--- target-microblaze/cpu.h | 5 ----- 1 file changed, 5 deletions(-)
target-microblaze/cpu.h +0 -5
@@ -319,11 +319,6 @@ static inline int cpu_mmu_index (CPUMBState *env)int mb_cpu_handle_mmu_fault (CPUState *cpu,vaddr address,int rw,int mmu_idx); -static inline int cpu_interrupts_enabled (CPUMBState *env) -{ -return env->sregs[SR_MSR ] &MSR_IE ; -} -#include "exec/cpu-all.h" static inline void cpu_get_tb_cpu_state(CPUMBState *env, target_ulong *pc,
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 14/42] vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags()
In reply to Michael TokarevFrom: Thomas Huth <[email protected]>
The function is not used anymore and thus can be deleted.
--- hw/net/vmxnet_rx_pkt.c | 7 ------- hw/net/vmxnet_rx_pkt.h | 9 --------- 2 files changed, 16 deletions(-)
hw/net/vmxnet_rx_pkt.c +0 -7
@@ -172,13 +172,6 @@ bool vmxnet_rx_pkt_has_virt_hdr(struct VmxnetRxPkt *pkt)return pkt->has_virt_hdr; } -uint16_t vmxnet_rx_pkt_get_num_frags (struct VmxnetRxPkt *pkt) -{ -assert (pkt); - -return pkt->vec_len; -} -uint16_t vmxnet_rx_pkt_get_vlan_tag (struct VmxnetRxPkt *pkt) {assert (pkt);
hw/net/vmxnet_rx_pkt.h +0 -9
@@ -114,15 +114,6 @@ bool vmxnet_rx_pkt_is_vlan_stripped(struct VmxnetRxPkt *pkt);bool vmxnet_rx_pkt_has_virt_hdr (struct VmxnetRxPkt *pkt);/** -* returns number of frags attached to the packet -* -* @pkt: packet -* @ret: number of frags -* -*/ -uint16_t vmxnet_rx_pkt_get_num_frags (struct VmxnetRxPkt *pkt); - -/** * attach data to rx packet * * @pkt: packet
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 18/42] util: Remove unused functions
In reply to Michael TokarevFrom: Thomas Huth <[email protected]>
Delete the unused functions qemu_signalfd_available(), qemu_send_full() and qemu_recv_full().
--- include/qemu-common.h | 4 --- include/qemu/compatfd.h | 1 - util/compatfd.c | 19 -------------- util/osdep.c | 66 ------------------------------------------------- 4 files changed, 90 deletions(-)
include/qemu-common.h +0 -4
@@ -217,10 +217,6 @@ void *qemu_oom_check(void *ptr); ssize_t qemu_write_full(int fd, const void *buf, size_t count) QEMU_WARN_UNUSED_RESULT; -ssize_t qemu_send_full(int fd, const void *buf, size_t count, int flags) - QEMU_WARN_UNUSED_RESULT; -ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags) - QEMU_WARN_UNUSED_RESULT;#ifndef _WIN32int qemu_pipe (int pipefd[2 ]);
include/qemu/compatfd.h +0 -1
@@ -39,6 +39,5 @@ struct qemu_signalfd_siginfo { };int qemu_signalfd (const sigset_t *mask); -bool qemu_signalfd_available (void );#endif
util/compatfd.c +0 -19
@@ -108,22 +108,3 @@ int qemu_signalfd(const sigset_t *mask)return qemu_signalfd_compat (mask); } - -bool qemu_signalfd_available (void ) -{ -#ifdef CONFIG_SIGNALFD -sigset_t mask; -int fd; -bool ok; -sigemptyset (&mask); - errno =0 ; - fd =syscall (SYS_signalfd,-1 , &mask, _NSIG /8 ); - ok = (errno !=ENOSYS ); -if (fd >=0 ) { -close (fd); - } -return ok; -#else -return false; -#endif -}
util/osdep.c +0 -66
72 lines not on this page · raw message
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 07/42] hw/display : remove 'struct' from 'typedef QXL struct'
In reply to Michael TokarevFrom: Chih-Min Chao <[email protected]>
--- hw/display/qxl.c | 2 +- ui/spice-display.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
hw/display/qxl.c +1 -1
@@ -696,7 +696,7 @@ static inline void qxl_push_free_res(PCIQXLDevice *d, int flush)/* called from spice server thread context only */ static void interface_release_resource (QXLInstance *sin, -struct QXLReleaseInfoExt ext) +QXLReleaseInfoExt ext) {PCIQXLDevice *qxl =container_of (sin, PCIQXLDevice, ssd.qxl);QXLReleaseRing *ring;
ui/spice-display.c +3 -3
@@ -539,7 +539,7 @@ static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info) info->n_surfaces = ssd->num_surfaces; } -static int interface_get_command (QXLInstance *sin,struct QXLCommandExt *ext) +static int interface_get_command (QXLInstance *sin,QXLCommandExt *ext) {SimpleSpiceDisplay *ssd =container_of (sin, SimpleSpiceDisplay, qxl);SimpleSpiceUpdate *update;
@@ -566,7 +566,7 @@ static int interface_req_cmd_notification(QXLInstance *sin) }static void interface_release_resource (QXLInstance *sin, -struct QXLReleaseInfoExt rext) +QXLReleaseInfoExt rext) {SimpleSpiceDisplay *ssd =container_of (sin, SimpleSpiceDisplay, qxl);SimpleSpiceUpdate *update;
@@ -589,7 +589,7 @@ static void interface_release_resource(QXLInstance *sin, } } -static int interface_get_cursor_command (QXLInstance *sin,struct QXLCommandExt *ext) +static int interface_get_cursor_command (QXLInstance *sin,QXLCommandExt *ext) {SimpleSpiceDisplay *ssd =container_of (sin, SimpleSpiceDisplay, qxl);int ret;
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 01/42] tpm: Cast 64bit variables to int when used in DPRINTF
In reply to Michael TokarevFrom: Stefan Berger <[email protected]>
Cast 64bit variables to int when used in DPRINTF. They only contain 32bit of data.
--- hw/tpm/tpm_tis.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
hw/tpm/tpm_tis.c +4 -4
@@ -421,7 +421,7 @@ static void tpm_tis_dump_state(void *opaque, hwaddr addr)for (idx =0 ; regs[idx] !=0xfff ; idx++) {DPRINTF ("tpm_tis: 0x%04x : 0x%08x\n" , regs[idx], - (uint32_t )tpm_tis_mmio_read (opaque, base + regs[idx],4 )); + (int )tpm_tis_mmio_read (opaque, base + regs[idx],4 )); } DPRINTF("tpm_tis: read offset : %d\n"
@@ -555,7 +555,7 @@ static uint64_t tpm_tis_mmio_read(void *opaque, hwaddr addr, val >>= shift; } -DPRINTF ("tpm_tis: read.%u(%08x) = %08x\n" , size, (int )addr, (uint32_t )val); +DPRINTF ("tpm_tis: read.%u(%08x) = %08x\n" , size, (int )addr, (int )val);return val; }
@@ -578,7 +578,7 @@ static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr,uint16_t len;uint32_t mask = (size ==1 ) ?0xff : ((size ==2 ) ?0xffff : ~0 ); -DPRINTF ("tpm_tis: write.%u(%08x) = %08x\n" , size, (int )addr, (uint32_t )val); +DPRINTF ("tpm_tis: write.%u(%08x) = %08x\n" , size, (int )addr, (int )val);if (locty ==4 && !hw_access) {DPRINTF ("tpm_tis: Access to locality 4 only allowed from hardware\n" );
@@ -815,7 +815,7 @@ static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr,/* drop the byte */ }else {DPRINTF ("tpm_tis: Data to send to TPM: %08x (size=%d)\n" , - val, size); + (int )val, size);if (tis->loc[locty].state ==TPM_TIS_STATE_READY ) { tis->loc[locty].state =TPM_TIS_STATE_RECEPTION ; tpm_tis_sts_set(&tis->loc[locty],
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 38/42] target-mips: fix memory leak
In reply to Michael TokarevFrom: Gonglei <[email protected]>
Coveristy reports that variable prom_buf/params_buf going out of scope leaks the storage it points to.
--- hw/mips/mips_fulong2e.c | 1 + hw/mips/mips_malta.c | 1 + hw/mips/mips_r4k.c | 1 + 3 files changed, 3 insertions(+)
hw/mips/mips_fulong2e.c +1 -0
@@ -168,6 +168,7 @@ static int64_t load_kernel (CPUMIPSState *env)rom_add_blob_fixed ("prom" , prom_buf, prom_size,cpu_mips_kseg0_to_phys (NULL ,ENVP_ADDR )); +g_free (prom_buf);return kernel_entry; }
hw/mips/mips_malta.c +1 -0
@@ -861,6 +861,7 @@ static int64_t load_kernel (void)rom_add_blob_fixed ("prom" , prom_buf, prom_size,cpu_mips_kseg0_to_phys (NULL ,ENVP_ADDR )); +g_free (prom_buf);return kernel_entry; }
hw/mips/mips_r4k.c +1 -0
@@ -139,6 +139,7 @@ static int64_t load_kernel(void)rom_add_blob_fixed ("params" , params_buf, params_size, (16 <<20 ) -264 ); +g_free (params_buf);return entry; }
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 09/42] range: remove useless inclusions
In reply to Michael TokarevFrom: Paolo Bonzini <[email protected]>
--- dma-helpers.c | 1 - hw/acpi/pcihp.c | 1 - hw/i386/acpi-build.c | 1 - include/hw/i386/ich9.h | 1 - include/hw/pci-host/q35.h | 1 - 5 files changed, 5 deletions(-)
dma-helpers.c +0 -1
@@ -10,7 +10,6 @@#include "sysemu/block-backend.h" #include "sysemu/dma.h" #include "trace.h" -#include "qemu/range.h" #include "qemu/thread.h" #include "qemu/main-loop.h"
hw/acpi/pcihp.c +0 -1
@@ -31,7 +31,6 @@#include "hw/pci/pci.h" #include "hw/acpi/acpi.h" #include "sysemu/sysemu.h" -#include "qemu/range.h" #include "exec/ioport.h" #include "exec/address-spaces.h" #include "hw/pci/pci_bus.h"
hw/i386/acpi-build.c +0 -1
@@ -26,7 +26,6 @@#include "qemu-common.h" #include "qemu/bitmap.h" #include "qemu/osdep.h" -#include "qemu/range.h" #include "qemu/error-report.h" #include "hw/pci/pci.h" #include "qom/cpu.h"
include/hw/i386/ich9.h +0 -1
@@ -2,7 +2,6 @@#define HW_ICH9_H #include "hw/hw.h" -#include "qemu/range.h" #include "hw/isa/isa.h" #include "hw/sysbus.h" #include "hw/i386/pc.h"
include/hw/pci-host/q35.h +0 -1
@@ -23,7 +23,6 @@#define HW_Q35_H #include "hw/hw.h" -#include "qemu/range.h" #include "hw/isa/isa.h" #include "hw/sysbus.h" #include "hw/i386/pc.h"
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 40/42] kvm: Silence warning from valgrind
In reply to Michael TokarevFrom: Thomas Huth <[email protected]>
valgrind complains here about uninitialized bytes with the following message:
==17814== Syscall param ioctl(generic) points to uninitialised byte(s)
==17814== at 0x466A780: ioctl (in /usr/lib64/power8/libc-2.17.so) ==17814== by 0x100735B7: kvm_vm_ioctl (kvm-all.c:1920) ==17814== by 0x10074583: kvm_set_ioeventfd_mmio (kvm-all.c:574)
Let's fix it by using a proper struct initializer in kvm_set_ioeventfd_mmio().
--- kvm-all.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
kvm-all.c +7 -7
@@ -552,13 +552,13 @@ static int kvm_set_ioeventfd_mmio(int fd, hwaddr addr, uint32_t val, bool assign, uint32_t size, bool datamatch) { int ret; -struct kvm_ioeventfd iofd; - - iofd.datamatch = datamatch ?adjust_ioeventfd_endianness (val, size) :0 ; - iofd.addr = addr; - iofd.len = size; - iofd.flags =0 ; - iofd.fd = fd; +struct kvm_ioeventfd iofd = { + .datamatch = datamatch ?adjust_ioeventfd_endianness (val, size) :0 , + .addr = addr, + .len = size, + .flags =0 , + .fd = fd, + };if (!kvm_enabled ()) {return -ENOSYS ;
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 13/42] qemu-options: trivial spelling fix (messsage)
In reply to Michael Tokarev--- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-options.hx +1 -1
@@ -3106,7 +3106,7 @@ executed often has little or no correlation with actual performance. to synchronise the host clock and the virtual clock. The goal is to have a guest running at the real frequency imposed by the shift option. Whenever the guest clock is behind the host clock and if -@option{align=on} is specified then we print a messsage to the user +@option{align=on} is specified then we print a message to the user to inform about the delay. Currently this option does not work when @option{shift} is @code{auto}. Note: The sync algorithm will work for those shift values for which
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 19/42] arm: cpu.h: Remove unused typdefs
In reply to Michael TokarevFrom: Peter Crosthwaite <[email protected]>
These CP accessor function prototypes are unused. Remove them.
--- target-arm/cpu.h | 5 ----- 1 file changed, 5 deletions(-)
target-arm/cpu.h +0 -5
@@ -93,11 +93,6 @@#define ARM_CPU_VIRQ 2#define ARM_CPU_VFIQ 3 -typedef void ARMWriteCPFunc (void *opaque,int cp_info, -int srcreg,int operand,uint32_t value); -typedef uint32_t ARMReadCPFunc (void *opaque,int cp_info, -int dstreg,int operand); -struct arm_boot_info ;#define NB_MMU_MODES 7
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 25/42] microblaze: mmu: Delete flip_um fn prototype
In reply to Michael TokarevFrom: Peter Crosthwaite <[email protected]>
This is not implemented or used.
--- target-microblaze/mmu.h | 1 - 1 file changed, 1 deletion(-)
target-microblaze/mmu.h +0 -1
@@ -82,7 +82,6 @@ struct microblaze_mmu_lookup } err; }; -void mmu_flip_um (CPUMBState *env,unsigned int um);unsigned int mmu_translate (struct microblaze_mmu *mmu,struct microblaze_mmu_lookup *lu,target_ulong vaddr,int rw,int mmu_idx);
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 16/42] monitor: Remove unused functions
In reply to Michael TokarevFrom: Thomas Huth <[email protected]>
The functions ringbuf_read_completion() and monitor_get_rs() are not used anywhere anymore, so let's remove them.
--- hmp.h | 1 - include/monitor/monitor.h | 1 - monitor.c | 13 ------------- 3 files changed, 15 deletions(-)
hmp.h +0 -1
@@ -109,7 +109,6 @@ void set_link_completion(ReadLineState *rs, int nb_args, const char *str);void netdev_add_completion (ReadLineState *rs,int nb_args,const char *str);void netdev_del_completion (ReadLineState *rs,int nb_args,const char *str);void ringbuf_write_completion (ReadLineState *rs,int nb_args,const char *str); -void ringbuf_read_completion (ReadLineState *rs,int nb_args,const char *str);void watchdog_action_completion (ReadLineState *rs,int nb_args,const char *str); void migrate_set_capability_completion(ReadLineState *rs, int nb_args,
include/monitor/monitor.h +0 -1
@@ -47,7 +47,6 @@ typedef void (MonitorCompletion)(void *opaque, QObject *ret_data);void monitor_set_error (Monitor *mon,QError *qerror);void monitor_read_command (Monitor *mon,int show_prompt); -ReadLineState *monitor_get_rs (Monitor *mon);int monitor_read_password (Monitor *mon,ReadLineFunc *readline_func,void *opaque);
monitor.c +0 -13
@@ -4390,14 +4390,6 @@ static void ringbuf_completion(ReadLineState *rs, const char *str)qapi_free_ChardevInfoList (start); } -void ringbuf_read_completion (ReadLineState *rs,int nb_args,const char *str) -{ -if (nb_args !=2 ) { -return ; - } -ringbuf_completion (rs, str); -} -void ringbuf_write_completion (ReadLineState *rs,int nb_args,const char *str) {if (nb_args !=2 ) {
@@ -5392,11 +5384,6 @@ static void bdrv_password_cb(void *opaque, const char *password,monitor_read_command (mon,1 ); } -ReadLineState *monitor_get_rs (Monitor *mon) -{ -return mon->rs; -} -int monitor_read_bdrv_key_start (Monitor *mon,BlockDriverState *bs,BlockCompletionFunc *completion_cb,void *opaque)
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 26/42] microblaze: cpu: Remote unused cpu_get_pc
In reply to Michael TokarevFrom: Peter Crosthwaite <[email protected]>
This function is not used by anything. Remove.
--- target-microblaze/cpu.h | 5 ----- 1 file changed, 5 deletions(-)
target-microblaze/cpu.h +0 -5
@@ -333,11 +333,6 @@ static inline int cpu_interrupts_enabled(CPUMBState *env)#include "exec/cpu-all.h" -static inline target_ulong cpu_get_pc (CPUMBState *env) -{ -return env->sregs[SR_PC ]; -} -static inline void cpu_get_tb_cpu_state (CPUMBState *env,target_ulong *pc,target_ulong *cs_base,int *flags) {
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 42/42] microblaze: fix memory leak
In reply to Michael TokarevFrom: Gonglei <[email protected]>
When not assign a -dtb argument, the variable dtb_filename storage returned from qemu_find_file(), which should be freed after use. Alternatively we define a local variable filename, with 'char *' type, free after use.
--- hw/microblaze/boot.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
hw/microblaze/boot.c +7 -6
@@ -113,15 +113,15 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,const char *kernel_filename;const char *kernel_cmdline;const char *dtb_arg; +char *filename =NULL ; machine_opts =qemu_get_machine_opts (); kernel_filename =qemu_opt_get (machine_opts,"kernel" ); kernel_cmdline =qemu_opt_get (machine_opts,"append" ); dtb_arg =qemu_opt_get (machine_opts,"dtb" ); -if (dtb_arg) {/* Preference a -dtb argument */ - dtb_filename = dtb_arg; - }else {/* default to pcbios dtb as passed by machine_init */ - dtb_filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , dtb_filename); +/* default to pcbios dtb as passed by machine_init */ +if (!dtb_arg) { + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , dtb_filename); } boot_info.machine_cpu_reset = machine_cpu_reset;
@@ -203,7 +203,8 @@ void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base, boot_info.initrd_start, boot_info.initrd_end, kernel_cmdline, - dtb_filename); +/* Preference a -dtb argument */ + dtb_arg ? dtb_arg : filename); } - +g_free (filename); }
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 41/42] tcg: Delete unused cpu_pc_from_tb()
In reply to Michael TokarevFrom: Peter Crosthwaite <[email protected]>
No code uses the cpu_pc_from_tb() function. Delete from tricore and arm which each provide an unused implementation. Update the comment in tcg.h to reflect that this is obsoleted by synchronize_from_tb.
--- target-arm/cpu.h | 9 --------- target-tricore/cpu.h | 5 ----- tcg/tcg.h | 6 ++++-- 3 files changed, 4 insertions(+), 16 deletions(-)
target-arm/cpu.h +0 -9
@@ -1874,15 +1874,6 @@ static inline void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc,#include "exec/exec-all.h" -static inline void cpu_pc_from_tb (CPUARMState *env,TranslationBlock *tb) -{ -if (ARM_TBFLAG_AARCH64_STATE (tb->flags)) { - env->pc = tb->pc; - }else { - env->regs[15 ] = tb->pc; - } -} -enum {QEMU_PSCI_CONDUIT_DISABLED =0 ,QEMU_PSCI_CONDUIT_SMC =1 ,
target-tricore/cpu.h +0 -5
@@ -395,9 +395,4 @@ int cpu_tricore_handle_mmu_fault(CPUState *cpu, target_ulong address,#include "exec/exec-all.h" -static inline void cpu_pc_from_tb (CPUTriCoreState *env,TranslationBlock *tb) -{ - env->PC = tb->pc; -} -#endif /*__TRICORE_CPU_H__ */
tcg/tcg.h +4 -2
@@ -859,8 +859,10 @@ static inline size_t tcg_current_code_size(TCGContext *s)* state is correctly synchronised and ready for execution of the next * TB (and in particular the guest PC is the address to execute next). * Otherwise, we gave up on execution of this TB before it started, and -* the caller must fix up the CPU state by calling cpu_pc_from_tb() -* with the next-TB pointer we return. +* the caller must fix up the CPU state by calling the CPU's +* synchronize_from_tb() method with the next-TB pointer we return (falling +* back to calling the CPU's set_pc method with tb->pb if no +* synchronize_from_tb() method exists). * * Note that TCG targets may use a different definition of tcg_qemu_tb_exec * to this default (which just calls the prologue.code emitted by
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 17/42] usb: Remove unused functions
In reply to Michael TokarevFrom: Thomas Huth <[email protected]>
Delete set_usb_string(), usb_ep_get_ifnum(), usb_ep_get_max_packet_size() usb_ep_get_max_streams() and usb_ep_set_pipeline() since they are not used anymore.
--- hw/usb/core.c | 41 ----------------------------------------- include/hw/usb.h | 5 ----- 2 files changed, 46 deletions(-)
hw/usb/core.c +0 -41
@@ -331,23 +331,6 @@ void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p)usb_packet_complete (s, p); } -/* XXX: fix overflow */ -int set_usb_string (uint8_t *buf,const char *str) -{ -int len, i; -uint8_t *q; - - q = buf; - len =strlen (str); - *q++ =2 * len +2 ; - *q++ =3 ; -for (i =0 ; i < len; i++) { - *q++ = str[i]; - *q++ =0 ; - } -return q - buf; -} -USBDevice *usb_find_device (USBPort *port,uint8_t addr) {USBDevice *dev = port->dev;
@@ -749,12 +732,6 @@ void usb_ep_set_type(USBDevice *dev, int pid, int ep, uint8_t type) uep->type = type; } -uint8_t usb_ep_get_ifnum (USBDevice *dev,int pid,int ep) -{ -struct USBEndpoint *uep =usb_ep_get (dev, pid, ep); -return uep->ifnum; -} -void usb_ep_set_ifnum (USBDevice *dev,int pid,int ep,uint8_t ifnum) {struct USBEndpoint *uep =usb_ep_get (dev, pid, ep);
@@ -782,12 +759,6 @@ void usb_ep_set_max_packet_size(USBDevice *dev, int pid, int ep, uep->max_packet_size = size * microframes; } -int usb_ep_get_max_packet_size (USBDevice *dev,int pid,int ep) -{ -struct USBEndpoint *uep =usb_ep_get (dev, pid, ep); -return uep->max_packet_size; -} -void usb_ep_set_max_streams (USBDevice *dev,int pid,int ep,uint8_t raw) {struct USBEndpoint *uep =usb_ep_get (dev, pid, ep);
@@ -801,18 +772,6 @@ void usb_ep_set_max_streams(USBDevice *dev, int pid, int ep, uint8_t raw) } } -int usb_ep_get_max_streams (USBDevice *dev,int pid,int ep) -{ -struct USBEndpoint *uep =usb_ep_get (dev, pid, ep); -return uep->max_streams; -} - -void usb_ep_set_pipeline (USBDevice *dev,int pid,int ep,bool enabled) -{ -struct USBEndpoint *uep =usb_ep_get (dev, pid, ep); - uep->pipeline = enabled; -} -void usb_ep_set_halted (USBDevice *dev,int pid,int ep,bool halted) {struct USBEndpoint *uep =usb_ep_get (dev, pid, ep);
include/hw/usb.h +0 -5
@@ -445,15 +445,11 @@ void usb_ep_reset(USBDevice *dev);void usb_ep_dump (USBDevice *dev);struct USBEndpoint *usb_ep_get (USBDevice *dev,int pid,int ep);uint8_t usb_ep_get_type (USBDevice *dev,int pid,int ep); -uint8_t usb_ep_get_ifnum (USBDevice *dev,int pid,int ep);void usb_ep_set_type (USBDevice *dev,int pid,int ep,uint8_t type);void usb_ep_set_ifnum (USBDevice *dev,int pid,int ep,uint8_t ifnum);void usb_ep_set_max_packet_size (USBDevice *dev,int pid,int ep,uint16_t raw); -int usb_ep_get_max_packet_size (USBDevice *dev,int pid,int ep);void usb_ep_set_max_streams (USBDevice *dev,int pid,int ep,uint8_t raw); -int usb_ep_get_max_streams (USBDevice *dev,int pid,int ep); -void usb_ep_set_pipeline (USBDevice *dev,int pid,int ep,bool enabled);void usb_ep_set_halted (USBDevice *dev,int pid,int ep,bool halted);USBPacket *usb_ep_find_packet_by_id (USBDevice *dev,int pid,int ep,uint64_t id);
@@ -469,7 +465,6 @@ void usb_port_reset(USBPort *port);void usb_device_reset (USBDevice *dev);void usb_wakeup (USBEndpoint *ep,unsigned int stream);void usb_generic_async_ctrl_complete (USBDevice *s,USBPacket *p); -int set_usb_string (uint8_t *buf,const char *str);/* usb-linux.c */ USBDevice *usb_host_device_open (USBBus *bus,const char *devname);
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 35/42] linux-user/elfload: use QTAILQ_FOREACH instead of open-coding it
In reply to Michael TokarevFrom: "Emilio G. Cota" <[email protected]>
--- linux-user/elfload.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
linux-user/elfload.c +1 -2
@@ -2887,8 +2887,7 @@ static int write_note_info(struct elf_note_info *info, int fd)return (error);/* write prstatus for each thread */ -for (ets = info->thread_list.tqh_first; ets !=NULL ; - ets = ets->ets_link.tqe_next) { + QTAILQ_FOREACH(ets, &info->thread_list, ets_link) {if ((error =write_note (&ets->notes[0 ], fd)) !=0 )return (error); }
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 31/42] cpus: use first_cpu macro instead of QTAILQ_FIRST(&cpus)
In reply to Michael TokarevFrom: "Emilio G. Cota" <[email protected]>
--- cpus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cpus.c +1 -1
@@ -1016,7 +1016,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)qemu_cond_signal (&qemu_cpu_cond);/* wait for initial kick-off after machine start */ -while (QTAILQ_FIRST (&cpus)->stopped) { +while (first_cpu->stopped) {qemu_cond_wait (tcg_halt_cond, &qemu_global_mutex);/* process any pending work */
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 24/42] defconfigs: Piggyback microblazeel on microblaze
In reply to Michael TokarevFrom: Peter Crosthwaite <[email protected]>
Theres no difference in defconfig. Going forward microblazeel should superset microblaze so use an include.
--- default-configs/microblazeel-softmmu.mak | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
default-configs/microblazeel-softmmu.mak +1 -9
@@ -1,11 +1,3 @@ # Default configuration for microblazeel-softmmu -CONFIG_PTIMER=y -CONFIG_PFLASH_CFI01=y -CONFIG_SERIAL=y -CONFIG_XILINX=y -CONFIG_XILINX_AXI=y -CONFIG_XILINX_SPI=y -CONFIG_XILINX_ETHLITE=y -CONFIG_SSI=y -CONFIG_SSI_M25P80=y +include microblaze-softmmu.mak
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 32/42] input: remove unused mouse_handlers list
In reply to Michael TokarevFrom: "Emilio G. Cota" <[email protected]>
--- ui/input-legacy.c | 2 -- 1 file changed, 2 deletions(-)
ui/input-legacy.c +0 -2
@@ -57,8 +57,6 @@ struct QEMUPutLEDEntry { static QTAILQ_HEAD(, QEMUPutLEDEntry) led_handlers =QTAILQ_HEAD_INITIALIZER (led_handlers); -static QTAILQ_HEAD(, QEMUPutMouseEntry) mouse_handlers = -QTAILQ_HEAD_INITIALIZER (mouse_handlers);int index_from_key (const char *key) {
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 29/42] microblaze: cpu: Renumber EXCP_* constants to close gap
In reply to Michael TokarevAfter removal of EXCP_NMI there's a gap in EXCP_*
numbering. Let's remove it.
--- target-microblaze/cpu.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
target-microblaze/cpu.h +5 -5
@@ -36,11 +36,11 @@ typedef struct CPUMBState CPUMBState;#define ELF_MACHINE EM_MICROBLAZE -#define EXCP_MMU 2 -#define EXCP_IRQ 3 -#define EXCP_BREAK 4 -#define EXCP_HW_BREAK 5 -#define EXCP_HW_EXCP 6 +#define EXCP_MMU 1 +#define EXCP_IRQ 2 +#define EXCP_BREAK 3 +#define EXCP_HW_BREAK 4 +#define EXCP_HW_EXCP 5/* MicroBlaze-specific interrupt pending bits. */ #define CPU_INTERRUPT_NMI CPU_INTERRUPT_TGT_EXT_3
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 39/42] vhost-user: remove superfluous '\n' around error_report()
In reply to Michael TokarevFrom: Gonglei <[email protected]>
--- hw/virtio/vhost-user.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
hw/virtio/vhost-user.c +11 -11
@@ -128,7 +128,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg) r =qemu_chr_fe_read_all (chr, p, size);if (r != size) { -error_report ("Failed to read msg header. Read %d instead of %d.\n" , r, +error_report ("Failed to read msg header. Read %d instead of %d." , r, size); goto fail; }
@@ -136,7 +136,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)/* validate received flags */ if (msg->flags != (VHOST_USER_REPLY_MASK |VHOST_USER_VERSION )) {error_report ("Failed to read msg header." -" Flags 0x%x instead of 0x%x.\n" , msg->flags, +" Flags 0x%x instead of 0x%x." , msg->flags,VHOST_USER_REPLY_MASK |VHOST_USER_VERSION ); goto fail; }
@@ -144,7 +144,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)/* validate message size is sane */ if (msg->size >VHOST_USER_PAYLOAD_SIZE ) {error_report ("Failed to read msg header." -" Size %d exceeds the maximum %zu.\n" , msg->size, +" Size %d exceeds the maximum %zu." , msg->size,VHOST_USER_PAYLOAD_SIZE ); goto fail; }
@@ -155,7 +155,7 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg) r =qemu_chr_fe_read_all (chr, p, size);if (r != size) {error_report ("Failed to read msg payload." -" Read %d instead of %d.\n" , r, msg->size); +" Read %d instead of %d." , r, msg->size); goto fail; } }
@@ -235,8 +235,8 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request, msg.memory.nregions = fd_num;if (!fd_num) { -error_report ("Failed initializing vhost-user memory map\n" -"consider using -object memory-backend-file share=on\n" ); +error_report ("Failed initializing vhost-user memory map, " +"consider using -object memory-backend-file share=on" );return -1 ; }
@@ -280,7 +280,7 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request, }break ;default : -error_report ("vhost-user trying to send unhandled ioctl\n" ); +error_report ("vhost-user trying to send unhandled ioctl" );return -1 ;break ; }
@@ -296,27 +296,27 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned long int request,if (msg_request != msg.request) {error_report ("Received unexpected msg type." -" Expected %d received %d\n" , msg_request, msg.request); +" Expected %d received %d" , msg_request, msg.request);return -1 ; }switch (msg_request) {case VHOST_USER_GET_FEATURES :if (msg.size !=sizeof (m.u64)) { -error_report ("Received bad msg size.\n" ); +error_report ("Received bad msg size." );return -1 ; } *((__u64 *) arg) = msg.u64;break ;case VHOST_USER_GET_VRING_BASE :if (msg.size !=sizeof (m.state)) { -error_report ("Received bad msg size.\n" ); +error_report ("Received bad msg size." );return -1 ; }memcpy (arg, &msg.state,sizeof (struct vhost_vring_state ));break ;default : -error_report ("Received unexpected msg type.\n" ); +error_report ("Received unexpected msg type." );return -1 ;break ; }
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 06/42] ui/console : remove 'struct' from 'typedef struct' type
In reply to Michael TokarevFrom: Chih-Min Chao <[email protected]>
--- ui/console.c | 4 ++-- ui/spice-display.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
ui/console.c +2 -2
@@ -269,7 +269,7 @@ void graphic_hw_invalidate(QemuConsole *con) } } -static void ppm_save (const char *filename,struct DisplaySurface *ds, +static void ppm_save (const char *filename,DisplaySurface *ds,Error **errp) {int width =pixman_image_get_width (ds->image);
@@ -1535,7 +1535,7 @@ void dpy_text_update(QemuConsole *con, int x, int y, int w, int h)void dpy_text_resize (QemuConsole *con,int w,int h) {DisplayState *s = con->ds; -struct DisplayChangeListener *dcl; +DisplayChangeListener *dcl;if (!qemu_console_is_visible (con)) {return ;
ui/spice-display.c +1 -1
@@ -718,7 +718,7 @@ static void display_update(DisplayChangeListener *dcl, }static void display_switch (DisplayChangeListener *dcl, -struct DisplaySurface *surface) +DisplaySurface *surface) {SimpleSpiceDisplay *ssd =container_of (dcl, SimpleSpiceDisplay, dcl);qemu_spice_display_switch (ssd, surface);
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 28/42] microblaze: cpu: Delete EXCP_NMI
In reply to Michael TokarevFrom: Peter Crosthwaite <[email protected]>
This define is unused. Remove.
--- target-microblaze/cpu.h | 1 - 1 file changed, 1 deletion(-)
target-microblaze/cpu.h +0 -1
@@ -36,7 +36,6 @@ typedef struct CPUMBState CPUMBState;#define ELF_MACHINE EM_MICROBLAZE -#define EXCP_NMI 1#define EXCP_MMU 2#define EXCP_IRQ 3#define EXCP_BREAK 4
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 04/42] ui/vnc : fix coding style
In reply to Michael TokarevFrom: Chih-Min Chao <[email protected]>
reported by checkpatch.pl
--- ui/vnc-auth-vencrypt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
ui/vnc-auth-vencrypt.c +4 -2
@@ -65,7 +65,8 @@ static void start_auth_vencrypt_subauth(VncState *vs)static void vnc_tls_handshake_io (void *opaque); -static int vnc_start_vencrypt_handshake (struct VncState *vs) { +static int vnc_start_vencrypt_handshake (struct VncState *vs) +{int ret;if ((ret =gnutls_handshake (vs->tls.session)) <0 ) {
@@ -100,7 +101,8 @@ static int vnc_start_vencrypt_handshake(struct VncState *vs) {return 0 ; } -static void vnc_tls_handshake_io (void *opaque) { +static void vnc_tls_handshake_io (void *opaque) +{struct VncState *vs = (struct VncState *)opaque;VNC_DEBUG ("Handshake IO continue\n" );
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 37/42] qmp-commands: Fix typo
In reply to Michael TokarevFrom: John Snow <[email protected]>
Just a trivial patch to correct a QMP example in qmp-commands.hx.
--- qmp-commands.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
qmp-commands.hx +2 -2
@@ -2380,7 +2380,7 @@ Example: "virtual-size":2048000, "backing_file":"base.qcow2", "full-backing-filename":"disks/base.qcow2", - "backing-filename-format:"qcow2", + "backing-filename-format":"qcow2", "snapshots":[ { "id": "1",
@@ -3847,7 +3847,7 @@ Example: "virtual-size":2048000, "backing_file":"base.qcow2", "full-backing-filename":"disks/base.qcow2", - "backing-filename-format:"qcow2", + "backing-filename-format":"qcow2", "snapshots":[ { "id": "1",
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 23/42] libcacard: do not use full paths for include files in the same dir
In reply to Michael Tokarev--- libcacard/vcard_emul_nss.c | 2 +- libcacard/vcardt.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
libcacard/vcard_emul_nss.c +1 -1
@@ -33,7 +33,7 @@#include "vreader.h" #include "vevent.h" -#include "libcacard/vcardt_internal.h" +#include "vcardt_internal.h" typedef enum {
libcacard/vcardt.c +2 -2
@@ -2,9 +2,9 @@#include <string.h> #include <glib.h> -#include "libcacard/vcardt.h" +#include "vcardt.h" -#include "libcacard/vcardt_internal.h" +#include "vcardt_internal.h" /* create an ATR with appropriate historical bytes */ #define ATR_TS_DIRECT_CONVENTION 0x3b
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 08/42] misc: Fix new collection of typos
In reply to Michael TokarevFrom: Stefan Weil <[email protected]>
All of them were reported by codespell.
Most typos are in comments, one is in an error message.
--- hw/block/virtio-blk.c | 2 +- hw/misc/edu.c | 2 +- hw/net/virtio-net.c | 2 +- hw/ppc/spapr.c | 2 +- qga/qapi-schema.json | 2 +- target-s390x/mmu_helper.c | 8 ++++---- target-s390x/translate.c | 2 +- tests/libqos/ahci.c | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-)
hw/block/virtio-blk.c +1 -1
@@ -515,7 +515,7 @@ void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb) type =virtio_ldl_p (VIRTIO_DEVICE (req->dev), &req->out.type);/* VIRTIO_BLK_T_OUT defines the command direction. VIRTIO_BLK_T_BARRIER -* is an optional flag. Altough a guest should not send this flag if +* is an optional flag. Although a guest should not send this flag if * not negotiated we ignored it in the past. So keep ignoring it. */ switch (type & ~(VIRTIO_BLK_T_OUT |VIRTIO_BLK_T_BARRIER )) {case VIRTIO_BLK_T_IN :
hw/misc/edu.c +1 -1
@@ -279,7 +279,7 @@ static const MemoryRegionOps edu_mmio_ops = { };/* -* We purposedly use a thread, so that users are forced to wait for the status +* We purposely use a thread, so that users are forced to wait for the status * register. */ static void *edu_fact_thread (void *opaque)
hw/net/virtio-net.c +1 -1
@@ -1590,7 +1590,7 @@ static void virtio_net_device_realize(DeviceState *dev, Error **errp) n->max_queues =MAX (n->nic_conf.peers.queues,1 );if (n->max_queues *2 +1 >VIRTIO_PCI_QUEUE_MAX ) {error_setg (errp,"Invalid number of queues (= %" PRIu32"), " -"must be a postive integer less than %d." , +"must be a positive integer less than %d." , n->max_queues, (VIRTIO_PCI_QUEUE_MAX -1 ) /2 );virtio_cleanup (vdev);return ;
hw/ppc/spapr.c +1 -1
@@ -1029,7 +1029,7 @@ static int spapr_post_load(void *opaque, int version_id)sPAPREnvironment *spapr = (sPAPREnvironment *)opaque;int err =0 ; -/* In earlier versions, there was no seperate qdev for the PAPR +/* In earlier versions, there was no separate qdev for the PAPR * RTC, so the RTC offset was stored directly in sPAPREnvironment. * So when migrating from those versions, poke the incoming offset * value into the RTC device */
qga/qapi-schema.json +1 -1
@@ -808,7 +808,7 @@ # # An enumeration of memory block operation result. # -# @sucess: the operation of online/offline memory block is successful. +# @success: the operation of online/offline memory block is successful. # @not-found: can't find the corresponding memoryXXX directory in sysfs. # @operation-not-supported: for some old kernels, it does not support # online or offline memory block.
target-s390x/mmu_helper.c +4 -4
@@ -303,8 +303,8 @@ static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr,* @param asc address space control (one of the PSW_ASC_* modes) * @param raddr the translated address is stored to this pointer * @param flags the PAGE_READ/WRITE/EXEC flags are stored to this pointer -* @param exc true = inject a program check if a fault occured -* @return 0 if the translation was successfull, -1 if a fault occured +* @param exc true = inject a program check if a fault occurred +* @return 0 if the translation was successful, -1 if a fault occurred */ int mmu_translate (CPUS390XState *env,target_ulong vaddr,int rw,uint64_t asc,target_ulong *raddr,int *flags,bool exc)
@@ -436,9 +436,9 @@ static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages,* s390_cpu_virt_mem_rw: * @laddr: the logical start address * @hostbuf: buffer in host memory. NULL = do only checks w/o copying -* @len: length that should be transfered +* @len: length that should be transferred * @is_write: true = write, false = read -* Returns: 0 on success, non-zero if an exception occured +* Returns: 0 on success, non-zero if an exception occurred * * Copy from/to guest memory using logical addresses. Note that we inject a * program interrupt in case there is an error while accessing the memory.
target-s390x/translate.c +1 -1
@@ -2990,7 +2990,7 @@ static ExitStatus op_sam(DisasContext *s, DisasOps *o)break ; } -/* Bizzare but true, we check the address of the current insn for the +/* Bizarre but true, we check the address of the current insn for the specification exception, not the next to be executed. Thus the PoO documents that Bad Things Happen two bytes before the end. */ if (s->pc & ~mask) {
tests/libqos/ahci.c +2 -2
@@ -364,7 +364,7 @@ void ahci_port_clear(AHCIQState *ahci, uint8_t port)ahci_px_wreg (ahci, port,AHCI_PX_IS , reg); g_assert_cmphex(ahci_px_rreg(ahci, port, AHCI_PX_IS), ==, 0); -/* Wipe the FIS-Recieve Buffer */ +/* Wipe the FIS-Receive Buffer */ qmemset (ahci->port[port].fb,0x00 ,0x100 ); }
@@ -442,7 +442,7 @@ void ahci_port_check_pio_sanity(AHCIQState *ahci, uint8_t port, {PIOSetupFIS *pio =g_malloc0 (0x20 ); -/* We cannot check the Status or E_Status registers, becuase +/* We cannot check the Status or E_Status registers, because * the status may have again changed between the PIO Setup FIS * and the conclusion of the command with the D2H Register FIS. */ memread (ahci->port[port].fb +0x20 , pio,0x20 );
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 33/42] qemu-char: remove unused list node from FDCharDriver
In reply to Michael TokarevFrom: "Emilio G. Cota" <[email protected]>
--- qemu-char.c | 1 - 1 file changed, 1 deletion(-)
qemu-char.c +0 -1
@@ -973,7 +973,6 @@ typedef struct FDCharDriver {CharDriverState *chr;GIOChannel *fd_in, *fd_out;int max_size; -QTAILQ_ENTRY (FDCharDriver) node; } FDCharDriver;/* Called with chr_write_lock held. */
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 34/42] coroutine: remove unnecessary parentheses in qemu_co_queue_empty
In reply to Michael TokarevFrom: "Emilio G. Cota" <[email protected]>
--- qemu-coroutine-lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-coroutine-lock.c +1 -1
@@ -108,7 +108,7 @@ bool qemu_co_enter_next(CoQueue *queue)bool qemu_co_queue_empty (CoQueue *queue) { -return (QTAILQ_FIRST (&queue->entries) ==NULL ); +return QTAILQ_FIRST (&queue->entries) ==NULL ; }void qemu_co_mutex_init (CoMutex *mutex)
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 11/42] tpm: fix coding style
In reply to Michael TokarevFrom: Stefan Berger <[email protected]>
Fix coding style in one instance.
--- hw/tpm/tpm_tis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/tpm/tpm_tis.c +2 -2
@@ -842,7 +842,7 @@ static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr, (tis->loc[locty].sts & TPM_TIS_STS_EXPECT)) {/* we have a packet length - see if we have all of it */ #ifdef RAISE_STS_IRQ -bool needIrq = !(tis->loc[locty].sts &TPM_TIS_STS_VALID ); +bool need_irq = !(tis->loc[locty].sts &TPM_TIS_STS_VALID );#endif len =tpm_tis_get_size_from_buffer (&tis->loc[locty].w_buffer);if (len > tis->loc[locty].w_offset) {
@@ -853,7 +853,7 @@ static void tpm_tis_mmio_write_intern(void *opaque, hwaddr addr,tpm_tis_sts_set (&tis->loc[locty],TPM_TIS_STS_VALID ); }#ifdef RAISE_STS_IRQ -if (needIrq) { +if (need_irq) {tpm_tis_raise_irq (s, locty,TPM_TIS_INT_STS_VALID ); }#endif
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 15/42] pci: Remove unused function ich9_d2pbr_init()
In reply to Michael TokarevFrom: Thomas Huth <[email protected]>
The function ich9_d2pbr_init() is completely unused and thus can be deleted.
--- hw/pci-bridge/i82801b11.c | 21 --------------------- include/hw/i386/ich9.h | 1 - 2 files changed, 22 deletions(-)
hw/pci-bridge/i82801b11.c +0 -21
@@ -101,27 +101,6 @@ static const TypeInfo i82801b11_bridge_info = { .class_init = i82801b11_bridge_class_init, }; -PCIBus *ich9_d2pbr_init (PCIBus *bus,int devfn,int sec_bus) -{ -PCIDevice *d; -PCIBridge *br; -char buf[16 ]; -DeviceState *qdev; - - d =pci_create_multifunction (bus, devfn, true,"i82801b11-bridge" ); -if (!d) { -return NULL ; - } - br =PCI_BRIDGE (d); - qdev =DEVICE (d); - -snprintf (buf,sizeof (buf),"pci.%d" , sec_bus); -pci_bridge_map_irq (br, buf, pci_swizzle_map_irq_fn); -qdev_init_nofail (qdev); - -return pci_bridge_get_sec_bus (br); -} -static void d2pbr_register (void ) {type_register_static (&i82801b11_bridge_info);
include/hw/i386/ich9.h +0 -1
@@ -18,7 +18,6 @@ void ich9_lpc_set_irq(void *opaque, int irq_num, int level);int ich9_lpc_map_irq (PCIDevice *pci_dev,int intx);PCIINTxRoute ich9_route_intx_pin_to_irq (void *opaque,int pirq_pin);void ich9_lpc_pm_init (PCIDevice *pci_lpc); -PCIBus *ich9_d2pbr_init (PCIBus *bus,int devfn,int sec_bus);I2CBus *ich9_smb_init (PCIBus *bus,int devfn,uint32_t smb_io_base);#define ICH9_CC_SIZE (16 * 1024)/* 16KB */
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 22/42] libcacard: stop including qemu-common.h
In reply to Michael TokarevFrom: Paolo Bonzini <[email protected]>
This is a small step towards making libcacard standalone.
--- libcacard/cac.c | 5 ++++- libcacard/card_7816.c | 4 +++- libcacard/event.c | 2 +- libcacard/vcard.c | 4 +++- libcacard/vcard_emul_nss.c | 2 +- libcacard/vreader.c | 4 +++- libcacard/vscclient.c | 8 +++++++- 7 files changed, 22 insertions(+), 7 deletions(-)
libcacard/cac.c +4 -1
@@ -5,7 +5,10 @@* See the COPYING.LIB file in the top-level directory. */ -#include "qemu-common.h" +#include "glib-compat.h" + +#include <string.h> +#include <stdbool.h> #include "cac.h" #include "vcard.h"
libcacard/card_7816.c +3 -1
@@ -5,7 +5,9 @@* See the COPYING.LIB file in the top-level directory. */ -#include "qemu-common.h" +#include "glib-compat.h" + +#include <string.h> #include "vcard.h" #include "vcard_emul.h"
libcacard/event.c +1 -1
@@ -5,7 +5,7 @@* See the COPYING.LIB file in the top-level directory. */ -#include "qemu-common.h" +#include "glib-compat.h" #include "vcard.h" #include "vreader.h"
libcacard/vcard.c +3 -1
@@ -5,7 +5,9 @@* See the COPYING.LIB file in the top-level directory. */ -#include "qemu-common.h" +#include "glib-compat.h" + +#include <string.h> #include "vcard.h" #include "vcard_emul.h"
libcacard/vcard_emul_nss.c +1 -1
@@ -25,7 +25,7 @@#include <prthread.h> #include <secerr.h> -#include "qemu-common.h" +#include "glib-compat.h" #include "vcard.h" #include "card_7816t.h"
libcacard/vreader.c +3 -1
@@ -10,7 +10,9 @@#endif #define G_LOG_DOMAIN "libcacard" -#include "qemu-common.h" +#include "glib-compat.h" + +#include <string.h> #include "vcard.h" #include "vcard_emul.h"
libcacard/vscclient.c +7 -1
@@ -10,14 +10,20 @@* See the COPYING.LIB file in the top-level directory. */ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #ifndef _WIN32#include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> +#include <unistd.h> #define closesocket (x) close(x) +#else +#include <getopt.h> #endif -#include "qemu-common.h" +#include "glib-compat.h" #include "vscard_common.h"
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 36/42] i440fx-test: remove ARRAY_SIZE redefinition
In reply to Michael TokarevFrom: "Emilio G. Cota" <[email protected]>
It's defined in osdep.h and shouldn't be redefined here.
--- tests/i440fx-test.c | 2 -- 1 file changed, 2 deletions(-)
tests/i440fx-test.c +0 -2
@@ -27,8 +27,6 @@#define BROKEN 1 -#define ARRAY_SIZE (array) (sizeof(array) / sizeof((array)[0])) - typedef struct TestData { int num_cpus;
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 21/42] docs/atomics.txt: fix two typos
In reply to Michael TokarevFrom: Laszlo Ersek <[email protected]>
--- docs/atomics.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
docs/atomics.txt +2 -2
@@ -281,7 +281,7 @@ note that the other barrier may actually be in a driver that runs in the guest! For the purposes of pairing, smp_read_barrier_depends() and smp_rmb() -both count as read barriers. A read barriers shall pair with a write +both count as read barriers. A read barrier shall pair with a write barrier or a full barrier; a write barrier shall pair with a read barrier or a full barrier. A full barrier can pair with anything. For example:
@@ -294,7 +294,7 @@ For example: smp_rmb(); y = a; -Note that the "writing" thread are accessing the variables in the +Note that the "writing" thread is accessing the variables in the opposite order as the "reading" thread. This is expected: stores before the write barrier will normally match the loads after the read barrier, and vice versa. The same is true for more than 2
Signature · 1 line
2.1.4
Quoted 21 lines · Michael Tokarev
Hello.
This is the first pull request for trivial-patches tree since 2.3 has been released. During the freeze many patches has been accumulated, and even more has been received after 2.4 developmnent has been opened.
So here we have 42 trivial patches, which is kinda too much, but that's what we have :)
Please consider applying.
Thanks,
/mjt
The following changes since commit
a9392bc93c8615ad1983047e9f91ee3fa8aae75f:Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2015-04-28 16:55:03 +0100)
are available in the git repository at:
Quoted 8 lines
git://git.corpit.ru/qemu.gittags/pull-trivial-patches-2015-04-30for you to fetch changes up to
fe31d3e6e6945b509e5b4ab03d38aae1266fe64e:microblaze: fix memory leak (2015-04-30 08:06:20 +0300)
----------------------------------------------------------------
trivial patches for 2015-04-30
Hi. I'm afraid this fails to build the tests on OSX:
CC tests/i440fx-test.o
/Users/pm215/src/qemu/tests/i440fx-test.c:229:21: warning: implicit declaration
of function 'ARRAY_SIZE' is invalid in C99
[-Wimplicit-function-declaration]
for (i = 0; i < ARRAY_SIZE(pam_area); i++) {
^1 warning generated.
LINK tests/i440fx-test
Undefined symbols for architecture x86_64:
"_ARRAY_SIZE", referenced from:
_test_i440fx_pam in i440fx-test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tests/i440fx-test] Error 1
'i440fx-test: remove ARRAY_SIZE redefinition' has removed this macro, but this test file doesn't include osdep.h so it presumably works on Linux only because we're picking something up from a system header file somewhere...
-- PMM
30.04.2015 15:58, Peter Maydell wrote:
[]
Quoted 4 lines
Hi. I'm afraid this fails to build the tests on OSX:
CCtests/i440fx-test.o
/Users/pm215/src/qemu/tests/i440fx-test.c:229:21: warning: implicit declaration
of function 'ARRAY_SIZE' is invalid in C99
So much for trivial ;)
Let's remove this one and add another tiny dead code removal patch instead, which went in meanwhile, to complete half-removal of unused functions. I'll resend another pull request in a moment.
Thanks, and sorry for the noize. I wanted to verify if this array_size definition is really unnecessary here but something distracted me.
/mjt
PATCH 1/1 i440fx-test: guard ARRAY_SIZE definition with #ifndef
In reply to Peter MaydellARRAY_SIZE is defined in osdep.h so having an unconditional definition here is fragile.
--- tests/i440fx-test.c | 2 ++ 1 file changed, 2 insertions(+)
tests/i440fx-test.c +2 -0
@@ -27,7 +27,9 @@#define BROKEN 1 +#ifndef ARRAY_SIZE #define ARRAY_SIZE (array) (sizeof(array) / sizeof((array)[0])) +#endif typedef struct TestData {
Signature · 1 line
1.9.1
Re: [Qemu-devel] [PATCH] i440fx-test: guard ARRAY_SIZE definition with #ifndef
Am 30.04.2015 um 21:16 schrieb Emilio G. Cota:
Quoted 13 lines
ARRAY_SIZEis defined inosdep.hso having an unconditional definition here is fragile.Signed-off-by Emilio G. Cota <[email protected]>--- tests/i440fx-test.c | 2 ++ 1 file changed, 2 insertions(+)tests/i440fx-test.c +0
-0
tests/i440fx-test.c line 35
Quoted 9 lines
tests/i440fx-test.c +2
-0@@ -27,7 +27,9 @@#define BROKEN 1 +#ifndef ARRAY_SIZE #define ARRAY_SIZE (array) (sizeof(array) / sizeof((array)[0])) +#endif typedef struct TestData {
Why not include osdep.h via qemu-common.h and remove all other include statements which then are no longer needed? I'd prefer that variant.
Cheers
Stefan
Re: [Qemu-devel] [PATCH] i440fx-test: guard ARRAY_SIZE definition with #ifndef
Quoted 4 lines · Stefan Weil
Am 30.04.2015 um 21:16 schrieb Emilio G. Cota:
Quoted 3 lines
ARRAY_SIZEis defined inosdep.hso having an unconditional definition here is fragile.
FWIW, the original patch of this failed to build on x86 too, so I don't think we currently include osdep.h from this file in any circumstances... Where do you get the ARRAY_SIZE definition from that presumably lets you build without this one?
Quoted 2 lines
Why not include
osdep.hviaqemu-common.hand remove all other include statements which then are no longer needed? I'd prefer that variant.
Can we include qemu-common.h in these libqos standalone test executables? I forget... The rtl8139 test seems to though, so I guess it's OK.
-- PMM
PATCH 1/1 tests: consolidate common includes under libqtest.h
Quoted 5 lines · Michael Tokarev
Quoted 2 lines · Emilio G. Cota
ARRAY_SIZEis defined inosdep.hso having an unconditional definition here is fragile.Fragile in what sense? Nothing in that file includes
osdep.h.
Fragile in that future, unrelated header changes will make this redefinition show up.
Quoted 3 lines
Somehow initially I thought this patch actually FIXES a warning of this sort. But it looks lile it is only fixes a potential warning. Oh well... :)
I was hit by this warning-turned-error, although wasn't using 100% upstream code, see below.
Quoted 10 lines · Peter Maydell
Quoted 4 lines · Stefan Weil
Am 30.04.2015 um 21:16 schrieb Emilio G. Cota:
Quoted 3 lines
ARRAY_SIZEis defined inosdep.hso having an unconditional definition here is fragile.FWIW, the original patch of this failed to build on x86 too, so I don't think we currently include
osdep.hfrom this file in any circumstances... Where do you get theARRAY_SIZEdefinition from that presumably lets you build without this one?
I probably got ARRAY_SIZE from CCAN's headers, was tinkering with it.
(CCAN http://ccodearchive.net/ is a library of useful modules, and array_size is one of them.)
Quoted 3 lines
Can we include
qemu-common.hin these libqos standalone test executables? I forget... The rtl8139 test seems to though, so I guess it's OK.
Quoted 3 lines · Stefan Weil
Why not include
osdep.hviaqemu-common.hand remove all other include statements which then are no longer needed? I'd prefer that variant.
Something like the appended?
Cheers,
Emilio
commit eb415d0695bb49d9df78aedaf4ed3c7083a1a574
Author: Emilio G. Cota <[email protected]> Date: Thu Apr 30 18:00:01 2015 -0400
tests: consolidate common includes under libqtest.h
Source files in tests/ include very common headers, such as glib.h or qemu/osdep.h.
Consolidate these includes by including qemu-common.h from libqtest.h, which is a common include in tests/.
Two things worth mentioning:
- i440fx-test drops its ARRAY_SIZE definition, which comes now from osdep.h via qemu-common.h.
- vhost-user-test.c does keep its include of glib.h, since it has to do some contortions to support old glib versions. See commit "bd95939f qtest: fix qtest for vhost-user".
tests/ac97-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/ahci-test.c +0 -5
@@ -22,18 +22,13 @@* THE SOFTWARE. */ -#include <stdint.h> -#include <string.h> -#include <stdio.h> #include <getopt.h> -#include <glib.h> #include "libqtest.h" #include "libqos/libqos-pc.h" #include "libqos/ahci.h" #include "libqos/pci-pc.h" -#include "qemu-common.h" #include "qemu/host-utils.h" #include "hw/pci/pci_ids.h"
tests/bios-tables-test.c +0 -5
@@ -10,13 +10,8 @@* See the COPYING file in the top-level directory. */ -#include <string.h> -#include <stdio.h> -#include <glib.h> #include <glib/gstdio.h> -#include "qemu-common.h" #include "libqtest.h" -#include "qemu/compiler.h" #include "hw/i386/acpi-defs.h" #include "hw/i386/smbios.h" #include "qemu/bitmap.h"
tests/boot-order-test.c +0 -2
@@ -10,8 +10,6 @@* See the COPYING file in the top-level directory. */ -#include <string.h> -#include <glib.h> #include "libqos/fw_cfg.h" #include "libqtest.h"
tests/display-vga-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" static void pci_cirrus (void ) {
tests/drive_del-test.c +0 -2
@@ -10,8 +10,6 @@* See the COPYING.LIB file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" static void drive_add (void )
tests/e1000-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void test_device (gconstpointer data)
tests/eepro100-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" static void test_device (gconstpointer data) {
tests/endianness-test.c +0 -7
@@ -11,14 +11,7 @@* */ -#include <glib.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include "libqtest.h" -#include "qemu/bswap.h" typedef struct TestCase TestCase ;struct TestCase {
tests/es1370-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/fdc-test.c +0 -7
@@ -22,14 +22,7 @@* THE SOFTWARE. */ -#include <stdint.h> -#include <string.h> -#include <stdio.h> - -#include <glib.h> -#include "libqtest.h" -#include "qemu-common.h" #define TEST_IMAGE_SIZE 1440 * 1024
tests/fw_cfg-test.c +0 -3
@@ -10,9 +10,6 @@* See the COPYING file in the top-level directory. */ -#include <string.h> -#include <glib.h> -#include "libqtest.h" #define NO_QEMU_PROTOS #include "hw/nvram/fw_cfg.h"
tests/hd-geo-test.c +0 -5
@@ -15,11 +15,6 @@* Improvements welcome. */ -#include <glib.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include "qemu-common.h" #include "libqtest.h" static char *create_test_img (int secs)
tests/i440fx-test.c +0 -8
@@ -12,13 +12,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> -#include <stdio.h> -#include <unistd.h> -#include <errno.h> #include <sys/mman.h> -#include <stdlib.h> #include "libqtest.h" #include "libqos/pci.h"
@@ -27,8 +21,6 @@#define BROKEN 1 -#define ARRAY_SIZE (array) (sizeof(array) / sizeof((array)[0])) - typedef struct TestData { int num_cpus;
tests/i82801b11-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/ide-test.c +0 -7
@@ -22,18 +22,11 @@* THE SOFTWARE. */ -#include <stdint.h> -#include <string.h> -#include <stdio.h> - -#include <glib.h> -#include "libqtest.h" #include "libqos/libqos.h" #include "libqos/pci-pc.h" #include "libqos/malloc-pc.h" -#include "qemu-common.h" #include "hw/pci/pci_ids.h" #include "hw/pci/pci_regs.h"
tests/intel-hda-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" #define HDA_ID "hda0"#define CODEC_DEVICES " -device hda-output,bus=" HDA_ID ".0" \
tests/ioh3420-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/ipoctal232-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/libqos/ahci.c +0 -3
@@ -22,13 +22,10 @@* THE SOFTWARE. */ -#include <glib.h> -#include "libqtest.h" #include "libqos/ahci.h" #include "libqos/pci-pc.h" -#include "qemu-common.h" #include "qemu/host-utils.h" #include "hw/pci/pci_ids.h"
tests/libqos/fw_cfg.c +0 -2
@@ -12,10 +12,8 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> #include "libqos/fw_cfg.h" #include "libqtest.h" -#include "qemu/bswap.h" void qfw_cfg_select (QFWCFG *fw_cfg,uint16_t key) {
tests/libqos/i2c-omap.c +0 -5
@@ -8,11 +8,6 @@*/ #include "libqos/i2c.h" -#include <glib.h> -#include <string.h> - -#include "qemu/osdep.h" -#include "qemu/bswap.h" #include "libqtest.h" enum OMAPI2CRegisters {
tests/libqos/libqos.c +0 -5
@@ -1,8 +1,3 @@ -#include <stdio.h> -#include <stdlib.h> -#include <glib.h> -#include <unistd.h> -#include <fcntl.h> #include <sys/wait.h> #include "libqtest.h"
tests/libqos/pci-pc.c +0 -3
@@ -15,11 +15,8 @@#include "hw/pci/pci_regs.h" -#include "qemu-common.h" #include "qemu/host-utils.h" -#include <glib.h> -#define ACPI_PCIHP_ADDR 0xae00#define PCI_EJ_BASE 0x0008
tests/libqos/usb.c +0 -3
@@ -11,10 +11,7 @@* This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" #include "hw/usb/uhci-regs.h" #include "libqos/usb.h"
tests/libqos/virtio-mmio.c +0 -2
@@ -7,8 +7,6 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <stdio.h> #include "libqtest.h" #include "libqos/virtio.h" #include "libqos/virtio-mmio.h"
tests/libqos/virtio-pci.c +0 -2
@@ -7,8 +7,6 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <stdio.h> #include "libqtest.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h"
tests/libqos/virtio.c +0 -1
@@ -7,7 +7,6 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> #include "libqtest.h" #include "libqos/virtio.h"
tests/libqtest.c +1 -10
@@ -16,20 +16,11 @@*/ #include "libqtest.h" -#include <glib.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/wait.h> #include <sys/un.h> -#include <inttypes.h> -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <string.h> - -#include "qemu/compiler.h" -#include "qemu/osdep.h" +#include "qapi/qmp/json-parser.h" #include "qapi/qmp/json-streamer.h" #include "qapi/qmp/qjson.h"
tests/libqtest.h +1 -3
@@ -19,11 +19,9 @@#include <stddef.h> #include <stdint.h> -#include <stdbool.h> -#include <stdarg.h> #include <sys/types.h> #include "qapi/qmp/qdict.h" -#include "glib-compat.h" +#include "qemu-common.h" typedef struct QTestState QTestState ;
tests/m48t59-test.c +0 -6
@@ -12,12 +12,6 @@* */ -#include <glib.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include "libqtest.h" #define RTC_SECONDS 0x9
tests/ne2000-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void pci_nop (void )
tests/nvme-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/pc-cpu-test.c +0 -5
@@ -7,12 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> - -#include "qemu-common.h" #include "libqtest.h" -#include "qemu/osdep.h" #include "qapi/qmp/types.h" struct PCTestData {
tests/pcnet-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void pci_nop (void )
tests/pvpanic-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" static void test_panic (void ) {
tests/qom-test.c +0 -5
@@ -7,12 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> - -#include "qemu-common.h" #include "libqtest.h" -#include "qemu/osdep.h" #include "qapi/qmp/types.h" static const char *blacklist_x86[] = {
tests/rtc-test.c +0 -6
@@ -11,12 +11,6 @@* */ -#include <glib.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include "libqtest.h" #include "hw/timer/mc146818rtc_regs.h"
tests/rtl8139-test.c +0 -4
@@ -7,12 +7,8 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" #include "libqos/pci-pc.h" -#include "qemu/osdep.h" -#include "qemu-common.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/spapr-phb-test.c +0 -1
@@ -7,7 +7,6 @@* This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ -#include <glib.h> #include "libqtest.h"
tests/tmp105-test.c +0 -2
@@ -7,8 +7,6 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include "libqtest.h" #include "libqos/i2c.h" #include "hw/misc/tmp105_regs.h"
tests/tpci200-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/usb-hcd-ehci-test.c +0 -4
@@ -7,12 +7,8 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> -#include <stdio.h> #include "libqtest.h" #include "libqos/pci-pc.h" -#include "qemu/osdep.h" #include "hw/usb/uhci-regs.h" #include "hw/usb/ehci-regs.h" #include "libqos/usb.h"
tests/usb-hcd-ohci-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" #include "libqos/usb.h"
tests/usb-hcd-uhci-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" #include "libqos/usb.h" #include "hw/usb/uhci-regs.h"
tests/usb-hcd-xhci-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" #include "libqos/usb.h"
tests/vhost-user-test.c +0 -1
@@ -12,7 +12,6 @@#include <glib.h> #include "libqtest.h" -#include "qemu/option.h" #include "sysemu/char.h" #include "sysemu/sysemu.h"
tests/virtio-9p-test.c +0 -5
@@ -7,12 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <stdlib.h> -#include <string.h> -#include <glib.h> #include "libqtest.h" -#include "qemu-common.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void pci_nop (void )
tests/virtio-balloon-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void pci_nop (void )
tests/virtio-blk-test.c +0 -6
@@ -8,11 +8,6 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include <stdio.h> #include "libqtest.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h"
@@ -21,7 +16,6 @@#include "libqos/malloc.h" #include "libqos/malloc-pc.h" #include "libqos/malloc-generic.h" -#include "qemu/bswap.h" #define QVIRTIO_BLK_F_BARRIER 0x00000001#define QVIRTIO_BLK_F_SIZE_MAX 0x00000002
tests/virtio-console-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void console_pci_nop (void )
tests/virtio-net-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" #include "libqos/pci.h" #define PCI_SLOT_HP 0x06
tests/virtio-rng-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" #include "libqos/pci.h" #define PCI_SLOT_HP 0x06
tests/virtio-scsi-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void pci_nop (void )
tests/virtio-serial-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void pci_nop (void )
tests/vmxnet3-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" /* Tests only initialization so far. TODO: Replace with functional tests */ static void nop (void )
tests/wdt_ib700-test.c +0 -3
@@ -7,10 +7,7 @@* See the COPYING file in the top-level directory. */ -#include <glib.h> -#include <string.h> #include "libqtest.h" -#include "qemu/osdep.h" #define NS_PER_SEC 1000000000ULL
Re: [Qemu-devel] [PATCH] tests: consolidate common includes under libqtest.h
Quoted 5 lines · Emilio G. Cota
Something like the appended?
Cheers,
Emilio
Pretty good, but I wouldn't use qemu-common.h, at least not until all the function and macro declarations are moved to separate headers (some of them may indeed move to osdep.h, in fact).
Paolo
Quoted 22 lines
commit
eb415d0695bb49d9df78aedaf4ed3c7083a1a574Author: Emilio G. Cota <[email protected]> Date: Thu Apr 30 18:00:01 2015 -0400tests: consolidate common includes under
libqtest.hSource files in tests/ include very common headers, such as
glib.horqemu/osdep.h.Consolidate these includes by including
qemu-common.hfromlibqtest.h, which is a common include in tests/.Two things worth mentioning:
- i440fx-test drops its
ARRAY_SIZEdefinition, which comes now fromosdep.hviaqemu-common.h.-
vhost-user-test.cdoes keep its include ofglib.h, since it has to do some contortions to support old glib versions. See commit "bd95939fqtest: fix qtest for vhost-user".Signed-off-by Emilio G. Cota <[email protected]>
Re: [Qemu-devel] [PATCH] i440fx-test: guard ARRAY_SIZE definition with #ifndef
In reply to Emilio G. CotaQuoted 2 lines · Emilio G. Cota
ARRAY_SIZEis defined inosdep.hso having an unconditional definition here is fragile.
Fragile in what sense? Nothing in that file includes osdep.h. At the maximum, compiler will issue a warning about redefinition (it should really be redefinition, not the same definition), which might be treated as error, and we'll just fix that warning.. I'd say just be done with this, it doesn't deserve that much attention ;)
Somehow initially I thought this patch actually FIXES a warning of this sort. But it looks lile it is only fixes a potential warning. Oh well... :)
Thanks,
/mjt