1. 05 3月, 2019 3 次提交
    • C
      qemu: Support rng model=virtio-{non-}transitional · e0637075
      Cole Robinson 提交于
      Add new <rng> model values for virtio transitional devices. Ex:
      
        <rng model='virtio-transitional'>
          ...
        </rng>
      
      * "virtio-transitional" maps to qemu "virtio-rng-pci-transitional"
      * "virtio-non-transitional" maps to qemu "virtio-rng-pci-non-transitional"
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      e0637075
    • C
      conf: Add <hostdev model='virtio-{non-}transitional'/> · ef41ff42
      Cole Robinson 提交于
      qemu vhost-scsi devices map to XML roughly like:
      
          <hostdev mode='subsystem' type='scsi_host'>
            <source protocol='vhost' wwpn=X/>
          </hostdev>
      
      To support vhost-scsi-pci-{non-}traditional in qemu, we
      need to to extend the SCSI Host hostdev XML to handle
      model= value. This matches the XML model= format used
      for mediated devices. This is just the domain_conf bits
      and some XML test cases.
      
      Use of virtio-X naming here does not match the hostdev
      protocol=vhost nor does it match the qemu vhost-X device
      naming, however it's more consistent with all other
      model= names in this area, and also matches the
      inconsistency of <vsock> devices which use model=virtio
      but map to vhost-vsock on the qemu commandline
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      ef41ff42
    • C
      conf: Add <disk model='virtio-{non-}transitional'/> · 25d05051
      Cole Robinson 提交于
      <disk> devices lack the model= attribute which is used by
      most other device types. bus= mostly acts as one, but it
      serves other purposes too like determing what target=
      prefix to use, and for matching against controller type=
      values.
      
      Extending bus= to handle additional virtio transitional
      devices will complicate apps lives, and it isn't a clean
      mapping anyways. So let's bite the bullet and add a new
      <disk model=X/> attribute, and wire up common handling
      for virtio and virtio-{non-}transitional
      Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      25d05051
  2. 25 2月, 2019 1 次提交
  3. 24 2月, 2019 1 次提交
  4. 20 2月, 2019 1 次提交
    • E
      domain: Fix unknown flags diagnosis in virDomainGetXMLDesc · 27c8fd74
      Eric Blake 提交于
      Many drivers had a comment that they did not validate the incoming
      'flags' to virDomainGetXMLDesc() because they were relying on
      virDomainDefFormat() to do it instead. This used to be the case
      (at least since 461e0f1a and friends in 0.9.4 added unknown flag
      checking in general), but regressed in commit 0ecd6851 (1.2.12),
      when all of the drivers were changed to pass 'flags' through the
      new helper virDomainDefFormatConvertXMLFlags(). Since this helper
      silently ignores unknown flags, we need to implement flag checking
      in each driver instead.
      
      Annoyingly, this means that any new flag values added will silently
      be ignored when targeting an older libvirt, rather than our usual
      practice of loudly diagnosing an unsupported flag.  Add comments
      in domain_conf.[ch] to remind us to be extra vigilant about the
      impact when adding flags (a new flag to add data is safe if the
      older server omitting the requested data doesn't break things in
      the newer client; a new flag to suppress data rather than enhancing
      the existing VIR_DOMAIN_XML_SECURE may form a data leak or even a
      security hole).
      
      In the qemu driver, there are multiple callers all funnelling to
      qemuDomainDefFormatBufInternal(); many of them already validated
      flags (and often only a subset of the full set of possible flags),
      but for ease of maintenance, we can also check flags at the common
      helper function.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      27c8fd74
  5. 04 2月, 2019 1 次提交
  6. 25 1月, 2019 2 次提交
  7. 22 1月, 2019 2 次提交
  8. 02 1月, 2019 3 次提交
  9. 14 12月, 2018 2 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  10. 03 12月, 2018 2 次提交
  11. 28 11月, 2018 1 次提交
  12. 27 11月, 2018 1 次提交
  13. 16 11月, 2018 1 次提交
    • M
      qemu: add memfd source type · 24b74d18
      Marc-André Lureau 提交于
      Add a new memoryBacking source type "memfd", supported by QEMU (when
      the capability is available).
      
      A memfd is a specialized anonymous memory kind. As such, an anonymous
      source type could be automatically using a memfd. However, there are
      some complications when migrating from different memory backends in
      qemu (mainly due to the internal object naming at this point, but
      there could be more). For now, it is simpler and safer to simply
      introduce a new source type "memfd". Eventually, the "anonymous" type
      could learn to use memfd transparently in a separate change.
      
      The main benefits are that it doesn't need to create filesystem files,
      and it also enforces sealing, providing a bit more safety.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      24b74d18
  14. 15 11月, 2018 3 次提交
  15. 07 9月, 2018 1 次提交
  16. 04 9月, 2018 2 次提交
  17. 28 8月, 2018 1 次提交
    • A
      qemu: Introduce 16550A serial console model · 9610eaa4
      Andrea Bolognani 提交于
      None of the existing models is suitable for use with
      RISC-V virt guests, and we don't want information about
      the serial console to be missing from the XML.
      
      The name is based on comments in qemu/hw/riscv/virt.c:
      
        RISC-V machine with 16550a UART and VirtIO MMIO
      
      and in qemu/hw/char/serial.c:
      
        QEMU 16550A UART emulation
      
      along with the output of dmesg in the guest:
      
        Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
        10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 13,
          base_baud= 230400) is a 16550A
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      9610eaa4
  18. 21 8月, 2018 1 次提交
  19. 17 8月, 2018 3 次提交
  20. 14 8月, 2018 1 次提交
  21. 26 7月, 2018 2 次提交
  22. 19 7月, 2018 4 次提交
    • E
      conf: Introduce new video type 'none' · d48813e8
      Erik Skultety 提交于
      Historically, we've always enabled an emulated video device every time we
      see that graphics should be supported with a guest. With the appearance
      of mediated devices which can support QEMU's vfio-display capability,
      users might want to use such a device as the only video device.
      Therefore introduce a new, effectively a 'disable', type for video
      device.
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      d48813e8
    • E
      conf: Introduce new <hostdev> attribute 'display' · d54e45b6
      Erik Skultety 提交于
      QEMU 2.12 introduced a new type of display for mediated devices using
      vfio-pci backend which allows a mediated device to be used as a VGA
      compatible device as an alternative to an emulated video device. QEMU
      exposes this feature via a vfio device property 'display' with supported
      values 'on/off/auto' (libvirt will default to 'off').
      
      This patch adds the necessary bits to domain config handling in order to
      expose this feature. Since there's no convenient way for libvirt to come
      up with usable defaults for the display setting, simply because libvirt
      is not able to figure out which of the display implementations - dma-buf
      which requires OpenGL support vs vfio regions which doesn't need OpenGL
      (works with OpenGL enabled too) - the underlying mdev uses.
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      d54e45b6
    • E
      conf: Introduce virDomainGraphicsDefHasOpenGL helper · 42532918
      Erik Skultety 提交于
      A simple helper which will loop through all the graphics elements and
      checks whether at least one of them enables OpenGL support, either by
      containing <gl enable='yes'/> or being of type 'egl-headless'.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      Acked-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      42532918
    • E
      qemu: Introduce a new graphics display type 'headless' · d8266ebe
      Erik Skultety 提交于
      Since 2.10 QEMU supports a new display type egl-headless which uses the
      drm nodes for OpenGL rendering copying back the rendered bits back to
      QEMU into a dma-buf which can be accessed by standard "display" apps
      like VNC or SPICE. Although this display type can be used on its own,
      for any practical use case it makes sense to pair it with either VNC or
      SPICE display. The clear benefit of this display is that VNC gains
      OpenGL support, which it natively doesn't have, and SPICE gains remote
      OpenGL support (native OpenGL support only works locally through a UNIX
      socket, i.e. listen type=socket/none).
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      d8266ebe
  23. 10 7月, 2018 1 次提交