Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp73262pxb; Thu, 30 Sep 2021 01:09:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWtBUBLO/m4kY497qEsqtDyjC9rttiqbeCcBLR221iwVwwg5mOsrBSdFQpZkNeWKOBKgQV X-Received: by 2002:a65:5c85:: with SMTP id a5mr3803813pgt.126.1632989346273; Thu, 30 Sep 2021 01:09:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632989346; cv=none; d=google.com; s=arc-20160816; b=vGF+2hN043LaMXpONv8ayrQ02lM/3EtzL+vwpcDXXZHK4SE2eUqLak+IbwBVXf5qVE v/KcQzhiymzzIta6O+jydvE6RMf9PPmeDtX8vXIc1MKGdh9RT1HRNtPIHPnQyuW1y1qM 6t3i0A1T7IGGJM6Ur98Txny0jvYMpi1ZuGHy7+JKzStu7glr05OQ0d2nj7ByPCx/R5Et fHy49VVoUCKYc07ov1VXWRINHuJq7Ph/ptkGXSD97HATA+KSYsdXkqh99CzLWTZDJ9eF pZ79ZFZHAl/B4wZAwjcRc7N82XW7n/JcNtQQXKqJ87MfXDrChptY/h7t29AGr8AZdBnp mgFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=1ksDZaVGqX0I2W5tNUQYDd16I+jKgRWy26YuuJ68llU=; b=f8D2iqZ829lOKaebpvKSUybJTWBx68FwzNAW/xti3cNMnjY4XYSN0J49SRr6RqxW3k XoHuWH/EDvLS+RzcFv2FaV4JvncqUfDR7VUIwhXwhyRXZluwLxunPpZVo9O8I6s19TEz hdFNDvqnRmj3G8TGE6fPqGqzWiS2BWyIHWU579sDudb4de0lXxHIA6NxC8NAUi7Fj3uV GzjkED0gGEXTW/Qlix/kjOt7LRUydD4ULv7AM99/7P/WHhDHU30pQGfPsGm15cHubJ0g M2/1LSjcWjaazcVfBpfi9R1H74NRwY0Dluu06qEUWH0gs2ASWxxLtJE2Q2AqyY6C31ni IN0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si2761114pjk.23.2021.09.30.01.08.53; Thu, 30 Sep 2021 01:09:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348983AbhI3II5 (ORCPT + 99 others); Thu, 30 Sep 2021 04:08:57 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:24160 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349254AbhI3IIS (ORCPT ); Thu, 30 Sep 2021 04:08:18 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4HKm4p4KzQz1DHQH; Thu, 30 Sep 2021 16:05:14 +0800 (CST) Received: from dggema764-chm.china.huawei.com (10.1.198.206) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.8; Thu, 30 Sep 2021 16:06:34 +0800 Received: from [10.174.185.179] (10.174.185.179) by dggema764-chm.china.huawei.com (10.1.198.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Thu, 30 Sep 2021 16:06:31 +0800 Subject: Re: [PATCH v7 12/15] KVM: arm64: selftests: Add basic GICv3 support To: Raghavendra Rao Ananta CC: Paolo Bonzini , Marc Zyngier , "Andrew Jones" , James Morse , "Alexandru Elisei" , Suzuki K Poulose , , Catalin Marinas , Peter Shier , , Will Deacon , , References: <20210914223114.435273-1-rananta@google.com> <20210914223114.435273-13-rananta@google.com> From: Zenghui Yu Message-ID: Date: Thu, 30 Sep 2021 16:06:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20210914223114.435273-13-rananta@google.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.185.179] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggema764-chm.china.huawei.com (10.1.198.206) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/9/15 6:31, Raghavendra Rao Ananta wrote: > +static inline void *gicr_base_gpa_cpu(void *redist_base, uint32_t cpu) > +{ > + /* Align all the redistributors sequentially */ > + return redist_base + cpu * SZ_64K * 2; > +} > + > +static void gicv3_cpu_init(unsigned int cpu, void *redist_base) > +{ > + void *sgi_base; > + unsigned int i; > + void *redist_base_cpu; > + > + GUEST_ASSERT(cpu < gicv3_data.nr_cpus); > + > + redist_base_cpu = gicr_base_gpa_cpu(redist_base, cpu); This is not 'gpa' and I'd rather open-code it directly as there's just a single caller. Zenghui