Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2…
Browse files Browse the repository at this point in the history
…016-02-11' into staging

trivial patches for 2016-02-11

# gpg: Signature made Thu 11 Feb 2016 12:16:04 GMT 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>"

* remotes/mjt/tags/pull-trivial-patches-2016-02-11:
  w32: include winsock2.h before windows.h
  Adds keycode 86 to the hid_usage_keys translation table.
  s390x: remove s390-zipl.rom
  Passthru CCID card: QOMify
  Emulated CCID card: QOMify
  ES1370: QOMify
  char: fix parameter name / type in BSD codepath
  qmp-spec: fix index in doc
  rdma: remove check on time_spent when calculating mbs
  qemu-sockets: simplify error handling
  cpu: cpu_save/cpu_load is no more
  qom: Correct object_property_get_int() description
  man: virtfs-proxy-helper: Rework awkward sentence
  remove libtool support

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Feb 11, 2016
2 parents f163684 + 1834ed3 commit fc1ec1a
Show file tree
Hide file tree
Showing 21 changed files with 44 additions and 154 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
qemu-icon.bmp qemu_logo_no_text.svg \
bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
multiboot.bin linuxboot.bin kvmvapic.bin \
s390-zipl.rom \
s390-ccw.img \
spapr-rtas.bin slof.bin \
palcode-clipper \
Expand Down
86 changes: 2 additions & 84 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -116,38 +116,6 @@ compile_prog() {
do_cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags
}

do_libtool() {
local mode=$1
shift
# Run the compiler, capturing its output to the log.
echo $libtool $mode --tag=CC $cc "$@" >> config.log
$libtool $mode --tag=CC $cc "$@" >> config.log 2>&1 || return $?
# Test passed. If this is an --enable-werror build, rerun
# the test with -Werror and bail out if it fails. This
# makes warning-generating-errors in configure test code
# obvious to developers.
if test "$werror" != "yes"; then
return 0
fi
# Don't bother rerunning the compile if we were already using -Werror
case "$*" in
*-Werror*)
return 0
;;
esac
echo $libtool $mode --tag=CC $cc -Werror "$@" >> config.log
$libtool $mode --tag=CC $cc -Werror "$@" >> config.log 2>&1 && return $?
error_exit "configure test passed without -Werror but failed with -Werror." \
"This is probably a bug in the configure script. The failing command" \
"will be at the bottom of config.log." \
"You can run configure with --disable-werror to bypass this check."
}

libtool_prog() {
do_libtool --mode=compile $QEMU_CFLAGS -c -fPIE -DPIE -o $TMPO $TMPC || return $?
do_libtool --mode=link $LDFLAGS -o $TMPA $TMPL -rpath /usr/local/lib
}

