diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
commit | bcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch) | |
tree | 2f6dffd2d3e4dd67355a224de7e7a960335a92fd /include/linux/kvm.h | |
parent | 11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff) | |
parent | 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff) |
Merge commit 'origin/master' into next
Conflicts:
include/linux/kvm.h
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r-- | include/linux/kvm.h | 274 |
1 files changed, 156 insertions, 118 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index caf6173bd2e8..a24de0b1858e 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -14,12 +14,76 @@ | |||
14 | 14 | ||
15 | #define KVM_API_VERSION 12 | 15 | #define KVM_API_VERSION 12 |
16 | 16 | ||
17 | /* for KVM_TRACE_ENABLE, deprecated */ | 17 | /* *** Deprecated interfaces *** */ |
18 | |||
19 | #define KVM_TRC_SHIFT 16 | ||
20 | |||
21 | #define KVM_TRC_ENTRYEXIT (1 << KVM_TRC_SHIFT) | ||
22 | #define KVM_TRC_HANDLER (1 << (KVM_TRC_SHIFT + 1)) | ||
23 | |||
24 | #define KVM_TRC_VMENTRY (KVM_TRC_ENTRYEXIT + 0x01) | ||
25 | #define KVM_TRC_VMEXIT (KVM_TRC_ENTRYEXIT + 0x02) | ||
26 | #define KVM_TRC_PAGE_FAULT (KVM_TRC_HANDLER + 0x01) | ||
27 | |||
28 | #define KVM_TRC_HEAD_SIZE 12 | ||
29 | #define KVM_TRC_CYCLE_SIZE 8 | ||
30 | #define KVM_TRC_EXTRA_MAX 7 | ||
31 | |||
32 | #define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02) | ||
33 | #define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03) | ||
34 | #define KVM_TRC_PEND_INTR (KVM_TRC_HANDLER + 0x04) | ||
35 | #define KVM_TRC_IO_READ (KVM_TRC_HANDLER + 0x05) | ||
36 | #define KVM_TRC_IO_WRITE (KVM_TRC_HANDLER + 0x06) | ||
37 | #define KVM_TRC_CR_READ (KVM_TRC_HANDLER + 0x07) | ||
38 | #define KVM_TRC_CR_WRITE (KVM_TRC_HANDLER + 0x08) | ||
39 | #define KVM_TRC_DR_READ (KVM_TRC_HANDLER + 0x09) | ||
40 | #define KVM_TRC_DR_WRITE (KVM_TRC_HANDLER + 0x0A) | ||
41 | #define KVM_TRC_MSR_READ (KVM_TRC_HANDLER + 0x0B) | ||
42 | #define KVM_TRC_MSR_WRITE (KVM_TRC_HANDLER + 0x0C) | ||
43 | #define KVM_TRC_CPUID (KVM_TRC_HANDLER + 0x0D) | ||
44 | #define KVM_TRC_INTR (KVM_TRC_HANDLER + 0x0E) | ||
45 | #define KVM_TRC_NMI (KVM_TRC_HANDLER + 0x0F) | ||
46 | #define KVM_TRC_VMMCALL (KVM_TRC_HANDLER + 0x10) | ||
47 | #define KVM_TRC_HLT (KVM_TRC_HANDLER + 0x11) | ||
48 | #define KVM_TRC_CLTS (KVM_TRC_HANDLER + 0x12) | ||
49 | #define KVM_TRC_LMSW (KVM_TRC_HANDLER + 0x13) | ||
50 | #define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14) | ||
51 | #define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15) | ||
52 | #define KVM_TRC_GTLB_WRITE (KVM_TRC_HANDLER + 0x16) | ||
53 | #define KVM_TRC_STLB_WRITE (KVM_TRC_HANDLER + 0x17) | ||
54 | #define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18) | ||
55 | #define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19) | ||
56 | |||
18 | struct kvm_user_trace_setup { | 57 | struct kvm_user_trace_setup { |
19 | __u32 buf_size; /* sub_buffer size of each per-cpu */ | 58 | __u32 buf_size; |
20 | __u32 buf_nr; /* the number of sub_buffers of each per-cpu */ | 59 | __u32 buf_nr; |
60 | }; | ||
61 | |||
62 | #define __KVM_DEPRECATED_MAIN_W_0x06 \ | ||
63 | _IOW(KVMIO, 0x06, struct kvm_user_trace_setup) | ||
64 | #define __KVM_DEPRECATED_MAIN_0x07 _IO(KVMIO, 0x07) | ||
65 | #define __KVM_DEPRECATED_MAIN_0x08 _IO(KVMIO, 0x08) | ||
66 | |||
67 | #define __KVM_DEPRECATED_VM_R_0x70 _IOR(KVMIO, 0x70, struct kvm_assigned_irq) | ||
68 | |||
69 | struct kvm_breakpoint { | ||
70 | __u32 enabled; | ||
71 | __u32 padding; | ||
72 | __u64 address; | ||
73 | }; | ||
74 | |||
75 | struct kvm_debug_guest { | ||
76 | __u32 enabled; | ||
77 | __u32 pad; | ||
78 | struct kvm_breakpoint breakpoints[4]; | ||
79 | __u32 singlestep; | ||
21 | }; | 80 | }; |
22 | 81 | ||
82 | #define __KVM_DEPRECATED_VCPU_W_0x87 _IOW(KVMIO, 0x87, struct kvm_debug_guest) | ||
83 | |||
84 | /* *** End of deprecated interfaces *** */ | ||
85 | |||
86 | |||
23 | /* for KVM_CREATE_MEMORY_REGION */ | 87 | /* for KVM_CREATE_MEMORY_REGION */ |
24 | struct kvm_memory_region { | 88 | struct kvm_memory_region { |
25 | __u32 slot; | 89 | __u32 slot; |
@@ -99,6 +163,7 @@ struct kvm_pit_config { | |||
99 | 163 | ||
100 | /* For KVM_EXIT_INTERNAL_ERROR */ | 164 | /* For KVM_EXIT_INTERNAL_ERROR */ |
101 | #define KVM_INTERNAL_ERROR_EMULATION 1 | 165 | #define KVM_INTERNAL_ERROR_EMULATION 1 |
166 | #define KVM_INTERNAL_ERROR_SIMUL_EX 2 | ||
102 | 167 | ||
103 | /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ | 168 | /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ |
104 | struct kvm_run { | 169 | struct kvm_run { |
@@ -116,6 +181,11 @@ struct kvm_run { | |||
116 | __u64 cr8; | 181 | __u64 cr8; |
117 | __u64 apic_base; | 182 | __u64 apic_base; |
118 | 183 | ||
184 | #ifdef __KVM_S390 | ||
185 | /* the processor status word for s390 */ | ||
186 | __u64 psw_mask; /* psw upper half */ | ||
187 | __u64 psw_addr; /* psw lower half */ | ||
188 | #endif | ||
119 | union { | 189 | union { |
120 | /* KVM_EXIT_UNKNOWN */ | 190 | /* KVM_EXIT_UNKNOWN */ |
121 | struct { | 191 | struct { |
@@ -167,8 +237,6 @@ struct kvm_run { | |||
167 | /* KVM_EXIT_S390_SIEIC */ | 237 | /* KVM_EXIT_S390_SIEIC */ |
168 | struct { | 238 | struct { |
169 | __u8 icptcode; | 239 | __u8 icptcode; |
170 | __u64 mask; /* psw upper half */ | ||
171 | __u64 addr; /* psw lower half */ | ||
172 | __u16 ipa; | 240 | __u16 ipa; |
173 | __u32 ipb; | 241 | __u32 ipb; |
174 | } s390_sieic; | 242 | } s390_sieic; |
@@ -187,6 +255,9 @@ struct kvm_run { | |||
187 | } dcr; | 255 | } dcr; |
188 | struct { | 256 | struct { |
189 | __u32 suberror; | 257 | __u32 suberror; |
258 | /* Available with KVM_CAP_INTERNAL_ERROR_DATA: */ | ||
259 | __u32 ndata; | ||
260 | __u64 data[16]; | ||
190 | } internal; | 261 | } internal; |
191 | /* Fix the size of the union. */ | 262 | /* Fix the size of the union. */ |
192 | char padding[256]; | 263 | char padding[256]; |
@@ -329,24 +400,6 @@ struct kvm_ioeventfd { | |||
329 | __u8 pad[36]; | 400 | __u8 pad[36]; |
330 | }; | 401 | }; |
331 | 402 | ||
332 | #define KVM_TRC_SHIFT 16 | ||
333 | /* | ||
334 | * kvm trace categories | ||
335 | */ | ||
336 | #define KVM_TRC_ENTRYEXIT (1 << KVM_TRC_SHIFT) | ||
337 | #define KVM_TRC_HANDLER (1 << (KVM_TRC_SHIFT + 1)) /* only 12 bits */ | ||
338 | |||
339 | /* | ||
340 | * kvm trace action | ||
341 | */ | ||
342 | #define KVM_TRC_VMENTRY (KVM_TRC_ENTRYEXIT + 0x01) | ||
343 | #define KVM_TRC_VMEXIT (KVM_TRC_ENTRYEXIT + 0x02) | ||
344 | #define KVM_TRC_PAGE_FAULT (KVM_TRC_HANDLER + 0x01) | ||
345 | |||
346 | #define KVM_TRC_HEAD_SIZE 12 | ||
347 | #define KVM_TRC_CYCLE_SIZE 8 | ||
348 | #define KVM_TRC_EXTRA_MAX 7 | ||
349 | |||
350 | #define KVMIO 0xAE | 403 | #define KVMIO 0xAE |
351 | 404 | ||
352 | /* | 405 | /* |
@@ -367,12 +420,10 @@ struct kvm_ioeventfd { | |||
367 | */ | 420 | */ |
368 | #define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */ | 421 | #define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */ |
369 | #define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2) | 422 | #define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2) |
370 | /* | 423 | #define KVM_TRACE_ENABLE __KVM_DEPRECATED_MAIN_W_0x06 |
371 | * ioctls for kvm trace | 424 | #define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07 |
372 | */ | 425 | #define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08 |
373 | #define KVM_TRACE_ENABLE _IOW(KVMIO, 0x06, struct kvm_user_trace_setup) | 426 | |
374 | #define KVM_TRACE_PAUSE _IO(KVMIO, 0x07) | ||
375 | #define KVM_TRACE_DISABLE _IO(KVMIO, 0x08) | ||
376 | /* | 427 | /* |
377 | * Extension capability list. | 428 | * Extension capability list. |
378 | */ | 429 | */ |
@@ -436,8 +487,15 @@ struct kvm_ioeventfd { | |||
436 | #endif | 487 | #endif |
437 | #define KVM_CAP_IOEVENTFD 36 | 488 | #define KVM_CAP_IOEVENTFD 36 |
438 | #define KVM_CAP_SET_IDENTITY_MAP_ADDR 37 | 489 | #define KVM_CAP_SET_IDENTITY_MAP_ADDR 37 |
439 | /* KVM upstream has more features, but we synched this number. | 490 | #ifdef __KVM_HAVE_XEN_HVM |
440 | Linux, please remove this comment on rebase. */ | 491 | #define KVM_CAP_XEN_HVM 38 |
492 | #endif | ||
493 | #define KVM_CAP_ADJUST_CLOCK 39 | ||
494 | #define KVM_CAP_INTERNAL_ERROR_DATA 40 | ||
495 | #ifdef __KVM_HAVE_VCPU_EVENTS | ||
496 | #define KVM_CAP_VCPU_EVENTS 41 | ||
497 | #endif | ||
498 | #define KVM_CAP_S390_PSW 42 | ||
441 | #define KVM_CAP_PPC_SEGSTATE 43 | 499 | #define KVM_CAP_PPC_SEGSTATE 43 |
442 | 500 | ||
443 | #ifdef KVM_CAP_IRQ_ROUTING | 501 | #ifdef KVM_CAP_IRQ_ROUTING |
@@ -491,6 +549,18 @@ struct kvm_x86_mce { | |||
491 | }; | 549 | }; |
492 | #endif | 550 | #endif |
493 | 551 | ||
552 | #ifdef KVM_CAP_XEN_HVM | ||
553 | struct kvm_xen_hvm_config { | ||
554 | __u32 flags; | ||
555 | __u32 msr; | ||
556 | __u64 blob_addr_32; | ||
557 | __u64 blob_addr_64; | ||
558 | __u8 blob_size_32; | ||
559 | __u8 blob_size_64; | ||
560 | __u8 pad2[30]; | ||
561 | }; | ||
562 | #endif | ||
563 | |||
494 | #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0) | 564 | #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0) |
495 | 565 | ||
496 | struct kvm_irqfd { | 566 | struct kvm_irqfd { |
@@ -500,55 +570,66 @@ struct kvm_irqfd { | |||
500 | __u8 pad[20]; | 570 | __u8 pad[20]; |
501 | }; | 571 | }; |
502 | 572 | ||
573 | struct kvm_clock_data { | ||
574 | __u64 clock; | ||
575 | __u32 flags; | ||
576 | __u32 pad[9]; | ||
577 | }; | ||
578 | |||
503 | /* | 579 | /* |
504 | * ioctls for VM fds | 580 | * ioctls for VM fds |
505 | */ | 581 | */ |
506 | #define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region) | 582 | #define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region) |
507 | /* | 583 | /* |
508 | * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns | 584 | * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns |
509 | * a vcpu fd. | 585 | * a vcpu fd. |
510 | */ | 586 | */ |
511 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) | 587 | #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) |
512 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) | 588 | #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) |
513 | #define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) | 589 | #define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) |
514 | #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) | 590 | #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) |
515 | #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) | 591 | #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) |
516 | #define KVM_SET_USER_MEMORY_REGION _IOW(KVMIO, 0x46,\ | 592 | #define KVM_SET_USER_MEMORY_REGION _IOW(KVMIO, 0x46, \ |
517 | struct kvm_userspace_memory_region) | 593 | struct kvm_userspace_memory_region) |
518 | #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) | 594 | #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) |
519 | #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) | 595 | #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) |
520 | /* Device model IOC */ | 596 | /* Device model IOC */ |
521 | #define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60) | 597 | #define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60) |
522 | #define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level) | 598 | #define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level) |
523 | #define KVM_GET_IRQCHIP _IOWR(KVMIO, 0x62, struct kvm_irqchip) | 599 | #define KVM_GET_IRQCHIP _IOWR(KVMIO, 0x62, struct kvm_irqchip) |
524 | #define KVM_SET_IRQCHIP _IOR(KVMIO, 0x63, struct kvm_irqchip) | 600 | #define KVM_SET_IRQCHIP _IOR(KVMIO, 0x63, struct kvm_irqchip) |
525 | #define KVM_CREATE_PIT _IO(KVMIO, 0x64) | 601 | #define KVM_CREATE_PIT _IO(KVMIO, 0x64) |
526 | #define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) | 602 | #define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) |
527 | #define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) | 603 | #define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) |
528 | #define KVM_IRQ_LINE_STATUS _IOWR(KVMIO, 0x67, struct kvm_irq_level) | 604 | #define KVM_IRQ_LINE_STATUS _IOWR(KVMIO, 0x67, struct kvm_irq_level) |
529 | #define KVM_REGISTER_COALESCED_MMIO \ | 605 | #define KVM_REGISTER_COALESCED_MMIO \ |
530 | _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) | 606 | _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) |
531 | #define KVM_UNREGISTER_COALESCED_MMIO \ | 607 | #define KVM_UNREGISTER_COALESCED_MMIO \ |
532 | _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) | 608 | _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) |
533 | #define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ | 609 | #define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ |
534 | struct kvm_assigned_pci_dev) | 610 | struct kvm_assigned_pci_dev) |
535 | #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) | 611 | #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) |
536 | /* deprecated, replaced by KVM_ASSIGN_DEV_IRQ */ | 612 | /* deprecated, replaced by KVM_ASSIGN_DEV_IRQ */ |
537 | #define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \ | 613 | #define KVM_ASSIGN_IRQ __KVM_DEPRECATED_VM_R_0x70 |
538 | struct kvm_assigned_irq) | 614 | #define KVM_ASSIGN_DEV_IRQ _IOW(KVMIO, 0x70, struct kvm_assigned_irq) |
539 | #define KVM_ASSIGN_DEV_IRQ _IOW(KVMIO, 0x70, struct kvm_assigned_irq) | 615 | #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) |
540 | #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) | 616 | #define KVM_DEASSIGN_PCI_DEVICE _IOW(KVMIO, 0x72, \ |
541 | #define KVM_DEASSIGN_PCI_DEVICE _IOW(KVMIO, 0x72, \ | 617 | struct kvm_assigned_pci_dev) |
542 | struct kvm_assigned_pci_dev) | 618 | #define KVM_ASSIGN_SET_MSIX_NR _IOW(KVMIO, 0x73, \ |
543 | #define KVM_ASSIGN_SET_MSIX_NR \ | 619 | struct kvm_assigned_msix_nr) |
544 | _IOW(KVMIO, 0x73, struct kvm_assigned_msix_nr) | 620 | #define KVM_ASSIGN_SET_MSIX_ENTRY _IOW(KVMIO, 0x74, \ |
545 | #define KVM_ASSIGN_SET_MSIX_ENTRY \ | 621 | struct kvm_assigned_msix_entry) |
546 | _IOW(KVMIO, 0x74, struct kvm_assigned_msix_entry) | 622 | #define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq) |
547 | #define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq) | 623 | #define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) |
548 | #define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) | 624 | #define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config) |
549 | #define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config) | 625 | #define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78) |
550 | #define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78) | 626 | #define KVM_IOEVENTFD _IOW(KVMIO, 0x79, struct kvm_ioeventfd) |
551 | #define KVM_IOEVENTFD _IOW(KVMIO, 0x79, struct kvm_ioeventfd) | 627 | #define KVM_XEN_HVM_CONFIG _IOW(KVMIO, 0x7a, struct kvm_xen_hvm_config) |
628 | #define KVM_SET_CLOCK _IOW(KVMIO, 0x7b, struct kvm_clock_data) | ||
629 | #define KVM_GET_CLOCK _IOR(KVMIO, 0x7c, struct kvm_clock_data) | ||
630 | /* Available with KVM_CAP_PIT_STATE2 */ | ||
631 | #define KVM_GET_PIT2 _IOR(KVMIO, 0x9f, struct kvm_pit_state2) | ||
632 | #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) | ||
552 | 633 | ||
553 | /* | 634 | /* |
554 | * ioctls for vcpu fds | 635 | * ioctls for vcpu fds |
@@ -561,7 +642,7 @@ struct kvm_irqfd { | |||
561 | #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation) | 642 | #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation) |
562 | #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt) | 643 | #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt) |
563 | /* KVM_DEBUG_GUEST is no longer supported, use KVM_SET_GUEST_DEBUG instead */ | 644 | /* KVM_DEBUG_GUEST is no longer supported, use KVM_SET_GUEST_DEBUG instead */ |
564 | #define KVM_DEBUG_GUEST __KVM_DEPRECATED_DEBUG_GUEST | 645 | #define KVM_DEBUG_GUEST __KVM_DEPRECATED_VCPU_W_0x87 |
565 | #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) | 646 | #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) |
566 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) | 647 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) |
567 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) | 648 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) |
@@ -573,7 +654,7 @@ struct kvm_irqfd { | |||
573 | #define KVM_SET_CPUID2 _IOW(KVMIO, 0x90, struct kvm_cpuid2) | 654 | #define KVM_SET_CPUID2 _IOW(KVMIO, 0x90, struct kvm_cpuid2) |
574 | #define KVM_GET_CPUID2 _IOWR(KVMIO, 0x91, struct kvm_cpuid2) | 655 | #define KVM_GET_CPUID2 _IOWR(KVMIO, 0x91, struct kvm_cpuid2) |
575 | /* Available with KVM_CAP_VAPIC */ | 656 | /* Available with KVM_CAP_VAPIC */ |
576 | #define KVM_TPR_ACCESS_REPORTING _IOWR(KVMIO, 0x92, struct kvm_tpr_access_ctl) | 657 | #define KVM_TPR_ACCESS_REPORTING _IOWR(KVMIO, 0x92, struct kvm_tpr_access_ctl) |
577 | /* Available with KVM_CAP_VAPIC */ | 658 | /* Available with KVM_CAP_VAPIC */ |
578 | #define KVM_SET_VAPIC_ADDR _IOW(KVMIO, 0x93, struct kvm_vapic_addr) | 659 | #define KVM_SET_VAPIC_ADDR _IOW(KVMIO, 0x93, struct kvm_vapic_addr) |
579 | /* valid for virtual machine (for floating interrupt)_and_ vcpu */ | 660 | /* valid for virtual machine (for floating interrupt)_and_ vcpu */ |
@@ -585,66 +666,23 @@ struct kvm_irqfd { | |||
585 | /* initial ipl psw for s390 */ | 666 | /* initial ipl psw for s390 */ |
586 | #define KVM_S390_SET_INITIAL_PSW _IOW(KVMIO, 0x96, struct kvm_s390_psw) | 667 | #define KVM_S390_SET_INITIAL_PSW _IOW(KVMIO, 0x96, struct kvm_s390_psw) |
587 | /* initial reset for s390 */ | 668 | /* initial reset for s390 */ |
588 | #define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97) | 669 | #define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97) |
589 | #define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state) | 670 | #define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state) |
590 | #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) | 671 | #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) |
591 | /* Available with KVM_CAP_NMI */ | 672 | /* Available with KVM_CAP_NMI */ |
592 | #define KVM_NMI _IO(KVMIO, 0x9a) | 673 | #define KVM_NMI _IO(KVMIO, 0x9a) |
593 | /* Available with KVM_CAP_SET_GUEST_DEBUG */ | 674 | /* Available with KVM_CAP_SET_GUEST_DEBUG */ |
594 | #define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug) | 675 | #define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug) |
595 | /* MCE for x86 */ | 676 | /* MCE for x86 */ |
596 | #define KVM_X86_SETUP_MCE _IOW(KVMIO, 0x9c, __u64) | 677 | #define KVM_X86_SETUP_MCE _IOW(KVMIO, 0x9c, __u64) |
597 | #define KVM_X86_GET_MCE_CAP_SUPPORTED _IOR(KVMIO, 0x9d, __u64) | 678 | #define KVM_X86_GET_MCE_CAP_SUPPORTED _IOR(KVMIO, 0x9d, __u64) |
598 | #define KVM_X86_SET_MCE _IOW(KVMIO, 0x9e, struct kvm_x86_mce) | 679 | #define KVM_X86_SET_MCE _IOW(KVMIO, 0x9e, struct kvm_x86_mce) |
599 | 680 | /* IA64 stack access */ | |
600 | /* | ||
601 | * Deprecated interfaces | ||
602 | */ | ||
603 | struct kvm_breakpoint { | ||
604 | __u32 enabled; | ||
605 | __u32 padding; | ||
606 | __u64 address; | ||
607 | }; | ||
608 | |||
609 | struct kvm_debug_guest { | ||
610 | __u32 enabled; | ||
611 | __u32 pad; | ||
612 | struct kvm_breakpoint breakpoints[4]; | ||
613 | __u32 singlestep; | ||
614 | }; | ||
615 | |||
616 | #define __KVM_DEPRECATED_DEBUG_GUEST _IOW(KVMIO, 0x87, struct kvm_debug_guest) | ||
617 | |||
618 | #define KVM_IA64_VCPU_GET_STACK _IOR(KVMIO, 0x9a, void *) | 681 | #define KVM_IA64_VCPU_GET_STACK _IOR(KVMIO, 0x9a, void *) |
619 | #define KVM_IA64_VCPU_SET_STACK _IOW(KVMIO, 0x9b, void *) | 682 | #define KVM_IA64_VCPU_SET_STACK _IOW(KVMIO, 0x9b, void *) |
620 | 683 | /* Available with KVM_CAP_VCPU_EVENTS */ | |
621 | #define KVM_GET_PIT2 _IOR(KVMIO, 0x9f, struct kvm_pit_state2) | 684 | #define KVM_GET_VCPU_EVENTS _IOR(KVMIO, 0x9f, struct kvm_vcpu_events) |
622 | #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) | 685 | #define KVM_SET_VCPU_EVENTS _IOW(KVMIO, 0xa0, struct kvm_vcpu_events) |
623 | |||
624 | #define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02) | ||
625 | #define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03) | ||
626 | #define KVM_TRC_PEND_INTR (KVM_TRC_HANDLER + 0x04) | ||
627 | #define KVM_TRC_IO_READ (KVM_TRC_HANDLER + 0x05) | ||
628 | #define KVM_TRC_IO_WRITE (KVM_TRC_HANDLER + 0x06) | ||
629 | #define KVM_TRC_CR_READ (KVM_TRC_HANDLER + 0x07) | ||
630 | #define KVM_TRC_CR_WRITE (KVM_TRC_HANDLER + 0x08) | ||
631 | #define KVM_TRC_DR_READ (KVM_TRC_HANDLER + 0x09) | ||
632 | #define KVM_TRC_DR_WRITE (KVM_TRC_HANDLER + 0x0A) | ||
633 | #define KVM_TRC_MSR_READ (KVM_TRC_HANDLER + 0x0B) | ||
634 | #define KVM_TRC_MSR_WRITE (KVM_TRC_HANDLER + 0x0C) | ||
635 | #define KVM_TRC_CPUID (KVM_TRC_HANDLER + 0x0D) | ||
636 | #define KVM_TRC_INTR (KVM_TRC_HANDLER + 0x0E) | ||
637 | #define KVM_TRC_NMI (KVM_TRC_HANDLER + 0x0F) | ||
638 | #define KVM_TRC_VMMCALL (KVM_TRC_HANDLER + 0x10) | ||
639 | #define KVM_TRC_HLT (KVM_TRC_HANDLER + 0x11) | ||
640 | #define KVM_TRC_CLTS (KVM_TRC_HANDLER + 0x12) | ||
641 | #define KVM_TRC_LMSW (KVM_TRC_HANDLER + 0x13) | ||
642 | #define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14) | ||
643 | #define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15) | ||
644 | #define KVM_TRC_GTLB_WRITE (KVM_TRC_HANDLER + 0x16) | ||
645 | #define KVM_TRC_STLB_WRITE (KVM_TRC_HANDLER + 0x17) | ||
646 | #define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18) | ||
647 | #define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19) | ||
648 | 686 | ||
649 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 687 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
650 | 688 | ||
@@ -699,4 +737,4 @@ struct kvm_assigned_msix_entry { | |||
699 | __u16 padding[3]; | 737 | __u16 padding[3]; |
700 | }; | 738 | }; |
701 | 739 | ||
702 | #endif | 740 | #endif /* __LINUX_KVM_H */ |