From: Chris Wright <chrisw@sous-sol.org>
To: Zachary Amsden <zach@vmware.com>
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 5/24] i386 Vmi code patching
Date: Wed, 15 Mar 2006 02:02:10 -0800 [thread overview]
Message-ID: <20060315100210.GU12807@sorel.sous-sol.org> (raw)
In-Reply-To: <200603131802.k2DI2nv8005665@zach-dev.vmware.com>
* Zachary Amsden (zach@vmware.com) wrote:
> +static void fixup_translation(struct vmi_annotation *a)
> +{
> + unsigned char *c, *start, *end;
> + int left;
> +
> + memcpy(a->nativeEIP, a->translationEIP, a->translation_size);
> + start = a->nativeEIP;
> + end = a->nativeEIP + a->translation_size;
> +
> + for (c = start; c < end;) {
> + switch(*c) {
> + case MNEM_CALL_NEAR:
> + patch_call_site(a, c);
> + c+=5;
> + break;
> +
> + case MNEM_PUSH_I:
> + c+=5;
> + break;
> +
> + case MNEM_PUSH_IB:
> + c+=2;
> + break;
> +
> + case MNEM_PUSH_EAX:
> + case MNEM_PUSH_ECX:
> + case MNEM_PUSH_EDX:
> + case MNEM_PUSH_EBX:
> + case MNEM_PUSH_EBP:
> + case MNEM_PUSH_ESI:
> + case MNEM_PUSH_EDI:
> + c+=1;
> + break;
> +
> + case MNEM_LEA:
> + BUG_ON(*(c+1) != 0x64); /* [--][--]+disp8, %esp */
> + BUG_ON(*(c+2) != 0x24); /* none + %esp */
> + c+=4;
> + break;
> +
> + default:
> + /*
> + * Don't printk - it may acquire spinlocks with
> + * partially completed VMI translations, causing
> + * nuclear meltdown of the core.
> + */
> + BUG();
> + return;
> + }
Why these restrictions? How do you do int $0x82, for example?
thanks,
-chris
next prev parent reply other threads:[~2006-03-15 9:57 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-13 18:02 Zachary Amsden
2006-03-15 10:02 ` Chris Wright [this message]
2006-03-15 16:01 ` Zachary Amsden
2006-03-15 22:05 ` Anthony Liguori
2006-03-15 23:00 ` Pavel Machek
2006-03-17 0:51 ` Zachary Amsden
2006-03-17 10:08 ` Joshua LeVasseur
2006-03-17 21:11 ` Chris Wright
2006-03-18 0:49 ` Joshua LeVasseur
2006-03-16 19:10 ` Jan Engelhardt
2006-03-16 19:45 ` Rik van Riel
2006-03-16 21:54 ` Zachary Amsden
2006-03-22 20:15 ` Andi Kleen
2006-03-22 21:40 ` Chris Wright
2006-03-22 22:16 ` Zachary Amsden
2006-03-22 22:33 ` Daniel Arai
2006-03-22 23:02 ` Chris Wright
2006-03-22 22:51 ` Chris Wright
2006-03-22 23:36 ` Zachary Amsden
2006-03-23 0:41 ` Chris Wright
2006-03-23 0:54 ` Zachary Amsden
2006-03-23 1:06 ` Chris Wright
2006-03-23 4:04 ` Zachary Amsden
2006-03-23 11:42 ` Joshua LeVasseur
2006-03-23 0:31 ` Anthony Liguori
2006-03-23 0:40 ` Chris Wright
2006-03-23 9:25 ` Keir Fraser
2006-03-23 18:50 ` [Xen-devel] " Zachary Amsden
2006-03-23 23:45 ` Eli Collins
2006-03-23 0:46 ` Zachary Amsden
2006-03-23 0:53 ` Anthony Liguori
2006-03-23 1:01 ` Zachary Amsden
2006-03-22 23:41 Volkmar Uhlig
2006-03-28 0:52 Chuck Ebbert
2006-03-28 1:48 ` 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=20060315100210.GU12807@sorel.sous-sol.org \
--to=chrisw@sous-sol.org \
--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=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 \
--cc=zach@vmware.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
Powered by JetHome