public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Virtualization Mailing List <virtualization@lists.osdl.org>,
	Xen-devel <xen-devel@lists.xensource.com>,
	Andrew Morton <akpm@osdl.org>, Dan Hecht <dhecht@vmware.com>,
	Dan Arai <arai@vmware.com>, Anne Holler <anne@vmware.com>,
	Pratap Subrahmanyam <pratap@vmware.com>,
	Christopher Li <chrisl@vmware.com>,
	Joshua LeVasseur <jtl@ira.uka.de>, Chris Wright <chrisw@osdl.org>,
	Rik Van Riel <riel@redhat.com>, Jyothy Reddy <jreddy@vmware.com>,
	Jack Lo <jlo@vmware.com>, Kip Macy <kmacy@fsmware.com>,
	Jan Beulich <jbeulich@novell.com>,
	Ky Srinivasan <ksrinivasan@novell.com>,
	Wim Coekaerts <wim.coekaerts@oracle.com>,
	Leendert van Doorn <leendert@watson.ibm.com>
Subject: Re: [RFC, PATCH 4/24] i386 Vmi inline implementation
Date: Wed, 15 Mar 2006 15:56:53 -0800	[thread overview]
Message-ID: <4418A9C5.1070701@vmware.com> (raw)
In-Reply-To: <20060315225212.GB1719@elf.ucw.cz>

Pavel Machek wrote:
> We already do runtime patching for SMP vs. UP, could you use same
> infrastructure? I do not want VMI-specific grub.

I think we could almost use the same infrastructure - or extend it to 
work.  The problem is how to determine register liveness for calls into 
the VMI layer which take > 3 arguments.  If you squeeze all the 
arguments into fixed registers, you can unnecessarily constrain the 
native code - and rapidly run out of registers for the compiler to use, 
generating impossible constraints in some cases.

To work around these issues, we do not constrain the arguments beyond 
the first three registers.  But this means that the hypervisor needs a 
way to locate the additional arguments.  That information gets encoded 
implicitly by the auto-generated translation into a VMI call, which 
pushes the arguments onto the stack (thus revealing the registers, and 
allowing constant immediate optimization).

Now, if you can generate all of the code to do the callout to the VMI, 
you could use it directly in an alternative instruction sequence, just 
as the existing infrastructure.  But I'm not sure you can do it in one 
compiler pass.  We are already pushing the limits of the preprocessor, 
compiler and assembler here.  Having another preprocessing pass may make 
it possible, but it does make the build more complicated.

I'm not sure it is really what we want though.  The alternative 
instruction interfaces is based on global feature detection that is done 
and applied by the _kernel_.  In the end, we want the hypervisor to be 
able to toggle each VMI call site as a separate feature, and replace it 
with hypervisor specific code.  In this way, a VT based hypervisor could 
simply not patch those class of VMI calls that are already emulated by 
hardware, and also inline direct hypercalls for those classes that are 
not.  The VMI layer is supposed to be very much an inline linker for 
feature detection done by the _hypervisor_.

Zach

  reply	other threads:[~2006-03-15 23:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13 18:02 [RFC, PATCH 4/24] i386 Vmi inline implementation Zachary Amsden
2006-03-15 22:52 ` Pavel Machek
2006-03-15 23:56   ` Zachary Amsden [this message]
2006-03-22 20:12 ` Andi Kleen
2006-03-22 22:33   ` Zachary Amsden
  -- strict thread matches above, loose matches on Subject: below --
2006-03-13 18:41 Zachary Amsden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4418A9C5.1070701@vmware.com \
    --to=zach@vmware.com \
    --cc=akpm@osdl.org \
    --cc=anne@vmware.com \
    --cc=arai@vmware.com \
    --cc=chrisl@vmware.com \
    --cc=chrisw@osdl.org \
    --cc=dhecht@vmware.com \
    --cc=jbeulich@novell.com \
    --cc=jlo@vmware.com \
    --cc=jreddy@vmware.com \
    --cc=jtl@ira.uka.de \
    --cc=kmacy@fsmware.com \
    --cc=ksrinivasan@novell.com \
    --cc=leendert@watson.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=pratap@vmware.com \
    --cc=riel@redhat.com \
    --cc=torvalds@osdl.org \
    --cc=virtualization@lists.osdl.org \
    --cc=wim.coekaerts@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox