1. 10 7月, 2013 1 次提交
    • M
      Introduce OOM reporting to virAsprintf · dc6f2dad
      Michal Privoznik 提交于
      Actually, I'm turning this function into a macro as filename,
      function name and line number needs to be passed. The new
      function virAsprintfInternal is introduced with the extended set
      of arguments.
      dc6f2dad
  2. 05 7月, 2013 1 次提交
  3. 28 6月, 2013 1 次提交
  4. 01 6月, 2013 1 次提交
    • O
      conf: Generate address for scsi host device automatically · cdb97895
      Osier Yang 提交于
      With unknown good reasons, the attribute "bus" of scsi device
      address is always set to 0, same for attribute "target". (See
      virDomainDiskDefAssignAddress).
      
      Though we might need to change the algorithm to honor "bus"
      and "target" too, that's a different issue. The address generator
      for scsi host device in this patch just follows the unknown
      good reasons, only considering the "controller" and "unit".
      It walks through all scsi controllers and their units, to see
      if the address $controller:0:0:$unit can be used (if not used
      by any disk or scsi host device yet), if found one, it sits on
      it, otherwise, it creates a new controller (actually the controller
      is implicitly created by someone else), and sits on
      $new_controller:0:0:0 instead.
      cdb97895
  5. 22 5月, 2013 1 次提交
    • M
      Introduce /domain/devices/interface/driver/@queues attribute · 7e744f81
      Michal Privoznik 提交于
      This attribute is going to represent number of queues for
      multique vhost network interface. This commit implements XML
      extension part of the feature and add one test as well. For now,
      we can only do xml2xml test as qemu command line generation code
      is not adapted yet.
      7e744f81
  6. 17 5月, 2013 1 次提交
  7. 16 5月, 2013 2 次提交
  8. 15 5月, 2013 3 次提交
    • O
      qemu: Support discard for disk · a7c4202c
      Osier Yang 提交于
      QEMU introduced "discard" option for drive since commit a9384aff53,
      
      <...>
      @var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and
      controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
      requests are ignored or passed to the filesystem.  Some machine types
      may not support discard requests.
      </...>
      
      This patch exposes the support in libvirt.
      
      QEMU supported "discard" for "-drive" since v1.5.0-rc0:
      
      % git tag --contains a9384aff53
      contains
      v1.5.0-rc0
      v1.5.0-rc1
      
      So this only detects the capability bit using virQEMUCapsProbeQMPCommandLine.
      a7c4202c
    • M
      qemu: Add VNC WebSocket support · 85ec7ff6
      Martin Kletzander 提交于
      Adding a VNC WebSocket support for QEMU driver.  This functionality is
      in upstream qemu from commit described as v1.3.0-982-g7536ee4, so the
      capability is being recognized based on QEMU version for now.
      85ec7ff6
    • O
      qemu: New XML to disable memory merge at guest startup · 77b54b96
      Osier Yang 提交于
      QEMU introduced command line "-mem-merge=on|off" (defaults to on) to
      enable/disable the memory merge (KSM) at guest startup. This exposes
      it by new XML:
        <memoryBacking>
          <nosharepages/>
        </memoryBacking>
      
      The XML tag is same with what we used internally for old RHEL.
      77b54b96
  9. 13 5月, 2013 3 次提交
    • O
      Introduce <readonly> for hostdev · f4bb7b48
      Osier Yang 提交于
      Since it's generic enough to be used by other types in future, I
      put it in <hostdev> as sub-element, though now it's only used by
      scsi host device.
      f4bb7b48
    • H
      qemu: Build qemu command line for scsi host device · 0d70656a
      Han Cheng 提交于
      Except the scsi host device's controller is "lsilogic", mapping
      between the libvirt attributes and scsi-generic properties is:
      
        libvirt     qemu
      -----------------------------------------
        controller  bus ($libvirt_controller.0)
        bus         channel
        target      scsi-id
        unit        lun
      
      For scsi host device with "lsilogic" controller, the mapping is:
      ('target (libvirt)' must be 0, as it's not used; 'unit (libvirt)
      must <= 7).
      
        libvirt            qemu
      ----------------------------------------------------------
        controller && bus  bus ($libvirt_controller.$libvirt_bus)
        unit               scsi-id
      
      It's not good to hardcode/hard-check limits of these attributes,
      and even worse, these limits are not documented, one has to find
      out by either testing or reading the qemu code, I'm looking forward
      to qemu expose limits like these one day). For example, exposing
      "max_target", "max_lun" for megasas:
      
      static const struct SCSIBusInfo megasas_scsi_info = {
          .tcq = true,
          .max_target = MFI_MAX_LD,
          .max_lun = 255,
      
          .transfer_data = megasas_xfer_complete,
          .get_sg_list = megasas_get_sg_list,
          .complete = megasas_command_complete,
          .cancel = megasas_command_cancel,
      };
      
      Example of the qemu command line (lsilogic controller):
      
        -drive file=/dev/sg2,if=none,id=drive-hostdev-scsi_host7-0-0-0 \
        -device scsi-generic,bus=scsi0.0,scsi-id=8,\
        drive=drive-hostdev-scsi_host7-0-0-0,id=hostdev-scsi_host7-0-0-0
      
      Example of the qemu command line (virtio-scsi controller):
      
        -drive file=/dev/sg2,if=none,id=drive-hostdev-scsi_host7-0-0-0 \
        -device scsi-generic,bus=scsi0.0,channel=0,scsi-id=128,lun=128,\
        drive=drive-hostdev-scsi_host7-0-0-0,id=hostdev-scsi_host7-0-0-0
      Signed-off-by: NHan Cheng <hanc.fnst@cn.fujitsu.com>
      Signed-off-by: NOsier Yang <jyang@redhat.com>
      0d70656a
    • H
      conf: Generic XMLs for scsi hostdev · 5c811dce
      Han Cheng 提交于
      An example of the scsi hostdev XML:
      
          <hostdev mode='subsystem' type='scsi'>
            <source>
              <adapter name='scsi_host0'/>
              <address bus='0' target='0' unit='0'/>
            </source>
            <address type='drive' controller='0' bus='0' target='4' unit='8'/>
          </hostdev>
      
      Controller is implicitly added for scsi hostdev, though the scsi
      controller's model defaults to "lsilogic", which might be not what
      the user wants (same problem exists for virtio-scsi disk). It's
      the existing problem, will be addressed later.
      
      The device address must be specified manually. Later patch will let
      libvirt generate it automatically.
      
      This only introduces the generic XMLs for scsi hostdev, later patches
      will add other elements, e.g. <readonly>, <shareable>.
      Signed-off-by: NHan Cheng <hanc.fnst@cn.fujitsu.com>
      Signed-off-by: NOsier Yang <jyang@redhat.com>
      5c811dce
  10. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  11. 26 4月, 2013 1 次提交
    • L
      qemu: use vfio-pci on commandline when appropriate · 731b0f36
      Laine Stump 提交于
      The device option for vfio-pci is nearly identical to that for
      pci-assign - only the configfd parameter isn't supported (or needed).
      
      Checking for presence of the bootindex parameter is done separately
      from constructing the commandline, similar to how it is done for
      pci-assign.
      
      This patch contains tests to check for proper commandline
      construction. It also includes tests for parser-formatter-parser
      roundtrips (xml2xml), because those tests use the same data files, and
      would have failed had they been included before now.
      
      qemu: xml/args tests for VFIO hostdev and <interface type='hostdev'/>
      
      These should be squashed in with the patch that adds commandline
      handling of vfio (they would fail at any earlier time).
      731b0f36
  12. 25 4月, 2013 2 次提交
  13. 17 4月, 2013 1 次提交
  14. 13 4月, 2013 1 次提交
  15. 08 4月, 2013 1 次提交
    • O
      Introduce new XMLs to specify disk source using libvirt storage · 4bc331c8
      Osier Yang 提交于
      With this patch, one can specify the disk source using libvirt
      storage like:
      
        <disk type='volume' device='disk'>
          <driver name='qemu' type='raw' cache='none'/>
          <source pool='default' volume='fc18.img'/>
          <target dev='vdb' bus='virtio'/>
        </disk>
      
      "seclabels" and "startupPolicy" are not supported for this new
      disk type ("volume"). They will be supported in later patches.
      
      docs/formatdomain.html.in:
        * Add documents for new XMLs
      docs/schemas/domaincommon.rng:
        * Add rng for new XMLs;
      src/conf/domain_conf.h:
        * New struct for 'volume' type disk source (virDomainDiskSourcePoolDef)
        * Add VIR_DOMAIN_DISK_TYPE_VOLUME for enum virDomainDiskType
      src/conf/domain_conf.c:
        * New helper virDomainDiskSourcePoolDefParse to parse the 'volume'
          type disk source.
        * New helper virDomainDiskSourcePoolDefFree to free the source def
          if 'volume' type disk.
      tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml:
      tests/qemuxml2xmltest.c:
        * New test
      4bc331c8
  16. 06 4月, 2013 1 次提交
    • O
      qemu: Support multiple queue virtio-scsi · d4bf0a93
      Osier Yang 提交于
      This introduce a new attribute "num_queues" (same with the good name
      QEMU uses) for virtio-scsi controller. An example of the XML:
      
      <controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/>
      
      The corresponding QEMU command line:
      
      -device virtio-scsi-pci,id=scsi0,num_queues=8,bus=pci.0,addr=0x3 \
      d4bf0a93
  17. 05 4月, 2013 3 次提交
  18. 22 3月, 2013 2 次提交
  19. 21 3月, 2013 1 次提交
  20. 16 3月, 2013 4 次提交
  21. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  22. 25 2月, 2013 1 次提交
  23. 08 2月, 2013 1 次提交
  24. 07 1月, 2013 1 次提交
    • O
      conf: Parse and format the new XML · 535aed56
      Osier Yang 提交于
      Like "rawio", "sgio" is only allowed for block disk of device
      type "lun".
      
      It doesn't default disk->sgio to "filtered" when parsing, as
      it won't be able to distinguish explicitly requested "filtered"
      and a default "filtered" in driver then. We have to error out for
      explicit request when the kernel doesn't support the new sysfs
      knob "unpriv_sgio", however, for defaulted "filtered", we can
      just ignore it if the kernel doesn't support "unpriv_sgio".
      535aed56
  25. 07 12月, 2012 1 次提交
  26. 29 11月, 2012 1 次提交
  27. 18 10月, 2012 1 次提交
  28. 20 9月, 2012 1 次提交