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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C5BFC46467 for ; Tue, 10 Jan 2023 14:11:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238362AbjAJOLu (ORCPT ); Tue, 10 Jan 2023 09:11:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231524AbjAJOLR (ORCPT ); Tue, 10 Jan 2023 09:11:17 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F49090241 for ; Tue, 10 Jan 2023 06:10:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673359806; 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=xU6PGlTNk/jOAm69hbehGdR5AFmWPCrwoQ2SymKrkmY=; b=X79/SER7WTDJIqgtqXmLmAD76fW9Dr6M4dk9bdjJXsP5T4pkcs/8CevMeeip2csX9hAsmG RgZ2A752oSzHhtQeCAvQNvwp8fxD67DA0OnggZoON+d37JYfeSOkZGP18GJ4d7uE7odqdQ dRw5LfaRVNKA4hu5YUTGYO4NCbFK9TI= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-214-Xa5jCJ_7MBGistVAhQPBQw-1; Tue, 10 Jan 2023 09:10:04 -0500 X-MC-Unique: Xa5jCJ_7MBGistVAhQPBQw-1 Received: by mail-wr1-f70.google.com with SMTP id e29-20020adf9bdd000000b002bb0d0ea681so1979273wrc.20 for ; Tue, 10 Jan 2023 06:10:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xU6PGlTNk/jOAm69hbehGdR5AFmWPCrwoQ2SymKrkmY=; b=f5hLsEsad1wQiqVaQjr86I0FV2u7AsZmFLCZW9lgPT+iBMBbpdiqX9Eeie1t2CBc57 Vf1U7OmEw+CkxPsJV3Ai69TkiTXFgaCvJlpsROfGw16sSoWvyIabXZqp3tVTLPzeSQqJ 9IXP91hMCEMnF8Vu1DCBx9FzdPmhAzdszM+utWWhP1YJee2siIgUFgr8piTt8DLvDjkR dED0bEwOTIpCqLpy+I+w50nYxbWdjiedH6TXWjjKkxVA77FY7c9KneSJy5sc41ksppfW /XuY95Dm19FjXpgNj2C6iS1+cKoL7Z4u07vFcuggZCHHsC45CJuKsAbt7rbDuRIEeZJ1 Jchg== X-Gm-Message-State: AFqh2kq6uiW35Id3kWYw1qF6vGxMV803Cw831R9KHvgFyhviEajWFwoz OgqCcj8GfMQOvBlha2xQerDiYS7ZC00fnydxf6w2BKGaEZr31CZpw6Mo72hFG4GWvUHl2yzpxlb nlCHEbJFZ6psy X-Received: by 2002:adf:f746:0:b0:2b8:bcd8:1818 with SMTP id z6-20020adff746000000b002b8bcd81818mr10289610wrp.1.1673359803020; Tue, 10 Jan 2023 06:10:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXvySRFXcCzIjdS8her35zEPzAicPYbrUSXD9yH4PB5GRQuCjeGmxGt11K3eyH4BSudd8EZe0w== X-Received: by 2002:adf:f746:0:b0:2b8:bcd8:1818 with SMTP id z6-20020adff746000000b002b8bcd81818mr10289600wrp.1.1673359802798; Tue, 10 Jan 2023 06:10:02 -0800 (PST) Received: from ?IPV6:2001:b07:6468:f312:1c09:f536:3de6:228c? ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.googlemail.com with ESMTPSA id q16-20020adff950000000b002bcaa47bf78sm2027077wrr.26.2023.01.10.06.10.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Jan 2023 06:10:02 -0800 (PST) Message-ID: <9cd3c43b-4bfe-cf4e-f97e-a0c840574445@redhat.com> Date: Tue, 10 Jan 2023 15:10:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH 1/2] KVM: x86: Fix deadlock in kvm_vm_ioctl_set_msr_filter() Content-Language: en-US To: David Woodhouse , Sean Christopherson , Michal Luczaj Cc: kvm@vger.kernel.org, paul@xen.org References: <20221229211737.138861-1-mhal@rbox.co> <20221229211737.138861-2-mhal@rbox.co> <3a4ab7b0-67f3-f686-0471-1ae919d151b5@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: kvm@vger.kernel.org On 1/10/23 13:55, David Woodhouse wrote: >> However, I >> completely forgot the sev_lock_vcpus_for_migration case, which is the >> exception that... well, disproves the rule. >> > But because it's an exception and rarely happens in practice, lockdep > didn't notice and keep me honest sooner? Can we take them in that order > just for fun at startup, to make sure lockdep knows? Sure, why not. Out of curiosity, is this kind of "priming" a thing elsewhere in the kernel? >> Fortunately, it's pretty easy to introduce a new lock just for xen.c and >> revert the docs patch. > The wording of that made me hold off, on the expectation that if I did > it myself, you'd probably beat me to it with a patch. But I don't see > one yet. Shall I? No, I have already written it but didn't send it because I wanted to test it on the real thing using your QEMU patches. :) But that was a rabbit hole of its own, my Xen knowledge is somewhat outdated. Paolo