1. 29 10月, 2013 1 次提交
    • G
      capabilities: add baselabel per sec driver/virt type to secmodel · b51038a4
      Giuseppe Scrivano 提交于
      Expand the "secmodel" XML fragment of "host" with a sequence of
      baselabel's which describe the default security context used by
      libvirt with a specific security model and virtualization type:
      
      <secmodel>
        <model>selinux</model>
        <doi>0</doi>
        <baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel>
        <baselabel type='qemu'>system_u:system_r:svirt_tcg_t:s0</baselabel>
      </secmodel>
      <secmodel>
        <model>dac</model>
        <doi>0</doi>
        <baselabel type='kvm'>107:107</baselabel>
        <baselabel type='qemu'>107:107</baselabel>
      </secmodel>
      
      "baselabel" is driver-specific information, e.g. in the DAC security
      model, it indicates USER_ID:GROUP_ID.
      Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b51038a4
  2. 18 7月, 2013 1 次提交
    • P
      caps: Add helpers to convert NUMA nodes to corresponding CPUs · b8b38321
      Peter Krempa 提交于
      These helpers use the remembered host capabilities to retrieve the cpu
      map rather than query the host again. The intended usage for this
      helpers is to fix automatic NUMA placement with strict memory alloc. The
      code doing the prepare needs to pin the emulator process only to cpus
      belonging to a subset of NUMA nodes of the host.
      b8b38321
  3. 11 7月, 2013 1 次提交
  4. 01 7月, 2013 1 次提交
  5. 23 5月, 2013 1 次提交
  6. 21 5月, 2013 1 次提交
  7. 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
  8. 05 4月, 2013 2 次提交
    • P
      virCaps: get rid of macPrefix field · 46becc18
      Peter Krempa 提交于
      Use the virDomainXMLConf structure to hold this data and tweak the code
      to avoid semantic change.
      
      Without configuration the KVM mac prefix is used by default. I chose it
      as it's in the privately administered segment so it should be usable for
      any purposes.
      46becc18
    • P
      virCaps: get rid of emulatorRequired · b5def001
      Peter Krempa 提交于
      This patch removes the emulatorRequired field and associated
      infrastructure from the virCaps object. Instead the driver specific
      callbacks are used as this field isn't enforced by all drivers.
      
      This patch implements the appropriate callbacks in the qemu and lxc
      driver and moves to check to that location.
      b5def001
  9. 09 3月, 2013 1 次提交
  10. 08 2月, 2013 1 次提交
  11. 24 1月, 2013 3 次提交
  12. 21 12月, 2012 5 次提交
  13. 19 12月, 2012 1 次提交
  14. 21 9月, 2012 1 次提交
  15. 21 8月, 2012 2 次提交
  16. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  17. 17 7月, 2012 1 次提交
    • S
      Convert 'raw MAC address' usages to use virMacAddr · 387117ad
      Stefan Berger 提交于
      Introduce new members in the virMacAddr 'class'
      - virMacAddrSet: set virMacAddr from a virMacAddr
      - virMacAddrSetRaw: setting virMacAddr from raw 6 byte MAC address buffer
      - virMacAddrGetRaw: writing virMacAddr into raw 6 byte MAC address buffer
      - virMacAddrCmp: comparing two virMacAddr
      - virMacAddrCmpRaw: comparing a virMacAddr with a raw 6 byte MAC address buffer
      
      then replace raw MAC addresses by replacing
      
      - 'unsigned char *' with virMacAddrPtr
      - 'unsigned char ... [VIR_MAC_BUFLEN]' with virMacAddr
      
      and introduce usage of above functions where necessary.
      387117ad
  18. 21 2月, 2012 1 次提交
    • C
      caps: Improve error if passed an unknown arch · e1ecba46
      Cole Robinson 提交于
      Previously we would have:
      
      "os type 'hvm' & arch 'idontexist' combination is not supported"
      
      Now we get
      
      "No guest options available for arch 'idontexist'"
      
      or if options available but guest OS type not applicable:
      
      "No os type 'xen' available for arch 'x86_64'"
      e1ecba46
  19. 28 1月, 2012 1 次提交
  20. 17 1月, 2012 1 次提交
    • J
      Add support for cpu mode attribute · f7dd3a4e
      Jiri Denemark 提交于
      The mode can be either of "custom" (default), "host-model",
      "host-passthrough". The semantics of each mode is described in the
      following examples:
      
      - guest CPU is a default model with specified topology:
          <cpu>
            <topology sockets='1' cores='2' threads='1'/>
          </cpu>
      
      - guest CPU matches selected model:
          <cpu mode='custom' match='exact'>
            <model>core2duo</model>
          </cpu>
      
      - guest CPU should be a copy of host CPU as advertised by capabilities
        XML (this is a short cut for manually copying host CPU specification
        from capabilities to domain XML):
          <cpu mode='host-model'/>
      
        In case a hypervisor does not support the exact host model, libvirt
        automatically falls back to a closest supported CPU model and
        removes/adds features to match host. This behavior can be disabled by
          <cpu mode='host-model'>
            <model fallback='forbid'/>
          </cpu>
      
      - the same as previous returned by virDomainGetXMLDesc with
        VIR_DOMAIN_XML_UPDATE_CPU flag:
          <cpu mode='host-model' match='exact'>
            <model fallback='allow'>Penryn</model>       --+
            <vendor>Intel</vendor>                         |
            <topology sockets='2' cores='4' threads='1'/>  + copied from
            <feature policy='require' name='dca'/>         | capabilities XML
            <feature policy='require' name='xtpr'/>        |
            ...                                          --+
          </cpu>
      
      - guest CPU should be exactly the same as host CPU even in the aspects
        libvirt doesn't model (such domain cannot be migrated unless both
        hosts contain exactly the same CPUs):
          <cpu mode='host-passthrough'/>
      
      - the same as previous returned by virDomainGetXMLDesc with
        VIR_DOMAIN_XML_UPDATE_CPU flag:
          <cpu mode='host-passthrough' match='minimal'>
            <model>Penryn</model>                        --+ copied from caps
            <vendor>Intel</vendor>                         | XML but doesn't
            <topology sockets='2' cores='4' threads='1'/>  | describe all
            <feature policy='require' name='dca'/>         | aspects of the
            <feature policy='require' name='xtpr'/>        | actual guest CPU
            ...                                          --+
          </cpu>
      f7dd3a4e
  21. 30 11月, 2011 4 次提交
    • D
      Remove powerMgmt_valid field from capabilities struct · f1f28611
      Daniel P. Berrange 提交于
      If we ensure that virNodeSuspendGetTargetMask always resets
      *bitmask to zero upon failure, there is no need for the
      powerMgmt_valid field.
      
      * src/util/virnodesuspend.c: Ensure *bitmask is zero upon
        failure
      * src/conf/capabilities.c, src/conf/capabilities.h: Remove
        powerMgmt_valid field
      * src/qemu/qemu_capabilities.c: Remove powerMgmt_valid
      f1f28611
    • D
      Move the virHostPMCapability enum helpers into capabilities.c · 6ea25cd9
      Daniel P. Berrange 提交于
      The virHostPMCapability enum helper was declared in util.h
      but implemented in capabilities.c, which is in a completely
      separate library at link time. Move the declaration into the
      capabilities.c file and rename it to match normal conventions
      
      * src/util/util.h: Remove virHostPMCapability enum decl
      * src/conf/capabilities.c: Add virCapsHostPMTarget enum
      6ea25cd9
    • D
      Fix capabilities XML to use generic terms for suspend targets · ae5e5528
      Daniel P. Berrange 提交于
      The capabilities XML uses the x86 specific terms 'S3', 'S4'
      and 'Hybrid-Syspend'. Switch it to use the same terminology
      as the API constants and virsh options, eg 'suspend_mem'
      'suspend_disk' and 'suspend_hybrid'
      
      * docs/formatcaps.html.in, docs/schemas/capability.rng,
        src/conf/capabilities.c: Rename suspend constants
      ae5e5528
    • D
      Remove internal only virHostPMCapability enum · 6fb5400f
      Daniel P. Berrange 提交于
      The internal virHostPMCapability enum just duplicates the
      public virNodeSuspendTarget enum, but with different names.
      
      * src/util/util.c: Use VIR_NODE_SUSPEND_TARGET constants
      * src/util/util.h: Remove virHostPMCapability enum
      * src/conf/capabilities.c: Use VIR_NODE_SUSPEND_TARGET_LAST
      6fb5400f
  22. 29 11月, 2011 1 次提交
    • S
      Add 'Hybrid-Suspend' power management discovery for the host · 302743f1
      Srivatsa S. Bhat 提交于
      Some systems support a feature known as 'Hybrid-Suspend', apart from the
      usual system-wide sleep states such as Suspend-to-RAM (S3) or Suspend-to-Disk
      (S4). Add the functionality to discover this power management feature and
      export it in the capabilities XML under the <power_management> tag.
      302743f1
  23. 22 11月, 2011 2 次提交
    • D
      Add strings.h include to capabilities.h for ffs() function prototype · 720442e2
      Daniel P. Berrange 提交于
      On Mingw32 the ffs() function was not declared due to missing header
      include
      
      * src/conf/capabilities.c: The ffs() function lives in strings.h
      720442e2
    • S
      Export KVM Host Power Management capabilities · e352b164
      Srivatsa S. Bhat 提交于
      This patch exports KVM Host Power Management capabilities as XML so that
      higher-level systems management software can make use of these features
      available in the host.
      
      The script "pm-is-supported" (from pm-utils package) is run to discover if
      Suspend-to-RAM (S3) or Suspend-to-Disk (S4) is supported by the host.
      If either of them are supported, then a new tag "<power_management>" is
      introduced in the XML under the <host> tag.
      
      However in case the query to check for power management features succeeded,
      but the host does not support any such feature, then the XML will contain
      an empty <power_management/> tag. In the event that the PM query itself
      failed, the XML will not contain any "power_management" tag.
      
      To use this, new APIs could be implemented in libvirt to exploit power
      management features such as S3/S4.
      e352b164
  24. 21 10月, 2011 1 次提交
    • E
      snapshot: simplify indentation of cpu features · 4eedfd07
      Eric Blake 提交于
      Auto-indent makes life a bit easier; this patch also drops unused
      arguments and replaces a misspelled flag name with two entry points
      instead, so that callers don't have to worry about how much spacing
      is present when embedding cpu elements.
      
      * src/conf/cpu_conf.h (virCPUFormatFlags): Delete.
      (virCPUDefFormat): Drop unused argument.
      (virCPUDefFormatBuf): Alter signature.
      (virCPUDefFormatBufFull): New prototype.
      * src/conf/cpu_conf.c (virCPUDefFormatBuf): Split...
      (virCPUDefFormatBufFull): ...into new function.
      (virCPUDefFormat): Adjust caller.
      * src/conf/domain_conf.c (virDomainDefFormatInternal): Likewise.
      * src/conf/capabilities.c (virCapabilitiesFormatXML): Likewise.
      * src/cpu/cpu.c (cpuBaselineXML): Likewise.
      * tests/cputest.c (cpuTestCompareXML): Likewise.
      4eedfd07
  25. 06 5月, 2011 1 次提交
    • E
      maint: rename virBufferVSprintf to virBufferAsprintf · 68ea80cf
      Eric Blake 提交于
      We already have virAsprintf, so picking a similar name helps for
      seeing a similar purpose.  Furthermore, the prefix V before printf
      generally implies 'va_list', even though this variant was '...', and
      the old name got in the way of adding a new va_list version.
      
      global rename performed with:
      
      $ git grep -l virBufferVSprintf \
        | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g'
      
      then revert the changes in ChangeLog-old.
      68ea80cf
  26. 18 1月, 2011 1 次提交
    • J
      Introduce per-device boot element · 94234fa2
      Jiri Denemark 提交于
      Currently, boot order can be specified per device class but there is no
      way to specify exact disk/NIC device to boot from.
      
      This patch adds <boot order='N'/> element which can be used inside
      <disk/> and <interface/>. This is incompatible with the older os/boot
      element. Since not all hypervisors support per-device boot
      specification, new deviceboot flag is included in capabilities XML for
      hypervisors which understand the new boot element. Presence of the flag
      allows (but doesn't require) users to use the new style boot order
      specification.
      94234fa2
  27. 19 11月, 2010 1 次提交
    • E
      capabilities, cpu: use new array API · aca20efb
      Eric Blake 提交于
      * src/conf/capabilities.h (_virCaps, _virCapsHost, _virCapsGuest)
      (_virCapsGuestArch): Add additional fields.
      * src/conf/cpu_conf.h (_virCPUDef): Likewise.
      * src/conf/capabilities.c (virCapabilitiesFormatXML): Reflect
      updated type.
      (virCapabilitiesAddGuest, virCapabilitiesAddHostFeature)
      (virCapabilitiesAddHostMigrateTransport)
      (virCapabilitiesAddHostNUMACell, virCapabilitiesAddGuestFeature)
      (virCapabilitiesAddGuestDomain): Use new array APIs.
      * src/conf/cpu_conf.c (virCPUDefAddFeature, virCPUDefCopy)
      (virCPUDefParseXML): Likewise.
      * tests/testutilsqemu.c (testQemuCapsInit): Adjust test.
      aca20efb
  28. 21 7月, 2010 1 次提交