From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9KMA-0004Dq-9H for qemu-devel@nongnu.org; Tue, 22 Nov 2016 18:20:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9KM7-0004DO-52 for qemu-devel@nongnu.org; Tue, 22 Nov 2016 18:20:06 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46623) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9KM6-0004Cw-S3 for qemu-devel@nongnu.org; Tue, 22 Nov 2016 18:20:03 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAMNJPZ6115070 for ; Tue, 22 Nov 2016 18:20:01 -0500 Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by mx0a-001b2d01.pphosted.com with ESMTP id 26vs77cf5m-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 22 Nov 2016 18:20:00 -0500 Received: from localhost by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 23 Nov 2016 09:19:58 +1000 From: "Alastair D'Silva" Date: Wed, 23 Nov 2016 10:19:50 +1100 In-Reply-To: <6d4e34f8-4b0b-85f2-93d6-6f0b3e2e7fb3@redhat.com> References: <1479357400-17441-1-git-send-email-alastair@au1.ibm.com> <1479357400-17441-3-git-send-email-alastair@au1.ibm.com> <3888651b-fd60-e827-a9f8-575a8f01be72@redhat.com> <1479853887.11116.95.camel@au1.ibm.com> <6d4e34f8-4b0b-85f2-93d6-6f0b3e2e7fb3@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Message-Id: <1479856790.11116.111.camel@au1.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/4] qtest: Support named interrupts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , =?ISO-8859-1?Q?C=E9dric?= Le Goater , qemu-arm@nongnu.org Cc: qemu-devel@nongnu.org, Peter Maydell , Andrew Jeffery , Joel Stanley On Tue, 2016-11-22 at 23:39 +0100, Paolo Bonzini wrote: > On 22/11/2016 23:31, Alastair D'Silva wrote: > >=20 > > >=20 > > > >=20 > > > > >=20 > > > > > >=20 > > > > > > >=20 > > > > > > > >=20 > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (irq = =3D=3D NULL) { > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0qtest_send_prefix(chr); > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0qtest_send(chr, "FAIL Unknown IRQ\n"); > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0return; > > > > > > > > +=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=C2=A0=C2=A0qemu_set= _irq(irq, level); > > > >=20 > > > > This seems wrong.=C2=A0=C2=A0The IRQ should not be modifiable by = the > > > > test. > > > >=20 > > > > Paolo > > > >=20 > > Thanks Paolo, could you please advise as to why that is? Could you answer this please? I would like to understand why. > > The situation I am addressing is that I device under test that > > changes > > behaviour when a GPIO line is raised. Is there another way I should > > be > > raising that line from within qtest? >=20 > What causes the GPIO line to be raised in the normal emulated case? >=20 >=C2=A0 It would be wired to a GPIO line from the host microcontroller, under software control. In this test case, the device is connected to a "borrowed" board via the command line: =C2=A0 =C2=A0 snprintf(args, sizeof(args), "-display none -machine imx25-= pdk " =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"= -device rx8900,bus=3Di2c.0,address=3D0x%x,id=3D%s", =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0R= X8900_ADDR, RX8900_TEST_ID); I couldn't see a way to wire in the the GPIO to the host via the command line, but even if there was, manipulating it would require manipulating the host CPU, which would broaden the scope of the test. At the moment, the test has no dependency on/interaction with the host CPU, it's just using it to provide an I2C bus. --=C2=A0 Alastair D'Silva Open Source Developer Linux Technology Centre, IBM Australia mob: 0423 762 819