Nitin A Kamble wrote: > Hi Avi, > Attached is the patch to initialize src.val & dst.val. Without this, > certain instructions are getting affected in their emulation. > > Please apply. > >
This seems like it is papering over other bugs. Some instructions use src.val or dst.val without having decoded the src or dst operand. Which instructions are these? Can we fix them instead? > Intialize src.val & dst.val, to fix bugs in certain instruction > emulations. > > Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]> > > diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c > index c2540c3..90ee392 100644 > --- a/drivers/kvm/x86_emulate.c > +++ b/drivers/kvm/x86_emulate.c > @@ -832,6 +832,7 @@ done_prefixes: > srcmem_common: > src.type = OP_MEM; > src.ptr = (unsigned long *)cr2; > + src.val = 0; > if ((rc = ops->read_emulated((unsigned long)src.ptr, > &src.val, src.bytes, ctxt->vcpu)) > != 0) > goto done; > @@ -896,6 +897,7 @@ done_prefixes: > dst.type = OP_MEM; > dst.ptr = (unsigned long *)cr2; > dst.bytes = (d & ByteOp) ? 1 : op_bytes; > + dst.val = 0; > if (d & BitOp) { > unsigned long mask = ~(dst.bytes * 8 - 1); > > -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel