Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp552651lqo; Fri, 10 May 2024 07:50:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVLLQnmqiMLrMzFADmS7wKZRI1rvO6yx7MvHI9lBriYMR0D3nKwgHkKMG0pv3MHEl9h4vi2D9Em+hKlbOskpOruPi7LxSNIe3iGEaQHjQ== X-Google-Smtp-Source: AGHT+IGtMIqjja36hmEsl6KKbib0C/ZL0vrKu1wxlGfWkfO4tgRSK1b5ZgIxykaFHZ1zvtDHcQP0 X-Received: by 2002:a05:6512:149:b0:51d:4c8a:bbdb with SMTP id 2adb3069b0e04-5220fc7d133mr2341101e87.3.1715352653529; Fri, 10 May 2024 07:50:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715352653; cv=pass; d=google.com; s=arc-20160816; b=HSpMh7QYEff/bZ+8p/B41YlGkqlnW/jZgqlLHIaglppemPPPlhd6hh3BgrQROPU9xc OsL69RbLdiFUtV1/udiNRWI2NEIuDiHVXcSgLMitsNcilq3Nc30N5xOfAjg/JI5aX5ZY iTsrL8fXmnS2+RnPVn2EjkFmgkyLgiYXTsGn7DaynUZ+oztXi7H0UixFY8bKwi2UtMj6 hAWATze5GclP2H/t91O2rbS7v/+j89Z+OmlGIIqGYtzcDJNO8pdyowIs4+58VMX6gGx2 TqylQ2RE32cHZtlG5XaCQPq8KgtpNmx+r6IIYgMeOeq7eNvVM98FINhRfau/1q2eQnzu xfGw== 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=1J0ZSCx1DHXXQYVs6q7rCMNMDZdThCHrefX2O/j3bYQ=; fh=SsU4v9CKFbyMO4FE8pmijTEVcSNTyNmZ0kOINuggvT0=; b=hU897fLeT4fd9dBAYPON0CB+Pb6uks77TK9TAfTB0phnUb1x9M/yj2V81B26HnK2zj /TAe+NgybpSOPntb4csmkNqDvWsfwkssKEzq0B1s1nfwuGbVrZs8dqkJFa3YJpbAOwng UPKr8rFktuk0oFaitx1uU9b4Ki46FxL7S157hZGZ3zXJHMpnNT5AhDdX7QT9A+OCZ06o GbyZ2B3NeeCtROqeGlZ9iYxrRwS+ZX5cGDa/4owUyEHs0j3UnqrITgf6b/KebS5d3abT PojB8ExHkoKzyVeZD7cGh0N7hF3kKKu5OS5QfxhqFezAc4TY4Hsd/6xi8IA4QzpHJuas ioXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XHMYKaIs; 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-175919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175919-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 a640c23a62f3a-a5a17c2bbd1si218958166b.912.2024.05.10.07.50.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175919-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=XHMYKaIs; 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-175919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175919-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 407741F25776 for ; Fri, 10 May 2024 14:50:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB9A617109C; Fri, 10 May 2024 14:50:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XHMYKaIs" 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 917A11708B1 for ; Fri, 10 May 2024 14:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715352642; cv=none; b=ThE/7u3T6pXD862yCsfq2KcYlY0GNAG6Hf/yodKEPlcJWUBs9ziXwwYOPz51VBlXlD6NN1s0Qiu1A+7ceB/8PoA1dZX5mApri+L1YwBbPsa9xz2vlaAlGSU5dURtIi6myC5yyxqhP/RHhIqefZaj6+G+ghdOFvNZ/q6Rbbue8U8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715352642; c=relaxed/simple; bh=6UpJsf7UyarweIVesoXQ1oPyfYbgvJZxUcn5M1EZCWw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=RLbvOp0M5WKeF6031Rd6bB9U9DZiZWvZfaBnC/IRP3knx0TORhMXcfXZc08utEbOCB9OueJesTez/XX4jCz0GQ3bzUrIijxhbLqvGWxx1TlWYSG+FZcOLU8AQcHroEvk7hsb6Tg2RVV4DlzNWUGyLNdpUDTXjGgzF9UivX+eRK8= 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=XHMYKaIs; arc=none smtp.client-ip=170.10.129.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=1715352639; 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=1J0ZSCx1DHXXQYVs6q7rCMNMDZdThCHrefX2O/j3bYQ=; b=XHMYKaIsEUcYykOKAiiepbut2ou2JvjcCu96QmQN4W2xXE6UY7qbBh6F6Weq5exEUXqEmU reTmsqe9S2fXMBtYJGpUR+HcVdv7BDO/huqdc19lAhgwHxDnAs6u3bcO+Q83sY+iMhqpZ5 FGydOVoyC4MVdQmwftXw79vGqdiQZSE= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-689-JQupMPdENVK2MwVIfN8C9w-1; Fri, 10 May 2024 10:50:38 -0400 X-MC-Unique: JQupMPdENVK2MwVIfN8C9w-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-34eb54c888cso1645141f8f.3 for ; Fri, 10 May 2024 07:50:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715352637; x=1715957437; 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=1J0ZSCx1DHXXQYVs6q7rCMNMDZdThCHrefX2O/j3bYQ=; b=qFodmqGKONYAYtr9/kMnw23dzr7u/uHXXL6z/dkx67yKKQcWH7fpuyEV+KtGbcqii2 CvVQnkYIYmFjQOCpDJU09VXVskVXg1W9MvjWzHWj9lGiJtazxM/95M43daVbhAjzPhuq Q2beCWusmxFNY9gren/VrfvO7rb5QBzQznZ4/0kBSTczdbAkmzJy3aCp7D0SyS/9phb1 Vuftr2wKkHoSh3YlPiWqft7/udEWzXbt1DduwNUWfLibcESBiG8CoGpyBVZipy1Nkyh1 Q0t0cpVq+mHjK0BKS0v2vffbdzEOk5GDNVq4ZpMALI4Iul6DrmhCtM5dqsbOUQDpDaTP 6luQ== X-Forwarded-Encrypted: i=1; AJvYcCUkDQBnQK6t/u+ZfPDy/sSm7W/IXqDzStAQwk4sTWHLcnNpG3VIoa5EEpzQ2NFk6LUaMJTiRH1/05KpujEc+aC/Zt2MpIyw/eKo+eDg X-Gm-Message-State: AOJu0YwgeEmq67vsRk5TCMIFlcCtnQAeGgtG2GEewBGW0UC0c66rQcE+ Eh/FHase31tfaZUld7BUNS/2iu/ALU0Q1L9jA8zWK+Rmdq7JEiAedvWIWK5s6vt0TabHR8LX/a+ 40402BDvxjNmmtM4m7YBaY+l0oP3t/yWq55PVA9B5imeXYBxwfSBpR5YrHVwSrqblSfXhENMWlh Ms4BKSiijOOkJ21kekEYU1uoqNICgLb0+sdS0d X-Received: by 2002:a5d:4112:0:b0:34c:4d98:d6f7 with SMTP id ffacd0b85a97d-3504a73780fmr2559551f8f.26.1715352637037; Fri, 10 May 2024 07:50:37 -0700 (PDT) X-Received: by 2002:a5d:4112:0:b0:34c:4d98:d6f7 with SMTP id ffacd0b85a97d-3504a73780fmr2559538f8f.26.1715352636706; Fri, 10 May 2024 07:50:36 -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> In-Reply-To: <20240423165328.2853870-1-seanjc@google.com> From: Paolo Bonzini Date: Fri, 10 May 2024 16:50:24 +0200 Message-ID: Subject: Re: [PATCH 0/3] KVM: x86: Fix supported VM_TYPES caps To: Sean Christopherson Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 23, 2024 at 6:53=E2=80=AFPM 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 vendor > module is reloaded with incompatible settings. E.g. unload kvm-intel.ko, > reload with ept=3D0, and KVM will incorrectly treat SW_PROTECTED_VM as > supported. > > Fix a similar long-standing bug with supported_mce_cap that is much less > benign, and then harden against us making the same mistake in the future. > > Sean Christopherson (3): > KVM: x86: Fully re-initialize supported_vm_types on vendor module load > KVM: x86: Fully re-initialize supported_mce_cap on vendor module load > KVM: x86: Explicitly zero kvm_caps during vendor module load Applied, thanks. Paolo