All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: pbonzini@redhat.com,
	Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [PATCH] target-i386: enable cflushopt/clwb/pcommit instructions
Date: Thu, 5 Nov 2015 08:51:24 +0100	[thread overview]
Message-ID: <563B0A7C.2000402@twiddle.net> (raw)
In-Reply-To: <20151104193533.GK4180@thinpad.lan.raisama.net>

On 11/04/2015 08:35 PM, Eduardo Habkost wrote:
> On Fri, Oct 30, 2015 at 01:54:33PM -0700, Richard Henderson wrote:
>> On 10/29/2015 12:31 AM, Xiao Guangrong wrote:
>>> These instructions are used by NVDIMM drivers and the specification
>>> locates at:
>>> https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf
>>>
>>> There instructions are available on Skylake Server
>>>
>>> Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
>>> ---
>>>   target-i386/cpu.c | 8 +++++---
>>>   target-i386/cpu.h | 3 +++
>>>   2 files changed, 8 insertions(+), 3 deletions(-)
>>
>> Reviewed-by: Richard Henderson <rth@twiddle.net>
>>
>> Although it would be nice to update the comments in translate.c to include the
>> new insns, since they overlap mfence and sfence.  At present we only check for
>> SSE enabled when accepting these; I suppose it's easiest to consider it invalid
>> to specify +clwb,-sse?
>
> I assume you want to add the extra SSE requirement to TCG code, not to
> generic x86 code, then I have no objections.

I don't really want to add any requirement, just point and laugh at anyone who 
reports an bug for the above condition.

> But in the case of clwb (/6 with a memory operand, modrm != 0xc0), we
> are not just requiring SSE2: we are rejecting the instruction unless
> modrm == 0xc0. That means TCG is rejecting the clwb instruction, so I
> believe we shouldn't add CLWB to TCG_7_0_EBX_FEATURES yet.

Hmm, yes.

I've cleaned up some of this code on a branch, but it didn't get enough testing 
or review this cycle, so it's going to wait for the next.  I see you've posted 
a patch for this, which should be good enough until then.


r~

WARNING: multiple messages have this Message-ID (diff)
From: Richard Henderson <rth@twiddle.net>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: pbonzini@redhat.com,
	Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH] target-i386: enable cflushopt/clwb/pcommit instructions
Date: Thu, 5 Nov 2015 08:51:24 +0100	[thread overview]
Message-ID: <563B0A7C.2000402@twiddle.net> (raw)
In-Reply-To: <20151104193533.GK4180@thinpad.lan.raisama.net>

On 11/04/2015 08:35 PM, Eduardo Habkost wrote:
> On Fri, Oct 30, 2015 at 01:54:33PM -0700, Richard Henderson wrote:
>> On 10/29/2015 12:31 AM, Xiao Guangrong wrote:
>>> These instructions are used by NVDIMM drivers and the specification
>>> locates at:
>>> https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf
>>>
>>> There instructions are available on Skylake Server
>>>
>>> Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
>>> ---
>>>   target-i386/cpu.c | 8 +++++---
>>>   target-i386/cpu.h | 3 +++
>>>   2 files changed, 8 insertions(+), 3 deletions(-)
>>
>> Reviewed-by: Richard Henderson <rth@twiddle.net>
>>
>> Although it would be nice to update the comments in translate.c to include the
>> new insns, since they overlap mfence and sfence.  At present we only check for
>> SSE enabled when accepting these; I suppose it's easiest to consider it invalid
>> to specify +clwb,-sse?
>
> I assume you want to add the extra SSE requirement to TCG code, not to
> generic x86 code, then I have no objections.

I don't really want to add any requirement, just point and laugh at anyone who 
reports an bug for the above condition.

> But in the case of clwb (/6 with a memory operand, modrm != 0xc0), we
> are not just requiring SSE2: we are rejecting the instruction unless
> modrm == 0xc0. That means TCG is rejecting the clwb instruction, so I
> believe we shouldn't add CLWB to TCG_7_0_EBX_FEATURES yet.

Hmm, yes.

I've cleaned up some of this code on a branch, but it didn't get enough testing 
or review this cycle, so it's going to wait for the next.  I see you've posted 
a patch for this, which should be good enough until then.


r~

  reply	other threads:[~2015-11-05  7:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29  7:31 [PATCH] target-i386: enable cflushopt/clwb/pcommit instructions Xiao Guangrong
2015-10-29  7:31 ` [Qemu-devel] " Xiao Guangrong
2015-10-30 20:54 ` Richard Henderson
2015-11-04 19:35   ` Eduardo Habkost
2015-11-04 19:35     ` Eduardo Habkost
2015-11-05  7:51     ` Richard Henderson [this message]
2015-11-05  7:51       ` Richard Henderson
2015-11-05 16:36       ` Eduardo Habkost
  -- strict thread matches above, loose matches on Subject: below --
2015-08-21  5:05 Xiao Guangrong
2015-08-21 16:05 ` Eduardo Habkost
2015-08-26 10:51   ` Xiao Guangrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=563B0A7C.2000402@twiddle.net \
    --to=rth@twiddle.net \
    --cc=ehabkost@redhat.com \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.