linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: vkoul@kernel.org, tglx@linutronix.de, mingo@redhat.com,
	bp@alien8.de, hpa@zytor.com, bhelgaas@google.com,
	gregkh@linuxfoundation.org, arnd@arndb.de
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, dan.j.williams@intel.com, ashok.raj@intel.com,
	fenghua.yu@intel.com, tony.luck@intel.com, jing.lin@intel.com,
	sanjay.k.kumar@intel.com, dave.hansen@intel.com
Subject: [PATCH v2 1/9] x86/cpufeatures: Enumerate ENQCMD and ENQCMDS instructions
Date: Mon, 18 May 2020 11:53:26 -0700	[thread overview]
Message-ID: <158982800677.37989.4568229540286901733.stgit@djiang5-desk3.ch.intel.com> (raw)
In-Reply-To: <158982749959.37989.2096629611303670415.stgit@djiang5-desk3.ch.intel.com>

From: Fenghua Yu <fenghua.yu@intel.com>

A user space application can execute ENQCMD instruction to submit work
to device. The kernel executes ENQCMDS instruction to submit work to
device.

There is a lot of other enabling needed for the instructions to actually
be usable in user space and the kernel, and that enabling is coming later
in the series and in device drivers.

The CPU feature flag is shown as "enqcmd" in /proc/cpuinfo.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
---
 arch/x86/include/asm/cpufeatures.h |    1 +
 arch/x86/kernel/cpu/cpuid-deps.c   |    1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index 2c95a3efc2d9..8fc5a71b1e29 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -352,6 +352,7 @@
 #define X86_FEATURE_CLDEMOTE		(16*32+25) /* CLDEMOTE instruction */
 #define X86_FEATURE_MOVDIRI		(16*32+27) /* MOVDIRI instruction */
 #define X86_FEATURE_MOVDIR64B		(16*32+28) /* MOVDIR64B instruction */
+#define X86_FEATURE_ENQCMD		(16*32+29) /* ENQCMD and ENQCMDS instructions */
 
 /* AMD-defined CPU features, CPUID level 0x80000007 (EBX), word 17 */
 #define X86_FEATURE_OVERFLOW_RECOV	(17*32+ 0) /* MCA overflow recovery support */
diff --git a/arch/x86/kernel/cpu/cpuid-deps.c b/arch/x86/kernel/cpu/cpuid-deps.c
index fec83cc74b9e..81d26dc51d44 100644
--- a/arch/x86/kernel/cpu/cpuid-deps.c
+++ b/arch/x86/kernel/cpu/cpuid-deps.c
@@ -71,6 +71,7 @@ static const struct cpuid_dep cpuid_deps[] = {
 	{ X86_FEATURE_AVX512_BF16,		X86_FEATURE_AVX512VL  },
 	{ X86_FEATURE_SHSTK,			X86_FEATURE_XSAVES    },
 	{ X86_FEATURE_IBT,			X86_FEATURE_XSAVES    },
+	{ X86_FEATURE_ENQCMD,			X86_FEATURE_XSAVES    },
 	{}
 };
 


  reply	other threads:[~2020-05-18 18:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 18:53 [PATCH v2 0/9] Add shared workqueue support for idxd driver Dave Jiang
2020-05-18 18:53 ` Dave Jiang [this message]
2020-05-18 18:53 ` [PATCH v2 2/9] x86/asm: move the raw asm in iosubmit_cmds512() to special_insns.h Dave Jiang
2020-05-18 18:53 ` [PATCH v2 3/9] x86/asm: add enqcmds() to support ENQCMDS instruction Dave Jiang
2020-05-18 18:53 ` [PATCH v2 4/9] dmaengine: idxd: add work queue drain support Dave Jiang
2020-05-18 18:53 ` [PATCH v2 5/9] dmaengine: idxd: move submission to sbitmap_queue Dave Jiang
2020-05-18 18:53 ` [PATCH v2 6/9] dmaengine: idxd: add shared workqueue support Dave Jiang
2020-05-18 18:54 ` [PATCH v2 7/9] dmaengine: idxd: clean up descriptors with fault error Dave Jiang
2020-05-18 18:54 ` [PATCH v2 8/9] dmaengine: idxd: add leading / for sysfspath in ABI documentation Dave Jiang
2020-05-18 18:54 ` [PATCH v2 9/9] dmaengine: idxd: add ABI documentation for shared wq Dave Jiang
2020-06-01 22:09 ` [PATCH v2 0/9] Add shared workqueue support for idxd driver Dave Jiang
2020-06-03  6:33   ` Vinod Koul
2020-06-03 15:30     ` Dave Jiang

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=158982800677.37989.4568229540286901733.stgit@djiang5-desk3.ch.intel.com \
    --to=dave.jiang@intel.com \
    --cc=arnd@arndb.de \
    --cc=ashok.raj@intel.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=fenghua.yu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jing.lin@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sanjay.k.kumar@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vkoul@kernel.org \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).