Received: by 2002:ab2:1c04:0:b0:1f7:53ba:1ebe with SMTP id f4csp62733lqg; Fri, 26 Apr 2024 08:49:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWo/CTp84hK7ZOd3SCjc+s9PyEsNDe0wF7zTtVm1BbGjIdFUeGCzHM6ni53V9kSyvvQWRYBGXm0t3hrXzx4+IGkApsPFS6xQJMCxD6F6w== X-Google-Smtp-Source: AGHT+IEQBIhQ3kWH+msgVXqG8txue7cSRpf4bvLzlKPC/gu2Ug38viC6onkwqCQ2orV+2f4EwyBf X-Received: by 2002:a05:6a20:1581:b0:1a3:ca86:be8a with SMTP id h1-20020a056a20158100b001a3ca86be8amr3802914pzj.57.1714146561768; Fri, 26 Apr 2024 08:49:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714146561; cv=pass; d=google.com; s=arc-20160816; b=vRCZu5EDa8AA7Kyny8wGK2ggh8B6d5bkSUcWkEJ2/fYuQ7t+Z/CmNDtrJJBc1eazyX IQFSpF4cTffRz0ABBTK6Z5atYYz3D2UEcj5hVbhX5JbmaNnU2DnFCTw4Ej0631BSTjPm ujGJXf9ODEp7A20KgWG5zuqjWbfOOE5wCkQJ3M8OiSUnCEvCVYY8K5B799efUkQUjfhr /45ojzq9Om5Njc6cFlP9fh5C7qGLffsJ6zHvMtoxfy/SFMGyqxj22j22YRfhD9npKP58 kbQOTB/4e2GDJS23diGQR10K3OSOv0eUcVSH2a1GDMr0drnoCuRSU5Fjb6tGe1yVsE2m SZWg== ARC-Message-Signature: i=2; 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=2E9JoSWwd8nVZWjHSk8NyMAJBnorcWNH5AMDyGnL6Dw=; fh=iWWG1Ul8yh2VUZqfGekJmHorowSMWhuz58bR5IF3FR8=; b=fy40x/4bRB0xvbKShIqGILSatfdaDCcVWgRp8AxYygaFb973mJLyB1upxScnXr+9wp RdsGQPBzwv5DgYpmSrnSKJwxAxnPyg2P+OhTCeuPONRfJ+qCY1GmDDP3+XbQZxucHOB3 Bbpvlz+/JqqC+KmKYUshqTOSuWNRRiIHtwiDSPmsMBUJtTXRbWKb/DPkqMGmClsxiHGU 5FbH7qTBtqU09OkB4SD4QVl+RxNwD/K03qdGigrPs7xbd14p782f0uixIKhd3UuvousF L9MDdcWLAE9ueiwLcPXKHvmgTjLEpJULbzfkNxw+yZLvveZ4CSUk/pf2YDSfbMsxVDFv LIkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=p50eQb72; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-160329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160329-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 y11-20020a056a00180b00b006e6b14382f5si12108357pfa.34.2024.04.26.08.49.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 08:49:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160329-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=p50eQb72; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-160329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160329-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 98F52282596 for ; Fri, 26 Apr 2024 15:47:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E09D15217A; Fri, 26 Apr 2024 15:47:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="p50eQb72" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (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 2681A149C7B for ; Fri, 26 Apr 2024 15:47:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714146452; cv=none; b=iB9KBrHGIdEtcC8SFkeb7eoIeIRhu4heuYgyHbZV++vU88ZSKLr4S3zom7wF/uJ7V5SP/vkMlzliDi/hFtOfOPc5FW4l2iddSAzRsQTxyZM0GLSYqf43vKJ6gyGNSRBp+yF5g85uuQzbLYe7dqifmgn4bHwB/Ck+3i2uJADB5g4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714146452; c=relaxed/simple; bh=3kv3W8HCdfkaWDUxqPPBqvTTgtgtiGVVw92b0grhvFY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Ep2ZR1DaqaDXNYaKm1tffaazOO6l/PtlvkQezIh5gFxOLqr1VpzgdqB13EDFYHH1g02/JqZ0LQQ20V428+MHdmWj9U9CrKSuz81SmqjZReaxYSbqp9iGb+rcBLkv31bPZKmQzDgmoiDmdY8EQPGbqXMFhslqQ/iWy7/acn/ZTEY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=p50eQb72; arc=none smtp.client-ip=209.85.128.202 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-yw1-f202.google.com with SMTP id 00721157ae682-61b028ae5easo41020527b3.3 for ; Fri, 26 Apr 2024 08:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714146450; x=1714751250; 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=2E9JoSWwd8nVZWjHSk8NyMAJBnorcWNH5AMDyGnL6Dw=; b=p50eQb72zDQe3QRayW0+C1Ticmi/NdxCzcJCY5/hrodEeFBl+nZhLXVr8EfXMxEcMv EY+AlQiLXXmKysYjTli68C8Nwhbi3prP4ROIL494mOWr3xBCAnr+oT12gvy1JJUipSjH 3Z+9aBX7LlUKhk0+29mcJPhjbZEOXAjOGHkaRi4TfmOtRU7GH+1XTG6AnQx48Na0QkDk FEt1LhyRyCQkuNIEbE3Ql49UpO0bCSVYrA0UW/JOjtoTdx2exTmcVA7CGoD6Ok/QSDtH GHg84hbm+Pjv+fmWtiBXAVokL+tPNCXPIMZ+Sjnfqv/y6muuJlTxVOfuE9iMnazqmrR5 a9Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714146450; x=1714751250; 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=2E9JoSWwd8nVZWjHSk8NyMAJBnorcWNH5AMDyGnL6Dw=; b=AHNEut1IjA7xzQ3K8Jv+it+SWd4amrvx3aW0meg2UbpFpYECg1d1Vw9wggydchQYDM DSJtz5N6I+ndFbFG1QEV5hbytSLidpBtfh6Fs90KHjlsQxMoZpzc9to/u5Ow2IWxFi2H pkvdY+3Hk3AMNyO4hKbq0K0IvqH0mm9ZiOc70HhIXsLIrQ0LST2jUJeu1+b2Odc0+ELa ayjMXmT+VipGOAY7hzs2halKbYeKMZPHBGUQ2T0iQMqBNhcwY3EDclnwCZEb+U1lbMh3 cf9SBMCAX9GVM+45aHfN937bGUA5bXfzvZLLtFFcZShV0DTzaR3TyQQdzJMcunSNwZXp +VIA== X-Forwarded-Encrypted: i=1; AJvYcCUGsXP5EhVwJFG9XNL4UwVJDJc6VnrCmsQO2aIGSVpl/lAFqkw8oR7ynPMAOukDv6L9MFdymZz2eq79af0+D5K0+lyVP3YGZuXuLguM X-Gm-Message-State: AOJu0Yw9O0sRXTG2dbMjJtmeCDoPXgGpuUzwAABBeDfNNc82TcPl8dzg OkanMS3KrGKmcWaWtaxhf2/4TmAMHZDPiJv7F2nddZEp162/3X5XMx8NGuAx+3ubaPPT2wSj446 uMA== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a0d:df44:0:b0:615:e53:1c1 with SMTP id i65-20020a0ddf44000000b006150e5301c1mr675860ywe.7.1714146450107; Fri, 26 Apr 2024 08:47:30 -0700 (PDT) Date: Fri, 26 Apr 2024 08:47:28 -0700 In-Reply-To: <7f3001de041334b5c196b5436680473786a21816.camel@intel.com> 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> Message-ID: Subject: Re: [PATCH 0/3] KVM: x86: Fix supported VM_TYPES caps From: Sean Christopherson To: Kai Huang Cc: Xiaoyao Li , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 26, 2024, Kai Huang wrote: > On Thu, 2024-04-25 at 07:30 -0700, Sean Christopherson wrote: > > On Thu, Apr 25, 2024, Xiaoyao Li wrote: > > > On 4/24/2024 12:53 AM, Sean Christopherson wrote: > > > > Fix a goof where KVM fails to re-initialize the set of supported VM= types, > > > > resulting in KVM overreporting the set of supported types when a ve= ndor > > > > module is reloaded with incompatible settings. E.g. unload kvm-int= el.ko, > > > > reload with ept=3D0, and KVM will incorrectly treat SW_PROTECTED_VM= as > > > > supported. > > >=20 > > > Hah, this reminds me of the bug of msrs_to_save[] and etc. > > >=20 > > > 7a5ee6edb42e ("KVM: X86: Fix initialization of MSR lists") > >=20 > > Yeah, and we had the same bug with allow_smaller_maxphyaddr > >=20 > > 88213da23514 ("kvm: x86: disable the narrow guest module parameter on= unload") > >=20 > > If the side effects of linking kvm.ko into kvm-{amd,intel}.ko weren't s= o painful > > for userspace,=C2=A0 > >=20 >=20 > Do we have any real side effects for _userspace_ here? kvm.ko ceasing to exist, and "everything" being tied to the vendor module i= s the big problem. E.g. params from the kernel command line for kvm.??? will bec= ome ineffective, etc. Some of that can be handled in the kernel, e.g. KVM can = create a sysfs symlink so that the accesses through sysfs continue to work, but AF= AIK params don't supporting such aliasing/links. I don't think there are any deal breakers, but I don't expect it to Just Wo= rk either.