From: "Jan Beulich" Subject: Re: [qemu-upstream-unstable test] 21375: regressions - FAIL Date: Tue, 19 Nov 2013 13:05:37 +0000 Message-ID: <528B703102000078001047B0@nat28.tlf.novell.com> References: <1383302596.672.25.camel@kazak.uk.xensource.com> <20131101115831.GL3195@perard.uk.xensource.com> <1383307611.672.47.camel@kazak.uk.xensource.com> <20131101154636.GM3195@perard.uk.xensource.com> <20131106172229.GT3195@perard.uk.xensource.com> <20131118171844.GC2663@perard.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartE2D13631.2__=" Return-path: In-Reply-To: <20131118171844.GC2663@perard.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: Anthony PERARD Cc: "xen.org" , xen-devel@lists.xensource.com, Stefano Stabellini , Ian Campbell List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartE2D13631.2__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline >>> On 18.11.13 at 18:18, Anthony PERARD = wrote: > An other update, >=20 > we had the idee of trying this on earlier versin of Xen, and it turns > out that Xen 4.3 works fine. One bisect later, and a commit turns out. >=20 > commit 86781624f8df1d50eb4185cfc2ddce926798f7aa > x86_emulate: PUSH must read source operand just once > ... for the case of accessing MMIO. >=20 > So after this commit, syslinux stop working correctly with the last > version of QEMU. This happen if QEMU is calling track_dirty_vram. >=20 > I also have use xentrace/xenalyze to try to grab more information about > the issue, it did not really help, but it's tell me that the guest is > stock on a specific instruction (it result in vmexit EPT_VIOLATION over > and over on xentrace). And that were the guest is stock: >=20 > 0xa126: mov %eax,%cr0 > 0xa129: ljmp $0xf2e,$0xa12e > 0xa130: mov $0x26,%dl > 0xa132: or %bh,(%eax) > 0xa134: movzww %sp,%sp > 0xa138: mov %edx,%ds > 0xa13a: mov %edx,%es > 0xa13c: mov %edx,%fs > 0xa13e: mov %edx,%gs > 0xa140: jmp *%ebx > 0xa142: pushf =20 > =3D> 0xa143: lcall *%cs:(%si) > 0xa147: mov $0x0,%ch >=20 > Before trying on earlier version of Xen, I try to understand what when > wrong on the Xen side, it turn out that, in the track_dirty_vram > hypercall, a call to hap_enable_log_dirty() is all that needed to break > the guest. >=20 > Jan, any idee of what the issue is? Oh, indeed, I screwed this up without noticing. Please try the attached patch. Jan --=__PartE2D13631.2__= Content-Type: text/plain; name="x86-emul-far-call.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-emul-far-call.patch" x86: fix emulation of indirect far calls and jumps=0A=0ACommit 86781624 = ("x86_emulate: PUSH must read source operand=0Ajust once") corrected = the operands of those of the operations of opcode=0Aextension group 5 that = only read memory from SrcMem to DstMem, but=0Afailed to also switch the = use of "dst" here to "src".=0A=0AReported-by: Anthony Perard =0ASigned-off-by: Jan Beulich =0A=0A--- = a/xen/arch/x86/x86_emulate/x86_emulate.c=0A+++ b/xen/arch/x86/x86_emulate/x= 86_emulate.c=0A@@ -3571,7 +3571,6 @@ x86_emulate(=0A _regs.eip = =3D src.val;=0A src.val =3D dst.val;=0A goto = push;=0A- break;=0A case 4: /* jmp (near) */=0A = _regs.eip =3D src.val;=0A dst.type =3D OP_NONE;=0A@@ = -3580,9 +3579,9 @@ x86_emulate(=0A case 5: /* jmp (far, absolute = indirect) */ {=0A unsigned long sel;=0A =0A- = generate_exception_if(dst.type !=3D OP_MEM, EXC_UD, -1);=0A+ = generate_exception_if(src.type !=3D OP_MEM, EXC_UD, -1);=0A =0A- = if ( (rc =3D read_ulong(dst.mem.seg, dst.mem.off+dst.bytes,=0A+ = if ( (rc =3D read_ulong(src.mem.seg, src.mem.off + op_bytes,=0A = &sel, 2, ctxt, ops)) )=0A goto = done;=0A =0A@@ -3600,7 +3599,7 @@ x86_emulate(=0A =0A if ( (rc = =3D load_seg(x86_seg_cs, sel, ctxt, ops)) !=3D 0 )=0A goto = done;=0A- _regs.eip =3D dst.val;=0A+ _regs.eip =3D = src.val;=0A =0A dst.type =3D OP_NONE;=0A break;=0A --=__PartE2D13631.2__= 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.xen.org http://lists.xen.org/xen-devel --=__PartE2D13631.2__=--