1. 24 7月, 2017 1 次提交
  2. 21 7月, 2017 1 次提交
  3. 19 5月, 2017 1 次提交
  4. 28 4月, 2017 1 次提交
  5. 19 4月, 2017 1 次提交
    • J
      xenconfig: avoid double free on OOM testing · b2c12f57
      Jim Fehlig 提交于
      Fix xlconfig channel tests when OOM testing is enabled.
      
      TEST: xlconfigtest
      32) Xen XL-2-XML Format channel-unix                                  ... OK
          Test OOM for nalloc=55 ................................................*** Error in `/home/jfehlig/virt/upstream/libvirt/tests/.libs/xlconfigtest': double free or corruption (fasttop): 0x0000000000679550 ***
      ...
      (gdb) bt
      #0  0x00007ffff36875af in raise () from /lib64/libc.so.6
      #1  0x00007ffff36889aa in abort () from /lib64/libc.so.6
      #2  0x00007ffff36c5150 in __libc_message () from /lib64/libc.so.6
      #3  0x00007ffff36cb4f6 in malloc_printerr () from /lib64/libc.so.6
      #4  0x00007ffff36cbcee in _int_free () from /lib64/libc.so.6
      #5  0x00007ffff782babf in virFree (ptrptr=0x7fffffffdca8) at util/viralloc.c:582
      #6  0x000000000042f2f3 in xenParseXLChannel (conf=0x677350, def=0x6815b0) at xenconfig/xen_xl.c:788
      #7  0x000000000042f44e in xenParseXL (conf=0x677350, caps=0x6832b0, xmlopt=0x67f6e0) at xenconfig/xen_xl.c:828
      #8  0x00000000004105a3 in testCompareFormatXML (
          xlcfg=0x6811e0 "/home/jfehlig/virt/upstream/libvirt/tests/xlconfigdata/test-channel-unix.cfg",
          xml=0x681110 "/home/jfehlig/virt/upstream/libvirt/tests/xlconfigdata/test-channel-unix.xml", replaceVars=false)
          at xlconfigtest.c:152
      
      When a channel is successfully parsed and its path and name fields
      assigned from local variables, set the local variables to NULL to
      prevent a double free on error.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      b2c12f57
  6. 14 4月, 2017 1 次提交
    • W
      xenFormatXLDomainDisks: avoid double free on OOM testing · 2c1a31a3
      Wim ten Have 提交于
      Fix xlconfigtest runs build for --enable-test-oom on
              Xen XL-2-XML Parse  new-disk
      
          #0  0x00007ffff3bd791f in raise () from /lib64/libc.so.6
          #1  0x00007ffff3bd951a in abort () from /lib64/libc.so.6
          #2  0x00007ffff3c1b200 in __libc_message () from /lib64/libc.so.6
          #3  0x00007ffff3c2488a in _int_free () from /lib64/libc.so.6
          #4  0x00007ffff3c282bc in free () from /lib64/libc.so.6
          #5  0x00007ffff7864fcb in virFree (ptrptr=ptrptr@entry=0x7fffffffd868) at util/viralloc.c:582
          #6  0x00007ffff78776e5 in virConfFreeValue (val=<optimized out>) at util/virconf.c:178
      ==> #7  0x0000000000425759 in xenFormatXLDomainDisks (def=0x7fffffffd8c0, def=0x7fffffffd8c0, conf=0x658220)
              at xenconfig/xen_xl.c:1159
          #8  xenFormatXL (def=def@entry=0x66ec20, conn=conn@entry=0x668cf0) at xenconfig/xen_xl.c:1558
          #9  0x000000000040ea1d in testCompareParseXML (replaceVars=<optimized out>,
              xml=0x65f5e0 "/home/wtenhave/WORK/libvirt/history/libvirt/tests/xlconfigdata/test-fullvirt-ovmf.xml",
              xlcfg=0x65f6b0 "/home/wtenhave/WORK/libvirt/history/libvirt/tests/xlconfigdata/test-fullvirt-ovmf.cfg")
              at xlconfigtest.c:105
          #10 testCompareHelper (data=<optimized out>) at xlconfigtest.c:205
          #11 0x000000000041079a in virTestRun (title=title@entry=0x431cf0 "Xen XL-2-XML Parse  fullvirt-ovmf",
              body=body@entry=0x40e720 <testCompareHelper>, data=data@entry=0x7fffffffda50) at testutils.c:247
          #12 0x000000000040ebc2 in mymain () at xlconfigtest.c:256
          #13 0x0000000000411070 in virTestMain (argc=1, argv=0x7fffffffdc08, func=0x40f2c0 <mymain>) at testutils.c:992
          #14 0x00007ffff3bc2401 in __libc_start_main () from /lib64/libc.so.6
          #15 0x000000000040e5da in _start ()
      
      symmetry seems missing its sibbling coded functionality
      demonstrated under functions;
              xenFormatXLUSBController()
              xenFormatXLUSB()
              xenFormatXLDomainChannels()
              xenFormatXMDisks
      Signed-off-by: NWim ten Have <wim.ten.have@oracle.com>
      2c1a31a3
  7. 08 2月, 2017 1 次提交
  8. 07 2月, 2017 1 次提交
    • M
      xenFormatXLDisk: Don't leak @target · aaf0ac7e
      Michal Privoznik 提交于
      ==11260== 1,006 bytes in 1 blocks are definitely lost in loss record 106 of 111
      ==11260==    at 0x4C2AE5F: malloc (vg_replace_malloc.c:297)
      ==11260==    by 0x4C2BDFF: realloc (vg_replace_malloc.c:693)
      ==11260==    by 0x4EA430B: virReallocN (viralloc.c:245)
      ==11260==    by 0x4EA7C52: virBufferGrow (virbuffer.c:130)
      ==11260==    by 0x4EA7D28: virBufferAdd (virbuffer.c:165)
      ==11260==    by 0x4EA8E10: virBufferStrcat (virbuffer.c:718)
      ==11260==    by 0x42D263: xenFormatXLDiskSrcNet (xen_xl.c:960)
      ==11260==    by 0x42D4EB: xenFormatXLDiskSrc (xen_xl.c:1015)
      ==11260==    by 0x42D870: xenFormatXLDisk (xen_xl.c:1101)
      ==11260==    by 0x42DA89: xenFormatXLDomainDisks (xen_xl.c:1148)
      ==11260==    by 0x42EAF8: xenFormatXL (xen_xl.c:1558)
      ==11260==    by 0x40E85F: testCompareParseXML (xlconfigtest.c:105)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      aaf0ac7e
  9. 21 12月, 2016 1 次提交
  10. 15 12月, 2016 2 次提交
  11. 24 10月, 2016 1 次提交
  12. 22 10月, 2016 1 次提交
  13. 20 10月, 2016 2 次提交
    • J
      qemu: Introduce qemuDomainChardevPrivatePtr · 5f2a1327
      John Ferlan 提交于
      Modeled after the qemuDomainHostdevPrivatePtr (commit id '27726d8c'),
      create a privateData pointer in the _virDomainChardevDef to allow storage
      of private data for a hypervisor in order to at least temporarily store
      secret data for usage during qemuBuildCommandLine.
      
      NB: Since the qemu_parse_command (qemuParseCommandLine) code is not
      expecting to restore the secret data, there's no need to add code
      code to handle this new structure there.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      5f2a1327
    • C
      xl: fix 8126d870 broken test · 710d875f
      Cédric Bosdonnat 提交于
      xlconfigtest expects the comma, don't clean it up even if there is
      no target to write.
      710d875f
  14. 19 10月, 2016 1 次提交
  15. 28 9月, 2016 1 次提交
  16. 26 9月, 2016 1 次提交
  17. 02 8月, 2016 1 次提交
  18. 27 7月, 2016 1 次提交
  19. 11 7月, 2016 1 次提交
    • P
      conf: Add private data for virDomainVcpuDef · 5fe0b6b0
      Peter Krempa 提交于
      Allow to store driver specific data on a per-vcpu basis.
      
      Move of the virDomainDef*Vcpus* functions was necessary as
      virDomainXMLOptionPtr was declared below this block and I didn't want to
      split the function headers.
      5fe0b6b0
  20. 17 6月, 2016 1 次提交
    • J
      xenconfig: fix conversion of <driver> to backendtype · e33cd67a
      Jim Fehlig 提交于
      When converting domXML to xen xl.cfg, backendtype should
      not be emitted if <driver> is not specified. Moreover,
      <driver name='file'/> should be converted to backendtype
      qdisk, similar to handling of <driver> in libxlMakeDisk()
      in libxl_conf.c.
      
      Prior to this change, connectDomainXMLToNative would
      produce incorrect xl.cfg when the input domXML contained
      <driver name='file'/>
      
      domXML:
      
        <disk type="file" device="disk">
          <driver name="file"/>
          <source file="/image/file/path"/>
          <target dev="xvda" bus="xen"/>
        </disk>
      
      virsh domxml-to-native xen-xl domXML
      
      disk = [ "format=raw,vdev=xvda,access=rw,backendtype=target=/image/file/path" ]
      
      xl create xl.cfg
      config parsing error in disk specification: unknown value
      for backendtype: near `target=/image/file/path' in
      `format=raw,vdev=xvda,access=rw,backendtype=target=/image/file/path'
      e33cd67a
  21. 15 6月, 2016 1 次提交
  22. 14 6月, 2016 1 次提交
    • J
      xenconfig: support bios=ovmf xl.cfg · 53d98cce
      Jim Fehlig 提交于
      Add support to xenconfig for conversion of xl.cfg(5) bios config
      to/from libvirt domXml <loader> config. SeaBIOS is the default
      for HVM guests using upstream QEMU. ROMBIOS is the default when
      using the old qemu-dm. This patch allows specifying OVMF as an
      alternate firmware.
      
      Example xl.cfg:
        bios = "ovmf"
      
      Example domXML:
        <os>
          ...
          <loader readonly='yes' type='pflash'>/usr/lib/xen/boot/ovmf.bin</loader>
        </os>
      
      Note that currently Xen does not support a separate nvram for
      non-volatile variables.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      53d98cce
  23. 20 5月, 2016 1 次提交
  24. 18 5月, 2016 1 次提交
    • C
      xenFormatNet: correct `type=netfront' to 'type=vif' to match libxl · 03f8bba2
      Chunyan Liu 提交于
      According to current xl.cfg docs and xl codes, it uses type=vif
      instead of type=netfront.
      
      Currently after domxml-to-native, libvirt xml model=netfront will be
      converted to xl type=netfront. This has no problem before, xen codes
      for a long time just check type=ioemu, if not, set type to _VIF.
      
      Since libxl uses parse_nic_config to avoid duplicate codes, it
      compares 'type=vif' and 'type=ioemu' for valid parameters, others
      are considered as invalid, thus we have problem with type=netfront
      in xl config file.
       #xl create sles12gm-hvm.orig
       Parsing config from sles12gm-hvm.orig
       Invalid parameter `type'.
      
      Correct the conversion in libvirt, so that it matchs libxl codes
      and also xl.cfg.
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      03f8bba2
  25. 17 5月, 2016 1 次提交
  26. 16 4月, 2016 1 次提交
    • J
      Resolve a couple of memory leaks · 727a3c58
      John Ferlan 提交于
      Commit id '4b75237f' seems to have triggered Coverity into finding
      at least one memory leak in xen_xl.c for error path for cleanup where
      the listenAddr would be leaked. Reviewing other callers, it seems that
      qemu_parse_command.c would have the same issue, so just it too.
      727a3c58
  27. 13 4月, 2016 3 次提交
  28. 23 2月, 2016 3 次提交
    • M
      xen: Check return value of virStringReplace · e0392f5a
      Michal Privoznik 提交于
      After 6604a3dd in which new helper function has been
      introduced, the code calls virStringReplace and dereference the
      result immediately. The string function can, however, return NULL
      so this would SIGSEGV right away. Check for the return value of
      the string function.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      e0392f5a
    • J
      xenconfig: support xl<->xml conversion of rbd disk devices · 6604a3dd
      Jim Fehlig 提交于
      The target= setting in xl disk configuration can be used to encode
      meta info that is meaningful to a backend. Leverage this fact to
      support qdisk network disk types such as rbd. E.g. <disk> config
      such as
      
         <disk type='network' device='disk'>
           <driver name='qemu' type='raw'/>
           <source protocol='rbd' name='pool/image'>
             <host name='mon1.example.org' port='6321'/>
             <host name='mon2.example.org' port='6322'/>
             <host name='mon3.example.org' port='6322'/>
           </source>
           <target dev='hdb' bus='ide'/>
           <address type='drive' controller='0' bus='0' target='0' unit='1'/>
         </disk>
      
      can be converted to the following xl config (and vice versa)
      
        disk = [ "format=raw,vdev=hdb,access=rw,backendtype=qdisk,
                  target=rbd:pool/image:auth_supported=none:mon_host=mon1.example.org\\:6321\\;mon2.example.org\\:6322\\;mon3.example.org\\:6322"
               ]
      
      Note that in xl disk config, a literal backslash in target= must
      be escaped with a backslash. Conversion of <auth> config is not
      handled in this patch, but can be done in a follow-up patch.
      
      Also add a test for the conversions.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      6604a3dd
    • J
      xenconfig: produce key=value disk config syntax in xl formatter · a44f1f85
      Jim Fehlig 提交于
      The most formal form of xl disk configuration uses key=value
      syntax to define each configuration item, e.g.
      
      format=raw, vdev=xvda, access=rw, backendtype=phy, target=disksrc
      
      Change the xl disk formatter to produce this syntax, which allows
      target= to contain meta info needed to setup a network-based
      disksrc (e.g. rbd, nbd, iscsi). For details on xl disk config
      format, see  $xen-src/docs/misc/xl-disk-configuration.txt
      
      Update the disk config in the tests to use the formal syntax.
      But add tests to ensure disks specified with the positional
      parameter syntax are correctly converted to <disk> XML.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      a44f1f85
  29. 22 1月, 2016 2 次提交
    • I
      libxl: Support cmdline= in xl config files · daeace5c
      Ian Campbell 提交于
      ... and consolidate the cmdline/extra/root parsing to facilitate doing
      so.
      
      The logic is the same as xl's parse_cmdline from the current xen.git master
      branch (e6f0e099d2c17de47fd86e817b1998db903cab61).
      
      On the formatting side switch to producing cmdline= instead of extra=.
      
      Update a few tests and add serveral more.
        - test-cmdline is added to test the exclusive use of cmdline.
        - test-fullvirt-direct-kernel-boot.cfg is updated due to the switch
          on the formatting side and now tests the exclusive use of cmdline=.
        - Tests are added for both paravirt and fullvirt where the .cfg uses
          extra= and (paravirt only) root=. These are format (xl->xml) only
          since the inverse will generate cmdline= hence is not a round trip
          (which was already true if using root=, which used to generate
          extra= on the way back).
        - Tests are added for both paravirt and fullvirt where the .cfg
          declares cmdline= as well as bogus extra= and (paravirt only) root=
          entries which should be ignored. Again these are format only tests
          since the inverse won't include the bogus lines.
      
      The last two bullets here required splitting the DO_TEST macro into
      two halves, as is done in the xmconfigtest.c case.
      
      In order to introduce a use of VIR_WARN for logging I had to add
      virerror.h and VIR_LOG_INIT.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      daeace5c
    • J
      Xen: add XENXL to virErrorDomain enum · 8c3c32f1
      Jim Fehlig 提交于
      Add "Xen XL Config" to the virErrorDomain enum and use it in
      src/xenconfig/xen_xl.c.
      8c3c32f1
  30. 18 12月, 2015 1 次提交
  31. 09 12月, 2015 1 次提交
  32. 19 5月, 2015 2 次提交
    • J
      xenconfig: fix spice mousemode and copypaste · a5b55bd9
      Jim Fehlig 提交于
      From xl.cfg950 man page:
      
      spiceagent_mouse=BOOLEAN
      Whether SPICE agent is used for client mouse mode. The default is
      true (1) (turn on)
      
      spicevdagent=BOOLEAN
      Enables spice vdagent. The Spice vdagent is an optional component for
      enhancing user experience and performing guest-oriented management
      tasks. Its features includes: client mouse mode (no need to grab
      mouse by client, no mouse lag), automatic adjustment of screen
      resolution, copy and paste (text and image) between client and domU.
      It also requires vdagent service installed on domU o.s. to work.
      The default is 0.
      
      spice_clipboard_sharing=BOOLEAN
      Enables Spice clipboard sharing (copy/paste). It requires spicevdagent
      enabled. The default is false (0).
      
      So if spiceagent_mouse is enabled (client mouse mode) or
      spice_clipboard_sharing is enabled, spicevdagent must be enabled.
      Along with this change, s/spicedvagent/spicevdagent, set
      spiceagent_mouse correctly, and add a test for these spice
      features.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      a5b55bd9
    • J
      xenconfig: fix spicepasswd handling · a460295f
      Jim Fehlig 提交于
      The logic related to spicedisable_ticketing and spicepasswd was
      inverted.  As per man xl.cfg(5), 'spicedisable_ticketing = 1'
      means no passwd is required.  On the other hand, a passwd is
      required if 'spicedisable_ticketing = 0'.  Fix the logic and
      produce and error if 'spicedisable_ticketing = 0' but spicepasswd
      is not provided.  Also fix the spice cfg test file.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      a460295f