From patchwork Tue Mar 21 11:05:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9636401 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 D5CB8602D6 for ; Tue, 21 Mar 2017 11:06:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D609826E4F for ; Tue, 21 Mar 2017 11:06:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA8DA27F07; Tue, 21 Mar 2017 11:06:14 +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=ham 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 66B7F26E4F for ; Tue, 21 Mar 2017 11:06: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=QmgV+E2vkLIwP67sbn1uLkOdm/rY0YwQkYgODHvzNvc=; b=VqNTGnbcoVU4MN86EjRb+p/U7R D8JTHzxh7b06oYjpYCmxCoMqLpCnWea5eXWBqa5LqbNgPu0pkiJxhvPCMhYft7Sfdy1qdJP7K07N+ m2Qsq6Vu5oGVkAV583cUiSZyNgJ87kGuQ5oB8863Ano2w8Qce5BjomB2ka3oYMzP/SVYH8aK5vPqL ZWPMvzPR5WyXnC3gwPwTi5ogEzKvF1d3YzkvvOlp7Ubf5f/0D4xS5ma89b9RfMeE7W/ylQSW+KhUo Efe3iLD1TRiNWCPMdnlV4f5dHEnOD/HzQND/Esw46aVt3I/oU7/f7g28xEvSYhZ0BiwJMY8k8k+iM cqhwWz4A==; 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 1cqHcD-0004ot-Qz; Tue, 21 Mar 2017 11:06:13 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cqHbw-0004V5-R9 for linux-arm-kernel@lists.infradead.org; Tue, 21 Mar 2017 11:06:00 +0000 Received: by mail-wm0-x236.google.com with SMTP id n11so9555233wma.0 for ; Tue, 21 Mar 2017 04:05:36 -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=DyI9+px9hX8B3bTU9+TYBUx7FI3wv7vtEe0qWAm1NRA=; b=El389jpHYPniCwn5YO2OFXR0xrq5AsPAOGVYZe7BnSprYw/+BTGEzyjTHVIvZXITqD wLOUSOxNRg6c0I2/8J1+W7ANbqTlfnvYO0njlATfcdsKbmyaYMxfmAZeyD6P6q7pa2ik kCdBgWfFxko87R6otVBg9wRUfmC1kQVDmgpDU= 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=DyI9+px9hX8B3bTU9+TYBUx7FI3wv7vtEe0qWAm1NRA=; b=tg1m6MN5WPlyP3ws/f6nXSoIQOayViOSwUbnevXfFA9RYbqRywN0WAtHGHrScwgbsQ +ldsgAS3Yu07UWVJZ+UjgR2E1xPdBLo4gZQPQvj8k2z2cHeiSfhr0agW0WiEHwh4h0Qf sGkWIufN1ifgLfC5MCuGBdY8NG6oE6Fgv72XrDpf8jnGGLaSf/STfgRdYqRls82zDFTq CbQIAYKbWrGl88SVqrT2NBobSnG9SPrYY4Rm2bLbbMrosHbCrB715ZPO6Gh8uc8KKEqP imZOkIc3+r67w8G5BINIFw0DjXv96s/93t+UE34sVSH1g7jceTjgNmZmE+piwW7DfenC NrHg== X-Gm-Message-State: AFeK/H0uM11YkrFOavcVbIb2nuSUEkfaltcdmIUtmcoJCAf8bgctc2gSEDuGfpl5GYtLwjS2 X-Received: by 10.28.0.136 with SMTP id 130mr2302161wma.126.1490094334912; Tue, 21 Mar 2017 04:05:34 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id f48sm24358252wrf.17.2017.03.21.04.05.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Mar 2017 04:05:34 -0700 (PDT) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/5] KVM: arm/arm64: Clarify GICC_PMR export format Date: Tue, 21 Mar 2017 12:05:26 +0100 Message-Id: <20170321110530.15857-2-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170321110530.15857-1-cdall@linaro.org> References: <20170321110530.15857-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170321_040557_032692_9B178CFD X-CRM114-Status: GOOD ( 11.69 ) 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 , Andre Przywara , Vijaya.Kumar@cavium.com, Eric Auger 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 We are exporting the format of the priority field as it's stored in the GICH_VMCR.VMPriMask field using the lower five bits when accessing register state using the GICC_PMR offset. This is unfortunate, but it's ABI already, so we simply have to make it clear. Signed-off-by: Christoffer Dall --- Documentation/virtual/kvm/devices/arm-vgic.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/virtual/kvm/devices/arm-vgic.txt b/Documentation/virtual/kvm/devices/arm-vgic.txt index 76e61c8..975a904 100644 --- a/Documentation/virtual/kvm/devices/arm-vgic.txt +++ b/Documentation/virtual/kvm/devices/arm-vgic.txt @@ -83,6 +83,12 @@ Groups: Bits for undefined preemption levels are RAZ/WI. + For historical reasons we export the GICC_PMR register in the format of the + GICH_VMCR.VMPriMask field in the lower 5 bits of a word, meaning that + userspace must always use the lower 5 bits to communicate with the KVM + device and must shift the value left by 3 places to obtain the actual + priority mask level. + Limitations: - Priorities are not implemented, and registers are RAZ/WI - Currently only implemented for KVM_DEV_TYPE_ARM_VGIC_V2.