KVM: x86 emulator: make emulator memory callbacks return full exception
This way, they can return #GP, not just #PF. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
@@ -70,7 +70,8 @@ struct x86_emulate_ops {
|
||||
* @bytes: [IN ] Number of bytes to read from memory.
|
||||
*/
|
||||
int (*read_std)(unsigned long addr, void *val,
|
||||
unsigned int bytes, struct kvm_vcpu *vcpu, u32 *error);
|
||||
unsigned int bytes, struct kvm_vcpu *vcpu,
|
||||
struct x86_exception *fault);
|
||||
|
||||
/*
|
||||
* write_std: Write bytes of standard (non-emulated/special) memory.
|
||||
@@ -80,7 +81,8 @@ struct x86_emulate_ops {
|
||||
* @bytes: [IN ] Number of bytes to write to memory.
|
||||
*/
|
||||
int (*write_std)(unsigned long addr, void *val,
|
||||
unsigned int bytes, struct kvm_vcpu *vcpu, u32 *error);
|
||||
unsigned int bytes, struct kvm_vcpu *vcpu,
|
||||
struct x86_exception *fault);
|
||||
/*
|
||||
* fetch: Read bytes of standard (non-emulated/special) memory.
|
||||
* Used for instruction fetch.
|
||||
@@ -89,7 +91,8 @@ struct x86_emulate_ops {
|
||||
* @bytes: [IN ] Number of bytes to read from memory.
|
||||
*/
|
||||
int (*fetch)(unsigned long addr, void *val,
|
||||
unsigned int bytes, struct kvm_vcpu *vcpu, u32 *error);
|
||||
unsigned int bytes, struct kvm_vcpu *vcpu,
|
||||
struct x86_exception *fault);
|
||||
|
||||
/*
|
||||
* read_emulated: Read bytes from emulated/special memory area.
|
||||
@@ -100,7 +103,7 @@ struct x86_emulate_ops {
|
||||
int (*read_emulated)(unsigned long addr,
|
||||
void *val,
|
||||
unsigned int bytes,
|
||||
unsigned int *error,
|
||||
struct x86_exception *fault,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
/*
|
||||
@@ -113,7 +116,7 @@ struct x86_emulate_ops {
|
||||
int (*write_emulated)(unsigned long addr,
|
||||
const void *val,
|
||||
unsigned int bytes,
|
||||
unsigned int *error,
|
||||
struct x86_exception *fault,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
/*
|
||||
@@ -128,7 +131,7 @@ struct x86_emulate_ops {
|
||||
const void *old,
|
||||
const void *new,
|
||||
unsigned int bytes,
|
||||
unsigned int *error,
|
||||
struct x86_exception *fault,
|
||||
struct kvm_vcpu *vcpu);
|
||||
|
||||
int (*pio_in_emulated)(int size, unsigned short port, void *val,
|
||||
|
||||
Reference in New Issue
Block a user