All of lore.kernel.org
 help / color / mirror / Atom feed
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: Thu, 29 Mar 2007 19:11:41 -0500	[thread overview]
Message-ID: <460C55BD.5050202@us.ibm.com> (raw)
In-Reply-To: <1175212362.27076.32.camel@lnitindesktop.sc.intel.com>

Kamble, Nitin A wrote:
> Hi Anthony,
>> Perhaps you did --emulate-16bit instead of -emulate-16bit?  The patch 
>> definitely has the added option.
>>
>>     
> You are right, it was -emulate-16bit.
>
>> >    - I tried hardcoding this to 1 in the qemu code, and found that the 
>> > port x595 is not reflecting it correctly to hvmloader.
>>
>> Are you sure you don't have something stale?
>>     
> I started with a fresh tree for your patch. I also tried rebuilding 
> the quemu from start.

Okay, you'll need to make sure that hvmloader and qemu are both being 
rebuilt and reinstalled.

>> I suspect you have a partial install or something.  I have never seen 
>> this happen.
>>     
> I have already tried few times. i will try one more time with newer 
> fresh xen-unstable tree. Some of the debug messages were coming from 
> my prinks.
>> You should see x86_emulate run for a good number of instructions.  The 
>> odd thing about your log is that the transfering control to x86_emulate 
>> message uses the EIP from the vmcs.  If this is the first time the 
>> emulator is being invoked, how can eip be 0?  There's nothing in the 
>> emulate path that would touch the vmcs.
>>
>> How exactly are you forcing the use of the emulator instead of vmxassist?
>>
>>     
> I basically forced emulate_16bit varilable in qemu to 1.
>
> int acpi_enabled = 0;
> int fd_bootchk = 1;
> int emulate_16bit* = 1;*
>
> and in the hvmloader instead of checking the output of the port 595, I 
> replaced it with if (1).
> like this:
> #if 0
>         if (inl(0x595) == 0xdeadbeef) {
> #else
> *        if (1) {*
> #endif

The really curious thing is that eip from the VMCS is set to 0.  eip 
should be address of the EIP of whatever movl cr0 instruction that 
occurs when returning from main() in hvmloader.

I guess it's possible that if you are using a version of unstable that 
predates Keir's recent hvmloader changes, you wouldn't have hvmloader 
switching to real mode.  That could explain some of the weirdness you're 
seeing.  What changeset are you on?

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.
>

  reply	other threads:[~2007-03-30  0: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 [this message]
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
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=460C55BD.5050202@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.