Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp376238rdb; Fri, 5 Jan 2024 12:58:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGn45REWZy5Vy1bDJ7on6956g3H6NjQ04Wa61OJwNB70dkWCmJ0QEkc8RWpObBXDdpmEtnH X-Received: by 2002:a05:6a00:2907:b0:6d9:ad3d:7d8 with SMTP id cg7-20020a056a00290700b006d9ad3d07d8mr120665pfb.19.1704488288379; Fri, 05 Jan 2024 12:58:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704488288; cv=none; d=google.com; s=arc-20160816; b=UPP+U7OntLsqyeJo/vrnqZah+xnUF+ZoSBvLKLbkyS3cEaJI2XAnr8BuX1nnwShxgZ FOKJtC93uZNFutVlGE3Ccrpi2Mt8DXIR+WE/cRdJ8aBSyLWcEYSetW3r5uS7xvvzAjl9 dXVOlDJbcDsAcANWuh4PNtcTJfxo6Evz1BeBuUgtccU+h0mA+9YPISJphIm1GtbK+/wz Dmho7qsK5CLBYabwywQ2nPuc6Y34NWE2rubzkcMI+s8C8e7tJ4WzvdBCaXlf+x9dVoll SCGWRMrrelB3eB2bUJ4+jsNmGWry2WhjGIXHAm4GSRFH9htK3gYrywOEFUEIx7OMt6VZ KsPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :in-reply-to:date:dkim-signature; bh=UDAsfdMogSDCfbb8LPdGnJzEk+5kvJhLWVCCdsIfXj0=; fh=r4X4PGgalpArIrp2jji2JLzbyzvwbnh3SICB/u9VL2k=; b=KA6INHPn6g8O4kedq6jtqyk3A83u3TnaYF9NDysPjjJSfdDAVzIbJLg8r2147V1+Gk PPhPPl2JkNHUsBanjiHihoKmTNQeoUarhEGROavvHCXvD2PQ0+7Ir3sdFDiXuwp19OFF qBgn2eSbiMfnxPUh6go3EybIW0OI6dqboTSgOOzdHKe+iv5EwXW41zyOc5kqGZjrEiFL GRVvSnaH+vVCPVHmF2TOzCMYkvlbtHP/hpBq5uayzK6OEU+EISNCGdwZn1bqtSrtiimP 9j+DRJ4eflxM3fSH9GStc10o18nM67rbZcQLRayk5BGetSrigSWwx65YTHxR5IHdoVMZ aR3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mwtEYtFF; spf=pass (google.com: domain of linux-kernel+bounces-18357-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id le18-20020a056a004fd200b006d9a42d1cdcsi1850717pfb.11.2024.01.05.12.58.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 12:58:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18357-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mwtEYtFF; spf=pass (google.com: domain of linux-kernel+bounces-18357-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 0DF1B2850B6 for ; Fri, 5 Jan 2024 20:58:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E1BB360B2; Fri, 5 Jan 2024 20:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mwtEYtFF" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13B443609A for ; Fri, 5 Jan 2024 20:57:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-28c5c622a3cso21510a91.0 for ; Fri, 05 Jan 2024 12:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704488273; x=1705093073; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=UDAsfdMogSDCfbb8LPdGnJzEk+5kvJhLWVCCdsIfXj0=; b=mwtEYtFFPBDsr7uPfZYsu7MpBKGo5yqmF4kAjJ0wjpj/QSuQJERbr5DltampW1lmyT PnYCbgytCmWiURhJVYAswjVvltSxoidF4yjbh7aQPQLG8kGrnY9onTI5HHCvSAZtYNre 9IlNbp9uJCSXHlUDry2+9W6UOD0tNFIRji/gweJiw30K6lBK+8fPBuvWBwCd2d8Ig46g 446PmHB/+Q6ez8DNR01QfyEPS3Cy4SqfzaLAA2SQYZoTkkqm8FjUUHwSMtR8p6qDSFqv oP25x6zozKbZL4DU0PHFyglwZ/Yf8Q9ktK4UFkHiV0vpeXTAQ8sHervqXc5GIUNoJJaW VL/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704488273; x=1705093073; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=UDAsfdMogSDCfbb8LPdGnJzEk+5kvJhLWVCCdsIfXj0=; b=hju1XMOwMHrCuoKmQ+6wVMn20DXyqo5JR96x2CDmXs+6Jldr1hWWw5e2EH7nZjhKMk WUWnzjKQEetN2lZWOWt+ObJXpQmYFW+ePiE5icg30Lf8wOWVpvh1zcEgOX5SQTKsWe1d 3+RExb4bhwSHGtpSheLcGaiVMQFNF1OYkItx2RYYdd+9h4HDxqaanvzusIVJEDwIzFac 3bNyF7J/o1b2IOxJ446xEIee8+PhNyvhRuEg8HYszgIGqgwZzMFNVOn/dsO1cZz+yqrQ EllsSWTP5nSgclQnWUrTzlSTRUItqbxFQxip/g6pu7+RxhYAyJMorIMntLPzmImXu6Oj dwrw== X-Gm-Message-State: AOJu0YxJWpYst36TbSUVEDxnRk9WUZMzG2nSOjTfXQbOjSpvdSN12FHy 8OBeK/AgBQEEV8kex8VyQpDQHnPOv6BCSybG/Q== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90b:4b89:b0:28c:f855:e15 with SMTP id lr9-20020a17090b4b8900b0028cf8550e15mr290pjb.4.1704488273302; Fri, 05 Jan 2024 12:57:53 -0800 (PST) Date: Fri, 5 Jan 2024 12:57:51 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240104205959.4128825-1-pbonzini@redhat.com> <20240104205959.4128825-2-pbonzini@redhat.com> Message-ID: Subject: Re: [PATCH 1/4] KVM: introduce CONFIG_KVM_COMMON From: Sean Christopherson To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, ajones@ventanamicro.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 05, 2024, Paolo Bonzini wrote: > On Fri, Jan 5, 2024 at 8:13=E2=80=AFPM Sean Christopherson wrote: > > > Start by introducing such a new Kconfig symbol, CONFIG_KVM_COMMON. > > > Unlike CONFIG_HAVE_KVM, it is selected by CONFIG_KVM, not by > > > architecture code. > > > > Why? I don't get it, just have code that cares do IS_ENABLED(CONFIG_KV= M). Except > > for the MIPS usage of HAVE_KVM that you solved by adding CPU_SUPPORTS_V= Z, I got > > all the way there using just CONFIG_KVM[*]. > > > > Ah, and so does this series for the most part, the only usage of CONFIG= _KVM_COMMON > > is in scripts/gdb/linux/constants.py.in. Honestly, adding a Kconfig ju= st so that > > VMX's posted interrupts that arrive in the host can be printed when KVM= is built > > as a module is a waste of a Kconfig. >=20 > There is one extra thing that CONFIG_KVM_COMMON does, which is to > avoid having to select common requirements in all architectures. Oooh, gotcha. FWIW, I would love to unify the "menuconfig VIRTUALIZATION" = and "config KVM" entries, but I can't think of a sane way to do that without en= ding up with something like KVM_COMMON. :-/ > I jotted this to solve the reported randconfig failure, which is why > CONFIG_KVM_COMMON only requires "select EVENTFD", but looking more > closely it should also select PREEMPT_NOTIFIERS and INTERVAL_TREE. > Both are used by virt/kvm/kvm_main.c, and loongarch + riscv both lack > INTERVAL_TREE so I do think it's a good idea to introduce this symbol > (though it requires a v2). >=20 > > [*] https://lore.kernel.org/all/20230916003118.2540661-12-seanjc@google= .com >=20 > I guess you mean > https://lore.kernel.org/all/20230916003118.2540661-8-seanjc@google.com/. Doh, yes.