Commit b6a0ff03 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

x86: move CR0 and CR4 constants to processor.h



Move them together with the inline function that read/write the
control registers.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 69d8fe0e
......@@ -14,6 +14,20 @@
# define S "4"
#endif
#define X86_CR0_PE 0x00000001
#define X86_CR0_MP 0x00000002
#define X86_CR0_TS 0x00000008
#define X86_CR0_WP 0x00010000
#define X86_CR0_PG 0x80000000
#define X86_CR4_VMXE 0x00000001
#define X86_CR4_TSD 0x00000004
#define X86_CR4_DE 0x00000008
#define X86_CR4_PSE 0x00000010
#define X86_CR4_PAE 0x00000020
#define X86_CR4_PCIDE 0x00020000
#define X86_IA32_EFER 0xc0000080
#define X86_EFER_LMA (1UL << 8)
struct descriptor_table_ptr {
u16 limit;
......
......@@ -16,18 +16,6 @@
#define PTE_USER (1ull << 2)
#define PTE_ADDR (0xffffffffff000ull)
#define X86_CR0_PE 0x00000001
#define X86_CR0_MP 0x00000002
#define X86_CR0_TS 0x00000008
#define X86_CR0_WP 0x00010000
#define X86_CR0_PG 0x80000000
#define X86_CR4_VMXE 0x00000001
#define X86_CR4_TSD 0x00000004
#define X86_CR4_DE 0x00000008
#define X86_CR4_PSE 0x00000010
#define X86_CR4_PAE 0x00000020
#define X86_CR4_PCIDE 0x00020000
void setup_vm();
void *vmalloc(unsigned long size);
......
......@@ -7,13 +7,6 @@
#define X86_FEATURE_PCID (1 << 17)
#define X86_FEATURE_INVPCID (1 << 10)
#define X86_CR0_PG (1 << 31)
#define X86_CR3_PCID_MASK 0x00000fff
#define X86_CR4_PCIDE (1 << 17)
#define X86_IA32_EFER 0xc0000080
#define X86_EFER_LMA (1UL << 8)
struct invpcid_desc {
unsigned long pcid : 12;
unsigned long rsv : 52;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment