Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1662876pxb; Tue, 26 Oct 2021 13:19:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSGcvU/u4lTlGjEt4AoUdgLmz9dAfxbZeldMy7RGLmSgAo6sT3iI3p5yOQDUPFqKxvNgCJ X-Received: by 2002:a17:902:758b:b0:13f:974a:959f with SMTP id j11-20020a170902758b00b0013f974a959fmr24057424pll.40.1635279546410; Tue, 26 Oct 2021 13:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635279546; cv=none; d=google.com; s=arc-20160816; b=VRp5Z56y7qCGzbjrS5iuSMp3GUdDIp98RSS9dRxe1nOCxqEZElgytibAeDjNocpMlV Hnh2atLkfZsuHgxSK+paFM9vNVo7/BV46p5Qc8lFpEtaCDUoXPx7thciGMWQejm75SMz lJ+kpNxuJ1Mfh/zGt+a60rF1A7UflEAWT5DOhZljXiz/fyTs3MVDtyPQVV+YT2LKtkIX c+/KZr9X0QUwcNYo4TCTaL3yjMF4em2Leth0M0fP+WEyUOqSLHEAH9wYPamTfK6StYud YycXkDbfLiuaPxmAAIIXzinjojS6I37VqbpFxQdve9TrE/SSI+2wG53yF99rOYVOsVm5 CaNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t+GavL7jaDIOLO9+HWOF0JpCL4n+9982OXgOJJO3B68=; b=0YTcy2kiv7RtJ5i1YCzioaYVPE1sBszN0kgj+uztjo1Qf/4P0cJAuC8NVQmPBM2zp2 xCdXK2rW6nqSRg8I/QjFYBUGKf+Q6Jguma9RtTL5LHAG7WrHjLSdU/CHkay6vE3e3M4Q K4sronaSbud9Au0l+1NUWqyYo7u722O7/lEYhMKzbPqhqxrcwJmd5AB7xbzvWJJohMnu +GXquU0nSdX3CP9mr5G95ZQ/C3x/3T79Vey/hZyFqSabLIW8oGCZKNhOohutxft/4Bzl HLT1xMWyYoeAcAqDIdHx8jmuIxUc3Str1FUE1lvDtyZnM6lmcFVhb1ksS0pjcok+SoEv 3qSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=mMtlNqAG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pi11si2786937pjb.97.2021.10.26.13.18.49; Tue, 26 Oct 2021 13:19:06 -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=@google.com header.s=20210112 header.b=mMtlNqAG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236949AbhJZOue (ORCPT + 99 others); Tue, 26 Oct 2021 10:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236073AbhJZOub (ORCPT ); Tue, 26 Oct 2021 10:50:31 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03070C061224 for ; Tue, 26 Oct 2021 07:48:08 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id na16-20020a17090b4c1000b0019f5bb661f9so1920549pjb.0 for ; Tue, 26 Oct 2021 07:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=t+GavL7jaDIOLO9+HWOF0JpCL4n+9982OXgOJJO3B68=; b=mMtlNqAGEx5moOXiuoulPA91tzGA7QXfJoC+FMrgS7kXKDaeQEPhlrtU0/6hIAVeF6 4XgOag3S8f64bxtieFkoj/CBTBoyg71uy6bYxr2fBQK7J8y0qvj3yp4nxsZiGo0ugwoy chqWhQbdF2M/ss8dRD5cMeGRjF2i7TFbnWAE4XD/Gn+/ew4eCp8tBNWFi6mKqTjGiuSB 4K+eMtDT8TA09mAfuKwzPO/bGE/KLqBK8ggRwFAk21MDpCSdzSupIOVWDECUMDk9Gucp WDZDdD8wswuh2DToiC42rEb1Gvw+Zc82wwd7L/2Pn0t+7EwhXqTAcJo8pcrg6fGfmqKg 9NUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=t+GavL7jaDIOLO9+HWOF0JpCL4n+9982OXgOJJO3B68=; b=u2BZd8ycxZpBWLoIoOQn5XZUl85NhCUb2uQ9mih8P6s1L1F2pc6gg/SY4DR78lrP9k lEC5u6ACJTdK+7Ma4C745vAggz512CRyBacAvbwhkgdss9JaCuV+smDBj/s9e5ppTAx4 3DtNcGITw/+kPi1O6Fw73lJss/dnAx7NoIrdfODRCIYhSC+vMY2imfhVXMZ/DqpsVl2E TQ2ly7WfRCjeiv2/i0qEBu3wl2x9Bhy23oOalgwrugSIpQq7W74zx1cdjEr4x+o2Qxxa 9wodbWqXRjjVJbnfvlyrt4kWxvfuL9KsZlGV4NT4NaDYnXGeXHEcO5CGFZsnDn7WLK+a 1A1A== X-Gm-Message-State: AOAM532fujs5k7O/D7jcMgefskClYTH328/9PsQIzOcekEfHXWhlrzgg HzvRFiZeqRUmlPvbuiB6+sStWw== X-Received: by 2002:a17:902:e88a:b0:140:25a7:4a1b with SMTP id w10-20020a170902e88a00b0014025a74a1bmr22402882plg.67.1635259687236; Tue, 26 Oct 2021 07:48:07 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id fy8sm186294pjb.47.2021.10.26.07.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 07:48:06 -0700 (PDT) Date: Tue, 26 Oct 2021 14:48:02 +0000 From: Sean Christopherson To: Christian Borntraeger Cc: Marc Zyngier , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Janosch Frank , Paolo Bonzini , 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 Subject: Re: [PATCH v2 00/43] KVM: Halt-polling and x86 APICv overhaul Message-ID: References: <20211009021236.4122790-1-seanjc@google.com> <04b1a72e-47b4-4bde-eb9e-ba36c156ff0d@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <04b1a72e-47b4-4bde-eb9e-ba36c156ff0d@de.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021, Christian Borntraeger wrote: > Am 09.10.21 um 04:11 schrieb Sean Christopherson: > > This is basically two series smushed into one. The first "half" aims > > to differentiate between "halt" and a more generic "block", where "halt" > > aligns with x86's HLT instruction, the halt-polling mechanisms, and > > associated stats, and "block" means any guest action that causes the vCPU > > to block/wait. > > > > The second "half" overhauls x86's APIC virtualization code (Posted > > Interrupts on Intel VMX, AVIC on AMD SVM) to do their updates in response > > to vCPU (un)blocking in the vcpu_load/put() paths, keying off of the > > vCPU's rcuwait status to determine when a blocking vCPU is being put and > > reloaded. This idea comes from arm64's kvm_timer_vcpu_put(), which I > > stumbled across when diving into the history of arm64's (un)blocking hooks. > > > > The x86 APICv overhaul allows for killing off several sets of hooks in > > common KVM and in x86 KVM (to the vendor code). Moving everything to > > vcpu_put/load() also realizes nice cleanups, especially for the Posted > > Interrupt code, which required some impressive mental gymnastics to > > understand how vCPU task migration interacted with vCPU blocking. > > > > Non-x86 folks, sorry for the noise. I'm hoping the common parts can get > > applied without much fuss so that future versions can be x86-only. > > > > v2: > > - Collect reviews. [Christian, David] > > - Add patch to move arm64 WFI functionality out of hooks. [Marc] > > - Add RISC-V to the fun. > > - Add all the APICv fun. > > Have we actually followed up on the regression regarding halt_poll_ns=0 no longer disabling > polling for running systems? No, I have that conversation flagged but haven't gotten back to it. I still like the idea of special casing halt_poll_ns=0 to override the capability. I can send a proper patch for that unless there's a different/better idea?