mbox series

[v2,0/2] KVM: x86: expose direct stores instructions into VM.

Message ID 1541483728-7826-1-git-send-email-jingqi.liu@intel.com (mailing list archive)
Headers show
Series KVM: x86: expose direct stores instructions into VM. | expand

Message

Liu, Jingqi Nov. 6, 2018, 5:55 a.m. UTC
Direct stores instructions MOVDIRI and MOVDIR64B will be available in
Tremont and other future x86 processors,
and need to be exposed to guest VM.

The release document ref below link:
https://software.intel.com/sites/default/files/managed/c5/15/\
architecture-instruction-set-extensions-programming-reference.pdf

This series expose movdiri and movdir64b features to guest VM.

Changelog:
v2:
	Separated from the series https://lkml.org/lkml/2018/7/10/160
	since umonitor/umwait/tpause instructions patches are not ready yet.
v1:
	Sent out with umonitor/umwait/tpause instructions patches.

Liu Jingqi (2):
  KVM: x86: expose MOVDIRI CPU feature into VM.
  KVM: x86: expose MOVDIR64B CPU feature into VM.

 arch/x86/kvm/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Hildenbrand Nov. 29, 2018, 10:13 a.m. UTC | #1
On 06.11.18 06:55, Liu Jingqi wrote:
> Direct stores instructions MOVDIRI and MOVDIR64B will be available in
> Tremont and other future x86 processors,
> and need to be exposed to guest VM.
> 
> The release document ref below link:
> https://software.intel.com/sites/default/files/managed/c5/15/\
> architecture-instruction-set-extensions-programming-reference.pdf
> 
> This series expose movdiri and movdir64b features to guest VM.
> 
> Changelog:
> v2:
> 	Separated from the series https://lkml.org/lkml/2018/7/10/160
> 	since umonitor/umwait/tpause instructions patches are not ready yet.
> v1:
> 	Sent out with umonitor/umwait/tpause instructions patches.
> 
> Liu Jingqi (2):
>   KVM: x86: expose MOVDIRI CPU feature into VM.
>   KVM: x86: expose MOVDIR64B CPU feature into VM.
> 
>  arch/x86/kvm/cpuid.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Does it make sense to squash both patches? (into a patch named just like
this cover letter? :) )
Eric Northup Nov. 30, 2018, 8:41 p.m. UTC | #2
On Mon, Nov 5, 2018 at 10:01 PM Liu Jingqi <jingqi.liu@intel.com> wrote:
>
> Direct stores instructions MOVDIRI and MOVDIR64B will be available in
> Tremont and other future x86 processors,
> and need to be exposed to guest VM.

It seems like KVM's emulator should be able to complete these
instructions to emulated MMIO before exposing CPUID to guests in any
default or supported configurations.

It'll be much simpler for usermode to implement that property if the
KVM-reported supported CPUID table doesn't get updated before the KVM
emulator does.

-Eric
Paolo Bonzini Jan. 30, 2019, 5:15 p.m. UTC | #3
On 30/11/18 21:41, Eric Northup wrote:
> On Mon, Nov 5, 2018 at 10:01 PM Liu Jingqi <jingqi.liu@intel.com> wrote:
>>
>> Direct stores instructions MOVDIRI and MOVDIR64B will be available in
>> Tremont and other future x86 processors,
>> and need to be exposed to guest VM.
> 
> It seems like KVM's emulator should be able to complete these
> instructions to emulated MMIO before exposing CPUID to guests in any
> default or supported configurations.
> 
> It'll be much simpler for usermode to implement that property if the
> KVM-reported supported CPUID table doesn't get updated before the KVM
> emulator does.

We already do not support emulation for many CPUID bits we expose (AVX
and AVX512 above all), so that's not a huge problem.

I suppose these instructions are unlikely to be used on MMIO areas such
as legacy VGA VRAM.

Paolo
Paolo Bonzini Jan. 30, 2019, 5:16 p.m. UTC | #4
On 06/11/18 06:55, Liu Jingqi wrote:
> Direct stores instructions MOVDIRI and MOVDIR64B will be available in
> Tremont and other future x86 processors,
> and need to be exposed to guest VM.
> 
> The release document ref below link:
> https://software.intel.com/sites/default/files/managed/c5/15/\
> architecture-instruction-set-extensions-programming-reference.pdf
> 
> This series expose movdiri and movdir64b features to guest VM.
> 
> Changelog:
> v2:
> 	Separated from the series https://lkml.org/lkml/2018/7/10/160
> 	since umonitor/umwait/tpause instructions patches are not ready yet.
> v1:
> 	Sent out with umonitor/umwait/tpause instructions patches.
> 
> Liu Jingqi (2):
>   KVM: x86: expose MOVDIRI CPU feature into VM.
>   KVM: x86: expose MOVDIR64B CPU feature into VM.
> 
>  arch/x86/kvm/cpuid.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Queued, thanks.

Paolo