From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Castro Subject: Re: hvm crash on hypercall event channel Date: Wed, 11 Apr 2012 21:24:41 +0900 Message-ID: References: <20120410121344.GA1955@ocelot.phlegethon.org> <1334145989.16387.7.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1334145989.16387.7.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , "Tim (Xen.org)" List-Id: xen-devel@lists.xenproject.org On Wed, Apr 11, 2012 at 9:06 PM, Ian Campbell wro= te: > On Wed, 2012-04-11 at 13:02 +0100, Daniel Castro wrote: >> On Tue, Apr 10, 2012 at 9:13 PM, Tim Deegan wrote: >> > At 20:30 +0900 on 10 Apr (1334089815), Daniel Castro wrote: >> >> Hello All, >> >> >> >> I am writing the PV-Drivers for Seabios. >> >> >> >> When I put a request on the front ring and issue the hypercall to >> >> notify, the hvm guest crashes. >> >> >> >> Here is the dmesg output: >> >> >> >> (XEN) realmode.c:116:d10 Failed to emulate insn. >> >> (XEN) realmode.c:166:d10 Real-mode emulation failed @ f000:00001c4b: >> >> 0f aa ba b2 00 ec >> > >> > 0F AA is RSM, which is a pretty surprising instruction to find in a >> > hypercall invocation -- or indeed anywhere outside machine-specific SMM >> > code. =A0Is there SMM code in SeaBIOS? =A0It may be that you've ended = up >> > jumping to a misaligned instruction boundary. >> > >> >> Nothing out of the ordinary. Except that the hypercall is issued under >> >> 16bit, It works under 32bit. >> > >> > Are you using the hypercall page to make your hypercall? =A0Its conten= ts >> > don't make sense in 16-bit mode, only in 32-bit and 64-bit. =A0Since t= he >> > register arguments are 32-bit anyway you might want to make all your >> > hypercalls from 32-bit code anyway; otherwise you'll need to make your >> > own 16-bit stubs, with the right prefixes for the MOV imm32. >> >> I have no idea how to fix this :( > > It's looking likely that you'll have to go to 32 bit mode to do all of > the actual I/O associated with the PV devices. That ought to simplify a > bunch of stuff WRT handling the rings etc too. What are my choices? 1. Add support for 16bit hypercalls on Xen. 2. Jump to 32 bit 3. make a 16bit "special" hypercall on SeaBIOS 4. Any other choice? Thanks to all the comments. > > Ian. > > > -- = +-=3D=3D=3D=3D=3D---------------------------+ | +---------------------------------+ | This space intentionally blank for notetaking. | |=A0=A0 | Daniel Castro,=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | | |=A0=A0 | Consultant/Programmer.| | |=A0=A0 | U Andes=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 | +-------------------------------------+