Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932069AbWCVXyq (ORCPT ); Wed, 22 Mar 2006 18:54:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932421AbWCVXyq (ORCPT ); Wed, 22 Mar 2006 18:54:46 -0500 Received: from mailout1.vmware.com ([65.113.40.130]:20484 "EHLO mailout1.vmware.com") by vger.kernel.org with ESMTP id S932069AbWCVXyp (ORCPT ); Wed, 22 Mar 2006 18:54:45 -0500 Message-ID: <4421E3C4.2060808@vmware.com> Date: Wed, 22 Mar 2006 15:54:44 -0800 From: Zachary Amsden User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Andi Kleen Cc: virtualization@lists.osdl.org, Linus Torvalds , Linux Kernel Mailing List , Xen-devel , Andrew Morton , Dan Hecht , Dan Arai , Anne Holler , Pratap Subrahmanyam , Christopher Li , Joshua LeVasseur , Chris Wright , Rik Van Riel , Jyothy Reddy , Jack Lo , Kip Macy , Jan Beulich , Ky Srinivasan , Wim Coekaerts , Leendert van Doorn Subject: Re: [RFC, PATCH 1/24] i386 Vmi documentation II References: <200603131759.k2DHxeep005627@zach-dev.vmware.com> <200603222239.46604.ak@suse.de> <4421D379.3090405@vmware.com> <200603222338.44919.ak@suse.de> In-Reply-To: <200603222338.44919.ak@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1461 Lines: 47 Andi Kleen wrote: > On Wednesday 22 March 2006 23:45, Zachary Amsden wrote: > > >> I propose an entirely different approach - use segmentation. >> > > That would require a lot of changes to save/restore the segmentation > register at kernel entry/exit since there is no swapgs on i386. > And will be likely slower there too and also even slow down the > VMI-kernel-no-hypervisor. > There are no changes required to the kernel entry / exit paths. With save/restore segment support in the VMI, reserving one segment for the hypervisor data area is easy. I take it back. There is one required change: kernel_entry: hypervisor_entry_hook sti .... kernel code This hypervisor_entry_hook can be a nop on native hardware, and the following for Xen: push %gs mov CPU_HYPER_SEL, %gs pop %gs:SAVED_USER_GS You already have the IRET / SYSEXIT hooks to restore it on the way back. And now you have a segment reserved that allows you to deal with 16-bit stack segments during the IRET. > Still might be the best option. > > How did that rumoured Xenolinux-over-VMI implementation solve that problem? > !CONFIG_SMP -- as I believe I saw in the latest Xen patches sent out as well? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/