Il 19/06/2013 18:03, Gleb Natapov ha scritto:
On Wed, Jun 19, 2013 at 11:07:18PM +0800, 李春奇 Arthur Chunqi Li wrote:
Hi Gleb,
This version can set %rsp before trapping into emulator, because
insn_page and alt_insn_page is statically defined and their relative
position to (save) is fixed during
On Thu, Jun 20, 2013 at 10:29:42AM +0200, Paolo Bonzini wrote:
Il 19/06/2013 18:03, Gleb Natapov ha scritto:
On Wed, Jun 19, 2013 at 11:07:18PM +0800, 李春奇 Arthur Chunqi Li wrote:
Hi Gleb,
This version can set %rsp before trapping into emulator, because
insn_page and alt_insn_page is
On Wed, Jun 19, 2013 at 11:00:56PM +0800, Arthur Chunqi Li wrote:
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in
ok, I will handle all above in the following commit.
Arthur Chunqi Li
Department of Computer Science
School of EECS
Peking University
Beijing, China
From my iPhone
在 2013-6-20,16:48,Gleb Natapov g...@redhat.com 写道:
On Wed, Jun 19, 2013 at 11:00:56PM +0800, Arthur Chunqi Li wrote:
Add a
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in outregs.
Signed-off-by: Arthur Chunqi Li yzt...@gmail.com
---
On 2013-06-20 12:45, Arthur Chunqi Li wrote:
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in outregs.
Small hint: You
On Thu, Jun 20, 2013 at 06:45:21PM +0800, Arthur Chunqi Li wrote:
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in
On Wed, Jun 19, 2013 at 09:26:59AM +0800, 李春奇 Arthur Chunqi Li wrote:
On Wed, Jun 19, 2013 at 12:44 AM, Gleb Natapov g...@redhat.com wrote:
Send code in a form of a patch.
On Wed, Jun 19, 2013 at 12:14:13AM +0800, 李春奇 Arthur Chunqi Li wrote:
extern u8 insn_page[], insn_page_end[];
On Wed, Jun 19, 2013 at 5:31 PM, Gleb Natapov g...@redhat.com wrote:
On Wed, Jun 19, 2013 at 09:26:59AM +0800, 李春奇 Arthur Chunqi Li wrote:
On Wed, Jun 19, 2013 at 12:44 AM, Gleb Natapov g...@redhat.com wrote:
Send code in a form of a patch.
On Wed, Jun 19, 2013 at 12:14:13AM +0800, 李春奇
On Wed, Jun 19, 2013 at 08:18:29PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Wed, Jun 19, 2013 at 5:31 PM, Gleb Natapov g...@redhat.com wrote:
On Wed, Jun 19, 2013 at 09:26:59AM +0800, 李春奇 Arthur Chunqi Li wrote:
On Wed, Jun 19, 2013 at 12:44 AM, Gleb Natapov g...@redhat.com wrote:
Send code
On Wed, Jun 19, 2013 at 8:26 PM, Gleb Natapov g...@redhat.com wrote:
On Wed, Jun 19, 2013 at 08:18:29PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Wed, Jun 19, 2013 at 5:31 PM, Gleb Natapov g...@redhat.com wrote:
On Wed, Jun 19, 2013 at 09:26:59AM +0800, 李春奇 Arthur Chunqi Li wrote:
On Wed, Jun
On Wed, Jun 19, 2013 at 08:30:33PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Wed, Jun 19, 2013 at 8:26 PM, Gleb Natapov g...@redhat.com wrote:
On Wed, Jun 19, 2013 at 08:18:29PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Wed, Jun 19, 2013 at 5:31 PM, Gleb Natapov g...@redhat.com wrote:
On Wed, Jun
I found the final reason! The initial use of init_ram is also used by
test_rip_relative(), which will cause conflict. I changed it and
everything runs well.
On Wed, Jun 19, 2013 at 8:32 PM, Gleb Natapov g...@redhat.com wrote:
On Wed, Jun 19, 2013 at 08:30:33PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Wed, Jun 19, 2013 at 10:01:40PM +0800, 李春奇 Arthur Chunqi Li wrote:
I found the final reason! The initial use of init_ram is also used by
test_rip_relative(), which will cause conflict. I changed it and
everything runs well.
Not sure what you mean. Your version of test_movabs does not use
I use insn_ram as what the origin/master done before. I don't know how
to describe it clearly, I will commit a patch later and you can get to
know from my codes.
Arthur
On Wed, Jun 19, 2013 at 10:13 PM, Gleb Natapov g...@redhat.com wrote:
On Wed, Jun 19, 2013 at 10:01:40PM +0800, 李春奇 Arthur
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in outregs.
Signed-off-by: Arthur Chunqi Li yzt...@gmail.com
---
Hi Gleb,
This version can set %rsp before trapping into emulator, because
insn_page and alt_insn_page is statically defined and their relative
position to (save) is fixed during execution.
In this way, test case of test_mmx_movq_mf needs to pre-define its own
stack, this change is in the next
On Wed, Jun 19, 2013 at 11:07:18PM +0800, 李春奇 Arthur Chunqi Li wrote:
Hi Gleb,
This version can set %rsp before trapping into emulator, because
insn_page and alt_insn_page is statically defined and their relative
position to (save) is fixed during execution.
The position of the code is not
在 2013-6-20,0:03,Gleb Natapov g...@redhat.com 写道:
On Wed, Jun 19, 2013 at 11:07:18PM +0800, 李春奇 Arthur Chunqi Li wrote:
Hi Gleb,
This version can set %rsp before trapping into emulator, because
insn_page and alt_insn_page is statically defined and their relative
position to (save) is fixed
On Thu, Jun 20, 2013 at 01:48:39AM +0800, Gmail wrote:
在 2013-6-20,0:03,Gleb Natapov g...@redhat.com 写道:
On Wed, Jun 19, 2013 at 11:07:18PM +0800, 李春奇 Arthur Chunqi Li wrote:
Hi Gleb,
This version can set %rsp before trapping into emulator, because
insn_page and alt_insn_page is
On Thu, Jun 13, 2013 at 05:30:03PM +0800, 李春奇 Arthur Chunqi Li wrote:
Hi Gleb,
I'm trying to solve these problems in the past days and meet many
difficulties. You want to save all the general registers in calling
insn_page, so registers should be saved to (save) in insn_page.
Because all the
On Tue, Jun 18, 2013 at 8:45 PM, Gleb Natapov g...@redhat.com wrote:
On Thu, Jun 13, 2013 at 05:30:03PM +0800, 李春奇 Arthur Chunqi Li wrote:
Hi Gleb,
I'm trying to solve these problems in the past days and meet many
difficulties. You want to save all the general registers in calling
insn_page,
On Tue, Jun 18, 2013 at 8:45 PM, Gleb Natapov g...@redhat.com wrote:
On Thu, Jun 13, 2013 at 05:30:03PM +0800, 李春奇 Arthur Chunqi Li wrote:
Hi Gleb,
I'm trying to solve these problems in the past days and meet many
difficulties. You want to save all the general registers in calling
insn_page,
On Tue, Jun 18, 2013 at 10:28:59PM +0800, �??�?���? Arthur Chunqi Li wrote:
On Tue, Jun 18, 2013 at 8:45 PM, Gleb Natapov g...@redhat.com wrote:
On Thu, Jun 13, 2013 at 05:30:03PM +0800, 李春奇 Arthur Chunqi Li wrote:
Hi Gleb,
I'm trying to solve these problems in the past days and meet many
On Tue, Jun 18, 2013 at 11:47 PM, Gleb Natapov g...@redhat.com wrote:
On Tue, Jun 18, 2013 at 10:28:59PM +0800, Ê??Ê?•Â•? Arthur Chunqi Li wrote:
On Tue, Jun 18, 2013 at 8:45 PM, Gleb Natapov g...@redhat.com wrote:
On Thu, Jun 13, 2013 at 05:30:03PM +0800, 李春奇 Arthur Chunqi Li
wrote:
On Tue, Jun 18, 2013 at 11:56:24PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Tue, Jun 18, 2013 at 11:47 PM, Gleb Natapov g...@redhat.com wrote:
On Tue, Jun 18, 2013 at 10:28:59PM +0800, Ê??Ê?•Â•? Arthur Chunqi Li
wrote:
On Tue, Jun 18, 2013 at 8:45 PM, Gleb Natapov g...@redhat.com wrote:
On
extern u8 insn_page[], insn_page_end[];
extern u8 test_insn[], test_insn_end[];
extern u8 alt_insn_page[];
asm(
.align 4096\n\t
.global insn_page\n\t
.global insn_page_end\n\t
.global test_insn\n\t
.global test_insn_end\n\t
insn_page:\n\t
ret \n\t
push %rax; push %rbx\n\t
push %rcx; push
Send code in a form of a patch.
On Wed, Jun 19, 2013 at 12:14:13AM +0800, 李春奇 Arthur Chunqi Li wrote:
extern u8 insn_page[], insn_page_end[];
extern u8 test_insn[], test_insn_end[];
extern u8 alt_insn_page[];
asm(
.align 4096\n\t
.global insn_page\n\t
.global insn_page_end\n\t
.global
On Wed, Jun 19, 2013 at 12:44 AM, Gleb Natapov g...@redhat.com wrote:
Send code in a form of a patch.
On Wed, Jun 19, 2013 at 12:14:13AM +0800, 李春奇 Arthur Chunqi Li wrote:
extern u8 insn_page[], insn_page_end[];
extern u8 test_insn[], test_insn_end[];
extern u8 alt_insn_page[];
asm(
Hi Gleb,
I'm trying to solve these problems in the past days and meet many
difficulties. You want to save all the general registers in calling
insn_page, so registers should be saved to (save) in insn_page.
Because all the instructions should be generated outside and copy to
insn_page, and the
Il 13/06/2013 05:30, 李春奇 Arthur Chunqi Li ha scritto:
Hi Gleb,
I'm trying to solve these problems in the past days and meet many
difficulties. You want to save all the general registers in calling
insn_page, so registers should be saved to (save) in insn_page.
Because all the instructions
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in outregs.
Signed-off-by: Arthur Chunqi Li yzt...@gmail.com
---
Il 06/06/2013 11:24, Arthur Chunqi Li ha scritto:
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in outregs.
On Thu, Jun 13, 2013 at 4:50 AM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 06/06/2013 11:24, Arthur Chunqi Li ha scritto:
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in outregs.
Signed-off-by: Arthur Chunqi Li yzt...@gmail.com
---
On Mon, Jun 10, 2013 at 09:38:32PM +0800, Arthur Chunqi Li wrote:
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in
On Fri, Jun 07, 2013 at 10:31:38AM +0800, Arthur Chunqi Li wrote:
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax, %rsp, %rbp, %rflags have special usage and
cannot set in inregs), put instruction codec in alt_insn and call
func with alt_insn_length. Get
On Sun, Jun 9, 2013 at 7:07 PM, Gleb Natapov g...@redhat.com wrote:
On Fri, Jun 07, 2013 at 10:31:38AM +0800, Arthur Chunqi Li wrote:
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax, %rsp, %rbp, %rflags have special usage and
cannot set in inregs), put
On Sun, Jun 09, 2013 at 08:44:32PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 7:07 PM, Gleb Natapov g...@redhat.com wrote:
On Fri, Jun 07, 2013 at 10:31:38AM +0800, Arthur Chunqi Li wrote:
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax,
On Sun, Jun 9, 2013 at 8:49 PM, Gleb Natapov g...@redhat.com wrote:
On Sun, Jun 09, 2013 at 08:44:32PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 7:07 PM, Gleb Natapov g...@redhat.com wrote:
On Fri, Jun 07, 2013 at 10:31:38AM +0800, Arthur Chunqi Li wrote:
Add a function
On Sun, Jun 09, 2013 at 08:56:04PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 8:49 PM, Gleb Natapov g...@redhat.com wrote:
On Sun, Jun 09, 2013 at 08:44:32PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 7:07 PM, Gleb Natapov g...@redhat.com wrote:
On Fri, Jun
On Sun, Jun 9, 2013 at 8:49 PM, Gleb Natapov g...@redhat.com wrote:
On Sun, Jun 09, 2013 at 08:44:32PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 7:07 PM, Gleb Natapov g...@redhat.com wrote:
On Fri, Jun 07, 2013 at 10:31:38AM +0800, Arthur Chunqi Li wrote:
Add a function
On Sun, Jun 09, 2013 at 09:22:27PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 8:49 PM, Gleb Natapov g...@redhat.com wrote:
On Sun, Jun 09, 2013 at 08:44:32PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 7:07 PM, Gleb Natapov g...@redhat.com wrote:
On Fri, Jun
On Sun, Jun 9, 2013 at 10:09 PM, Gleb Natapov g...@redhat.com wrote:
On Sun, Jun 09, 2013 at 09:22:27PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 8:49 PM, Gleb Natapov g...@redhat.com wrote:
On Sun, Jun 09, 2013 at 08:44:32PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9,
On Sun, Jun 09, 2013 at 11:23:26PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 10:09 PM, Gleb Natapov g...@redhat.com wrote:
On Sun, Jun 09, 2013 at 09:22:27PM +0800, 李春奇 Arthur Chunqi Li wrote:
On Sun, Jun 9, 2013 at 8:49 PM, Gleb Natapov g...@redhat.com wrote:
On Sun, Jun
I have finished the infrastructure but after changing test_mmx_movq_mf
test case, it return error:
unhandled excecption 6
Return value from qemu: 15
If I don't change %rsp and %rbp, it runs OK.
So I wonder if this test case is strictly reply on %rsp and %rbp?
On Mon, Jun 10, 2013 at 12:00 AM,
On Mon, Jun 10, 2013 at 01:09:15AM +0800, 李春奇 Arthur Chunqi Li wrote:
I have finished the infrastructure but after changing test_mmx_movq_mf
test case, it return error:
unhandled excecption 6
Return value from qemu: 15
If I don't change %rsp and %rbp, it runs OK.
So I wonder if this test
I have trouble to send the address of inregs into alt_insn_page, so I
use r9 and r10 to carry %rsp and %rbp into it. And r8 is used to
trigger vmexit.
I paste the relevant functions as follows:
static void trap_emulator(uint64_t *mem, uint8_t *insn_page,
uint8_t *alt_insn_page, void
On Mon, Jun 10, 2013 at 01:28:48AM +0800, 李春奇 Arthur Chunqi Li wrote:
I have trouble to send the address of inregs into alt_insn_page, so I
use r9 and r10 to carry %rsp and %rbp into it. And r8 is used to
trigger vmexit.
If you going to use call you will need stack. I said how not to use it
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax is invalid because it is used as return
address), put instruction codec in alt_insn and call func with
alt_insn_length. Get results in outregs.
Signed-off-by: Arthur Chunqi Li yzt...@gmail.com
---
This version of save/restore general register seems a bit too ugly, I
will change it and commit another patch.
Some of the registers cannot be set as realmode.c do, for example %rax
used to save return value, wrong %esp %ebp may cause crash, and I
think changed %rflags may cause some unknown
Add a function trap_emulator to run an instruction in emulator.
Set inregs first (%rax, %rsp, %rbp, %rflags have special usage and
cannot set in inregs), put instruction codec in alt_insn and call
func with alt_insn_length. Get results in outregs.
Signed-off-by: Arthur Chunqi Li yzt...@gmail.com
52 matches
Mail list logo