1. 04 6月, 2020 6 次提交
    • D
      conf: fix alignment in virObjectEvent to be 8 not 4 bytes · 2ac42f02
      Daniel P. Berrangé 提交于
      The previous fix accidentally picked up a debug change that put
      alignment back at 4, not 8, bytes as it claimed:
      
        commit 37ae0426
        Author: Daniel P. Berrangé <berrange@redhat.com>
        Date:   Wed Jun 3 11:18:23 2020 +0100
      
          conf: force 8 byte alignment for virObjectEvent
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      2ac42f02
    • A
      gitdm: Add missing entries · 03aec9c3
      Andrea Bolognani 提交于
      A few new individuals have contributed to libvirt since the last
      time the gitdm configuration was updated.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      03aec9c3
    • 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 1 次提交
    • D
      qemuProcessRefreshCPU: skip 'host-model' logic for pSeries guests · 9665b27d
      Daniel Henrique Barboza 提交于
      Commit v3.10.0-182-g237f045d ("qemu: Ignore fallback CPU attribute
      on reconnect") forced CPU 'fallback' to ALLOW, regardless of user
      choice. This fixed a situation in which guests created with older
      Libvirt versions, which used CPU mode 'host-model' in runtime, would
      fail to launch in a newer Libvirt if the fallback was set to FORBID.
      This would lead to a scenario where the CPU was translated to 'host-model'
      to 'custom', but then the FORBID setting would make the translation
      process fail.
      
      PSeries can operate with 'host-model' in runtime due to specific PPC64
      mechanics regarding compatibility mode. The update() implementation of
      the cpuDriverPPC64 driver is a NO-OP if CPU mode is 'host-model', and
      the driver does not implement translate(). The commit mentioned above
      is causing PSeries guests to get their 'fallback' setting to ALLOW,
      overwriting user choice, exposing a design problem in
      qemuProcessRefreshCPU() - for PSeries guests, handling 'host-model'
      as it is being done does not apply.
      
      All other cpuArchDrivers implements update() and changes guest mode
      to VIR_CPU_MODE_CUSTOM, meaning that PSeries is currently the only
      exception to this logic. Let's make it official.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1660711Suggested-by: NJiri Denemark <jdenemar@redhat.com>
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Message-Id: <20200525123945.4049591-2-danielhb413@gmail.com>
      Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
      9665b27d