All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/8] Misc patches (tests, docs, compat machines)
@ 2022-01-05 12:36 Thomas Huth
  2022-01-05 12:36 ` [PULL 1/8] hw: Add compat machines for 7.0 Thomas Huth
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Thomas Huth @ 2022-01-05 12:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

 Hi!

The following changes since commit fb084237a3b78b20fd9d888dffd673b6656ea3be:

  common-user: Really fix i386 calls to safe_syscall_set_errno_tail (2022-01-04 21:14:23 -0800)

are available in the Git repository at:

  https://gitlab.com/thuth/qemu.git tags/pull-request-2022-01-05

for you to fetch changes up to 057dc9a635fe37118a98b32e8bd9d8ed47b1a102:

  docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name (2022-01-05 11:10:13 +0100)

----------------------------------------------------------------
* Add compat machines for 7.0
* Some minor qtest and unit test improvements
* Remove -no-quit option
* Fixes for the docs

----------------------------------------------------------------
Cornelia Huck (1):
      hw: Add compat machines for 7.0

Marc-André Lureau (1):
      docs/sphinx: fix compatibility with sphinx < 1.8

Philippe Mathieu-Daudé (1):
      tests/unit/test-util-sockets: Use g_file_open_tmp() to create temp file

Thomas Huth (5):
      tests/qtest/test-x86-cpuid-compat: Check for machines before using them
      tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it
      qemu-options: Remove the deprecated -no-quit option
      gitlab-ci: Enable docs in the centos job
      docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name

 .gitlab-ci.d/buildtest.yml          |  2 +-
 docs/about/deprecated.rst           |  6 ---
 docs/about/removed-features.rst     |  7 +++
 docs/sphinx/fakedbusdoc.py          |  4 +-
 docs/tools/qemu-trace-stap.rst      | 24 +++++------
 hw/arm/virt.c                       |  9 +++-
 hw/core/machine.c                   |  3 ++
 hw/i386/pc.c                        |  3 ++
 hw/i386/pc_piix.c                   | 14 +++++-
 hw/i386/pc_q35.c                    | 13 +++++-
 hw/ppc/spapr.c                      | 15 ++++++-
 hw/s390x/s390-virtio-ccw.c          | 14 +++++-
 include/hw/boards.h                 |  3 ++
 include/hw/i386/pc.h                |  3 ++
 qemu-options.hx                     |  8 ----
 softmmu/vl.c                        |  8 +---
 tests/qtest/hd-geo-test.c           |  8 ++--
 tests/qtest/test-x86-cpuid-compat.c | 85 +++++++++++++++++++++----------------
 tests/unit/test-util-sockets.c      |  6 ++-
 19 files changed, 151 insertions(+), 84 deletions(-)



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PULL 1/8] hw: Add compat machines for 7.0
  2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
@ 2022-01-05 12:36 ` Thomas Huth
  2022-01-05 12:36 ` [PULL 2/8] tests/qtest/test-x86-cpuid-compat: Check for machines before using them Thomas Huth
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2022-01-05 12:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Andrew Jones, Daniel P . Berrangé,
	Juan Quintela, Cornelia Huck, Richard Henderson,
	Christian Borntraeger, Cédric Le Goater

From: Cornelia Huck <cohuck@redhat.com>

Add 7.0 machine types for arm/i440fx/q35/s390x/spapr.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20211217143948.289995-1-cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/virt.c              |  9 ++++++++-
 hw/core/machine.c          |  3 +++
 hw/i386/pc.c               |  3 +++
 hw/i386/pc_piix.c          | 14 +++++++++++++-
 hw/i386/pc_q35.c           | 13 ++++++++++++-
 hw/ppc/spapr.c             | 15 +++++++++++++--
 hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++-
 include/hw/boards.h        |  3 +++
 include/hw/i386/pc.h       |  3 +++
 9 files changed, 71 insertions(+), 6 deletions(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 6bce595aba..4593fea1ce 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2856,10 +2856,17 @@ static void machvirt_machine_init(void)
 }
 type_init(machvirt_machine_init);
 
+static void virt_machine_7_0_options(MachineClass *mc)
+{
+}
+DEFINE_VIRT_MACHINE_AS_LATEST(7, 0)
+
 static void virt_machine_6_2_options(MachineClass *mc)
 {
+    virt_machine_7_0_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
 }
-DEFINE_VIRT_MACHINE_AS_LATEST(6, 2)
+DEFINE_VIRT_MACHINE(6, 2)
 
 static void virt_machine_6_1_options(MachineClass *mc)
 {
diff --git a/hw/core/machine.c b/hw/core/machine.c
index a4a2df405f..debcdc0e70 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -37,6 +37,9 @@
 #include "hw/virtio/virtio.h"
 #include "hw/virtio/virtio-pci.h"
 
+GlobalProperty hw_compat_6_2[] = {};
+const size_t hw_compat_6_2_len = G_N_ELEMENTS(hw_compat_6_2);
+
 GlobalProperty hw_compat_6_1[] = {
     { "vhost-user-vsock-device", "seqpacket", "off" },
     { "nvme-ns", "shared", "off" },
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a2ef40ecbc..fccde2ef39 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -94,6 +94,9 @@
 #include "trace.h"
 #include CONFIG_DEVICES
 
+GlobalProperty pc_compat_6_2[] = {};
+const size_t pc_compat_6_2_len = G_N_ELEMENTS(pc_compat_6_2);
+
 GlobalProperty pc_compat_6_1[] = {
     { TYPE_X86_CPU, "hv-version-id-build", "0x1bbc" },
     { TYPE_X86_CPU, "hv-version-id-major", "0x0006" },
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 223dd3e05d..1999190276 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -413,7 +413,7 @@ static void pc_i440fx_machine_options(MachineClass *m)
     machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
 }
 
-static void pc_i440fx_6_2_machine_options(MachineClass *m)
+static void pc_i440fx_7_0_machine_options(MachineClass *m)
 {
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_i440fx_machine_options(m);
@@ -422,6 +422,18 @@ static void pc_i440fx_6_2_machine_options(MachineClass *m)
     pcmc->default_cpu_version = 1;
 }
 
+DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", NULL,
+                      pc_i440fx_7_0_machine_options);
+
+static void pc_i440fx_6_2_machine_options(MachineClass *m)
+{
+    pc_i440fx_7_0_machine_options(m);
+    m->alias = NULL;
+    m->is_default = false;
+    compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len);
+    compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len);
+}
+
 DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", NULL,
                       pc_i440fx_6_2_machine_options);
 
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index e1e100316d..2e981f436c 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -360,7 +360,7 @@ static void pc_q35_machine_options(MachineClass *m)
     m->max_cpus = 288;
 }
 
-static void pc_q35_6_2_machine_options(MachineClass *m)
+static void pc_q35_7_0_machine_options(MachineClass *m)
 {
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_machine_options(m);
@@ -368,6 +368,17 @@ static void pc_q35_6_2_machine_options(MachineClass *m)
     pcmc->default_cpu_version = 1;
 }
 
+DEFINE_Q35_MACHINE(v7_0, "pc-q35-7.0", NULL,
+                   pc_q35_7_0_machine_options);
+
+static void pc_q35_6_2_machine_options(MachineClass *m)
+{
+    pc_q35_7_0_machine_options(m);
+    m->alias = NULL;
+    compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len);
+    compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len);
+}
+
 DEFINE_Q35_MACHINE(v6_2, "pc-q35-6.2", NULL,
                    pc_q35_6_2_machine_options);
 
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 3b5fd749be..8373429325 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4665,15 +4665,26 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
     }                                                                \
     type_init(spapr_machine_register_##suffix)
 
+/*
+ * pseries-7.0
+ */
+static void spapr_machine_7_0_class_options(MachineClass *mc)
+{
+    /* Defaults for the latest behaviour inherited from the base class */
+}
+
+DEFINE_SPAPR_MACHINE(7_0, "7.0", true);
+
 /*
  * pseries-6.2
  */
 static void spapr_machine_6_2_class_options(MachineClass *mc)
 {
-    /* Defaults for the latest behaviour inherited from the base class */
+    spapr_machine_7_0_class_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
 }
 
-DEFINE_SPAPR_MACHINE(6_2, "6.2", true);
+DEFINE_SPAPR_MACHINE(6_2, "6.2", false);
 
 /*
  * pseries-6.1
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 653587ea62..84e3e63c43 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -791,14 +791,26 @@ bool css_migration_enabled(void)
     }                                                                         \
     type_init(ccw_machine_register_##suffix)
 
+static void ccw_machine_7_0_instance_options(MachineState *machine)
+{
+}
+
+static void ccw_machine_7_0_class_options(MachineClass *mc)
+{
+}
+DEFINE_CCW_MACHINE(7_0, "7.0", true);
+
 static void ccw_machine_6_2_instance_options(MachineState *machine)
 {
+    ccw_machine_7_0_instance_options(machine);
 }
 
 static void ccw_machine_6_2_class_options(MachineClass *mc)
 {
+    ccw_machine_7_0_class_options(mc);
+    compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
 }
-DEFINE_CCW_MACHINE(6_2, "6.2", true);
+DEFINE_CCW_MACHINE(6_2, "6.2", false);
 
 static void ccw_machine_6_1_instance_options(MachineState *machine)
 {
diff --git a/include/hw/boards.h b/include/hw/boards.h
index f49a2578ea..c92ac8815c 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -380,6 +380,9 @@ struct MachineState {
     } \
     type_init(machine_initfn##_register_types)
 
+extern GlobalProperty hw_compat_6_2[];
+extern const size_t hw_compat_6_2_len;
+
 extern GlobalProperty hw_compat_6_1[];
 extern const size_t hw_compat_6_1_len;
 
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 9ab39e428f..b38947c224 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -196,6 +196,9 @@ void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid,
 /* sgx.c */
 void pc_machine_init_sgx_epc(PCMachineState *pcms);
 
+extern GlobalProperty pc_compat_6_2[];
+extern const size_t pc_compat_6_2_len;
+
 extern GlobalProperty pc_compat_6_1[];
 extern const size_t pc_compat_6_1_len;
 
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 2/8] tests/qtest/test-x86-cpuid-compat: Check for machines before using them
  2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
  2022-01-05 12:36 ` [PULL 1/8] hw: Add compat machines for 7.0 Thomas Huth
