1. 25 5月, 2018 1 次提交
    • J
      schema: Add missing block data for nodedev · 4804a4db
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1566416
      
      Commit id 'fe2af45b' added output for logical_block_size and
      num_blocks for both removeable and fixed storage, but did not
      update the nodedev capability causing virt-xml-validate to fail.
      It's listed as optional only because it only prints if the
      sizes are > 0. For a CDROM drive the values won't be formatted.
      
      Update the nodedevxml2xmltest in order to output the values
      for storage based on the logic from udevProcessRemoveableMedia
      and udevProcessSD with respect to the logical_blocksize and
      num_blocks calculations.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by Michal Privoznik <mprivozn@redhat.com>
      4804a4db
  2. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  3. 26 5月, 2017 2 次提交
    • B
      node_device: introduce new capability FC_RPORT · bb2adfe9
      Bjoern Walk 提交于
      Similar to scsi_host and fc_host, there is a relation between a
      scsi_target and its transport specific fc_remote_port. Let's expose this
      relation and relevant information behind it.
      
      An example for a virsh nodedev-dumpxml:
      
          virsh # nodedev-dumpxml scsi_target0_0_0
          <device>
            <name>scsi_target0_0_0</name>
            <path>/sys/devices/[...]/host0/rport-0:0-0/target0:0:0</path>
            <parent>scsi_host0</parent>
            <capability type='scsi_target'>
              <target>target0:0:0</target>
              <capability type='fc_remote_port'>
                <rport>rport-0:0-0</rport>
                <wwpn>0x9d73bc45f0e21a86</wwpn>
              </capability>
            </capability>
          </device>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
      bb2adfe9
    • B
      node_device: detect CCW devices · b0ffd938
      Bjoern Walk 提交于
      Make CCW devices available to the node_device driver. The devices are
      already seen by udev so let's implement necessary code for detecting
      them properly.
      
      Topologically, CCW devices are similar to PCI devices, e.g.:
      
          +- ccw_0_0_1a2b
              |
              +- scsi_host0
                  |
                  +- scsi_target0_0_0
                      |
                      +- scsi_0_0_0_0
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Signed-off-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
      b0ffd938
  4. 18 5月, 2017 2 次提交
    • E
      nodedev: Introduce mdev capability for mediated devices · 88ef73e1
      Erik Skultety 提交于
      Start discovering the mediated devices on the host system and format the
      attributes for the mediated device into the XML. Compared to the parent
      device which reports generic information about the abstract mediated
      devices types, a child device only reports the type name it has been
      instantiated from and the IOMMU group number, since that's device
      specific compared to the rest of the info that can be gathered about
      mediated devices at the moment.
      This patch introduces both the formatting and parsing routines, updates
      nodedev.rng schema, adding a testcase as well.
      
      The resulting mdev child device XML:
      <device>
        <name>mdev_4b20d080_1b54_4048_85b3_a6a62d165c01</name>
        <path>/sys/devices/.../4b20d080-1b54-4048-85b3-a6a62d165c01</path>
        <parent>pci_0000_06_00_0</parent>
        <driver>
          <name>vfio_mdev</name>
        </driver>
        <capability type='mdev'>
          <type id='vendor_supplied_type_id'/>
          <iommuGroup number='NUM'/>
        <capability/>
      <device/>
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1452072Signed-off-by: NErik Skultety <eskultet@redhat.com>
      88ef73e1
    • E
      nodedev: Introduce the mdev capability to a PCI parent device · 500cbc06
      Erik Skultety 提交于
      The parent device needs to report the generic stuff about the supported
      mediated devices types, like device API, available instances, type name,
      etc. Therefore this patch introduces a new nested capability element of
      type 'mdev_types' with the resulting XML of the following format:
      
      <device>
        ...
        <capability type='pci'>
          ...
          <capability type='mdev_types'>
            <type id='vendor_supplied_id'>
              <name>optional_vendor_supplied_codename</name>
              <deviceAPI>vfio-pci</deviceAPI>
              <availableInstances>NUM</availableInstances>
            </type>
              ...
            <type>
              ...
            </type>
          </capability>
        </capability>
        ...
      </device>
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1452072Signed-off-by: NErik Skultety <eskultet@redhat.com>
      500cbc06
  5. 04 4月, 2017 1 次提交
  6. 17 2月, 2017 2 次提交
  7. 08 6月, 2016 3 次提交
  8. 02 5月, 2016 1 次提交
    • M
      conf: Parse more of our nodedev XML · 541f21af
      Martin Kletzander 提交于
      We were lacking tests that are checking for the completeness of our
      nodedev XMLs and also whether we output properly formatted ones.  This
      patch adds parsing for the capability elements inside the <capability
      type='pci'> element.  Also bunch of tests are added to show everything
      works properly.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      541f21af
  9. 04 4月, 2016 1 次提交
    • M
      nodedev: Fix parsing of generated XMLs · 17a94ba7
      Martin Kletzander 提交于
      Commit d77ffb68 added not only reporting of the PCI header type, but
      also parsing of that information.  However, because there was no parsing
      done for the other sub-PCI capabilities, if there was any other
      capability then a valid header type name (like phys_function or
      virt_functions) the parsing would fail.  This prevented passing node
      device XMLs that we generated into our own functions when dealing with,
      e.g. with SRIOV cards.
      
      Instead of reworking the whole parsing, just fix this one occurence and
      remove a test for it for the time being.  Future patches will deal with
      the rest.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      17a94ba7
  10. 22 3月, 2016 1 次提交
  11. 19 3月, 2016 1 次提交
  12. 27 1月, 2016 1 次提交
  13. 22 7月, 2014 1 次提交
    • J
      Add unique_id to nodedev output · f3271f4c
      John Ferlan 提交于
      Add an optional unique_id parameter to nodedev.  Allows for easier lookup
      and display of the unique_id value in order to document for use with
      scsi_host code.
      f3271f4c
  14. 16 6月, 2014 1 次提交
  15. 18 3月, 2014 1 次提交
  16. 08 10月, 2013 1 次提交
  17. 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
  18. 27 6月, 2013 1 次提交
    • L
      nodedev: add iommuGroup to node device object · 8807b285
      Laine Stump 提交于
      This includes adding it to the nodedev parser and formatter, docs, and
      test.
      
      An example of the new iommuGroup element that is a part of the output
      from "virsh nodedev-dumpxml" (virNodeDeviceGetXMLDesc()):
      
        <device>
          <name>pci_0000_02_00_1</name>
          <capability type='pci'>
          ...
            <iommuGroup number='12'>
              <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
              <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
            </iommuGroup>
          </capability>
        </device>
      8807b285
  19. 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
  20. 27 3月, 2012 1 次提交
    • M
      Cleanup for a return statement in source files · 9943276f
      Martin Kletzander 提交于
      Return statements with parameter enclosed in parentheses were modified
      and parentheses were removed. The whole change was scripted, here is how:
      
      List of files was obtained using this command:
      git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
      grep -e '\.[ch]$' -e '\.py$'
      
      Found files were modified with this command:
      sed -i -e                                                                 \
      's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
      -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
      
      Then checked for nonsense.
      
      The whole command looks like this:
      git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
      grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e                            \
      's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
      -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
      9943276f
  21. 10 2月, 2012 1 次提交
    • O
      npiv: Auto-generate WWN if it's not specified · 7c90026d
      Osier Yang 提交于
      The auto-generated WWN comply with the new addressing schema of WWN:
      
      <quote>
      the first nibble is either hex 5 or 6 followed by a 3-byte vendor
      identifier and 36 bits for a vendor-specified serial number.
      </quote>
      
      We choose hex 5 for the first nibble. And for the 3-bytes vendor ID,
      we uses the OUI according to underlying hypervisor type, (invoking
      virConnectGetType to get the virt type). e.g. If virConnectGetType
      returns "QEMU", we use Qumranet's OUI (00:1A:4A), if returns
      ESX|VMWARE, we use VMWARE's OUI (00:05:69). Currently it only
      supports qemu|xen|libxl|xenapi|hyperv|esx|vmware drivers. The last
      36 bits are auto-generated.
      7c90026d
  22. 04 2月, 2012 1 次提交
    • E
      build: expand rule to cover testsuite · 8fe454ce
      Eric Blake 提交于
      The bulk of this patch was done with:
      
      sed -i 's/\(\bfree *(/VIR_FREE(/g' tests/*.c
      
      followed by fixing the few compile errors that resulted.
      
      * cfg.mk (exclude_file_name_regexp--sc_prohibit_raw_allocation):
      Remove tests from exemption.
      * tests/testutils.h: Add common header.
      * tests/commandhelper.c: Fix offenders.
      * tests/cputest.c: Likewise.
      * tests/domainsnapshotxml2xmltest.c: Likewise.
      * tests/interfacexml2xmltest.c: Likewise.
      * tests/networkxml2argvtest.c: Likewise.
      * tests/networkxml2xmltest.c: Likewise.
      * tests/nodedevxml2xmltest.c: Likewise.
      * tests/nodeinfotest.c: Likewise.
      * tests/nwfilterxml2xmltest.c: Likewise.
      * tests/qemuargv2xmltest.c: Likewise.
      * tests/qemuxml2argvtest.c: Likewise.
      * tests/qemuxml2xmltest.c: Likewise.
      * tests/qemuxmlnstest.c: Likewise.
      * tests/qparamtest.c: Likewise.
      * tests/sexpr2xmltest.c: Likewise.
      * tests/storagepoolxml2xmltest.c: Likewise.
      * tests/storagevolxml2xmltest.c: Likewise.
      * tests/testutils.c: Likewise.
      * tests/virshtest.c: Likewise.
      * tests/xencapstest.c: Likewise.
      * tests/xmconfigtest.c: Likewise.
      * tests/xml2sexprtest.c: Likewise.
      8fe454ce
  23. 01 5月, 2011 1 次提交
    • M
      tests: Lower stack usage below 4096 bytes · 9ba4eb3c
      Matthias Bolte 提交于
      Make virtTestLoadFile allocate the buffer to read the file into.
      
      Fix logic error in virtTestLoadFile, stop reading on the first empty line.
      
      Use virFileReadLimFD in virtTestCaptureProgramOutput to avoid manual
      buffer handling.
      9ba4eb3c
  24. 30 4月, 2011 1 次提交
    • E
      tests: simplify common setup · 20986e58
      Eric Blake 提交于
      A few of the tests were missing basic sanity checks, while most
      of them were doing copy-and-paste initialization (in fact, some
      of them pasted the argc > 1 check more than once!).  It's much
      nicer to do things in one common place, and minimizes the size of
      the next patch that fixes getcwd usage.
      
      * tests/testutils.h (EXIT_AM_HARDFAIL): New define.
      (progname, abs_srcdir): Define for all tests.
      (VIRT_TEST_MAIN): Change callback signature.
      * tests/testutils.c (virtTestMain): Do more common init.
      * tests/commandtest.c (mymain): Simplify.
      * tests/cputest.c (mymain): Likewise.
      * tests/esxutilstest.c (mymain): Likewise.
      * tests/eventtest.c (mymain): Likewise.
      * tests/hashtest.c (mymain): Likewise.
      * tests/networkxml2xmltest.c (mymain): Likewise.
      * tests/nodedevxml2xmltest.c (myname): Likewise.
      * tests/nodeinfotest.c (mymain): Likewise.
      * tests/nwfilterxml2xmltest.c (mymain): Likewise.
      * tests/qemuargv2xmltest.c (mymain): Likewise.
      * tests/qemuhelptest.c (mymain): Likewise.
      * tests/qemuxml2argvtest.c (mymain): Likewise.
      * tests/qemuxml2xmltest.c (mymain): Likewise.
      * tests/qparamtest.c (mymain): Likewise.
      * tests/sexpr2xmltest.c (mymain): Likewise.
      * tests/sockettest.c (mymain): Likewise.
      * tests/statstest.c (mymain): Likewise.
      * tests/storagepoolxml2xmltest.c (mymain): Likewise.
      * tests/storagevolxml2xmltest.c (mymain): Likewise.
      * tests/virbuftest.c (mymain): Likewise.
      * tests/virshtest.c (mymain): Likewise.
      * tests/vmx2xmltest.c (mymain): Likewise.
      * tests/xencapstest.c (mymain): Likewise.
      * tests/xmconfigtest.c (mymain): Likewise.
      * tests/xml2sexprtest.c (mymain): Likewise.
      * tests/xml2vmxtest.c (mymain): Likewise.
      20986e58
  25. 10 2月, 2010 1 次提交
  26. 14 12月, 2009 1 次提交
  27. 02 6月, 2009 1 次提交
    • D
      NPIV implementation for node device create and destroy · 81d0ffbc
      Daniel Veillard 提交于
      * src/Makefile.am src/node_device.[ch] src/node_device_conf.[ch]
        src/node_device_hal.[ch] src/node_device_hal_linux.c
        src/qemu_driver.c src/remote_internal.c src/storage_backend.c
        src/virsh.c src/xen_unified.c tests/nodedevxml2xmltest.c
        po/POTFILES.in: implementation for node device create and destroy
        in NPIV support, patch by David Allan
      Daniel
      81d0ffbc
  28. 24 2月, 2009 1 次提交