From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.15 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796307784; b=qXE8p4M741iahTSy4FKr2D+Fx+Y3kQ1j2DfoZzLJ6Jx9+ESsZfT1+THC6At01thaPzXq RdQV0Hz20AltvkDlBK5ogmQMLD0fqtr7pifjoe5iZmV/C+/f5GieIIO+DHntVpli+9D90 VFWt0lN52x4WHtif0NS5A017OpN+5VJI7quQYIKGf7YF651zXXfTnmBlUSbEu7ApYEPtI r1A3y3jNdWikJHoSRwSZqx4/YrawJWLVOSQWOYZRUlunAjuSvMYVgjma/cXLUlauNyusX rsq3o7m2rWqZV5GU493QrrxJAQNZ4RRiwCHOoby9rIuh65+UrF5REZdeptWisLSPrqA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796307784; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language: From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=1D5cpPxWjEtXJR6KoFQqJhlpn6v7oHoK6g18yWMQfcs=; b=m+J7MqyjA+4ufdZEgjg6M321qp1H9ROoMP1AqKeZbAsnT/9WvO58j/vOu7I7AIfP+QwM t9axXqIF4RRA5ObG351AetOnDmWIqlTBvwdVEfQHTFtiajEXzY81olfch0TnR26wD3OCs +tufdhCsHpHRVOhQyuUVfikbBOsn5SDpiE7AiZ53yT32Rkv/IvZ9cOV/SZMZomvnDDiuT K3/kOGG6Udnd13oIM0wcKzpIbHp/YkCt/VBQjfgAwKmOWlj7TVgLVJO9v3lrdSOqDsR6T h89SBeIzP+2kGVyQZoe60a4Jkc7uEMN5Oii7KvBoJ4pFuijaNm9x7pRHnEQSIZSC/zQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=nXYOb2YK; arc=none smtp.remote-ip=198.175.65.15 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A56F606A681; Thu, 3 Dec 2026 14:23:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7A56F606A681 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=nXYOb2YK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796307784; x=1827843784; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=1D5cpPxWjEtXJR6KoFQqJhlpn6v7oHoK6g18yWMQfcs=; b=nXYOb2YKRW38ZYuJMd8ASN7MkAqFr5Q6QC/suRhA62i5KI7JLVbDSeMp OAuV94TiZly4qYPpHPKoH5WrC6JDYfWJk34YH76yU1ObP04dIVZJ/wNbt BsKXab2ZHzY6TuikQmdoLIFKmtjNGJ19zuj6Z/J6prYeHx4s9P0AUIW4e pY0Jriob++/mrae6RXXTO1qu0GH6cMF7LVGXnzMW2vlTl0GocGhDwY7mc 87W448y2NyS20YSIdG3Ub10PqbQRUy2Ptywq6bA42a+MrROfotvLV78Ys QWZWnAmUEm0l7mm3TnxbH9UuQgi4/C7/QYSTpWpUmvXI7Z22ilEp0CfkM w==; X-CSE-ConnectionGUID: NeAtggQfQ92r+zMl0tlMYg== X-CSE-MsgGUID: fOO2vB90Tsi2UMV6sxBKHw== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5264621" X-IronPort-AV: E=Sophos;i="6.29,248,1794902400"; d="scan'208";a="5264621" Received: from fmviesa011.fm.intel.com ([10.60.135.151]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 06:23:03 -0800 X-CSE-ConnectionGUID: lQkAe+RIQYq7sdubClFvFA== X-CSE-MsgGUID: k1RQtYSGTxqSccS8IpYKpA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,248,1794902400"; d="scan'208";a="15576434" Received: from dliang1-mobl.ccr.corp.intel.com (HELO [10.124.240.160]) ([10.124.240.160]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 06:22:59 -0800 Message-ID: Date: Thu, 3 Dec 2026 22:22:47 +0800 X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/3] KVM: VMX: Treat partial support of an entry/exit pair as inconsistent To: Sohil Mehta Cc: kvm@vger.kernel.org, Paolo Bonzini , Sean Christopherson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Xin Li , Shivansh Dhiman , David Woodhouse , Chao Gao , "Chang S . Bae" , Zhao Liu , x86@kernel.org, linux-kernel@vger.kernel.org References: <20261203065149.2952509-1-sohil.mehta@intel.com> <20261203065149.2952509-3-sohil.mehta@intel.com> Content-Language: en-US From: Binbin Wu In-Reply-To: <20261203065149.2952509-3-sohil.mehta@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/3/2026 2:51 PM, Sohil Mehta wrote: > Make the VM-entry/VM-exit pair check require all of a pair's controls to > be supported, or none of them. The existing pairs are unaffected. > > Currently, the check only requires one of a pair's exit controls to be > supported along with the entry control. That is fine while every pair > has a single exit control. > > However, a feature can have multiple exit controls paired with a single > entry control. For example, PAT and EFER each have two exit controls, > but KVM doesn't use their save controls. In future, FRED will use both: > its state is loaded on VM-entry, and both saved and restored on VM-exit. Nit: I feel this sentence is a bit loose. If there is a new version,  how about: In the future, FRED will use both exit controls: VM-entry loads the guest FRED state, and VM-exit saves the guest state and loads the host state. > > If hardware supports only one of those exit controls, the existing check > passes and the feature would be enabled with part of its state left > unswitched. Check the entry side the same way, which also covers a pair > with several entry controls, although no such pair exists today. > > Signed-off-by: Sohil Mehta Reviewed-by: Binbin Wu