@ 2022-01-05 12:36 ` Thomas Huth
  2022-01-05 12:36 ` [PULL 3/8] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it Thomas Huth
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2022-01-05 12:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Igor Mammedov, Richard Henderson

The user might have disabled the pc-i440fx machine type (or it's older
versions, like done in downstream RHEL) in the QEMU binary, so let's
better check whether the machine types are available before using them.

Message-Id: <20211222153923.1000420-1-thuth@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/test-x86-cpuid-compat.c | 85 ++++++++++++++++-------------
 1 file changed, 48 insertions(+), 37 deletions(-)

diff --git a/tests/qtest/test-x86-cpuid-compat.c b/tests/qtest/test-x86-cpuid-compat.c
index f28848e06e..39138db774 100644
--- a/tests/qtest/test-x86-cpuid-compat.c
+++ b/tests/qtest/test-x86-cpuid-compat.c
@@ -302,54 +302,65 @@ int main(int argc, char **argv)
 
     /* Check compatibility of old machine-types that didn't
      * auto-increase level/xlevel/xlevel2: */
-
-    add_cpuid_test("x86/cpuid/auto-level/pc-2.7",
-                   "-machine pc-i440fx-2.7 -cpu 486,arat=on,avx512vbmi=on,xsaveopt=on",
-                   "level", 1);
-    add_cpuid_test("x86/cpuid/auto-xlevel/pc-2.7",
-                   "-machine pc-i440fx-2.7 -cpu 486,3dnow=on,sse4a=on,invtsc=on,npt=on,svm=on",
-                   "xlevel", 0);
-    add_cpuid_test("x86/cpuid/auto-xlevel2/pc-2.7",
-                   "-machine pc-i440fx-2.7 -cpu 486,xstore=on",
-                   "xlevel2", 0);
+    if (qtest_has_machine("pc-i440fx-2.7")) {
+        add_cpuid_test("x86/cpuid/auto-level/pc-2.7",
+                       "-machine pc-i440fx-2.7 -cpu 486,arat=on,avx512vbmi=on,xsaveopt=on",
+                       "level", 1);
+        add_cpuid_test("x86/cpuid/auto-xlevel/pc-2.7",
+                       "-machine pc-i440fx-2.7 -cpu 486,3dnow=on,sse4a=on,invtsc=on,npt=on,svm=on",
+                       "xlevel", 0);
+        add_cpuid_test("x86/cpuid/auto-xlevel2/pc-2.7",
+                       "-machine pc-i440fx-2.7 -cpu 486,xstore=on",
+                       "xlevel2", 0);
+    }
     /*
      * QEMU 1.4.0 had auto-level enabled for CPUID[7], already,
      * and the compat code that sets default level shouldn't
      * disable the auto-level=7 code:
      */
