1. 15 5月, 2015 1 次提交
  2. 21 4月, 2015 4 次提交
  3. 17 4月, 2015 5 次提交
    • J
      libxl: support HVM direct kernel boot · 13e2c220
      Jim Fehlig 提交于
      Add support for HVM direct kernel boot in libxl.  Also add a
      test to verify domXML <-> native conversions.
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      13e2c220
    • J
      xenconfig: don't use "kernel" for hvmloader · 0fe504f1
      Jim Fehlig 提交于
      In xl config, hvmloader is implied for hvm guests.  It is not
      specified with the "kernel" option like xm config.  The "kernel"
      option, along with "ramdisk" and "extra", is used for HVM direct
      kernel boot.  Instead of using "kernel" option to populate
      virDomainDef object's os.loader->path, use hvmloader discovered
      when gathering capabilities.
      
      This change required fixing initialization of capabilities in
      the test utils and removing 'kernel = "/usr/lib/xen/boot/hvmloader"'
      from the test config files.
      0fe504f1
    • J
      xenconfig: move <os> parsing/formating to config-specific files · 717a9251
      Jim Fehlig 提交于
      xl and xm differ a bit in how <os> configuration is represented.
      E.g. xl config supports <os><nvram .../></os> via its "bios"
      setting.
      
      Move the xenParseOS and xenFormatOS functions from xen_common.c
      and copy to xen_xl.c and xen_xm.c so they can be customized for
      xm vs xl config.  An unfortunate fallout is reordering of entries
      in the test config files.
      717a9251
    • J
      xenconfig: remove redunant parsing of device_model · a9b0d647
      Jim Fehlig 提交于
      device_model is parsed in xenParseOS(), then later in
      xenParseConfigCommon().  <emulator> is not part of <os>,
      so makes sense to remove the parsing in xenParseOS().
      a9b0d647
    • J
      xenconfig: export xenConfigCopyString · 8680a19b
      Jim Fehlig 提交于
      Export xenConfigCopyString for use outside of xen_common.c
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      8680a19b
  4. 13 4月, 2015 1 次提交
  5. 23 3月, 2015 1 次提交
  6. 16 3月, 2015 1 次提交
    • P
      conf: Replace access to def->mem.max_balloon with accessor functions · 4f9907cd
      Peter Krempa 提交于
      As there are two possible approaches to define a domain's memory size -
      one used with legacy, non-NUMA VMs configured in the <memory> element
      and per-node based approach on NUMA machines - the user needs to make
      sure that both are specified correctly in the NUMA case.
      
      To avoid this burden on the user I'd like to replace the NUMA case with
      automatic totaling of the memory size. To achieve this I need to replace
      direct access to the virDomainMemtune's 'max_balloon' field with
      two separate getters depending on the desired size.
      
      The two sizes are needed as:
      1) Startup memory size doesn't include memory modules in some
      hypervisors.
      2) After startup these count as the usable memory size.
      
      Note that the comments for the functions are future aware and document
      state that will be present after a few later patches.
      4f9907cd
  7. 14 3月, 2015 1 次提交
  8. 21 2月, 2015 1 次提交
  9. 14 1月, 2015 1 次提交
    • J
      Introduce support for parsing/formatting Xen xl config format · 4689cdf7
      Jim Fehlig 提交于
      Introduce a parser/formatter for the xl config format.  Since the
      deprecation of xm/xend, the VM config file format has diverged as
      new features are added to libxl.  This patch adds support for parsing
      and formating the xl config format.  It supports the existing xm config
      format, plus adds support for spice graphics and xl disk config syntax.
      
      Disk config is specified a bit differently in xl as compared to xm.  In
      xl, disk config consists of comma-separated positional parameters and
      keyword/value pairs separated by commas. Positional parameters are
      specified as follows
      
         target, format, vdev, access
      
      Supported keys for key=value options are
      
        devtype, backendtype
      
      The positional paramters can also be specified in key/value form.  For
      example the following xl disk config are equivalent
      
          /dev/vg/guest-volume,,hda
          /dev/vg/guest-volume,raw,hda,rw
          format=raw, vdev=hda, access=rw, target=/dev/vg/guest-volume
      
      See $xen_sources/docs/misc/xl-disk-configuration.txt for more details.
      
      xl disk config is parsed with the help of xlu_disk_parse() from
      libxlutil, libxl's utility library.  Although the library exists
      in all Xen versions supported by the libxl virt driver, only
      recently has the corresponding header file been included.  A check
      for the header is done in configure.ac.  If not found, xlu_disk_parse()
      is declared externally.
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      4689cdf7
  10. 13 1月, 2015 1 次提交
  11. 06 1月, 2015 2 次提交
  12. 05 1月, 2015 1 次提交
    • C
      xenconfig: set HVM pae/apic/acpi/ default to 1 · 90ed3bd0
      Chunyan Liu 提交于
      According to xm.config manual, HVM pae|apic|acpi feature default
      is 1 (enabled). But in conversion from xm config to libvirt xml,
      if xm config doesn't contain pae|apic|acpi, it sets default value
      to 0, this causes some problems in HVM guest.
      
      Update parser codes to set HVM pae|apic|acpi default value to 1
      to match xm config convension.
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      90ed3bd0
  13. 04 1月, 2015 2 次提交
    • K
      src/xenconfig: Xen-xl parser · 2c78051a
      Kiarie Kahurani 提交于
      Introduce a Xen xl parser
      
      This parser allows for users to convert the new xl disk format and
      spice graphics config to libvirt xml format and vice versa. Regarding
      the spice graphics config, the code is pretty much straight forward.
      For the disk {formating, parsing}, this parser takes care of the new
      xl format which include positional parameters and key/value parameters.
      In xl format disk config a <diskspec> consists of parameters separated by
      commas. If the parameters do not contain an '=' they are automatically
      assigned to certain options following the order below
      
         target, format, vdev, access
      
      The above are the only mandatory parameters in the <diskspec> but there
      are many more disk config options. These options can be specified as
      key=value pairs. This takes care of the rest of the options such as
      
        devtype, backend, backendtype, script, direct-io-safe,
      
      The positional paramters can also be specified in key/value form
      for example
      
          /dev/vg/guest-volume,,hda
          /dev/vg/guest-volume,raw,hda,rw
          format=raw, vdev=hda, access=rw, target=/dev/vg/guest-volume
      
      are interpleted to one config.
      
      In xm format, the above diskspec would be written as
      
      phy:/dev/vg/guest-volume,hda,w
      
      The disk parser is based on the same parser used successfully by
      the Xen project for several years now.  Ian Jackson authored the
      scanner, which is used by this commit with mimimal changes.  Only
      the PREFIX option is changed, to produce function and file names
      more consistent with libvirt's convention.
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      2c78051a
    • K
      src/xenconfig: Export helper functions · 7ad117b2
      Kiarie Kahurani 提交于
      Export helper functions for reuse in getting values
      from a virConfPtr object
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      7ad117b2
  14. 15 12月, 2014 2 次提交
  15. 03 12月, 2014 1 次提交
    • J
      Replace virNetworkFree with virObjectUnref · 121c09a9
      John Ferlan 提交于
      Since virNetworkFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      121c09a9
  16. 15 11月, 2014 1 次提交
  17. 10 9月, 2014 1 次提交
    • M
      conf: Extend <loader/> and introduce <nvram/> · 68bf13db
      Michal Privoznik 提交于
      Up to now, users can configure BIOS via the <loader/> element. With
      the upcoming implementation of UEFI this is not enough as BIOS and
      UEFI are conceptually different. For instance, while BIOS is ROM, UEFI
      is programmable flash (although all writes to code section are
      denied). Therefore we need new attribute @type which will
      differentiate the two. Then, new attribute @readonly is introduced to
      reflect the fact that some images are RO.
      
      Moreover, the OVMF (which is going to be used mostly), works in two
      modes:
      1) Code and UEFI variable store is mixed in one file.
      2) Code and UEFI variable store is separated in two files
      
      The latter has advantage of updating the UEFI code without losing the
      configuration. However, in order to represent the latter case we need
      yet another XML element: <nvram/>. Currently, it has no additional
      attributes, it's just a bare element containing path to the variable
      store file.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Acked-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      68bf13db
  18. 07 9月, 2014 1 次提交
    • E
      maint: update to latest gnulib · 0e8bed81
      Eric Blake 提交于
      The usual portability fixes; and this includes a fix that adds
      a new syntax check for double semicolons (commit 28de556d fixed
      some, but gnulib found a better check).
      
      * .gnulib: Update to latest.
      * src/xenconfig/xen_common.c (xenFormatConfigCommon): Fix offender.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      0e8bed81
  19. 04 9月, 2014 1 次提交
    • E
      maint: use consistent if-else braces in xen and friends · fb6d6507
      Eric Blake 提交于
      I'm about to add a syntax check that enforces our documented
      HACKING style of always using matching {} on if-else statements.
      
      This patch focuses on code related to xen.
      
      * src/libxl/libxl_conf.c (libxlCapsInitGuests)
      (libxlMakeDomBuildInfo): Correct use of {}.
      * src/xen/xen_hypervisor.c (virXen_getvcpusinfo)
      (xenHypervisorMakeCapabilitiesInternal): Likewise.
      * src/xen/xend_internal.c (xenDaemonOpen)
      (xenDaemonDomainMigratePerform, xend_detect_config_version)
      (xenDaemonDetachDeviceFlags, xenDaemonDomainMigratePerform)
      (xenDaemonDomainBlockPeek): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiConnectListDomains)
      (xenapiDomainLookupByUUID, xenapiDomainGetOSType): Likewise.
      * src/xenconfig/xen_common.c (xenParseCPUFeatures, xenFormatNet):
      Likewise.
      * src/xenconfig/xen_sxpr.c (xenParseSxpr, xenFormatSxprNet)
      (xenFormatSxpr): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      fb6d6507
  20. 28 8月, 2014 2 次提交
    • J
      xen_xm: Resolve Coverity USE_AFTER_FREE · cfbbeb36
      John Ferlan 提交于
      If virDomainDiskDefFree(disk) is called in 'skipdisk:', then it's possible
      to either return to skipdisk without reallocating a new disk (via the if
      condition just prior) or to end the loop having deleted the disk. Since
      virDomainDiskDefFree() does not pass by reference, disk isn't changed in
      this context, thus the possible issue.
      cfbbeb36
    • J
      xen_common: Resolve Coverity USE_AFTER_FREE · 0454f23c
      John Ferlan 提交于
      There were two warnings in this module
      
        If the VIR_ALLOC_N(def->serials, 1) fails, then a virDomainChrDefFree(chr)
        is called and we jump to cleanup which makes the same call. Just remove
        the one after VIR_ALLOC_N()
      
        In the label "skipnic:" a virDomainNetDefFree(net) is made; however, if
        in going back to the top of the loop we jump back down to skipnic for any
        reason, the call will attempt to free an already freed structure since
        "net" was not passed by reference to virDomainNetDefFree().  Just set
        net = NULL in skipnic: to resolve the issue.
      0454f23c
  21. 23 8月, 2014 1 次提交
  22. 19 8月, 2014 4 次提交