# symbolically link $1 to $2. Portable version of "ln -sf".
symlink() {
rm -rf "$2"
Expand Down Expand Up @@ -398,7 +366,6 @@ as="${AS-${cross_prefix}as}"
cpp="${CPP-$cc -E}"
objcopy="${OBJCOPY-${cross_prefix}objcopy}"
ld="${LD-${cross_prefix}ld}"
libtool="${LIBTOOL-${cross_prefix}libtool}"
nm="${NM-${cross_prefix}nm}"
strip="${STRIP-${cross_prefix}strip}"
windres="${WINDRES-${cross_prefix}windres}"
Expand Down Expand Up @@ -1514,7 +1481,6 @@ EOF
if do_cc $QEMU_CFLAGS -Werror $flag -c -o $TMPO $TMPC &&
compile_prog "-Werror $flag" ""; then
QEMU_CFLAGS="$QEMU_CFLAGS $flag"
LIBTOOLFLAGS="$LIBTOOLFLAGS -Wc,$flag"
sp_on=1
break
fi
Expand Down Expand Up @@ -1609,32 +1575,6 @@ EOF
fi
fi

# check for broken gcc and libtool in RHEL5
if test -n "$libtool" -a "$pie" != "no" ; then
cat > $TMPC <<EOF
void *f(unsigned char *buf, int len);
void *g(unsigned char *buf, int len);
void *
f(unsigned char *buf, int len)
{
return (void*)0L;
}
void *
g(unsigned char *buf, int len)
{
return f(buf, len);
}
EOF
if ! libtool_prog; then
echo "Disabling libtool due to broken toolchain support"
libtool=
fi
fi

##########################################
# __sync_fetch_and_and requires at least -march=i486. Many toolchains
# use i686 as default anyway, but for those that don't, an explicit
Expand Down Expand Up @@ -2240,21 +2180,6 @@ if test "$xen_pv_domain_build" = "yes" &&
"which requires Xen support."
fi

##########################################
# libtool probe

if ! has $libtool; then
libtool=
fi

# MacOSX ships with a libtool which isn't the GNU one; weed this
# out by checking whether libtool supports the --version switch
if test -n "$libtool"; then
if ! "$libtool" --version >/dev/null 2>&1; then
libtool=
fi
fi

##########################################
# Sparse probe
if test "$sparse" != "no" ; then
Expand Down Expand Up @@ -5525,13 +5450,8 @@ echo "MAKE=$make" >> $config_host_mak
echo "INSTALL=$install" >> $config_host_mak
echo "INSTALL_DIR=$install -d -m 0755" >> $config_host_mak
echo "INSTALL_DATA=$install -c -m 0644" >> $config_host_mak
if test -n "$libtool"; then
echo "INSTALL_PROG=\$(LIBTOOL) --mode=install $install -c -m 0755" >> $config_host_mak
echo "INSTALL_LIB=\$(LIBTOOL) --mode=install $install -c -m 0644" >> $config_host_mak
else
echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak
echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak
fi
echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak
echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak
echo "PYTHON=$python" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak
if $iasl -h > /dev/null 2>&1; then
Expand All @@ -5549,7 +5469,6 @@ echo "OBJCOPY=$objcopy" >> $config_host_mak
echo "LD=$ld" >> $config_host_mak
echo "NM=$nm" >> $config_host_mak
echo "WINDRES=$windres" >> $config_host_mak
echo "LIBTOOL=$libtool" >> $config_host_mak
echo "CFLAGS=$CFLAGS" >> $config_host_mak
echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak
echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
Expand All @@ -5568,7 +5487,6 @@ else
fi
echo "LDFLAGS=$LDFLAGS" >> $config_host_mak
echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak
echo "LIBTOOLFLAGS=$LIBTOOLFLAGS" >> $config_host_mak
echo "LIBS+=$LIBS" >> $config_host_mak
echo "LIBS_TOOLS+=$libs_tools" >> $config_host_mak
echo "EXESUF=$EXESUF" >> $config_host_mak
Expand Down
2 changes: 1 addition & 1 deletion docs/qmp-spec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Some events are rate-limited to at most one per second. If additional
dropped, and the last one is delayed. "Similar" normally means same
event type. See qmp-events.txt for details.

2.5 QGA Synchronization
2.6 QGA Synchronization
-----------------------

When using QGA, an additional synchronization feature is built into
Expand Down
6 changes: 0 additions & 6 deletions exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,12 +661,6 @@ void cpu_exec_init(CPUState *cpu, Error **errp)
if (qdev_get_vmsd(DEVICE(cpu)) == NULL) {
vmstate_register(NULL, cpu_index, &vmstate_cpu_common, cpu);
}
#if defined(CPU_SAVE_VERSION) && !defined(CONFIG_USER_ONLY)
register_savevm(NULL, "cpu", cpu_index, CPU_SAVE_VERSION,
cpu_save, cpu_load, cpu->env_ptr);
assert(cc->vmsd == NULL);
assert(qdev_get_vmsd(DEVICE(cpu)) == NULL);
#endif
if (cc->vmsd != NULL) {
vmstate_register(NULL, cpu_index, cc->vmsd, cpu);
}
Expand Down
4 changes: 2 additions & 2 deletions fsdev/virtfs-proxy-helper.texi
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ QEMU and proxy helper communicate using this socket. QEMU proxy fs
driver sends filesystem request to proxy helper and receives the
response from it.

Proxy helper is designed so that it can drop the root privilege with
retaining capbilities needed for doing filesystem operations only.
The proxy helper is designed so that it can drop root privileges except
for the capabilities needed for doing filesystem operations.

@end table
@c man end
Expand Down
10 changes: 7 additions & 3 deletions hw/audio/es1370.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ struct chan_bits {
uint32_t *old_freq, uint32_t *new_freq);
};

#define TYPE_ES1370 "ES1370"
#define ES1370(obj) \
OBJECT_CHECK(ES1370State, (obj), TYPE_ES1370)