-    add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-1.4/off",
-                   "-machine pc-i440fx-1.4 -cpu Nehalem",
-                   "level", 2);
-    add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-1.5/on",
-                   "-machine pc-i440fx-1.4 -cpu Nehalem,smap=on",
-                   "level", 7);
-    add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.3/off",
-                   "-machine pc-i440fx-2.3 -cpu Penryn",
-                   "level", 4);
-    add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.3/on",
-                   "-machine pc-i440fx-2.3 -cpu Penryn,erms=on",
-                   "level", 7);
-    add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.9/off",
-                   "-machine pc-i440fx-2.9 -cpu Conroe",
-                   "level", 10);
-    add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.9/on",
-                   "-machine pc-i440fx-2.9 -cpu Conroe,erms=on",
-                   "level", 10);
+    if (qtest_has_machine("pc-i440fx-1.4")) {
+        add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-1.4/off",
+                       "-machine pc-i440fx-1.4 -cpu Nehalem",
+                       "level", 2);
+        add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-1.5/on",
+                       "-machine pc-i440fx-1.4 -cpu Nehalem,smap=on",
+                       "level", 7);
+    }
+    if (qtest_has_machine("pc-i440fx-2.3")) {
+        add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.3/off",
+                       "-machine pc-i440fx-2.3 -cpu Penryn",
+                       "level", 4);
+        add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.3/on",
+                       "-machine pc-i440fx-2.3 -cpu Penryn,erms=on",
+                       "level", 7);
+    }
+    if (qtest_has_machine("pc-i440fx-2.9")) {
+        add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.9/off",
+                       "-machine pc-i440fx-2.9 -cpu Conroe",
+                       "level", 10);
+        add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.9/on",
+                       "-machine pc-i440fx-2.9 -cpu Conroe,erms=on",
+                       "level", 10);
+    }
 
     /*
      * xlevel doesn't have any feature that triggers auto-level
      * code on old machine-types.  Just check that the compat code
      * is working correctly:
      */
