Permalink
Commits on Aug 25, 2010
  1. target-s390x: implement BRC using goto_tb

    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Aug 23, 2010
  2. S/390 CPU emulation

    Currently only does userspace with 64-bit addressing, but it's quite good
    at that.
    
    replaced always_inline with inline
    split off disassembler stuff
    use CPU_DoubleU for FP regs
    replace FP128 with CPU_QuadU
    move cpu_s390x_init() to translate.c
    use C-style comments
    coding style fixes
    build on 32-bit hosts (although dlg aborts there due to lack of a portable
    128 -> 64/64 bit division routine)
    abort unimplemented EXECUTEs properly
    remove superfluous abs tests
    pull loads out of helper functions
    generate proper specification exception
    use HOST_WORDS_BIGENDIAN instead of WORDS_BIGENDIAN
    fixed some temp leaks
    do away with TVGv comparisons
    do away with some superfluous sign extensions
    TCGv type fixes
    observe singlestep_enabled
    fixed some temp leaks
    clarify reason for using a temp for CC
    
    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Aug 23, 2010
  3. enable CPU_QuadU for s390x

    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Oct 20, 2009
  4. linux-user: define a couple of syscalls for non-uid16 targets

    Quite a number of syscalls are only defined on systems with USE_UID16
    defined; this patch defines them on other systems as well.
    
    Fixes a large number of uid/gid-related testcases on the s390x target
    (and most likely on other targets as well)
    
    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Jul 23, 2009
  5. linux-user: don't do locking in single-threaded processes

    Skips setting the tb_lock if a process doesn't have more than one thread,
    which is usually the case. Results in about 20% performance gain (measured
    with the s390x target, but the effect should be similar with other targets).
    
    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Jul 22, 2009
  6. linux-user: S/390 64-bit (s390x) support

    code for running 64-bit S/390 Linux binaries
    
    use CPU_DoubleU for FP regs
    proper specification exception (SIGILL) handling
    
    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Jul 24, 2009
  7. S/390 host support for TCG

    S/390 TCG code generator as posted before
    
    improvements since last time:
    - don't use R0 (often means "zero", not "register zero")
    - optimized add_i32 immediate
    - formatted for better compliance with the QEMU coding style
    
    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Jul 24, 2009
  8. S/390 target build system support

    changes to configure and makefiles for S/390 target support
    Ulrich Hecht committed Oct 20, 2009
Commits on Aug 24, 2010
  1. S/390 host build system support

    changes to configure and makefiles for S/390 host support
    rename target-s390x to target-s390
    ...and back again
    
    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Oct 20, 2009
  2. S/390 disassembler fixes

    enable zArch (64-bit) instructions
    enable disassembler for both s390 and s390x
    don't comment out stuff that works perfectly fine
    
    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Oct 20, 2009
  3. TCG "sync" op

    sync allows concurrent accesses to locations in memory through different TCG
    variables. This comes in handy when you are emulating CPU registers that can
    be used as either 32 or 64 bit, as TCG doesn't know anything about aliases.
    See the s390x target for an example.
    
    Fixed sync_i64 build failure on 32-bit targets.
    
    Signed-off-by: Ulrich Hecht <uli@suse.de>
    Ulrich Hecht committed Jul 24, 2009
Commits on Aug 22, 2010
  1. virtio-serial: Cleanup on device hot-unplug

    Free malloc'ed memory, unregister from savevm and clean up virtio-common
    bits on device hot-unplug.
    
    This was found performing a migration after device hot-unplug.
    
    Reported-by: <lihuang@redhat.com>
    Signed-off-by: Amit Shah <amit.shah@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Amit Shah committed with Anthony Liguori Aug 19, 2010
  2. target-i386: svm: Fix MSRPM check

    Correct the calculation of the offset in the msrpm
    for the MSR range 0 - 0x1fff.
    
    Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Adam Lackorzynski committed with Anthony Liguori Aug 15, 2010
  3. exec: remove code duplication in qemu_ram_alloc() and qemu_ram_alloc_…

    …from_ptr()
    
    Since most of the code in qemu_ram_alloc() and
    qemu_ram_alloc_from_ptr() are duplicated, let
    qemu_ram_alloc_from_ptr() to switch by checking void *host, and change
    qemu_ram_alloc() to a wrapper.
    
    Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Yoshiaki Tamura committed with Anthony Liguori Aug 18, 2010
  4. exec: replace tabs by spaces.

    Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Yoshiaki Tamura committed with Anthony Liguori Aug 18, 2010
  5. arch_init: replace tabs by spaces.

    Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Yoshiaki Tamura committed with Anthony Liguori Aug 18, 2010
  6. pckbd: support for commands 0xf0-0xff: Pulse output bit

    I have a guest OS which sends the command 0xfd to the keyboard
    controller during initialization. To get rid of the message
    "qemu: unsupported keyboard cmd=0x%02x\n" I added support for
    the pulse output bit commands.
    
    I found the following explanation here:
    http://www.win.tue.nl/~aeb/linux/kbd/scancodes-11.html#ss11.3
    
    Command 0xf0-0xff: Pulse output bit
    Bits 3-0 of the output port P2 of the keyboard controller may
    be pulsed low for approximately 6 µseconds. Bits 3-0 of this
    command specify the output port bits to be pulsed. 0: Bit should
    be pulsed. 1: Bit should not be modified. The only useful version
    of this command is Command 0xfe.
    (For MCA, replace 3-0 by 1-0 in the above.)
    
    Command 0xfe: System reset
    Pulse bit 0 of the output port P2 of the keyboard controller.
    This will reset the CPU.
    
    Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Bernhard Kohl committed with Anthony Liguori Aug 19, 2010
