Received: from eggs.gnu.org ([208.118.235.92]:48440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehSQR-0001ab-MO for qemu-devel@nongnu.org; Thu, 01 Feb 2018 22:57:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehSMl-0003fV-8j for qemu-devel@nongnu.org; Thu, 01 Feb 2018 22:54:04 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53052 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehSMk-0003dm-7L for qemu-devel@nongnu.org; Thu, 01 Feb 2018 22:50:18 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w123hq7h043576 for ; Thu, 1 Feb 2018 22:50:16 -0500 Received: from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fvdxjwgec-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 01 Feb 2018 22:50:16 -0500 Received: from localhost by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 1 Feb 2018 20:50:15 -0700 References: <20180130094715.11578-1-zyimin@linux.vnet.ibm.com> <20180130094715.11578-4-zyimin@linux.vnet.ibm.com> <20180131124400.4f74cf1c.cohuck@redhat.com> <20180201130226.364e6c76.cohuck@redhat.com> From: Yi Min Zhao Date: Fri, 2 Feb 2018 11:50:09 +0800 MIME-Version: 1.0 In-Reply-To: <20180201130226.364e6c76.cohuck@redhat.com> Content-Type: text/plain; charset=gbk; format=flowed Message-Id: <0c6a2235-8bca-82e3-203d-ba2f154a9a33@linux.vnet.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/3] s390x/pci: use the right pal and pba in reg_ioat() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , Pierre Morel Cc: qemu-devel@nongnu.org, borntraeger@de.ibm.com, pasic@linux.vnet.ibm.com, alex.williamson@redhat.com, marcel@redhat.com =D4=DA 2018/2/1 =CF=C2=CE=E78:02, Cornelia Huck =D0=B4=B5=C0: > On Thu, 1 Feb 2018 12:33:01 +0100 > Pierre Morel wrote: > >> On 31/01/2018 12:44, Cornelia Huck wrote: >>> On Tue, 30 Jan 2018 10:47:15 +0100 >>> Yi Min Zhao wrote: >>> =20 >>>> When registering ioat, pba should be comprised of leftmost 52 bits a= nd >>>> rightmost 12 binary zeros, and pal should be comprised of leftmost 5= 2 >>>> bits and right most 12 binary ones. Let's fixup this. >>>> >>>> Reviewed-by: Pierre Morel >>>> Signed-off-by: Yi Min Zhao >>>> --- >>>> hw/s390x/s390-pci-inst.c | 2 ++ >>>> 1 file changed, 2 insertions(+) >>>> >>>> diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c >>>> index 997a9cc2e9..3fcc330fe3 100644 >>>> --- a/hw/s390x/s390-pci-inst.c >>>> +++ b/hw/s390x/s390-pci-inst.c >>>> @@ -865,6 +865,8 @@ static int reg_ioat(CPUS390XState *env, S390PCII= OMMU *iommu, ZpciFib fib, >>>> uint8_t dt =3D (g_iota >> 2) & 0x7; >>>> uint8_t t =3D (g_iota >> 11) & 0x1; >>>> =20 >>>> + pba &=3D ~0xfff; >>>> + pal |=3D 0xfff; >>>> if (pba > pal || pba < ZPCI_SDMA_ADDR || pal > ZPCI_EDMA_ADDR= ) { >>>> s390_program_interrupt(env, PGM_OPERAND, 6, ra); >>>> return -EINVAL; >>> It seems like pba and pal are part of the fib, which in turn seems to >>> be provided by the caller. Is that correct? If yes, is it valid for >>> them to not have the rightmost 12 bits as 0s resp. 1s? >>> >>> (Probably answered in the architecture, I know. Might make sense to b= e >>> a tad more explicit in the description.) >>> =20 >> Yes it is, only word6 and the bits 0-19 of word 7 are used for PAL and >> the zPCI facility treats the right most 12 bits of the PAL as containi= ng >> ones. >> >> For PBA words 4 and 0-19 bits of word 5 with 12 0 append on the right >> provides the PBA. >> >> The lower 12 bits of words 5 and 7 of the FIB are ignored by the facil= ity. >> >> @Yi Min: may be add the last sentence to the commit message. >> >> @Conny: Is it clearer? > Yes, adding the last sentence makes it clearer. Thanks! > > OK. Thanks!