From: "Kamble, Nitin A" Subject: Re: [PATCH][RFC] Emulating real mode with x86_emulate Date: Thu, 29 Mar 2007 16:52:42 -0700 Message-ID: <1175212362.27076.32.camel@lnitindesktop.sc.intel.com> References: <4607074E.1030807@us.ibm.com> <1175203075.27076.17.camel@lnitindesktop.sc.intel.com> <460C4AAE.5020707@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0000139222==" Return-path: Content-class: urn:content-classes:message In-Reply-To: <460C4AAE.5020707@us.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anthony Liguori Cc: "Yu, Wilfred" , xen-devel@lists.xensource.com, Keir Fraser , "Nakajima, Jun" List-Id: xen-devel@lists.xenproject.org --===============0000139222== Content-Type: multipart/signed; boundary="=-yuO8hO8CQSPTXwp0Rls/"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-class: urn:content-classes:message --=-yuO8hO8CQSPTXwp0Rls/ Content-Type: multipart/alternative; boundary="=-RRN3wrXtYLnin7gp7RIh" --=-RRN3wrXtYLnin7gp7RIh Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Anthony, > Perhaps you did --emulate-16bit instead of -emulate-16bit? The patch=20 > definitely has the added option. >=20 You are right, it was -emulate-16bit. > > - I tried hardcoding this to 1 in the qemu code, and found that the=20 > > port x595 is not reflecting it correctly to hvmloader. >=20 > 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. > I suspect you have a partial install or something. I have never seen=20 > 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. >=20 > You should see x86_emulate run for a good number of instructions. The=20 > odd thing about your log is that the transfering control to x86_emulate=20 > message uses the EIP from the vmcs. If this is the first time the=20 > emulator is being invoked, how can eip be 0? There's nothing in the=20 > emulate path that would touch the vmcs. >=20 > How exactly are you forcing the use of the emulator instead of vmxassist? >=20 I basically forced emulate_16bit varilable in qemu to 1.=20 int acpi_enabled =3D 0; int fd_bootchk =3D 1; int emulate_16bit =3D 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) =3D=3D 0xdeadbeef) { #else if (1) { #endif Thanks & Regards, Nitin=20 Open Source Technology Center, Intel Corporation. ------------------------------------------------------------------------- The mind is like a parachute; it works much better when it's open.=20 --=-RRN3wrXtYLnin7gp7RIh Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 hv=
mloader.

Are you sure you don't have something stale?
I started with a fresh tree for your patch. I also tried rebuilding the que= mu from start.
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 x= en-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 co=
ntrol 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 =3D 0;
int fd_bootchk =3D 1;
int emulate_16bit =3D 1;

and in the hvmloader instead of checking the output of the port 595, I repl= aced it with if (1).
like this:
#if 0
        if (inl(0x595) =3D=3D 0xdeadbeef= ) {
#else
        if (1) {
#endif


Thanks & Regards,
Nitin
Open Source Technology Center, Int= el Corporation.
----------------------------------= ---------------------------------------
The mind is like a parachute; it w= orks much better when it's open.=20
--=-RRN3wrXtYLnin7gp7RIh-- --=-yuO8hO8CQSPTXwp0Rls/ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBGDFFKZ1sfU7kTCR8RAhdTAJ99pMjCRV8E/VZeXcaTakErBVBrygCdFsiU dc6mAiYXFyJw9rzKttlsFr8= =htK9 -----END PGP SIGNATURE----- --=-yuO8hO8CQSPTXwp0Rls/-- --===============0000139222== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0000139222==--