From 10358b6a1cc466a7d6e6d78364c972935634bdb7 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 12 Jun 2014 11:20:53 +0200 Subject: virtio-serial: remove useless set_config function Its only contents are a dead memcpy. Since it is optional, drop the function altogether. Signed-off-by: Paolo Bonzini Signed-off-by: Michael Tokarev --- hw/char/virtio-serial-bus.c | 8 -------- 1 file changed, 8 deletions(-) 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; } -- cgit v1.2.3-55-g7522 From 5d831be27289c244969cbe6a3b87cbc0b44b1532 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 13 Jun 2014 20:42:57 +0200 Subject: Fix new typos (found by codespell) * accomodate -> accommodate * aquiring -> acquiring * beacuse -> because * loosing -> losing * prefering -> preferring * threshhold -> threshold Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- block/iscsi.c | 2 +- hw/input/hid.c | 2 +- target-arm/helper.c | 2 +- tcg/mips/tcg-target.c | 4 ++-- tests/qemu-iotests/common.qemu | 2 +- translate-all.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) 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/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/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/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/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, -- cgit v1.2.3-55-g7522 From e91c793cb50b83a695bbbf677ebfff478d8c62f2 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 16 Jun 2014 15:32:47 -0400 Subject: configure: Enable TPM by default, add --disable-tpm I don't see why tpm is disabled by default: it doesn't have any external dependencies, or change default behavior. Leaving it disabled is just going to cause it to bit rot. Enable it by default, and add a --disable-tpm option. Signed-off-by: Cole Robinson Signed-off-by: Michael Tokarev --- configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-55-g7522 From 0211b5cf2d933e10b5916b203fc3fad805a9a3c0 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 17 Jun 2014 19:18:28 +0200 Subject: target-ppc: Fix compiler warning gcc reports a warning which is usually wrong: target-ppc/dfp_helper.c: In function ‘dfp_get_digit’: target-ppc/dfp_helper.c:417:1: warning: control reaches end of non-void function [-Wreturn-type] The compiler shows the warning if assert is not marked with the noreturn attribute or if the code is compiled with -DNDEBUG. Using g_assert_not_reached better documents the intention and does not have these problems. Signed-off-by: Stefan Weil Reviewed-by: Alexander Graf Signed-off-by: Michael Tokarev --- target-ppc/dfp_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) \ -- cgit v1.2.3-55-g7522 From 18b1afa8741964cd6a9aa73e6c1447c49b1abd86 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 18 Jun 2014 08:58:00 -0400 Subject: vscclient: Add required headers to fix build on FreeBSD Signed-off-by: Ed Maste Reviewed-by: Paolo Bonzini Signed-off-by: Michael Tokarev --- libcacard/vscclient.c | 2 ++ 1 file changed, 2 insertions(+) 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 +#include #include #define closesocket(x) close(x) #endif -- cgit v1.2.3-55-g7522 From 5db97df274e80b03705abb418ed6f0c9b74b99ec Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sat, 21 Jun 2014 21:00:44 +0800 Subject: block.c: Remove useless 'buf' variable 'buf' is not used actually, so remove it and related snprintf() statement. Signed-off-by: Chen Gang Reviewed-by: Kevin Wolf Signed-off-by: Michael Tokarev --- block.c | 2 -- 1 file changed, 2 deletions(-) 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); -- cgit v1.2.3-55-g7522 From feced894fb6c474eb56daeb2b2d1f99bae87677f Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 30 May 2014 17:02:18 -0300 Subject: rng-random: NULL check not needed before g_free() g_free() is NULL-safe. Signed-off-by: Eduardo Habkost Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- backends/rng-random.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); } -- cgit v1.2.3-55-g7522 From 4196dca63b881d85fc3c1e41da0ef22e0bc18d37 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Sat, 7 Jun 2014 18:08:44 +0100 Subject: tcg: mark tcg_out* and tcg_patch* with attribute 'unused' The tcg_out* and tcg_patch* functions are utility routines that may or may not be used by a particular backend; mark them with the 'unused' attribute to suppress spurious warnings if they aren't used. Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- tcg/tcg.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) 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; -- cgit v1.2.3-55-g7522 From 0d65942611263a37f79bc0522bf77bedbdf9ed20 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Sun, 22 Jun 2014 10:55:23 +0400 Subject: build-sys: introduce install-prog macro to install&strip binaries and use it Use common rule (macro) to install and strip binaries, and use it in all places where we install binaries, instead of fixing bugs like 1319493 in every place. (This fixes https://bugs.launchpad.net/bugs/1319493) Signed-off-by: Michael Tokarev --- Makefile | 12 ++---------- Makefile.target | 5 +---- rules.mak | 7 +++++++ 3 files changed, 10 insertions(+), 14 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/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 -- cgit v1.2.3-55-g7522 From 25b93db35810abf8c116ecc64831d62f4681a777 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 24 Jun 2014 00:07:59 +0100 Subject: target-unicore: Remove unused functions The functions gen_st64, gen_ld64, gen_mulxy, ucf64_itod and ucf64_dtoi are all unused; remove them. Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- target-unicore32/translate.c | 28 ---------------------------- target-unicore32/ucf64_helper.c | 22 ---------------------- 2 files changed, 50 deletions(-) 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) { -- cgit v1.2.3-55-g7522 From 64e64ef609a1661c7115a4d29817f328810efcbc Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 24 Jun 2014 00:10:09 +0100 Subject: hw/moxie/moxiesim.c: Remove unused moxie_intc_create() The function moxie_intc_create() is unused; remove it. Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- hw/moxie/moxiesim.c | 13 ------------- 1 file changed, 13 deletions(-) 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; -- cgit v1.2.3-55-g7522 From 55818ad8126c2dd3de690b051c88e496bcf6ce09 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 24 Jun 2014 00:06:34 +0100 Subject: target-s390x: Remove unused ld_code6() function The ld_code6() function is unused; remove it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- target-s390x/translate.c | 5 ----- 1 file changed, 5 deletions(-) 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) { -- cgit v1.2.3-55-g7522 From 5f22b054f2594e231b042ada24d2fdfaa9c26d52 Mon Sep 17 00:00:00 2001 From: Bernhard Übelacker Date: Sat, 21 Jun 2014 15:26:05 +0200 Subject: Increase maximum number of session of the internal TFTP server. Grub fails to boot from internal TFTP server when loading more than 3 initrd files. Grub first opens a session to the TFTP server for every initrd file and retrieves only the file size for all. Then it wants to download the content using the old sessions which are already expired. Increasing the maximum number of session of the internal TFTP server avoids this issue. The error message reads as following: error: timeout reading `/boot/ISO.ROOT/BOOTMGR'. Press any key to continue... Signed-off-by: Bernhard Übelacker Signed-off-by: Michael Tokarev --- slirp/tftp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-55-g7522 From d535508793a8e9389379543ef8d506e50c10cf67 Mon Sep 17 00:00:00 2001 From: Hunter Laux Date: Fri, 20 Jun 2014 04:13:14 -0700 Subject: Add support for the arm breakpoint syscall OABI arm used a software interrupt(0xef9f0001) for breakpoints. Since 2005 gdb has used the break instruction(0xe7f001f0) for EABI. Apparently Steel Bank Common Lisp still uses the swi instruction. This is the kernel implementation: http://lxr.free-electrons.com/source/arch/arm/kernel/traps.c#L598 Signed-off-by: Hunter Laux Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- linux-user/arm/syscall.h | 1 + linux-user/main.c | 4 ++++ 2 files changed, 5 insertions(+) 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; -- cgit v1.2.3-55-g7522