From patchwork Tue May 9 08:56:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9717337 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 CD5B760365 for ; Tue, 9 May 2017 08:57:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDDE5283BA for ; Tue, 9 May 2017 08:57:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2A99283E8; Tue, 9 May 2017 08:57:03 +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 61276283BA for ; Tue, 9 May 2017 08:57:03 +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=mpfNM85gJB/ms/+QnqVgUnmP/s Q3tlEXjV2S1adSNexlhTPIxcvwlfmNc6bw+QCJ2XiR5rlAD5uzURBSkztsos2va2StRRE3wNOCY2h 2QjH+wni4lk5GiCchCDXbutFiWP/sJxUrVkm2MVLw8i0vb8M0W5giM6GUnwnpK/MQLrgomRE319Yu IFm3E60vOIv/vtAKOyQEMwevmHgBDJYMGA3fTtAq3MQjPHFE0kOGbXxr0oEDvpNhpQEMTDrbb5TWP ObJu04ISYVwU5vMrsPClVvP5iw54EjcJDu9WzJFNd8qpZSzQX6TsfT6ySa9/n0XZ2JvRD86G/1mgL HRm6CrtQ==; 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 1d80x3-0002eL-Gz; Tue, 09 May 2017 08:57:01 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d80wp-0002Hl-M2 for linux-arm-kernel@lists.infradead.org; Tue, 09 May 2017 08:56:49 +0000 Received: by mail-wm0-x235.google.com with SMTP id b84so3381232wmh.0 for ; Tue, 09 May 2017 01:56:27 -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=eqjUwCchNn4yFLJgC1M1RpQhiaAmFTsWWDoNZIe0V4rg07JHjO8In8zAgmQC7mdrRw sx+b7/KTN0PghEUFr2BR2lCTres1onY971Ky3xsJ/TUJ2VvL0tQVcNRaDKgZ6K9d39re lN5YONowwP2Idb07RilS5/SrZrWoFEYMG+ky8= 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=TMmr7l+ITjW0ktNszkpO2ZpoXi8GzXrLHhacnbJwbHgHlnKRS6h/m5KLAFfLUJ/ons Wey0tUDRuBB9TXp32J1KYBnvcwkKyC4613+XWfIWXYS/zSRrP/YnnkrFJCquK2ZNUF9Y yiBXYqedury+VM3MMwys0RgUfBCMiTTlWmOZfbnE5HhPVl00kK3GfQQ+gVXoeIjl/5nZ YEvFyGdKoVtzfCU8fdutd3nBe4/Cg8hIdnu2pa2OnusZPSYFumAECh8Xa0yBUIuAoRrr +pEVdP0tjMhoB2mSTCRk6Dy9rxUxJutD1fFhU/dszS8gW83fwbqnKrBlIAT3ZtHX5qTv +i4w== X-Gm-Message-State: AN3rC/692A7kjyJYvhpHaVz0JKGuqm/xFz3B88A1zx0JXE+ieVdFaFMb W/VUcqAK+nFAuPZD2JCq/w== X-Received: by 10.80.149.81 with SMTP id v17mr46188834eda.76.1494320185895; Tue, 09 May 2017 01:56:25 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id f40sm8376265edb.7.2017.05.09.01.56.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 May 2017 01:56:25 -0700 (PDT) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 01/11] KVM: arm/arm64: Clarification and relaxation to ITS save/restore ABI Date: Tue, 9 May 2017 10:56:08 +0200 Message-Id: <20170509085618.28311-2-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170509085618.28311-1-cdall@linaro.org> References: <20170509085618.28311-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170509_015647_868533_58913214 X-CRM114-Status: GOOD ( 15.27 ) 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: Marc Zyngier , Eric Auger , kvm@vger.kernel.org, Christoffer Dall 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 -