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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1C5BC433EF for ; Wed, 27 Oct 2021 15:38:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 89FC060F02 for ; Wed, 27 Oct 2021 15:38:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242814AbhJ0Pk1 (ORCPT ); Wed, 27 Oct 2021 11:40:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51563 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238839AbhJ0Pk0 (ORCPT ); Wed, 27 Oct 2021 11:40:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635349080; 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=bSqxXsSY7PzPPy6E5Cy05Nx/OdmHcN1STcnBEYyHdIs=; b=MbMxbXAupMhsOj7n1ORnzGUbt2FJk9mfhs1WY97br91xQhy2gI1grOuvQnxEp6LE0pzRZZ 1ueNqOMlSarkjIx3XpEKw+UEb5n1ek2asuexqFwukbmOUCbHmkd+mobwHsmwa1bWXKCwn1 2CRz2Zv9n8TOyxe7u0sslDWf0CgTm/E= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-433-2kBimviMMVa6_u8jfKdJGw-1; Wed, 27 Oct 2021 11:37:58 -0400 X-MC-Unique: 2kBimviMMVa6_u8jfKdJGw-1 Received: by mail-ed1-f70.google.com with SMTP id z1-20020a05640235c100b003dcf0fbfbd8so2716455edc.6 for ; Wed, 27 Oct 2021 08:37:58 -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=bSqxXsSY7PzPPy6E5Cy05Nx/OdmHcN1STcnBEYyHdIs=; b=JbMsIggQ91YqEK2nq+Q2nP3bEgj4pdDv/rroODO8VCzolVmQMBPGlfAMRUicGTpT0r xl88sUXbuD1pA9vy4mCee5lucrERa3423xj2ZBVfSCh2IaizuzxtPYHaFRuSyg8jAIjk WMCYv4MwsxbMypV6tqpRMHeRKYr3BoU5mhkjjN2zUM0/K59xcix4bjSNWwVqu9oBZMwA g3qIaWDS0RZljlyyL28H38Y/KDbV98ky8Wqe83+98NN7MHJWd8PplLWydpS5tCKtVfJT +If9M8oZWndGSY4Rbk6Pu8M/P+gsTR4xnB5qZhjDYx6/38yU/O+rgrjUcUexT3ywSWsj 74QA== X-Gm-Message-State: AOAM531I0fkoQEYjbznnzrkzaOYyvK31aS53detruL4sm8YkLOkWkBVC S0LqPFN/hjvm4W3AJuKOCkvob+jI3wCMCSmypuabA+keI2J0DDcpl67PDA1s4vMK2Grlgp1PGt+ 9evTu9OG/4v8oviCrjQ3kZyD4 X-Received: by 2002:a05:6402:520f:: with SMTP id s15mr19650585edd.376.1635349077546; Wed, 27 Oct 2021 08:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcV3ajcrSuCCBMr6jO83QbO8KNKYMvLx5Z90JLfoEGGYsQl7acheIlREFbLHWM9uSofWHX3A== X-Received: by 2002:a05:6402:520f:: with SMTP id s15mr19650552edd.376.1635349077353; Wed, 27 Oct 2021 08:37:57 -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 h7sm218074edt.37.2021.10.27.08.37.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Oct 2021 08:37:56 -0700 (PDT) Message-ID: <5b8f554b-5bbc-e257-12d0-800ec82489d0@redhat.com> Date: Wed, 27 Oct 2021 17:37:47 +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 00/43] KVM: Halt-polling and x86 APICv overhaul Content-Language: en-US To: Sean Christopherson Cc: Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , 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> <614858dd-106c-64cc-04bc-f1887b2054d1@redhat.com> From: Paolo Bonzini In-Reply-To: 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 27/10/21 17:28, Sean Christopherson wrote: > On Wed, Oct 27, 2021, Paolo Bonzini wrote: >> On 27/10/21 16:41, Sean Christopherson wrote: >>> The other thing I don't like about having the WARN in the loop is that it suggests >>> that something other than the vCPU can modify the NDST and SN fields, which is >>> wrong and confusing (for me). >> >> Yeah, I can agree with that. Can you add it in a comment above the cmpxchg >> loop, it can be as simple as >> >> /* The processor can set ON concurrently. */ >> >> when you respin patch 21 and the rest of the series? > > I can definitely add a comment, but I think that comment is incorrect. It's completely backwards indeed. I first had "the hardware" and then shut down my brain for a second to replace it. > So something like this? > > /* ON can be set concurrently by a different vCPU or by hardware. */ Yes, of course. Paolo 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC989C433F5 for ; Wed, 27 Oct 2021 15:38:03 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 4FE1760FBF for ; Wed, 27 Oct 2021 15:38:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4FE1760FBF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D0EAB4B106; Wed, 27 Oct 2021 11:38:02 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@redhat.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v3UI0cJBOzGH; Wed, 27 Oct 2021 11:38:01 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id CE5CA4B11E; Wed, 27 Oct 2021 11:38:01 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3AF8D4B105 for ; Wed, 27 Oct 2021 11:38:01 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f2castJNNxbj for ; Wed, 27 Oct 2021 11:38:00 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2EB1E4B09C for ; Wed, 27 Oct 2021 11:38:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635349080; 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=bSqxXsSY7PzPPy6E5Cy05Nx/OdmHcN1STcnBEYyHdIs=; b=MbMxbXAupMhsOj7n1ORnzGUbt2FJk9mfhs1WY97br91xQhy2gI1grOuvQnxEp6LE0pzRZZ 1ueNqOMlSarkjIx3XpEKw+UEb5n1ek2asuexqFwukbmOUCbHmkd+mobwHsmwa1bWXKCwn1 2CRz2Zv9n8TOyxe7u0sslDWf0CgTm/E= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-387-iugz8AH7OouCC77moaBZ5w-1; Wed, 27 Oct 2021 11:37:58 -0400 X-MC-Unique: iugz8AH7OouCC77moaBZ5w-1 Received: by mail-ed1-f71.google.com with SMTP id o22-20020a056402439600b003dd4f228451so2671634edc.16 for ; Wed, 27 Oct 2021 08:37:58 -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=bSqxXsSY7PzPPy6E5Cy05Nx/OdmHcN1STcnBEYyHdIs=; b=slDkcjT5QnxZjEqjbQWKmPLBZwKvYpssKUt/3sAd5ZA2dnaiUgXiD9kFFe3X7MQKlY CmJYkhLYLvUgLh+Xx7iA1zVPM4g+Z9BbCd/fTjFLtliZtqzyFTLbnNa+JmMdwRtcDMx+ Kul+2B6VgwNe/UrZH1/Id3+EvJQtjS6IqsEB3IPOiWzNUxtTecSPhf1RAwGgEexACvpS sRcIbcoyD5bp0SodWYLtolB2/U7uFILXYwM0opvBBV8xX0dEbvkiwDrCFNZY3lgi8ToJ kFt8s+B0Rf6JoCdhpfl/fmhoMfmYeU9ShC493gvGoUaRWVUzLGlpN4T+/OHuyH03iltj 8aPQ== X-Gm-Message-State: AOAM5303LmAfNkIm9OyA2y1RIMYPKPi6NLceGZXV+/Hrs5ZqYQTtU/nF iL33V/QpxkA/L9SnUNr2KpOSwsjoj+hESOx+/Q1FEAuebVtSih/yZKh1oKMY45b3p4UVUBmAoZ1 gkvlO+ZZMS9PnTFCeAPnt/ei8 X-Received: by 2002:a05:6402:520f:: with SMTP id s15mr19650578edd.376.1635349077541; Wed, 27 Oct 2021 08:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcV3ajcrSuCCBMr6jO83QbO8KNKYMvLx5Z90JLfoEGGYsQl7acheIlREFbLHWM9uSofWHX3A== X-Received: by 2002:a05:6402:520f:: with SMTP id s15mr19650552edd.376.1635349077353; Wed, 27 Oct 2021 08:37:57 -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 h7sm218074edt.37.2021.10.27.08.37.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Oct 2021 08:37:56 -0700 (PDT) Message-ID: <5b8f554b-5bbc-e257-12d0-800ec82489d0@redhat.com> Date: Wed, 27 Oct 2021 17:37:47 +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 00/43] KVM: Halt-polling and x86 APICv overhaul To: Sean Christopherson References: <20211009021236.4122790-1-seanjc@google.com> <614858dd-106c-64cc-04bc-f1887b2054d1@redhat.com> From: Paolo Bonzini In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Cc: Cornelia Huck , Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , linux-kernel@vger.kernel.org, Paul Mackerras , Atish Patra , linux-riscv@lists.infradead.org, Claudio Imbrenda , kvmarm@lists.cs.columbia.edu, Janosch Frank , Marc Zyngier , Joerg Roedel , Huacai Chen , Christian Borntraeger , Aleksandar Markovic , Albert Ou , kvm-ppc@vger.kernel.org, Paul Walmsley , David Matlack , linux-arm-kernel@lists.infradead.org, Jim Mattson , Anup Patel , linux-mips@vger.kernel.org, Palmer Dabbelt , kvm-riscv@lists.infradead.org, Vitaly Kuznetsov X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 27/10/21 17:28, Sean Christopherson wrote: > On Wed, Oct 27, 2021, Paolo Bonzini wrote: >> On 27/10/21 16:41, Sean Christopherson wrote: >>> The other thing I don't like about having the WARN in the loop is that it suggests >>> that something other than the vCPU can modify the NDST and SN fields, which is >>> wrong and confusing (for me). >> >> Yeah, I can agree with that. Can you add it in a comment above the cmpxchg >> loop, it can be as simple as >> >> /* The processor can set ON concurrently. */ >> >> when you respin patch 21 and the rest of the series? > > I can definitely add a comment, but I think that comment is incorrect. It's completely backwards indeed. I first had "the hardware" and then shut down my brain for a second to replace it. > So something like this? > > /* ON can be set concurrently by a different vCPU or by hardware. */ Yes, of course. Paolo _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2927C433EF for ; Wed, 27 Oct 2021 15:38:26 +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 9672060F02 for ; Wed, 27 Oct 2021 15:38:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9672060F02 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y/JYN1caJOQ+Z+DmUpxj/KZRKC3pCrhRjkO+8glIvdo=; b=OTNhGx+Fcy5BiO +mDAw7e2PzSsmdVfSbJxOfkBK6Po+uKKZDrUkfGs2mRz89YSprHJiAcueQbh2+/pI9qSABsU1ER47 B8K5f7GXYSKMhhlhnSqxUFJeFSaE4MGYEzaSHd8D+cmzTBek0jQ7AXeQWYriNTerl2sA7x85jdUKQ x3nATCJxpyGw8yfqvcgOLcUkfSsPyXnE65GHPDa6Mu2Riqcco/GxQyHb77Yhlv+PhO5bzmeuTNYln NI88ciU66ikWwgs+jrVT8Jo0REStW11EA7S/PB6memY6HuEH7k4D/5Iv3wO+RgFWeeoo4hFmrlgDV CxTmZz759uMzjp0TYfKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfl0L-005LQn-GM; Wed, 27 Oct 2021 15:38:17 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfl05-005LLF-5u for linux-riscv@lists.infradead.org; Wed, 27 Oct 2021 15:38:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635349080; 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=bSqxXsSY7PzPPy6E5Cy05Nx/OdmHcN1STcnBEYyHdIs=; b=MbMxbXAupMhsOj7n1ORnzGUbt2FJk9mfhs1WY97br91xQhy2gI1grOuvQnxEp6LE0pzRZZ 1ueNqOMlSarkjIx3XpEKw+UEb5n1ek2asuexqFwukbmOUCbHmkd+mobwHsmwa1bWXKCwn1 2CRz2Zv9n8TOyxe7u0sslDWf0CgTm/E= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-372-8J_AROqAMeq5SOLLCcbdXQ-1; Wed, 27 Oct 2021 11:37:58 -0400 X-MC-Unique: 8J_AROqAMeq5SOLLCcbdXQ-1 Received: by mail-ed1-f71.google.com with SMTP id f4-20020a50e084000000b003db585bc274so2670045edl.17 for ; Wed, 27 Oct 2021 08:37:58 -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=bSqxXsSY7PzPPy6E5Cy05Nx/OdmHcN1STcnBEYyHdIs=; b=O3E6MdBvxuFvFpSDoNd4sQ1MluCwnvEz7JpBZ/UjEHfsGFFZC5N3cu3bBG7b28vzDw pY8CwkyFBYkKk+O1CDDCOzk+F2SFocx0KBuL72l1e4K9nvZXd7mjSes4dNuVSjZPntsJ 0NdBgSrnD7gj7ialn/TQYjgR5BwqvlEZcmBj29NfqKBZ8WkbGOy3Y2YHnxclvFCDAd52 0p82dTigXjNFLOhGgOiTk7tm8xzNOFBeiEK7VLrhI+sgZkPjGUSgTd9QV17HNDAms0k0 bRSwdMmz8wVsJbPBP7FauYSQNtq5CeS3k1abHrTJp3t7HlBi/oznaOOlmAoYMaROlcdb jpbw== X-Gm-Message-State: AOAM5302ntlsDNFEBvc9gZoFe+m0Nq7EkAUto9q48BofrfskSqoTjuAc HKCwbkpeCkHz8hUTPXLCJbeiD6e9j3ape9RLeBBzImOsiBrrsBVf0TfB0UhO//zmAfeDmmGVkOu YXsr1AmnTh05VblvWCem57mc46fMb X-Received: by 2002:a05:6402:520f:: with SMTP id s15mr19650597edd.376.1635349077568; Wed, 27 Oct 2021 08:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcV3ajcrSuCCBMr6jO83QbO8KNKYMvLx5Z90JLfoEGGYsQl7acheIlREFbLHWM9uSofWHX3A== X-Received: by 2002:a05:6402:520f:: with SMTP id s15mr19650552edd.376.1635349077353; Wed, 27 Oct 2021 08:37:57 -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 h7sm218074edt.37.2021.10.27.08.37.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Oct 2021 08:37:56 -0700 (PDT) Message-ID: <5b8f554b-5bbc-e257-12d0-800ec82489d0@redhat.com> Date: Wed, 27 Oct 2021 17:37:47 +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 00/43] KVM: Halt-polling and x86 APICv overhaul To: Sean Christopherson Cc: Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , 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> <614858dd-106c-64cc-04bc-f1887b2054d1@redhat.com> From: Paolo Bonzini In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211027_083801_306016_5149B484 X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 27/10/21 17:28, Sean Christopherson wrote: > On Wed, Oct 27, 2021, Paolo Bonzini wrote: >> On 27/10/21 16:41, Sean Christopherson wrote: >>> The other thing I don't like about having the WARN in the loop is that it suggests >>> that something other than the vCPU can modify the NDST and SN fields, which is >>> wrong and confusing (for me). >> >> Yeah, I can agree with that. Can you add it in a comment above the cmpxchg >> loop, it can be as simple as >> >> /* The processor can set ON concurrently. */ >> >> when you respin patch 21 and the rest of the series? > > I can definitely add a comment, but I think that comment is incorrect. It's completely backwards indeed. I first had "the hardware" and then shut down my brain for a second to replace it. > So something like this? > > /* ON can be set concurrently by a different vCPU or by hardware. */ Yes, of course. Paolo _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 096CBC433EF for ; Wed, 27 Oct 2021 15:39:26 +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 C960760F5A for ; Wed, 27 Oct 2021 15:39:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C960760F5A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ROkYPDq0caSpLV0FbHceEsBcRaq9OVwgBRgwS8KxLlc=; b=jtjDhIuNyCPO74 69hvaxytgeofG4RnC8BA+/ay8N5QEYI2oe4gfNN5iBRhkuvrIy5QNaqq9YO88MU0icvdDCiGGrdHz mLGox0s5HEPsK5Q/qjzlXBHHl0SrUxQeLpZTST/LJRC2aCk6tOwWPwTOed4+0Rgxt0spdov5OhVGo syy4WYLoFWAnTPn/Gv1ljpLLatsyy1Z2nEgbSDmWkB42kOku4/dIbs3eGhI4ztasgzaJqM56MGJ9H 5R8jMxeSjLGmzlcvimC1wkXjABtFaKAtQfkY3CAg7RwmuVg50rTA67iLZitwGIAys6m4eT/JqW4E1 3mvBtYfbYm9yB52SCPQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfl08-005LMp-Mj; Wed, 27 Oct 2021 15:38:05 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfl04-005LLB-W0 for linux-arm-kernel@lists.infradead.org; Wed, 27 Oct 2021 15:38:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635349080; 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=bSqxXsSY7PzPPy6E5Cy05Nx/OdmHcN1STcnBEYyHdIs=; b=MbMxbXAupMhsOj7n1ORnzGUbt2FJk9mfhs1WY97br91xQhy2gI1grOuvQnxEp6LE0pzRZZ 1ueNqOMlSarkjIx3XpEKw+UEb5n1ek2asuexqFwukbmOUCbHmkd+mobwHsmwa1bWXKCwn1 2CRz2Zv9n8TOyxe7u0sslDWf0CgTm/E= 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-374-xKPZPQ--M9aq-6HwpDZyyg-1; Wed, 27 Oct 2021 11:37:58 -0400 X-MC-Unique: xKPZPQ--M9aq-6HwpDZyyg-1 Received: by mail-ed1-f72.google.com with SMTP id z20-20020a05640240d400b003dce046ab51so2677164edb.14 for ; Wed, 27 Oct 2021 08:37:58 -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=bSqxXsSY7PzPPy6E5Cy05Nx/OdmHcN1STcnBEYyHdIs=; b=xB/WishVf4ff6E4FEgUHSATexJllKkDaCl8xdk6THO8a4khcjyaQ8qRRo6kn/tIEFx lxUaZuA/e7tuM+PR8ISn2qv3P4nyTWCmjIZAdqyhSPSBVTkg2ij/0tFZpPajTRuQBBRM 0VMs+0YQBuajH9V8sXmE/Br9L0kx4YbR7ORTNw2Awgm11gZ9C7XpK2qRF616dorQqdeJ /x9D2uxr/isjOoQXaRtfRAs5VVMQtXgW6u5jczaY3uL3QWPkn2DgiZgD5EpB/e9mzT2y uXiKxMmPPQyPa/QcGFWvDiZZ8QyH9T/BhMwEAT10Vz4pOKCsp1yBG2Lqd6irq4I9pXQY cj7Q== X-Gm-Message-State: AOAM5310X/f0Yaq4yE9PIiwvg7/pllaIRnqr4LGmOKf80bJRzSQHUNY2 i/ykPTKngz1B61w4C9o078AFHUSVEfEpi1t/+6mFEaEpUVW6fxooecVMKGFa1WwPukzSC0UJBM7 RV4Lki/HUQgMwAkK2WyTQtOCKZn7pUkoNHEM= X-Received: by 2002:a05:6402:520f:: with SMTP id s15mr19650598edd.376.1635349077573; Wed, 27 Oct 2021 08:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcV3ajcrSuCCBMr6jO83QbO8KNKYMvLx5Z90JLfoEGGYsQl7acheIlREFbLHWM9uSofWHX3A== X-Received: by 2002:a05:6402:520f:: with SMTP id s15mr19650552edd.376.1635349077353; Wed, 27 Oct 2021 08:37:57 -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 h7sm218074edt.37.2021.10.27.08.37.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Oct 2021 08:37:56 -0700 (PDT) Message-ID: <5b8f554b-5bbc-e257-12d0-800ec82489d0@redhat.com> Date: Wed, 27 Oct 2021 17:37:47 +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 00/43] KVM: Halt-polling and x86 APICv overhaul To: Sean Christopherson Cc: Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , 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> <614858dd-106c-64cc-04bc-f1887b2054d1@redhat.com> From: Paolo Bonzini In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211027_083801_140452_AA678165 X-CRM114-Status: GOOD ( 13.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 27/10/21 17:28, Sean Christopherson wrote: > On Wed, Oct 27, 2021, Paolo Bonzini wrote: >> On 27/10/21 16:41, Sean Christopherson wrote: >>> The other thing I don't like about having the WARN in the loop is that it suggests >>> that something other than the vCPU can modify the NDST and SN fields, which is >>> wrong and confusing (for me). >> >> Yeah, I can agree with that. Can you add it in a comment above the cmpxchg >> loop, it can be as simple as >> >> /* The processor can set ON concurrently. */ >> >> when you respin patch 21 and the rest of the series? > > I can definitely add a comment, but I think that comment is incorrect. It's completely backwards indeed. I first had "the hardware" and then shut down my brain for a second to replace it. > So something like this? > > /* ON can be set concurrently by a different vCPU or by hardware. */ Yes, of course. Paolo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Date: Wed, 27 Oct 2021 15:37:47 +0000 Subject: Re: [PATCH v2 00/43] KVM: Halt-polling and x86 APICv overhaul Message-Id: <5b8f554b-5bbc-e257-12d0-800ec82489d0@redhat.com> List-Id: References: <20211009021236.4122790-1-seanjc@google.com> <614858dd-106c-64cc-04bc-f1887b2054d1@redhat.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sean Christopherson Cc: Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , 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 On 27/10/21 17:28, Sean Christopherson wrote: > On Wed, Oct 27, 2021, Paolo Bonzini wrote: >> On 27/10/21 16:41, Sean Christopherson wrote: >>> The other thing I don't like about having the WARN in the loop is that it suggests >>> that something other than the vCPU can modify the NDST and SN fields, which is >>> wrong and confusing (for me). >> >> Yeah, I can agree with that. Can you add it in a comment above the cmpxchg >> loop, it can be as simple as >> >> /* The processor can set ON concurrently. */ >> >> when you respin patch 21 and the rest of the series? > > I can definitely add a comment, but I think that comment is incorrect. It's completely backwards indeed. I first had "the hardware" and then shut down my brain for a second to replace it. > So something like this? > > /* ON can be set concurrently by a different vCPU or by hardware. */ Yes, of course. Paolo