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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D913C4332D for ; Fri, 20 Mar 2020 08:13:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E23D820773 for ; Fri, 20 Mar 2020 08:13:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RiXNWr5C"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gNtKi/k9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E23D820773 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D1d/3ZNluaV2SI0Ek/eH+cQAxgwLGJsvmqEsI0Q4u2Q=; b=RiXNWr5C3dc1rR x451Fi2bU36+6Pd0u1kZMjhnRFdNdZ/OszzwYsvZ8/df+eNECu5IIpSKCoGLRoTQ1V21IoMnmt/Hs uE8IBZMxeloQdMZalLy1YRiT+iBhZjmJH9aXXPt8xquCpVAr/rSO3hHwcEYrj5f/Q9sX+oIF8aa/6 uJIICDS+32+VSaoy5CzNsMyTm61HwE29pXc/U7ooOOGkEKmGtj3JCLlsSOHHVu2P1WnTMvL9hnkcp nwEiKxvD3R1AnpmRQ04WU+iqM6TdEdEVUbwjvKS67zdcnoooLBAU+dSSwQ7LKyBepDMY7L/z842W5 Vy9dX3V2b3jPP+tkW20w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jFCm6-0003b1-Gc; Fri, 20 Mar 2020 08:13:02 +0000 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jFCm3-0003aX-Si for linux-arm-kernel@lists.infradead.org; Fri, 20 Mar 2020 08:13:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584691978; 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=8MAqyKfJ2pHFLOBo7NW3E2Ykhz/QSuq5efa4hJ0jsIk=; b=gNtKi/k9K+67e5lA1VjEJaHE4B5WIEC5FmSGGwZisqnlfP9DZJzNJvdmJTnl6PAP2R4yXJ +79Rv2u86jRBHhRETXKUW9qZDybWsJGVJInGDex5zBqpSI+zzd+dNT1sVvHH9HTiepBOSd KueihLgrp2ISrFZxpVJ3GtlpfIkMy9s= 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-343-tyaOxDRDOMaZqNnRvGlzAA-1; Fri, 20 Mar 2020 04:12:54 -0400 X-MC-Unique: tyaOxDRDOMaZqNnRvGlzAA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B401018B9FC1; Fri, 20 Mar 2020 08:12:52 +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 C90F66EF9D; Fri, 20 Mar 2020 08:12:49 +0000 (UTC) Subject: Re: [PATCH v5 22/23] KVM: arm64: GICv4.1: Allow non-trapping WFI when using HW SGIs To: Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200304203330.4967-1-maz@kernel.org> <20200304203330.4967-23-maz@kernel.org> From: Auger Eric Message-ID: <01014c0e-0151-302c-2a7a-fc60f63fba27@redhat.com> Date: Fri, 20 Mar 2020 09:12:48 +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-23-maz@kernel.org> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200320_011300_002560_7013813C X-CRM114-Status: GOOD ( 18.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Jason Cooper , Suzuki K Poulose , Robert Richter , James Morse , Zenghui Yu , Thomas Gleixner , Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Marc, On 3/4/20 9:33 PM, Marc Zyngier wrote: > Just like for VLPIs, it is beneficial to avoid trapping on WFI when the > vcpu is using the GICv4.1 SGIs. > > Add such a check to vcpu_clear_wfx_traps(). > > Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Thanks Eric > --- > arch/arm64/include/asm/kvm_emulate.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h > index f658dda12364..a30b4eec7cb4 100644 > --- a/arch/arm64/include/asm/kvm_emulate.h > +++ b/arch/arm64/include/asm/kvm_emulate.h > @@ -89,7 +89,8 @@ static inline unsigned long *vcpu_hcr(struct kvm_vcpu *vcpu) > static inline void vcpu_clear_wfx_traps(struct kvm_vcpu *vcpu) > { > vcpu->arch.hcr_el2 &= ~HCR_TWE; > - if (atomic_read(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vlpi_count)) > + if (atomic_read(&vcpu->arch.vgic_cpu.vgic_v3.its_vpe.vlpi_count) || > + vcpu->kvm->arch.vgic.nassgireq) > vcpu->arch.hcr_el2 &= ~HCR_TWI; > else > vcpu->arch.hcr_el2 |= HCR_TWI; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel