1. 04 6月, 2020 4 次提交
    • D
      conf: force 8 byte alignment for virObjectEvent · 37ae0426
      Daniel P. Berrangé 提交于
      We need to be able to cast from virObjectEventPtr to one of
      its many subclasses. Some of these subclasses have 8 byte
      alignment on 32-bit platforms, but virObjectEventPtr only
      has 4 byte alignment.
      
      Previously the virObject base class had 8 byte alignment
      but this dropped to 4 byte when converted to inherit from
      GObject. This introduces cast alignment warnings on 32-bit:
      
      ../../src/conf/domain_event.c: In function 'virDomainEventDispatchDefaultFunc':
      ../../src/conf/domain_event.c:1656:30: error: cast increases required alignment of target type [-Werror=cast-align]
       1656 |             rtcChangeEvent = (virDomainEventRTCChangePtr)event;
            |                              ^
      ../../src/conf/domain_event.c:1785:34: error: cast increases required alignment of target type [-Werror=cast-align]
       1785 |             balloonChangeEvent = (virDomainEventBalloonChangePtr)event;
            |                                  ^
      ../../src/conf/domain_event.c:1896:35: error: cast increases required alignment of target type [-Werror=cast-align]
       1896 |             blockThresholdEvent = (virDomainEventBlockThresholdPtr)event;
            |                                   ^
      ../../src/conf/domain_event.c: In function 'virDomainQemuMonitorEventDispatchFunc':
      ../../src/conf/domain_event.c:1974:24: error: cast increases required alignment of target type [-Werror=cast-align]
       1974 |     qemuMonitorEvent = (virDomainQemuMonitorEventPtr)event;
            |                        ^
      ../../src/conf/domain_event.c: In function 'virDomainQemuMonitorEventFilter':
      ../../src/conf/domain_event.c:2179:20: error: cast increases required alignment of target type [-Werror=cast-align]
       2179 |     monitorEvent = (virDomainQemuMonitorEventPtr) event;
            |                    ^
      
      Forcing 8-byte alignment on virObjectEventPtr removes the
      alignment increase during casts to subclasses.
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      37ae0426
    • P
      qemucapabilitiestest: Bump qemu-5.1 capabilities for x86_64 · 031a6be1
      Peter Krempa 提交于
      QEMU added the machine types for the 5.1 release so let's update them.
      
      Other notable changes are 'cpu-throttle-tailslow' migration property,
      'zlib' compression for qcow2 images and absrtact socket support.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      031a6be1
    • M
      Use more of VIR_XPATH_NODE_AUTORESTORE · d3a7479c
      Michal Privoznik 提交于
      This is convenience macro, use it more. This commit was generated
      using the following spatch:
      
        @@
        symbol node;
        identifier old;
        identifier ctxt;
        type xmlNodePtr;
        @@
        - xmlNodePtr old;
        + VIR_XPATH_NODE_AUTORESTORE(ctxt);
          ...
        - old = ctxt->node;
          ... when != old
        - ctxt->node = old;
      
        @@
        symbol node;
        identifier old;
        identifier ctxt;
        type xmlNodePtr;
        @@
        - xmlNodePtr old = ctxt->node;
        + VIR_XPATH_NODE_AUTORESTORE(ctxt);
          ... when != old
        - ctxt->node = old;
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      d3a7479c
    • M
      virxml: Don't overwrite ctxt->node · 52351030
      Michal Privoznik 提交于
      This reverts b897973f
      
      Even though it may have been the case in the past, relative
      XPaths don't overwrite the ctxt->node. Thus, there's no need to
      save it.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      52351030
  2. 03 6月, 2020 16 次提交
  3. 02 6月, 2020 5 次提交
  4. 01 6月, 2020 1 次提交
  5. 30 5月, 2020 1 次提交
  6. 28 5月, 2020 1 次提交
  7. 27 5月, 2020 1 次提交
    • C
      security: don't fail if built without attr support · 55029d93
      Christian Ehrhardt 提交于
      If built without attr support removing any image will trigger
       qemuBlockRemoveImageMetadata (the one that emits the warning)
         -> qemuSecurityMoveImageMetadata
           -> virSecurityManagerMoveImageMetadata
             -> virSecurityDACMoveImageMetadata
               -> virSecurityDACMoveImageMetadataHelper
                 -> virProcessRunInFork (spawns subprocess)
                   -> virSecurityMoveRememberedLabel
      
      In there due to !HAVE_LIBATTR virFileGetXAttrQuiet will return
      ENOSYS and from there the chain will error out.
      
      That is wrong and looks like:
        libvirtd[6320]: internal error: child reported (status=125):
        libvirtd[6320]: Unable to remove disk metadata on vm testguest from
        /var/lib/uvtool/libvirt/images/testguest.qcow (disk target vda)
      
      This change makes virSecurityDACMoveImageMetadataHelper and
      virSecuritySELinuxMoveImageMetadataHelper accept that
      error code gracefully and in that sense it is an extension of:
      5214b2f1 "security: Don't skip label restore on file systems lacking XATTRs"
      which does the same for other call chains into the virFile*XAttr functions.
      Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      55029d93
  8. 26 5月, 2020 8 次提交
  9. 25 5月, 2020 3 次提交