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 859BEC76195 for ; Thu, 23 Mar 2023 20:46:58 +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=rASJQJ7QkQgOQPZOwM83v0c8qEmbPAilTAYnmjlx+C8=; b=3T50EZGKgHvTlY Rf2AffUp97ghlFHH4aIR+qCDrdP600UDQSB109t70n2XYcNeQ7rtrv5P1ZXu1ZjHhZeautwehBlGd LGtvB9sWKr9y0wAFmMDMfFbDmKaNefs6QouqL29wuBhpy0KzkaCq15/0dMW1LJ2E7Sg+3zNC1HneC gAxrPkLahuLWqPnT3cL2CIppwg8BZ6+nIJ8lARGwGjiIIVQuwLKCVeV2+uxbIEwjl8pO8nyQuK5PL YnkJ10v7YBw2fbaraQXyGDV68Ac9DKfXsnFlRosb2pshDXdXULYAuKZFWrjBkOLOmREg8VODBz8Nm ixmP74ATiDoxBRiXZPfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pfRp0-002wGd-39; Thu, 23 Mar 2023 20:46:06 +0000 Received: from out-53.mta0.migadu.com ([91.218.175.53]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pfRot-002wFp-1q for linux-arm-kernel@lists.infradead.org; Thu, 23 Mar 2023 20:46:05 +0000 Date: Thu, 23 Mar 2023 20:45:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1679604355; 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=eTQwABadeBKFNTm3EY/dRBPaZ0090mrkCE25izbSHEU=; b=VcU0bSkyWGTiQb7KhH5J5lh1GvLpmUATCcj/R5fbst10j92GpuP6M0uWq3j9KzsiHSrWCh GtkTeR/A2LFHPCXaDtOb00o1KsKxHV1aMGj9gSTH/8n5BbMKYITRTd1iKpC5y9UQQo8MzF 4JDvhTSd1tzlPwS1B2NvrW89fQVrHW0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Jeremy Linton Cc: Marc Zyngier , James Morse , Suzuki K Poulose , kvmarm@lists.linux.dev, Zenghui Yu , linux-arm-kernel@lists.infradead.org, Sean Christopherson Subject: Re: [PATCH v2 2/4] KVM: arm64: Avoid lock inversion when setting the VM register width Message-ID: References: <20230316211412.2651555-1-oliver.upton@linux.dev> <20230316211412.2651555-3-oliver.upton@linux.dev> <5b355d9f-0191-2631-9745-5ed2d10af0e1@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5b355d9f-0191-2631-9745-5ed2d10af0e1@arm.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230323_134600_064048_3A1DD1A0 X-CRM114-Status: GOOD ( 19.42 ) 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 Jeremy, On Thu, Mar 23, 2023 at 03:09:54PM -0500, Jeremy Linton wrote: > Hi, > > On 3/16/23 16:14, Oliver Upton wrote: > > kvm->lock must be taken outside of the vcpu->mutex. Of course, the > > locking documentation for KVM makes this abundantly clear. Nonetheless, > > the locking order in KVM/arm64 has been wrong for quite a while; we > > acquire the kvm->lock while holding the vcpu->mutex all over the shop. > > > > All was seemingly fine until commit 42a90008f890 ("KVM: Ensure lockdep > > knows about kvm->lock vs. vcpu->mutex ordering rule") caught us with our > > pants down, leading to lockdep barfing: > > Thanks for looking at this! It had a bit of fuzz applying to -rc3, did I > miss a required patch? > > This patch makes the lockdep warnings I was seeing go away but I'm seeing > similar lockdep problem while running the kvm kselftests. In particular I > think it was "selftests: kvm: debug-exceptions" which threw the warning. Hmm, that's odd. IIRC the only test that exploded for me w/o the commit below was arch_timer. > So, i'm not sure its completely fixed. I ran the previous one a couple weeks > back before you respun it, and IIRC didn't see any errors. Thanks for taking this for a spin! This series depends on commit 47053904e182 ("KVM: arm64: timers: Convert per-vcpu virtual offset to a global value") which is only present in kvmarm/fixes at the moment. I had sent out a PR for this last week but Paolo has yet to pull. With both Marc's patch and this series I'm unable to reproduce lockdep warnings w/ selftests or kvmtool. If it isn't too much trouble can you give kvmarm/fixes plus this series a whirl and see if everything is addressed? Otherwise you may have stumbled into some more crud we'll need to address :) -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel