Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1602500rdb; Mon, 8 Jan 2024 04:51:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9ThpXX8DBLgGgX3LoVAhRk57Fzk+E8iu3nFCVSh9nPSgXe/hgnjqzRjWaml0FWbpSJ++t X-Received: by 2002:a05:622a:1a18:b0:429:9967:326a with SMTP id f24-20020a05622a1a1800b004299967326amr464649qtb.107.1704718291085; Mon, 08 Jan 2024 04:51:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704718291; cv=none; d=google.com; s=arc-20160816; b=CQ8Cevu8hSeawuUK5h9oq8+Wvtuho2ljQKeHPnqyhC4b9KW+beGoQpgHPlln8XhpBl b4/r+y6G4XqBRC+YOos18/PmcJtk5KgKg4xnZ7XhjVkE7i+1xL/llvrJ39aUdKsQCFs6 6dzkNGyMazJxhyCah/4EehjUm/f6MTcRqD02yQY2t/YmUgg0JF37dVlA8/42xuxGzgV3 LUi/kJEP7+uJa/SRh7MVrL/ztXEucNd2evyhtcHT3ivir/RqtfnvGC1jBygHUpnZG7uM ZUdDQYuESbjJNQcQ+IGwgmu1sqbXMupnZQxWmIzFQ0fiyr64AG9yrxNepCLyTaKu4ZVc q8og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=U6WD9hXyfeZb3+kCnOFBPgopN+rupvbModgd55kTPhM=; fh=AiqZMo5ILO8GxBYVhQQwa0nqmkNnaawgcVBB3G6wi34=; b=UePCue/gJG+dCPxNdsvx9uNrRk2rFZIrSP5Xbc37RIDhDyH7NnHHkkcCZ/cLp1fDp7 3Ker/+LzKDiHy6cfVfiid4rSWJITVZxqlqZKqJxxeeDyAOBdDnnnI4PSKEmA+g5pea7j EWoslbGvlWLxVcB1awrmTFBz5dMlsKprmznnTsHP73zVZXYNWDfVMSvt42M4B+EOuY+z CO2zrkh60s3FCPq+8pzcObtE0ANEmZ+CD7pIKZ2nN/zQaglKFlPCk9Tjq98ACIecCFyh BsKlE6z+PG01W+Ykq8vU2sVrdns+SCY4xX1o+iVnj9o+Sst0dpBrY0qWU2WxSpU1QJFU UDnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IYdfqgy3; spf=pass (google.com: domain of linux-kernel+bounces-19568-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id fj13-20020a05622a550d00b004260c8f8d1esi8051395qtb.328.2024.01.08.04.51.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 04:51:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19568-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IYdfqgy3; spf=pass (google.com: domain of linux-kernel+bounces-19568-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D0F0A1C21505 for ; Mon, 8 Jan 2024 12:51:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A612546450; Mon, 8 Jan 2024 12:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IYdfqgy3" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 4B22E45C0A for ; Mon, 8 Jan 2024 12:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704718065; 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=U6WD9hXyfeZb3+kCnOFBPgopN+rupvbModgd55kTPhM=; b=IYdfqgy32Gfw8YXpmpiUXccczEGBUmrXHikYVNl8ELAT6b5lh4dNDF2/xIFr5NhMD6mGFS Gc6F8wW8jQ8RK5frhnukkJhVANaSribewLn00K+g9Bm5F4TOSUhHpZIWMIVECShZZeZkVR BZka4ngLGRlk4Vkfh7LDbRCqHMQVX9k= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-623-Unz3kWhUO7KiiPXg9AA_FQ-1; Mon, 08 Jan 2024 07:47:42 -0500 X-MC-Unique: Unz3kWhUO7KiiPXg9AA_FQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B2D1C29AC01D; Mon, 8 Jan 2024 12:47:41 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95F8A3C39; Mon, 8 Jan 2024 12:47:41 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: ajones@ventanamicro.com Subject: [PATCH v2 2/5] KVM: fix direction of dependency on MMU notifiers Date: Mon, 8 Jan 2024 07:47:37 -0500 Message-Id: <20240108124740.114453-3-pbonzini@redhat.com> In-Reply-To: <20240108124740.114453-1-pbonzini@redhat.com> References: <20240108124740.114453-1-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 KVM_GENERIC_MEMORY_ATTRIBUTES requires the generic MMU notifier code, because it uses kvm_mmu_invalidate_begin/end. However, it would not work with a bespoke implementation of MMU notifiers that does not use KVM_GENERIC_MMU_NOTIFIER, because most likely it would not synchronize correctly on invalidation. So the right thing to do is to note the problematic configuration if the architecture does not select itself KVM_GENERIC_MMU_NOTIFIER; not to enable it blindly. Signed-off-by: Paolo Bonzini --- virt/kvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig index ace72be98fb2..184dab4ee871 100644 --- a/virt/kvm/Kconfig +++ b/virt/kvm/Kconfig @@ -97,7 +97,7 @@ config KVM_GENERIC_MMU_NOTIFIER bool config KVM_GENERIC_MEMORY_ATTRIBUTES - select KVM_GENERIC_MMU_NOTIFIER + depends on KVM_GENERIC_MMU_NOTIFIER bool config KVM_PRIVATE_MEM -- 2.39.1