-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 115224 b: refs/heads/master c: 5fdbf97 h: refs/heads/master v: v3
- Loading branch information
Marcelo Tosatti
authored and
Avi Kivity
committed
Oct 15, 2008
1 parent
d1de129
commit b439c15
Showing
8 changed files
with
265 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: ca60dfbb69afb549e33527cbf676e4daf8febfb5 | ||
refs/heads/master: 5fdbf9765b7ba6a45100851154768de703d51e76 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifndef ASM_KVM_CACHE_REGS_H | ||
#define ASM_KVM_CACHE_REGS_H | ||
|
||
static inline unsigned long kvm_register_read(struct kvm_vcpu *vcpu, | ||
enum kvm_reg reg) | ||
{ | ||
if (!test_bit(reg, (unsigned long *)&vcpu->arch.regs_avail)) | ||
kvm_x86_ops->cache_reg(vcpu, reg); | ||
|
||
return vcpu->arch.regs[reg]; | ||
} | ||
|
||
static inline void kvm_register_write(struct kvm_vcpu *vcpu, | ||
enum kvm_reg reg, | ||
unsigned long val) | ||
{ | ||
vcpu->arch.regs[reg] = val; | ||
__set_bit(reg, (unsigned long *)&vcpu->arch.regs_dirty); | ||
__set_bit(reg, (unsigned long *)&vcpu->arch.regs_avail); | ||
} | ||
|
||
static inline unsigned long kvm_rip_read(struct kvm_vcpu *vcpu) | ||
{ | ||
return kvm_register_read(vcpu, VCPU_REGS_RIP); | ||
} | ||
|
||
static inline void kvm_rip_write(struct kvm_vcpu *vcpu, unsigned long val) | ||
{ | ||
kvm_register_write(vcpu, VCPU_REGS_RIP, val); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.