1. 22 12月, 2017 13 次提交
    • K
      test-bdrv-drain: Test BlockDriver callbacks for drain · 881cfd17
      Kevin Wolf 提交于
      This adds a test case that the BlockDriver callbacks for drain are
      called in bdrv_drained_all_begin/end(), and that both of them are called
      exactly once.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      881cfd17
    • K
      block: Call .drain_begin only once in bdrv_drain_all_begin() · 2da9b7d4
      Kevin Wolf 提交于
      bdrv_drain_all_begin() used to call the .bdrv_co_drain_begin() driver
      callback inside its polling loop. This means that how many times it got
      called for each node depended on long it had to poll the event loop.
      
      This is obviously not right and results in nodes that stay drained even
      after bdrv_drain_all_end(), which calls .bdrv_co_drain_begin() once per
      node.
      
      Fix bdrv_drain_all_begin() to call the callback only once, too.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      2da9b7d4
    • K
      block: Make bdrv_drain_invoke() recursive · db0289b9
      Kevin Wolf 提交于
      This change separates bdrv_drain_invoke(), which calls the BlockDriver
      drain callbacks, from bdrv_drain_recurse(). Instead, the function
      performs its own recursion now.
      
      One reason for this is that bdrv_drain_recurse() can be called multiple
      times by bdrv_drain_all_begin(), but the callbacks may only be called
      once. The separation is necessary to fix this bug.
      
      The other reason is that we intend to go to a model where we call all
      driver callbacks first, and only then start polling. This is not fully
      achieved yet with this patch, as bdrv_drain_invoke() contains a
      BDRV_POLL_WHILE() loop for the block driver callbacks, which can still
      call callbacks for any unrelated event. It's a step in this direction
      anyway.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      db0289b9
    • J
      iotests: fix 197 for vpc · bff55548
      John Snow 提交于
      VPC has some difficulty creating geometries of particular size.
      However, we can indeed force it to use a literal one, so let's
      do that for the sake of test 197, which is testing some specific
      offsets.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NLukáš Doktor <ldoktor@redhat.com>
      bff55548
    • K
      block: Formats don't need CONSISTENT_READ with NO_IO · 5fbfabd3
      Kevin Wolf 提交于
      Commit 1f4ad7d3 fixed 'qemu-img info' for raw images that are currently
      in use as a mirror target. It is not enough for image formats, though,
      as these still unconditionally request BLK_PERM_CONSISTENT_READ.
      
      As this permission is geared towards whether the guest-visible data is
      consistent, and has no impact on whether the metadata is sane, and
      'qemu-img info' does not read guest-visible data (except for the raw
      format), it makes sense to not require BLK_PERM_CONSISTENT_READ if there
      is not going to be any guest I/O performed, regardless of image format.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      5fbfabd3
    • P
      Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.12-pull-request' into staging · 281f3274
      Peter Maydell 提交于
      # gpg: Signature made Thu 21 Dec 2017 19:35:00 GMT
      # gpg:                using RSA key 0xF30C38BD3F2FBE3C
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier/tags/m68k-for-2.12-pull-request:
        tests/boot-serial-test: Add support for the mcf5208evb board
        target/m68k: fix set_cc_op()
        target/m68k: add monitor.c
        target/m68k: remove unused variable gen_throws_exception
        Split adb.c into adb.c, adb-mouse.c and adb-kbd.c
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      281f3274
    • L
      hw/i386/vmport: fix missing definitions with non-log trace backends · 43ab9a53
      Laurent Vivier 提交于
      When compiled with anything other than the 'log' trace backend, we have:
      
         error: implicit declaration of function 'qemu_log_mask'
         error: 'LOG_UNIMP' undeclared (first use in this function)
      
      This patch adds the missing include.
      
      Fixes: 7299e1a4
             ("hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP")
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Message-id: 20171221211103.30311-1-laurent@vivier.eu
      [PMM: fixed commit message description of when problem occurs]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      43ab9a53
    • T
      tests/boot-serial-test: Add support for the mcf5208evb board · 598a29f3
      Thomas Huth 提交于
      We can output a character quite easily here with some few lines of
      assembly that we provide as a mini-kernel for this board.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1512031988-32490-4-git-send-email-thuth@redhat.com>
      [lv: add boot-serial-test in check-qtest-m68k]
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      598a29f3
    • L
      target/m68k: fix set_cc_op() · 7deddf96
      Laurent Vivier 提交于
      The first call of set_cc_op() in a new translation sequence
      is done with old_op set to CC_OP_DYNAMIC (-1).
      
      This will do an out of bound access to the array cc_op_live[].
      
      We fix that by adding an entry in cc_op_live[] for CC_OP_DYNAMIC.
      Reported-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20171221160558.14151-1-laurent@vivier.eu>
      7deddf96
    • L
      target/m68k: add monitor.c · cea06682
      Laurent Vivier 提交于
      This allows to use registers content in the monitor.
      
      Example:
      
       BEFORE:
        (qemu) print $d0
        unknown register
      
       AFTER:
        (qemu) print $d0
        0
        (qemu) print $sr
        0x2000
        (qemu) x/10i $pc
        0x40010a2a:  movew %sr,%d0
        0x40010a2c:  oril #1792,%d0
        0x40010a32:  movew %d0,%sr
        0x40010a34:  movel %a0@,%d0
        0x40010a36:  btst #3,%d0
        0x40010a3a:  beqs 0x40010a26
        0x40010a3c:  movew %sr,%d0
        0x40010a3e:  andil #63743,%d0
        0x40010a44:  movew %d0,%sr
        0x40010a46:  rts
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Reviewed-by: NThomas Huth <huth@tuxfamily.org>
      Message-Id: <20171221083057.17942-1-laurent@vivier.eu>
      cea06682
    • L
      target/m68k: remove unused variable gen_throws_exception · 5f63f6ab
      Laurent Vivier 提交于
      It has been introduced by e6e5906b ("ColdFire target."),
      but the content is never used.
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NThomas Huth <huth@tuxfamily.org>
      Message-Id: <20171220130815.20708-1-laurent@vivier.eu>
      5f63f6ab
    • L
      Split adb.c into adb.c, adb-mouse.c and adb-kbd.c · 77cb0f5a
      Laurent Vivier 提交于
      It makes the code clearer to separate the bus implementation
      from the devices one.
      
      Replace ADB_DPRINTF() with trace events (and adding new ones in adb-kbd.c).
      Some minor changes to make checkpatch.pl happy.
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Message-Id: <20171220121406.24056-1-laurent@vivier.eu>
      77cb0f5a
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · 23bafd75
      Peter Maydell 提交于
      * NBD and chardev conversion to QIONetListener (Daniel)
      * MTTCG fixes (David)
      * Hyper-V fixes (Roman, Evgeny)
      * share-rw option (Fam)
      * Mux chardev event bugfix (Marc-André)
      * Add systemd unit files in contrib/ (me)
      * SCSI and block/iscsi.c bugfixes (me, Peter L.)
      * unassigned_mem_ops fixes (Peter M.)
      * VEX decoding fix (Peter M.)
      * "info pic" and "info irq" improvements (Peter Xu)
      * vmport trace events (Philippe)
      * Braille chardev bugfix (Samuel)
      * Compiler warnings fix (Stefan)
      * initial support for TCG smoke test of more boards (Thomas)
      * New CPU features (Yang)
      * Reduce startup memory usage (Yang)
      * QemuThread race fix (linhecheng)
      
      # gpg: Signature made Thu 21 Dec 2017 08:30:49 GMT
      # gpg:                using RSA key 0xBFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream: (41 commits)
        chardev: convert the socket server to QIONetListener
        blockdev: convert qemu-nbd server to QIONetListener
        blockdev: convert internal NBD server to QIONetListener
        test: add some chardev mux event tests
        chardev: fix backend events regression with mux chardev
        rcu: reduce more than 7MB heap memory by malloc_trim()
        checkpatch: volatile with a comment or sig_atomic_t is okay
        i8259: move TYPE_INTERRUPT_STATS_PROVIDER upper
        kvm-i8259: support "info pic" and "info irq"
        i8259: generalize statistics into common code
        i8259: use DEBUG_IRQ_COUNT always
        i8259: convert DPRINTFs into trace
        Remove legacy -no-kvm-pit option
        scsi: replace hex constants with #defines
        scsi: provide general-purpose functions to manage sense data
        hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP
        hw/mips/boston: Remove workaround for writes to ROM aborting
        exec: Don't reuse unassigned_mem_ops for io_mem_rom
        block/iscsi: only report an iSCSI Failure if we don't handle it gracefully
        block/iscsi: dont leave allocmap in an invalid state on UNMAP failure
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      23bafd75
  2. 21 12月, 2017 27 次提交