Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2925965pxb; Sat, 25 Sep 2021 23:35:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLAQdsVeWk7zSqZivsZlqOptusFhrAGmrWHl9lsvVc6lPOR3aAmFKIvYwZnvIK7oXX2Lg5 X-Received: by 2002:a5d:9601:: with SMTP id w1mr15655596iol.209.1632638121193; Sat, 25 Sep 2021 23:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632638121; cv=none; d=google.com; s=arc-20160816; b=a+Av+wTM59MA59twVG8lIFr09uaIYCNP9R7yWmc5VUS21C3EbvIq2G1gCgCPEYD2+D urPS4oqZ673JGB4K5HrUjdAj7MHYAJYb0okkAXKBjXBLbAsHjXWBaQjX3gRg5Y7WaWN5 nHr9yY+LTa70+yo+VrxDKq7Ev1oqwNU6hbVT1NluoWp+RdWwK2l0hbZmie4FPTL7sWPS xFnCJSNzm/uI3djrPnF1+9tnFRQryeKBgTyxr9natKRWKKp0k31edDYFioxv+Z+p9Ugf AT5fuLdph2iXSfvVoZUH9X/p7hFFqsguszKkw+u9rT14Pdwkny6coOynipWVAqXLMjPW iDuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=1TiBTpYstMaABQ/rAwh18m9vsSq3OqvaFEu629LcCL8=; b=TMEh1/WqrQ1mK89Lj0RJxRop3tXDtIupq+q5Wssut0IWHSG6fWvBfsOHkHh3ePKuqH TEeZKjyEkZEjMYMrO0ndwTFpABjrxv18Os4zOpFq6iJ4jcBkjoCWSDOIgDv1bCmjO+/Q zcjbp3Zd+IrTBi9yObp4heQyoJ6kXI38aupJi6w8LJtkqDglvCM+o98l9emqxXroqaN1 uq4KFcYPxNh0XWrSyXY2Eavl2v9jNtY8lbl2A8gQuQA1JlIM9sMifHH4FAmeUn5tPOuj n66+8k+Ltw3z4eoUysnkDKw9CEDaXBWRg6yNur7loHhXu+baBAGZZhwI2WaorZX9Ubzw xszQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="AT5/PG0z"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p14si18656560ils.103.2021.09.25.23.34.56; Sat, 25 Sep 2021 23:35:21 -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=@redhat.com header.s=mimecast20190719 header.b="AT5/PG0z"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230507AbhIZG3M (ORCPT + 99 others); Sun, 26 Sep 2021 02:29:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:46008 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhIZG3L (ORCPT ); Sun, 26 Sep 2021 02:29:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632637655; 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=1TiBTpYstMaABQ/rAwh18m9vsSq3OqvaFEu629LcCL8=; b=AT5/PG0z3EzdeorlWOjcalMkMIuqdx/kSJlyedxA9a0Z5HaOAWh19SuOyQfVfP1hscnXDo ndrzwXzzRB5LVNi85EvMVI55Hx7Hnns/fgrq4gRTKomf4x5KJinVbPpTd/gfSLSyo8Vl98 RL+yotYrs93Q304RJn+4O16zB8UkSk4= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-508-_FUZm6mAO9q_KslOyXsh_A-1; Sun, 26 Sep 2021 02:27:33 -0400 X-MC-Unique: _FUZm6mAO9q_KslOyXsh_A-1 Received: by mail-ed1-f69.google.com with SMTP id 14-20020a508e4e000000b003d84544f33eso14578377edx.2 for ; Sat, 25 Sep 2021 23:27:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=1TiBTpYstMaABQ/rAwh18m9vsSq3OqvaFEu629LcCL8=; b=29kJeY1D21v7C5mOrhpoxtgXcGdlsynafGvxJqp0rMr9NsLHu3RabO/rDFtx/MSBi2 5DP0upaZxaqN2HtOLcREPOOkuhgOG2dZuWd5wDUKU62jsXUOxJh4KD5JadU09fuCU5sB +OYLuBhTH/oNlqSxV7ZW80swWAYSYVPyAkRmheMY2R5XKxvuhhfhUTmTw/z6FgUzKbe3 oksPDtx3JrPlOhvo6SayMNZys8JgPfkCPSP1V0fY1JQC6IZHVMZ4jLBLfFOpVPfCGLxA Od4UZdIKaeNcrzkKcP/O1mVT3K1tWVCyIHiUagDUvUU1/qlW+U80ZkgbQXKa7DHpXlM8 OFLA== X-Gm-Message-State: AOAM532DNGn2f/VgC9oV/GClY6Fjc6kphajeaSbATnEBvEkjFI5jukr3 UT5SgBgHQf6lkIZA8U2BmpzzV3kfXo2dJR7Y+/KyH6U7aOUh8mogofm7HZ455xOpKK0gZIA0bnJ GYwnnpivMNp1K64BrFdUHogN9 X-Received: by 2002:a17:906:bcf5:: with SMTP id op21mr21248195ejb.114.1632637652475; Sat, 25 Sep 2021 23:27:32 -0700 (PDT) X-Received: by 2002:a17:906:bcf5:: with SMTP id op21mr21248168ejb.114.1632637652217; Sat, 25 Sep 2021 23:27:32 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:63a7:c72e:ea0e:6045? ([2001:b07:6468:f312:63a7:c72e:ea0e:6045]) by smtp.gmail.com with ESMTPSA id dk27sm8333826edb.19.2021.09.25.23.27.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Sep 2021 23:27:31 -0700 (PDT) Message-ID: <80d90ee6-0d43-3735-5c26-be8c3d72d493@redhat.com> Date: Sun, 26 Sep 2021 08:27:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH 07/14] KVM: Don't block+unblock when halt-polling is successful Content-Language: en-US To: Marc Zyngier , Sean Christopherson Cc: Huacai Chen , Aleksandar Markovic , Paul Mackerras , Christian Borntraeger , Janosch Frank , James Morse , Alexandru Elisei , Suzuki K Poulose , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, David Matlack , Jing Zhang References: <20210925005528.1145584-1-seanjc@google.com> <20210925005528.1145584-8-seanjc@google.com> <878rzlass2.wl-maz@kernel.org> From: Paolo Bonzini In-Reply-To: <878rzlass2.wl-maz@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/09/21 11:50, Marc Zyngier wrote: >> there is no need for arm64 to put/load >> the vGIC as KVM hasn't relinquished control of the vCPU in any way. > > This doesn't mean that there is no requirement for any state > change. The put/load on GICv4 is crucial for performance, and the VMCR > resync is a correctness requirement. I wouldn't even say it's crucial for performance: halt polling cannot work and is a waste of time without (the current implementation of) put/load. However, is activating the doorbell necessary? If possible, polling the VGIC directly for pending VLPIs without touching the ITS (for example by emulating IAR reads) may make sense. IIUC that must be done at EL2 though, so maybe it would even make sense to move all of halt polling to EL2 for the nVHE case. It all depends on benchmark results, of course. Sorry for the many stupid questions I'm asking lately, but I'm trying to pay more attention to ARM and understand the VGIC and EL1/EL2 split better. Paolo