Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: qom-cpu-9
Commits on Apr 15, 2013
  1. target-cris: Override do_interrupt for pre-v32 CPU cores

    authored
    Instead of forwarding from cris_cpu_do_interrupt() to do_interruptv10(),
    override CPUClass::do_interrupt with crisv10_cpu_do_interrupt() in the
    newly introduced class_init functions.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  2. qdev: Set device's parent before calling realize() down inheritance c…

    Igor Mammedov authored committed
    …hain
    
    Currently device_set_realized() sets parent only after device was realized,
    but qdev_device_add() sets it before device is realized.
    Make behavior consistent and alter device_set_realized() to behave like
    qdev_device_add().
    
    It will allow to set link<> properties in realize() method in classes
    inherited from DEVICE.
    
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  3. cpu: Pass CPUState to *cpu_synchronize_post*()

    Igor Mammedov authored committed
    ... so it could be called without requiring CPUArchState.
    
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  4. target-i386: Split out CPU creation and features parsing

    Igor Mammedov authored committed
    Move CPU creation and features parsing into a separate cpu_x86_create()
    function, so that board would be able to set board-specific CPU
    properties before CPU is realized.
    
    Keep cpu_x86_init() for compatibility with the code that uses cpu_init()
    and doesn't need to modify CPU properties.
    
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  5. @ehabkost

    target-i386/cpu.c: Coding style fixes

    ehabkost authored committed
     * Add braces to 'if' statements;
     * Remove last TAB character from the source.
    
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
    [AF: Changed whitespace]
    Reviewed-by: Igor Mammedov <imammedo@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  6. ioapic: Replace FROM_SYSBUS() with QOM type cast

    Igor Mammedov authored committed
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  7. kvmvapic: Replace FROM_SYSBUS() with QOM type cast

    Igor Mammedov authored committed
    ... and define type name and type cast macro for kvmvapic according
    to accepted convention.
    
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  8. target-i386: Split APIC creation from initialization in x86_cpu_reali…

    Igor Mammedov authored committed
    …zefn()
    
    When APIC is hotplugged during CPU hotplug, device_set_realized()
    calls device_reset() on it. And if QEMU runs in KVM mode, following
    call chain will fail:
        apic_reset_common()
            -> kvm_apic_vapic_base_update()
                -> kvm_vcpu_ioctl(cpu->kvm_fd,...)
    due to cpu->kvm_fd not being initialized yet.
    
    cpu->kvm_fd is initialized during qemu_init_vcpu() but x86_cpu_apic_init()
    can't be moved after it because kvm_init_vcpu() -> kvm_arch_reset_vcpu()
    relies on APIC to determine if CPU is BSP for setting initial env->mp_state.
    
    So split APIC device creation from its initialization and realize APIC
    after CPU is created, when it's safe to call APIC's reset method.
    
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>
    Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  9. target-i386: Consolidate error propagation in x86_cpu_realizefn()

    Igor Mammedov authored committed
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  10. qdev: Add qdev property for bool type

    Igor Mammedov authored committed
    Signed-off-by: Igor Mammedov <imammedo@redhat.com>
    [AF: Use new qdev_prop_set_after_realize()]
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  11. @jan-kiszka

    target-i386: Improve -cpu ? features output

    jan-kiszka authored committed
    We were missing a bunch of feature lists. Fix this by simply dumping
    the meta list feature_word_info.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Reviewed-by: Igor Mammedov <imammedo@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  12. @jan-kiszka

    target-i386: Fix including "host" in -cpu ? output

    jan-kiszka authored committed
    kvm_enabled() cannot be true at this point because accelerators are
    initialized much later during init. Also, hiding this makes it very hard
    to discover for users. Simply dump unconditionally if CONFIG_KVM is set.
    
    Add explanation for "host" CPU type.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Reviewed-by: Igor Mammedov <imammedo@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
  13. @petar-jovanovic @aurel32

    target-mips: fix mipsdsp_mul_q15_q15 and tests for MAQ_SA_W_PHL/PHR

    petar-jovanovic authored aurel32 committed
    The operands for MAQ_SA_W.PHL/MAQ_SA_W.PHR must in specified format.
    Otherwise, the results are unpredictable. Once the operands were corrected
    in the tests (part of this change), a bug in mipsdsp_mul_q15_q15 became
    visible.
    
    This change corrects the tests for MAQ_SA_W.PHL/MAQ_SA_W.PHR and fixes
    sign-related issue in mipsdsp_mul_q15_q15. It also removes unnecessary
    comment.
    
    Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
  14. @pm215 @aurel32

    fpu: Correct edgecase in float64_muladd

    pm215 authored aurel32 committed
    In handling float64_muladd, if we end up doing a subtraction of the
    product and c, and the 128 bit result of this subtraction happens to
    have its most significant bit in bit 63, we weren't handling this
    correctly when attempting to normalize to put the most significant
    bit into bit 126.  We would end up doing a right shift by a negative
    number (undefined behaviour in C) so at best we would return an
    incorrect result to the guest.  MSB in bit 63 has to be handled as a
    special case separately from MSB in 0..62 and MSB in 63..126.  (MSB
    in 127 is not possible.)
    
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
  15. Merge remote-tracking branch 'stefanha/block' into staging

    Anthony Liguori authored
    * stefanha/block:
      rbd: add an asynchronous flush
      iotests: Add 'check -ssh' option to test Secure Shell block device.
      block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk.
      block: Add support for Secure Shell (ssh) block device.
      ide: refuse WIN_READ_NATIVE_MAX on empty device
      qemu-iotests: filter QEMU_PROG in 051.out
      qemu-iotests: Add test for -drive options
      qemu-iotests: A few more bdrv_pread/pwrite tests
      block: Introduce bdrv_pwritev() for qcow2_save_vmstate
      savevm: Implement block_writev_buffer()
      block: Introduce bdrv_writev_vmstate
    
    Conflicts:
    	savevm.c
    
    aliguori: add f->pos parameter to writev_buffer().
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  16. Merge remote-tracking branch 'luiz/queue/qmp' into staging

    Anthony Liguori authored
    # By Michal Novotny (2) and Eric Blake (1)
    # Via Luiz Capitulino
    * luiz/queue/qmp:
      qapi: use valid JSON in schema
      Revert "New QMP command query-cpu-max and HMP command cpu_max"
      New cpu-max field in query-machines QMP command output
    
    Message-id: 1365775103-18737-1-git-send-email-lcapitulino@redhat.com
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  17. Merge remote-tracking branch 'quintela/migration.next' into staging

    Anthony Liguori authored
    # By Paolo Bonzini
    # Via Juan Quintela
    * quintela/migration.next:
      migration: simplify writev vs. non-writev logic
      migration: drop is_write complications
      migration: use a single I/O operation when writev_buffer is not defined
      migration: set f->is_write and flush in add_to_iovec
    
    Message-id: 1365512961-15623-1-git-send-email-quintela@redhat.com
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
  18. @jdurgin

    rbd: add an asynchronous flush

    jdurgin authored Stefan Hajnoczi committed
    The existing bdrv_co_flush_to_disk implementation uses rbd_flush(),
    which is sychronous and causes the main qemu thread to block until it
    is complete. This results in unresponsiveness and extra latency for
    the guest.
    
    Fix this by using an asynchronous version of flush.  This was added to
    librbd with a special #define to indicate its presence, since it will
    be backported to stable versions. Thus, there is no need to check the
    version of librbd.
    
    Implement this as bdrv_aio_flush, since it matches other aio functions
    in the rbd block driver, and leave out bdrv_co_flush_to_disk when the
    asynchronous version is available.
    
    Reported-by: Oliver Francke <oliver@filoo.de>
    Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  19. @rwmjones

    iotests: Add 'check -ssh' option to test Secure Shell block device.

    rwmjones authored Stefan Hajnoczi committed
    Note in order to run these tests on ssh, you must be running a local
    ssh daemon, and that daemon must accept loopback connections, and
    ssh-agent has to be set up to allow logins on the local daemon.  In
    other words, the following command should just work without demanding
    any passphrase:
    
     ssh localhost
    
    Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  20. @rwmjones

    block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush…

    rwmjones authored Stefan Hajnoczi committed
    … to disk.
    
    libssh2_sftp_fsync is an extension to libssh2 to support fsync(2) over
    sftp, which is itself an extension of OpenSSH.
    
    If both libssh2 and the ssh daemon support it, this will allow
    bdrv_flush_to_disk to commit changes through to disk on the remote
    server.
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  21. @rwmjones

    block: Add support for Secure Shell (ssh) block device.

    rwmjones authored Stefan Hajnoczi committed
      qemu-system-x86_64 -drive file=ssh://hostname/some/image
    
    QEMU will ssh into 'hostname' and open '/some/image' which is made
    available as a standard block device.
    
    You can specify a username (ssh://user@host/...) and/or a port number
    (ssh://host:port/...).  You can also use an alternate syntax using
    properties (file.user, file.host, file.port, file.path).
    
    Current limitations:
    
    - Authentication must be done without passwords or passphrases, using
      ssh-agent.  Other authentication methods are not supported.
    
    - Uses a single connection, instead of concurrent AIO with multiple
      SSH connections.
    
    This is implemented using libssh2 on the client side.  The server just
    requires a regular ssh daemon with sftp-server support.  Most ssh
    daemons on Unix/Linux systems will work out of the box.
    
    Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
    Cc: Stefan Hajnoczi <stefanha@gmail.com>
    Cc: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  22. ide: refuse WIN_READ_NATIVE_MAX on empty device

    Stefan Hajnoczi authored
    What is the highest addressable sector on an empty CD-ROM?  Nothing is
    addressable so produce an error.
    
    This patch prevents a divide-by-zero in ide_set_sector() since
    s->sectors and s->heads would be 0.  Not to mention that a sector=-1
    argument would be nonsense.
    
    Note that WIN_READ_NATIVE_MAX can be triggered using hdparm -N 1024
    /dev/cdrom.  The LBA bit will be set to 1 though, so the only easy way
    to go down the ide_set_sector() CHS code path which divides by zero is
    to comment out the s->select & 0x40 case for testing.
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Markus Armbruster <armbru@redhat.com>
  23. qemu-iotests: filter QEMU_PROG in 051.out

    Stefan Hajnoczi authored
    Filter the name of the QEMU executable so the output can be diffed no
    matter what QEMU_PROG is (e.g. qemu-system-x86_64).
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  24. qemu-iotests: Add test for -drive options

    Kevin Wolf authored Stefan Hajnoczi committed
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  25. qemu-iotests: A few more bdrv_pread/pwrite tests

    Kevin Wolf authored Stefan Hajnoczi committed
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  26. block: Introduce bdrv_pwritev() for qcow2_save_vmstate

    Kevin Wolf authored Stefan Hajnoczi committed
    Directly pass the QEMUIOVector on instead of linearising it.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  27. savevm: Implement block_writev_buffer()

    Kevin Wolf authored Stefan Hajnoczi committed
    Instead of breaking up RAM state into many small chunks, pass the iovec
    to the block layer for better performance.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  28. block: Introduce bdrv_writev_vmstate

    Kevin Wolf authored Stefan Hajnoczi committed
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commits on Apr 13, 2013
  1. @blueswirl

    qjson: to_json() case QTYPE_QSTRING is buggy, rewrite

    Markus Armbruster authored blueswirl committed
    Known bugs in to_json():
    
    * A start byte for a three-byte sequence followed by less than two
      continuation bytes is split into one-byte sequences.
    
    * Start bytes for sequences longer than three bytes get misinterpreted
      as start bytes for three-byte sequences.  Continuation bytes beyond
      byte three become one-byte sequences.
    
      This means all characters outside the BMP are decoded incorrectly.
    
    * One-byte sequences with the MSB are put into the JSON string
      verbatim when char is unsigned, producing invalid UTF-8.  When char
      is signed, they're replaced by "\\uFFFF" instead.
    
      This includes \xFE, \xFF, and stray continuation bytes.
    
    * Overlong sequences are happily accepted, unless screwed up by the
      bugs above.
    
    * Likewise, sequences encoding surrogate code points or noncharacters.
    
    * Unlike other control characters, ASCII DEL is not escaped.  Except
      in overlong encodings.
    
    My rewrite fixes them as follows:
    
    * Malformed UTF-8 sequences are replaced.
    
      Except the overlong encoding \xC0\x80 of U+0000 is still accepted.
      Permits embedding NUL characters in C strings.  This trick is known
      as "Modified UTF-8".
    
    * Sequences encoding code points beyond Unicode range are replaced.
    
    * Sequences encoding code points beyond the BMP produce a surrogate
      pair.
    
    * Sequences encoding surrogate code points are replaced.
    
    * Sequences encoding noncharacters are replaced.
    
    * ASCII DEL is now always escaped.
    
    The replacement character is U+FFFD.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  2. @blueswirl

    check-qjson: Test noncharacters other than U+FFFE, U+FFFF in strings

    Markus Armbruster authored blueswirl committed
    Test cases cover the two noncharacters in the BMP.  Add tests for the
    other 64 noncharacters.
    
    Three existing test cases involve noncharacters U+FFFF and U+10FFFF.
    Instead of deleting them as now duplicates, adjust them to use U+FFFC
    and U+10FFFFD.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  3. @blueswirl

    check-qjson: Improve a few comments, delete bogus ones

    Markus Armbruster authored blueswirl committed
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  4. @blueswirl

    unicode: New mod_utf8_codepoint()

    Markus Armbruster authored blueswirl committed
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Reviewed-by: Laszlo Ersek <lersek@redhat.com>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
  5. @aurel32

    Merge branch 'mingw' of git://qemu.weilnetz.de/qemu

    aurel32 authored
    * 'mingw' of git://qemu.weilnetz.de/qemu:
      qemu-timer: move timeBeginPeriod/timeEndPeriod to os-win32
      Release SMP restriction on Windows
      Ensure good ordering of memory instruction in cpu_exec
      Check effective suspension of TCG thread
  6. @aurel32

    target-i386: add AES-NI instructions

    aurel32 authored
    Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
  7. @aurel32

    aes: make Td[0-5] and Te[0-5] tables non static

    aurel32 authored
    Remove static attribute to Td[0-5] and Te[0-5] tables so that they
    can be used outside of aes.c. Change their type from u32 to uint32_t,
    to keep the u32 udef local to aes.c. Prefix them with AES_ so that they
    do not conflict with other symbols.
    
    Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
    Reviewed-by: Richard Henderson <rth@twiddle.net>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Something went wrong with that request. Please try again.