* [PATCH] implement pop reg in x86_emulate
@ 2007-06-07 22:22 Kamble, Nitin A
[not found] ` <1181254922.21568.16.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Kamble, Nitin A @ 2007-06-07 22:22 UTC (permalink / raw)
To: kvm-devel; +Cc: Yu, Wilfred, Mallick, Asit K
[-- Attachment #1.1.1.1: Type: text/plain, Size: 1420 bytes --]
Hi Avi,
I am in the middle of implementing the big real support in the KVM
now. I am trying to boot SuseLinux 10.1 on KVM, which uses extensive big
real mode code in the boot loader. If you have any other targeted guests
using big real mode do let me know.
I have been working on my own private tree for a while. I sync it
with the KVM tree every day. I have lots of debug code in the
infrastructure part of the big-real mode support. Also I think I may
need to extend/change it further to support more instructions. So I plan
to hold the infrastructure patches for now. Meanwhile I have implemented
emulation of the needed instructions. As it is well contained and should
not affect any code path, this instruction implementation can go
upstream right away,
Attached is a patch for the "pop reg" instruction emulation. I will
be sending more of such instruction emulation patches very soon, I just
need to break them apart from my debug tree. Do provide me if you have
any feedback on these. And once I get the big-real mode support working
well enough, I will start cleaning the remaining code from debug
statements, and start pushing that code in patches to you.
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation.
-------------------------------------------------------------------------
The mind is like a parachute; it works much better when it's open.
[-- Attachment #1.1.1.2: Type: text/html, Size: 2068 bytes --]
[-- Attachment #1.1.2: pop_reg.patch --]
[-- Type: text/x-patch, Size: 1311 bytes --]
commit ad25cea4de1236f5916bf99832ab86348750493b
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date: Thu Jun 7 18:06:35 2007 -0700
Implement "pop reg" instruction opcode 0x58-0x5f
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index a4a8481..46d4124 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -99,7 +99,7 @@ static u8 opcode_table[256] = {
/* 0x40 - 0x4F */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x50 - 0x5F */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps, 0, 0, 0, 0, 0, 0, 0,
/* 0x60 - 0x6F */
0, 0, 0, DstReg | SrcMem32 | ModRM | Mov /* movsxd (x86/64) */ ,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1113,6 +1113,17 @@ special_insn:
_eip = ctxt->vcpu->rip;
}
switch (b) {
+ case 0x58 ... 0x5f: /* pop reg */
+ dst.type = OP_REG;
+ dst.bytes = op_bytes;
+ dst.ptr = (unsigned long *)&_regs[b & 0x7];
+
+ if ((rc = ops->read_std(register_address(ctxt->ss_base,
+ _regs[VCPU_REGS_RSP]),
+ dst.ptr, dst.bytes, ctxt)) != 0)
+ goto done;
+ register_address_increment(_regs[VCPU_REGS_RSP], dst.bytes);
+ break;
case 0xa4 ... 0xa5: /* movs */
dst.type = OP_MEM;
dst.bytes = (d & ByteOp) ? 1 : op_bytes;
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
[-- Attachment #3: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] implement pop reg in x86_emulate
[not found] ` <1181254922.21568.16.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
@ 2007-06-08 3:52 ` H. Peter Anvin
[not found] ` <4668D280.3000009-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2007-06-10 7:47 ` Avi Kivity
1 sibling, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2007-06-08 3:52 UTC (permalink / raw)
To: Kamble, Nitin A; +Cc: kvm-devel, Yu, Wilfred, Mallick, Asit K
Kamble, Nitin A wrote:
> Hi Avi,
> I am in the middle of implementing the big real support in the KVM
> now. I am trying to boot SuseLinux 10.1 on KVM, which uses extensive big
> real mode code in the boot loader.
Ye gods, what boot loader is that?
-hpa
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] implement pop reg in x86_emulate
[not found] ` <4668D280.3000009-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
@ 2007-06-08 17:43 ` Kamble, Nitin A
[not found] ` <1181324614.28454.9.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Kamble, Nitin A @ 2007-06-08 17:43 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: kvm-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 917 bytes --]
On Thu, 2007-06-07 at 20:52 -0700, H. Peter Anvin wrote:
> Kamble, Nitin A wrote:
> > Hi Avi,
> > I am in the middle of implementing the big real support in the
> KVM
> > now. I am trying to boot SuseLinux 10.1 on KVM, which uses extensive
> big
> > real mode code in the boot loader.
>
> Ye gods, what boot loader is that?
>
SuSE has added their own extension to the syslinux bootloade for the
fancy graphics animation screen at the boot time, the syslinux code is
written in real mode code, but they needed more than 1MB memory access
for the graphics memory access, and they are using the big real mode for
accessing more than 1MB there.
> -hpa
>
>
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation.
-------------------------------------------------------------------------
The mind is like a parachute; it works much better when it's open.
[-- Attachment #1.1.2: Type: text/html, Size: 2148 bytes --]
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
[-- Attachment #3: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] implement pop reg in x86_emulate
[not found] ` <1181324614.28454.9.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
@ 2007-06-08 17:50 ` H. Peter Anvin
[not found] ` <466996D5.5070608-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2007-06-08 17:50 UTC (permalink / raw)
To: Kamble, Nitin A; +Cc: kvm-devel
Kamble, Nitin A wrote:
> On Thu, 2007-06-07 at 20:52 -0700, H. Peter Anvin wrote:
>> Kamble, Nitin A wrote:
>> > Hi Avi,
>> > I am in the middle of implementing the big real support in the KVM
>> > now. I am trying to boot SuseLinux 10.1 on KVM, which uses extensive big
>> > real mode code in the boot loader.
>>
>> Ye gods, what boot loader is that?
>>
> SuSE has added their own extension to the syslinux bootloade for the
> fancy graphics animation screen at the boot time, the syslinux code is
> written in real mode code, but they needed more than 1MB memory access
> for the graphics memory access, and they are using the big real mode for
> accessing more than 1MB there.
Oh gawd. Wow. You've just told me yet another reason why I will not
EVER merge the gfxboot patch into stock syslinux.
-hpa
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] implement pop reg in x86_emulate
[not found] ` <466996D5.5070608-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
@ 2007-06-08 17:59 ` Kamble, Nitin A
[not found] ` <5461330FA59EDB46BE9AB8AAF2C431AD045D1A15-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Kamble, Nitin A @ 2007-06-08 17:59 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: kvm-devel
Hi Peter,
I see SuSE has taken a fail back path to the code so the
releases after 10.3 detects the presence of VMM and avoid the big real
mode path.
I think people from SuSE should be able to confirm it better for you.
Thanks & Regards,
Nitin
Linux Open Source Technology Center
Intel Corporation, Santa Clara, CA
-----Original Message-----
From: H. Peter Anvin [mailto:hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org]
Sent: Friday, June 08, 2007 10:50 AM
To: Kamble, Nitin A
Cc: kvm-devel
Subject: Re: [kvm-devel] [PATCH] implement pop reg in x86_emulate
Kamble, Nitin A wrote:
> On Thu, 2007-06-07 at 20:52 -0700, H. Peter Anvin wrote:
>> Kamble, Nitin A wrote:
>> > Hi Avi,
>> > I am in the middle of implementing the big real support in the
KVM
>> > now. I am trying to boot SuseLinux 10.1 on KVM, which uses
extensive big
>> > real mode code in the boot loader.
>>
>> Ye gods, what boot loader is that?
>>
> SuSE has added their own extension to the syslinux bootloade for the
> fancy graphics animation screen at the boot time, the syslinux code is
> written in real mode code, but they needed more than 1MB memory access
> for the graphics memory access, and they are using the big real mode
for
> accessing more than 1MB there.
Oh gawd. Wow. You've just told me yet another reason why I will not
EVER merge the gfxboot patch into stock syslinux.
-hpa
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] implement pop reg in x86_emulate
[not found] ` <5461330FA59EDB46BE9AB8AAF2C431AD045D1A15-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-06-08 18:03 ` H. Peter Anvin
0 siblings, 0 replies; 7+ messages in thread
From: H. Peter Anvin @ 2007-06-08 18:03 UTC (permalink / raw)
To: Kamble, Nitin A; +Cc: kvm-devel
Kamble, Nitin A wrote:
> Hi Peter,
> I see SuSE has taken a fail back path to the code so the
> releases after 10.3 detects the presence of VMM and avoid the big real
> mode path.
> I think people from SuSE should be able to confirm it better for you.
Big real mode is evil in the extreme no matter how you slice it. It
breaks things all over the place, including BIOSes.
People seem to use it because they think it's safe to call the BIOS from
BRM, it's not. Once you realize that you realize that you might as well
do proper PM and avoid the 67 prefixes.
-hpa
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] implement pop reg in x86_emulate
[not found] ` <1181254922.21568.16.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-06-08 3:52 ` H. Peter Anvin
@ 2007-06-10 7:47 ` Avi Kivity
1 sibling, 0 replies; 7+ messages in thread
From: Avi Kivity @ 2007-06-10 7:47 UTC (permalink / raw)
To: Kamble, Nitin A; +Cc: kvm-devel, Yu, Wilfred, Mallick, Asit K
Kamble, Nitin A wrote:
> Hi Avi,
> I am in the middle of implementing the big real support in the KVM
> now. I am trying to boot SuseLinux 10.1 on KVM, which uses extensive
> big real mode code in the boot loader. If you have any other targeted
> guests using big real mode do let me know.
> I have been working on my own private tree for a while. I sync it
> with the KVM tree every day. I have lots of debug code in the
> infrastructure part of the big-real mode support. Also I think I may
> need to extend/change it further to support more instructions. So I
> plan to hold the infrastructure patches for now. Meanwhile I have
> implemented emulation of the needed instructions. As it is well
> contained and should not affect any code path, this instruction
> implementation can go upstream right away,
> Attached is a patch for the "pop reg" instruction emulation. I will
> be sending more of such instruction emulation patches very soon, I
> just need to break them apart from my debug tree. Do provide me if you
> have any feedback on these. And once I get the big-real mode support
> working well enough, I will start cleaning the remaining code from
> debug statements, and start pushing that code in patches to you.
Great, fixing real mode is very important.
The patch looks ok, but it is whitespace-damaged. Please use
scripts/checkpatch.pl to check patches before sending. It is also in
dos file format (crlf).
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-06-10 7:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-07 22:22 [PATCH] implement pop reg in x86_emulate Kamble, Nitin A
[not found] ` <1181254922.21568.16.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-06-08 3:52 ` H. Peter Anvin
[not found] ` <4668D280.3000009-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2007-06-08 17:43 ` Kamble, Nitin A
[not found] ` <1181324614.28454.9.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-06-08 17:50 ` H. Peter Anvin
[not found] ` <466996D5.5070608-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2007-06-08 17:59 ` Kamble, Nitin A
[not found] ` <5461330FA59EDB46BE9AB8AAF2C431AD045D1A15-1a9uaKK1+wJcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-06-08 18:03 ` H. Peter Anvin
2007-06-10 7:47 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox