[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v23 17/20] tests/avocado: s390x cpu topology test dedicated CPU
From: |
Nina Schoetterl-Glausch |
Subject: |
[PATCH v23 17/20] tests/avocado: s390x cpu topology test dedicated CPU |
Date: |
Thu, 14 Sep 2023 14:06:47 +0200 |
From: Pierre Morel <pmorel@linux.ibm.com>
A dedicated CPU in vertical polarization can only have
a high entitlement.
Let's check this from both host and guest point of view.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Co-developed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
---
tests/avocado/s390_topology.py | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/tests/avocado/s390_topology.py b/tests/avocado/s390_topology.py
index 24fac9a54d..3661048f4c 100644
--- a/tests/avocado/s390_topology.py
+++ b/tests/avocado/s390_topology.py
@@ -305,3 +305,36 @@ def test_entitlement(self):
self.guest_set_dispatching('0');
self.check_polarization("horizontal")
self.check_topology(0, 0, 0, 0, 'high', False)
+
+
+ def test_dedicated(self):
+ """
+ This test verifies that QEMU adjusts the entitlement correctly when a
+ CPU is made dedicated.
+ QEMU retains the entitlement value when horizontal polarization is in
effect.
+ For the guest, the field shows the effective value of the entitlement.
+
+ :avocado: tags=arch:s390x
+ :avocado: tags=machine:s390-ccw-virtio
+ """
+ self.kernel_init()
+ self.vm.launch()
+ self.wait_until_booted()
+
+ self.system_init()
+
+ self.check_polarization("horizontal")
+
+ res = self.vm.qmp('set-cpu-topology',
+ {'core-id': 0, 'dedicated': True})
+ self.assertEqual(res['return'], {})
+ self.check_topology(0, 0, 0, 0, 'high', True)
+ self.check_polarization("horizontal")
+
+ self.guest_set_dispatching('1');
+ self.check_topology(0, 0, 0, 0, 'high', True)
+ self.check_polarization("vertical:high")
+
+ self.guest_set_dispatching('0');
+ self.check_topology(0, 0, 0, 0, 'high', True)
+ self.check_polarization("horizontal")
--
2.39.2
- Re: [PATCH v23 03/20] target/s390x/cpu topology: handle STSI(15) and build the SYSIB, (continued)
- [PATCH v23 12/20] qapi/s390x/cpu topology: query-cpu-polarization qmp command, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 18/20] tests/avocado: s390x cpu topology test socket full, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 06/20] s390x/cpu topology: interception of PTF instruction, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 09/20] machine: adding s390 topology to query-cpu-fast, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 05/20] s390x/cpu topology: resetting the Topology-Change-Report, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 14/20] tests/avocado: s390x cpu topology core, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 17/20] tests/avocado: s390x cpu topology test dedicated CPU,
Nina Schoetterl-Glausch <=
- [PATCH v23 15/20] tests/avocado: s390x cpu topology polarization, Nina Schoetterl-Glausch, 2023/09/14
- [PATCH v23 01/20] CPU topology: extend with s390 specifics, Nina Schoetterl-Glausch, 2023/09/14
- Re: [PATCH v23 01/20] CPU topology: extend with s390 specifics, Nina Schoetterl-Glausch, 2023/09/25
- Re: [PATCH v23 01/20] CPU topology: extend with s390 specifics, Markus Armbruster, 2023/09/25
Re: [PATCH v23 01/20] CPU topology: extend with s390 specifics, Markus Armbruster, 2023/09/20