From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E151AEB64DA for ; Wed, 19 Jul 2023 14:14:16 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qM7vu-0001lO-Rf; Wed, 19 Jul 2023 10:13:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qM7vt-0001lB-DU; Wed, 19 Jul 2023 10:13:37 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qM7vr-00061r-Dt; Wed, 19 Jul 2023 10:13:36 -0400 Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36JE9M72026283; Wed, 19 Jul 2023 14:13:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=hPGZrcZ8eGeBU/memwqHmEeAs09UV/ebeOt/T/s9A/w=; b=YV+oi3jlNz8Idk/I7gew4JXGtrkq1MTDjqjhpZF5rvq3P8GldeYfL15rHZTPhxP8CLEl 8DV9pPEbtgxXT3F6p0hD21PhxyUb47ghwRnOJlbeYni947kSQvEsdQnQGpQ1x5yIwpQs pN9JOg1IMRNgWaQ9ZrdNnkDu3yyoE6RL1wm5s6crpl1kz0vdpu5ImhdOBl8NsaWMmKoT En4vsTL4HYi23dTIRJNAqOFfu4tmgKNy/naQHSUbo09+l+CR3wad2scHQBOdZU0Utb+Z EszW2jXZDtZL5yN3W16OO+D8YwoqiPgTdmRXIlYvKGVcqAsbq3i+zDLP4nNclaNkf/2A eQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rxh5hrf4s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jul 2023 14:13:24 +0000 Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36JE9SXC026760; Wed, 19 Jul 2023 14:13:24 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rxh5hrf3m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jul 2023 14:13:24 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36JCMTWV017202; Wed, 19 Jul 2023 14:13:23 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3rv5srtxbb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Jul 2023 14:13:22 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36JEDIVt7668230 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Jul 2023 14:13:19 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DAD5020040; Wed, 19 Jul 2023 14:13:18 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AB46320049; Wed, 19 Jul 2023 14:13:15 +0000 (GMT) Received: from li-978a334c-2cba-11b2-a85c-a0743a31b510.ibm.com (unknown [9.171.3.231]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 19 Jul 2023 14:13:15 +0000 (GMT) Message-ID: Subject: Re: [PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests From: Nina Schoetterl-Glausch To: Pierre Morel , Thomas Huth , qemu-s390x@nongnu.org Cc: qemu-devel@nongnu.org, borntraeger@de.ibm.com, pasic@linux.ibm.com, richard.henderson@linaro.org, david@redhat.com, cohuck@redhat.com, mst@redhat.com, pbonzini@redhat.com, kvm@vger.kernel.org, ehabkost@redhat.com, marcel.apfelbaum@gmail.com, eblake@redhat.com, armbru@redhat.com, seiden@linux.ibm.com, nrb@linux.ibm.com, frankja@linux.ibm.com, berrange@redhat.com, clg@kaod.org Date: Wed, 19 Jul 2023 16:13:15 +0200 In-Reply-To: References: <20230630091752.67190-1-pmorel@linux.ibm.com> <20230630091752.67190-17-pmorel@linux.ibm.com> <88070b30-36ea-8112-41c4-0d93fc76cf80@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: jd8tTu-Rq6msaxM6arohCtPJqVGkfb7o X-Proofpoint-GUID: W9xa9MO21c7qbeeJ9SDyZ-w4M9dkROpj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-19_09,2023-07-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=999 phishscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307190126 Received-SPF: pass client-ip=148.163.158.5; envelope-from=nsg@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Wed, 2023-07-19 at 16:08 +0200, Pierre Morel wrote: >=20 > On 7/14/23 18:30, Nina Schoetterl-Glausch wrote: > > On Wed, 2023-07-12 at 22:11 +0200, Thomas Huth wrote: > > > On 12/07/2023 21.37, Nina Schoetterl-Glausch wrote: > > > > On Wed, 2023-07-05 at 12:22 +0200, Thomas Huth wrote: > > > > > On 30/06/2023 11.17, Pierre Morel wrote: > > > > > > This test takes care to check the changes on different > > > > > > entitlements > > > > > > when the guest requests a polarization change. > > > > > >=20 > > > > > > Signed-off-by: Pierre Morel > > > > > > --- > > > > > > =C2=A0=C2=A0=C2=A0 tests/avocado/s390_topology.py | 47 > > > > > > ++++++++++++++++++++++++++++++++++ > > > > > > =C2=A0=C2=A0=C2=A0 1 file changed, 47 insertions(+) > > > > > >=20 > > > > > > diff --git a/tests/avocado/s390_topology.py > > > > > > b/tests/avocado/s390_topology.py > > > > > > index 2cf731cb1d..4855e5d7e4 100644 > > > > > > --- a/tests/avocado/s390_topology.py > > > > > > +++ b/tests/avocado/s390_topology.py > > > > > > @@ -240,3 +240,50 @@ def test_polarisation(self): > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 res =3D self.vm.qmp('query-cpu-polarization') > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 self.assertEqual(res['return']['polarization'], > > > > > > 'horizontal') > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 self.check_topology(0, 0, 0, 0, 'medium', > > > > > > False) > > > > > > + > > > > > > +=C2=A0=C2=A0=C2=A0 def test_entitlement(self): > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 """ > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This test verifies = that QEMU modifies the > > > > > > polarization > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 after a guest reque= st. > > > > > ... > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (0, 0, 0, 0, 'low', False) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (1, 0, 0, 0, 'medium', False) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (2, 1, 0, 0, 'high', False) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (3, 1, 0, 0, 'high', False) > > > > > > + > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.guest_set_disp= atching('1'); > > > > > > + > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (0, 0, 0, 0, 'low', False) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (1, 0, 0, 0, 'medium', False) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (2, 1, 0, 0, 'high', False) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (3, 1, 0, 0, 'high', False) > > > > > > + > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.guest_set_disp= atching('0'); > > > > > > + > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (0, 0, 0, 0, 'low', False) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (1, 0, 0, 0, 'medium', False) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (2, 1, 0, 0, 'high', False) > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 self.check_topology= (3, 1, 0, 0, 'high', False) > > > > > Sorry, I think I'm too blind to see it, but what has changed > > > > > after > > > > > the guest > > > > > changed the polarization? > > > > Nothing, the values are retained, they're just not active. > > > > The guest will see a horizontal polarization until it changes > > > > back > > > > to > > > > vertical. > > > But then the comment in front of it ("This test verifies that > > > QEMU > > > *modifies* the polarization...") does not quite match, does it? > > Yeah, it tests that QEMU reports it's own state changed when using > > set-cpu-topology. > > I think it would be a good idea to get the guests view from the > > sysfs, > > also. > >=20 > > > =C2=A0=C2=A0 Thomas > > >=20 > > >=20 >=20 > Yes, I think you are right, I rewrite this to check the guest view of > the changes. >=20 > As you said the values are retained when not used by horizontal=20 > polarization so it is a non sense to check from host view. I don't think it's bad to check the host view, you can do both. >=20 > Thanks >=20 > Pierre >=20