Received: by 10.213.65.68 with SMTP id h4csp697099imn; Tue, 27 Mar 2018 07:10:32 -0700 (PDT) X-Google-Smtp-Source: AG47ELsU8Tatc00RHFpbPDb0cse+6k3ouvOi3rwNJiV78rFYr6T7gUxznZndR3WVpKvsag2sG9wf X-Received: by 10.167.129.217 with SMTP id c25mr17348470pfn.143.1522159832417; Tue, 27 Mar 2018 07:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522159832; cv=none; d=google.com; s=arc-20160816; b=bKfZLu8cE+UQxPP9PZPCIZHLL8t6tiFn6EUC3LuO2WR5yDSeuhN8T4rV6+nd3AKrfM 6v00MndVIB7rVTSDWii0DvlHVA6t69IHFuJ5L6TCIhUtO6qRNLMRxnlljIfpGbivLBfc vO2hTpug0eCR2oTsxvIpUAAvPcOxuAPrCs94VPdgPMWOrDDDWuh/pPkw2rLItZ+zcYsg OmhMrr1GTYjMUVcNoxwn0b/EmTVIasSTQPEP1hjSZksgKv0W6scNRvPnYJFDStcVMJ5I BP4xPw9898iGtTyn3t3iwmp5J06u18/ypuUfbBThgzo6htwoep4TY3nV0e6266L7dK7s O+3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=b8f9NOFRdap+viLZckujywg66n5Co5ikrHuYv90VtzY=; b=BYH+uYuFDrk2pcEuw/18jYStffmkvrrMWFLOCdIYW5NhBjbrpGKodxZUz7O5JHVVnO r0N49r3QY2jVRXSBRd7A5RQ1imQhdtf54TOcDGzmxv+jOCdU/UqcIeUR+yko/f7U00cJ pRK0DbkCr7E+erAV9Ew97aNBoXJao1kfmeqLIA92IzHQMj1MeO/1YMqsbmcO4tajWAFK 9xhrFW1tRanwELxdP0qmQ/R4xplbBnNuR/IghUS5hqUw4wzRVFotUukJkY8+G/VOTVoS gYIFFvjrstmL1z/YOOuyd0RWQfN1CqLQddoQomkMexbi2rIpXTxOqnjDd/5T1VFv92lZ a0Gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4-v6si1335911plh.540.2018.03.27.07.10.18; Tue, 27 Mar 2018 07:10:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733AbeC0OEd (ORCPT + 99 others); Tue, 27 Mar 2018 10:04:33 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35928 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750944AbeC0OE3 (ORCPT ); Tue, 27 Mar 2018 10:04:29 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7989B7CBBA; Tue, 27 Mar 2018 14:04:28 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-135.ams2.redhat.com [10.36.116.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C836215CDB5; Tue, 27 Mar 2018 14:04:26 +0000 (UTC) From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com, cdall@kernel.org, peter.maydell@linaro.org Cc: andre.przywara@arm.com, drjones@redhat.com, wei@redhat.com Subject: [RFC v2 02/12] KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION Date: Tue, 27 Mar 2018 16:04:06 +0200 Message-Id: <1522159456-10419-3-git-send-email-eric.auger@redhat.com> In-Reply-To: <1522159456-10419-1-git-send-email-eric.auger@redhat.com> References: <1522159456-10419-1-git-send-email-eric.auger@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 27 Mar 2018 14:04:28 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 27 Mar 2018 14:04:28 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'eric.auger@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We introduce a new KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attribute in KVM_DEV_ARM_VGIC_GRP_ADDR group. It allows userspace to provide the base address and size of a redistributor region Compared to KVM_VGIC_V3_ADDR_TYPE_REDIST, this new attribute allows to declare several separate redistributor regions. So the whole redist space does not need to be contiguous anymore. Signed-off-by: Eric Auger --- Documentation/virtual/kvm/devices/arm-vgic-v3.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt b/Documentation/virtual/kvm/devices/arm-vgic-v3.txt index 9293b45..0ded904 100644 --- a/Documentation/virtual/kvm/devices/arm-vgic-v3.txt +++ b/Documentation/virtual/kvm/devices/arm-vgic-v3.txt @@ -27,6 +27,24 @@ Groups: VCPU and all of the redistributor pages are contiguous. Only valid for KVM_DEV_TYPE_ARM_VGIC_V3. This address needs to be 64K aligned. + + KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION (rw, 64-bit) + The attr field of kvm_device_attr encodes 3 values: + bits: | 63 .... 52 | 51 .... 16 | 15 - 12 |11 - 0 + values: | count | base | flags | index + - index encodes the unique redistributor region index + - flags: reserved for future use, currently 0 + - base field encodes bits [51:16] of the guest physical base address + of the first redistributor in the region. There are two 64K pages + for each VCPU and all of the redistributor pages are contiguous + within the redistributor region. + - count encodes the number of redistributors in the region. + Only valid for KVM_DEV_TYPE_ARM_VGIC_V3. + + It is invalid to mix calls with KVM_VGIC_V3_ADDR_TYPE_REDIST and + KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attributes. When attempted an + -EINVAL error is returned. + Errors: -E2BIG: Address outside of addressable IPA range -EINVAL: Incorrectly aligned address -- 2.5.5