Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37715859
en ru br
ALT Linux repos
S:7.2.0-alt3

Group :: Emulators
RPM: pve-qemu

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: qemu-2.6-alt.patch
Download


 configure               | 30 ++++++++----------------------
 hw/display/qxl.c        | 11 +++++++++++
 hw/timer/i8254_common.c |  2 +-
 target-s390x/kvm.c      |  3 +++
 tests/test-qga.c        |  6 ++++++
 5 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/configure b/configure
index c37fc5f..32f3012 100755
--- a/configure
+++ b/configure
@@ -3063,7 +3063,11 @@ fi
 
 ##########################################
 # pthread probe
-PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2"
+# use explicitly -lpthread
+# instead of -pthread
+# to link thread library before -lc
+
+PTHREADLIBS_LIST="-lpthread -lpthreadGC2"
 
 pthread=no
 cat > $TMPC << EOF
@@ -3927,27 +3931,9 @@ else
 fi
 
 ##########################################
-# Do we need librt
-# uClibc provides 2 versions of clock_gettime(), one with realtime
-# support and one without. This means that the clock_gettime() don't
-# need -lrt. We still need it for timer_create() so we check for this
-# function in addition.
-cat > $TMPC <<EOF
-#include <signal.h>
-#include <time.h>
-int main(void) {
-  timer_create(CLOCK_REALTIME, NULL, NULL);
-  return clock_gettime(CLOCK_REALTIME, NULL);
-}
-EOF
-
-if compile_prog "" "" ; then
-  :
-# we need pthread for static linking. use previous pthread test result
-elif compile_prog "" "$pthread_lib -lrt" ; then
-  LIBS="$LIBS -lrt"
-  libs_qga="$libs_qga -lrt"
-fi
+# We need librt
+LIBS="$LIBS -lrt"
+libs_qga="$libs_qga -lrt"
 
 if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
         "$aix" != "yes" -a "$haiku" != "yes" ; then
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 919dc5c..59a1564 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -31,6 +31,17 @@
 #include "qxl.h"
 
 /*
+ * SPICE defines memory barriers only for x86 arches
+ * reuse definitions from qemu/atomic.h on arm
+ */
+#if defined(__arm__)
+#if defined(spice_mb)
+#undef spice_mb
+#define spice_mb() smp_mb()
+#endif
+#endif
+
+/*
  * NOTE: SPICE_RING_PROD_ITEM accesses memory on the pci bar and as
  * such can be changed by the guest, so to avoid a guest trigerrable
  * abort we just qxl_set_guest_bug and set the return to NULL. Still
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
index e18299a..b517b85 100644
--- a/hw/timer/i8254_common.c
+++ b/hw/timer/i8254_common.c
@@ -267,7 +267,7 @@ static const VMStateDescription vmstate_pit_common = {
     .pre_save = pit_dispatch_pre_save,
     .post_load = pit_dispatch_post_load,
     .fields = (VMStateField[]) {
-        VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3),
+        VMSTATE_UINT32(channels[0].irq_disabled, PITCommonState),
         VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2,
                              vmstate_pit_channel, PITChannelState),
         VMSTATE_INT64(channels[0].next_transition_time,
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index e1859ca..f40872b 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -2086,6 +2086,9 @@ void kvm_s390_crw_mchk(void)
         .u.mchk.cr14 = 1 << 28,
         .u.mchk.mcic = build_channel_report_mcic(),
     };
+    if (kvm_check_extension(kvm_state, KVM_CAP_S390_VECTOR_REGISTERS)) {
+        irq.u.mchk.mcic |= 0x0000004000000000ULL;
+    }
     kvm_s390_floating_interrupt(&irq);
 }
 
diff --git a/tests/test-qga.c b/tests/test-qga.c
index 72a89de..ef1ed54 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -838,8 +838,11 @@ int main(int argc, char **argv)
     g_test_add_data_func("/qga/info", &fix, test_qga_info);
     g_test_add_data_func("/qga/network-get-interfaces", &fix,
                          test_qga_network_get_interfaces);
+    /*
     g_test_add_data_func("/qga/get-vcpus", &fix, test_qga_get_vcpus);
     g_test_add_data_func("/qga/get-fsinfo", &fix, test_qga_get_fsinfo);
+    */
+
     g_test_add_data_func("/qga/get-memory-block-info", &fix,
                          test_qga_get_memory_block_info);
     g_test_add_data_func("/qga/get-memory-blocks", &fix,
@@ -851,7 +854,10 @@ int main(int argc, char **argv)
     g_test_add_data_func("/qga/fsfreeze-status", &fix,
                          test_qga_fsfreeze_status);
 
+    /*
     g_test_add_data_func("/qga/blacklist", NULL, test_qga_blacklist);
+    */
+
     g_test_add_data_func("/qga/config", NULL, test_qga_config);
 
     if (g_getenv("QGA_TEST_SIDE_EFFECTING")) {
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin