|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Re: [PATCH 0/5] Collected vdso/vsyscall fixes for 3.1
On Wed, Jul 27, 2011 at 12:58 PM, Konrad Rzeszutek Wilk
<konrad.wilk@xxxxxxxxxx> wrote:
>> >> $ test_vsyscall test
>> >> Testing gettimeofday...
>> >> vDSO offset = 0.000001s
>> >> vsyscall offset = 0.000001s
>> >>
>> >> Testing time...
>> >> vDSO offset = 0
>> >> vsyscall offset = 0
>> >> Testing getcpu...
>> >> ok! cpu=6 node=0
>
>> I bet if you pull a new copy or remove -mavx from Makefile it will
>> work. I got a grossly hacked-up Xen domU booted and everything seems
>> to work.
>
> It did. Both Dom0 and DomU work on AMD and Intel.
>
> In regards to the last pv-ops patch - is there no better way? The reason I am
> asking
> is the pv-ops hook is just a bandaid for the problem. Is the Xen syscall
> suppose to
> be doingsomething extra with the stack perhaps?
>
The Xen code in question is:
restore_all_guest:
ASSERT_INTERRUPTS_DISABLED
RESTORE_ALL
testw $TRAP_syscall,4(%rsp)
jz iret_exit_to_guest
addq $8,%rsp
popq %rcx # RIP
popq %r11 # CS
cmpw $FLAT_USER_CS32,%r11
popq %r11 # RFLAGS
popq %rsp # RSP
je 1f
sysretq
1: sysretl
So with VCGF_in_syscall set, the ireq hypercall will return via
sysretq if the saved CS is __USER_CS or FLAT_USER_CS64. This is
faster than iretq.
The hypervisor doesn't allow the guest OS to override the values in
MSR_STAR, so FLAT_USER_CS64 gets returned to userspace. And sysretq
is probably much faster than iretq, so unsetting VCGF_in_syscall is
probably a bad idea.
The ideal solution would be to allow the kernel to change MSR_STAR,
but this would require changing the hypervisor and the kernel.
--Andy
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] Re: [PATCH 4/5] x86-64/xen: Enable the vvar mapping, (continued)
|
|
|
|
|