diff options
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r-- | drivers/kvm/kvm.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 04574a9d4430..0d122bf889db 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include "vmx.h" | 15 | #include "vmx.h" |
16 | #include <linux/kvm.h> | 16 | #include <linux/kvm.h> |
17 | #include <linux/kvm_para.h> | ||
17 | 18 | ||
18 | #define CR0_PE_MASK (1ULL << 0) | 19 | #define CR0_PE_MASK (1ULL << 0) |
19 | #define CR0_TS_MASK (1ULL << 3) | 20 | #define CR0_TS_MASK (1ULL << 3) |
@@ -237,6 +238,9 @@ struct kvm_vcpu { | |||
237 | unsigned long cr0; | 238 | unsigned long cr0; |
238 | unsigned long cr2; | 239 | unsigned long cr2; |
239 | unsigned long cr3; | 240 | unsigned long cr3; |
241 | gpa_t para_state_gpa; | ||
242 | struct page *para_state_page; | ||
243 | gpa_t hypercall_gpa; | ||
240 | unsigned long cr4; | 244 | unsigned long cr4; |
241 | unsigned long cr8; | 245 | unsigned long cr8; |
242 | u64 pdptrs[4]; /* pae */ | 246 | u64 pdptrs[4]; /* pae */ |
@@ -305,6 +309,7 @@ struct kvm { | |||
305 | int busy; | 309 | int busy; |
306 | unsigned long rmap_overflow; | 310 | unsigned long rmap_overflow; |
307 | struct list_head vm_list; | 311 | struct list_head vm_list; |
312 | struct file *filp; | ||
308 | }; | 313 | }; |
309 | 314 | ||
310 | struct kvm_stat { | 315 | struct kvm_stat { |
@@ -339,7 +344,7 @@ struct kvm_arch_ops { | |||
339 | int (*vcpu_create)(struct kvm_vcpu *vcpu); | 344 | int (*vcpu_create)(struct kvm_vcpu *vcpu); |
340 | void (*vcpu_free)(struct kvm_vcpu *vcpu); | 345 | void (*vcpu_free)(struct kvm_vcpu *vcpu); |
341 | 346 | ||
342 | struct kvm_vcpu *(*vcpu_load)(struct kvm_vcpu *vcpu); | 347 | void (*vcpu_load)(struct kvm_vcpu *vcpu); |
343 | void (*vcpu_put)(struct kvm_vcpu *vcpu); | 348 | void (*vcpu_put)(struct kvm_vcpu *vcpu); |
344 | void (*vcpu_decache)(struct kvm_vcpu *vcpu); | 349 | void (*vcpu_decache)(struct kvm_vcpu *vcpu); |
345 | 350 | ||
@@ -382,6 +387,8 @@ struct kvm_arch_ops { | |||
382 | int (*run)(struct kvm_vcpu *vcpu, struct kvm_run *run); | 387 | int (*run)(struct kvm_vcpu *vcpu, struct kvm_run *run); |
383 | int (*vcpu_setup)(struct kvm_vcpu *vcpu); | 388 | int (*vcpu_setup)(struct kvm_vcpu *vcpu); |
384 | void (*skip_emulated_instruction)(struct kvm_vcpu *vcpu); | 389 | void (*skip_emulated_instruction)(struct kvm_vcpu *vcpu); |
390 | void (*patch_hypercall)(struct kvm_vcpu *vcpu, | ||
391 | unsigned char *hypercall_addr); | ||
385 | }; | 392 | }; |
386 | 393 | ||
387 | extern struct kvm_stat kvm_stat; | 394 | extern struct kvm_stat kvm_stat; |
@@ -476,6 +483,8 @@ void kvm_mmu_post_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes); | |||
476 | int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva); | 483 | int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva); |
477 | void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu); | 484 | void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu); |
478 | 485 | ||
486 | int kvm_hypercall(struct kvm_vcpu *vcpu, struct kvm_run *run); | ||
487 | |||
479 | static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, | 488 | static inline int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, |
480 | u32 error_code) | 489 | u32 error_code) |
481 | { | 490 | { |
@@ -523,7 +532,7 @@ static inline struct kvm_mmu_page *page_header(hpa_t shadow_page) | |||
523 | { | 532 | { |
524 | struct page *page = pfn_to_page(shadow_page >> PAGE_SHIFT); | 533 | struct page *page = pfn_to_page(shadow_page >> PAGE_SHIFT); |
525 | 534 | ||
526 | return (struct kvm_mmu_page *)page->private; | 535 | return (struct kvm_mmu_page *)page_private(page); |
527 | } | 536 | } |
528 | 537 | ||
529 | static inline u16 read_fs(void) | 538 | static inline u16 read_fs(void) |