diff options
author | Avi Kivity <avi@redhat.com> | 2009-09-16 13:14:48 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-22 11:57:13 +0300 |
commit | f82a3dafa3d437a37dec00055a8231e331c840f3 (patch) | |
tree | 8e6dbd2f5b219dc6a7d145b60c15cf6ef7b57035 /kvm | |
parent | test: issue EOI after IPI (diff) | |
download | qemu-kvm-f82a3dafa3d437a37dec00055a8231e331c840f3.tar.gz qemu-kvm-f82a3dafa3d437a37dec00055a8231e331c840f3.tar.bz2 qemu-kvm-f82a3dafa3d437a37dec00055a8231e331c840f3.zip |
test: set up per-cpu area
Currently sharing space with the stack.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm')
-rw-r--r-- | kvm/user/test/x86/cstart64.S | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kvm/user/test/x86/cstart64.S b/kvm/user/test/x86/cstart64.S index e5554baff..f1a9d0955 100644 --- a/kvm/user/test/x86/cstart64.S +++ b/kvm/user/test/x86/cstart64.S @@ -80,9 +80,19 @@ mb_flags = 0x0 # multiboot header .long mb_magic, mb_flags, 0 - (mb_magic + mb_flags) +MSR_GS_BASE = 0xc0000101 + +.macro setup_percpu_area + lea -4096(%esp), %eax + mov $0, %edx + mov $MSR_GS_BASE, %ecx + wrmsr +.endm + .globl start start: mov $stacktop, %esp + setup_percpu_area call prepare_64 jmpl $8, $start64 @@ -142,6 +152,7 @@ ap_start32: mov %ax, %ss mov $-4096, %esp lock/xaddl %esp, smp_stacktop + setup_percpu_area call prepare_64 ljmpl $8, $ap_start64 |