All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Expose CLDEMOTE CPU feature to guest VM
@ 2018-05-04  3:55 ` Jingqi Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Jingqi Liu @ 2018-05-03  2:14 UTC (permalink / raw)
  To: kvm
  Cc: pbonzini, rkrcmar, tglx, mingo, hpa, x86, linux-kernel,
	Jingqi Liu, Wei Wang

The CLDEMOTE instruction hints to hardware that the cache line that
contains the linear address should be moved("demoted") from
the cache(s) closest to the processor core to a level more distant
from the processor core. This may accelerate subsequent accesses
to the line by other cores in the same coherence domain,
especially if the line was written by the core that demotes the line.

This patch exposes the cldemote feature to the guest.

The release document ref below link:
https://software.intel.com/sites/default/files/managed/c5/15/\
architecture-instruction-set-extensions-programming-reference.pdf
This patch has a dependency on https://lkml.org/lkml/2018/4/23/928

Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
---
 arch/x86/kvm/cpuid.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 82055b9..72d8c49 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -403,7 +403,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 	const u32 kvm_cpuid_7_0_ecx_x86_features =
 		F(AVX512VBMI) | F(LA57) | F(PKU) | 0 /*OSPKE*/ |
 		F(AVX512_VPOPCNTDQ) | F(UMIP) | F(AVX512_VBMI2) | F(GFNI) |
-		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG);
+		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG) |
+		F(CLDEMOTE);
 
 	/* cpuid 7.0.edx*/
 	const u32 kvm_cpuid_7_0_edx_x86_features =
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] KVM: x86: Expose CLDEMOTE CPU feature to guest VM
@ 2018-05-04  3:55 ` Jingqi Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Jingqi Liu @ 2018-05-04  3:55 UTC (permalink / raw)
  To: kvm
  Cc: pbonzini, rkrcmar, tglx, mingo, hpa, x86, linux-kernel,
	Jingqi Liu, Wei Wang

The CLDEMOTE instruction hints to hardware that the cache line that
contains the linear address should be moved("demoted") from
the cache(s) closest to the processor core to a level more distant
from the processor core. This may accelerate subsequent accesses
to the line by other cores in the same coherence domain,
especially if the line was written by the core that demotes the line.

This patch exposes the cldemote feature to the guest.

The release document ref below link:
https://software.intel.com/sites/default/files/managed/c5/15/\
architecture-instruction-set-extensions-programming-reference.pdf
This patch has a dependency on https://lkml.org/lkml/2018/4/23/928

Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
---
 arch/x86/kvm/cpuid.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 82055b9..72d8c49 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -403,7 +403,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 	const u32 kvm_cpuid_7_0_ecx_x86_features =
 		F(AVX512VBMI) | F(LA57) | F(PKU) | 0 /*OSPKE*/ |
 		F(AVX512_VPOPCNTDQ) | F(UMIP) | F(AVX512_VBMI2) | F(GFNI) |
-		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG);
+		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG) |
+		F(CLDEMOTE);
 
 	/* cpuid 7.0.edx*/
 	const u32 kvm_cpuid_7_0_edx_x86_features =
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] KVM: x86: Expose CLDEMOTE CPU feature to guest VM
  2018-05-04  3:55 ` Jingqi Liu
  (?)
@ 2018-05-07 16:30 ` Paolo Bonzini
  2018-05-08  2:03   ` Liu, Jingqi
  2018-06-12  2:23   ` Liu, Jingqi
  -1 siblings, 2 replies; 7+ messages in thread
From: Paolo Bonzini @ 2018-05-07 16:30 UTC (permalink / raw)
  To: Jingqi Liu, kvm; +Cc: rkrcmar, tglx, mingo, hpa, x86, linux-kernel, Wei Wang

On 04/05/2018 05:55, Jingqi Liu wrote:
> The CLDEMOTE instruction hints to hardware that the cache line that
> contains the linear address should be moved("demoted") from
> the cache(s) closest to the processor core to a level more distant
> from the processor core. This may accelerate subsequent accesses
> to the line by other cores in the same coherence domain,
> especially if the line was written by the core that demotes the line.
> 
> This patch exposes the cldemote feature to the guest.
> 
> The release document ref below link:
> https://software.intel.com/sites/default/files/managed/c5/15/\
> architecture-instruction-set-extensions-programming-reference.pdf
> This patch has a dependency on https://lkml.org/lkml/2018/4/23/928
> 
> Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
> Signed-off-by: Wei Wang <wei.w.wang@intel.com>

Thanks.  Note that the Signed-off-by chain for the patch looks strange,
the submitter should be the last (because it is a chain).

In the meanwhile, Ingo, Thomas, would it be possible to get a topic
branch for that patch ("[PATCH] x86/cpufeatures: Enumerate cldemote
instruction")?

Thanks,

Paolo


> ---
>  arch/x86/kvm/cpuid.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 82055b9..72d8c49 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -403,7 +403,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
>  	const u32 kvm_cpuid_7_0_ecx_x86_features =
>  		F(AVX512VBMI) | F(LA57) | F(PKU) | 0 /*OSPKE*/ |
>  		F(AVX512_VPOPCNTDQ) | F(UMIP) | F(AVX512_VBMI2) | F(GFNI) |
> -		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG);
> +		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG) |
> +		F(CLDEMOTE);
>  
>  	/* cpuid 7.0.edx*/
>  	const u32 kvm_cpuid_7_0_edx_x86_features =
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] KVM: x86: Expose CLDEMOTE CPU feature to guest VM
  2018-05-07 16:30 ` Paolo Bonzini
@ 2018-05-08  2:03   ` Liu, Jingqi
  2018-05-09 11:52     ` Paolo Bonzini
  2018-06-12  2:23   ` Liu, Jingqi
  1 sibling, 1 reply; 7+ messages in thread
From: Liu, Jingqi @ 2018-05-08  2:03 UTC (permalink / raw)
  To: Paolo Bonzini, kvm
  Cc: rkrcmar, tglx, mingo, hpa, x86, linux-kernel, Wang, Wei W

Hi Paolo,
Thanks. 
Will you help to modify the Signed-off-by chain ?
Or do I need to submit the second version after modifying the Signed-off-by chain ?

Thanks,
Jingqi Liu
-----Original Message-----
From: Paolo Bonzini [mailto:pbonzini@redhat.com] 
Sent: Tuesday, May 8, 2018 12:30 AM
To: Liu, Jingqi <jingqi.liu@intel.com>; kvm@vger.kernel.org
Cc: rkrcmar@redhat.com; tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com; x86@kernel.org; linux-kernel@vger.kernel.org; Wang, Wei W <wei.w.wang@intel.com>
Subject: Re: [PATCH] KVM: x86: Expose CLDEMOTE CPU feature to guest VM

On 04/05/2018 05:55, Jingqi Liu wrote:
> The CLDEMOTE instruction hints to hardware that the cache line that 
> contains the linear address should be moved("demoted") from the 
> cache(s) closest to the processor core to a level more distant from 
> the processor core. This may accelerate subsequent accesses to the 
> line by other cores in the same coherence domain, especially if the 
> line was written by the core that demotes the line.
> 
> This patch exposes the cldemote feature to the guest.
> 
> The release document ref below link:
> https://software.intel.com/sites/default/files/managed/c5/15/\
> architecture-instruction-set-extensions-programming-reference.pdf
> This patch has a dependency on https://lkml.org/lkml/2018/4/23/928
> 
> Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
> Signed-off-by: Wei Wang <wei.w.wang@intel.com>

Thanks.  Note that the Signed-off-by chain for the patch looks strange, the submitter should be the last (because it is a chain).

In the meanwhile, Ingo, Thomas, would it be possible to get a topic branch for that patch ("[PATCH] x86/cpufeatures: Enumerate cldemote instruction")?

Thanks,

Paolo


> ---
>  arch/x86/kvm/cpuid.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 
> 82055b9..72d8c49 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -403,7 +403,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
>  	const u32 kvm_cpuid_7_0_ecx_x86_features =
>  		F(AVX512VBMI) | F(LA57) | F(PKU) | 0 /*OSPKE*/ |
>  		F(AVX512_VPOPCNTDQ) | F(UMIP) | F(AVX512_VBMI2) | F(GFNI) |
> -		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG);
> +		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG) |
> +		F(CLDEMOTE);
>  
>  	/* cpuid 7.0.edx*/
>  	const u32 kvm_cpuid_7_0_edx_x86_features =
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] KVM: x86: Expose CLDEMOTE CPU feature to guest VM
  2018-05-08  2:03   ` Liu, Jingqi
@ 2018-05-09 11:52     ` Paolo Bonzini
  2018-05-09 15:47       ` Wang, Wei W
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2018-05-09 11:52 UTC (permalink / raw)
  To: Liu, Jingqi, kvm
  Cc: rkrcmar, tglx, mingo, hpa, x86, linux-kernel, Wang, Wei W

On 08/05/2018 04:03, Liu, Jingqi wrote:
> Hi Paolo,
> Thanks. 
> Will you help to modify the Signed-off-by chain ?
> Or do I need to submit the second version after modifying the Signed-off-by chain ?

Can you explain your role and Wei Wang's in the development of the patch?

Thanks,

Paolo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] KVM: x86: Expose CLDEMOTE CPU feature to guest VM
  2018-05-09 11:52     ` Paolo Bonzini
