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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3FC5ECAAA1 for ; Thu, 27 Oct 2022 23:39:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6FFEF49ED7; Thu, 27 Oct 2022 19:39:20 -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=@linux.dev 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 LBOLmrc2n2gm; Thu, 27 Oct 2022 19:39:19 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 1EAE849673; Thu, 27 Oct 2022 19:39:19 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 8A4A8413E2 for ; Thu, 27 Oct 2022 19:39:18 -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 GArpmlF548cm for ; Thu, 27 Oct 2022 19:39:17 -0400 (EDT) Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 2EF4A404CD for ; Thu, 27 Oct 2022 19:39:17 -0400 (EDT) Date: Thu, 27 Oct 2022 23:39:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1666913955; 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: in-reply-to:in-reply-to:references:references; bh=4OySq2lPcnWk1ygNMJS74tXjIlAzlxm25q99ZcmBZWU=; b=W3q6w/rApxamTznGicrMweNO9AfF9b5YCfMEQ8dW9ZKNbgTLdS6e5WLmzyJ0xNMkFGK6dq zXuAmu3YIUEGo/sQjDh04PD+4MuFq1FHB+ywX+0cWOGRBI15m3mbOfYy2Tc2QrFxSIaUDE iFeo2388RPrwJarIpvJq5DFkVZ+4Zyg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier , James Morse , Alexandru Elisei Subject: Re: [PATCH v3 00/15] KVM: arm64: Parallel stage-2 fault handling Message-ID: References: <20221027221752.1683510-1-oliver.upton@linux.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221027221752.1683510-1-oliver.upton@linux.dev> X-Migadu-Flow: FLOW_OUT Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Ben Gardon , David Matlack , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Thu, Oct 27, 2022 at 10:17:37PM +0000, Oliver Upton wrote: > Presently KVM only takes a read lock for stage 2 faults if it believes > the fault can be fixed by relaxing permissions on a PTE (write unprotect > for dirty logging). Otherwise, stage 2 faults grab the write lock, which > predictably can pile up all the vCPUs in a sufficiently large VM. > > Like the TDP MMU for x86, this series loosens the locking around > manipulations of the stage 2 page tables to allow parallel faults. RCU > and atomics are exploited to safely build/destroy the stage 2 page > tables in light of multiple software observers. > > Patches 1-4 clean up the context associated with a page table walk / PTE > visit. This is helpful for: > - Extending the context passed through for a visit > - Building page table walkers that operate outside of a kvm_pgtable > context (e.g. RCU callback) As is always the case, I failed to update the changelogs when twiddling things around a bit more. Specifically, 8/15 and 14/15 don't directly match the diffs anymore. I wont respin (yet) to avoid bombarding mailboxes. -- Thanks, Oliver _______________________________________________ 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 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D161E804 for ; Thu, 27 Oct 2022 23:39:20 +0000 (UTC) Date: Thu, 27 Oct 2022 23:39:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1666913955; 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: in-reply-to:in-reply-to:references:references; bh=4OySq2lPcnWk1ygNMJS74tXjIlAzlxm25q99ZcmBZWU=; b=W3q6w/rApxamTznGicrMweNO9AfF9b5YCfMEQ8dW9ZKNbgTLdS6e5WLmzyJ0xNMkFGK6dq zXuAmu3YIUEGo/sQjDh04PD+4MuFq1FHB+ywX+0cWOGRBI15m3mbOfYy2Tc2QrFxSIaUDE iFeo2388RPrwJarIpvJq5DFkVZ+4Zyg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier , James Morse , Alexandru Elisei Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Reiji Watanabe , Ricardo Koller , David Matlack , Quentin Perret , Ben Gardon , Gavin Shan , Peter Xu , Will Deacon , Sean Christopherson , kvmarm@lists.linux.dev Subject: Re: [PATCH v3 00/15] KVM: arm64: Parallel stage-2 fault handling Message-ID: References: <20221027221752.1683510-1-oliver.upton@linux.dev> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221027221752.1683510-1-oliver.upton@linux.dev> X-Migadu-Flow: FLOW_OUT Message-ID: <20221027233911.5uiUhreWmHqIJQq0QYiVyCs3gOztPMV0dTZL1Xc1oZM@z> On Thu, Oct 27, 2022 at 10:17:37PM +0000, Oliver Upton wrote: > Presently KVM only takes a read lock for stage 2 faults if it believes > the fault can be fixed by relaxing permissions on a PTE (write unprotect > for dirty logging). Otherwise, stage 2 faults grab the write lock, which > predictably can pile up all the vCPUs in a sufficiently large VM. > > Like the TDP MMU for x86, this series loosens the locking around > manipulations of the stage 2 page tables to allow parallel faults. RCU > and atomics are exploited to safely build/destroy the stage 2 page > tables in light of multiple software observers. > > Patches 1-4 clean up the context associated with a page table walk / PTE > visit. This is helpful for: > - Extending the context passed through for a visit > - Building page table walkers that operate outside of a kvm_pgtable > context (e.g. RCU callback) As is always the case, I failed to update the changelogs when twiddling things around a bit more. Specifically, 8/15 and 14/15 don't directly match the diffs anymore. I wont respin (yet) to avoid bombarding mailboxes. -- Thanks, Oliver 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9E95DFA373D for ; Thu, 27 Oct 2022 23:40:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BWc4OuJmFYVK7uR/zAcSY4FIjDn7U2D9cBXUunP8EPc=; b=a1hcpH8CCldAZg onNduWI4LjRde9VzwiFJe0Yt2VtF7FJ1b7XkqhKNoJvI6JYbVaRmpT4xl1gKStm9FOhKWyFk/hT36 eqS2QAZRhH7vNQ5scKm8HlJ5IVvegO+qQ8PzmklMxJcZIJMVhFXWM8FwX28MKuO0lAeGb9aLOLtSp 0l9mukzUCk0BAMQdSItafK6wYXNRgBbiAyR0nJfgq7STxI5/GLhMwASfXOefetL4M4SBRpiTbf4I7 QKe9Yuv7QoaKuurPfifVp1d6AphfU4na1MvhDD6s5tT7wmflVOfAdrW0gEJytQ8ydBnzv3Mna6+t7 L+J4kimxTwMfwfZgXVPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooCT7-00FFFS-Ap; Thu, 27 Oct 2022 23:39:25 +0000 Received: from out2.migadu.com ([2001:41d0:2:aacc::]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooCT3-00FFEv-FS for linux-arm-kernel@lists.infradead.org; Thu, 27 Oct 2022 23:39:23 +0000 Date: Thu, 27 Oct 2022 23:39:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1666913955; 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: in-reply-to:in-reply-to:references:references; bh=4OySq2lPcnWk1ygNMJS74tXjIlAzlxm25q99ZcmBZWU=; b=W3q6w/rApxamTznGicrMweNO9AfF9b5YCfMEQ8dW9ZKNbgTLdS6e5WLmzyJ0xNMkFGK6dq zXuAmu3YIUEGo/sQjDh04PD+4MuFq1FHB+ywX+0cWOGRBI15m3mbOfYy2Tc2QrFxSIaUDE iFeo2388RPrwJarIpvJq5DFkVZ+4Zyg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier , James Morse , Alexandru Elisei Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Reiji Watanabe , Ricardo Koller , David Matlack , Quentin Perret , Ben Gardon , Gavin Shan , Peter Xu , Will Deacon , Sean Christopherson , kvmarm@lists.linux.dev Subject: Re: [PATCH v3 00/15] KVM: arm64: Parallel stage-2 fault handling Message-ID: References: <20221027221752.1683510-1-oliver.upton@linux.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221027221752.1683510-1-oliver.upton@linux.dev> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221027_163922_319499_2C8CB3A6 X-CRM114-Status: GOOD ( 12.25 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Oct 27, 2022 at 10:17:37PM +0000, Oliver Upton wrote: > Presently KVM only takes a read lock for stage 2 faults if it believes > the fault can be fixed by relaxing permissions on a PTE (write unprotect > for dirty logging). Otherwise, stage 2 faults grab the write lock, which > predictably can pile up all the vCPUs in a sufficiently large VM. > > Like the TDP MMU for x86, this series loosens the locking around > manipulations of the stage 2 page tables to allow parallel faults. RCU > and atomics are exploited to safely build/destroy the stage 2 page > tables in light of multiple software observers. > > Patches 1-4 clean up the context associated with a page table walk / PTE > visit. This is helpful for: > - Extending the context passed through for a visit > - Building page table walkers that operate outside of a kvm_pgtable > context (e.g. RCU callback) As is always the case, I failed to update the changelogs when twiddling things around a bit more. Specifically, 8/15 and 14/15 don't directly match the diffs anymore. I wont respin (yet) to avoid bombarding mailboxes. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel