summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile12
-rw-r--r--Makefile.target5
-rw-r--r--backends/rng-random.c5
-rw-r--r--block.c2
-rw-r--r--block/iscsi.c2
-rwxr-xr-xconfigure5
-rw-r--r--hw/char/virtio-serial-bus.c8
-rw-r--r--hw/input/hid.c2
-rw-r--r--hw/moxie/moxiesim.c13
-rw-r--r--libcacard/vscclient.c2
-rw-r--r--linux-user/arm/syscall.h1
-rw-r--r--linux-user/main.c4
-rw-r--r--rules.mak7
-rw-r--r--slirp/tftp.h2
-rw-r--r--target-arm/helper.c2
-rw-r--r--target-ppc/dfp_helper.c3
-rw-r--r--target-s390x/translate.c5
-rw-r--r--target-unicore32/translate.c28
-rw-r--r--target-unicore32/ucf64_helper.c22
-rw-r--r--tcg/mips/tcg-target.c4
-rw-r--r--tcg/tcg.c20
-rw-r--r--tests/qemu-iotests/common.qemu2
-rw-r--r--translate-all.c2
23 files changed, 43 insertions, 115 deletions
diff --git a/Makefile b/Makefile
index 7d0c8ec7cc..145adb68a2 100644
--- a/Makefile
+++ b/Makefile
@@ -385,12 +385,8 @@ install-sysconfig: install-datadir install-confdir
 
 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
 install-datadir install-localstatedir
-	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
 ifneq ($(TOOLS),)
