diff options
author | Avi Kivity <avi@redhat.com> | 2010-01-25 19:47:02 +0200 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 12:36:06 -0300 |
commit | 59200273c4d07ddf99dd3c8d91b90bb170457fc3 (patch) | |
tree | bd0ecc72152d19f272248c8186b2f412df56bcf2 /arch/x86/kvm/vmx.c | |
parent | 6e7d15296773f7a479072ec7f3248f51d01e1fad (diff) | |
download | lwn-59200273c4d07ddf99dd3c8d91b90bb170457fc3.tar.gz lwn-59200273c4d07ddf99dd3c8d91b90bb170457fc3.zip |
KVM: Trace failed msr reads and writes
Record failed msrs reads and writes, and the fact that they failed as well.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 7a56879a058c..334b016267a9 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3158,6 +3158,7 @@ static int handle_rdmsr(struct kvm_vcpu *vcpu) u64 data; if (vmx_get_msr(vcpu, ecx, &data)) { + trace_kvm_msr_read_ex(ecx); kvm_inject_gp(vcpu, 0); return 1; } @@ -3177,13 +3178,13 @@ static int handle_wrmsr(struct kvm_vcpu *vcpu) u64 data = (vcpu->arch.regs[VCPU_REGS_RAX] & -1u) | ((u64)(vcpu->arch.regs[VCPU_REGS_RDX] & -1u) << 32); - trace_kvm_msr_write(ecx, data); - if (vmx_set_msr(vcpu, ecx, data) != 0) { + trace_kvm_msr_write_ex(ecx, data); kvm_inject_gp(vcpu, 0); return 1; } + trace_kvm_msr_write(ecx, data); skip_emulated_instruction(vcpu); return 1; } |