1. 26 6月, 2018 2 次提交
  2. 21 6月, 2018 1 次提交
  3. 14 6月, 2018 1 次提交
  4. 12 6月, 2018 2 次提交
    • D
      conf: remove duplicated typedefs for virDomainSevDef · f26f9968
      Daniel P. Berrangé 提交于
      The typedefs were present twice in the header file which causes failures
      with some compilers, eg FreeBSD 10 CLang:
      
      ../../src/conf/domain_conf.h:2330:33: error: redefinition of typedef 'virDomainSevDef' is a C11 feature
      +[-Werror,-Wtypedef-redefinition]
      typedef struct _virDomainSevDef virDomainSevDef;
                                      ^
      ../../src/conf/domain_conf.h:145:33: note: previous definition is here
      typedef struct _virDomainSevDef virDomainSevDef;
                                      ^
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      f26f9968
    • B
      conf: Introduce launch-security element in domain · e5791a03
      Brijesh Singh 提交于
      The launch-security element can be used to define the security
      model to use when launching a domain. Currently we support 'sev'.
      
      When 'sev' is used, the VM will be launched with AMD SEV feature enabled.
      SEV feature supports running encrypted VM under the control of KVM.
      Encrypted VMs have their pages (code and data) secured such that only the
      guest itself has access to the unencrypted version. Each encrypted VM is
      associated with a unique encryption key; if its data is accessed to a
      different entity using a different key the encrypted guests data will be
      incorrectly decrypted, leading to unintelligible data.
      Signed-off-by: NBrijesh Singh <brijesh.singh@amd.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      e5791a03
  5. 08 6月, 2018 1 次提交
    • M
      conf, schema, docs: Add support for TSEG size setting · 1bd5a08d
      Martin Kletzander 提交于
      TSEG (Top of Memory Segment) is one of many regions that SMM (System Management
      Mode) can occupy.  This one, however is special, because a) most of the SMM code
      lives in TSEG nowadays and b) QEMU just (well, some time ago) added support for
      so called 'extended' TSEG.  The difference to the TSEG implemented in real q35's
      MCH (Memory Controller Hub) is that it can offer one extra size to the guest OS
      apart from the standard TSEG's 1, 2, and 8 MiB and that size can be selected in
      1 MiB increments.  Maximum may vary based on QEMU and is way too big, so we
      don't need to check for the maximum here.  Similarly to the memory size we'll
      leave it to the hypervisor to try satisfying that and giving us an error message
      in case it is not possible.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      Acked-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      1bd5a08d
  6. 07 6月, 2018 1 次提交
    • D
      Don't use enums in TPM struct fields · ed29219f
      Daniel P. Berrangé 提交于
      When using an enum in a struct field, the compiler is free to decide to
      make it an unsigned type if it desires. This in turn leads to bugs when
      code does
      
          if ((def->foo = virDomainFooTypeFromString(str)) < 0)
             ...
      
      because 'def->foo' can't technically have an unsigned value from the
      compiler's POV. While it is possible to add (int) casts in the code
      example above, this is not desirable because it is easy to miss out
      such casts. eg the code fixed here caused an error with clang builds
      
      ../../src/conf/domain_conf.c:12838:73: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare]
              if ((def->version = virDomainTPMVersionTypeFromString(version)) < 0) {
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      ed29219f
  7. 06 6月, 2018 2 次提交
  8. 05 6月, 2018 1 次提交
  9. 29 5月, 2018 5 次提交
  10. 25 5月, 2018 1 次提交
    • J
      conf: Add VM Generation ID parse/format support · b50efe97
      John Ferlan 提交于
      The VM Generation ID is a mechanism to provide a unique 128-bit,
      cryptographically random, and integer value identifier known as
      the GUID (Globally Unique Identifier) to the guest OS. The value
      is used to help notify the guest operating system when the virtual
      machine is executed with a different configuration.
      
      This patch adds support for a new "genid" XML element similar to
      the "uuid" element. The "genid" element can have two forms "<genid/>"
      or "<genid>$GUID</genid>". If the $GUID is not provided, libvirt
      will generate one and save it in the XML.
      
      Since adding support for a generated GUID (or UUID like) value to
      be displayed modifying the xml2xml test to include virrandommock.so
      is necessary since it will generate a "known" value.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      b50efe97
  11. 23 5月, 2018 2 次提交
  12. 16 5月, 2018 2 次提交
  13. 14 5月, 2018 1 次提交
  14. 04 5月, 2018 1 次提交
  15. 03 5月, 2018 1 次提交
  16. 02 5月, 2018 1 次提交
  17. 18 4月, 2018 3 次提交
  18. 12 4月, 2018 1 次提交
  19. 10 4月, 2018 1 次提交
  20. 06 4月, 2018 1 次提交
  21. 03 4月, 2018 2 次提交
  22. 14 3月, 2018 1 次提交
  23. 13 3月, 2018 1 次提交
  24. 07 3月, 2018 1 次提交
  25. 06 3月, 2018 1 次提交
  26. 23 2月, 2018 1 次提交
  27. 20 2月, 2018 2 次提交
    • D
      conf: add enum constants for default controller models · a302480d
      Daniel P. Berrangé 提交于
      The controller model is slightly unusual in that the default value is
      -1, not 0. As a result the default value is not covered by any of the
      existing enum cases. This in turn means that any switch() statements
      that think they have covered all cases, will in fact not match the
      default value at all. In the qemuDomainDeviceCalculatePCIConnectFlags()
      method this has caused a serious mistake where we fallthrough from the
      SCSI controller case, to the VirtioSerial controller case, and from
      the USB controller case to the IDE controller case.
      
      By adding explicit enum constant starting at -1, we can ensure switches
      remember to handle the default case.
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      a302480d
    • L
      conf: move 'generated' member from virMacAddr to virDomainNetDef · e62cb4a9
      Laine Stump 提交于
      Commit 7e62c4cd (first appearing in libvirt-3.9.0 as a resolution
      to rhbz #1343919) added a "generated" attribute to virMacAddr that was
      set whenever a mac address was auto-generated by libvirt. This
      knowledge was used in a single place - when trying to match a NetDef
      from the Domain to Delete with user-provided XML. Since the XML parser
      always auto-generates a MAC address for NetDefs when none is provided,
      it was previously impossible to make a search where the MAC address
      isn't significant, but the addition of the "generated" attribute made
      it possible for the search function to ignore auto-generated MACs.
      
      This implementation had a problem though - it was adding a field to a
      "low level" struct - virMacAddr - which is used in other places with
      the assumption that it contains exactly a 6 byte MAC address and
      nothing else. In particular, virNWFilterSnoopEthHdr uses virMacAddr as
      part of the definition of an ethernet packet header, whose layout must
      of course match an actual ethernet packet. Adding the extra bools into
      virNWFilterSnoopEthHdr caused the nwfilter driver's "IP discovery via
      DHCP packet snooping" functionality to mysteriously stop working.
      
      In order to fix that behavior, and prevent potential future similar
      odd behavior, this patch moves the "generated" member out of
      virMacAddr (so that it is again really is just a MAC address) into
      virDomainNetDef, and sets it only when virDomainNetGenerateMAC() is
      called from virDomainNetDefParseXML() (which is the only time we care
      about it).
      
      Resolves: https://bugzilla.redhat.com/1529338
      
      (It should also be applied to any maintenance branch that applies
      commit 7e62c4cd and friends to resolve
      https://bugzilla.redhat.com/1343919)
      Signed-off-by: NLaine Stump <laine@laine.org>
      e62cb4a9