Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp247312pxb; Mon, 25 Oct 2021 07:33:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlS8nhZp9o1zAA8Lq/sDgJ2tSicMwjP5w8/sJJkd8YxEGv2DrE4LfyJlxFT5XYjdqHCdp+ X-Received: by 2002:a05:6a00:1a46:b0:44d:7a3f:2043 with SMTP id h6-20020a056a001a4600b0044d7a3f2043mr19350569pfv.56.1635172409762; Mon, 25 Oct 2021 07:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635172409; cv=none; d=google.com; s=arc-20160816; b=b6kgCTu96/O9YBCZNimLBdcNy5E+RVWZQzzRiSCh64cmPwuK0M2nxDN/vjLCxFHIye 2+XFWlwnNYGYy3NXysvoZ0W4iOcaoBcU/sN+pdC+9wCoWBsCUqWTL8GxWZ65zv1Yyb7P NfqlqhITA7qJC4azY4u9kupoihFbIO3mAz73p+AXPa8eg4WrwopIvEI8xz9RlYVVqGjL c1geBAm1Lr++j/pA2FSBYxM5aTdSJLMVhP43CwlJxDRMFdx70ky8PSawj/bLPv7A79hO p2m4Py8dp9h0d7T8niqOKSVlrqaxPbRmNc6GxjmmeEG0KxqGqQthSiHoZOqyL4sxVAOt 1fwA== 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=FblMqi74l2aNQDmIbjX/cagfl890xy4Kf5Rp2sw8Ik4=; b=knUtGc7S1C4u+73SBW9OfPHRAm8f55ht70TFTJmmYQgvoCcNR45H8lSGl8pIg7YuOo 2jOkqzt+Y6odAPR6YPAPKaa9jPg56gg+pwSFIhhJuTnZI2w94zUYnzWZFE5yRZMg5Zhm cPP8GI96SQF1hxx3CY+ECjO862xnFoK8fbTdSb1p6zSua6nJlU55I+ZJV66Ua2B+Uab0 8KCpT7ioI1c/9L2ACmuSWRhW6VbWhMoexSMxbwX08wFQ1SmhNTcf0kQ67ISFKQef3llH D1LSqB6eYqP9iMihjDh9LAc2YO+1lht6NXtJY+FHTiUt80Ot2ATg41/28jwRIaDvoyQG E15Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iybnwA0Z; 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 u69si4321099pgd.176.2021.10.25.07.33.17; Mon, 25 Oct 2021 07:33:29 -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=iybnwA0Z; 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 S232495AbhJYOJK (ORCPT + 99 others); Mon, 25 Oct 2021 10:09:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20838 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbhJYOJJ (ORCPT ); Mon, 25 Oct 2021 10:09:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635170807; 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=FblMqi74l2aNQDmIbjX/cagfl890xy4Kf5Rp2sw8Ik4=; b=iybnwA0ZadanTHPHXV9Sbz8JrJm508VE747MwvM0WjR6zQ0H7YDqd8ZruBnkQ8FFxyEkLe EgxdHniFGcd9Kn9JX9OlnRN8CIce0gmXIzCQlA1kEkpfoB6YZQAZlGvUeoCF65178Zytrj D7Zwzzcgb/nbyViN/FOhKcEzj6+6j48= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-431-1qEgo8EUMNONcrLdJb5Mlw-1; Mon, 25 Oct 2021 10:06:46 -0400 X-MC-Unique: 1qEgo8EUMNONcrLdJb5Mlw-1 Received: by mail-ed1-f72.google.com with SMTP id r25-20020a05640216d900b003dca3501ab4so9973304edx.15 for ; Mon, 25 Oct 2021 07:06:45 -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=FblMqi74l2aNQDmIbjX/cagfl890xy4Kf5Rp2sw8Ik4=; b=jdnj2OPM2h0bE1T5aj+WjQsGKGOQ3nf5M3JMIfrG3I7p3ktD4d0QJqudBeW3COVXky mIlPE2YHUOyjugA0vRyhNmkWOuhwdspBINmEhaclHMJVHANhfJHykNRLTcoUNAbORyEP zXVFXIn2DfS0Ob7N3/Bb3BQ79HR84Y1oHnaeD2DADj+/48SqiSYh3wyOIUQzkSxDnuc5 k+07uNE10kRI5Tix8cskLwut5XOj3ZeqlQHKRPw6R4bFl2GSSHID3qEzZNJR4zST8ef3 L0JsVI8e/U8M6EszbJRdJ5q+uTcg15DzPnDQjFbzX+CRXRQxwXnVOJ4r8SAV4YHzmTjn h29A== X-Gm-Message-State: AOAM533uQadp5NUG+dFQgbFO/vjIRuUXTsal22CfhABGboyPlietXUyE ts2SLFX+3MgEzOkl6T2Y6XD7gymn/Mpg3TID4MiFr99BkfU7CoM3GYlbaBvSo7qV+fRxIYXlIBB xwqfSApzvxW2E7Sav0stgFpes X-Received: by 2002:a50:fb02:: with SMTP id d2mr11770138edq.100.1635170804934; Mon, 25 Oct 2021 07:06:44 -0700 (PDT) X-Received: by 2002:a50:fb02:: with SMTP id d2mr11770084edq.100.1635170804745; Mon, 25 Oct 2021 07:06:44 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o3sm7472237eju.123.2021.10.25.07.06.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Oct 2021 07:06:44 -0700 (PDT) Message-ID: <591073c1-b520-21de-8573-ddb83950e9f1@redhat.com> Date: Mon, 25 Oct 2021 16:06:31 +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 v2 19/43] KVM: Add helpers to wake/query blocking vCPU Content-Language: en-US To: Sean Christopherson , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , Atish Patra , 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, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, David Matlack , Oliver Upton , Jing Zhang References: <20211009021236.4122790-1-seanjc@google.com> <20211009021236.4122790-20-seanjc@google.com> From: Paolo Bonzini In-Reply-To: <20211009021236.4122790-20-seanjc@google.com> 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 09/10/21 04:12, Sean Christopherson wrote: > diff --git a/arch/arm64/kvm/arch_timer.c b/arch/arm64/kvm/arch_timer.c > index 7e8396f74010..addd53b6eba6 100644 > --- a/arch/arm64/kvm/arch_timer.c > +++ b/arch/arm64/kvm/arch_timer.c > @@ -649,7 +649,6 @@ void kvm_timer_vcpu_put(struct kvm_vcpu *vcpu) > { > struct arch_timer_cpu *timer = vcpu_timer(vcpu); > struct timer_map map; > - struct rcuwait *wait = kvm_arch_vcpu_get_wait(vcpu); > > if (unlikely(!timer->enabled)) > return; > @@ -672,7 +671,7 @@ void kvm_timer_vcpu_put(struct kvm_vcpu *vcpu) > if (map.emul_ptimer) > soft_timer_cancel(&map.emul_ptimer->hrtimer); > > - if (rcuwait_active(wait)) > + if (kvm_vcpu_is_blocking(vcpu)) > kvm_timer_blocking(vcpu); > > /* So this trick is what you're applying to x86 too instead of using vmx_pre_block, I see. Paolo