diff options
author | Avi Kivity <avi@qumranet.com> | 2007-09-10 11:10:54 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 04:18:28 -0400 |
commit | 04d2cc7780d48a212843e38d46402d97fa1f4774 (patch) | |
tree | a209131bad59abcf574abbaae23145db3c4005e0 /drivers/kvm/kvm.h | |
parent | 29bd8a78082f2d7e2165a735f50b5c716ef3213b (diff) |
KVM: Move main vcpu loop into subarch independent code
This simplifies adding new code as well as reducing overall code size.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r-- | drivers/kvm/kvm.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 42bb225ad6c1..d93ab48424c6 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -453,13 +453,16 @@ struct kvm_x86_ops { | |||
453 | /* Create, but do not attach this VCPU */ | 453 | /* Create, but do not attach this VCPU */ |
454 | struct kvm_vcpu *(*vcpu_create)(struct kvm *kvm, unsigned id); | 454 | struct kvm_vcpu *(*vcpu_create)(struct kvm *kvm, unsigned id); |
455 | void (*vcpu_free)(struct kvm_vcpu *vcpu); | 455 | void (*vcpu_free)(struct kvm_vcpu *vcpu); |
456 | void (*vcpu_reset)(struct kvm_vcpu *vcpu); | ||
456 | 457 | ||
458 | void (*prepare_guest_switch)(struct kvm_vcpu *vcpu); | ||
457 | void (*vcpu_load)(struct kvm_vcpu *vcpu, int cpu); | 459 | void (*vcpu_load)(struct kvm_vcpu *vcpu, int cpu); |
458 | void (*vcpu_put)(struct kvm_vcpu *vcpu); | 460 | void (*vcpu_put)(struct kvm_vcpu *vcpu); |
459 | void (*vcpu_decache)(struct kvm_vcpu *vcpu); | 461 | void (*vcpu_decache)(struct kvm_vcpu *vcpu); |
460 | 462 | ||
461 | int (*set_guest_debug)(struct kvm_vcpu *vcpu, | 463 | int (*set_guest_debug)(struct kvm_vcpu *vcpu, |
462 | struct kvm_debug_guest *dbg); | 464 | struct kvm_debug_guest *dbg); |
465 | void (*guest_debug_pre)(struct kvm_vcpu *vcpu); | ||
463 | int (*get_msr)(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata); | 466 | int (*get_msr)(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata); |
464 | int (*set_msr)(struct kvm_vcpu *vcpu, u32 msr_index, u64 data); | 467 | int (*set_msr)(struct kvm_vcpu *vcpu, u32 msr_index, u64 data); |
465 | u64 (*get_segment_base)(struct kvm_vcpu *vcpu, int seg); | 468 | u64 (*get_segment_base)(struct kvm_vcpu *vcpu, int seg); |
@@ -491,12 +494,16 @@ struct kvm_x86_ops { | |||
491 | 494 | ||
492 | void (*inject_gp)(struct kvm_vcpu *vcpu, unsigned err_code); | 495 | void (*inject_gp)(struct kvm_vcpu *vcpu, unsigned err_code); |
493 | 496 | ||
494 | int (*run)(struct kvm_vcpu *vcpu, struct kvm_run *run); | 497 | void (*run)(struct kvm_vcpu *vcpu, struct kvm_run *run); |
498 | int (*handle_exit)(struct kvm_run *run, struct kvm_vcpu *vcpu); | ||
495 | void (*skip_emulated_instruction)(struct kvm_vcpu *vcpu); | 499 | void (*skip_emulated_instruction)(struct kvm_vcpu *vcpu); |
496 | void (*patch_hypercall)(struct kvm_vcpu *vcpu, | 500 | void (*patch_hypercall)(struct kvm_vcpu *vcpu, |
497 | unsigned char *hypercall_addr); | 501 | unsigned char *hypercall_addr); |
498 | int (*get_irq)(struct kvm_vcpu *vcpu); | 502 | int (*get_irq)(struct kvm_vcpu *vcpu); |
499 | void (*set_irq)(struct kvm_vcpu *vcpu, int vec); | 503 | void (*set_irq)(struct kvm_vcpu *vcpu, int vec); |
504 | void (*inject_pending_irq)(struct kvm_vcpu *vcpu); | ||
505 | void (*inject_pending_vectors)(struct kvm_vcpu *vcpu, | ||
506 | struct kvm_run *run); | ||
500 | }; | 507 | }; |
501 | 508 | ||
502 | extern struct kvm_x86_ops *kvm_x86_ops; | 509 | extern struct kvm_x86_ops *kvm_x86_ops; |