KVM: Pull extra page fault information into struct x86_exception
authorAvi Kivity <avi@redhat.com>
Mon, 29 Nov 2010 14:12:30 +0000 (16:12 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 12 Jan 2011 09:30:02 +0000 (11:30 +0200)
commit6389ee946303cb4313dba0a49865e495a53351ff
tree478c8f5f4d9f75d77808d648adbc8948050ffee7
parent8c28d031657adaf238634ac406834a839d7fa43d
KVM: Pull extra page fault information into struct x86_exception

Currently page fault cr2 and nesting infomation are carried outside
the fault data structure.  Instead they are placed in the vcpu struct,
which results in confusion as global variables are manipulated instead
of passing parameters.

Fix this issue by adding address and nested fields to struct x86_exception,
so this struct can carry all information associated with a fault.

Signed-off-by: Avi Kivity <avi@redhat.com>
Tested-by: Joerg Roedel <joerg.roedel@amd.com>
Tested-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/include/asm/kvm_emulate.h
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/svm.c
arch/x86/kvm/x86.c