Commits on Aug 20, 2010
  1. Replace qemu_malloc + memset with qemu_mallocz

    Replace a qemu_malloc call, followed by a memset, with qemu_mallocz.
    
    Found with this Coccinelle semantic patch, adapted from
    Coccinelle test package rule 94:
    @@
    type T;
    expression x;
    expression E;
    @@
    
    - x = (T)qemu_malloc(E)
    + x = qemu_mallocz(E)
      ...
    (
    - memset(x,0,E);
    |
    - memset(x,0,sizeof(*x));
    )
    
    Some files (tests/*) had to be filtered out.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Aug 20, 2010
  2. Use ARRAY_SIZE macro

    Replace array size calculations with ARRAY_SIZE macro.
    
    Implemented with this Coccinelle semantic patch, adapted from
    Linux kernel:
    @@
    type T;
    T[] E;
    @@
    
    - (sizeof(E)/sizeof(*E))
    + ARRAY_SIZE(E)
    
    @@
    type T;
    T[] E;
    @@
    
    - (sizeof(E)/sizeof(E[...]))
    + ARRAY_SIZE(E)
    
    @@
    type T;
    T[] E;
    @@
    
    - (sizeof(E)/sizeof(T))
    + ARRAY_SIZE(E)
    
    Some files (*-dis.c, tests/*) had to be filtered out.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Aug 20, 2010
Commits on Aug 19, 2010
  1. Remove useless NULL check for qemu_strdup return value

    Found with this Coccinelle semantic patch:
    @@
    expression E;
    identifier ptr;
    identifier fn ~= "qemu_strn?dup";
    @@
    
    -ptr = fn(E);
    -if (ptr == NULL) { ... }
    -
    +ptr = fn(E);
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Aug 19, 2010
  2. Remove useless NULL checks for qemu_malloc return value

    Found with this Coccinelle semantic patch:
    @@
    expression E;
    identifier ptr;
    identifier fn ~= "qemu_mallocz*";
    @@
    
    -ptr = fn(E);
    -if (ptr == NULL) { ... }
    -
    +ptr = fn(E);
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Aug 19, 2010
  3. savevm: Reset last block info at beginning of each save

    If we save more than once we need to reset the last block info or else
    only the first save has the actual block info and each subsequent save
    will only use continue flags, making them unloadable independently.
    
    Found-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Acked-by: Glauber Costa <glommer@redhat.com>
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    awilliam committed with Anthony Liguori Aug 19, 2010
  4. set proper migration status on ->write error (v5)

    If ->write fails, declare migration status as MIG_STATE_ERROR.
    
    Also, in buffered_file.c, ->close the object in case of an
    error.
    
    Fixes "migrate -d "exec:dd of=file", where dd fails to open file.
    
    Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Marcelo Tosatti committed with Anthony Liguori Aug 19, 2010
  5. rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix

    qemu-config.c doesn't contain any target-specific code, and the
    TARGET_I386 conditional code didn't get compiled as a result. Removing
    this enables the driftfix parameter for rtc.
    
    Signed-off-by: Amit Shah <amit.shah@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Amit Shah committed with Anthony Liguori Jun 23, 2010
  6. QEMUFileBuffered: indicate that we're ready when the underlying file …

    …is ready
    
    QEMUFileBuffered stops writing when the underlying QEMUFile is not ready,
    and tells its producer so.  However, when the underlying QEMUFile becomes
    ready, it neglects to pass that information along, resulting in stoppage
    of all data until the next tick (a tenths of a second).
    
    Usually this doesn't matter, because most QEMUFiles used with QEMUFileBuffered
    are almost always ready, but in the case of exec: migration this is not true,
    due to the small pipe buffers used to connect to the target process.  The
    result is very slow migration.
    
    Fix by detecting the readiness notification and propagating it.  The detection
    is a little ugly since QEMUFile overloads put_buffer() to send it, but that's
    the suject for a different patch.
    
    Signed-off-by: Avi Kivity <avi@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Avi Kivity committed with Anthony Liguori Jul 7, 2010
Commits on Aug 15, 2010
  1. sparc escc IUS improvements (SunOS 4.1.4 fix)

    According to scc_escc_um.pdf:
     - Reset Highest IUS must update irq status to allow processing
       of the next priority interrupt.
     - rx interrupt has always higher priority than tx on same channel
    
    The documentation only explicitly says that Reset Highest IUS
    command (0x38) clears IUS bits, not that it clears the corresponding
    interrupt too, so don't clear interrupts on this command.
    
    The patch allows SunOS 4.1.4 to use the serial ports
    
    Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    Artyom Tarasenko committed with blueswirl Aug 15, 2010
  2. Fix mingw32 build

    Don't define qemu_chr_open_eventfd() on Windows.
    
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    blueswirl committed Aug 15, 2010
  3. win32: Avoid compiler warning (WIN32_LEAN_AND_MEAN redefined)

    configure adds the macro WIN32_LEAN_AND_MEAN to
    QEMU_CFLAGS, and SDL_syswm.h defines it, too.
    
    This results in a compiler warning (redefinition of
    WIN32_LEAN_AND_MEAN in SDL_syswm.h. That warning prevents
    compilations for win32 with warning = error).
    
    Fix this by removing the definition of WIN32_LEAN_AND_MEAN
    before including SDL_syswm.h.
    
    [blauwirbel@gmail.com: rebased]
    Signed-off-by: Stefan Weil <weil@mail.berlios.de>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    Stefan Weil committed with blueswirl Apr 1, 2010
  4. win32: Add missing function setenv

    Mingw32 does not provide a declaration and implementation of function
    setenv (which is used in sdl.c), so this patch adds both.
    
    Signed-off-by: Stefan Weil <weil@mail.berlios.de>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    Stefan Weil committed with blueswirl Jul 1, 2010
  5. Disable build of ivshmem on non-KVM systems

    Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    camm-xx committed with blueswirl Aug 14, 2010
  6. Add kvm_set_ioeventfd_mmio_long definition for non-KVM systems

    Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    camm-xx committed with blueswirl Aug 14, 2010
Commits on Aug 14, 2010
  1. TCG: Revert ppc64 tcg_out_movi32 change

    3b6dac3 apparently broke the ppc64 TCG target
    compilation in the code path without guest base.
    
    Reverting this line fixes the build.
    
    Signed-off-by: Andreas F?rber <andreas.faerber@web.de>
    Cc: malc <av1474@comtv.ru>
    Cc: Aurelien Jarno <aurelien@aurel32.net>
    Cc: Richard Henderson <rth@twiddle.net>
    Signed-off-by: malc <av1474@comtv.ru>
    afaerber committed with moosotc Aug 14, 2010
  2. TCG: Fix Darwin/ppc calling convention recognition

    5da79c8 broke compilation on Mac OS X v10.5 ppc.
    Apple's GCC 4.0.1 does not define _CALL_DARWIN. Recognize __APPLE__ again as well.
    
    Signed-off-by: Andreas F?rber <andreas.faerber@web.de>
    Cc: malc <av1474@comtv.ru>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: J?rgen Lock <nox@jelal.kn-bremen.de>
    Cc: Stefan Weil <weil@mail.berlios.de>
    Signed-off-by: malc <av1474@comtv.ru>
    afaerber committed with moosotc Aug 14, 2010
Commits on Aug 10, 2010
  1. RESEND: Inter-VM shared memory PCI device

    resend for bug fix related to removal of irqfd
    
    Support an inter-vm shared memory device that maps a shared-memory object as a
    PCI device in the guest.  This patch also supports interrupts between guest by
    communicating over a unix domain socket.  This patch applies to the qemu-kvm
    repository.
    
        -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>]
    
    Interrupts are supported between multiple VMs by using a shared memory server
    by using a chardev socket.
    
        -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>]
               [,chardev=<id>][,msi=on][,ioeventfd=on][,vectors=n][,role=peer|master]
        -chardev socket,path=<path>,id=<id>
    
    The shared memory server, sample programs and init scripts are in a git repo here:
    
        www.gitorious.org/nahanni
    
    Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    camm-xx committed with Anthony Liguori Jul 27, 2010
  2. Support marking a device as non-migratable

    A non-migratable device should be removed before migration and re-added after.
    
    Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    camm-xx committed with Anthony Liguori Jul 27, 2010