Message ID | 20240108124740.114453-3-pbonzini@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-19568-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp995616dyq; Mon, 8 Jan 2024 04:52:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IE29dK9IhIOcXcLoHdffzpzAD3LCNPbraF7MvA7Qx7Y5UUxgu1IplNnAXAIpCbzF5TKbvoS X-Received: by 2002:a17:903:32c2:b0:1d4:a24c:b5b2 with SMTP id i2-20020a17090332c200b001d4a24cb5b2mr4724418plr.65.1704718340728; Mon, 08 Jan 2024 04:52:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704718340; cv=none; d=google.com; s=arc-20160816; b=ugm9WOLHDHaMHGRbhSYBmRo6IU/fHrgAoj5tazmfmTWMMJVCsJi9I74k+W1Q/fwEys PIi1AuUAWxoPjYU3dERPs52V3AQhbG1ER+d2fABRqB2pujYQdJIFgrs1GOPjR3LU/c13 drQrlw+lg8xKjK1xuZwKuQ8IZ9w5P23V3eaO8AFIfC5HKampe2XJ2gKblA+2Hk2xijjI z+3L6CEsnG/Dcj18DVxwrhBlJrqoKc8ye6WHe/s2G4BKYZU2FzXp+0FmCtYvx2mPzkHh Oys5qkZplGMW2g1fO0EQaFs2TvzjkF3tljlIKFAQd/oUlT5IslZMOr4H/ypkdn6UZEim 6azA== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19568-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j9-20020a170902758900b001d4666effc8si5867532pll.188.2024.01.08.04.52.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 04:52:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19568-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19568-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6C1402833D1 for <ouuuleilei@gmail.com>; Mon, 8 Jan 2024 12:52:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 865B247775; Mon, 8 Jan 2024 12:47:50 +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 <linux-kernel@vger.kernel.org>; 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 <pbonzini@redhat.com> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787526738829763406 X-GMAIL-MSGID: 1787526738829763406 |
Series |
Replace CONFIG_HAVE_KVM with more appropriate symbols.
|
|
Commit Message
Paolo Bonzini
Jan. 8, 2024, 12:47 p.m. UTC
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 <pbonzini@redhat.com>
---
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