[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] x86_emulate(): forgot to generate_exception_if() for 0xff?


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Liu, Eric E" <eric.e.liu@xxxxxxxxx>
  • Date: Wed, 19 Dec 2007 17:34:03 +0800
  • Delivery-date: Wed, 19 Dec 2007 01:35:51 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AchCIkspvq503+fcSaGc/QzK2IvTbA==
  • Thread-topic: x86_emulate(): forgot to generate_exception_if() for 0xff?

Hi all,
In arch/x86/x86_emulate.c: x86_emulate():
   1716     case 0xfe: /* Grp4 */
   1717         generate_exception_if((m odrm_reg & 7) >= 2, EXC_UD);
   1718     case 0xff: /* Grp5 */
   1719         switch ( modrm_reg & 7 )
   1720         {
   1721         case 0: /* inc */
   1722             emulate_1op("inc", dst, _regs.eflags);
   1723             break;
   1724         case 1: /* dec */
   1725             emulate_1op("dec", dst, _regs.eflags);
   1726             break;

Here we only check 0xfe for "reg >= 2"? I think we should also check
0xff -- we should swap line 1717 and 1718?

Thanks!
--Eric (Liu, Feng)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.