Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248075
b: refs/heads/master
c: 40e19b5
h: refs/heads/master
i:
  248073: 1b50be5
  248071: 7436db4
v: v3
  • Loading branch information
Avi Kivity committed May 22, 2011
1 parent a508ca0 commit 091d1c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ef39c71d8398115245a5974b488f8703ba3a6b0
refs/heads/master: 40e19b519caeb93def89c45082d776fccfb96dbb
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/kvm_emulate.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ struct x86_emulate_ctxt {
X86EMUL_MODE_PROT64)

enum x86_intercept_stage {
X86_ICTP_NONE = 0, /* Allow zero-init to not match anything */
X86_ICPT_PRE_EXCEPT,
X86_ICPT_POST_EXCEPT,
X86_ICPT_POST_MEMACCESS,
Expand Down
12 changes: 4 additions & 8 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3959,19 +3959,15 @@ static void svm_fpu_deactivate(struct kvm_vcpu *vcpu)
}

#define PRE_EX(exit) { .exit_code = (exit), \
.stage = X86_ICPT_PRE_EXCEPT, \
.valid = true }
.stage = X86_ICPT_PRE_EXCEPT, }
#define POST_EX(exit) { .exit_code = (exit), \
.stage = X86_ICPT_POST_EXCEPT, \
.valid = true }
.stage = X86_ICPT_POST_EXCEPT, }
#define POST_MEM(exit) { .exit_code = (exit), \
.stage = X86_ICPT_POST_MEMACCESS, \
.valid = true }
.stage = X86_ICPT_POST_MEMACCESS, }

static struct __x86_intercept {
u32 exit_code;
enum x86_intercept_stage stage;
bool valid;
} x86_intercept_map[] = {
[x86_intercept_cr_read] = POST_EX(SVM_EXIT_READ_CR0),
[x86_intercept_cr_write] = POST_EX(SVM_EXIT_WRITE_CR0),
Expand Down Expand Up @@ -4039,7 +4035,7 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu,

icpt_info = x86_intercept_map[info->intercept];

if (!icpt_info.valid || stage != icpt_info.stage)
if (stage != icpt_info.stage)
goto out;

switch (icpt_info.exit_code) {
Expand Down

0 comments on commit 091d1c3

Please sign in to comment.