From: Anthony Liguori <aliguori@us.ibm.com>
To: "Kamble, Nitin A" <nitin.a.kamble@intel.com>
Cc: "Yu, Wilfred" <wilfred.yu@intel.com>,
xen-devel@lists.xensource.com, Keir Fraser <keir@xensource.com>,
"Nakajima, Jun" <jun.nakajima@intel.com>
Subject: Re: [PATCH][RFC] Emulating real mode with x86_emulate
Date: Fri, 30 Mar 2007 17:11:39 -0500 [thread overview]
Message-ID: <460D8B1B.6020308@us.ibm.com> (raw)
In-Reply-To: <1175289886.32115.26.camel@lnitindesktop.sc.intel.com>
Kamble, Nitin A wrote:
> Anthony,
> eip of 0x0 is the right address.
>
> Because the trampoline_Start code is relocated to address 0.
>
> /* Relocate real-mode trampoline to 0x0. */
> " mov $trampoline_start,%esi \n"
> " xor %edi,%edi \n"
> " mov $trampoline_end,%ecx \n"
> " sub %esi,%ecx \n"
> " rep movsb \n"
>
> Still there is no progress in the emulation. The guest is dying with
> triple-fault just like before.
>
> Thanks & Regards,
> Nitin
> Open Source Technology Center, Intel Corporation.
> -------------------------------------------------------------------------
> The mind is like a parachute; it works much better when it's open.
>
>
> On Fri, 2007-03-30 at 14:08 -0700, Nitin A Kamble wrote:
>> Hi Anthony,
>>
>> On Fri, 2007-03-30 at 14:00 -0500, Anthony Liguori wrote:
>>> /* Enter real mode, reload all segment registers and IDT. */
>>> " ljmp $0x8,$0x0 \n"
>>> "trampoline_start: .code16 \n"
>>> " mov %eax,%cr0 \n"
>>>
>>> That change was pretty recent so unless it was reverted it should Just Work.
>>>
>>> Regards,
>>>
>>> Anthony Liguori
>>>
>> Now I see cr0 is updated after returning from main.
>> I enabled the debug log in the xen code now.
>>
>> (XEN) HVM2: Creating MP tables
>> ...
>> (XEN) HVM2: Loading Cirrus VGABIOS
>> ...
>> (XEN) HVM2: Loading ACPI
>> ...
>> (XEN) HVM2: Loading VMXAssist ...
>> deadbeef
>> (XEN) HVM2:
>> foo
>> (XEN)
>> hvmop_emulate_realmode
>>
>> (XEN) guest requests real mode
>> emulation
>> (XEN) foo
>> 221
>> (XEN) HVM2: Invoking ROMBIOS
>> ...
>> (XEN) vmx_vmexit_handler called. eip =
>> 0x0
>> (XEN) vmx_cr_access called
>> eip=0x0
>> (XEN) mov_to_cr 0 called
>> eip=0x0
>> (XEN) vmx_set_cr0 called
>> eip=0x0
>> (XEN) Transfering -- control to x86_emulate eip
>> 0x0
>> (XEN) hvm.c:446:d2 Triple fault on VCPU0 - invoking HVM system reset.
>>
>> It shows cr0 is getting modified. But the eip is still 0x0.
set_cr0 is returning 1 though which should increment eip to the next
instruction.
I'm a bit perplexed about my eip now and also why your eip is still 0.
It should be the instruction following the mov cr0.
Regards,
Anthony Liguori
>>
>> Thanks & Regards,
>> Nitin
>> Open Source Technology Center, Intel Corporation.
>> -------------------------------------------------------------------------
>> The mind is like a parachute; it works much better when it's open.
>>
>
next prev parent reply other threads:[~2007-03-30 22:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-25 23:35 [PATCH][RFC] Emulating real mode with x86_emulate Anthony Liguori
2007-03-29 21:17 ` Kamble, Nitin A
2007-03-29 23:24 ` Anthony Liguori
2007-03-29 23:52 ` Kamble, Nitin A
2007-03-30 0:11 ` Anthony Liguori
2007-03-30 0:59 ` Kamble, Nitin A
2007-03-30 2:20 ` Kamble, Nitin A
2007-03-30 3:20 ` Anthony Liguori
2007-03-30 3:55 ` Anthony Liguori
2007-03-30 18:53 ` Kamble, Nitin A
2007-03-30 19:00 ` Anthony Liguori
2007-03-30 21:08 ` Kamble, Nitin A
2007-03-30 21:24 ` Kamble, Nitin A
2007-03-30 22:11 ` Anthony Liguori [this message]
2007-04-02 18:45 ` Kamble, Nitin A
2007-04-02 18:54 ` Anthony Liguori
2007-04-02 23:52 ` Kamble, Nitin A
2007-04-03 6:25 ` Keir Fraser
2007-04-03 14:03 ` Anthony Liguori
2007-04-05 1:24 ` Kamble, Nitin A
2007-03-30 22:10 ` Andi Kleen
2007-03-30 21:20 ` Anthony Liguori
2007-03-30 21:25 ` Andi Kleen
2007-03-30 22:00 ` Anthony Liguori
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=460D8B1B.6020308@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xensource.com \
--cc=nitin.a.kamble@intel.com \
--cc=wilfred.yu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.