1. 25 5月, 2016 2 次提交
    • J
      xenconfig: xm: check for driver on disk format · 293668cd
      Joao Martins 提交于
      When reviewing libxl vif typename series[0] I found a bug
      on xen-xm formatter where "virsh domxml-to-native xen-xm file.xml"
      can lead to a NULL dereference if the disk driver isn't specified.
      Fix this by checking for driver before writing/testing it down.
      
      [0] https://www.redhat.com/archives/libvir-list/2016-April/msg01434.htmlSigned-off-by: NJoao Martins <joao.m.martins@oracle.com>
      293668cd
    • L
      lxc: support <interface type='ethernet'> · 002b7704
      Laine Stump 提交于
      This is identical to type='bridge', but without the "connect to a
      bridge" part, so it can be handled by using the same functions (and
      often even the same cases in switch statements), after renaming
      virLXCProcessSetupInterfaceBridged() to virLXCProcessInterfaceTap()
      and enhancing it to skip bridge-related items when brname == NULL.
      
      To be truly useful, we need to support setting the ip address on the
      host side veth as well as guest side veth (already supported for
      type='bridge'), as well as setting the peer address for both.
      
      The <script> element (supported by type='ethernet' in qemu) isn't
      supported in this patch. An error is logged at domain start time if it
      is encountered. This may be changed in a later patch.
      002b7704
  2. 24 5月, 2016 21 次提交
  3. 23 5月, 2016 11 次提交
  4. 22 5月, 2016 1 次提交
  5. 21 5月, 2016 5 次提交
    • C
      tests: qemu: test <address type='pci'/> with aarch64 · f3d5e255
      Cole Robinson 提交于
      This is an interesting test case since PCI isn't the default for
      aarch64.
      f3d5e255
    • L
      qemu: auto-assign addresses when <address type='pci'/> is specified · c026f8f1
      Laine Stump 提交于
      Rather than only assigning a PCI address when no address is given at
      all, also do it when the config says that the address type is 'pci',
      but it gives no address (virDeviceInfoPCIAddressWanted()).
      
      There are also several places after parsing but prior to address
      assignment where code previously expected that any info with address
      type='pci' would have a *valid* PCI address, which isn't always the
      case - now we check not only for type='pci', but also for a valid
      address (virDeviceInfoPCIAddressPresent()).
      
      The test case added in this patch was directly copied from Cole's patch titled:
      
          qemu: Wire up address type=pci auto_allocate
      c026f8f1
    • L
      bhyve: auto-assign addresses when <address type='pci'/> is specified · d05da3fc
      Laine Stump 提交于
      Rather than only assigning a PCI address when no address is given at
      all, also do it when the config says that the address type is 'pci',
      but it gives no address.
      d05da3fc
    • L
      conf: allow type='pci' addresses with no address attributes specified · 8f578716
      Laine Stump 提交于
      Prior to this, <address type='pci'/> wasn't allowed when parsing
      (domain+bus+slot+function needed to be a "valid" PCI address, meaning
      that at least one of domain/bus/slot had to be non-0), the RNG
      required bus to be specified, and if type was set to PCI when
      formatting, domain+bus+slot+function would always be output.
      
      This makes all the address attributes optional during parse and RNG
      validation, and suppresses domain+bus+slot+function if domain+bus+slot
      are all 0 (NB: if d+b+s are all 0, any value for function is
      nonsensical as that will never happen in the real world, and after
      the next patch we will always assign a real working address to any
      empty PCI address before it is ever output to anywhere).
      
      Note that explicitly setting all attributes to 0 is equivalent to
      setting none of them, which is okay, since 0000:00:00 is reserved in
      any PCI bus setup, and can't be used anyway.
      8f578716
    • L
      conf: new functions to check if PCI address is wanted/present · 9a81a363
      Laine Stump 提交于
      In order to allow <address type='pci'/> with no other attributes to
      mean "I want a PCI address, but any PCI address will do" (just as
      having no <address> at all usually indicates), we will need to change
      several places in the code from a simple "info->type == (or !=)
      VIR_DOMAIN_DEVICE_ADDRESS_TYPE_(PCI|NONE)" into something slightly
      more complex, this patch adds to new functions that take a
      virDomainDeviceInfoPtr and return true/false depending on 1) whether
      the current state of the info indicates that we "want" a PCI address
      for this device (virDeviceInfoPCIAddressWanted()) and 2) whether this
      device already has a valid PCI address
      (virDeviceInfoPCIAddressPresent()).
      
      Both of these functions required the simpler check for whether a pci
      address is "empty" (i.e. all of its attributes are 0, which can never
      happen in a real PCI address, since slot 0 of bus 0 of domain 0 is
      always reserved), so that function is also added.
      9a81a363