Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3900864pxb; Mon, 4 Oct 2021 12:10:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz81yZ0BkMDCmY8jnqCa+mwyE14P1hm92tlZLlarEvl/CKA1RB5ZHpXReIjFxMx8S/tjXGc X-Received: by 2002:a05:6402:4305:: with SMTP id m5mr17300142edc.277.1633374635065; Mon, 04 Oct 2021 12:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633374635; cv=none; d=google.com; s=arc-20160816; b=ta9iYOMkHMiWdJ1Rc58Vi+gu6DbMWJDz9UwmaMQKRvuEknLXcIbEPTnZ4rlY55wzAu svcZexmOdd8JyT7C1tMHdmv3Q9W0Fk3e6gQVYZ1GoGfi0OQhfJ8oIOn3JYIM0Acjy42H sLAfHvFH4oaAbR+8AvoIXWRC2nL2HaATV8sw6zUeHk8Ou3xfW/F/FCLhfzf3Bp4E6yXF kxduzLh+67qWgO1mFQN+DSUgTxoq4EHMKzISaTdr43Djrd27rTlZpYnmlTWOatqW18cY p4L29nnujwcbU/UiJL8GSLKoOtRKaY+Az1DkyCTc6wrVJOShrEmwmWcoIc69oXGnxM1+ 86vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PIqLRUwkpWrhqoIb+2LbHIi6YwYZzYCnePRyYQW7lLY=; b=IXm5o7DyaIHofCIFFQO1nJUEWJfoWcPDOybAoyMDck/u9Hj17vurFfqzb94tbTKEG9 B6teTWjcHw36evmBEA8S+oj3zPDszVpJmGHE1ROVaKM7MBfbMuS6fabjwj+zXHClWGPw PScFJk/8vYridRt5npKVxuxEcHyQbWgLqXedqgdP489YrHMRt3cmEEYmb5SP56b5G4jP h81E4FI7gvEhCn5QLQ+Lzsj7rCtUdjZfl7ZMQ7/IbSNdKoiQkYzP2vF/AIwLWxcTDjMj CSZvAbRXIFRtGQGIEPgbJkiYzsMFwyFcSsGhaOkeMTN5eZsGBLL1vMcovCNz8Rvh/zeo n+Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=gjvD3+vx; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si17031599edx.113.2021.10.04.12.10.09; Mon, 04 Oct 2021 12:10:35 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=gjvD3+vx; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238521AbhJDS26 (ORCPT + 99 others); Mon, 4 Oct 2021 14:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238408AbhJDS26 (ORCPT ); Mon, 4 Oct 2021 14:28:58 -0400 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D321EC061745 for ; Mon, 4 Oct 2021 11:27:08 -0700 (PDT) Received: by mail-yb1-xb34.google.com with SMTP id h2so39762017ybi.13 for ; Mon, 04 Oct 2021 11:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PIqLRUwkpWrhqoIb+2LbHIi6YwYZzYCnePRyYQW7lLY=; b=gjvD3+vx4+r4kREI+kJyLRqAt3T9ueCkkwyrIGXw4kVjsxk4B+g3/MppZhl7N6wTiV PMJqtTnyCh8HPiYVaClZKX6vsiy/6Hky+sKMa3Lv0KbQMju9xs4Np2wLdKgAB0JjT9Od WKQmaL+SK4LQ59q2qi8GLJ4pEsOTqRJWOl1nQNfc6qULxZIsXFlxrSF4fWxTsGlbaevw 2YN7Xw8DA2tlSfBVpAcffPslrlDJrVUOjvu3UqCLjaEuFPaWwtlUYBZRaMkFjY1QzZ/Z uDOdzZ5anwcBpaqRWOz2jV0W6w/UdOifflY5/OMNNvn9JP/fumSBYvDtWLn74afG0khE 2vwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PIqLRUwkpWrhqoIb+2LbHIi6YwYZzYCnePRyYQW7lLY=; b=l6DcOBEhmW0u1jThJe6zjPolrQcBzGi9jv+WM2lWNwmq3WBmLojHdrIval4ZzMldqk z+Ir02wYWuGZVPgvtnO6VbfaeynXM/2PZuo0z9XzQeHX9WU21R0aP7oZAWBZNFMlEtd+ 0LlXI5MjjgLXOhjWT3HYvVmmFk6mLsJwJqjpOz05YSxd3Yc2efVW7QCYoKCR6yfnERn1 k0Cs57PbpNwTiRCcxR1ZZ8ySwg7PFE8MnNV/38PYYC86HnR43nCYFDOQaRlxoU1jcpFx 8zgvD5areANoazzsJ1shX7EYFatQbtE8ySNW5EHm9e+ARuzBE/2FdS5oOOCuXQsc8PWa PE1Q== X-Gm-Message-State: AOAM532WfYJ/9UcqBjnTRKfaA50+Syd/rATiTkblyJdAeoZeomcQj8Xh ZXymMp+Ohjb34o/Utlic/PAValjogcbRESgWJw7rew== X-Received: by 2002:a5b:283:: with SMTP id x3mr16689301ybl.439.1633372027973; Mon, 04 Oct 2021 11:27:07 -0700 (PDT) MIME-Version: 1.0 References: <20210914223114.435273-1-rananta@google.com> <20210914223114.435273-13-rananta@google.com> In-Reply-To: From: Raghavendra Rao Ananta Date: Mon, 4 Oct 2021 11:26:57 -0700 Message-ID: Subject: Re: [PATCH v7 12/15] KVM: arm64: selftests: Add basic GICv3 support To: Zenghui Yu Cc: Paolo Bonzini , Marc Zyngier , Andrew Jones , James Morse , Alexandru Elisei , Suzuki K Poulose , kvm@vger.kernel.org, Catalin Marinas , Peter Shier , linux-kernel@vger.kernel.org, Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 1:06 AM Zenghui Yu wrote: > > 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 Thanks for catching this. I agree that mentioning 'gpa' oddballs this function, since it's called from a guest's point of view. If there are any other major changes in the series, I'll try to change this as well. Else, I will try to raise a separate patch to resolve this. Regards, Raghavendra