Skip to content

Commit

Permalink
Merge branch 'kvm-updates/3.1' of git://github.com/avikivity/kvm
Browse files Browse the repository at this point in the history
* 'kvm-updates/3.1' of git://github.com/avikivity/kvm:
  KVM: x86 emulator: fix Src2CL decode
  KVM: MMU: fix incorrect return of spte
  • Loading branch information
Linus Torvalds committed Sep 26, 2011
2 parents a2b4910 + 9be3be1 commit 231e58e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3603,7 +3603,7 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)
break;
case Src2CL:
ctxt->src2.bytes = 1;
ctxt->src2.val = ctxt->regs[VCPU_REGS_RCX] & 0x8;
ctxt->src2.val = ctxt->regs[VCPU_REGS_RCX] & 0xff;
break;
case Src2ImmByte:
rc = decode_imm(ctxt, &ctxt->src2, 1, true);
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ static u64 __update_clear_spte_slow(u64 *sptep, u64 spte)

/* xchg acts as a barrier before the setting of the high bits */
orig.spte_low = xchg(&ssptep->spte_low, sspte.spte_low);
orig.spte_high = ssptep->spte_high = sspte.spte_high;
orig.spte_high = ssptep->spte_high;
ssptep->spte_high = sspte.spte_high;
count_spte_clear(sptep, spte);

return orig.spte;
Expand Down

0 comments on commit 231e58e

Please sign in to comment.