Skip to content
Snippets Groups Projects
  1. Mar 12, 2018
    • Peter Xu's avatar
      chardev: introduce chr_machine_done hook · c7278b43
      Peter Xu authored
      
      Introduce ChardevClass.chr_machine_done() hook so that chardevs can run
      customized procedures after machine init.
      
      There was an existing mux user already that did similar thing but used a
      raw machine done notifier.  Generalize it into a framework, and let the
      mux chardevs provide such a class-specific hook to achieve the same
      thing.  Then we can move the mux related code to the char-mux.c file.
      
      Since at it, replace the mux_realized variable with the global
      machine_init_done varible.
      
      This notifier framework will be further leverged by other type of
      chardevs soon.
      
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Message-Id: <20180306053320.15401-6-peterx@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c7278b43
    • Peter Xu's avatar
      chardev: allow telnet gsource to switch gcontext · ce1230c0
      Peter Xu authored
      
      It was originally created by qio_channel_add_watch() so it's always
      assigning the task to main context.  Now we use the new API called
      qio_channel_add_watch_source() so that we get the GSource handle rather
      than the tag ID.
      
      Meanwhile, caching the gsource and TCPChardevTelnetInit (which holds the
      handshake data) in SocketChardev.telnet_source so that we can also do
      dynamic context switch when update read handlers.
      
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Message-Id: <20180306053320.15401-5-peterx@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ce1230c0
    • Peter Xu's avatar
      chardev: update net listener gcontext · 3da9de5c
      Peter Xu authored
      
      TCP chardevs can be using QIO network listeners working in the
      background when in listening mode.  However the network listeners are
      always running in main context.  This can race with chardevs that are
      running in non-main contexts.
      
      To solve this, we need to re-setup the net listeners in
      tcp_chr_update_read_handler() with the newly cached gcontext.
      
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Message-Id: <20180306053320.15401-4-peterx@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      3da9de5c
    • Daniel P. Berrangé's avatar
      chardev: fix handling of EAGAIN for TCP chardev · c863fdec
      Daniel P. Berrangé authored
      
      When this commit was applied
      
        commit 9894dc0c
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Tue Jan 19 11:14:29 2016 +0000
      
          char: convert from GIOChannel to QIOChannel
      
      The tcp_chr_recv() function was changed to return QIO_CHANNEL_ERR_BLOCK
      which corresonds to -2. As such the handling for EAGAIN was able to be
      removed from tcp_chr_read(). Unfortunately in a later commit:
      
        commit b6572b4f
        Author: Marc-André Lureau <marcandre.lureau@redhat.com>
        Date:   Fri Mar 11 18:55:24 2016 +0100
      
          char: translate from QIOChannel error to errno
      
      The tcp_chr_recv() function was changed back to return -1, with errno
      set to EAGAIN, without also re-addding support for this to tcp_chr_read()
      
      Reported-by: default avatarAleksey Kuleshov <rndfax@yandex.ru>
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Message-Id: <20180222121351.26191-1-berrange@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c863fdec
    • Peter Xu's avatar
      vl: export machine_init_done · c8ca2a23
      Peter Xu authored
      
      We have that variable but not exported.  Export that so modules can have
      a way to poke on whether machine init has finished.
      
      Meanwhile, set that up even before calling the notifiers, so that
      notifiers who may depend on this field will get a correct answer.
      
      Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
      Message-Id: <20180306053320.15401-2-peterx@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Acked-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c8ca2a23
    • Eric Blake's avatar
      checkpatch: Exempt long URLs · 205f31a8
      Eric Blake authored
      
      Sometimes, we want to refer to really long URLs, but checkpatch
      balks, and we have to manually bypass the check.  URL shorteners
      may be nice at reducing long links, but it's hard to guarantee the
      shortened link will live as long as the real target, and it is
      also nice to see the original target without having to load the
      shortened URL through a browser.  So exempt a line containing
      only a URL from the long-line syntax check.
      
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Suggested-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20180222215838.18223-1-eblake@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      205f31a8
    • Thomas Huth's avatar
      hw: Do not include "sysemu/block-backend.h" if it is not necessary · 7eceff5b
      Thomas Huth authored
      
      After reviewing a patch from Philippe that removes block-backend.h
      from hw/lm32/milkymist.c, I noticed that this header is included
      unnecessarily in a lot of other files, too. Remove those unneeded
      includes to speed up the compilation process a little bit.
      
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <1518684912-31637-1-git-send-email-thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7eceff5b
    • Marc-André Lureau's avatar
      build-sys: make help could have 'modules' target · 0decdfe2
      Marc-André Lureau authored
      
      Available when configure --enable-modules.
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20180306161728.20890-1-marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0decdfe2
    • Thomas Huth's avatar
      qemu-doc: Add the paragraph about the -no-frame deprecation again · e12c8198
      Thomas Huth authored
      
      The section has accidentially been removed while resolving a
      contextual conflict during a rebase, so add this again.
      
      Fixes: f29d4450
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      Message-Id: <1520405769-22179-1-git-send-email-thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      e12c8198
    • Paolo Bonzini's avatar
      qemu-doc: update deprecation section to use -nic and -netdev hubport · fb815218
      Paolo Bonzini authored
      
      The deprecated SLIRP options -tftp, -bootp, -redir, -smb provide
      sample replacements that use "-net nic".  Suggest "-nic" instead,
      since we finally have a path towards getting rid of "-net".
      
      For "-net vlan" the replacement involves hubport network devices,
      so mention that too.
      
      Cc: Jason Wang <jasowang@redhat.com>
      Acked-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fb815218
    • Daniel Henrique Barboza's avatar
      scsi-disk.c: consider bl->max_transfer in INQUIRY emulation · d082d16a
      Daniel Henrique Barboza authored
      
      The calculation of the max_transfer atribute of BlockDriverState
      makes considerations such as max_segments and transfer_length via
      the BLKSECTGET ioctl (if available).
      
      However, bl->max_transfer isn't considered when emulating the INQUIRY
      'Block Limit' response to the scsi-hd devices. This leads to situations
      where the declared max_sectors from the INQUIRY response is inconsistent
      with the block limits, which isn't ideal. It can also be misleading to the
      user that sets /sys/block/<dev>/queue/max_sectors_kb to a certain
      value, then finds a different value in the guest OS for the same disk.
      
      Following the same logic scsi_read_complete from scsi-generic.c does
      when patching the response of the Block Limits VPD back to the guest,
      change the max_io_sectors value of the emulated Block Limits VPD
      response by considering the blk_get_max_transfer of the related
      BlockDriverState. Use MIN_NOT_ZERO to be sure that the minimal
      value is chosen.
      
      Given that we're changing max_io_sectors, consider that min_io_sectors
      and opt_io_sectors can't be greater than the new calculated value.
      
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      Reviewed-by: default avatarFam Zheng <famz@redhat.com>
      Message-Id: <20180306154411.18462-1-danielhb@linux.vnet.ibm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d082d16a
    • Paolo Bonzini's avatar
      q35: change default NIC to e1000e · 4b9c264b
      Paolo Bonzini authored
      
      The e1000 NIC is getting old and is not a very good default for a
      PCIe machine type.  Change it to e1000e, which should be supported
      by a good number of guests.
      
      In particular, drivers for 82574 were added first to Linux 2.6.27 (2008)
      and Windows 2008 R2.  This does mean that Windows 2008 will not work
      anymore with Q35 machine types and a default "-net nic -net xxx" network
      configuration; it did work before because it does have an AHCI driver.
      However, Windows 2008 has been declared out of main stream support
      in 2015.  It will get out of extended support in 2020.  Windows 2008
      R2 has the same end of support dates and, since the two are basically
      Vista vs. Windows 7, R2 probably is more popular.
      
      Reviewed-by: default avatarJason Wang <jasowang@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      4b9c264b
    • Paolo Bonzini's avatar
      net: allow using any PCI NICs in -net or -nic · 52310c3f
      Paolo Bonzini authored
      
      Remove the hard-coded list of PCI NIC names; instead, fill an array
      using all PCI devices listed under DEVICE_CATEGORY_NETWORK. Keep
      the old shortcut "virtio" for virtio-net-pci.
      
      Suggested-by: default avatarThomas Huth <thuth@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Reviewed-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      52310c3f
    • Paolo Bonzini's avatar
      qom: introduce object_class_get_list_sorted · 47c66009
      Paolo Bonzini authored
      
      Unify half a dozen copies of very similar code (the only difference being
      whether comparisons were case-sensitive) and use it also in Tricore,
      which did not do any sorting of CPU model names.
      
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      47c66009
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180309a' into staging · 819fd469
      Peter Maydell authored
      
      Migration pull 2018-03-09
      
      # gpg: Signature made Fri 09 Mar 2018 17:52:46 GMT
      # gpg:                using RSA key 0516331EBC5BFDE7
      # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
      # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7
      
      * remotes/dgilbert/tags/pull-migration-20180309a:
        tests: Silence migration-test 'bad' test
        migration: fix applying wrong capabilities
        migration/block: rename MAX_INFLIGHT_IO to MAX_IO_BUFFERS
        migration/block: reset dirty bitmap before read in bulk phase
        migration: do not transfer ram during bulk storage migration
        migration: fix minor finalize leak
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      819fd469
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180309' into staging · 5df08956
      Peter Maydell authored
      
      target-arm queue:
       * i.MX: Add i.MX7 SOC implementation and i.MX7 Sabre board
       * Report the correct core count in A53 L2CTLR on the ZynqMP board
       * linux-user: preliminary SVE support work (signal handling)
       * hw/arm/boot: fix memory leak in case of error loading ELF file
       * hw/arm/boot: avoid reading off end of buffer if passed very
         small image file
       * hw/arm: Use more CONFIG switches for the object files
       * target/arm: Add "-cpu max" support
       * hw/arm/virt: Support -machine gic-version=max
       * hw/sd: improve debug tracing
       * hw/sd: sdcard: Add the Tuning Command (CMD 19)
       * MAINTAINERS: add Philippe as odd-fixes maintainer for SD
      
      # gpg: Signature made Fri 09 Mar 2018 17:24:23 GMT
      # gpg:                using RSA key 3C2525ED14360CDE
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20180309: (25 commits)
        MAINTAINERS: Add entries for SD (SDHCI, SDBus, SDCard)
        sdhci: Fix a typo in comment
        sdcard: Add the Tuning Command (CMD19)
        sdcard: Display which protocol is used when tracing (SD or SPI)
        sdcard: Display command name when tracing CMD/ACMD
        sdcard: Do not trace CMD55, except when we already expect an ACMD
        hw/arm/virt: Support -machine gic-version=max
        hw/arm/virt: Add "max" to the list of CPU types "virt" supports
        target/arm: Make 'any' CPU just an alias for 'max'
        target/arm: Add "-cpu max" support
        target/arm: Move definition of 'host' cpu type into cpu.c
        target/arm: Query host CPU features on-demand at instance init
        arm: avoid heap-buffer-overflow in load_aarch64_image
        arm: fix load ELF error leak
        hw/arm: Use more CONFIG switches for the object files
        aarch64-linux-user: Add support for SVE signal frame records
        aarch64-linux-user: Add support for EXTRA signal frame records
        aarch64-linux-user: Remove struct target_aux_context
        aarch64-linux-user: Split out helpers for guest signal handling
        linux-user: Implement aarch64 PR_SVE_SET/GET_VL
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      5df08956
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 12c06d6f
      Peter Maydell authored
      
      Block layer patches
      
      # gpg: Signature made Fri 09 Mar 2018 15:09:20 GMT
      # gpg:                using RSA key 7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * remotes/kevin/tags/for-upstream: (56 commits)
        qemu-iotests: fix 203 migration completion race
        iotests: Tweak 030 in order to trigger a race condition with parallel jobs
        iotests: Skip test for ENOMEM error
        iotests: Mark all tests executable
        iotests: Test creating overlay when guest running
        qemu-iotests: Test ssh image creation over QMP
        qemu-iotests: Test qcow2 over file image creation with QMP
        block: Fail bdrv_truncate() with negative size
        file-posix: Fix no-op bdrv_truncate() with falloc preallocation
        ssh: Support .bdrv_co_create
        ssh: Pass BlockdevOptionsSsh to connect_to_ssh()
        ssh: QAPIfy host-key-check option
        ssh: Use QAPI BlockdevOptionsSsh object
        sheepdog: Support .bdrv_co_create
        sheepdog: QAPIfy "redundancy" create option
        nfs: Support .bdrv_co_create
        nfs: Use QAPI options in nfs_client_open()
        rbd: Use qemu_rbd_connect() in qemu_rbd_do_create()
        rbd: Assign s->snap/image_name in qemu_rbd_open()
        rbd: Support .bdrv_co_create
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      12c06d6f
  2. Mar 09, 2018
Loading