Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp779366pxb; Fri, 22 Apr 2022 10:59:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJX8qJYXXHuDbycJcrm5m/FXt1oSghHSbXogbjTLD4SQUDth9pNlMFngOLLXkGBvkf8kcf X-Received: by 2002:a17:902:b906:b0:158:3120:3b69 with SMTP id bf6-20020a170902b90600b0015831203b69mr5517095plb.33.1650650374738; Fri, 22 Apr 2022 10:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650650374; cv=none; d=google.com; s=arc-20160816; b=mgM2VskNStowvdYjOpb4vo2MRzfVG0CGn2VXcRfCpiMaUlOPBnkHHUNtbMdQ1lS/0q VdmRNh6xm+kVahAsU2VwU7chsdaj34WRlGcvNs7PuAQH32f18QuQ5D5LBdtmzQmLBSe9 hzOk1eQjlLzQ5FHpd98z6AvxsSHNJMO7fBOdQW67PTSfVwOHXQZzmBg74Gv8W+W7f7j9 VZCpJSu3ZP0TFXV+ZVhi3UcSHkShkfq7vfu5HNEvxbTmyl9Iu/OSDBrKPETEH0SbKMGC WakihWhh73IgtYT008uvcpHbG1j3agRqvd08Ta/C/UvWqbW9D3yRAlMSvYUk9jOpnw6e zZ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=kTeK/qAo71TOtFSLAt36q1Ck1F47EJBRXs8RHdefg1E=; b=0MFinFY673SqU3F7vilcKkLIBduZUfQpyg4cimajwHty/wEEHcUwrzJK+OJuvFWht/ WnD2gt0b8E+90/Qc9EzNj+AbBW1Z1aJSNPZghcurpJsXePyw/RrUqqT3a14NJdM4q3p1 kch+lmEA4Jf2yexAFaKJ7J6CyOc0sYE8ZKMLy1B0sJv1Qqg2DZveADJsHEYkbFgjavyQ yjx0a87E2o/FM3irtmQESWkQ+3hmbElKIMIgUgc5jvWQhVVL6sJFcWYG2lJj9mgiHc5G F1pX5ys+AR/uQEvb8YOPlAxMwr9a9u3wduZUUvJmdDWygCCqdpI8fv19G/jWHRs98skG gEkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QddvzlnK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d13-20020a056a00198d00b0050a73d826c7si8907320pfl.14.2022.04.22.10.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 10:59:34 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QddvzlnK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DABCE110961; Fri, 22 Apr 2022 10:41:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382964AbiDUQAD (ORCPT + 99 others); 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-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 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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