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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8C0EC433EF for ; Thu, 21 Apr 2022 15:57:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390407AbiDUQAD (ORCPT ); Thu, 21 Apr 2022 12:00:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390439AbiDUP7y (ORCPT ); Thu, 21 Apr 2022 11:59:54 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BDC9548E42 for ; Thu, 21 Apr 2022 08:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650556617; 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=kTeK/qAo71TOtFSLAt36q1Ck1F47EJBRXs8RHdefg1E=; b=QddvzlnKhsW2BZeob9ga3fG8IPvj/7eZxhPwSAvGKbExEQqia4miPIfZ9RxwgMSn0pmZeU AXiVGFshYtAabTNr3SVMoDCGO2fqvOBH7f575aX/Zhc8bveoK3DYV/Ifz9jctaVPsasfsZ cox/LdxCJo0OfC6ASNLQiDj/zLAl0u8= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-325-u3iMFzUcNOiEJiL5CD7iUw-1; Thu, 21 Apr 2022 11:56:56 -0400 X-MC-Unique: u3iMFzUcNOiEJiL5CD7iUw-1 Received: by mail-wr1-f69.google.com with SMTP id p18-20020adf9592000000b00207bc12decbso1283316wrp.21 for ; Thu, 21 Apr 2022 08:56:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=kTeK/qAo71TOtFSLAt36q1Ck1F47EJBRXs8RHdefg1E=; b=sgE80nd4NmY4aGP2eELid/yh6ZRtUF9myNOToY+H0Rt7u/gZE3+ZLU8o+/lt5p3U97 Q9psfH40FoGI8+3h1iV6kUNYOCq088SeduYEDgDadooV69hVXSm798J7r9vVFcqVAv7V XSzAogKkQmYaYraFTj5YHvZzDrviE6j35AnLj/iNcceRW0Oxv3tsj7jZQShrGjTQ9+Ff kkeFUAAmRB0tA83P+A8+01PXMhD80PkjIVAHcAW349ujcCbBglNWL+OkoNRO4zNC8OsH gtqVEAmWbF+f/cEBOKtraY/4jspZZOhQ1pWOXP/xtRLoixCIL+E2CnMsuUjQUNfk9yle 8zrg== X-Gm-Message-State: AOAM532K2jQhKNUHNZZyaGuMRNEcwHWS27Xqn7+4QCs9eCmgmY9zmsZX SMz9qmcroaj7B1sfQt43UPcH6PHiDKxeyvlaDKjhBKqaPFZStk34EpGlmRVIrhbteUaifvT8F+d 1MDHO4qSAlc8LsH8c1QrYYzpZ X-Received: by 2002:a05:600c:1553:b0:392:8de8:9dfa with SMTP id f19-20020a05600c155300b003928de89dfamr9333054wmg.71.1650556614807; Thu, 21 Apr 2022 08:56:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0vnAguST9pNCVtCDxTQ4/Al3Ko2yn2bs4Mmrfapj6XXW5P+04XyixAwoJmjwNo7AIJIlKpg== X-Received: by 2002:a05:600c:1553:b0:392:8de8:9dfa with SMTP id f19-20020a05600c155300b003928de89dfamr9333046wmg.71.1650556614571; Thu, 21 Apr 2022 08:56:54 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.googlemail.com with ESMTPSA id l10-20020a05600002aa00b0020a7cc29000sm2769430wry.75.2022.04.21.08.56.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Apr 2022 08:56:53 -0700 (PDT) Message-ID: <62e9ece1-5d71-f803-3f65-2755160cf1d1@redhat.com> Date: Thu, 21 Apr 2022 17:56:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Content-Language: en-US To: Peter Gonda , John Sperbeck Cc: kvm list , David Rientjes , Sean Christopherson , LKML References: <20220407195908.633003-1-pgonda@google.com> From: Paolo Bonzini Subject: Re: [PATCH v3] KVM: SEV: Mark nested locking of vcpu->lock In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/20/22 22:14, Peter Gonda wrote: >>>> svm_vm_migrate_from() uses sev_lock_vcpus_for_migration() to lock all >>>> source and target vcpu->locks. Mark the nested subclasses to avoid false >>>> positives from lockdep. >> Nope. Good catch, I didn't realize there was a limit 8 subclasses: > Does anyone have thoughts on how we can resolve this vCPU locking with > the 8 subclass max? The documentation does not have anything. Maybe you can call mutex_release manually (and mutex_acquire before unlocking). Paolo