On Wed, Apr 28, 2010 at 12:11:41PM +0300, Avi Kivity wrote: > On 04/27/2010 03:15 PM, Gleb Natapov wrote: > >Return error to x86 emulator instead of injection exception behind its back. > > > >Signed-off-by: Gleb Natapov<gleb@xxxxxxxxxx> > >--- > > arch/x86/include/asm/kvm_emulate.h | 3 +++ > > arch/x86/kvm/emulate.c | 12 +++++++++++- > > arch/x86/kvm/x86.c | 28 ++++++++++++++-------------- > > 3 files changed, 28 insertions(+), 15 deletions(-) > > > >diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h > >index ae4af86..b977ccf 100644 > >--- a/arch/x86/include/asm/kvm_emulate.h > >+++ b/arch/x86/include/asm/kvm_emulate.h > >@@ -94,6 +94,7 @@ struct x86_emulate_ops { > > int (*read_emulated)(unsigned long addr, > > void *val, > > unsigned int bytes, > >+ unsigned int *error, > > struct kvm_vcpu *vcpu); > > > > The fault may be at a different address than addr, if we cross a > page boundary. Need a struct here. > Correct and you can find couple of FIXME in emulator.c that say so. I'll fix that later. This is not the problem that was introduced by this patch set. What do you mean we need struct here? Struct with error code + error location? After looking at the code: only write_emulated handle cross page access correctly now. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html