[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/28] target-i386: Add support for UMIP and RDPID CP
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 12/28] target-i386: Add support for UMIP and RDPID CPUID bits |
Date: |
Tue, 19 Jul 2016 14:22:40 -0300 |
From: Paolo Bonzini <address@hidden>
These are both stored in CPUID[EAX=7,EBX=0].ECX. KVM is going to
be able to emulate both (albeit with a performance loss in the case
of RDPID, which therefore will be in KVM_GET_EMULATED_CPUID rather
than KVM_GET_SUPPORTED_CPUID).
It's also possible to implement both in TCG, but this is for 2.8.
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
target-i386/cpu.c | 4 ++--
target-i386/cpu.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index a2d7182..91396e8 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -305,12 +305,12 @@ static const char *cpuid_7_0_ebx_feature_name[] = {
};
static const char *cpuid_7_0_ecx_feature_name[] = {
- NULL, NULL, NULL, "pku",
+ NULL, NULL, "umip", "pku",
"ospke", NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
+ NULL, NULL, "rdpid", NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
};
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 7c9eaea..e025814 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -619,8 +619,10 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
#define CPUID_7_0_EBX_AVX512ER (1U << 27) /* AVX-512 Exponential and
Reciprocal */
#define CPUID_7_0_EBX_AVX512CD (1U << 28) /* AVX-512 Conflict Detection */
+#define CPUID_7_0_ECX_UMIP (1U << 2)
#define CPUID_7_0_ECX_PKU (1U << 3)
#define CPUID_7_0_ECX_OSPKE (1U << 4)
+#define CPUID_7_0_ECX_RDPID (1U << 22)
#define CPUID_XSAVE_XSAVEOPT (1U << 0)
#define CPUID_XSAVE_XSAVEC (1U << 1)
--
2.5.5
- [Qemu-devel] [PULL 02/28] target-i386: Allow physical address bits to be set, (continued)
- [Qemu-devel] [PULL 02/28] target-i386: Allow physical address bits to be set, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 03/28] target-i386: Mask mtrr mask based on CPU physical address limits, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 05/28] target-i386: Use uint32_t for X86CPU.apic_id, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 04/28] target-i386: Fill high bits of mtrr mask, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 06/28] pc: Add x86_topo_ids_from_apicid(), Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 07/28] target-i386: Set physical address bits based on host, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 09/28] pc: cpu: Consolidate apic-id validity checks in pc_cpu_pre_plug(), Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 08/28] pc: Extract CPU lookup into a separate function, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 10/28] target-i386: Replace custom apic-id setter/getter with static property, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 11/28] target-i386: Add socket/core/thread properties to X86CPU, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 12/28] target-i386: Add support for UMIP and RDPID CPUID bits,
Eduardo Habkost <=
- [Qemu-devel] [PULL 13/28] target-i386: cpu: Do not ignore error and fix apic parent, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 14/28] target-i386: Fix apic object leak when CPU is deleted, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 15/28] pc: Set APIC ID based on socket/core/thread ids if it's not been set yet, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 17/28] pc: Register created initial and hotpluged CPUs in one place pc_cpu_plug(), Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 16/28] pc: Delay setting number of boot CPUs to machine_done time, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 18/28] pc: Forbid BSP removal, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 19/28] pc: Enforce adding CPUs contiguously and removing them in opposite order, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 20/28] pc: cpu: Allow device_add to be used with x86 cpu, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 21/28] pc: Implement query-hotpluggable-cpus callback, Eduardo Habkost, 2016/07/19
- [Qemu-devel] [PULL 23/28] apic: Drop APICCommonState.idx and use APIC ID as index in local_apics[], Eduardo Habkost, 2016/07/19