WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] instrction emulation problem

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] instrction emulation problem
From: "strongerwill" <strongerwill@xxxxxxxxx>
Date: Fri, 13 Aug 2010 22:51:28 +0800
Cc: Xen-devel <Xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 13 Aug 2010 07:52:15 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:x-mailer:mime-version:content-type; bh=b2TDIWNBGvmXNx+yAdcHpKDcV7cytYfvpuL0HlD1RmU=; b=WjWWpnDO3FNOsgCrZayghZLg1Mrt6B/Olxat/eQ0DWKgPgTMf+VOF/ANqQf+ZVgZbR YWyKO4Wy8rd8HleGKP1JRJ5piClhOb8CbO1McfnHVxrXUU0fUbQwMJ6lLMHTpI6Propl 6FTDXzwN/Yre4hCiIk5uQPiGnlnzUV64kFWk0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:x-mailer:mime-version :content-type; b=t3fTBlujQJ1t57MxbXvYUgDW0cb5kIiwf7iPEF5lrCk9OVycYOFms1fNyrV4frVVaS YqMd8FDWDFPHTWcaCtQaVpRjdfArXFnsaxdr/k4SwYXu6MKbY/8Te2Yd4E8+1IUXZD3m iZrzYUQndRVpmRQvsWMbQiiUgxEib8kOk1oMI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Keir:
   I am sorry trouble you again. I want to emulate instruction "push %ebp" in Xen. I found the function emulate_privilege_op does not satisfy this requirement.
Then I resort to x86_emulate. I construct the x86_emulate_ctxt and reuse the "ptwr_emulate_ops".
code like this:
 
extern const struct x86_emulate_ops ptwr_emulate_ops;
in do_general_protection {
....
struct x86_emulate_ctxt ctxt;
ctxt.regs = regs;
ctxt.force_writeback = 1; // 0 is the same
ctxt.addr_size = 32;
ctxt.sp_size   = 32;
ret = x86_emulate(&ctxt, &ptwr_emulate_ops);
...
}
 
the error message is:
(XEN) mm.c:5235:d0 ptwr_emulate: bad access (cr2=553a4000, addr=e81b5fac, bytes=4)
 
 
I have another idea, I directly update the stack and change the EIP and ESP
like this:
 
regs->esp -= 4;
__raw_copy_to_guest((void*)regs->esp, &regs->ebp, sizeof(unsigned int));
regs->eip += 1;
 
I am not sure it works like this way. Please give me some tips. Thanks
 
Cheers,
 
Yueqiang
 
 
2010-08-13

strongerwill

发件人: Keir Fraser
发送时间: 2010-08-13  16:52:24
收件人: xen-devel@xxxxxxxxxxxxxxxxxxx
抄送:
主题: [Xen-devel] FINAL release candidate for Xen 4.0.1
 
Folks,
The sixth release candidate for 4.0.1 is tagged as 4.0.1-rc6 at
http://xenbits.xen.org/staging/xen-4.0-testing.hg
We expect this to be the final RC, with no changes except for regression
fixes ahead of final release late next week. So please test this RC!
 Thanks,
 Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] instrction emulation problem, strongerwill <=