1. 03 4月, 2017 1 次提交
    • M
      virGetDomain: Set domain ID too · 5683b213
      Michal Privoznik 提交于
      So far our code is full of the following pattern:
      
        dom = virGetDomain(conn, name, uuid)
        if (dom)
            dom->id = 42;
      
      There is no reasong why it couldn't be just:
      
        dom = virGetDomain(conn, name, uuid, id);
      
      After all, client domain representation consists of tuple (name,
      uuid, id).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5683b213
  2. 27 3月, 2017 3 次提交
    • M
      Remove src/nodeinfo · 26ae4e48
      Martin Kletzander 提交于
      There is no "node driver" as there was before, drivers have to do
      their own ACL checking anyway, so they all specify their functions and
      nodeinfo is basically just extending conf/capablities.  Hence moving
      the code to src/conf/ is the right way to go.
      
      Also that way we can de-duplicate some code that is in virsysfs and/or
      virhostcpu that got duplicated during the virhostcpu.c split.  And
      Some cleanup is done throughout the changes, like adding the vir*
      prefix etc.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      26ae4e48
    • M
      Move src/fdstream to src/util/virfdstream · bdcb1995
      Martin Kletzander 提交于
      There is no reason for it not to be in the utils, all global symbols
      under that file already have prefix vir* and there is no reason for it
      to be part of DRIVER_SOURCES because that is just a leftover from
      older days (pre-driver modules era, I believe).
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      bdcb1995
    • M
      Introduce virCPUProbeHost · 272d78a5
      Martin Kletzander 提交于
      Both QEMU and bhyve are using the same function for setting up the CPU
      in virCapabilities, so de-duplicate it, save code and time, and help
      other drivers adopt it.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      272d78a5
  3. 26 3月, 2017 3 次提交
    • R
      bhyve: add xhci tablet support · daecaea0
      Roman Bogorodskiy 提交于
      Along with video and VNC support, bhyve has introduced USB tablet
      support as an input device. This tablet is exposed to a guest
      as a device on an XHCI controller.
      
      At present, tablet is the only supported device on the XHCI controller
      in bhyve, so to make things simple, it's allowed to only have a
      single XHCI controller with a single tablet device.
      
      In detail, this commit:
      
       - Introduces a new capability bit for XHCI support in bhyve
       - Adds an XHCI controller and tabled support with 1:1 mapping
         between them
       - Adds a couple of unit tests
      daecaea0
    • R
      bhyve: helper function to probe hypervisor caps · 9bf6b9df
      Roman Bogorodskiy 提交于
      There are a number of functions in bhyve_capabilities.c that probe
      hypervisor capabilities by executing the bhyve(1) binary with the
      specific device arugment, checking error message (if any) and setting
      proper capability bit. As those are extremely similar, move this logic
      into a helper function and convert existing functions to use that.
      9bf6b9df
    • R
      domaincapstest: add bhyve caps test · 74cfb5bb
      Roman Bogorodskiy 提交于
       * Extract filling bhyve capabilities from virBhyveDomainCapsBuild()
         into a new function virBhyveDomainCapsFill() to make testing
         easier by not having to mock firmware directory listing and
         hypervisor capabilities probing
       * Also, just presence of the firmware files is not sufficient
         to enable os.loader.supported, hypervisor should support UEFI
         boot too
       * Add tests to domaincapstest for the main caps possible flows:
          - when UEFI bootrom is supported
          - when video (fbus) is supported
          - neither of above is supported
      74cfb5bb
  4. 15 3月, 2017 1 次提交
    • R
      bhyve: add config file support · 32b67545
      Roman Bogorodskiy 提交于
      Introduce config file support for the bhyve driver. The only available
      setting at present is 'firmware_dir' for specifying a directory with
      UEFI firmware files.
      32b67545
  5. 14 3月, 2017 3 次提交
  6. 12 3月, 2017 4 次提交
    • F
      bhyve: add video support · 04664327
      Fabian Freyer 提交于
      bhyve supports 'gop' video device that allows clients to connect
      to VMs using VNC clients. This commit adds support for that to
      the bhyve driver:
      
       - Introducr 'gop' video device type
       - Add capabilities probing for the 'fbuf' device that's
         responsible for graphics
       - Update command builder routines to let users configure
         domain's VNC via gop graphics.
      Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
      04664327
    • F
      bhyve: enumerate UEFI firmwares · 58b49d0c
      Fabian Freyer 提交于
      Extend domain capabilities XML with the information about
      available UEFI firmware files. It searches in the location
      that the sysutils/bhyve-firmware FreeBSD port installs
      files to.
      Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
      58b49d0c
    • F
      bhyve: add support for booting from UEFI · d3b9a611
      Fabian Freyer 提交于
      Allow to boot using UEFI rather than using an external boot loader
      such as bhyveload or grub-bhyve.
      
      Also, make LPC PCI-ISA bridge handling more flexible as now it's
      needed not only for serial ports, but for bootrom as well.
      Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
      d3b9a611
    • F
      bhyve: virBhyveProbeCaps: BHYVE_CAP_LPC_BOOTROM · b6ae1295
      Fabian Freyer 提交于
      Implement the BHACE_CAP_LPC_BOOTROM capability by checking the stderr
      output of 'bhyve -l bootrom'. If the bootrom option is unsupported, this
      will contain the following output:
      
          bhyve: invalid lpc device configuration 'bootrom'
      
      On newer bhyve versions that do support specifying a bootrom image, the
      standard help will be printed.
      b6ae1295
  7. 24 2月, 2017 1 次提交
  8. 11 2月, 2017 1 次提交
    • R
      bhyve: add e1000 nic support · 5620c609
      Roman Bogorodskiy 提交于
      Recently e1000 NIC support was added to bhyve; implement that in
      the bhyve driver:
      
       - Add capability check by analyzing output of the 'bhyve -s 0,e1000'
         command
       - Modify bhyveBuildNetArgStr() to support e1000 and also pass
         virConnectPtr so it could call bhyveDriverGetCaps() to check if this
         NIC is supported
       - Modify command parsing code to add support for e1000 and adjust tests
       - Add net-e1000 test
      5620c609
  9. 08 2月, 2017 1 次提交
    • L
      util: add MTU arg to virNetDevTapCreateInBridgePort() · dd8ac030
      Laine Stump 提交于
      virNetDevTapCreateInBridgePort() has always set the new tap device to
      the current MTU of the bridge it's being attached to. There is one
      case where we will want to set the new tap device to a different
      (usually larger) MTU - if that's done with the very first device added
      to the bridge, the bridge's MTU will be set to the device's MTU. This
      patch allows for that possibility by adding "int mtu" to the arg list
      for virNetDevTapCreateInBridgePort(), but all callers are sending -1,
      so it doesn't yet have any effect.
      
      Since the requested MTU isn't necessarily what is used in the end (for
      example, if there is no MTU requested, the tap device will be set to
      the current MTU of the bridge), and the hypervisor may want to know
      the actual MTU used, we also return the actual MTU to the caller (if
      actualMTU is non-NULL).
      dd8ac030
  10. 07 2月, 2017 1 次提交
    • R
      bhyve: fix virtio disk addresses · 66c21aee
      Roman Bogorodskiy 提交于
      Like it usually happens, I fixed one thing and broke another:
      in 803966c7 address allocation was fixed for SATA disks, but
      broke that for virtio disks, because it dropped disk address
      assignment completely. It's not needed for SATA disks anymore,
      but still needed for the virtio ones.
      
      Bring that back and add a couple of tests to make sure it won't
      happen again.
      66c21aee
  11. 31 1月, 2017 3 次提交
    • R
      bhyve: fix SATA address allocation · 803966c7
      Roman Bogorodskiy 提交于
      As bhyve for a long time didn't have a notion of the explicit SATA
      controller and created a controller for each drive, the bhyve driver
      in libvirt acted in a similar way and didn't care about the SATA
      controllers and assigned PCI addresses to drives directly, as
      the generated command will look like this anyway:
      
       2:0,ahci-hd,somedisk.img
      
      This no longer makes sense because:
      
       1. After commit c07d1c1c it's not possible to assign
          PCI addresses to disks
       2. Bhyve now supports multiple disk drives for a controller,
          so it's going away from 1:1 controller:disk mapping, so
          the controller object starts to make more sense now
      
      So, this patch does the following:
      
       - Assign PCI address to SATA controllers (previously we didn't do this)
       - Assign disk addresses instead of PCI addresses for disks. Now, when
         building a bhyve command, we take PCI address not from the disk
         itself but from its controller
       - Assign addresses at XML parsing time using the
         assignAddressesCallback. This is done mainly for being able to
         verify address allocation via xml2xml tests
       - Adjust existing bhyvexml2{xml,argv} tests to chase the new
         address allocation
      
      This patch is largely based on work of Fabian Freyer.
      803966c7
    • R
      bhyve: add virBhyveDriverCreateXMLConf · 13a050b2
      Roman Bogorodskiy 提交于
      Add virBhyveDriverCreateXMLConf, a simple wrapper around
      virDomainXMLOptionNew that makes it easier to pass bhyveConnPtr
      as a private data for parser. It will be used later for device
      address allocation at parsing time.
      
      Update consumers to use it instead of direct calls to
      virDomainXMLOptionNew.
      
      As we now have proper callbacks connected for the tests, update
      test files accordingly to include the automatically generated
      PCI root controller.
      13a050b2
    • F
      bhyve: detect 32 SATA devices per controller support · 20a7737d
      Fabian Freyer 提交于
      Introduce a BHYVE_CAP_AHCI32SLOT capability that shows
      if 32 devices per SATA controller are supported, and
      a bhyveProbeCapsAHCI32Slot function that probes it.
      20a7737d
  12. 20 1月, 2017 1 次提交
    • R
      bhyve: fix interface type handling for argv2xml · 6a9c7468
      Roman Bogorodskiy 提交于
      When generating a domain XML from native command (i.e. via
      the connectDomainXMLFromNative call), we should use
      interface type 'bridge' rather than 'ethernet' because we only
      support bridges at this point.
      
      As we don't have bridge name explicitly specified on the command line,
      just use 'virbr0' as a default.
      6a9c7468
  13. 11 1月, 2017 2 次提交
  14. 09 1月, 2017 1 次提交
  15. 25 11月, 2016 1 次提交
    • M
      virstring: Unify string list function names · c2a5a4e7
      Michal Privoznik 提交于
      We have couple of functions that operate over NULL terminated
      lits of strings. However, our naming sucks:
      
      virStringJoin
      virStringFreeList
      virStringFreeListCount
      virStringArrayHasString
      virStringGetFirstWithPrefix
      
      We can do better:
      
      virStringListJoin
      virStringListFree
      virStringListFreeCount
      virStringListHasString
      virStringListGetFirstWithPrefix
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c2a5a4e7
  16. 22 11月, 2016 2 次提交
  17. 22 10月, 2016 1 次提交
  18. 21 10月, 2016 1 次提交
  19. 14 10月, 2016 1 次提交
  20. 12 10月, 2016 1 次提交
  21. 29 9月, 2016 1 次提交
  22. 26 9月, 2016 3 次提交
  23. 29 8月, 2016 1 次提交
    • R
      bhyve: fix disks address allocation · 25ee22bd
      Roman Bogorodskiy 提交于
      As bhyve currently doesn't use controller addressing and simply
      uses 1 implicit controller for 1 disk device, the scheme looks the
      following:
      
       pci addrees -> (implicit controller) -> disk device
      
      So in fact we identify disk devices by pci address of implicit
      controller and just pass it this way to bhyve in a form:
      
       -s pci_addr,ahci-(cd|hd),/path/to/disk
      
      Therefore, we cannot use virDeviceInfoPCIAddressWanted() because it
      does not expect that disk devices might need PCI address assignment.
      
      As a result, if a disk was specified without address, it will not be
      generated and domain will to start.
      
      Until proper controller addressing is implemented in the bhyve
      driver, force each disk to have PCI address generated if it was not
      specified by user.
      25ee22bd
  24. 11 7月, 2016 2 次提交