diff options
author | Zhang Xiantao <xiantao.zhang@intel.com> | 2007-11-14 07:38:21 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:53:02 -0500 |
commit | e9b11c17552afe684e9e5d0444309a3ddf410116 (patch) | |
tree | f0905a61791645dbede13cbdf017ea458ffa54c5 /drivers/kvm/kvm.h | |
parent | 97896d04a14669b146c17d779b81ec7a339deeb3 (diff) |
KVM: Portability: Add vcpu and hardware management arch hooks
Add the following hooks:
void decache_vcpus_on_cpu(int cpu);
int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu);
void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu);
void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu);
void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu);
void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu);
struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id);
void kvm_arch_vcpu_destory(struct kvm_vcpu *vcpu);
int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu);
void kvm_arch_hardware_enable(void *garbage);
void kvm_arch_hardware_disable(void *garbage);
int kvm_arch_hardware_setup(void);
void kvm_arch_hardware_unsetup(void);
void kvm_arch_check_processor_compat(void *rtn);
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r-- | drivers/kvm/kvm.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 64983240adca..bca07c6d0460 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -492,6 +492,8 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu); | |||
492 | void vcpu_load(struct kvm_vcpu *vcpu); | 492 | void vcpu_load(struct kvm_vcpu *vcpu); |
493 | void vcpu_put(struct kvm_vcpu *vcpu); | 493 | void vcpu_put(struct kvm_vcpu *vcpu); |
494 | 494 | ||
495 | void decache_vcpus_on_cpu(int cpu); | ||
496 | |||
495 | 497 | ||
496 | int kvm_init_x86(struct kvm_x86_ops *ops, unsigned int vcpu_size, | 498 | int kvm_init_x86(struct kvm_x86_ops *ops, unsigned int vcpu_size, |
497 | struct module *module); | 499 | struct module *module); |
@@ -649,6 +651,23 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run); | |||
649 | 651 | ||
650 | __init void kvm_arch_init(void); | 652 | __init void kvm_arch_init(void); |
651 | 653 | ||
654 | int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu); | ||
655 | void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu); | ||
656 | |||
657 | void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu); | ||
658 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu); | ||
659 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu); | ||
660 | struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id); | ||
661 | void kvm_arch_vcpu_destory(struct kvm_vcpu *vcpu); | ||
662 | |||
663 | int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu); | ||
664 | void kvm_arch_hardware_enable(void *garbage); | ||
665 | void kvm_arch_hardware_disable(void *garbage); | ||
666 | int kvm_arch_hardware_setup(void); | ||
667 | void kvm_arch_hardware_unsetup(void); | ||
668 | void kvm_arch_check_processor_compat(void *rtn); | ||
669 | |||
670 | |||
652 | static inline void kvm_guest_enter(void) | 671 | static inline void kvm_guest_enter(void) |
653 | { | 672 | { |
654 | account_system_vtime(current); | 673 | account_system_vtime(current); |