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 4C3DAC433EF for ; Tue, 26 Oct 2021 18:30:18 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id AF10861078 for ; Tue, 26 Oct 2021 18:30:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AF10861078 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=de.ibm.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 1BDD54B0D9; Tue, 26 Oct 2021 14:30:17 -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=@ibm.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 QksrVwob9CPE; Tue, 26 Oct 2021 14:30:15 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 886FF4B0E2; Tue, 26 Oct 2021 14:30:15 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3AC5C4B0D0 for ; Tue, 26 Oct 2021 14:30:14 -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 o0-g+ME8+KRM for ; Tue, 26 Oct 2021 14:30:12 -0400 (EDT) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 6CAE640068 for ; Tue, 26 Oct 2021 14:30:12 -0400 (EDT) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19QG1oc7035894; Tue, 26 Oct 2021 18:30:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=kHQsUpw1VFu+TXvR3qH68hSJpP0tEJmquXEf/hWANuE=; b=CPpIaKBG5Tl8Nl3RLSocczn2e8RIBD3cyDKfpQKhgmH3lYN567yvuqbL3znAzcpdm4ti +sI2leQ/S1XFZfyR+1sYEKoec8tqsk19fXLH6BPQXoH+ldOrcrHkmaAZnr+JApFBwYRp 4sjv/kz5ZsR18O/340unhMQKEZN4OkrBfeJPG5JSs5pALT1+muGdPkwwMcdDY6E4SGPm YLpI7hwmH2WU7b1/5zY9Qeou3Mq+oGfct+1/1hv6Bsw7L8lO4x4xDZikTzHTcabU31Cx SC4DHiMuIgtNdCgOl3wDEHJykcXDGttiQ8w+GW1b+HFudewIMM29Nhg9Qke/YVSLCgj3 xA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4kbhr58-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:05 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19QIBbd0034899; Tue, 26 Oct 2021 18:30:05 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4kbhr3x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:04 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19QIHPAD028495; Tue, 26 Oct 2021 18:30:02 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04fra.de.ibm.com with ESMTP id 3bx4f7fm39-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:02 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19QITxnK51249440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Oct 2021 18:29:59 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 360B811C052; Tue, 26 Oct 2021 18:29:59 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC53C11C050; Tue, 26 Oct 2021 18:29:57 +0000 (GMT) Received: from li-43c5434c-23b8-11b2-a85c-c4958fb47a68.ibm.com (unknown [9.171.78.157]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 26 Oct 2021 18:29:57 +0000 (GMT) Subject: Re: [PATCH v2 00/43] KVM: Halt-polling and x86 APICv overhaul To: Sean Christopherson References: <20211009021236.4122790-1-seanjc@google.com> <04b1a72e-47b4-4bde-eb9e-ba36c156ff0d@de.ibm.com> From: Christian Borntraeger Message-ID: Date: Tue, 26 Oct 2021 20:29:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: JmDEkCgcD3-ZRJi2Qd_r_hCC449htTWY X-Proofpoint-GUID: 02zJ-KDhJ3N2JI7UDwO_ZOcNKnXzVG1F X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-26_05,2021-10-26_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 mlxscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=966 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2110260100 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 , 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, Paolo Bonzini , 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 Am 26.10.21 um 16:48 schrieb Sean Christopherson: > 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? I think I would prefer a variant that uses the halt_poll_ns value AS IS for all guests that have not opted in the per guest feature. And then MAYBE have 0 as a special case to disable that also for the opted in VMs. _______________________________________________ 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 B9559C433F5 for ; Tue, 26 Oct 2021 18:30:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A005960E05 for ; Tue, 26 Oct 2021 18:30:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238300AbhJZSdW (ORCPT ); Tue, 26 Oct 2021 14:33:22 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38966 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231232AbhJZSdL (ORCPT ); Tue, 26 Oct 2021 14:33:11 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19QG1oc7035894; Tue, 26 Oct 2021 18:30:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=kHQsUpw1VFu+TXvR3qH68hSJpP0tEJmquXEf/hWANuE=; b=CPpIaKBG5Tl8Nl3RLSocczn2e8RIBD3cyDKfpQKhgmH3lYN567yvuqbL3znAzcpdm4ti +sI2leQ/S1XFZfyR+1sYEKoec8tqsk19fXLH6BPQXoH+ldOrcrHkmaAZnr+JApFBwYRp 4sjv/kz5ZsR18O/340unhMQKEZN4OkrBfeJPG5JSs5pALT1+muGdPkwwMcdDY6E4SGPm YLpI7hwmH2WU7b1/5zY9Qeou3Mq+oGfct+1/1hv6Bsw7L8lO4x4xDZikTzHTcabU31Cx SC4DHiMuIgtNdCgOl3wDEHJykcXDGttiQ8w+GW1b+HFudewIMM29Nhg9Qke/YVSLCgj3 xA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4kbhr58-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:05 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19QIBbd0034899; Tue, 26 Oct 2021 18:30:05 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4kbhr3x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:04 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19QIHPAD028495; Tue, 26 Oct 2021 18:30:02 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04fra.de.ibm.com with ESMTP id 3bx4f7fm39-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:02 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19QITxnK51249440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Oct 2021 18:29:59 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 360B811C052; Tue, 26 Oct 2021 18:29:59 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC53C11C050; Tue, 26 Oct 2021 18:29:57 +0000 (GMT) Received: from li-43c5434c-23b8-11b2-a85c-c4958fb47a68.ibm.com (unknown [9.171.78.157]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 26 Oct 2021 18:29:57 +0000 (GMT) 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 , 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 References: <20211009021236.4122790-1-seanjc@google.com> <04b1a72e-47b4-4bde-eb9e-ba36c156ff0d@de.ibm.com> From: Christian Borntraeger Message-ID: Date: Tue, 26 Oct 2021 20:29:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: JmDEkCgcD3-ZRJi2Qd_r_hCC449htTWY X-Proofpoint-GUID: 02zJ-KDhJ3N2JI7UDwO_ZOcNKnXzVG1F X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-26_05,2021-10-26_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 mlxscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=966 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2110260100 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 26.10.21 um 16:48 schrieb Sean Christopherson: > 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? I think I would prefer a variant that uses the halt_poll_ns value AS IS for all guests that have not opted in the per guest feature. And then MAYBE have 0 as a special case to disable that also for the opted in VMs. 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 0B41EC433EF for ; Tue, 26 Oct 2021 18:30:45 +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 CE54661040 for ; Tue, 26 Oct 2021 18:30:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CE54661040 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=de.ibm.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:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Drq9hMNLGkrWI7XGAqFC5WKkWNUtuLf0Vu47ZQAP3aw=; b=bXA2ajZkLYuXmZ9WE6YpMWX5ow iYISfSKuhi0xQgZB1/zBiKJlIeR0ky+uCbL1PMhs/IQUMYyZQzAc9RkN73rJSzLVV3hltlFFJ5ImB VmEeR25IejIZHv/x9NMprYNhqh+iPj4RaiviVYYKGuNdkjsQrQmUJeJeTI4JLUlJcTkoohjiUS3I3 kVOy//18msuFyoe3SFVIND0A2AdoP2mhpmTirPbX+CWWMkYNGgPI5Q3hL0AHAW9xx6DmarbR71lo/ L1cBu4IU21FljP8EP1DNVJTf8r84wBhDXFMnY93JvitZUChBY8UGNdJ/R9URDqkm+q2h+xKX3CinW Y0R/uFJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfRDa-002mN6-5C; Tue, 26 Oct 2021 18:30:38 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfRDB-002mDg-S8; Tue, 26 Oct 2021 18:30:15 +0000 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19QG1oc7035894; Tue, 26 Oct 2021 18:30:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=kHQsUpw1VFu+TXvR3qH68hSJpP0tEJmquXEf/hWANuE=; b=CPpIaKBG5Tl8Nl3RLSocczn2e8RIBD3cyDKfpQKhgmH3lYN567yvuqbL3znAzcpdm4ti +sI2leQ/S1XFZfyR+1sYEKoec8tqsk19fXLH6BPQXoH+ldOrcrHkmaAZnr+JApFBwYRp 4sjv/kz5ZsR18O/340unhMQKEZN4OkrBfeJPG5JSs5pALT1+muGdPkwwMcdDY6E4SGPm YLpI7hwmH2WU7b1/5zY9Qeou3Mq+oGfct+1/1hv6Bsw7L8lO4x4xDZikTzHTcabU31Cx SC4DHiMuIgtNdCgOl3wDEHJykcXDGttiQ8w+GW1b+HFudewIMM29Nhg9Qke/YVSLCgj3 xA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4kbhr58-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:05 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19QIBbd0034899; Tue, 26 Oct 2021 18:30:05 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4kbhr3x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:04 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19QIHPAD028495; Tue, 26 Oct 2021 18:30:02 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04fra.de.ibm.com with ESMTP id 3bx4f7fm39-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:02 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19QITxnK51249440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Oct 2021 18:29:59 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 360B811C052; Tue, 26 Oct 2021 18:29:59 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC53C11C050; Tue, 26 Oct 2021 18:29:57 +0000 (GMT) Received: from li-43c5434c-23b8-11b2-a85c-c4958fb47a68.ibm.com (unknown [9.171.78.157]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 26 Oct 2021 18:29:57 +0000 (GMT) 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 , 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 References: <20211009021236.4122790-1-seanjc@google.com> <04b1a72e-47b4-4bde-eb9e-ba36c156ff0d@de.ibm.com> From: Christian Borntraeger Message-ID: Date: Tue, 26 Oct 2021 20:29:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: JmDEkCgcD3-ZRJi2Qd_r_hCC449htTWY X-Proofpoint-GUID: 02zJ-KDhJ3N2JI7UDwO_ZOcNKnXzVG1F X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-26_05,2021-10-26_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 mlxscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=966 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2110260100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211026_113014_198369_57991E81 X-CRM114-Status: GOOD ( 23.12 ) 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 Am 26.10.21 um 16:48 schrieb Sean Christopherson: > 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? I think I would prefer a variant that uses the halt_poll_ns value AS IS for all guests that have not opted in the per guest feature. And then MAYBE have 0 as a special case to disable that also for the opted in VMs. _______________________________________________ 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 BF76EC433F5 for ; Tue, 26 Oct 2021 18:31:39 +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 8782460E05 for ; Tue, 26 Oct 2021 18:31:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8782460E05 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=de.ibm.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:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2j7JsbkG8i8MoXiCOUKGyGLOdgcu6qfw5/gjRu3tNus=; b=PmHGwtxl+a84b5mkYwp7vLy1RU ghv8CCPpkGwdf9qHRKv++CKy9ASR72ft10BKDACiGYE/KYjFSGIiiRc9V1bz2dbvwVUy77vzFDjRE UYXk5sGMfeY7s+CO/Lp/bovsKdKG8eiFr8bomzcemdrq4qWXIOd1TwLwj1lKiyMf2gBxD45uTw2qx q2JKn3TLm5XsEz2joCbXXyMcDcBtqJ8a6JZG3HojNnbCw6kp6wAhM4eorm+ob78ZoZ1EyRwveun35 v7v2bW3DfxY9AopZFxYafkLtDI4P9qmP/0vSccZmL5u1vA3D6O5qK9VipC79FZbGTUl6NUdBJgUsJ hxUKKQzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfRDH-002mFk-0K; Tue, 26 Oct 2021 18:30:19 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfRDB-002mDg-S8; Tue, 26 Oct 2021 18:30:15 +0000 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19QG1oc7035894; Tue, 26 Oct 2021 18:30:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=kHQsUpw1VFu+TXvR3qH68hSJpP0tEJmquXEf/hWANuE=; b=CPpIaKBG5Tl8Nl3RLSocczn2e8RIBD3cyDKfpQKhgmH3lYN567yvuqbL3znAzcpdm4ti +sI2leQ/S1XFZfyR+1sYEKoec8tqsk19fXLH6BPQXoH+ldOrcrHkmaAZnr+JApFBwYRp 4sjv/kz5ZsR18O/340unhMQKEZN4OkrBfeJPG5JSs5pALT1+muGdPkwwMcdDY6E4SGPm YLpI7hwmH2WU7b1/5zY9Qeou3Mq+oGfct+1/1hv6Bsw7L8lO4x4xDZikTzHTcabU31Cx SC4DHiMuIgtNdCgOl3wDEHJykcXDGttiQ8w+GW1b+HFudewIMM29Nhg9Qke/YVSLCgj3 xA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4kbhr58-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:05 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19QIBbd0034899; Tue, 26 Oct 2021 18:30:05 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4kbhr3x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:04 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19QIHPAD028495; Tue, 26 Oct 2021 18:30:02 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04fra.de.ibm.com with ESMTP id 3bx4f7fm39-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 18:30:02 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19QITxnK51249440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Oct 2021 18:29:59 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 360B811C052; Tue, 26 Oct 2021 18:29:59 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC53C11C050; Tue, 26 Oct 2021 18:29:57 +0000 (GMT) Received: from li-43c5434c-23b8-11b2-a85c-c4958fb47a68.ibm.com (unknown [9.171.78.157]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 26 Oct 2021 18:29:57 +0000 (GMT) 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 , 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 References: <20211009021236.4122790-1-seanjc@google.com> <04b1a72e-47b4-4bde-eb9e-ba36c156ff0d@de.ibm.com> From: Christian Borntraeger Message-ID: Date: Tue, 26 Oct 2021 20:29:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: JmDEkCgcD3-ZRJi2Qd_r_hCC449htTWY X-Proofpoint-GUID: 02zJ-KDhJ3N2JI7UDwO_ZOcNKnXzVG1F X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-26_05,2021-10-26_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 mlxscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=966 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2110260100 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211026_113014_198369_57991E81 X-CRM114-Status: GOOD ( 23.12 ) 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 Am 26.10.21 um 16:48 schrieb Sean Christopherson: > 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? I think I would prefer a variant that uses the halt_poll_ns value AS IS for all guests that have not opted in the per guest feature. And then MAYBE have 0 as a special case to disable that also for the opted in VMs. _______________________________________________ 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: Christian Borntraeger Date: Tue, 26 Oct 2021 18:29:57 +0000 Subject: Re: [PATCH v2 00/43] KVM: Halt-polling and x86 APICv overhaul Message-Id: List-Id: References: <20211009021236.4122790-1-seanjc@google.com> <04b1a72e-47b4-4bde-eb9e-ba36c156ff0d@de.ibm.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sean Christopherson 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 , 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, Paolo Bonzini , Vitaly Kuznetsov Am 26.10.21 um 16:48 schrieb Sean Christopherson: > 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? I think I would prefer a variant that uses the halt_poll_ns value AS IS for all guests that have not opted in the per guest feature. And then MAYBE have 0 as a special case to disable that also for the opted in VMs.