Commit 9e071429 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging



* First batch of MAINTAINERS updates
* IOAPIC fixes (to pass kvm-unit-tests with -machine kernel_irqchip=off)
* NBD API upgrades from Daniel
* strtosz fixes from Marc-André
* improved support for readonly=on on scsi-generic devices
* new "info ioapic" and "info lapic" monitor commands
* Peter Crosthwaite's ELF_MACHINE cleanups
* docs patches from Thomas and Daniel

# gpg: Signature made Fri 25 Sep 2015 11:20:52 BST using RSA key ID 78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"

* remotes/bonzini/tags/for-upstream: (52 commits)
  doc: Refresh URLs in the qemu-tech documentation
  docs: describe the QEMU build system structure / design
  typedef: add typedef for QemuOpts
  i386: interrupt poll processing
  i386: partial revert of interrupt poll fix
  ppc: Rename ELF_MACHINE to be PPC specific
  i386: Rename ELF_MACHINE to be x86 specific
  alpha: Remove ELF_MACHINE from cpu.h
  mips: Remove ELF_MACHINE from cpu.h
  sparc: Remove ELF_MACHINE from cpu.h
  s390: Remove ELF_MACHINE from cpu.h
  sh4: Remove ELF_MACHINE from cpu.h
  xtensa: Remove ELF_MACHINE from cpu.h
  tricore: Remove ELF_MACHINE from cpu.h
  or32: Remove ELF_MACHINE from cpu.h
  lm32: Remove ELF_MACHINE from cpu.h
  unicore: Remove ELF_MACHINE from cpu.h
  moxie: Remove ELF_MACHINE from cpu.h
  cris: Remove ELF_MACHINE from cpu.h
  m68k: Remove ELF_MACHINE from cpu.h
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 8bfbbb4b 8e9620a6
Loading
Loading
Loading
Loading
+51 −7
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ S: Maintained
F: target-alpha/
F: hw/alpha/
F: tests/tcg/alpha/
F: disas/alpha.c

ARM
M: Peter Maydell <peter.maydell@linaro.org>
@@ -84,6 +85,9 @@ S: Maintained
F: target-arm/
F: hw/arm/
F: hw/cpu/a*mpcore.c
F: disas/arm.c
F: disas/arm-a64.cc
F: disas/libvixl/

CRIS
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
@@ -91,6 +95,7 @@ S: Maintained
F: target-cris/
F: hw/cris/
F: tests/tcg/cris/
F: disas/cris.c

LM32
M: Michael Walle <michael@walle.cc>
@@ -114,6 +119,7 @@ M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
S: Maintained
F: target-microblaze/
F: hw/microblaze/
F: disas/microblaze.c

MIPS
M: Aurelien Jarno <aurelien@aurel32.net>
@@ -122,11 +128,13 @@ S: Maintained
F: target-mips/
F: hw/mips/
F: tests/tcg/mips/
F: disas/mips.c

Moxie
M: Anthony Green <green@moxielogic.com>
S: Maintained
F: target-moxie/
F: disas/moxie.c

OpenRISC
M: Jia Liu <proljc@gmail.com>
@@ -141,6 +149,7 @@ L: qemu-ppc@nongnu.org
S: Maintained
F: target-ppc/
F: hw/ppc/
F: disas/ppc.c

S390
M: Richard Henderson <rth@twiddle.net>
@@ -148,12 +157,14 @@ M: Alexander Graf <agraf@suse.de>
S: Maintained
F: target-s390x/
F: hw/s390x/
F: disas/s390.c

SH4
M: Aurelien Jarno <aurelien@aurel32.net>
S: Odd Fixes
F: target-sh4/
F: hw/sh4/
F: disas/sh4.c

SPARC
M: Blue Swirl <blauwirbel@gmail.com>
@@ -162,6 +173,7 @@ S: Maintained
F: target-sparc/
F: hw/sparc/
F: hw/sparc64/
F: disas/sparc.c

UniCore32
M: Guan Xuetao <gxt@mprc.pku.edu.cn>
@@ -176,6 +188,7 @@ M: Eduardo Habkost <ehabkost@redhat.com>
S: Maintained
F: target-i386/
F: hw/i386/
F: disas/i386.c