@ 2018-05-09 15:47       ` Wang, Wei W
  0 siblings, 0 replies; 7+ messages in thread
From: Wang, Wei W @ 2018-05-09 15:47 UTC (permalink / raw)
  To: Paolo Bonzini, Liu, Jingqi, kvm
  Cc: rkrcmar, tglx, mingo, hpa, x86, linux-kernel

On Wednesday, May 9, 2018 7:52 PM, Paolo Bonzini wrote:
> On 08/05/2018 04:03, Liu, Jingqi wrote:
> > Hi Paolo,
> > Thanks.
> > Will you help to modify the Signed-off-by chain ?
> > Or do I need to submit the second version after modifying the Signed-off-
> by chain ?
> 
> Can you explain your role and Wei Wang's in the development of the patch?
> 

Hi Paolo,

Thanks for reviewing our patches.
Jingqi is the owner of the patches, I'm just an assistant. You could adjust the order or change mine to reviewed-by.

Best,
Wei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] KVM: x86: Expose CLDEMOTE CPU feature to guest VM
  2018-05-07 16:30 ` Paolo Bonzini
  2018-05-08  2:03   ` Liu, Jingqi
@ 2018-06-12  2:23   ` Liu, Jingqi
  1 sibling, 0 replies; 7+ messages in thread
From: Liu, Jingqi @ 2018-06-12  2:23 UTC (permalink / raw)
  To: mingo, tglx, Paolo Bonzini
  Cc: rkrcmar, hpa, x86, linux-kernel, kvm, Wang, Wei W

On 5/8/2018 12:30 AM, Paolo Bonzini wrote:

> 
> On 04/05/2018 05:55, Jingqi Liu wrote:
> > The CLDEMOTE instruction hints to hardware that the cache line that
> > contains the linear address should be moved("demoted") from the
> > cache(s) closest to the processor core to a level more distant from
> > the processor core. This may accelerate subsequent accesses to the
> > line by other cores in the same coherence domain, especially if the
> > line was written by the core that demotes the line.
> >
> > This patch exposes the cldemote feature to the guest.
> >
> > The release document ref below link:
> > https://software.intel.com/sites/default/files/managed/c5/15/\
> > architecture-instruction-set-extensions-programming-reference.pdf
> > This patch has a dependency on https://lkml.org/lkml/2018/4/23/928
> >
> > Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
> > Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> 
> Thanks.  Note that the Signed-off-by chain for the patch looks strange, the
> submitter should be the last (because it is a chain).
> 
> In the meanwhile, Ingo, Thomas, would it be possible to get a topic branch for
> that patch ("[PATCH] x86/cpufeatures: Enumerate cldemote instruction")?
> 

I had re-sent the patch: https://lkml.org/lkml/2018/5/21/91

Hi Ingo, Thomas,
Would it be possible to get a topic branch for that patch ("[PATCH] x86/cpufeatures: Enumerate cldemote instruction")?

Hi Paolo,
Could you help to review this patch ?

Thanks
Jingqi

> Thanks,
> 
> Paolo
> 
> 
> > ---
> >  arch/x86/kvm/cpuid.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index
> > 82055b9..72d8c49 100644
> > --- a/arch/x86/kvm/cpuid.c
> > +++ b/arch/x86/kvm/cpuid.c
> > @@ -403,7 +403,8 @@ static inline int __do_cpuid_ent(struct
> kvm_cpuid_entry2 *entry, u32 function,
> >  	const u32 kvm_cpuid_7_0_ecx_x86_features =
> >  		F(AVX512VBMI) | F(LA57) | F(PKU) | 0 /*OSPKE*/ |
> >  		F(AVX512_VPOPCNTDQ) | F(UMIP) | F(AVX512_VBMI2) | F(GFNI)
> |
> > -		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) |
> F(AVX512_BITALG);
> > +		F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) |
> F(AVX512_BITALG) |
> > +		F(CLDEMOTE);
> >
> >  	/* cpuid 7.0.edx*/
> >  	const u32 kvm_cpuid_7_0_edx_x86_features =
> >


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-06-12  2:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03  2:14 [PATCH] KVM: x86: Expose CLDEMOTE CPU feature to guest VM Jingqi Liu
2018-05-04  3:55 ` Jingqi Liu
2018-05-07 16:30 ` Paolo Bonzini
2018-05-08  2:03   ` Liu, Jingqi
2018-05-09 11:52     ` Paolo Bonzini
2018-05-09 15:47       ` Wang, Wei W
2018-06-12  2:23   ` Liu, Jingqi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.