Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp745271ybb; Fri, 20 Mar 2020 07:26:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuGBvxJRbsC7pI3koIOAp9iJSLpBgjXrz/Oz1ZvUg2k3652b4DmWFwMz/XOkbwbjCf4ygKS X-Received: by 2002:aca:a94a:: with SMTP id s71mr6365895oie.152.1584714387291; Fri, 20 Mar 2020 07:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584714387; cv=none; d=google.com; s=arc-20160816; b=brelP+hXVLX3pOxtVHNfXWBCuuu8xuBZy8sKSOJNk3wH7oBHAN9RBU0klmuYSgvw3/ +QLjLe5L2EkNS37aQrziHSbSQHo7CUjsktuTP3w8dMZ82tgrHxS6O5vblLtHTcl9EsV4 wM02m7h+R5nBv6pk/4FFvYWX0YZOrhsTWPqbMOgcY3LVvaAnfVTqZvFximkenmgZA0q4 Pubo5b7EJR5VjteznJ2r+c5g45Uj1i5U9EuDrisTN0TtyBIw/F+lzTAWl+9PkY27owSp kdw2G6GOs8SCzOQuQednrPLW24L6LPnKImJhVbdIW3rrVfukFfZ+R3zpGHkWViqUpkHe 6FJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ChzXaaoXuhc1XP2003YPwEPKXIEY82z0Pz3X4zEVJU0=; b=Qlzmber5kM3iEgwrFeQw/i2ymJM77JqvhXLxN0QOhLsVhx9EHRnhiIi5T0o+CQhLeu /yD1Iv+GCeJAw5EKnlc2WjQXRNtmjQAsaTauWFx/KkFWNkQkiTMNqTvDdk77YXLAl+mZ rZFgL8L8ahgXl59ohtGV5W76RJ/ELrn4nOm4n2cCpAj4/SV6ctzh5M07tZzQQSc8CZSy sLrOIm1IfTDTHCVCPTa1RYyW2SHeeaG5Qj/rigTP97FaYfwFG90V2tXoI8WAWbAp5jl5 VKJX413+t4GAcljSzK/90pKzee0tvc2fuVWANnwo1e7swuXUhhLjVuPJKAwOr/fZP7Js 3tdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FXlO3QjX; 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=pass (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 d27si2962502otf.22.2020.03.20.07.26.06; Fri, 20 Mar 2020 07:26:27 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FXlO3QjX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727659AbgCTOYG (ORCPT + 99 others); Fri, 20 Mar 2020 10:24:06 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:27768 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727440AbgCTOYE (ORCPT ); Fri, 20 Mar 2020 10:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584714243; 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=ChzXaaoXuhc1XP2003YPwEPKXIEY82z0Pz3X4zEVJU0=; b=FXlO3QjXpfgPNZohO+4L6wml4AfNk5ieWhZ0bBTWdGqaVvm2pIT9R5emEVrMDYaZ0/fRgV ykIS/eLlSgUCgx15DRMOfjZXL8BpUCr3/toI9y+5mlFdj6WsoPQtXaHRhT+9ho/Wk46V57 DoIHeULMT6ksmZXHXlNVADhpFjauotY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-348-LVVhRZYhMzqVwGVfnSqSUg-1; Fri, 20 Mar 2020 10:23:57 -0400 X-MC-Unique: LVVhRZYhMzqVwGVfnSqSUg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D7E581005510; Fri, 20 Mar 2020 14:23:54 +0000 (UTC) Received: from [10.36.113.142] (ovpn-113-142.ams2.redhat.com [10.36.113.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96AF45C1B3; Fri, 20 Mar 2020 14:23:50 +0000 (UTC) Subject: Re: [PATCH v5 04/23] irqchip/gic-v4.1: Wait for completion of redistributor's INVALL operation To: Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lorenzo Pieralisi , Jason Cooper , Robert Richter , Thomas Gleixner , Zenghui Yu , James Morse , Julien Thierry , Suzuki K Poulose References: <20200304203330.4967-1-maz@kernel.org> <20200304203330.4967-5-maz@kernel.org> From: Auger Eric Message-ID: <60beb328-5249-a79e-eceb-967716a085bc@redhat.com> Date: Fri, 20 Mar 2020 15:23:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20200304203330.4967-5-maz@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 3/4/20 9:33 PM, Marc Zyngier wrote: > From: Zenghui Yu > > In GICv4.1, we emulate a guest-issued INVALL command by a direct write > to GICR_INVALLR. Before we finish the emulation and go back to guest, > let's make sure the physical invalidate operation is actually completed > and no stale data will be left in redistributor. Per the specification, > this can be achieved by polling the GICR_SYNCR.Busy bit (to zero). > > Signed-off-by: Zenghui Yu > Signed-off-by: Marc Zyngier > Link: https://lore.kernel.org/r/20200302092145.899-1-yuzenghui@huawei.com Reviewed-by: Eric Auger Thanks Eric > --- > drivers/irqchip/irq-gic-v3-its.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c > index 1af713990123..c84370245bea 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -3827,6 +3827,8 @@ static void its_vpe_4_1_invall(struct its_vpe *vpe) > /* Target the redistributor this vPE is currently known on */ > rdbase = per_cpu_ptr(gic_rdists->rdist, vpe->col_idx)->rd_base; > gic_write_lpir(val, rdbase + GICR_INVALLR); > + > + wait_for_syncr(rdbase); > } > > static int its_vpe_4_1_set_vcpu_affinity(struct irq_data *d, void *vcpu_info) >