Xtensa
M: Max Filippov <jcmvbkbc@gmail.com>
@@ -564,6 +577,7 @@ M: Cornelia Huck <cornelia.huck@de.ibm.com>
M: Christian Borntraeger <borntraeger@de.ibm.com>
M: Alexander Graf <agraf@suse.de>
S: Supported
F: hw/char/sclp*.[hc]
F: hw/s390x/s390-virtio-ccw.c
F: hw/s390x/css.[hc]
F: hw/s390x/sclp*.[hc]
@@ -668,6 +682,12 @@ M: Peter Maydell <peter.maydell@linaro.org>
S: Maintained
F: hw/*/omap*

IPack
M: Alberto Garcia <berto@igalia.com>
S: Odd Fixes
F: hw/char/ipoctal232.c
F: hw/ipack/

PCI
M: Michael S. Tsirkin <mst@redhat.com>
S: Supported
@@ -704,6 +724,17 @@ L: qemu-ppc@nongnu.org
S: Supported
F: hw/ppc/e500*

Character devices
M: Paolo Bonzini <pbonzini@redhat.com>
S: Odd Fixes
F: hw/char/

Network devices
M: Jason Wang <jasowang@redhat.com>
S: Odd Fixes
F: hw/net/
T: git git://github.com/jasowang/qemu.git net

SCSI
M: Paolo Bonzini <pbonzini@redhat.com>
S: Supported
@@ -888,7 +919,7 @@ F: block/qapi.c
F: qapi/block*.json
T: git git://repo.or.cz/qemu/armbru.git block-next

Character Devices
Character device backends
M: Paolo Bonzini <pbonzini@redhat.com>
S: Maintained
F: qemu-char.c
@@ -983,7 +1014,7 @@ F: hmp.c
F: hmp-commands.hx
T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp

Network device layer
Network device backends
M: Jason Wang <jasowang@redhat.com>
S: Maintained
F: net/
@@ -1137,53 +1168,58 @@ M: Claudio Fontana <claudio.fontana@huawei.com>
M: Claudio Fontana <claudio.fontana@gmail.com>
S: Maintained
F: tcg/aarch64/
F: disas/arm-a64.cc
F: disas/libvixl/

ARM target
M: Andrzej Zaborowski <balrogg@gmail.com>
S: Maintained
F: tcg/arm/
F: disas/arm.c

i386 target
L: qemu-devel@nongnu.org
S: Maintained
F: tcg/i386/
F: disas/i386.c

IA64 target
M: Aurelien Jarno <aurelien@aurel32.net>
S: Maintained
F: tcg/ia64/
F: disas/ia64.c

MIPS target
M: Aurelien Jarno <aurelien@aurel32.net>
S: Maintained
F: tcg/mips/
F: disas/mips.c

PPC
M: Vassili Karpov (malc) <av1474@comtv.ru>
S: Maintained
F: tcg/ppc/

PPC64 target
M: Vassili Karpov (malc) <av1474@comtv.ru>
S: Maintained
F: tcg/ppc64/
F: disas/ppc.c

S390 target
M: Alexander Graf <agraf@suse.de>
M: Richard Henderson <rth@twiddle.net>
S: Maintained
F: tcg/s390/
F: disas/s390.c

SPARC target
M: Blue Swirl <blauwirbel@gmail.com>
S: Maintained
F: tcg/sparc/
F: disas/sparc.c

TCI target
M: Stefan Weil <sw@weilnetz.de>
S: Maintained
F: tcg/tci/
F: tci.c
F: disas/tci.c

Stable branches
---------------
@@ -1393,3 +1429,11 @@ M: Stefan Hajnoczi <stefanha@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: tests/image-fuzzer/


Documentation
-------------
Build system architecture
M: Daniel P. Berrange <berrange@redhat.com>
S: Odd Fixes
F: docs/build-system.txt
+1 −2
Original line number Diff line number Diff line
@@ -176,7 +176,6 @@ SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))

$(SOFTMMU_SUBDIR_RULES): $(block-obj-y)
$(SOFTMMU_SUBDIR_RULES): $(crypto-obj-y)
$(SOFTMMU_SUBDIR_RULES): $(qom-obj-y)
$(SOFTMMU_SUBDIR_RULES): config-all-devices.mak

subdir-%:
@@ -201,7 +200,7 @@ subdir-dtc:dtc/libfdt dtc/tests
dtc/%:
	mkdir -p $@

$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y)
$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY))

ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
romsubdir-%:
+37 −34
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@

typedef struct BDRVNBDState {
    NbdClientSession client;
    QemuOpts *socket_opts;
} BDRVNBDState;

static int nbd_parse_uri(const char *filename, QDict *options)
@@ -190,10 +189,10 @@ out:
    g_free(file);
}

static void nbd_config(BDRVNBDState *s, QDict *options, char **export,
static SocketAddress *nbd_config(BDRVNBDState *s, QDict *options, char **export,
                                 Error **errp)
{
    Error *local_err = NULL;
    SocketAddress *saddr;

    if (qdict_haskey(options, "path") == qdict_haskey(options, "host")) {
        if (qdict_haskey(options, "path")) {
@@ -201,28 +200,37 @@ static void nbd_config(BDRVNBDState *s, QDict *options, char **export,
        } else {
            error_setg(errp, "one of path and host must be specified.");
        }
        return;
        return NULL;
    }

    s->client.is_unix = qdict_haskey(options, "path");
    s->socket_opts = qemu_opts_create(&socket_optslist, NULL, 0,
                                      &error_abort);
    saddr = g_new0(SocketAddress, 1);

    qemu_opts_absorb_qdict(s->socket_opts, options, &local_err);
    if (local_err) {
        error_propagate(errp, local_err);
        return;
    if (qdict_haskey(options, "path")) {
        saddr->kind = SOCKET_ADDRESS_KIND_UNIX;
        saddr->q_unix = g_new0(UnixSocketAddress, 1);
        saddr->q_unix->path = g_strdup(qdict_get_str(options, "path"));
        qdict_del(options, "path");
    } else {
        saddr->kind = SOCKET_ADDRESS_KIND_INET;
        saddr->inet = g_new0(InetSocketAddress, 1);
        saddr->inet->host = g_strdup(qdict_get_str(options, "host"));
        if (!qdict_get_try_str(options, "port")) {
            saddr->inet->port = g_strdup_printf("%d", NBD_DEFAULT_PORT);
        } else {
            saddr->inet->port = g_strdup(qdict_get_str(options, "port"));
        }

    if (!qemu_opt_get(s->socket_opts, "port")) {
        qemu_opt_set_number(s->socket_opts, "port", NBD_DEFAULT_PORT,
                            &error_abort);
        qdict_del(options, "host");
        qdict_del(options, "port");
    }

    s->client.is_unix = saddr->kind == SOCKET_ADDRESS_KIND_UNIX;

    *export = g_strdup(qdict_get_try_str(options, "export"));
    if (*export) {
        qdict_del(options, "export");
    }

    return saddr;
}

NbdClientSession *nbd_get_client_session(BlockDriverState *bs)
@@ -231,26 +239,24 @@ NbdClientSession *nbd_get_client_session(BlockDriverState *bs)
    return &s->client;
}

static int nbd_establish_connection(BlockDriverState *bs, Error **errp)
static int nbd_establish_connection(BlockDriverState *bs,
                                    SocketAddress *saddr,
                                    Error **errp)
{
    BDRVNBDState *s = bs->opaque;
    int sock;

    if (s->client.is_unix) {
        sock = unix_connect_opts(s->socket_opts, errp, NULL, NULL);
    } else {
        sock = inet_connect_opts(s->socket_opts, errp, NULL, NULL);
        if (sock >= 0) {
            socket_set_nodelay(sock);
        }
    }
    sock = socket_connect(saddr, errp, NULL, NULL);

    /* Failed to establish connection */
    if (sock < 0) {
        logout("Failed to establish connection to NBD server\n");
        return -EIO;
    }

    if (!s->client.is_unix) {
        socket_set_nodelay(sock);
    }

    return sock;
}

