1. 23 5月, 2017 7 次提交
    • E
      shutdown: Expose bool cause in SHUTDOWN and RESET events · 08fba7ac
      Eric Blake 提交于
      Libvirt would like to be able to distinguish between a SHUTDOWN
      event triggered solely by guest request and one triggered by a
      SIGTERM or other action on the host.  While qemu_kill_report() was
      already able to give different output to stderr based on whether a
      shutdown was triggered by a host signal (but NOT by a host UI event,
      such as clicking the X on the window), that information was then
      lost to management.  The previous patches improved things to use an
      enum throughout all callsites, so now we have something ready to
      expose through QMP.
      
      Note that for now, the decision was to expose ONLY a boolean,
      rather than promoting ShutdownCause to a QAPI enum; this is because
      libvirt has not expressed an interest in anything finer-grained.
      We can still add additional details, in a backwards-compatible
      manner, if a need later arises (if the addition happens before 2.10,
      we can replace the bool with an enum; otherwise, the enum will have
      to be in addition to the bool); this patch merely adds a helper
      shutdown_caused_by_guest() to map the internal enum into the
      external boolean.
      
      Update expected iotest outputs to match the new data (complete
      coverage of the affected tests is obtained by -raw, -qcow2, and -nbd).
      
      Here is output from 'virsh qemu-monitor-event --loop' with the
      patch installed:
      
      event SHUTDOWN at 1492639680.731251 for domain fedora_13: {"guest":true}
      event STOP at 1492639680.732116 for domain fedora_13: <null>
      event SHUTDOWN at 1492639680.732830 for domain fedora_13: {"guest":false}
      
      Note that libvirt runs qemu with -no-shutdown: the first SHUTDOWN event
      was triggered by an action I took directly in the guest (shutdown -h),
      at which point qemu stops the vcpus and waits for libvirt to do any
      final cleanups; the second SHUTDOWN event is the result of libvirt
      sending SIGTERM now that it has completed cleanup.  Libvirt is already
      smart enough to only feed the first qemu SHUTDOWN event to the end user
      (remember, virsh qemu-monitor-event is a low-level debugging interface
      that is explicitly unsupported by libvirt, so it sees things that normal
      end users do not); changing qemu to emit SHUTDOWN only once is outside
      the scope of this series.
      
      See also https://bugzilla.redhat.com/1384007Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20170515214114.15442-6-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      08fba7ac
    • E
      shutdown: Add source information to SHUTDOWN and RESET · cf83f140
      Eric Blake 提交于
      Time to wire up all the call sites that request a shutdown or
      reset to use the enum added in the previous patch.
      
      It would have been less churn to keep the common case with no
      arguments as meaning guest-triggered, and only modified the
      host-triggered code paths, via a wrapper function, but then we'd
      still have to audit that I didn't miss any host-triggered spots;
      changing the signature forces us to double-check that I correctly
      categorized all callers.
      
      Since command line options can change whether a guest reset request
      causes an actual reset vs. a shutdown, it's easy to also add the
      information to reset requests.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts]
      Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part]
      Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts]
      Message-Id: <20170515214114.15442-5-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      cf83f140
    • E
      shutdown: Preserve shutdown cause through replay · 802f045a
      Eric Blake 提交于
      With the recent addition of ShutdownCause, we want to be able to pass
      a cause through any shutdown request, and then faithfully replay that
      cause when later replaying the same sequence.  The easiest way is to
      expand the reply event mechanism to track a series of values for
      EVENT_SHUTDOWN, one corresponding to each value of ShutdownCause.
      
      We are free to change the replay stream as needed, since there are
      already no guarantees about being able to use a replay stream by
      any other version of qemu than the one that generated it.
      
      The cause is not actually fed back until the next patch changes the
      signature for requesting a shutdown; a TODO marks that upcoming change.
      
      Yes, this uses the gcc/clang extension of a ranged case label,
      but this is not the first time we've used non-C99 constructs.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-Id: <20170515214114.15442-4-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      802f045a
    • E
      shutdown: Prepare for use of an enum in reset/shutdown_request · aedbe192
      Eric Blake 提交于
      We want to track why a guest was shutdown; in particular, being able
      to tell the difference between a guest request (such as ACPI request)
      and host request (such as SIGINT) will prove useful to libvirt.
      Since all requests eventually end up changing shutdown_requested in
      vl.c, the logical change is to make that value track the reason,
      rather than its current 0/1 contents.
      
      Since command-line options control whether a reset request is turned
      into a shutdown request instead, the same treatment is given to
      reset_requested.
      
      This patch adds an internal enum ShutdownCause that describes reasons
      that a shutdown can be requested, and changes qemu_system_reset() to
      pass the reason through, although for now nothing is actually changed
      with regards to what gets reported.  The enum could be exported via
      QAPI at a later date, if deemed necessary, but for now, there has not
      been a request to expose that much detail to end clients.
      
      For the most part, we turn 0 into SHUTDOWN_CAUSE_NONE, and 1 into
      SHUTDOWN_CAUSE_HOST_ERROR; the only specific case where we have enough
      information right now to use a different value is when we are reacting
      to a host signal.  It will take a further patch to edit all call-sites
      that can trigger a reset or shutdown request to properly pass in any
      other reasons; this patch includes TODOs to point such places out.
      
      qemu_system_reset() trades its 'bool report' parameter for a
      'ShutdownCause reason', with all non-zero values having the same
      effect; this lets us get rid of the weird #defines for VMRESET_*
      as synonyms for bools.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20170515214114.15442-3-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      aedbe192
    • E
      shutdown: Simplify shutdown_signal · 7af88279
      Eric Blake 提交于
      There is no signal 0 (kill(pid, 0) has special semantics to probe whether
      a process is alive), rather than actually sending a signal 0).  So we
      can use the simpler 0, instead of -1, for our sentinel of whether a
      shutdown request due to a signal has happened.
      Suggested-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Message-Id: <20170515214114.15442-2-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      7af88279
    • M
      sockets: Plug memory leak in socket_address_flatten() · fc0f0059
      Markus Armbruster 提交于
      socket_address_flatten() leaks a SocketAddress when its argument is
      null.  Happens when opening a ChardevBackend of type 'udp' that is
      configured without a local address.  Screwed up in commit bd269ebc due
      to last minute semantic conflict resolution.  Spotted by Coverity.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1494866344-11013-1-git-send-email-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      fc0f0059
    • G
      scripts/qmp/qom-set: fix the value argument passed to srv.command() · fe2f74af
      Greg Kurz 提交于
      When invoking the script with -s, we end up passing a bogus value
      to QEMU:
      
      $ ./scripts/qmp/qom-set -s /var/tmp/qmp-sock-exp /machine.accel kvm
      {}
      $ ./scripts/qmp/qom-get -s /var/tmp/qmp-sock-exp /machine.accel
      /var/tmp/qmp-sock-exp
      
      This happens because sys.argv[2] isn't necessarily the command line
      argument that holds the value. It is sys.argv[4] when -s was also
      passed.
      
      Actually, the code already has a variable to handle that. This patch
      simply uses it.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <149373610338.5144.9635049015143453288.stgit@bahia.lan>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      fe2f74af
  2. 18 5月, 2017 10 次提交
    • S
      Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging · 56821559
      Stefan Hajnoczi 提交于
      HMP pull
      
      # gpg: Signature made Wed 17 May 2017 07:03:39 PM BST
      # gpg:                using RSA key 0x0516331EBC5BFDE7
      # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7
      
      * dgilbert/tags/pull-hmp-20170517:
        ramblock: add new hmp command "info ramblock"
        utils: provide size_to_str()
        ramblock: add RAMBLOCK_FOREACH()
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      56821559
    • S
      Merge remote-tracking branch 'quintela/tags/migration/20170517' into staging · 2ccbd47c
      Stefan Hajnoczi 提交于
      migration/next for 20170517
      
      # gpg: Signature made Wed 17 May 2017 11:46:36 AM BST
      # gpg:                using RSA key 0xF487EF185872D723
      # gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
      # gpg:                 aka "Juan Quintela <quintela@trasno.org>"
      # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723
      
      * quintela/tags/migration/20170517:
        migration: Move check_migratable() into qdev.c
        migration: Move postcopy stuff to postcopy-ram.c
        migration: Move page_cache.c to migration/
        migration: Create migration/blocker.h
        ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO
        migration: Pass Error ** argument to {save,load}_vmstate
        migration: Fix regression with compression threads
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2ccbd47c
    • S
      Merge remote-tracking branch 'mst/tags/for_upstream' into staging · adb354dd
      Stefan Hajnoczi 提交于
      pci, virtio, vhost: fixes
      
      A bunch of fixes that missed the release.
      Most notably we are reverting shpc back to enabled by default state
      as guests uses that as an indicator that hotplug is supported
      (even though it's unused). Unfortunately we can't fix this
      on the stable branch since that would break migration.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      
      # gpg: Signature made Wed 17 May 2017 10:42:06 PM BST
      # gpg:                using RSA key 0x281F0DB8D28D5469
      # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
      # gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
      # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
      #      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469
      
      * mst/tags/for_upstream:
        exec: abstract address_space_do_translate()
        pci: deassert intx when pci device unrealize
        virtio: allow broken device to notify guest
        Revert "hw/pci: disable pci-bridge's shpc by default"
        acpi-defs: clean up open brace usage
        ACPI: don't call acpi_pcihp_device_plug_cb on xen
        iommu: Don't crash if machine is not PC_MACHINE
        pc: add 2.10 machine type
        pc/fwcfg: unbreak migration from qemu-2.5 and qemu-2.6 during firmware boot
        libvhost-user: fix crash when rings aren't ready
        hw/virtio: fix vhost user fails to startup when MQ
        hw/arm/virt: generate 64-bit addressable ACPI objects
        hw/acpi-defs: replace leading X with x_ in FADT field names
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      adb354dd
    • P
      exec: abstract address_space_do_translate() · a764040c
      Peter Xu 提交于
      This function is an abstraction helper for address_space_translate() and
      address_space_get_iotlb_entry(). It does the lookup of address into
      memory region section, then does proper IOMMU translation if necessary.
      Refactor the two existing functions to use it.
      
      This fixes vhost when IOMMU is disabled by guest.
      Tested-by: NMaxime Coquelin <maxime.coquelin@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a764040c
    • H
      pci: deassert intx when pci device unrealize · 3936161f
      Herongguang (Stephen) 提交于
      If a pci device is not reset by VM (by writing into config space)
      and unplugged by VM, after that when VM reboots, qemu may assert:
      pcibus_reset: Assertion `bus->irq_count[i] == 0' failed
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: Nherongguang <herongguang.he@huawei.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      3936161f
    • G
      virtio: allow broken device to notify guest · 66453cff
      Greg Kurz 提交于
      According to section 2.1.2 of the virtio-1 specification:
      
      "The device SHOULD set DEVICE_NEEDS_RESET when it enters an error state that
      a reset is needed. If DRIVER_OK is set, after it sets DEVICE_NEEDS_RESET,
      the device MUST send a device configuration change notification to the
      driver."
      
      Commit "f5ed3663 virtio: stop virtqueue processing if device is broken"
      introduced a virtio_error() call that just does that:
      
      - internally mark the device as broken
      - set the DEVICE_NEEDS_RESET bit in the status
      - send a configuration change notification
      
      Unfortunately, virtio_notify_vector(), called by virtio_notify_config(),
      returns right away when the device is marked as broken and the notification
      isn't sent in this case.
      
      The spec doesn't say whether a broken device can send notifications
      in other situations or not. But since the driver isn't supposed to do
      anything but to reset the device, it makes sense to keep the check in
      virtio_notify_config().
      
      Marking the device as broken AFTER the configuration change notification was
      sent is enough to fix the issue.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      66453cff
    • M
      Revert "hw/pci: disable pci-bridge's shpc by default" · 2fa35662
      Marcel Apfelbaum 提交于
      This reverts commit dc0ae767.
      
      Disabling the shpc controller has an undesired side effect.
      The PCI bridge remains with no attached devices at boot time,
      and the guest operating systems do not allocate any resources
      for it, leaving the bridge unusable. Note that the behaviour
      is dictated by the pci bridge specification.
      
      Revert the commit and leave the shpc controller even if is not
      actually used by any architecture. Slot 0 remains unusable at boot time.
      
      Keep shpc off for QEMU 2.9 machines.
      Signed-off-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      2fa35662
    • P
      ramblock: add new hmp command "info ramblock" · be9b23c4
      Peter Xu 提交于
      To dump information about ramblocks. It looks like:
      
      (qemu) info ramblock
                    Block Name    PSize              Offset               Used              Total
                  /objects/mem    2 MiB  0x0000000000000000 0x0000000080000000 0x0000000080000000
                      vga.vram    4 KiB  0x0000000080060000 0x0000000001000000 0x0000000001000000
          /rom@etc/acpi/tables    4 KiB  0x00000000810b0000 0x0000000000020000 0x0000000000200000
                       pc.bios    4 KiB  0x0000000080000000 0x0000000000040000 0x0000000000040000
        0000:00:03.0/e1000.rom    4 KiB  0x0000000081070000 0x0000000000040000 0x0000000000040000
                        pc.rom    4 KiB  0x0000000080040000 0x0000000000020000 0x0000000000020000
          0000:00:02.0/vga.rom    4 KiB  0x0000000081060000 0x0000000000010000 0x0000000000010000
         /rom@etc/table-loader    4 KiB  0x00000000812b0000 0x0000000000001000 0x0000000000001000
            /rom@etc/acpi/rsdp    4 KiB  0x00000000812b1000 0x0000000000001000 0x0000000000001000
      
      Ramblock is something hidden internally in QEMU implementation, and this
      command should only be used by mostly QEMU developers on RAM stuff. It
      is not a command suitable for QMP interface. So only HMP interface is
      provided for it.
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <1494562661-9063-4-git-send-email-peterx@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      be9b23c4
    • P
      utils: provide size_to_str() · 22951aaa
      Peter Xu 提交于
      Moving the algorithm from print_type_size() into size_to_str() so that
      other component can also leverage it. With that, refactor
      print_type_size().
      
      The assert() in that logic is removed though, since even UINT64_MAX
      would not overflow.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <1494562661-9063-3-git-send-email-peterx@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      22951aaa
    • P
      ramblock: add RAMBLOCK_FOREACH() · 99e15582
      Peter Xu 提交于
      So that it can simplifies the iterators.
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <1494562661-9063-2-git-send-email-peterx@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      99e15582
  3. 17 5月, 2017 23 次提交
    • S
      Merge remote-tracking branch 'ehabkost/tags/x86-and-machine-pull-request' into staging · 897eee24
      Stefan Hajnoczi 提交于
      x86 and machine queue, 2017-05-17
      
      # gpg: Signature made Wed 17 May 2017 02:37:54 PM BST
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * ehabkost/tags/x86-and-machine-pull-request: (22 commits)
        tests: Add [+-]feature and feature=on|off test cases
        s390-pcibus: No need to set user_creatable=false explicitly
        xen-sysdev: Remove user_creatable flag
        virtio-mmio: Remove user_creatable flag
        sysbus-ohci: Remove user_creatable flag
        hpet: Remove user_creatable flag
        generic-sdhci: Remove user_creatable flag
        esp: Remove user_creatable flag
        fw_cfg: Remove user_creatable flag
        unimplemented-device: Remove user_creatable flag
        isabus-bridge: Remove user_creatable flag
        allwinner-ahci: Remove user_creatable flag
        sysbus-ahci: Remove user_creatable flag
        kvmvapic: Remove user_creatable flag
        ioapic: Remove user_creatable flag
        kvmclock: Remove user_creatable flag
        pflash_cfi01: Remove user_creatable flag
        fdc: Remove user_creatable flag from sysbus-fdc & SUNW,fdtwo
        iommu: Remove FIXME comment about user_creatable=true
        xen-backend: Remove FIXME comment about user_creatable flag
        ...
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      897eee24
    • E
      tests: Add [+-]feature and feature=on|off test cases · 17e8f541
      Eduardo Habkost 提交于
      Add test code to ensure features are enabled/disabled correctly in the
      command-line. The test case use the "feature-words" and
      "filtered-features" properties to check if the features were
      enabled/disabled correctly.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170508183205.10884-1-ehabkost@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      17e8f541
    • E
      s390-pcibus: No need to set user_creatable=false explicitly · 8ae5059d
      Eduardo Habkost 提交于
      TYPE_S390_PCI_HOST_BRIDGE is a subclass of TYPE_PCI_HOST_BRIDGE,
      which is a subclass of TYPE_SYS_BUS_DEVICE. TYPE_SYS_BUS_DEVICE
      already sets user_creatable=false, so we don't require an
      explicit user_creatable=false assignment in
      s390_pcihost_class_init().
      
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Frank Blaschka <frank.blaschka@de.ibm.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Pierre Morel <pmorel@linux.vnet.ibm.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Thomas Huth <thuth@redhat.com>
      Cc: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
      Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-22-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      8ae5059d
    • E
      xen-sysdev: Remove user_creatable flag · 74c505c6
      Eduardo Habkost 提交于
      TYPE_XENSYSDEV is only used internally by xen_be_init(), and is
      not supposed to be plugged/unplugged dynamically. Remove the
      user_creatable flag from the device class.
      
      Cc: Juergen Gross <jgross@suse.com>,
      Cc: Peter Maydell <peter.maydell@linaro.org>,
      Cc: Thomas Huth <thuth@redhat.com>
      Cc: sstabellini@kernel.org
      Cc: Markus Armbruster <armbru@redhat.com>,
      Cc: Marcel Apfelbaum <marcel@redhat.com>,
      Cc: Laszlo Ersek <lersek@redhat.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-21-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      74c505c6
    • E
      virtio-mmio: Remove user_creatable flag · ae3ac6ca
      Eduardo Habkost 提交于
      virtio-mmio needs to be wired and mapped by other device or board
      code, and won't work with -device. Remove the user_creatable flag
      from the device class.
      
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Shannon Zhao <zhaoshenglong@huawei.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-20-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      ae3ac6ca
    • E
      sysbus-ohci: Remove user_creatable flag · 8f04d26a
      Eduardo Habkost 提交于
      sysbus-ohci needs to be mapped and wired by device or board code,
      and won't work with -device. Remove the user_creatable flag from
      the device class.
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-19-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      8f04d26a
    • E
      hpet: Remove user_creatable flag · cae9d4cd
      Eduardo Habkost 提交于
      hpet needs to be mapped and wired by the board code and won't
      work with -device. Remove the user_creatable flag from the device
      class.
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-18-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      cae9d4cd
    • E
      generic-sdhci: Remove user_creatable flag · bdbae0ef
      Eduardo Habkost 提交于
      generic-sdhci needs to be wired by other devices' code, so it
      can't be used with -device. Remove the user_creatable flag from
      the device class.
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Prasad J Pandit <pjp@fedoraproject.org>
      Cc: Alistair Francis <alistair.francis@xilinx.com>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-17-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      bdbae0ef
    • E
      esp: Remove user_creatable flag · f4afad38
      Eduardo Habkost 提交于
      esp devices aren't going to work with -device, as they need IRQs
      to be connected and mmio to be mapped (this is done by
      esp_init()). Remove the user_creatable flag from the device
      class.
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-16-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      f4afad38
    • E
      fw_cfg: Remove user_creatable flag · 731fec79
      Eduardo Habkost 提交于
      fw_cfg won't work with -device, as:
      * fw_cfg_init1() won't get called for the device;
      * The device won't appear at /machine/fw_cfg, and won't work with
        the -fw_cfg command-line option.
      
      Remove the user_creatable flag from the device class.
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Gabriel L. Somlo <somlo@cmu.edu>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-15-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      731fec79
    • E
      unimplemented-device: Remove user_creatable flag · 68aecefc
      Eduardo Habkost 提交于
      unimplemented-device needs to be created and mapped using
      create_unimplemented_device() (or equivalent code), and won't
      work with -device. Remove the user_creatable flag from the device
      class.
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-14-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      68aecefc
    • E
      isabus-bridge: Remove user_creatable flag · 0980a1c0
      Eduardo Habkost 提交于
      isabus-bridge needs to be created by isa_bus_new(), and won't
      work with -device, as it won't create the TYPE_ISA_BUS bus
      itself. Remove the user_creatable flag from the device class.
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-13-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      0980a1c0
    • E
      allwinner-ahci: Remove user_creatable flag · c803129c
      Eduardo Habkost 提交于
      allwinner-ahci needs its IRQ to be connected and mmio to be
      mapped (this is done by the alwinner-a10 device realize method),
      and won't work with -device. Remove the user_creatable flag from
      the device class.
      
      Cc: John Snow <jsnow@redhat.com>
      Cc: qemu-block@nongnu.org
      Cc: Beniamino Galvani <b.galvani@gmail.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: qemu-arm@nongnu.org
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Acked-by: NJohn Snow <jsnow@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-12-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      c803129c
    • E
      sysbus-ahci: Remove user_creatable flag · a081ab8f
      Eduardo Habkost 提交于
      The sysbus-ahci devices are supposed to be created and wired by
      code from other devices, like calxeda_init() and
      xlnx_zynqmp_realize(), and won't work with -device. Remove the
      user_creatable flag from the device class.
      
      Cc: John Snow <jsnow@redhat.com>
      Cc: qemu-block@nongnu.org
      Cc: Rob Herring <robh@kernel.org>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Alistair Francis <alistair.francis@xilinx.com>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Acked-by: NJohn Snow <jsnow@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-11-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      a081ab8f
    • E
      kvmvapic: Remove user_creatable flag · 040e9968
      Eduardo Habkost 提交于
      The kvmvapic device is only usable when created by
      apic_common_realize(), not using -device. Remove the
      user_creatable flag from the device class.
      
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-10-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      040e9968
    • E
      ioapic: Remove user_creatable flag · 6c4672ca
      Eduardo Habkost 提交于
      An ioapic device is already created by the q35 initialization
      code, and using "-device ioapic" or "-device kvm-ioapic" will
      always fail with "Only 1 ioapics allowed". Remove the
      user_creatable flag from the ioapic device classes.
      
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-9-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      6c4672ca
    • E
      kvmclock: Remove user_creatable flag · 642c1e05
      Eduardo Habkost 提交于
      kvmclock should be used by guests only when the appropriate CPUID
      feature flags are set on the VCPU, and it is automatically
      created by kvmclock_create() when those feature flags are set.
      This means creating a kvmclock device using -device is useless.
      Remove user_creatable from its device class.
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Thomas Huth <thuth@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-8-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      642c1e05
    • E
      pflash_cfi01: Remove user_creatable flag · c1ce65f7
      Eduardo Habkost 提交于
      TYPE_CFI_PFLASH01 devices need to be mapped by
      pflash_cfi01_register() (or equivalent) and can't be used with
      -device. Remove user_creatable from the device class.
      
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Cc: qemu-block@nongnu.org
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-7-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      c1ce65f7
    • E
      fdc: Remove user_creatable flag from sysbus-fdc & SUNW,fdtwo · 8ca97a1f
      Eduardo Habkost 提交于
      sysbus-fdc and SUNW,fdtwo devices need IRQs to be wired and mmio
      to be mapped, and can't be used with -device. Unset
      user_creatable on their device classes.
      
      Cc: John Snow <jsnow@redhat.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Cc: qemu-block@nongnu.org
      Cc: Thomas Huth <thuth@redhat.com>
      Acked-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-6-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      8ca97a1f
    • E
      iommu: Remove FIXME comment about user_creatable=true · 8ab5700c
      Eduardo Habkost 提交于
      amd-iommu and intel-iommu are really meant to be used with
      -device, so they need user_creatable=true. Remove the FIXME
      comment.
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-5-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      8ab5700c
    • E
      xen-backend: Remove FIXME comment about user_creatable flag · 950b31dd
      Eduardo Habkost 提交于
      xen-backend can be plugged/unplugged dynamically when using the
      Xen accelerator, so keep the user_creatable flag on the device
      class and remove the FIXME comment.
      
      Cc: Juergen Gross <jgross@suse.com>,
      Cc: Peter Maydell <peter.maydell@linaro.org>,
      Cc: Thomas Huth <thuth@redhat.com>
      Cc: sstabellini@kernel.org
      Cc: Markus Armbruster <armbru@redhat.com>,
      Cc: Marcel Apfelbaum <marcel@redhat.com>,
      Cc: Laszlo Ersek <lersek@redhat.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-4-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      950b31dd
    • E
      sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE · e4f4fb1e
      Eduardo Habkost 提交于
      commit 33cd52b5 unset
      cannot_instantiate_with_device_add_yet in TYPE_SYSBUS, making all
      sysbus devices appear on "-device help" and lack the "no-user"
      flag in "info qdm".
      
      To fix this, we can set user_creatable=false by default on
      TYPE_SYS_BUS_DEVICE, but this requires setting
      user_creatable=true explicitly on the sysbus devices that
      actually work with -device.
      
      Fortunately today we have just a few has_dynamic_sysbus=1
      machines: virt, pc-q35-*, ppce500, and spapr.
      
      virt, ppce500, and spapr have extra checks to ensure just a few
      device types can be instantiated:
      
      * virt supports only TYPE_VFIO_CALXEDA_XGMAC, TYPE_VFIO_AMD_XGBE.
      * ppce500 supports only TYPE_ETSEC_COMMON.
      * spapr supports only TYPE_SPAPR_PCI_HOST_BRIDGE.
      
      This patch sets user_creatable=true explicitly on those 4 device
      classes.
      
      Now, the more complex cases:
      
      pc-q35-*: q35 has no sysbus device whitelist yet (which is a
      separate bug). We are in the process of fixing it and building a
      sysbus whitelist on q35, but in the meantime we can fix the
      "-device help" and "info qdm" bugs mentioned above. Also, despite
      not being strictly necessary for fixing the q35 bug, reducing the
      list of user_creatable=true devices will help us be more
      confident when building the q35 whitelist.
      
      xen: We also have a hack at xen_set_dynamic_sysbus(), that sets
      has_dynamic_sysbus=true at runtime when using the Xen
      accelerator. This hack is only used to allow xen-backend devices
      to be dynamically plugged/unplugged.
      
      This means today we can use -device with the following 22 device
      types, that are the ones compiled into the qemu-system-x86_64 and
      qemu-system-i386 binaries:
      
      * allwinner-ahci
      * amd-iommu
      * cfi.pflash01
      * esp
      * fw_cfg_io
      * fw_cfg_mem
      * generic-sdhci
      * hpet
      * intel-iommu
      * ioapic
      * isabus-bridge
      * kvmclock
      * kvm-ioapic
      * kvmvapic
      * SUNW,fdtwo
      * sysbus-ahci
      * sysbus-fdc
      * sysbus-ohci
      * unimplemented-device
      * virtio-mmio
      * xen-backend
      * xen-sysdev
      
      This patch adds user_creatable=true explicitly to those devices,
      temporarily, just to keep 100% compatibility with existing
      behavior of q35. Subsequent patches will remove
      user_creatable=true from the devices that are really not meant to
      user-creatable on any machine, and remove the FIXME comment from
      the ones that are really supposed to be user-creatable. This is
      being done in separate patches because we still don't have an
      obvious list of devices that will be whitelisted by q35, and I
      would like to get each device reviewed individually.
      
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Alex Williamson <alex.williamson@redhat.com>
      Cc: Alistair Francis <alistair.francis@xilinx.com>
      Cc: Beniamino Galvani <b.galvani@gmail.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Frank Blaschka <frank.blaschka@de.ibm.com>
      Cc: Gabriel L. Somlo <somlo@cmu.edu>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: John Snow <jsnow@redhat.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Pierre Morel <pmorel@linux.vnet.ibm.com>
      Cc: Prasad J Pandit <pjp@fedoraproject.org>
      Cc: qemu-arm@nongnu.org
      Cc: qemu-block@nongnu.org
      Cc: qemu-ppc@nongnu.org
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Shannon Zhao <zhaoshenglong@huawei.com>
      Cc: sstabellini@kernel.org
      Cc: Thomas Huth <thuth@redhat.com>
      Cc: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
      Acked-by: NJohn Snow <jsnow@redhat.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-3-ehabkost@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [ehabkost: Small changes at sysbus_device_class_init() comments]
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      e4f4fb1e
    • E
      qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable · e90f2a8c
      Eduardo Habkost 提交于
      cannot_instantiate_with_device_add_yet was introduced by commit
      efec3dd6 to replace no_user. It was
      supposed to be a temporary measure.
      
      When it was introduced, we had 54
      cannot_instantiate_with_device_add_yet=true lines in the code.
      Today (3 years later) this number has not shrunk: we now have
      57 cannot_instantiate_with_device_add_yet=true lines. I think it
      is safe to say it is not a temporary measure, and we won't see
      the flag go away soon.
      
      Instead of a long field name that misleads people to believe it
      is temporary, replace it a shorter and less misleading field:
      user_creatable.
      
      Except for code comments, changes were generated using the
      following Coccinelle patch:
      
        @@
        expression DC;
        @@
        (
        -DC->cannot_instantiate_with_device_add_yet = false;
        +DC->user_creatable = true;
        |
        -DC->cannot_instantiate_with_device_add_yet = true;
        +DC->user_creatable = false;
        )
      
        @@
        typedef ObjectClass;
        expression dc;
        identifier class, data;
        @@
         static void device_class_init(ObjectClass *class, void *data)
         {
         ...
         dc->hotpluggable = true;
        +dc->user_creatable = true;
         ...
         }
      
        @@
        @@
         struct DeviceClass {
         ...
        -bool cannot_instantiate_with_device_add_yet;
        +bool user_creatable;
         ...
        }
      
        @@
        expression DC;
        @@
        (
        -!DC->cannot_instantiate_with_device_add_yet
        +DC->user_creatable
        |
        -DC->cannot_instantiate_with_device_add_yet
        +!DC->user_creatable
        )
      
      Cc: Alistair Francis <alistair.francis@xilinx.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Thomas Huth <thuth@redhat.com>
      Acked-by: NAlistair Francis <alistair.francis@xilinx.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170503203604.31462-2-ehabkost@redhat.com>
      [ehabkost: kept "TODO remove once we're there" comment]
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      e90f2a8c