Received: by 2002:a05:7208:20d2:b0:82:bbfa:f723 with SMTP id z18csp55632rbz; Tue, 7 May 2024 10:21:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVaUuHoecJ5MZgDsPyKjUtSHHHAAP6UJ5x43L2i3uLP7T1pQvFuhEwbmwxSWhYwKz0rLPkufVMpZJK4r8n3G1JXXsWE40s0izvMvcyWHw== X-Google-Smtp-Source: AGHT+IEZ5DloS6eclkUItvBisIzcMUovqYAmSq3KCidNKe+vPADJvmadetyB4fNt/jhLS1rJExTr X-Received: by 2002:a25:9e01:0:b0:dcc:5a25:ae88 with SMTP id 3f1490d57ef6-debb9d02399mr378697276.19.1715102474862; Tue, 07 May 2024 10:21:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715102474; cv=pass; d=google.com; s=arc-20160816; b=desNMwggCvKYVju38XyrUg/GcL7RkHefj3jaYy16XrEpg9I/my8KY9o2MMlbSvBolB 0DutVhCnUDJAEp1a6Vr1C1MA0Otg9P8P5TViaThlFSgb9nvjrQu7bH6tbUXYTwjeiMVQ tsCDI98raTaChxh/SglAzB/4hO1woy5mZnd8djdbouMYX9rZuUHmoG8ZX/6gGPly/q6y qZ/vTFBM3OQU2UcHEJ2P5E9hDBKJETWUJyENYMXngOMHm9j5IIbTjU+CVyK7I/QL7XDQ Vwa76PYh+Vj+aZ2XOOqf3vECF+oIu9HafvYk+FdOMrklqTzXJROC+BL3r6H0JdZg7Az5 2lMg== ARC-Message-Signature: i=2; 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=zvToZ7WqfcgMTwXbVfEgk8KX+0yA+ouGzL56lXRGL64=; fh=8lRHwGDqvLPOqYMLgT3QaLu+8IulL2evBSo5Pbwsu/I=; b=XZySo2j9jnzPrt1wR0W2UTfVRkiB9GMQFYwmPhdEYA0HkrcWIOdJQWvSkMeiav0vt1 7wJib+p7le5QQGYlJvCbRFCo6s/wfStXOBuVDWLi6q4qww1h1HAXNAnbwrl21qos8X74 yikaao6oUYvBrvlqKjATuryImM7ypONlVqJWrbyoPUswtZGNDQ83vlDjyUbmo9c0amXs 7qpAp3HUmyPwRkFJEZkDwOEp/5CJqLox7oVflaPvrrqtqROyX15jVa4wHKEwSoUaiJKz Nonm9EEn4tT5KxGtMFzQtV3lYZdlTbz7ZR7ytwR+bUrbqjM+A1l4rW9Iq/fbp/7te6BP z/AQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="XYuITmd/"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-171907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171907-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 d12-20020ac85acc000000b0043b0007811dsi12176153qtd.663.2024.05.07.10.21.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 10:21:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171907-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="XYuITmd/"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-171907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171907-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 998411C20EB0 for ; Tue, 7 May 2024 17:21:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E7A416C456; Tue, 7 May 2024 17:21:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XYuITmd/" 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 F1E3A7462 for ; Tue, 7 May 2024 17:21:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715102467; cv=none; b=cLzDgKznCcm8QjlkNbwGy3NnCzXeX1RM6ugrFqgicxzSVsxlWqCQrlJ2P3fw4EPYsv5hfutIvBqYLIOLI/uCKiI25OSiroenZv+2LKRWp/JpC9aAPXPb2+LURsdWo/g865vSTiQoCiLUNFfIDBT8JB6Y0MZiBY/5Ldw1f+gT2tI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715102467; c=relaxed/simple; bh=Td1SHhWq6Wvpr0je4B4v22NIo5BXgO45S9j6dXvvWc0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=IV7I/3DmwuOQ3GoHR39Me7u/CUQRkjtc3j6pM3RnXSYhFBX0GFk3J+S729FzIaAJw/0cY/I2WPeELT1iwylbX9K+3op7wQou959q8GQqN45/r4a2yq2S64ESHa4XDOC96bNqvNBU9XQebz0Ytqv4F5wUgOY9Llu0R9cTpcS9FLI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=XYuITmd/; arc=none smtp.client-ip=170.10.133.124 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=1715102464; 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=zvToZ7WqfcgMTwXbVfEgk8KX+0yA+ouGzL56lXRGL64=; b=XYuITmd/gTiSEb+0SlodyydoJBx26vRqAiVomiyEwOojc3fTifDr47droaZJtOPnLuK3YY dJP6GrRNfdl4LKYGLTf9CdQIkac0F6VrSPRd2bZguuueexkH4c+myLr4kP9vaLey4a+dEy btejP+Qyq/n2hf0/8HTfM4plM23sj80= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-614-7EX72h-aO7m3VFyfko3ujQ-1; Tue, 07 May 2024 13:21:03 -0400 X-MC-Unique: 7EX72h-aO7m3VFyfko3ujQ-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-34d99cc6c3dso2065790f8f.3 for ; Tue, 07 May 2024 10:21:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715102462; x=1715707262; 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=zvToZ7WqfcgMTwXbVfEgk8KX+0yA+ouGzL56lXRGL64=; b=prBld3OP/0UWGLXGZpA9DFu8FeCc4VUJSG4rx81nThhLV0VuUrw1gmW9c5oSen911N fxp1HG40fwjCvqqjMUbM4d0dS5U9L7VHTN5ApBHm8xHRD29IXA1VZ7ZVrHIOnns2FkQT A4ejMNAXPmN2+PKWAhagPV0bBjf6meymDkyBC4iJb2TaCy1M2txZRojpS/2K0NZaFJHd 35LM3u1LNDWQKXb7QTIOsn5hpVtAZBeCERxDJUr9Oyrq2Z7g/UMf7KhzykqRVuHBxgDa uCjEdXOJtZxepXCj0sGp8ENabFkFRtL8XXcUgeTHNJH7p1WKm0R0ozgJins/MrvdtlvD IWsQ== X-Forwarded-Encrypted: i=1; AJvYcCXORsQZeHSxVliGcHyc8lVdssxEwfAlPEdXiDmkBeQeiUa3DiFGhy6ni2RslEtoCRw4ljx1hwKa9CR8N0KoafOfXK1+kASTdYtKCfTH X-Gm-Message-State: AOJu0Yzp9HR5JWVPDL6EqUNXBKycAvWXTWO/917mpOjTOzvG0CDBON4c G//tAiWu/+83rJzNzH4OxUv+dd3uBPl/W7R01JtqiYPgW8HGUEgcD5NOJ02gJvIiVV3CaL0+dEh hBgxyM4hKrMdO0hvHeuKwHw4El176L/SCPU5Ajhq5lvhQlHxEVRJMCNcOlDMXaJ0LwziHJq3/Tt hav+45fso+dG5Qx9wr+8wXqrVS7XbTyyZy0FB6 X-Received: by 2002:adf:ebcf:0:b0:34d:b243:5415 with SMTP id ffacd0b85a97d-34fcb3abdd8mr272807f8f.70.1715102462520; Tue, 07 May 2024 10:21:02 -0700 (PDT) X-Received: by 2002:adf:ebcf:0:b0:34d:b243:5415 with SMTP id ffacd0b85a97d-34fcb3abdd8mr272797f8f.70.1715102462154; Tue, 07 May 2024 10:21:02 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240423165328.2853870-1-seanjc@google.com> <4a66f882-12bf-4a07-a80a-a1600e89a103@intel.com> <7f3001de041334b5c196b5436680473786a21816.camel@intel.com> <514f75b3-a2c5-4e8f-a98a-1ec54acb10bc@intel.com> In-Reply-To: From: Paolo Bonzini Date: Tue, 7 May 2024 19:20:51 +0200 Message-ID: Subject: Re: [PATCH 0/3] KVM: x86: Fix supported VM_TYPES caps To: Sean Christopherson Cc: Kai Huang , Xiaoyao Li , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 29, 2024 at 5:56=E2=80=AFPM Sean Christopherson wrote: > > Perhaps we can make the kvm.ko as a dummy module which only keeps the m= odule > > parameters for backward compatibility? > > Keeping parameters in a dummy kvm.ko would largely defeat the purpose of = linking > everything into vendor modules, i.e. would make it possible for the param= eters to > hold a stale value. We have the following read-write params: parm: nx_huge_pages:bool parm: nx_huge_pages_recovery_ratio:uint parm: nx_huge_pages_recovery_period_ms:uint parm: flush_on_reuse:bool parm: ignore_msrs:bool parm: report_ignored_msrs:bool parm: min_timer_period_us:uint parm: tsc_tolerance_ppm:uint parm: lapic_timer_advance_ns:int parm: force_emulation_prefix:int parm: pi_inject_timer:bint parm: eager_page_split:bool parm: halt_poll_ns:uint parm: halt_poll_ns_grow:uint parm: halt_poll_ns_grow_start:uint parm: halt_poll_ns_shrink:uint Vendor modules do not muck with them (the only one that is exported is report_ignored_msrs for which permanency is obviously harmless). And the following read-only params: parm: tdp_mmu:bool parm: mmio_caching:bool parm: kvmclock_periodic_sync:bool parm: vector_hashing:bool parm: enable_vmware_backdoor:bool parm: enable_pmu:bool parm: mitigate_smt_rsb:bool The only really bad one is tdp_mmu, which can change depending on the ept/npt parameters of kvm-intel/kvm-amd; everything else is okay to have in a common module. mitigate_smt_rsb could (should?) move to kvm-amd.ko if the modules were unified with kvm.ko as a dummy one. Paolo