1. 22 9月, 2016 1 次提交
    • J
      domcaps: Add support for listing supported CPU models · 167280e7
      Jiri Denemark 提交于
      The patch adds <cpu> element to domain capabilities XML:
      
          <cpu>
              <mode name='host-passthrough' supported='yes'/>
              <mode name='host-model' supported='yes'/>
              <mode name='custom' supported='yes'>
                  <model>Broadwell</model>
                  <model>Broadwell-noTSX</model>
                  ...
              </mode>
          </cpu>
      
      Applications can use it to inspect what CPU configuration modes are
      supported for a specific combination of domain type, emulator binary,
      guest architecture and machine type.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      167280e7
  2. 20 9月, 2016 3 次提交
  3. 16 9月, 2016 2 次提交
    • M
      a41d87f4
    • L
      qemu: map "virtio" video model to "virt" machtype correctly (arm/aarch64) · 706b5b62
      Laszlo Ersek 提交于
      Most of QEMU's PCI display device models, such as:
      
        libvirt video/model/@type  QEMU -device
        -------------------------  ------------
        cirrus                     cirrus-vga
        vga                        VGA
        qxl                        qxl-vga
        virtio                     virtio-vga
      
      come with a linear framebuffer (sometimes called "VGA compatibility
      framebuffer"). This linear framebuffer lives in one of the PCI device's
      MMIO BARs, and allows guest code (primarily: firmware drivers, and
      non-accelerated OS drivers) to display graphics with direct memory access.
      
      Due to architectural reasons on aarch64/KVM hosts, this kind of
      framebuffer doesn't / can't work in
      
        qemu-system-(arm|aarch64) -M virt
      
      machines. Cache coherency issues guarantee a corrupted / unusable display.
      The problem has been researched by several people, including kvm-arm
      maintainers, and it's been decided that the best way (practically the only
      way) to have boot time graphics for such guests is to consolidate on
      QEMU's "virtio-gpu-pci" device.
      
      >From <https://bugzilla.redhat.com/show_bug.cgi?id=1195176>, libvirt
      supports
      
        <devices>
          <video>
            <model type='virtio'/>
          </video>
        </devices>
      
      but libvirt unconditionally maps @type='virtio' to QEMU's "virtio-vga"
      device model. (See the qemuBuildDeviceVideoStr() function and the
      "qemuDeviceVideo" enum impl.)
      
      According to the above, this is not right for the "virt" machine type; the
      qemu-system-(arm|aarch64) binaries don't even recognize the "virtio-vga"
      device model (justifiedly). Whereas "virtio-gpu-pci", which is a pure
      virtio device without a compatibility framebuffer, is available, and works
      fine.
      
      (The ArmVirtQemu ("AAVMF") platform of edk2 -- that is, the UEFI firmware
      for "virt" -- supports "virtio-gpu-pci", as of upstream commit
      3ef3209d3028. See
      <https://tianocore.acgmultimedia.com/show_bug.cgi?id=66>.)
      
      Override the default mapping of "virtio", from "virtio-vga" to
      "virtio-gpu-pci", if qemuDomainMachineIsVirt() evaluates to true.
      
      Cc: Andrea Bolognani <abologna@redhat.com>
      Cc: Drew Jones <drjones@redhat.com>
      Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
      Cc: Martin Kletzander <mkletzan@redhat.com>
      Suggested-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1372901Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Acked-by: NMartin Kletzander <mkletzan@redhat.com>
      706b5b62
  4. 15 9月, 2016 1 次提交
  5. 14 9月, 2016 3 次提交
  6. 13 9月, 2016 1 次提交
    • E
      tests: fix incorrect status handling by virsh-self-test · 419bc8cf
      Erik Skultety 提交于
      The virsh-self-test script compared the test's return code with 1 and only if
      the return code matched this value then the test was marked as failed. Problem
      is that SIGSEGV returns 139 (or 11 to be precise, since shell reserves the MSB
      for abnormal exit signaling) which passes the check just fine and test then
      appears as successful which it most certainly wasn't.
      Therefore, flip the logic to compare against 0 instead and every other result
      will be treated as a failed test case.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      419bc8cf
  7. 09 9月, 2016 5 次提交
  8. 06 9月, 2016 4 次提交
  9. 03 9月, 2016 3 次提交
  10. 25 8月, 2016 11 次提交
    • P
      qemu: command: Add support for sparse vcpu topologies · 9eb9106e
      Peter Krempa 提交于
      Add support for using the new approach to hotplug vcpus using device_add
      during startup of qemu to allow sparse vcpu topologies.
      
      There are a few limitations imposed by qemu on the supported
      configuration:
      - vcpu0 needs to be always present and not hotpluggable
      - non-hotpluggable cpus need to be ordered at the beginning
      - order of the vcpus needs to be unique for every single hotpluggable
        entity
      
      Qemu also doesn't really allow to query the information necessary to
      start a VM with the vcpus directly on the commandline. Fortunately they
      can be hotplugged during startup.
      
      The new hotplug code uses the following approach:
      - non-hotpluggable vcpus are counted and put to the -smp option
      - qemu is started
      - qemu is queried for the necessary information
      - the configuration is checked
      - the hotpluggable vcpus are hotplugged
      - vcpus are started
      
      This patch adds a lot of checking code and enables the support to
      specify the individual vcpu element with qemu.
      9eb9106e
    • P
      conf: Add XML for individual vCPU hotplug · 5847bc5c
      Peter Krempa 提交于
      Individual vCPU hotplug requires us to track the state of any vCPU. To
      allow this add the following XML:
      
      <domain>
        ...
        <vcpu current='2'>3</vcpu>
        <vcpus>
          <vcpu id='0' enabled='yes' hotpluggable='no' order='1'/>
          <vcpu id='1' enabled='yes' hotpluggable='yes' order='2'/>
          <vcpu id='1' enabled='no' hotpluggable='yes'/>
        </vcpus>
        ...
      
      The 'enabled' attribute allows to control the state of the vcpu.
      'hotpluggable' controls whether given vcpu can be hotplugged and 'order'
      allows to specify the order to add the vcpus.
      5847bc5c
    • P
      tests: cpu-hotplug: Add data for ppc64 without threads enabled · 04fce1d4
      Peter Krempa 提交于
      The reported data is unusual so add it to the test suite.
      04fce1d4
    • P
      tests: cpu-hotplug: Add data for ppc64 out-of-order hotplug · 1c455c47
      Peter Krempa 提交于
      Test the algorithm that extracts the order in which the vcpu entries
      were plugged in on a sample of data created by plugging in vcpus
      arbitrarily.
      1c455c47
    • P
      tests: cpu-hotplug: Add data for ppc64 platform including hotplug · d1145aad
      Peter Krempa 提交于
      Power 8 platform's basic hotpluggable unit is a core rather than a
      thread for x86_64 family. This introduces most of the complexity of the
      matching code and thus needs to be tested.
      
      The test data contain data captured from in-order cpu hotplug and
      unplug operations.
      d1145aad
    • P
      tests: cpu-hotplug: Add data for x86 hotplug with 11+ vcpus · 22e3bb33
      Peter Krempa 提交于
      During review it was reported that adding at least 11 vcpus creates a
      collision of prefixes in the monitor matching algorithm. Add a test case
      to verify that the problem won't happen.
      22e3bb33
    • P
      tests: Add test infrastructure for qemuMonitorGetCPUInfo · f8638471
      Peter Krempa 提交于
      As the combination algorithm is rather complex and ugly it's necessary
      to make sure it works properly. Add test suite infrastructure for
      testing it along with a basic test based on x86_64 platform.
      f8638471
    • P
      qemu: monitor: Extract QOM path from query-cpus reply · c91be16b
      Peter Krempa 提交于
      To allow matching up the data returned by query-cpus to entries in the
      query-hotpluggable-cpus reply for CPU hotplug it's necessary to extract
      the QOM path as it's the only link between the two.
      c91be16b
    • P
      qemu: capabilities: Extract availability of new cpu hotplug for machine types · 920bbe5c
      Peter Krempa 提交于
      QEMU reports whether 'query-hotpluggable-cpus' is supported for a given
      machine type. Extract and cache the information using the capability
      cache.
      
      When copying the capabilities for a new start of qemu, mask out the
      presence of QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS if the machine type
      doesn't support hotpluggable cpus.
      920bbe5c
    • P
      f17ddfee
    • P
      qemu: monitor: Return struct from qemuMonitor(Text|Json)QueryCPUs · b3180425
      Peter Krempa 提交于
      Prepare to extract more data by returning an array of structs rather than
      just an array of thread ids. Additionally report fatal errors separately
      from qemu not being able to produce data.
      b3180425
  11. 24 8月, 2016 1 次提交
    • P
      virsh: respect -q/--quiet more · b620bdee
      Pino Toscano 提交于
      Turn various vshPrint() informative messages into vshPrintExtra(), so
      they are not printed when requesting the quiet mode; neither XML/info
      outputs nor the results of commands are affected.
      Also change the expected outputs of the virsh-undefine test, since virsh
      is invoked in quiet mode there.
      
      Some informative messages might still be converted (and thus silenced
      when in quiet mode), but this is an improvements nonetheless.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1358179
      b620bdee
  12. 20 8月, 2016 3 次提交
    • L
      network: allow limiting a <forwarder> element to certain domains · 0b6336c2
      Laine Stump 提交于
      For some unknown reason the original implementation of the <forwarder>
      element only took advantage of part of the functionality in the
      dnsmasq feature it exposes - it allowed specifying the ip address of a
      DNS server which *all* DNS requests would be forwarded to, like this:
      
         <forwarder addr='192.168.123.25'/>
      
      This is a frontend for dnsmasq's "server" option, which also allows
      you to specify a domain that must be matched in order for a request to
      be forwarded to a particular server. This patch adds support for
      specifying the domain. For example:
      
         <forwarder domain='example.com' addr='192.168.1.1'/>
         <forwarder domain='www.example.com'/>
         <forwarder domain='travesty.org' addr='10.0.0.1'/>
      
      would forward requests for bob.example.com, ftp.example.com and
      joe.corp.example.com all to the DNS server at 192.168.1.1, but would
      forward requests for travesty.org and www.travesty.org to
      10.0.0.1. And due to the second line, requests for www.example.com,
      and odd.www.example.com would be resolved by the libvirt network's own
      DNS server (i.e. thery wouldn't be immediately forwarded) even though
      they also match 'example.com' - the match is given to the entry with
      the longest matching domain. DNS requests not matching any of the
      entries would be resolved by the libvirt network's own DNS server.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1331796
      0b6336c2
    • L
      network: allow disabling dnsmasq's DNS server · 9065cfaa
      Laine Stump 提交于
      If you define a libvirt virtual network with one or more IP addresses,
      it starts up an instance of dnsmasq. It's always been possible to
      avoid dnsmasq's dhcp server (simply don't include a <dhcp> element),
      but until now it wasn't possible to avoid having the DNS server
      listening; even if the network has no <dns> element, it is started
      using default settings.
      
      This patch adds a new attribute to <dns>: enable='yes|no'. For
      backward compatibility, it defaults to 'yes', but if you don't want a
      DNS server created for the network, you can simply add:
      
         <dns enable='no'/>
      
      to the network configuration, and next time the network is started
      there will be no dns server created (if there is dhcp configuration,
      dnsmasq will be started with "port=0" which disables the DNS server;
      if there is no dhcp configuration, dnsmasq won't be started at all).
      9065cfaa
    • L
      network: new network forward mode 'open' · 25e8112d
      Laine Stump 提交于
      The new forward mode 'open' is just like mode='route', except that no
      firewall rules are added to assure that any traffic does or doesn't
      pass. It is assumed that either they aren't necessary, or they will be
      setup outside the scope of libvirt.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=846810
      25e8112d
  13. 19 8月, 2016 1 次提交
    • M
      networkxml2conftest: Don't leak dnsmasq capabilities · 5dd3aa2d
      Michal Privoznik 提交于
      ==18324== 32 bytes in 1 blocks are still reachable in loss record 41 of 114
      ==18324==    at 0x4C2C070: calloc (vg_replace_malloc.c:623)
      ==18324==    by 0x4EA479B: virAlloc (viralloc.c:144)
      ==18324==    by 0x4EA674A: virBitmapNewQuiet (virbitmap.c:77)
      ==18324==    by 0x4EA67F7: virBitmapNew (virbitmap.c:106)
      ==18324==    by 0x4EC777D: dnsmasqCapsNewEmpty (virdnsmasq.c:801)
      ==18324==    by 0x4EC781B: dnsmasqCapsNewFromBuffer (virdnsmasq.c:815)
      ==18324==    by 0x407CF4: mymain (networkxml2conftest.c:99)
      ==18324==    by 0x409CF0: virTestMain (testutils.c:982)
      ==18324==    by 0x4080EA: main (networkxml2conftest.c:136)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      5dd3aa2d
  14. 18 8月, 2016 1 次提交