static void es1370_dac1_calc_freq (ES1370State *s, uint32_t ctl,
uint32_t *old_freq, uint32_t *new_freq);
static void es1370_dac2_and_adc_calc_freq (ES1370State *s, uint32_t ctl,
Expand Down Expand Up @@ -1014,7 +1018,7 @@ static void es1370_on_reset (void *opaque)

static void es1370_realize(PCIDevice *dev, Error **errp)
{
ES1370State *s = DO_UPCAST (ES1370State, dev, dev);
ES1370State *s = ES1370(dev);
uint8_t *c = s->dev.config;

c[PCI_STATUS + 1] = PCI_STATUS_DEVSEL_SLOW >> 8;
Expand All @@ -1039,7 +1043,7 @@ static void es1370_realize(PCIDevice *dev, Error **errp)

static int es1370_init (PCIBus *bus)
{
pci_create_simple (bus, -1, "ES1370");
pci_create_simple (bus, -1, TYPE_ES1370);
return 0;
}

Expand All @@ -1060,7 +1064,7 @@ static void es1370_class_init (ObjectClass *klass, void *data)
}

static const TypeInfo es1370_info = {
.name = "ES1370",
.name = TYPE_ES1370,
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof (ES1370State),
.class_init = es1370_class_init,
Expand Down
2 changes: 1 addition & 1 deletion hw/input/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static const uint8_t hid_usage_keys[0x100] = {
0xe2, 0x2c, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
0x3f, 0x40, 0x41, 0x42, 0x43, 0x53, 0x47, 0x5f,
0x60, 0x61, 0x56, 0x5c, 0x5d, 0x5e, 0x57, 0x59,
0x5a, 0x5b, 0x62, 0x63, 0x00, 0x00, 0x00, 0x44,
0x5a, 0x5b, 0x62, 0x63, 0x00, 0x00, 0x64, 0x44,
0x45, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
0xe8, 0xe9, 0x71, 0x72, 0x73, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00,
Expand Down
2 changes: 1 addition & 1 deletion hw/s390x/ipl.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static void s390_ipl_realize(DeviceState *dev, Error **errp)
/* Adjust ELF start address to final location */
ipl->bios_start_addr += fwbase;
} else {
/* Try to load non-ELF file (e.g. s390-zipl.rom) */
/* Try to load non-ELF file (e.g. s390-ccw.img) */
bios_size = load_image_targphys(bios_filename, ZIPL_IMAGE_START,
4096);
ipl->bios_start_addr = ZIPL_IMAGE_START;
Expand Down
1 change: 0 additions & 1 deletion hw/s390x/s390-virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
#endif

#define MAX_BLK_DEVS 10
#define ZIPL_FILENAME "s390-zipl.rom"
#define S390_MACHINE "s390-virtio"
#define TYPE_S390_MACHINE MACHINE_TYPE_NAME(S390_MACHINE)

Expand Down
23 changes: 13 additions & 10 deletions hw/usb/ccid-card-emulated.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ do {\
} \
} while (0)

#define EMULATED_DEV_NAME "ccid-card-emulated"

#define TYPE_EMULATED_CCID "ccid-card-emulated"
#define EMULATED_CCID_CARD(obj) \
OBJECT_CHECK(EmulatedState, (obj), TYPE_EMULATED_CCID)

#define BACKEND_NSS_EMULATED_NAME "nss-emulated"
#define BACKEND_CERTIFICATES_NAME "certificates"
Expand Down Expand Up @@ -134,7 +137,7 @@ struct EmulatedState {
static void emulated_apdu_from_guest(CCIDCardState *base,
const uint8_t *apdu, uint32_t len)
{
EmulatedState *card = DO_UPCAST(EmulatedState, base, base);
EmulatedState *card = EMULATED_CCID_CARD(base);
EmulEvent *event = (EmulEvent *)g_malloc(sizeof(EmulEvent) + len);

assert(event);
Expand All @@ -151,7 +154,7 @@ static void emulated_apdu_from_guest(CCIDCardState *base,

static const uint8_t *emulated_get_atr(CCIDCardState *base, uint32_t *len)
{
EmulatedState *card = DO_UPCAST(EmulatedState, base, base);
EmulatedState *card = EMULATED_CCID_CARD(base);

*len = card->atr_length;
return card->atr;
Expand Down Expand Up @@ -479,7 +482,7 @@ static uint32_t parse_enumeration(char *str,

static int emulated_initfn(CCIDCardState *base)
{
EmulatedState *card = DO_UPCAST(EmulatedState, base, base);
EmulatedState *card = EMULATED_CCID_CARD(base);
VCardEmulError ret;
const EnumTable *ptable;

Expand Down Expand Up @@ -515,26 +518,26 @@ static int emulated_initfn(CCIDCardState *base)
ret = emulated_initialize_vcard_from_certificates(card);
} else {
printf("%s: you must provide all three certs for"
" certificates backend\n", EMULATED_DEV_NAME);
" certificates backend\n", TYPE_EMULATED_CCID);
return -1;
}
} else {
if (card->backend != BACKEND_NSS_EMULATED) {
printf("%s: bad backend specified. The options are:\n%s (default),"
" %s.\n", EMULATED_DEV_NAME, BACKEND_NSS_EMULATED_NAME,
" %s.\n", TYPE_EMULATED_CCID, BACKEND_NSS_EMULATED_NAME,
BACKEND_CERTIFICATES_NAME);
return -1;
}
if (card->cert1 != NULL || card->cert2 != NULL || card->cert3 != NULL) {
printf("%s: unexpected cert parameters to nss emulated backend\n",
EMULATED_DEV_NAME);
TYPE_EMULATED_CCID);
return -1;
}
/* default to mirroring the local hardware readers */
ret = wrap_vcard_emul_init(NULL);
}
if (ret != VCARD_EMUL_OK) {
printf("%s: failed to initialize vcard\n", EMULATED_DEV_NAME);
printf("%s: failed to initialize vcard\n", TYPE_EMULATED_CCID);
return -1;
}
qemu_thread_create(&card->event_thread_id, "ccid/event", event_thread,
Expand All @@ -546,7 +549,7 @@ static int emulated_initfn(CCIDCardState *base)

static int emulated_exitfn(CCIDCardState *base)
{
EmulatedState *card = DO_UPCAST(EmulatedState, base, base);
EmulatedState *card = EMULATED_CCID_CARD(base);
VEvent *vevent = vevent_new(VEVENT_LAST, NULL, NULL);

vevent_queue_vevent(vevent); /* stop vevent thread */
Expand Down Expand Up @@ -589,7 +592,7 @@ static void emulated_class_initfn(ObjectClass *klass, void *data)
}

static const TypeInfo emulated_card_info = {
.name = EMULATED_DEV_NAME,
.name = TYPE_EMULATED_CCID,
.parent = TYPE_CCID_CARD,
.instance_size = sizeof(EmulatedState),
.class_init = emulated_class_initfn,
Expand Down
14 changes: 8 additions & 6 deletions hw/usb/ccid-card-passthru.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ static const uint8_t DEFAULT_ATR[] = {
0x13, 0x08
};


#define PASSTHRU_DEV_NAME "ccid-card-passthru"
#define VSCARD_IN_SIZE 65536

/* maximum size of ATR - from 7816-3 */
Expand All @@ -59,6 +57,10 @@ struct PassthruState {
uint8_t debug;
};

#define TYPE_CCID_PASSTHRU "ccid-card-passthru"
#define PASSTHRU_CCID_CARD(obj) \
OBJECT_CHECK(PassthruState, (obj), TYPE_CCID_PASSTHRU)

/*
* VSCard protocol over chardev
* This code should not depend on the card type.
Expand Down Expand Up @@ -317,7 +319,7 @@ static void ccid_card_vscard_event(void *opaque, int event)
static void passthru_apdu_from_guest(
CCIDCardState *base, const uint8_t *apdu, uint32_t len)
{
PassthruState *card = DO_UPCAST(PassthruState, base, base);
PassthruState *card = PASSTHRU_CCID_CARD(base);

if (!card->cs) {
printf("ccid-passthru: no chardev, discarding apdu length %d\n", len);
Expand All @@ -328,15 +330,15 @@ static void passthru_apdu_from_guest(

static const uint8_t *passthru_get_atr(CCIDCardState *base, uint32_t *len)
{
PassthruState *card = DO_UPCAST(PassthruState, base, base);
PassthruState *card = PASSTHRU_CCID_CARD(base);

*len = card->atr_length;
return card->atr;
}

static int passthru_initfn(CCIDCardState *base)
{
PassthruState *card = DO_UPCAST(PassthruState, base, base);
PassthruState *card = PASSTHRU_CCID_CARD(base);

card->vscard_in_pos = 0;
card->vscard_in_hdr = 0;
Expand Down Expand Up @@ -400,7 +402,7 @@ static void passthru_class_initfn(ObjectClass *klass, void *data)
}

static const TypeInfo passthru_card_info = {
.name = PASSTHRU_DEV_NAME,
.name = TYPE_CCID_PASSTHRU,
.parent = TYPE_CCID_CARD,
.instance_size = sizeof(PassthruState),
.class_init = passthru_class_initfn,
Expand Down
Loading

0 comments on commit fc1ec1a

Please sign in to comment.