-    add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.3",
-                   "-machine pc-i440fx-2.3 -cpu SandyBridge",
-                   "xlevel", 0x8000000a);
-    add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-off",
-                   "-machine pc-i440fx-2.4 -cpu SandyBridge,",
-                   "xlevel", 0x80000008);
-    add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-on",
-                   "-machine pc-i440fx-2.4 -cpu SandyBridge,svm=on,npt=on",
-                   "xlevel", 0x80000008);
+    if (qtest_has_machine("pc-i440fx-2.3")) {
+        add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.3",
+                       "-machine pc-i440fx-2.3 -cpu SandyBridge",
+                       "xlevel", 0x8000000a);
+    }
+    if (qtest_has_machine("pc-i440fx-2.4")) {
+        add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-off",
+                       "-machine pc-i440fx-2.4 -cpu SandyBridge,",
+                       "xlevel", 0x80000008);
+        add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-on",
+                       "-machine pc-i440fx-2.4 -cpu SandyBridge,svm=on,npt=on",
+                       "xlevel", 0x80000008);
+    }
 
     /* Test feature parsing */
     add_feature_test("x86/cpuid/features/plus",
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 3/8] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it
  2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
  2022-01-05 12:36 ` [PULL 1/8] hw: Add compat machines for 7.0 Thomas Huth
  2022-01-05 12:36 ` [PULL 2/8] tests/qtest/test-x86-cpuid-compat: Check for machines before using them Thomas Huth
@ 2022-01-05 12:36 ` Thomas Huth
  2022-01-05 12:36 ` [PULL 4/8] tests/unit/test-util-sockets: Use g_file_open_tmp() to create temp file Thomas Huth
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2022-01-05 12:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

The lsi53c895a SCSI controller might have been disabled in the target
binary, so let's check for its availability first before using it.

Message-Id: <20211222153600.976588-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/qtest/hd-geo-test.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c
index 113126ae06..771eaa741b 100644
--- a/tests/qtest/hd-geo-test.c
+++ b/tests/qtest/hd-geo-test.c
@@ -960,9 +960,11 @@ int main(int argc, char **argv)
     qtest_add_func("hd-geo/ide/device/user/chst", test_ide_device_user_chst);
     if (have_qemu_img()) {
         qtest_add_func("hd-geo/override/ide", test_override_ide);
-        qtest_add_func("hd-geo/override/scsi", test_override_scsi);
-        qtest_add_func("hd-geo/override/scsi_2_controllers",
-                       test_override_scsi_2_controllers);
+        if (qtest_has_device("lsi53c895a")) {
+            qtest_add_func("hd-geo/override/scsi", test_override_scsi);
+            qtest_add_func("hd-geo/override/scsi_2_controllers",
+                           test_override_scsi_2_controllers);
+        }
         qtest_add_func("hd-geo/override/virtio_blk", test_override_virtio_blk);
         qtest_add_func("hd-geo/override/zero_chs", test_override_zero_chs);
         qtest_add_func("hd-geo/override/scsi_hot_unplug",
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 4/8] tests/unit/test-util-sockets: Use g_file_open_tmp() to create temp file
  2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
                   ` (2 preceding siblings ...)
  2022-01-05 12:36 ` [PULL 3/8] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it Thomas Huth
@ 2022-01-05 12:36 ` Thomas Huth
  2022-01-05 12:36 ` [PULL 5/8] qemu-options: Remove the deprecated -no-quit option Thomas Huth
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2022-01-05 12:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Richard Henderson

From: Philippe Mathieu-Daudé <philmd@redhat.com>

Similarly to commit e63ed64c6d1 ("tests/qtest/virtio-net-failover:
Use g_file_open_tmp() to create temporary file"), avoid calling
g_test_rand_int() before g_test_init(): use g_file_open_tmp().

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211224234504.3413370-1-philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/unit/test-util-sockets.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/unit/test-util-sockets.c b/tests/unit/test-util-sockets.c
index 72b9246529..896247e3ed 100644
--- a/tests/unit/test-util-sockets.c
+++ b/tests/unit/test-util-sockets.c
@@ -305,9 +305,11 @@ static void test_socket_unix_abstract(void)
     };
     int i;
 
+    i = g_file_open_tmp("unix-XXXXXX", &addr.u.q_unix.path, NULL);
+    g_assert_true(i >= 0);
+    close(i);
+
     addr.type = SOCKET_ADDRESS_TYPE_UNIX;
-    addr.u.q_unix.path = g_strdup_printf("unix-%d-%u",
-                                         getpid(), g_random_int());
     addr.u.q_unix.has_abstract = true;
     addr.u.q_unix.abstract = true;
     addr.u.q_unix.has_tight = false;
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 5/8] qemu-options: Remove the deprecated -no-quit option
  2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
                   ` (3 preceding siblings ...)
  2022-01-05 12:36 ` [PULL 4/8] tests/unit/test-util-sockets: Use g_file_open_tmp() to create temp file Thomas Huth
@ 2022-01-05 12:36 ` Thomas Huth
  2022-01-05 12:36 ` [PULL 6/8] docs/sphinx: fix compatibility with sphinx < 1.8 Thomas Huth
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2022-01-05 12:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michal Prívozník, Richard Henderson, Markus Armbruster

This option was just a wrapper around the -display ...,window-close=off
parameter, and the name "no-quit" is rather confusing compared to
"window-close" (since there are still other means to quit the emulator),
so let's remove this now.

Message-Id: <20211215082417.180735-1-thuth@redhat.com>
Acked-by: Michal Prívozník <mprivozn@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 docs/about/deprecated.rst       | 6 ------
 docs/about/removed-features.rst | 7 +++++++
 qemu-options.hx                 | 8 --------
 softmmu/vl.c                    | 8 +-------
 4 files changed, 8 insertions(+), 21 deletions(-)

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 5693abb663..e21e07478f 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -134,12 +134,6 @@ specified.
 Use ``-display sdl,window-close=...`` instead (i.e. with a minus instead of
 an underscore between "window" and "close").
 
-``-no-quit`` (since 6.1)
-''''''''''''''''''''''''
-
-The ``-no-quit`` is a synonym for ``-display ...,window-close=off`` which
-should be used instead.
-
 ``-alt-grab`` and ``-display sdl,alt_grab=on`` (since 6.2)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index d42c3341de..4c4da20d0f 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -330,6 +330,13 @@ RISC-V firmware not booted by default (removed in 5.1)
 QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default``
 for the RISC-V ``virt`` machine and ``sifive_u`` machine.
 
+``-no-quit`` (removed in 7.0)
+'''''''''''''''''''''''''''''
+
+The ``-no-quit`` was a synonym for ``-display ...,window-close=off`` which
+should be used instead.
+
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
diff --git a/qemu-options.hx b/qemu-options.hx
index fd1f8135fb..ec90505d84 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2065,14 +2065,6 @@ SRST
     ``-display sdl,grab-mod=rctrl`` instead.
 ERST
 
-DEF("no-quit", 0, QEMU_OPTION_no_quit,
-    "-no-quit        disable SDL/GTK window close capability (deprecated)\n", QEMU_ARCH_ALL)
-SRST
-``-no-quit``
-    Disable window close capability (SDL and GTK only). This option is
-    deprecated, please use ``-display ...,window-close=off`` instead.
-ERST
-
 DEF("sdl", 0, QEMU_OPTION_sdl,
     "-sdl            shorthand for -display sdl\n", QEMU_ARCH_ALL)
 SRST
diff --git a/softmmu/vl.c b/softmmu/vl.c
index d9e4c619d3..a8cad43691 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1941,7 +1941,7 @@ static void qemu_create_early_backends(void)
                      "for SDL, ignoring option");
     }
     if (dpy.has_window_close && !use_gtk && !use_sdl) {
-        error_report("-no-quit is only valid for GTK and SDL, "
+        error_report("window-close is only valid for GTK and SDL, "
                      "ignoring option");
     }
 
@@ -3301,12 +3301,6 @@ void qemu_init(int argc, char **argv, char **envp)
                 warn_report("-ctrl-grab is deprecated, please use "
                             "-display sdl,grab-mod=rctrl instead.");
                 break;
-            case QEMU_OPTION_no_quit:
-                dpy.has_window_close = true;
-                dpy.window_close = false;
-                warn_report("-no-quit is deprecated, please use "
-                            "-display ...,window-close=off instead.");
-                break;
             case QEMU_OPTION_sdl:
                 warn_report("-sdl is deprecated, use -display sdl instead.");
 #ifdef CONFIG_SDL
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 6/8] docs/sphinx: fix compatibility with sphinx < 1.8
  2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
                   ` (4 preceding siblings ...)
  2022-01-05 12:36 ` [PULL 5/8] qemu-options: Remove the deprecated -no-quit option Thomas Huth
@ 2022-01-05 12:36 ` Thomas Huth
  2022-01-05 12:36 ` [PULL 7/8] gitlab-ci: Enable docs in the centos job Thomas Huth
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2022-01-05 12:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Richard Henderson

From: Marc-André Lureau <marcandre.lureau@redhat.com>

SphinxDirective was added with sphinx 1.8 (2018-09-13).

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220104074649.1712440-1-marcandre.lureau@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 docs/sphinx/fakedbusdoc.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/sphinx/fakedbusdoc.py b/docs/sphinx/fakedbusdoc.py
index a680b25754..d2c5079046 100644
--- a/docs/sphinx/fakedbusdoc.py
+++ b/docs/sphinx/fakedbusdoc.py
@@ -7,12 +7,12 @@
 # Author: Marc-André Lureau <marcandre.lureau@redhat.com>
 """dbus-doc is a Sphinx extension that provides documentation from D-Bus XML."""
 
+from docutils.parsers.rst import Directive
 from sphinx.application import Sphinx
-from sphinx.util.docutils import SphinxDirective
 from typing import Any, Dict
 
 
-class FakeDBusDocDirective(SphinxDirective):
+class FakeDBusDocDirective(Directive):
     has_content = True
     required_arguments = 1
 
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 7/8] gitlab-ci: Enable docs in the centos job
  2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
                   ` (5 preceding siblings ...)
  2022-01-05 12:36 ` [PULL 6/8] docs/sphinx: fix compatibility with sphinx < 1.8 Thomas Huth
@ 2022-01-05 12:36 ` Thomas Huth
  2022-01-05 12:36 ` [PULL 8/8] docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name Thomas Huth
  2022-01-05 18:05 ` [PULL 0/8] Misc patches (tests, docs, compat machines) Richard Henderson
  8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2022-01-05 12:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marc-André Lureau, Richard Henderson, Philippe Mathieu-Daudé

We just ran into a problem that the docs don't build on RHEL8 / CentOS 8
anymore. Seems like these distros are using one of the oldest Sphinx
versions that we still have to support. Thus enable the docs build in
the CI on CentOS so that such bugs don't slip in so easily again.

Message-Id: <20220104091240.160867-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .gitlab-ci.d/buildtest.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 7e1cb0b3c2..12fb1130fe 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -164,7 +164,7 @@ build-system-centos:
   variables:
     IMAGE: centos8
     CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
-                    --enable-modules --enable-trace-backends=dtrace
+      --enable-modules --enable-trace-backends=dtrace --enable-docs
     TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
       x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
     MAKE_CHECK_ARGS: check-build
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PULL 8/8] docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name
  2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
                   ` (6 preceding siblings ...)
  2022-01-05 12:36 ` [PULL 7/8] gitlab-ci: Enable docs in the centos job Thomas Huth
@ 2022-01-05 12:36 ` Thomas Huth
  2022-01-05 18:05 ` [PULL 0/8] Misc patches (tests, docs, compat machines) Richard Henderson
  8 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2022-01-05 12:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson, Philippe Mathieu-Daudé

In downstream, we want to use a different name for the QEMU binary,
and some people might also use the docs for non-x86 binaries, that's
why we already created the |qemu_system| placeholder in the past.
Use it now in the stap trace doc, too.

Message-Id: <20220104103319.179870-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 docs/tools/qemu-trace-stap.rst | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/docs/tools/qemu-trace-stap.rst b/docs/tools/qemu-trace-stap.rst
index d53073b52b..2169ce5d17 100644
--- a/docs/tools/qemu-trace-stap.rst
+++ b/docs/tools/qemu-trace-stap.rst
@@ -46,19 +46,19 @@ The following commands are valid:
   any of the listed names. If no *PATTERN* is given, the all possible
   probes will be listed.
 
-  For example, to list all probes available in the ``qemu-system-x86_64``
+  For example, to list all probes available in the |qemu_system|
   binary:
 
-  ::
+  .. parsed-literal::
 
-    $ qemu-trace-stap list qemu-system-x86_64
+    $ qemu-trace-stap list |qemu_system|
 
   To filter the list to only cover probes related to QEMU's cryptographic
   subsystem, in a binary outside ``$PATH``
 
-  ::
+  .. parsed-literal::
 
-    $ qemu-trace-stap list /opt/qemu/4.0.0/bin/qemu-system-x86_64 'qcrypto*'
+    $ qemu-trace-stap list /opt/qemu/|version|/bin/|qemu_system| 'qcrypto*'
 
 .. option:: run OPTIONS BINARY PATTERN...
 
@@ -90,26 +90,26 @@ The following commands are valid:
     Restrict the tracing session so that it only triggers for the process
     identified by *PID*.
 
-  For example, to monitor all processes executing ``qemu-system-x86_64``
+  For example, to monitor all processes executing |qemu_system|
   as found on ``$PATH``, displaying all I/O related probes:
 
-  ::
+  .. parsed-literal::
 
-    $ qemu-trace-stap run qemu-system-x86_64 'qio*'
+    $ qemu-trace-stap run |qemu_system| 'qio*'
 
   To monitor only the QEMU process with PID 1732
 
-  ::
+  .. parsed-literal::
 
-    $ qemu-trace-stap run --pid=1732 qemu-system-x86_64 'qio*'
+    $ qemu-trace-stap run --pid=1732 |qemu_system| 'qio*'
 
   To monitor QEMU processes running an alternative binary outside of
   ``$PATH``, displaying verbose information about setup of the
   tracing environment:
 
-  ::
+  .. parsed-literal::
 
-    $ qemu-trace-stap -v run /opt/qemu/4.0.0/qemu-system-x86_64 'qio*'
+    $ qemu-trace-stap -v run /opt/qemu/|version|/bin/|qemu_system| 'qio*'
 
 See also
 --------
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PULL 0/8] Misc patches (tests, docs, compat machines)
  2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
                   ` (7 preceding siblings ...)
  2022-01-05 12:36 ` [PULL 8/8] docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name Thomas Huth
@ 2022-01-05 18:05 ` Richard Henderson
  8 siblings, 0 replies; 10+ messages in thread
From: Richard Henderson @ 2022-01-05 18:05 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel

On 1/5/22 4:36 AM, Thomas Huth wrote:
>   Hi!
> 
> The following changes since commit fb084237a3b78b20fd9d888dffd673b6656ea3be:
> 
>    common-user: Really fix i386 calls to safe_syscall_set_errno_tail (2022-01-04 21:14:23 -0800)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/thuth/qemu.git tags/pull-request-2022-01-05
> 
> for you to fetch changes up to 057dc9a635fe37118a98b32e8bd9d8ed47b1a102:
> 
>    docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name (2022-01-05 11:10:13 +0100)
> 
> ----------------------------------------------------------------
> * Add compat machines for 7.0
> * Some minor qtest and unit test improvements
> * Remove -no-quit option
> * Fixes for the docs
> 
> ----------------------------------------------------------------
> Cornelia Huck (1):
>        hw: Add compat machines for 7.0
> 
> Marc-André Lureau (1):
>        docs/sphinx: fix compatibility with sphinx < 1.8
> 
> Philippe Mathieu-Daudé (1):
>        tests/unit/test-util-sockets: Use g_file_open_tmp() to create temp file
> 
> Thomas Huth (5):
>        tests/qtest/test-x86-cpuid-compat: Check for machines before using them
>        tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it
>        qemu-options: Remove the deprecated -no-quit option
>        gitlab-ci: Enable docs in the centos job
>        docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name
> 
>   .gitlab-ci.d/buildtest.yml          |  2 +-
>   docs/about/deprecated.rst           |  6 ---
>   docs/about/removed-features.rst     |  7 +++
>   docs/sphinx/fakedbusdoc.py          |  4 +-
>   docs/tools/qemu-trace-stap.rst      | 24 +++++------
>   hw/arm/virt.c                       |  9 +++-
>   hw/core/machine.c                   |  3 ++
>   hw/i386/pc.c                        |  3 ++
>   hw/i386/pc_piix.c                   | 14 +++++-
>   hw/i386/pc_q35.c                    | 13 +++++-
>   hw/ppc/spapr.c                      | 15 ++++++-
>   hw/s390x/s390-virtio-ccw.c          | 14 +++++-
>   include/hw/boards.h                 |  3 ++
>   include/hw/i386/pc.h                |  3 ++
>   qemu-options.hx                     |  8 ----
>   softmmu/vl.c                        |  8 +---
>   tests/qtest/hd-geo-test.c           |  8 ++--
>   tests/qtest/test-x86-cpuid-compat.c | 85 +++++++++++++++++++++----------------
>   tests/unit/test-util-sockets.c      |  6 ++-
>   19 files changed, 151 insertions(+), 84 deletions(-)

Applied, thanks.

r~


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-01-05 18:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 12:36 [PULL 0/8] Misc patches (tests, docs, compat machines) Thomas Huth
2022-01-05 12:36 ` [PULL 1/8] hw: Add compat machines for 7.0 Thomas Huth
2022-01-05 12:36 ` [PULL 2/8] tests/qtest/test-x86-cpuid-compat: Check for machines before using them Thomas Huth
2022-01-05 12:36 ` [PULL 3/8] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it Thomas Huth
2022-01-05 12:36 ` [PULL 4/8] tests/unit/test-util-sockets: Use g_file_open_tmp() to create temp file Thomas Huth
2022-01-05 12:36 ` [PULL 5/8] qemu-options: Remove the deprecated -no-quit option Thomas Huth
2022-01-05 12:36 ` [PULL 6/8] docs/sphinx: fix compatibility with sphinx < 1.8 Thomas Huth
2022-01-05 12:36 ` [PULL 7/8] gitlab-ci: Enable docs in the centos job Thomas Huth
2022-01-05 12:36 ` [PULL 8/8] docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name Thomas Huth
2022-01-05 18:05 ` [PULL 0/8] Misc patches (tests, docs, compat machines) Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.