From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [RFC kvm-unit-tests PATCH] powerpc: add tests for XICS Date: Thu, 23 Nov 2017 15:52:00 +1100 Message-ID: <1511412720.2466.41.camel@au1.ibm.com> References: <20171012080704.31037-1-lvivier@redhat.com> Reply-To: benh@au1.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org, Paolo Bonzini , Sam Bobroff To: Laurent Vivier , Thomas Huth , kvm-ppc@vger.kernel.org Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53980 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750709AbdKWFGB (ORCPT ); Thu, 23 Nov 2017 00:06:01 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAN53egG125411 for ; Thu, 23 Nov 2017 00:06:00 -0500 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2edp0xygun-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 23 Nov 2017 00:05:59 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Nov 2017 04:52:06 -0000 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2017-11-22 at 13:39 +0100, Laurent Vivier wrote: > These errors can be fixed by two different ways: > > A- don't allow set-xive to set the priority to 255 (the MASKED value) > and return an error value, and get-xive return an error value if > priority is the MASKED value > > B- store the server in set-xive even it the value is the MASKED one, so > we can get it with get-xive and use it with int-on (with the saved > priority value) > > (A) follows the specs: > > Linux on Power Architecture Platform Reference, v1.1 > R1–7.3.10.2–5. For the PowerPC External Interrupt option: The > ibm,set-xive call must return the Status of -3 > (Argument Error) for an unimplemented Interrupt number. > > (B) would behave like XICS with P8 and TCG. > > Any ideas? I don't see much point in supporting an unbalance where somebody masks with set_xive and unmasks with int_on... These PAPR APIs originates from pre-historical times, it's a bit of a mess. set_xive should be able to set a priority of 255, that's a requirement, but we could fix the emulation to store the server in that case I suppose. Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Date: Thu, 23 Nov 2017 04:52:00 +0000 Subject: Re: [RFC kvm-unit-tests PATCH] powerpc: add tests for XICS Message-Id: <1511412720.2466.41.camel@au1.ibm.com> List-Id: References: <20171012080704.31037-1-lvivier@redhat.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Laurent Vivier , Thomas Huth , kvm-ppc@vger.kernel.org Cc: kvm@vger.kernel.org, Paolo Bonzini , Sam Bobroff On Wed, 2017-11-22 at 13:39 +0100, Laurent Vivier wrote: > These errors can be fixed by two different ways: > > A- don't allow set-xive to set the priority to 255 (the MASKED value) > and return an error value, and get-xive return an error value if > priority is the MASKED value > > B- store the server in set-xive even it the value is the MASKED one, so > we can get it with get-xive and use it with int-on (with the saved > priority value) > > (A) follows the specs: > > Linux on Power Architecture Platform Reference, v1.1 > R1–7.3.10.2–5. For the PowerPC External Interrupt option: The > ibm,set-xive call must return the Status of -3 > (Argument Error) for an unimplemented Interrupt number. > > (B) would behave like XICS with P8 and TCG. > > Any ideas? I don't see much point in supporting an unbalance where somebody masks with set_xive and unmasks with int_on... These PAPR APIs originates from pre-historical times, it's a bit of a mess. set_xive should be able to set a priority of 255, that's a requirement, but we could fix the emulation to store the server in that case I suppose. Ben.