From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang Subject: Re: [PATCH RFC] x86/kvm: expose the CPUID of SPEC_CTRL and STIBP to guests Date: Tue, 09 Jan 2018 17:15:03 +0800 Message-ID: <5A548817.2040100@intel.com> References: <1515479117-44967-1-git-send-email-wei.w.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: jmattson@google.com, liran.alon@oracle.com To: Paolo Bonzini , kvm@vger.kernel.org Return-path: Received: from mga14.intel.com ([192.55.52.115]:41539 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751032AbeAIJMm (ORCPT ); Tue, 9 Jan 2018 04:12:42 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 01/09/2018 04:39 PM, Paolo Bonzini wrote: > On 09/01/2018 07:25, Wei Wang wrote: >> This patch shows an alternative approach to the one posted here: >> https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1580364.html >> >> The advantages are >> 1) Simpler; >> 2) More reasonable because this is used to fill the hardware security >> hole, for all the x86 cpus that physically support the two CPUIDs, >> which means the hole already exists physically. All the VMs should >> use this feature no matter what CPU model they are using. So, exposing >> the two CPUIDs as long as they are physically supported by the hardware, >> and this doesn't require the QEMU side hardcode as usual. >> >> When the related feature bits are added to the kernel, and we can simply >> change it to: >> best->edx |= F(SPEC_CTRL) | F(PRED_CMD); > Is this meant to replace the whole series or just patch 1/7? The > functions in patch 1/7 are used later by vmx.c and svm.c. > The pointer should have pointed to 7/7 (not 1/7). Just patch 7/7 actually. Best, Wei