Due to a not yet determined reason (data corruption elsewhere most likely) we''re seeing emulation failures. What caught my attention is the inconsistency of the CS values in this log fragment: (XEN) realmode.c:132:d4 Failed to emulate insn. (XEN) realmode.c:174:d4 Real-mode emulation failed @ aa55:0000ffea: cb 80 fa 8f 7e 02 (XEN) domain_crash called from realmode.c:175 (XEN) Domain 4 (vcpu#0) crashed on cpu#0: (XEN) ----[ Xen-3.3.1_18486_01-2.2 x86_32p debug=n Not tainted ]---- (XEN) CPU: 0 (XEN) EIP: f000:[<0000ffea>] (XEN) EFLAGS: 00000012 CONTEXT: hvm guest (XEN) eax: 0000aa55 ebx: 00000000 ecx: 000d0000 edx: 00000080 (XEN) esi: 00007e00 edi: 000005cc ebp: 00000000 esp: 0000ffda (XEN) cr0: 00000010 cr4: 00000000 cr3: 00000000 cr2: 00000000 (XEN) ds: 0000 es: 07c0 fs: 0000 gs: 0000 ss: 0000 cs: f000 For the register dump to be meaningful I''m therefore wondering whether, prior to crashing the domain, there shouldn''t be a call to hvm_emulate_writeback(). As a secondary thing, I can''t really see how emulation of a real-mode far return could ever fail with the register state given. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Nov-17 15:32 UTC
Re: [Xen-devel] guest state on realmode emulation failure
On 17/11/08 15:26, "Jan Beulich" <jbeulich@novell.com> wrote:> As a secondary thing, I can''t really see how emulation of a real-mode far > return could ever fail with the register state given.Have you tested with xen-unstable changeset 18766? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2008-Nov-17 15:55 UTC
Re: [Xen-devel] guest state on realmode emulation failure
>>> Keir Fraser <keir.fraser@eu.citrix.com> 17.11.08 16:32 >>> >On 17/11/08 15:26, "Jan Beulich" <jbeulich@novell.com> wrote: > >> As a secondary thing, I can''t really see how emulation of a real-mode far >> return could ever fail with the register state given. > >Have you tested with xen-unstable changeset 18766?Not yet, but shouldn''t that affect things only when ''mis-''using real mode (e.g. by leaving a 32-bit default operand size set)? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Nov-17 15:58 UTC
Re: [Xen-devel] guest state on realmode emulation failure
On 17/11/08 15:55, "Jan Beulich" <jbeulich@novell.com> wrote:>>> As a secondary thing, I can''t really see how emulation of a real-mode far >>> return could ever fail with the register state given. >> >> Have you tested with xen-unstable changeset 18766? > > Not yet, but shouldn''t that affect things only when ''mis-''using real mode > (e.g. by leaving a 32-bit default operand size set)?No, realmode_deliver_exception() was testing a potentially uninitialised field. It''s a nasty little bug that thus occasionally, whether real mode is abused or not, causes you to write through ESP rather than SP. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel