Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp365162rdb; Fri, 5 Jan 2024 12:28:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBSmH+/QUFk06E02wggz1Djcqf/OMlgQMnk67FAvYtFZnVdQo/7pnd3UsWmoyNz78SpQ73 X-Received: by 2002:a17:906:6887:b0:a27:37b8:2809 with SMTP id n7-20020a170906688700b00a2737b82809mr1694009ejr.8.1704486519709; Fri, 05 Jan 2024 12:28:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704486519; cv=none; d=google.com; s=arc-20160816; b=XnRxgz5sexMROU23f26usGqDti1H+KSIosrPd7ZQDBZSj9EdwDIOVyWn4eMM1fxYM/ 6Q54Aef+nMAEeIPO0Dn4AiqjFe5WgiEY4E9VH9sBABo/2HJh0glbY6j2XM44HmMF0Ap9 XPyLsCQPgtvUilEQtFydFZ5yEXtDriRqhKakJHk+A5uhdc//NHVI4ZwX+aKPtK2iGzQm uS3LqoCpXFwlndps456mz8+xROwfrYjpymiwbJziTADycSf5pdxz+LnmyUib3RxRFJYN F2uAdb1eIo4y53dTa0RswVjz5F8SINfOann79BoWB/2z18+K++w7uFsOmnJaiexujDhZ uhAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=LBcU8Ucgw9WvEv4ml+FP6D15OBNp3BTNZQ7NFOWnOwY=; fh=rYPWa0X+BRmY2j0JSZmovtk74DNIUzzXClKLWJmOeFU=; b=yKviTP+qTSgC5egxrJWUAy52/AxjQ9I+MQn75Y0Im8I0PncazQx/bYVMhocVt7mt3+ im/RfVk/IrdkRQCxR7sBUadMjKO9ZySGS30OhorSsVdqgqW4pRIDnC+BHurw7uM9GrHB M30AQsiNjZ0Pzl6xv4vIwKdsbzW4tb1qi/+WkNQiJXaHAFjv7AqEcoBZ9C43DaMkDSVm cUoDHyjxrUAnjLLk3QpPRVR6PtyuWYVqy6JFM9jUqgx+FpItNlYRU25Y5BYKbj5+Ewqt uDTX9MWHQEhFWX+KhU0YneqYvns5rj3xvTOYriHM9Kx27eURthN+JsUfhD5usTog8L60 vqtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YX6k0R7g; spf=pass (google.com: domain of linux-kernel+bounces-18326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p8-20020a170906140800b00a26fceada33si825609ejc.123.2024.01.05.12.28.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 12:28:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YX6k0R7g; spf=pass (google.com: domain of linux-kernel+bounces-18326-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18326-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7400C1F233E9 for ; Fri, 5 Jan 2024 20:28:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82C65360B3; Fri, 5 Jan 2024 20:28:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YX6k0R7g" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 4AFFA3608A for ; Fri, 5 Jan 2024 20:28:25 +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=1704486504; 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=LBcU8Ucgw9WvEv4ml+FP6D15OBNp3BTNZQ7NFOWnOwY=; b=YX6k0R7gQNWL5JgNyX2eo8jRk1v/9F3S57pMuaUEkINXH8B4iKi0dv2nGIJ8/Iz4CdlVr6 Rt2USJUwtfSMJIuedCnqoeiLx/if3eD2KjreN9Z02Lcm19HZ7NAWwGtyk3yT/31Bz/PJZT IUzs2nHs/4HwMDjTKBkvE9TLlmshKOI= Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-Rd1A_LzWOCa48M8vZOVUBQ-1; Fri, 05 Jan 2024 15:28:23 -0500 X-MC-Unique: Rd1A_LzWOCa48M8vZOVUBQ-1 Received: by mail-vk1-f199.google.com with SMTP id 71dfb90a1353d-4b7213832b5so987484e0c.1 for ; Fri, 05 Jan 2024 12:28:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704486502; x=1705091302; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LBcU8Ucgw9WvEv4ml+FP6D15OBNp3BTNZQ7NFOWnOwY=; b=lHdq1gVHlYmjls/vYJSE+WTHIuCF5qVxdsVxOXwlQVe95NRcX/qX1xRUXEnyk6Xxkl QTEV1PHC6flehzEt2kSnGgk9wo1SyYmDNRiNWsXd/d7IAQxoEIYWqfngJ+8PtCE+Bier fMpBZEo0PPqGwS+epsxkpFPaz38DrKj7UvwFg4DDLGxgXqNDWVSMR0RIpCsJ4Y8OLXCS Zn97rog9E9MLQgDkqOQA6y9uBW5m06unErxl/+g2zrfWax8xGdZAwvLMaNS6MMzlBZNB dFY9OdS2Fnwp7x89Wr+WvcUA8Yt5OqdmBdZQnwgeeAy3yR8hMf1I0KW4YI2Ses4g+eG0 qdGQ== X-Gm-Message-State: AOJu0YzMkxceGV4hUa4jbkDLUUB8qSHFC6nOkWChm36Eb71bDlGY+AJL sYf+orJCE8M20kBIT3F1Ow6i7XeDOtv9R3hDx12KT2aIgSK/8qVnUIK5VJp9UaGlchh5hN7bUWL 0X6GViZSEne2e9kQueWvftwJQ4uYCMhNjQebftZRGDvJRn/ACXEIuD65ayvU= X-Received: by 2002:a05:6122:45aa:b0:4b7:49f9:c6f4 with SMTP id de42-20020a05612245aa00b004b749f9c6f4mr2001561vkb.4.1704486501818; Fri, 05 Jan 2024 12:28:21 -0800 (PST) X-Received: by 2002:a05:6122:45aa:b0:4b7:49f9:c6f4 with SMTP id de42-20020a05612245aa00b004b749f9c6f4mr2001554vkb.4.1704486501520; Fri, 05 Jan 2024 12:28:21 -0800 (PST) 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> In-Reply-To: From: Paolo Bonzini Date: Fri, 5 Jan 2024 21:28:09 +0100 Message-ID: Subject: Re: [PATCH 1/4] KVM: introduce CONFIG_KVM_COMMON To: Sean Christopherson 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 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_KVM)= . Except > for the MIPS usage of HAVE_KVM that you solved by adding CPU_SUPPORTS_VZ,= 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_K= VM_COMMON > is in scripts/gdb/linux/constants.py.in. Honestly, adding a Kconfig just= so that > VMX's posted interrupts that arrive in the host can be printed when KVM i= s built > as a module is a waste of a Kconfig. There is one extra thing that CONFIG_KVM_COMMON does, which is to avoid having to select common requirements in all architectures. 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). > [*] https://lore.kernel.org/all/20230916003118.2540661-12-seanjc@google.c= om I guess you mean https://lore.kernel.org/all/20230916003118.2540661-8-seanjc@google.com/. Paolo