trivial patches for 2014-06-24
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJTqaJDAAoJEL7lnXSkw9fbPNQIAIrqFqWaQWUNX0ANKBkmEt9w iX/gQ0v6EXJ2eHcPvZcr5xb/5PAcPuxVzc37Nd+C0ncIdyJKZvJszxLAHMlDhwEa ewcl2JrHxPTLJkWZVtDEalpwg9rngKfybMlNDBosSpqUcligd/RObrp28wD+OFi1 QyRMrVEaWp+40Wc6n7tdWBECw1eSNTOFislWZe6HpbfQxRICKg00g/FeODsF5R3h xvSJA706Z2uAMVEHJMvXzCPjVwY4GY5GNV8V6ULUB+hfwB7pwlGVeRq7TZhqmjsd XdXA2TEceH0mP5jDpyhQP9sJqnsHwfh+zfhXNZ80cYZIP0KNSuzZcsA9SjBjyEs= =feeM -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-06-24' into staging trivial patches for 2014-06-24 # gpg: Signature made Tue 24 Jun 2014 17:07:31 BST using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 6F67 E18E 7C91 C5B1 5514 66A7 BEE5 9D74 A4C3 D7DB * remotes/mjt/tags/trivial-patches-2014-06-24: Add support for the arm breakpoint syscall Increase maximum number of session of the internal TFTP server. target-s390x: Remove unused ld_code6() function hw/moxie/moxiesim.c: Remove unused moxie_intc_create() target-unicore: Remove unused functions build-sys: introduce install-prog macro to install&strip binaries and use it tcg: mark tcg_out* and tcg_patch* with attribute 'unused' rng-random: NULL check not needed before g_free() block.c: Remove useless 'buf' variable vscclient: Add required headers to fix build on FreeBSD target-ppc: Fix compiler warning configure: Enable TPM by default, add --disable-tpm Fix new typos (found by codespell) virtio-serial: remove useless set_config function Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
2b5b7ae917
12
Makefile
12
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 \
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
2
block.c
2
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);
|
||||
|
@ -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
|
||||
|
5
configure
vendored
5
configure
vendored
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -11,6 +11,8 @@
|
||||
*/
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#define closesocket(x) close(x)
|
||||
#endif
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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) \
|
||||
|
@ -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) {
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
20
tcg/tcg.c
20
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;
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user