@@ -260,19 +266,19 @@ static int nbd_open(BlockDriverState *bs, QDict *options, int flags,
    BDRVNBDState *s = bs->opaque;
    char *export = NULL;
    int result, sock;
    Error *local_err = NULL;
    SocketAddress *saddr;

    /* Pop the config into our state object. Exit if invalid. */
    nbd_config(s, options, &export, &local_err);
    if (local_err) {
        error_propagate(errp, local_err);
    saddr = nbd_config(s, options, &export, errp);
    if (!saddr) {
        return -EINVAL;
    }

    /* establish TCP connection, return error if it fails
     * TODO: Configurable retry-until-timeout behaviour.
     */
    sock = nbd_establish_connection(bs, errp);
    sock = nbd_establish_connection(bs, saddr, errp);
    qapi_free_SocketAddress(saddr);
    if (sock < 0) {
        g_free(export);
        return sock;
@@ -315,9 +321,6 @@ static int nbd_co_discard(BlockDriverState *bs, int64_t sector_num,

static void nbd_close(BlockDriverState *bs)
{
    BDRVNBDState *s = bs->opaque;

    qemu_opts_del(s->socket_opts);
    nbd_client_close(bs);
}

+9 −0
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@
#include "exec/address-spaces.h"
#include "qemu/rcu.h"
#include "exec/tb-hash.h"
#if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
#include "hw/i386/apic.h"
#endif

/* -icount align implementation. */

@@ -343,6 +346,12 @@ int cpu_exec(CPUState *cpu)
    SyncClocks sc;

    if (cpu->halted) {
#if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
        if (cpu->interrupt_request & CPU_INTERRUPT_POLL) {
            apic_poll_irq(x86_cpu->apic_state);
            cpu_reset_interrupt(cpu, CPU_INTERRUPT_POLL);
        }
#endif
        if (!cpu_has_work(cpu)) {
            return EXCP_HALTED;
        }
+0 −10
Original line number Diff line number Diff line
@@ -392,16 +392,6 @@ monitor_read_memory (bfd_vma memaddr, bfd_byte *myaddr, int length,
    return 0;
}

static int GCC_FMT_ATTR(2, 3)
monitor_fprintf(FILE *stream, const char *fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);
    monitor_vprintf((Monitor *)stream, fmt, ap);
    va_end(ap);
    return 0;
}

/* Disassembler for the monitor.
   See target_disas for a description of flags. */
void monitor_disas(Monitor *mon, CPUState *cpu,
Loading