From patchwork Tue May 9 10:44:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9717595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 150AB60237 for ; Tue, 9 May 2017 10:50:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 070ED22701 for ; Tue, 9 May 2017 10:50:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED5882848E; Tue, 9 May 2017 10:50:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3B64A284D4 for ; Tue, 9 May 2017 10:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mH7leyYyrJoJg11FX+YGUXHzNySD996Yo9TTuSn4IXg=; b=eJ/HwLyKTK8YNa+bMgKBp9+QzV Gs8tkiLTsxAwQUgbb/kZ37T60Fa3fbl9cSsBc2ml2sRM9IxaDr87TktjrzINvd2PF8bJJY5vHymxC JMtPQQNuxkMfMqZIqgas+rKvWZigZtwsr0C1VWKL2VO6fM/AfNfD8hRwpKOkoklcRigKEeXSnr7WM 8VDfihrCI5P5gEeKkrdwcxS1cgQYmp41+oXHDKzqVW2xBPgEHDv+54x3yTSFmMqomA99UI3YN1ut9 cYonAh5/IL1gMvo4P4UVaPpYesLJFTHNwZSIW4ZdIFcgLDXWNctPXU3qG/6FcnDIxrzkzmJbnKFXn Ae6pA4Cw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d82ia-0000e0-Nz; Tue, 09 May 2017 10:50:12 +0000 Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d82eS-0002tO-9p for linux-arm-kernel@lists.infradead.org; Tue, 09 May 2017 10:45:59 +0000 Received: by mail-qk0-x233.google.com with SMTP id a72so58967787qkj.2 for ; Tue, 09 May 2017 03:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ke8XdbRFfkrlDSyyh93j1GUH6hl1bixL1rR7NdZlzo8=; b=ad44Ebhz1HwQKYvLSEw9KOulPpkvXrPtjl3WUANYpcxsx+TbPyhET2D4+MP/WNBh6a gx/kI6+HnOBgv3LvoOUrtz81P8Ei7BXQkz7wt+w02fXz8M4W1H26t7f0drQtEG071EFC cKowj5aGrJkdD3YkV3BoYM4AHUeyRb5K8ka+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ke8XdbRFfkrlDSyyh93j1GUH6hl1bixL1rR7NdZlzo8=; b=qb2MIl9X55/HLHB6P6dPkGuk5cXekM8MQAMHbiLMADKYD0Gh4DltytruCtz3V94Mm2 OoKo/6A+kEOUhLjEq/QNsAHAj+6dsJREEZD08LUMeoy+9YrjIvPCNkcTbd/q3V9NIgpw JfdI794jPpMSU1hT9KTL5wdKUcRXqYWoAgM++sGer6/b7wH5/o9Rli5l92PMA9Y/iXTN g1D0HJCJSNoUP6C2OQIFIP0NCRGtw6/TrUl18ct3iRw8NzZpOSlRkxBW80yhD+NFBI2h mpRiU9M9ed93Bn/B10TNxHzU4YbKOD1CVBrI31Jioz7k6Z5KBwkbgRJuwOR38oSlshNN YU5A== X-Gm-Message-State: AN3rC/66nxsr3lYNk1sE75ZIfst42NsxJ0A8ozIGLXIt+XlT168Ru7SA xCd2CDlaiFNH3ps0 X-Received: by 10.80.193.9 with SMTP id l9mr15876346edf.118.1494326738275; Tue, 09 May 2017 03:45:38 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id o30sm2331510edc.42.2017.05.09.03.45.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 May 2017 03:45:37 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 27/37] KVM: arm/arm64: Clarification and relaxation to ITS save/restore ABI Date: Tue, 9 May 2017 12:44:56 +0200 Message-Id: <20170509104506.30929-28-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170509104506.30929-1-cdall@linaro.org> References: <20170509104506.30929-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170509_034557_115056_960D5792 X-CRM114-Status: GOOD ( 14.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christoffer Dall , kvm@vger.kernel.org, Marc Zyngier , Eric Auger , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Clarify what is meant by the save/restore ABI only supporting virtual physical interrupts. Relax the requirement of the order that the collection entries are written in and be clear that there is no particular ordering enforced. Some cosmetic changes in the capitalization of ID names to align with the GICv3 manual and remove the empty line in the bottom of the patch. Signed-off-by: Christoffer Dall Reviewed-by: Eric Auger --- Documentation/virtual/kvm/devices/arm-vgic-its.txt | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Documentation/virtual/kvm/devices/arm-vgic-its.txt b/Documentation/virtual/kvm/devices/arm-vgic-its.txt index ba132e9..eb06beb 100644 --- a/Documentation/virtual/kvm/devices/arm-vgic-its.txt +++ b/Documentation/virtual/kvm/devices/arm-vgic-its.txt @@ -97,8 +97,8 @@ Groups: The following ordering must be followed when restoring the GIC and the ITS: a) restore all guest memory and create vcpus b) restore all redistributors -c) initialize the ITS and then provide its base address - (KVM_DEV_ARM_VGIC_CTRL_INIT, KVM_DEV_ARM_VGIC_GRP_ADDR) +c) provide the its base address + (KVM_DEV_ARM_VGIC_GRP_ADDR) d) restore the ITS in the following order: 1. Restore GITS_CBASER 2. Restore all other GITS_ registers, except GITS_CTLR! @@ -110,12 +110,14 @@ Then vcpus can be started. ITS Table ABI REV0: ------------------- - Revision 0 of the ABI only supports physical LPIs. + Revision 0 of the ABI only supports the features of a virtual GICv3, and does + not support a virtual GICv4 with support for direct injection of virtual + interrupts for nested hypervisors. - The device table and ITT are indexed by the deviceid and eventid, - respectively. The collection table is not indexed by collectionid: - CTEs are written in the table in the order of collection creation. All - entries are 8 bytes. + The device table and ITT are indexed by the DeviceID and EventID, + respectively. The collection table is not indexed by CollectionID, and the + entries in the collection are listed in no particular order. + All entries are 8 bytes. Device Table Entry (DTE): @@ -126,10 +128,10 @@ Then vcpus can be started. - V indicates whether the entry is valid. If not, other fields are not meaningful. - next: equals to 0 if this entry is the last one; otherwise it - corresponds to the deviceid offset to the next DTE, capped by + corresponds to the DeviceID offset to the next DTE, capped by 2^14 -1. - ITT_addr matches bits [51:8] of the ITT address (256 Byte aligned). - - Size specifies the supported number of bits for the eventid, + - Size specifies the supported number of bits for the EventID, minus one Collection Table Entry (CTE): @@ -151,8 +153,7 @@ Then vcpus can be started. where: - next: equals to 0 if this entry is the last one; otherwise it corresponds - to the eventid offset to the next ITE capped by 2^16 -1. + to the EventID offset to the next ITE capped by 2^16 -1. - pINTID is the physical LPI ID; if zero, it means the entry is not valid and other fields are not meaningful. - ICID is the collection ID -