From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EA57CED24D for ; Mon, 7 Oct 2024 23:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oUAx6nXlr893COLcXh7JrWdAKfzazyJiQwKWV+hUdVA=; b=Goe+OUVsiY/Mc5CG15+y880xSt SSN8AKGvCT9HF52VsvLU5J0RAJpM+JuFIcmEAb8EGw2UDOHjZ4bQrtmx/iYl/Yo1E3yBfoflmeIXE mLV5ot5DffS/2IASqfnV9282whN1sr/5e/Hnx0DaZYWloeuskX+Af2zLnIMhINgsrK1Lnbi73WZKW ZCTH3FQU/HpcuflC6+6NfvWrMKuC44pJqJ7EPUPa4dNb7vNIhUkf5yU0SJOoc/nSeA7b6E1DPcMAw cLyrLmjYHDCgBQKu63SwHSugy9fm7tkimmlhG33392YIEb3Owq1aze9CO1eb2O2W9E0/im2IZVT6b m5V7cNlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sxxFb-000000042Eq-2odQ; Mon, 07 Oct 2024 23:34:51 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sxxEI-0000000421b-1IKj for linux-arm-kernel@lists.infradead.org; Mon, 07 Oct 2024 23:33:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728344009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oUAx6nXlr893COLcXh7JrWdAKfzazyJiQwKWV+hUdVA=; b=aZ8fMSAMHldM4i9J0+gRu+6h1y0EzhkR+Un5jspOdSNcErAg73ui2VnUwD6yL419FtwzjA J8O7nLuls83DwyBYTMvYW52AcD52MDJZL+Rd0CqrBobL13huvJEWxYr0/P94XgP2+m873x YmjUPiowI7DQdMg5Co8fCYK9RqZygk8= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-449-mDgJukb_PxSg1qhDl2JCrA-1; Mon, 07 Oct 2024 19:33:28 -0400 X-MC-Unique: mDgJukb_PxSg1qhDl2JCrA-1 Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-2e2812b5ff8so246498a91.1 for ; Mon, 07 Oct 2024 16:33:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728344007; x=1728948807; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oUAx6nXlr893COLcXh7JrWdAKfzazyJiQwKWV+hUdVA=; b=tE/csWZ87zuSbXS01R2u6iISaB2LIrykSCNIOcF46tsM04wweNODgvEIrrkgP/aUEF B1jKZoVmH4/IOK2RUnDBzQVGcBUGx0A6R3gGWdRdk0P+dD+4kja+3dmK4v1IbkO/aG0K +dTHtFH0nND63r0Z6vviTYFjuaszvuONhgVA7V380wZVFqpHqHS0Vi1+XhEKiKrC3tsi nwiSmtpc588dFFZOV+I4R3G4VpD6oyBpUoae5gV59GO3/nxcxPw3TLAEbfpQCDGTHs5Q K6udVnr7yzBZQDpVRBeo21pcACfPT2cpKDhLYzlb6pKFZuW0OU2AOami0pzvecwXL974 7vcw== X-Forwarded-Encrypted: i=1; AJvYcCVKb8NKBu6+7U2jwJk0whNtYldw69EOqwWBoB2EFBgP6sDALIxpq94BUQF8oJom8/Xd6HBEtwDuNLav6SsF153b@lists.infradead.org X-Gm-Message-State: AOJu0YzQo7fqPP2/7htZYiY0HVn05TwUEj5LaHgrZzL8x0ImzGne/6bL 7YO+gYb98VlhsY788lbiyttl3vnKzaUpQRNp3l+OT/VQ4t24UF6/dIfP+cKvpWGC9LcYV6unhyY 87FTp3agW2emenHhb7ZBpe5mOi5ODO/KY3/j7ZaDHkKmViyN9JBOqDYDrU6qBOx71yLGp6LvP X-Received: by 2002:a17:90b:302:b0:2d8:d098:4f31 with SMTP id 98e67ed59e1d1-2e1e626c06amr14188675a91.17.1728344007103; Mon, 07 Oct 2024 16:33:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3uOhYexO703NofjJ/K1+V6Z0EqfLIjrytFm7WskmOCohACxWBRCDtgqXpyOZ0bCoE9smNBQ== X-Received: by 2002:a17:90b:302:b0:2d8:d098:4f31 with SMTP id 98e67ed59e1d1-2e1e626c06amr14188663a91.17.1728344006795; Mon, 07 Oct 2024 16:33:26 -0700 (PDT) Received: from [192.168.68.54] ([103.210.27.132]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e1e85d93b1sm7767761a91.25.2024.10.07.16.33.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Oct 2024 16:33:26 -0700 (PDT) Message-ID: <07d1c00d-fcdc-4121-a766-2eb0c149bb8d@redhat.com> Date: Tue, 8 Oct 2024 09:33:17 +1000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 03/11] arm64: realm: Query IPA size from the RMM To: Steven Price , kvm@vger.kernel.org, kvmarm@lists.linux.dev Cc: Catalin Marinas , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Suzuki K Poulose , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Shanker Donthineni , Alper Gun , "Aneesh Kumar K . V" References: <20241004144307.66199-1-steven.price@arm.com> <20241004144307.66199-4-steven.price@arm.com> From: Gavin Shan In-Reply-To: <20241004144307.66199-4-steven.price@arm.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241007_163330_456900_5A7BDFFB X-CRM114-Status: GOOD ( 16.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/5/24 12:42 AM, Steven Price wrote: > The top bit of the configured IPA size is used as an attribute to > control whether the address is protected or shared. Query the > configuration from the RMM to assertain which bit this is. > > Reviewed-by: Catalin Marinas > Reviewed-by: Gavin Shan > Co-developed-by: Suzuki K Poulose > Signed-off-by: Suzuki K Poulose > Signed-off-by: Steven Price > --- > Changes since v4: > * Make PROT_NS_SHARED check is_realm_world() to reduce impact on > non-CCA systems. > Changes since v2: > * Drop unneeded extra brackets from PROT_NS_SHARED. > * Drop the explicit alignment from 'config' as struct realm_config now > specifies the alignment. > --- > arch/arm64/include/asm/pgtable-prot.h | 4 ++++ > arch/arm64/include/asm/rsi.h | 2 +- > arch/arm64/kernel/rsi.c | 8 ++++++++ > 3 files changed, 13 insertions(+), 1 deletion(-) > [...] > diff --git a/arch/arm64/include/asm/rsi.h b/arch/arm64/include/asm/rsi.h > index e4c01796c618..acba065eb00e 100644 > --- a/arch/arm64/include/asm/rsi.h > +++ b/arch/arm64/include/asm/rsi.h > @@ -27,7 +27,7 @@ static inline int rsi_set_memory_range(phys_addr_t start, phys_addr_t end, > > while (start != end) { > ret = rsi_set_addr_range_state(start, end, state, flags, &top); > - if (WARN_ON(ret || top < start || top > end)) > + if (ret || top < start || top > end) > return -EINVAL; > start = top; > } I think the changes belong to PATCH[02/11] :) Thanks, Gavin