xen-devel
[Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole
To: |
Gerd Hoffmann <kraxel@xxxxxxx> |
Subject: |
[Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole |
From: |
Zachary Amsden <zach@xxxxxxxxxx> |
Date: |
Wed, 15 Mar 2006 00:36:34 -0800 |
Cc: |
Andrew Morton <akpm@xxxxxxxx>, Joshua LeVasseur <jtl@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Pratap Subrahmanyam <pratap@xxxxxxxxxx>, Wim Coekaerts <wim.coekaerts@xxxxxxxxxx>, Jack Lo <jlo@xxxxxxxxxx>, Dan Hecht <dhecht@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxxxx>, Christopher Li <chrisl@xxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, Virtualization Mailing List <virtualization@xxxxxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxx>, Anne Holler <anne@xxxxxxxxxx>, Jyothy Reddy <jreddy@xxxxxxxxxx>, Kip Macy <kmacy@xxxxxxxxxxx>, Ky Srinivasan <ksrinivasan@xxxxxxxxxx>, Leendert van Doorn <leendert@xxxxxxxxxxxxxx>, Dan Arai <arai@xxxxxxxxxx> |
Delivery-date: |
Wed, 15 Mar 2006 10:24:17 +0000 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<4417CFDA.1060806@xxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<200603131804.k2DI4N6s005678@xxxxxxxxxxxxxxxxxxx> <20060314064107.GK12807@xxxxxxxxxxxxxxxxxx> <44166D6B.4090701@xxxxxxxxxx> <20060314215616.GM12807@xxxxxxxxxxxxxxxxxx> <4417454F.2080908@xxxxxxxxxx> <20060315043108.GP12807@xxxxxxxxxxxxxxxxxx> <4417CFDA.1060806@xxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Thunderbird 1.5 (X11/20051201) |
Gerd Hoffmann wrote:
The complications in my patch come
from the fact that the vsyscall page has to be relocated dynamically,
requiring, basically run time linking on the page and some tweaks to get
sysenter to work. If you don't use vsyscall (say, non-TLS glibc), then
you don't need that complexity. But I think it might be needed now,
even for Xen.
I believe both Xen and execshield move vsyscall out of fixmap, and then
map into userspace as normal vma.
Yep, my patch (attached below for reference) moves the vsyscall page
into user address space, just below PAGE_OFFSET. Works basically the
same way the vsyscall page is mapped in the ia32 emulation of the x86_64
architecture. Address stays fixed, thus the relocation magic isn't needed.
Once the vsyscall page is moved out of fixmap it's easy to make fixmap
movable and thus have a runtime-resizable address space hole at the top
of address space. Patch is attached too, although that one is more
proof-of-concept, it doesn't make much sense as-is. It has a kernel
command line option to specify the top of address space so you can play
around with it ...
Both patches are against -rc3 and most likely still apply just fine,
havn't tested that though.
Your patch looks a lot cleaner and less hackish than mine. But I wonder
if it still works with kernels that support the sysenter method of
calling into the kernel. Look at the following code:
ENTRY(sysenter_entry)
movl TSS_sysenter_esp0(%esp),%esp
sysenter_past_esp:
STI
pushl $(__USER_DS)
pushl %ebp
pushfl
pushl $(__USER_CS)
pushl $SYSENTER_RETURN
SYSENTER_RETURN is a link time constant that is defined based on the
location of the vsyscall page. If the vsyscall page can move, this can
not be a constant. The reason is, this "fake" exception frame is used
to return back to the EIP of the call site, and sysenter does not record
the EIP of the call site.
Zach
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [RFC, PATCH 7/24] i386 Vmi memory hole, Zachary Amsden
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Chris Wright
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Zachary Amsden
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Chris Wright
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Zachary Amsden
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Chris Wright
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Gerd Hoffmann
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole,
Zachary Amsden <=
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Chris Wright
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Zachary Amsden
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Chris Wright
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Gerd Hoffmann
- [Xen-devel] Re: [RFC, PATCH 7/24] i386 Vmi memory hole, Zachary Amsden
|
|
|