Trivial patches for 2015-10-08
Subsystems (2)
Another trivial-patches pull request.
Everything's trivial in there this time.
Please consider applying/pulling.
Thank you!
/mjt
The following changes since commit 31c9bd164ddb653915b9029ba0edd40cd57530d9:
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20151007' into staging (2015-10-08 15:33:56 +0100)
are available in the git repository at:
git://git.corpit.ru/qemu.git tags/pull-trivial-patches-2015-10-08
for you to fetch changes up to deb847bfba7ee0ab8151842f5e9cb12d4daad3a3:
tests: Unique test path for /string-visitor/output (2015-10-08 19:48:17 +0300)
----------------------------------------------------------------
trivial patches for 2015-10-08
----------------------------------------------------------------
Christopher Covington (1):
s/cpu_get_real_ticks/cpu_get_host_ticks/
Daniel P. Berrange (1):
Add .dir-locals.el file to configure emacs coding style
David Gibson (1):
.travis.yml: Run make check for all targets, not just some
Dr. David Alan Gilbert (1):
tests: Unique test path for /string-visitor/output
Guenter Roeck (1):
imx_serial: Generate interrupt on tx empty if enabled
Marc-André Lureau (1):
qapi: add missing @
Markus Armbruster (2):
rocker: Use g_new() & friends where that makes obvious sense
linux-user: Use g_new() & friends where that makes obvious sense
Paolo Bonzini (3):
block/ssh: remove dead code
pci-assign: do not include sys/io.h
pc: check for underflow in load_linux
Sai Pavan Boddu (2):
sdhci: use PRIx64 for uint64_t type
sdhci: Change debug prints to compile unconditionally
Shraddha Barke (4):
target-microblaze: Remove unnecessary variable
target-ppc: Remove unnecessary variable
hw: timer: Remove unnecessary variable
hw: char: Remove unnecessary variable
Stefan Weil (2):
MAINTAINERS: Add NSIS file for W32, W64 hosts
linux-user: Remove type casts to union type
.dir-locals.el | 2 ++ .travis.yml | 10 +-------- MAINTAINERS | 1 + block/ssh.c | 5 +---- bsd-user/main.c | 2 +- cpus.c | 6 +++--- hw/char/etraxfs_ser.c | 4 +--- hw/char/imx_serial.c | 4 +++- hw/i386/kvm/pci-assign.c | 1 - hw/i386/pc.c | 4 ++++ hw/intc/xics.c | 2 +- hw/net/rocker/rocker.c | 2 +- hw/net/rocker/rocker_desc.c | 4 ++-- hw/net/rocker/rocker_fp.c | 2 +- hw/net/rocker/rocker_of_dpa.c | 9 ++++---- hw/ppc/ppc.c | 4 ++-- hw/sd/sdhci.c | 43 ++++++++++++++++++++------------------ hw/timer/m48t59.c | 4 +--- include/qemu/timer.h | 20 +++++++++--------- linux-user/elfload.c | 2 +- linux-user/main.c | 6 +++--- linux-user/syscall.c | 10 ++++----- qapi/block.json | 2 +- target-alpha/sys_helper.c | 2 +- target-microblaze/op_helper.c | 4 +--- target-ppc/kvm.c | 3 +-- tests/test-string-output-visitor.c | 16 +++++++------- 27 files changed, 83 insertions(+), 91 deletions(-) create mode 100644 .dir-locals.el
[Qemu-devel] [PULL 18/19] linux-user: Remove type casts to union type
From: Stefan Weil <[email protected]>
Casting to a union type is a gcc (and clang) extension. Other compilers might not support it. This is not a problem today, but the type casts can be removed easily. Smatch now no longer complains like before:
linux-user/syscall.c:3190:18: warning: cast to non-scalar linux-user/syscall.c:7348:44: warning: cast to non-scalar
--- linux-user/syscall.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
linux-user/syscall.c +4 -4
@@ -2728,8 +2728,9 @@ static inline abi_long host_to_target_semarray(int semid, abi_ulong target_addr, }static inline abi_long do_semctl (int semid,int semnum,int cmd, -union target_semun target_su) +abi_ulong target_arg) { +union target_semun target_su = { .buf = target_arg };union semun arg;struct semid_ds dsarg;unsigned short *array =NULL ;
@@ -3251,8 +3252,7 @@ static abi_long do_ipc(unsigned int call, abi_long first,* ptr argument. */ abi_ulong atptr;get_user_ual (atptr, ptr); - ret =do_semctl (first, second, third, - (union target_semun ) atptr); + ret =do_semctl (first, second, third, atptr);break ; }
@@ -7550,7 +7550,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,#endif #ifdef TARGET_NR_semctlcase TARGET_NR_semctl: - ret =do_semctl (arg1, arg2, arg3, (union target_semun )(abi_ulong )arg4); + ret =do_semctl (arg1, arg2, arg3, arg4);break ;#endif #ifdef TARGET_NR_msgctl
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 03/19] sdhci: Change debug prints to compile unconditionally
In reply to Michael TokarevFrom: Sai Pavan Boddu <[email protected]>
Conditional compilation hides few type mismatch warnings, fix it to compile unconditionally.
--- hw/sd/sdhci.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
hw/sd/sdhci.c +18 -18
@@ -37,24 +37,24 @@#define SDHC_DEBUG 0#endif -#if SDHC_DEBUG ==0 - #define DPRINT_L1(fmt, args...) do { } while (0) - #define DPRINT_L2(fmt, args...) do { } while (0) - #define ERRPRINT(fmt, args...) do { } while (0) -#elif SDHC_DEBUG ==1 - #define DPRINT_L1(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0) - #define DPRINT_L2(fmt, args...) do { } while (0) - #define ERRPRINT(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC ERROR: "fmt, ## args); } while (0) -#else - #define DPRINT_L1(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0) - #define DPRINT_L2(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0) - #define ERRPRINT(fmt, args...) \ - do {fprintf(stderr, "QEMU SDHC ERROR: "fmt, ## args); } while (0) -#endif +#define DPRINT_L1(fmt, args...) \ + do { \ + if (SDHC_DEBUG) { \ + fprintf(stderr, "QEMU SDHC: " fmt, ## args); \ + } \ + } while (0) +#define DPRINT_L2(fmt, args...) \ + do { \ + if (SDHC_DEBUG > 1) { \ + fprintf(stderr, "QEMU SDHC: " fmt, ## args); \ + } \ + } while (0) +#define ERRPRINT(fmt, args...) \ + do { \ + if (SDHC_DEBUG) { \ + fprintf(stderr, "QEMU SDHC ERROR: " fmt, ## args); \ + } \ + } while (0)/* Default SD/MMC host controller features information, which will be * presented in CAPABILITIES register of generic SD host controller at reset.
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 10/19] target-ppc: Remove unnecessary variable
In reply to Michael TokarevFrom: Shraddha Barke <[email protected]>
Compress lines and remove the variable.
--- target-ppc/kvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
target-ppc/kvm.c +1 -2
@@ -1782,8 +1782,7 @@ uint32_t kvmppc_get_tbfreq(void) ns++; - retval =atoi (ns); -return retval; +return atoi (ns); }bool kvmppc_get_host_serial (char **value)
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 13/19] hw: timer: Remove unnecessary variable
In reply to Michael TokarevFrom: Shraddha Barke <[email protected]>
Compress lines and remove the variable.
--- hw/timer/m48t59.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
hw/timer/m48t59.c +1 -3
@@ -590,10 +590,8 @@ static void nvram_writel (void *opaque, hwaddr addr, uint32_t value)static uint32_t nvram_readb (void *opaque,hwaddr addr) {M48t59State *NVRAM = opaque; -uint32_t retval; - retval =m48t59_read (NVRAM , addr); -return retval; +return m48t59_read (NVRAM , addr); }static uint32_t nvram_readw (void *opaque,hwaddr addr)
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 12/19] qapi: add missing @
In reply to Michael TokarevFrom: Marc-André Lureau <[email protected]>
--- qapi/block.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qapi/block.json +1 -1
@@ -6,7 +6,7 @@ { 'include': 'block-core.json' } ## -# BiosAtaTranslation: +# @BiosAtaTranslation: # # Policy that BIOS should use to interpret cylinder/head/sector # addresses. Note that Bochs BIOS and SeaBIOS will not actually
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 08/19] s/cpu_get_real_ticks/cpu_get_host_ticks/
In reply to Michael TokarevFrom: Christopher Covington <[email protected]>
This should help clarify the purpose of the function that returns the host system's CPU cycle count.
ppc portion
--- bsd-user/main.c | 2 +- cpus.c | 6 +++--- hw/intc/xics.c | 2 +- hw/ppc/ppc.c | 4 ++-- include/qemu/timer.h | 20 ++++++++++---------- linux-user/main.c | 4 ++-- target-alpha/sys_helper.c | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-)
bsd-user/main.c +1 -1
@@ -108,7 +108,7 @@ void cpu_list_unlock(void)uint64_t cpu_get_tsc (CPUX86State *env) { -return cpu_get_real_ticks (); +return cpu_get_host_ticks (); } static void write_dt(void *ptr, unsigned long addr, unsigned long limit,
cpus.c +3 -3
@@ -199,7 +199,7 @@ int64_t cpu_get_ticks(void) ticks = timers_state.cpu_ticks_offset;if (timers_state.cpu_ticks_enabled) { - ticks +=cpu_get_real_ticks (); + ticks +=cpu_get_host_ticks (); }if (timers_state.cpu_ticks_prev > ticks) {
@@ -247,7 +247,7 @@ void cpu_enable_ticks(void)/* Here, the really thing protected by seqlock is cpu_clock_offset. */ seqlock_write_lock (&timers_state.vm_clock_seqlock);if (!timers_state.cpu_ticks_enabled) { - timers_state.cpu_ticks_offset -=cpu_get_real_ticks (); + timers_state.cpu_ticks_offset -=cpu_get_host_ticks (); timers_state.cpu_clock_offset -=get_clock (); timers_state.cpu_ticks_enabled =1 ; }
@@ -263,7 +263,7 @@ void cpu_disable_ticks(void)/* Here, the really thing protected by seqlock is cpu_clock_offset. */ seqlock_write_lock (&timers_state.vm_clock_seqlock);if (timers_state.cpu_ticks_enabled) { - timers_state.cpu_ticks_offset +=cpu_get_real_ticks (); + timers_state.cpu_ticks_offset +=cpu_get_host_ticks (); timers_state.cpu_clock_offset =cpu_get_clock_locked (); timers_state.cpu_ticks_enabled =0 ; }
hw/intc/xics.c +1 -1
@@ -848,7 +848,7 @@ static target_ulong h_xirr_x(PowerPCCPU *cpu, sPAPRMachineState *spapr,uint32_t xirr =icp_accept (ss); args[0 ] = xirr; - args[1 ] =cpu_get_real_ticks (); + args[1 ] =cpu_get_host_ticks ();return H_SUCCESS ; }
hw/ppc/ppc.c +2 -2
@@ -834,7 +834,7 @@ static void cpu_ppc_set_tb_clk (void *opaque, uint32_t freq)static void timebase_pre_save (void *opaque) {PPCTimebase *tb = opaque; -uint64_t ticks =cpu_get_real_ticks (); +uint64_t ticks =cpu_get_host_ticks ();PowerPCCPU *first_ppc_cpu =POWERPC_CPU (first_cpu);if (!first_ppc_cpu->env.tb_env) {
@@ -878,7 +878,7 @@ static int timebase_post_load(void *opaque, int version_id) NANOSECONDS_PER_SECOND); guest_tb = tb_remote->guest_timebase +MIN (0 , migration_duration_tb); - tb_off_adj = guest_tb -cpu_get_real_ticks (); + tb_off_adj = guest_tb -cpu_get_host_ticks (); tb_off = first_ppc_cpu->env.tb_env->tb_offset; trace_ppc_tb_adjust(tb_off, tb_off_adj, tb_off_adj - tb_off,
include/qemu/timer.h +10 -10
@@ -857,7 +857,7 @@ int64_t cpu_icount_to_ns(int64_t icount);#if defined(_ARCH_PPC) -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {int64_t retval;#ifdef _ARCH_PPC64
@@ -883,7 +883,7 @@ static inline int64_t cpu_get_real_ticks(void)#elif defined(__i386__) -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {int64_t val; asmvolatile ("rdtsc" :"=A" (val));
@@ -892,7 +892,7 @@ static inline int64_t cpu_get_real_ticks(void)#elif defined(__x86_64__) -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {uint32_t low,high;int64_t val;
@@ -905,7 +905,7 @@ static inline int64_t cpu_get_real_ticks(void)#elif defined(__hppa__) -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {int val; asmvolatile ("mfctl %%cr16, %0" :"=r" (val));
@@ -914,7 +914,7 @@ static inline int64_t cpu_get_real_ticks(void)#elif defined(__ia64) -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {int64_t val; asmvolatile ("mov %0 = ar.itc" :"=r" (val) ::"memory" );
@@ -923,7 +923,7 @@ static inline int64_t cpu_get_real_ticks(void)#elif defined(__s390__) -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {int64_t val; asmvolatile ("stck 0(%1)" :"=m" (val) :"a" (&val) :"cc" );
@@ -932,7 +932,7 @@ static inline int64_t cpu_get_real_ticks(void)#elif defined(__sparc__) -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {#if defined(_LP64)uint64_t rval;
@@ -970,7 +970,7 @@ static inline int64_t cpu_get_real_ticks (void) : "=r" (value)); \ } -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {/* On kernels >= 2.6.25 rdhwr <reg>, $2 and $3 are emulated */ uint32_t count;
@@ -986,7 +986,7 @@ static inline int64_t cpu_get_real_ticks(void)#elif defined(__alpha__) -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {uint64_t cc;uint32_t cur, ofs;
@@ -1001,7 +1001,7 @@ static inline int64_t cpu_get_real_ticks(void)/* The host CPU doesn't have an easily accessible cycle counter. Just return a monotonically increasing value. This will be totally wrong, but hopefully better than nothing. */ -static inline int64_t cpu_get_real_ticks (void ) +static inline int64_t cpu_get_host_ticks (void ) {static int64_t ticks =0 ;return ticks++;
linux-user/main.c +2 -2
@@ -215,7 +215,7 @@ void cpu_list_unlock(void)uint64_t cpu_get_tsc (CPUX86State *env) { -return cpu_get_real_ticks (); +return cpu_get_host_ticks (); } static void write_dt(void *ptr, unsigned long addr, unsigned long limit,
@@ -1425,7 +1425,7 @@ void cpu_loop (CPUSPARCState *env)#ifdef TARGET_PPC static inline uint64_t cpu_ppc_get_tb (CPUPPCState *env) { -return cpu_get_real_ticks (); +return cpu_get_host_ticks (); }uint64_t cpu_ppc_load_tbl (CPUPPCState *env)
target-alpha/sys_helper.c +1 -1
@@ -34,7 +34,7 @@ uint64_t helper_load_pcc(CPUAlphaState *env)#else /* In user-mode, QEMU_CLOCK_VIRTUAL doesn't exist. Just pass through the host cpu clock ticks. Also, don't bother taking PCC_OFS into account. */ -return (uint32_t )cpu_get_real_ticks (); +return (uint32_t )cpu_get_host_ticks ();#endif }
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 14/19] hw: char: Remove unnecessary variable
In reply to Michael TokarevFrom: Shraddha Barke <[email protected]>
Compress lines and remove the variable.
--- hw/char/etraxfs_ser.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
hw/char/etraxfs_ser.c +1 -3
@@ -182,15 +182,13 @@ static void serial_receive(void *opaque, const uint8_t *buf, int size)static int serial_can_receive (void *opaque) {ETRAXSerial *s = opaque; -int r;/* Is the receiver enabled? */ if (!(s->regs[RW_REC_CTRL ] & (1 <<3 ))) {return 0 ; } - r =sizeof (s->rx_fifo) - s->rx_fifo_len; -return r; +return sizeof (s->rx_fifo) - s->rx_fifo_len; }static void serial_event (void *opaque,int event)
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 09/19] target-microblaze: Remove unnecessary variable
In reply to Michael TokarevFrom: Shraddha Barke <[email protected]>
Compress lines and remove the variable.
--- target-microblaze/op_helper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
target-microblaze/op_helper.c +1 -3
@@ -150,9 +150,7 @@ uint32_t helper_clz(uint32_t t0)uint32_t helper_carry (uint32_t a,uint32_t b,uint32_t cf) { -uint32_t ncf; - ncf =compute_carry (a, b, cf); -return ncf; +return compute_carry (a, b, cf); }static inline int div_prepare (CPUMBState *env,uint32_t a,uint32_t b)
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 16/19] rocker: Use g_new() & friends where that makes obvious sense
In reply to Michael TokarevFrom: Markus Armbruster <[email protected]>
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors.
This commit only touches allocations with size arguments of the form sizeof(T). Same Coccinelle semantic patchas in commit b45c03f.
--- hw/net/rocker/rocker.c | 2 +- hw/net/rocker/rocker_desc.c | 4 ++-- hw/net/rocker/rocker_fp.c | 2 +- hw/net/rocker/rocker_of_dpa.c | 9 ++++----- 4 files changed, 8 insertions(+), 9 deletions(-)
hw/net/rocker/rocker.c +1 -1
@@ -1362,7 +1362,7 @@ static int pci_rocker_init(PCIDevice *dev) r->fp_ports =ROCKER_FP_PORTS_MAX ; } - r->rings =g_malloc (sizeof (DescRing *) *rocker_pci_ring_count (r)); + r->rings = g_new(DescRing *, rocker_pci_ring_count(r));if (!r->rings) { goto err_rings_alloc; }
hw/net/rocker/rocker_desc.c +2 -2
@@ -142,7 +142,7 @@ bool desc_ring_set_size(DescRing *ring, uint32_t size) ring->size = size; ring->head = ring->tail =0 ; - ring->info =g_realloc (ring->info, size *sizeof (DescInfo)); + ring->info =g_renew (DescInfo, ring->info, size);if (!ring->info) {return false; }
@@ -345,7 +345,7 @@ DescRing *desc_ring_alloc(Rocker *r, int index) {DescRing *ring; - ring =g_malloc0 (sizeof (DescRing)); + ring =g_new0 (DescRing,1 );if (!ring) {return NULL ; }
hw/net/rocker/rocker_fp.c +1 -1
@@ -218,7 +218,7 @@ FpPort *fp_port_alloc(Rocker *r, char *sw_name, MACAddr *start_mac, unsigned int index, NICPeers *peers) { - FpPort *port = g_malloc0(sizeof(FpPort)); + FpPort *port = g_new0(FpPort, 1);if (!port) {return NULL ;
hw/net/rocker/rocker_of_dpa.c +4 -5
@@ -367,7 +367,7 @@ static OfDpaFlow *of_dpa_flow_alloc(uint64_t cookie)OfDpaFlow *flow;int64_t now =qemu_clock_get_ms (QEMU_CLOCK_VIRTUAL ) /1000 ; - flow =g_malloc0 (sizeof (OfDpaFlow)); + flow =g_new0 (OfDpaFlow,1 );if (!flow) {return NULL ; }
@@ -811,7 +811,7 @@ static int of_dpa_group_get_stats(OfDpa *of_dpa, uint32_t id)static OfDpaGroup *of_dpa_group_alloc (uint32_t id) { -OfDpaGroup *group =g_malloc0 (sizeof (OfDpaGroup)); +OfDpaGroup *group =g_new0 (OfDpaGroup,1 );if (!group) {return NULL ;
@@ -2039,15 +2039,14 @@ static int of_dpa_cmd_add_l2_flood(OfDpa *of_dpa, OfDpaGroup *group, group->l2_flood.group_count =rocker_tlv_get_le16 (group_tlvs[ROCKER_TLV_OF_DPA_GROUP_COUNT ]); - tlvs =g_malloc0 ((group->l2_flood.group_count +1 ) * -sizeof (RockerTlv *)); + tlvs = g_new0(RockerTlv *, group->l2_flood.group_count + 1);if (!tlvs) {return -ROCKER_ENOMEM ; }g_free (group->l2_flood.group_ids); group->l2_flood.group_ids = -g_malloc0 (group->l2_flood.group_count *sizeof (uint32_t )); +g_new0 (uint32_t, group->l2_flood.group_count);if (!group->l2_flood.group_ids) { err = -ROCKER_ENOMEM ; goto err_out;
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 15/19] .travis.yml: Run make check for all targets, not just some
In reply to Michael TokarevFrom: David Gibson <[email protected]>
ed173cb ".travis.yml: remove "make check" from main matrix" stopped running make check for all the Travis build targets for various reasons. It continued to run make check on one Travis build, which builds for a big list of all (? nearly all) our supported softmmu targets.
Unfortunately, due to a spacing / quoting error it only actually builds for the alpha, arm, aarch64 and cris targets. Specifically, the list of targets is split over several lines. Even with YAML folding, this will leave spaces in the list, meaning $TARGETS won't have the value we need.
I had a look at the YAML spec and I couldn't quickly see a way of splitting the list so that it doesn't end up with spaces, so this patch fixes the problem by putting the whole list on one huge line.
--- .travis.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
.travis.yml +1 -9
@@ -54,15 +54,7 @@ matrix: include: # Make check target (we only do this once) - env: - - TARGETS=alpha-softmmu,arm-softmmu,aarch64-softmmu,cris-softmmu, - i386-softmmu,x86_64-softmmu,m68k-softmmu,microblaze-softmmu, - microblazeel-softmmu,mips-softmmu,mips64-softmmu, - mips64el-softmmu,mipsel-softmmu,or32-softmmu,ppc-softmmu, - ppc64-softmmu,ppcemb-softmmu,s390x-softmmu,sh4-softmmu, - sh4eb-softmmu,sparc-softmmu,sparc64-softmmu, - unicore32-softmmu,unicore32-linux-user, - lm32-softmmu,moxie-softmmu,tricore-softmmu,xtensa-softmmu, - xtensaeb-softmmu + - TARGETS=alpha-softmmu,arm-softmmu,aarch64-softmmu,cris-softmmu,i386-softmmu,x86_64-softmmu,m68k-softmmu,microblaze-softmmu,microblazeel-softmmu,mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu,or32-softmmu,ppc-softmmu,ppc64-softmmu,ppcemb-softmmu,s390x-softmmu,sh4-softmmu,sh4eb-softmmu,sparc-softmmu,sparc64-softmmu,unicore32-softmmu,unicore32-linux-user,lm32-softmmu,moxie-softmmu,tricore-softmmu,xtensa-softmmu,xtensaeb-softmmu TEST_CMD="make check" compiler: gcc # Debug related options
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 04/19] imx_serial: Generate interrupt on tx empty if enabled
In reply to Michael TokarevFrom: Guenter Roeck <[email protected]>
Generate an interrupt if the tx buffer is empty and the tx empty interrupt is enabled. This fixes a problem seen when running a Linux image since Linux commit 55c3cb1358e ("serial: imx: remove unneeded imx_transmit_buffer() from imx_start_tx()"). Linux now waits for the tx empty interrupt before starting to send data, causing transmit stalls until there is an interrupt for another reason.
--- hw/char/imx_serial.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
hw/char/imx_serial.c +3 -1
@@ -66,7 +66,9 @@ static void imx_update(IMXSerialState *s)uint32_t flags; flags = (s->usr1 & s->ucr1) & (USR1_TRDY |USR1_RRDY ); -if (!(s->ucr1 &UCR1_TXMPTYEN )) { +if (s->ucr1 &UCR1_TXMPTYEN ) { + flags |= (s->uts1 &UTS1_TXEMPTY ); + }else { flags &= ~USR1_TRDY ; }
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 17/19] linux-user: Use g_new() & friends where that makes obvious sense
In reply to Michael TokarevFrom: Markus Armbruster <[email protected]>
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors.
This commit only touches allocations with size arguments of the form sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
--- linux-user/elfload.c | 2 +- linux-user/main.c | 2 +- linux-user/syscall.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
linux-user/elfload.c +1 -1
@@ -2853,7 +2853,7 @@ static int fill_note_info(struct elf_note_info *info,TaskState *ts = (TaskState *)cpu->opaque;int i; - info->notes =g_malloc0 (NUMNOTES *sizeof (struct memelfnote )); + info->notes = g_new0(struct memelfnote, NUMNOTES);if (info->notes ==NULL )return (-ENOMEM ); info->prstatus =g_malloc0 (sizeof (*info->prstatus));
linux-user/main.c +1 -1
@@ -4270,7 +4270,7 @@ int main(int argc, char **argv, char **envp) } target_argv[target_argc] =NULL ; - ts =g_malloc0 (sizeof (TaskState)); + ts =g_new0 (TaskState,1 );init_task_state (ts);/* build Task State */ ts->info = info;
linux-user/syscall.c +1 -1
@@ -4566,7 +4566,7 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,new_thread_info info;pthread_attr_t attr; - ts =g_malloc0 (sizeof (TaskState)); + ts =g_new0 (TaskState,1 );init_task_state (ts);/* we create a new CPU instance. */ new_env =cpu_copy (env);
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 05/19] block/ssh: remove dead code
In reply to Michael TokarevFrom: Paolo Bonzini <[email protected]>
The "err" label cannot be reached with qp != NULL. Remove the free-ing of qp and avoid future regressions by removing the initializer.
--- block/ssh.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
block/ssh.c +1 -4
@@ -193,7 +193,7 @@ sftp_error_report(BDRVSSHState *s, const char *fs, ...)static int parse_uri (const char *filename,QDict *options,Error **errp) {URI *uri =NULL ; -QueryParams *qp =NULL ; +QueryParams *qp;int i; uri =uri_parse (filename);
@@ -249,9 +249,6 @@ static int parse_uri(const char *filename, QDict *options, Error **errp)return 0 ; err: -if (qp) { -query_params_free (qp); - }if (uri) {uri_free (uri); }
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 07/19] pc: check for underflow in load_linux
In reply to Michael TokarevFrom: Paolo Bonzini <[email protected]>
If (setup_size+1)*512 is small enough, kernel_size -= setup_size can allocate a huge amount of memory. Avoid that.
--- hw/i386/pc.c | 4 ++++ 1 file changed, 4 insertions(+)
hw/i386/pc.c +4 -0
@@ -985,6 +985,10 @@ static void load_linux(PCMachineState *pcms, setup_size =4 ; } setup_size = (setup_size+1 )*512 ; +if (setup_size > kernel_size) { +fprintf (stderr,"qemu: invalid kernel header\n" ); +exit (1 ); + } kernel_size -= setup_size; setup =g_malloc (setup_size);
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 19/19] tests: Unique test path for /string-visitor/output
In reply to Michael TokarevFrom: "Dr. David Alan Gilbert" <[email protected]>
Newer GLib's want unique test paths, and thus moan at dupes. (Seen on Fedora 23 which has glib 2.46)
Uniquify the paths.
--- tests/test-string-output-visitor.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
tests/test-string-output-visitor.c +8 -8
@@ -248,39 +248,39 @@ int main(int argc, char **argv)output_visitor_test_add ("/string-visitor/output/int" , &out_visitor_data, test_visitor_out_int, false); -output_visitor_test_add ("/string-visitor/output/int" , +output_visitor_test_add ("/string-visitor/output/int-human" , &out_visitor_data, test_visitor_out_int, true);output_visitor_test_add ("/string-visitor/output/bool" , &out_visitor_data, test_visitor_out_bool, false); -output_visitor_test_add ("/string-visitor/output/bool" , +output_visitor_test_add ("/string-visitor/output/bool-human" , &out_visitor_data, test_visitor_out_bool, true);output_visitor_test_add ("/string-visitor/output/number" , &out_visitor_data, test_visitor_out_number, false); -output_visitor_test_add ("/string-visitor/output/number" , +output_visitor_test_add ("/string-visitor/output/number-human" , &out_visitor_data, test_visitor_out_number, true);output_visitor_test_add ("/string-visitor/output/string" , &out_visitor_data, test_visitor_out_string, false); -output_visitor_test_add ("/string-visitor/output/string" , +output_visitor_test_add ("/string-visitor/output/string-human" , &out_visitor_data, test_visitor_out_string, true);output_visitor_test_add ("/string-visitor/output/no-string" , &out_visitor_data, test_visitor_out_no_string, false); -output_visitor_test_add ("/string-visitor/output/no-string" , +output_visitor_test_add ("/string-visitor/output/no-string-human" , &out_visitor_data, test_visitor_out_no_string, true);output_visitor_test_add ("/string-visitor/output/enum" , &out_visitor_data, test_visitor_out_enum, false); -output_visitor_test_add ("/string-visitor/output/enum" , +output_visitor_test_add ("/string-visitor/output/enum-human" , &out_visitor_data, test_visitor_out_enum, true);output_visitor_test_add ("/string-visitor/output/enum-errors" , &out_visitor_data, test_visitor_out_enum_errors, false); -output_visitor_test_add ("/string-visitor/output/enum-errors" , +output_visitor_test_add ("/string-visitor/output/enum-errors-human" , &out_visitor_data, test_visitor_out_enum_errors, true);output_visitor_test_add ("/string-visitor/output/intList" , &out_visitor_data, test_visitor_out_intList, false); -output_visitor_test_add ("/string-visitor/output/intList" , +output_visitor_test_add ("/string-visitor/output/intList-human" , &out_visitor_data, test_visitor_out_intList, true);g_test_run ();
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 01/19] Add .dir-locals.el file to configure emacs coding style
In reply to Michael TokarevFrom: "Daniel P. Berrange" <[email protected]>
Some default emacs setups indent by 2 spaces and uses tabs which is counter to the QEMU coding style rules. Adding a .dir-locals.el file in the top level of the GIT repo will inform emacs about the QEMU coding style, and so assist contributors in avoiding common style mistakes before they submit patches.
--- .dir-locals.el | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .dir-locals.el
.dir-locals.el new file +2 -0
@@ -0,0 +1,2 @@ +((c-mode . ((c-file-style . "stroustrup") + (indent-tabs-mode . nil))))
Signature · 1 line
2.1.4
Re: [Qemu-devel] [PULL 01/19] Add .dir-locals.el file to configure emacs coding style
Hi
Similar to this file, I proposed a clang-format file. I also use emacs, but clang-format is way better at dealing with reformating, especially on a given region without touching the rest:
https://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg01278.html
Quoted 29 lines · Michael Tokarev
From: "Daniel P. Berrange" <[email protected]>
Some default emacs setups indent by 2 spaces and uses tabs which is counter to the QEMU coding style rules. Adding a .dir-locals.el file in the top level of the GIT repo will inform emacs about the QEMU coding style, and so assist contributors in avoiding common style mistakes before they submit patches.
Signed-off-by Daniel P. Berrange <[email protected]>Reviewed-by Markus Armbruster <[email protected]>Signed-off-by Michael Tokarev <[email protected]>--- .dir-locals.el | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .dir-locals.el.dir-locals.el new file +2
-1@@ -0,0 +1,2 @@ +((c-mode . ((c-file-style . "stroustrup") + (indent-tabs-mode . nil)))) --2.1.4
Signature · 1 line
Marc-André Lureau
[Qemu-devel] [PULL 06/19] pci-assign: do not include sys/io.h
In reply to Michael TokarevFrom: Paolo Bonzini <[email protected]>
This file does not exist on bionic libc and the functions it defines are in fact not used by pci-assign.c. Remove it.
--- hw/i386/kvm/pci-assign.c | 1 - 1 file changed, 1 deletion(-)
hw/i386/kvm/pci-assign.c +0 -1
@@ -22,7 +22,6 @@*/ #include <stdio.h> #include <unistd.h> -#include <sys/io.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/stat.h>
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 02/19] sdhci: use PRIx64 for uint64_t type
In reply to Michael TokarevFrom: Sai Pavan Boddu <[email protected]>
Fix compile time warnings, because of type mismatch for unsigned long long type.
--- hw/sd/sdhci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
hw/sd/sdhci.c +5 -2
@@ -22,6 +22,7 @@* with this program; if not, see <http://www.gnu.org/licenses/>. */ +#include <inttypes.h> #include "hw/hw.h" #include "sysemu/block-backend.h" #include "sysemu/blockdev.h"
@@ -719,7 +720,8 @@ static void sdhci_do_adma(SDHCIState *s)break ;case SDHC_ADMA_ATTR_ACT_LINK :/* link to next descriptor table */ s->admasysaddr = dscr.addr; -DPRINT_L1 ("ADMA link: admasysaddr=0x%lx\n" , s->admasysaddr); +DPRINT_L1 ("ADMA link: admasysaddr=0x%" PRIx64"\n" , + s->admasysaddr);break ;default : s->admasysaddr += dscr.incr;
@@ -727,7 +729,8 @@ static void sdhci_do_adma(SDHCIState *s) }if (dscr.attr &SDHC_ADMA_ATTR_INT ) { -DPRINT_L1 ("ADMA interrupt: admasysaddr=0x%lx\n" , s->admasysaddr); +DPRINT_L1 ("ADMA interrupt: admasysaddr=0x%" PRIx64"\n" , + s->admasysaddr);if (s->norintstsen &SDHC_NISEN_DMA ) { s->norintsts |=SDHC_NIS_DMA ; }
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 11/19] MAINTAINERS: Add NSIS file for W32, W64 hosts
In reply to Michael TokarevFrom: Stefan Weil <[email protected]>
The NSIS installer configuration is maintained by me.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -275,6 +275,7 @@ L: [email protected] M: Stefan Weil <[email protected]> S: Maintained F: *win32* +F: qemu.nsi ARM Machines ------------
Signature · 1 line
2.1.4
Peter Maydell
AppliedQuoted 17 lines · Michael Tokarev
Another trivial-patches pull request.
Everything's trivial in there this time.Please consider applying/pulling.
Thank you!
/mjt
The following changes since commit
31c9bd164ddb653915b9029ba0edd40cd57530d9:Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20151007' into staging (2015-10-08 15:33:56 +0100)
are available in the git repository at:
git://git.corpit.ru/qemu.gittags/pull-trivial-patches-2015-10-08
Quoted 8 lines
for you to fetch changes up to
deb847bfba7ee0ab8151842f5e9cb12d4daad3a3:tests: Unique test path for /string-visitor/output (2015-10-08 19:48:17 +0300)
----------------------------------------------------------------
trivial patches for 2015-10-08----------------------------------------------------------------
Applied, thanks.
-- PMM