-	$(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
-ifneq ($(STRIP),)
-	$(STRIP) $(TOOLS:%="$(DESTDIR)$(bindir)/%")
-endif
+	$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
 endif
 ifneq ($(CONFIG_MODULES),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)"
@@ -401,11 +397,7 @@ ifneq ($(CONFIG_MODULES),)
 	done
 endif
 ifneq ($(HELPERS-y),)
-	$(INSTALL_DIR) "$(DESTDIR)$(libexecdir)"
-	$(INSTALL_PROG) $(HELPERS-y) "$(DESTDIR)$(libexecdir)"
-ifneq ($(STRIP),)
-	$(STRIP) $(HELPERS-y:%="$(DESTDIR)$(libexecdir)/%")
-endif
+	$(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
 endif
 ifneq ($(BLOBS),)
 	set -e; for x in $(BLOBS); do \
diff --git a/Makefile.target b/Makefile.target
index fc5827cd72..6089d290df 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -190,10 +190,7 @@ endif
 
 install: all
 ifneq ($(PROGS),)
-	$(INSTALL_PROG) $(PROGS) "$(DESTDIR)$(bindir)"
-ifneq ($(STRIP),)
-	$(STRIP) $(PROGS:%="$(DESTDIR)$(bindir)/%")
-endif
+	$(call install-prog,$(PROGS),$(DESTDIR)$(bindir))
 endif
 ifdef CONFIG_TRACE_SYSTEMTAP
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
diff --git a/backends/rng-random.c b/backends/rng-random.c
index 136499d305..601d9dc0c2 100644
--- a/backends/rng-random.c
+++ b/backends/rng-random.c
@@ -106,10 +106,7 @@ static void rng_random_set_filename(Object *obj, const char *filename,
         return;
     }
 
-    if (s->filename) {
-        g_free(s->filename);
-    }
-
+    g_free(s->filename);
     s->filename = g_strdup(filename);
 }
 
diff --git a/block.c b/block.c
index e6f9b71e11..217f523dd0 100644
--- a/block.c
+++ b/block.c
@@ -5581,7 +5581,6 @@ void bdrv_img_create(const char *filename, const char *fmt,
         if (backing_file) {
             BlockDriverState *bs;
             uint64_t size;
-            char buf[32];
             int back_flags;
 
             /* backing files always opened read-only */
@@ -5602,7 +5601,6 @@ void bdrv_img_create(const char *filename, const char *fmt,
             bdrv_get_geometry(bs, &size);
             size *= 512;
 
-            snprintf(buf, sizeof(buf), "%" PRId64, size);
             qemu_opt_set_number(opts, BLOCK_OPT_SIZE, size);
 
             bdrv_unref(bs);
diff --git a/block/iscsi.c b/block/iscsi.c
index 84aa22a62e..f3e83e2332 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -101,7 +101,7 @@ typedef struct IscsiAIOCB {
 #define ISCSI_CMD_RETRIES ARRAY_SIZE(iscsi_retry_times)
 static const unsigned iscsi_retry_times[] = {8, 32, 128, 512, 2048};
 
-/* this threshhold is a trade-off knob to choose between
+/* this threshold is a trade-off knob to choose between
  * the potential additional overhead of an extra GET_LBA_STATUS request
  * vs. unnecessarily reading a lot of zero sectors over the wire.
  * If a read request is greater or equal than ISCSI_CHECKALLOC_THRES
diff --git a/configure b/configure
index 9c1471e70f..71029643cc 100755
--- a/configure
+++ b/configure
@@ -330,7 +330,7 @@ virtio_blk_data_plane=""
 gtk=""
 gtkabi=""
 vte=""
-tpm="no"
+tpm="yes"
 libssh2=""
 vhdx=""
 quorum=""
@@ -1105,6 +1105,8 @@ for opt do
   ;;
   --enable-vte) vte="yes"
   ;;
+  --disable-tpm) tpm="no"
+  ;;
   --enable-tpm) tpm="yes"
   ;;
   --disable-libssh2) libssh2="no"
@@ -1382,6 +1384,7 @@ Advanced options (experts only):
   --disable-glusterfs      disable GlusterFS backend
   --enable-gcov            enable test coverage analysis with gcov
   --gcov=GCOV              use specified gcov [$gcov_tool]
+  --disable-tpm            disable TPM support
   --enable-tpm             enable TPM support
   --disable-libssh2        disable ssh block device support
   --enable-libssh2         enable ssh block device support
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index 2b647b68d5..a2958ff02f 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -465,13 +465,6 @@ static void get_config(VirtIODevice *vdev, uint8_t *config_data)
     memcpy(config_data, &vser->config, sizeof(struct virtio_console_config));
 }
 
-static void set_config(VirtIODevice *vdev, const uint8_t *config_data)
-{
-    struct virtio_console_config config;
-
-    memcpy(&config, config_data, sizeof(config));
-}
-
 static void guest_reset(VirtIOSerial *vser)
 {
     VirtIOSerialPort *port;
@@ -1024,7 +1017,6 @@ static void virtio_serial_class_init(ObjectClass *klass, void *data)
     vdc->unrealize = virtio_serial_device_unrealize;
     vdc->get_features = get_features;
     vdc->get_config = get_config;
-    vdc->set_config = set_config;
     vdc->set_status = set_status;
     vdc->reset = vser_reset;
 }
diff --git a/hw/input/hid.c b/hw/input/hid.c
index 295bdab652..9656e90c59 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -164,7 +164,7 @@ static void hid_pointer_sync(DeviceState *dev)
 
     if (hs->n == QUEUE_LENGTH-1) {
         /*
-         * Queue full.  We are loosing information, but we at least
+         * Queue full.  We are losing information, but we at least
          * keep track of most recent button state.
          */
         return;
diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c
index f4357cf0d8..430f8410d3 100644
--- a/hw/moxie/moxiesim.c
+++ b/hw/moxie/moxiesim.c
@@ -94,19 +94,6 @@ static void main_cpu_reset(void *opaque)
     cpu_reset(CPU(cpu));
 }
 
-static inline DeviceState *
-moxie_intc_create(hwaddr base, qemu_irq irq, int kind_of_intr)
-{
-    DeviceState *dev;
-
-    dev = qdev_create(NULL, "moxie,intc");
-    qdev_prop_set_uint32(dev, "kind-of-intr", kind_of_intr);
-    qdev_init_nofail(dev);
-    sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
-    sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq);
-    return dev;
-}
-
 static void moxiesim_init(MachineState *machine)
 {
     MoxieCPU *cpu = NULL;
diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c
index ab9b2b82d6..80111df00c 100644
--- a/libcacard/vscclient.c
+++ b/libcacard/vscclient.c
@@ -11,6 +11,8 @@
  */
 
 #ifndef _WIN32
+#include <sys/socket.h>
+#include <netinet/in.h>
 #include <netdb.h>
 #define closesocket(x) close(x)
 #endif
diff --git a/linux-user/arm/syscall.h b/linux-user/arm/syscall.h
index ce2c2a8ed0..e0d2cc3e5d 100644
--- a/linux-user/arm/syscall.h
+++ b/linux-user/arm/syscall.h
@@ -29,6 +29,7 @@ struct target_pt_regs {
 #define ARM_THUMB_SYSCALL	0
 
 #define ARM_NR_BASE	  0xf0000
+#define ARM_NR_breakpoint (ARM_NR_BASE + 1)
 #define ARM_NR_cacheflush (ARM_NR_BASE + 2)
 #define ARM_NR_set_tls	  (ARM_NR_BASE + 5)
 
diff --git a/linux-user/main.c b/linux-user/main.c
index df1bb0e758..900a17fa33 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -806,6 +806,9 @@ void cpu_loop(CPUARMState *env)
                             cpu_set_tls(env, env->regs[0]);
                             env->regs[0] = 0;
                             break;
+                        case ARM_NR_breakpoint:
+                            env->regs[15] -= env->thumb ? 2 : 4;
+                            goto excp_debug;
                         default:
                             gemu_log("qemu: Unsupported ARM syscall: 0x%x\n",
                                      n);
@@ -849,6 +852,7 @@ void cpu_loop(CPUARMState *env)
             }
             break;
         case EXCP_DEBUG:
+        excp_debug:
             {
                 int sig;
 
diff --git a/rules.mak b/rules.mak
index 945484ecb4..ba2f4c19a5 100644
--- a/rules.mak
+++ b/rules.mak
@@ -101,6 +101,13 @@ cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
 VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc
 set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
 
+# install-prog list, dir
+define install-prog
+	$(INSTALL_DIR) "$2"
+	$(INSTALL_PROG) $1 "$2"
+	$(if $(STRIP),$(STRIP) $(foreach T,$1,"$2/$(notdir $T)"),)
+endef
+
 # find-in-path
 # Usage: $(call find-in-path, prog)
 # Looks in the PATH if the argument contains no slash, else only considers one
diff --git a/slirp/tftp.h b/slirp/tftp.h
index 87adeb5333..e1cc24b9bf 100644
--- a/slirp/tftp.h
+++ b/slirp/tftp.h
@@ -2,7 +2,7 @@
 #ifndef SLIRP_TFTP_H
 #define SLIRP_TFTP_H 1
 
-#define TFTP_SESSIONS_MAX 3
+#define TFTP_SESSIONS_MAX 20
 
 #define TFTP_SERVER	69
 
diff --git a/target-arm/helper.c b/target-arm/helper.c
index ed4d2bb419..d3438560e6 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -2350,7 +2350,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
             { .name = "ID_AA64DFR0_EL1", .state = ARM_CP_STATE_AA64,
               .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 0,
               .access = PL1_R, .type = ARM_CP_CONST,
-              /* We mask out the PMUVer field, beacuse we don't currently
+              /* We mask out the PMUVer field, because we don't currently
                * implement the PMU. Not advertising it prevents the guest
                * from trying to use it and getting UNDEFs on registers we
                * don't implement.
diff --git a/target-ppc/dfp_helper.c b/target-ppc/dfp_helper.c
index 773803a285..49820bf21d 100644
--- a/target-ppc/dfp_helper.c
+++ b/target-ppc/dfp_helper.c
@@ -411,9 +411,8 @@ static inline int dfp_get_digit(decNumber *dn, int n)
         return (dn->lsu[unit] / 10) % 10;
     case 2:
         return dn->lsu[unit] / 100;
-    default:
-        assert(0);
     }
+    g_assert_not_reached();
 }
 
 #define DFP_HELPER_TAB(op, dnop, postprocs, size)                              \
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index 8ca4824d60..e2a1d05f15 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -264,11 +264,6 @@ static inline uint64_t ld_code4(CPUS390XState *env, uint64_t pc)
     return (uint64_t)(uint32_t)cpu_ldl_code(env, pc);
 }
 
-static inline uint64_t ld_code6(CPUS390XState *env, uint64_t pc)
-{
-    return (ld_code2(env, pc) << 32) | ld_code4(env, pc + 2);
-}
-
 static int get_mem_index(DisasContext *s)
 {
     switch (s->tb->flags & FLAG_MASK_ASC) {
diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c
index 5a8c7c89ee..e3643c23cd 100644
--- a/target-unicore32/translate.c
+++ b/target-unicore32/translate.c
@@ -576,13 +576,6 @@ static inline TCGv gen_ld32(TCGv addr, int index)
     return tmp;
 }
 
-static inline TCGv_i64 gen_ld64(TCGv addr, int index)
-{
-    TCGv_i64 tmp = tcg_temp_new_i64();
-    tcg_gen_qemu_ld64(tmp, addr, index);
-    return tmp;
-}
-
 static inline void gen_st8(TCGv val, TCGv addr, int index)
 {
     tcg_gen_qemu_st8(val, addr, index);
@@ -601,12 +594,6 @@ static inline void gen_st32(TCGv val, TCGv addr, int index)
     dead_tmp(val);
 }
 
-static inline void gen_st64(TCGv_i64 val, TCGv addr, int index)
-{
-    tcg_gen_qemu_st64(val, addr, index);
-    tcg_temp_free_i64(val);
-}
-
 static inline void gen_set_pc_im(uint32_t val)
 {
     tcg_gen_movi_i32(cpu_R[31], val);
@@ -1128,21 +1115,6 @@ static inline void gen_jmp(DisasContext *s, uint32_t dest)
     }
 }
 
-static inline void gen_mulxy(TCGv t0, TCGv t1, int x, int y)
-{
-    if (x) {
-        tcg_gen_sari_i32(t0, t0, 16);
-    } else {
-        gen_sxth(t0);
-    }
-    if (y) {
-        tcg_gen_sari_i32(t1, t1, 16);
-    } else {
-        gen_sxth(t1);
-    }
-    tcg_gen_mul_i32(t0, t0, t1);
-}
-
 /* Returns nonzero if access to the PSR is not permitted. Marks t0 as dead. */
 static int gen_set_psr(DisasContext *s, uint32_t mask, int bsr, TCGv t0)
 {
diff --git a/target-unicore32/ucf64_helper.c b/target-unicore32/ucf64_helper.c
index 0c7ea2693c..5af008fc6f 100644
--- a/target-unicore32/ucf64_helper.c
+++ b/target-unicore32/ucf64_helper.c
@@ -290,28 +290,6 @@ static inline uint32_t ucf64_stoi(float32 s)
     return v.i;
 }
 
-static inline float64 ucf64_itod(uint64_t i)
-{
-    union {
-        uint64_t i;
-        float64 d;
-    } v;
-
-    v.i = i;
-    return v.d;
-}
-
-static inline uint64_t ucf64_dtoi(float64 d)
-{
-    union {
-        uint64_t i;
-        float64 d;
-    } v;
-
-    v.d = d;
-    return v.i;
-}
-
 /* Integer to float conversion.  */
 float32 HELPER(ucf64_si2sf)(float32 x, CPUUniCore32State *env)
 {
diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c
index 8855d5039d..9cce3563a6 100644
--- a/tcg/mips/tcg-target.c
+++ b/tcg/mips/tcg-target.c
@@ -781,7 +781,7 @@ static void tcg_out_brcond2(TCGContext *s, TCGCond cond, TCGReg al, TCGReg ah,
         break;
 
     default:
-        /* Minimize code size by prefering a compare not requiring INV.  */
+        /* Minimize code size by preferring a compare not requiring INV.  */
         if (mips_cmp_map[cond] & MIPS_CMP_INV) {
             cond = tcg_invert_cond(cond);
             b_cond = TCG_COND_EQ;
@@ -810,7 +810,7 @@ static void tcg_out_movcond(TCGContext *s, TCGCond cond, TCGReg ret,
         break;
 
     default:
-        /* Minimize code size by prefering a compare not requiring INV.  */
+        /* Minimize code size by preferring a compare not requiring INV.  */
         if (mips_cmp_map[cond] & MIPS_CMP_INV) {
             cond = tcg_invert_cond(cond);
             m_opc = OPC_MOVZ;
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 815eec1a78..c068990fd5 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -124,19 +124,20 @@ static TCGRegSet tcg_target_available_regs[2];
 static TCGRegSet tcg_target_call_clobber_regs;
 
 #if TCG_TARGET_INSN_UNIT_SIZE == 1
-static inline void tcg_out8(TCGContext *s, uint8_t v)
+static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t v)
 {
     *s->code_ptr++ = v;
 }
 
-static inline void tcg_patch8(tcg_insn_unit *p, uint8_t v)
+static __attribute__((unused)) inline void tcg_patch8(tcg_insn_unit *p,
+                                                      uint8_t v)
 {
     *p = v;
 }
 #endif
 
 #if TCG_TARGET_INSN_UNIT_SIZE <= 2
-static inline void tcg_out16(TCGContext *s, uint16_t v)
+static __attribute__((unused)) inline void tcg_out16(TCGContext *s, uint16_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 2) {
         *s->code_ptr++ = v;
@@ -147,7 +148,8 @@ static inline void tcg_out16(TCGContext *s, uint16_t v)
     }
 }
 
-static inline void tcg_patch16(tcg_insn_unit *p, uint16_t v)
+static __attribute__((unused)) inline void tcg_patch16(tcg_insn_unit *p,
+                                                       uint16_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 2) {
         *p = v;
@@ -158,7 +160,7 @@ static inline void tcg_patch16(tcg_insn_unit *p, uint16_t v)
 #endif
 
 #if TCG_TARGET_INSN_UNIT_SIZE <= 4
-static inline void tcg_out32(TCGContext *s, uint32_t v)
+static __attribute__((unused)) inline void tcg_out32(TCGContext *s, uint32_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 4) {
         *s->code_ptr++ = v;
@@ -169,7 +171,8 @@ static inline void tcg_out32(TCGContext *s, uint32_t v)
     }
 }
 
-static inline void tcg_patch32(tcg_insn_unit *p, uint32_t v)
+static __attribute__((unused)) inline void tcg_patch32(tcg_insn_unit *p,
+                                                       uint32_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 4) {
         *p = v;
@@ -180,7 +183,7 @@ static inline void tcg_patch32(tcg_insn_unit *p, uint32_t v)
 #endif
 
 #if TCG_TARGET_INSN_UNIT_SIZE <= 8
-static inline void tcg_out64(TCGContext *s, uint64_t v)
+static __attribute__((unused)) inline void tcg_out64(TCGContext *s, uint64_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 8) {
         *s->code_ptr++ = v;
@@ -191,7 +194,8 @@ static inline void tcg_out64(TCGContext *s, uint64_t v)
     }
 }
 
-static inline void tcg_patch64(tcg_insn_unit *p, uint64_t v)
+static __attribute__((unused)) inline void tcg_patch64(tcg_insn_unit *p,
+                                                       uint64_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 8) {
         *p = v;
diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
index 918af3102c..ee7ebb4c1d 100644
--- a/tests/qemu-iotests/common.qemu
+++ b/tests/qemu-iotests/common.qemu
@@ -103,7 +103,7 @@ function _send_qemu_cmd()
         count=${qemu_cmd_repeat}
         use_error="no"
     fi
-    # This array element extraction is done to accomodate pathnames with spaces
+    # This array element extraction is done to accommodate pathnames with spaces
     cmd=${@: 1:${#@}-1}
     shift $(($# - 1))
 
diff --git a/translate-all.c b/translate-all.c
index 5425d038d9..8f7e11b0a5 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -594,7 +594,7 @@ static inline void *alloc_code_gen_buffer(void)
 
 #ifdef __mips__
     if (cross_256mb(buf, tcg_ctx.code_gen_buffer_size)) {
-        /* Try again, with the original still mapped, to avoid re-aquiring
+        /* Try again, with the original still mapped, to avoid re-acquiring
            that 256mb crossing.  This time don't specify an address.  */
         size_t size2, size1 = tcg_ctx.code_gen_buffer_size;
         void *buf2 = mmap(NULL, size1, PROT_WRITE | PROT_READ | PROT_EXEC,