diff options
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r-- | include/linux/kvm.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 2ce09aa7d3b..0a6d6ba44c8 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -101,9 +101,13 @@ struct kvm_userspace_memory_region { | |||
101 | __u64 userspace_addr; /* start of the userspace allocated memory */ | 101 | __u64 userspace_addr; /* start of the userspace allocated memory */ |
102 | }; | 102 | }; |
103 | 103 | ||
104 | /* for kvm_memory_region::flags */ | 104 | /* |
105 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL | 105 | * The bit 0 ~ bit 15 of kvm_memory_region::flags are visible for userspace, |
106 | #define KVM_MEMSLOT_INVALID (1UL << 1) | 106 | * other bits are reserved for kvm internal use which are defined in |
107 | * include/linux/kvm_host.h. | ||
108 | */ | ||
109 | #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) | ||
110 | #define KVM_MEM_READONLY (1UL << 1) | ||
107 | 111 | ||
108 | /* for KVM_IRQ_LINE */ | 112 | /* for KVM_IRQ_LINE */ |
109 | struct kvm_irq_level { | 113 | struct kvm_irq_level { |
@@ -618,6 +622,10 @@ struct kvm_ppc_smmu_info { | |||
618 | #define KVM_CAP_PPC_GET_SMMU_INFO 78 | 622 | #define KVM_CAP_PPC_GET_SMMU_INFO 78 |
619 | #define KVM_CAP_S390_COW 79 | 623 | #define KVM_CAP_S390_COW 79 |
620 | #define KVM_CAP_PPC_ALLOC_HTAB 80 | 624 | #define KVM_CAP_PPC_ALLOC_HTAB 80 |
625 | #ifdef __KVM_HAVE_READONLY_MEM | ||
626 | #define KVM_CAP_READONLY_MEM 81 | ||
627 | #endif | ||
628 | #define KVM_CAP_IRQFD_RESAMPLE 82 | ||
621 | 629 | ||
622 | #ifdef KVM_CAP_IRQ_ROUTING | 630 | #ifdef KVM_CAP_IRQ_ROUTING |
623 | 631 | ||
@@ -683,12 +691,21 @@ struct kvm_xen_hvm_config { | |||
683 | #endif | 691 | #endif |
684 | 692 | ||
685 | #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0) | 693 | #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0) |
694 | /* | ||
695 | * Available with KVM_CAP_IRQFD_RESAMPLE | ||
696 | * | ||
697 | * KVM_IRQFD_FLAG_RESAMPLE indicates resamplefd is valid and specifies | ||
698 | * the irqfd to operate in resampling mode for level triggered interrupt | ||
699 | * emlation. See Documentation/virtual/kvm/api.txt. | ||
700 | */ | ||
701 | #define KVM_IRQFD_FLAG_RESAMPLE (1 << 1) | ||
686 | 702 | ||
687 | struct kvm_irqfd { | 703 | struct kvm_irqfd { |
688 | __u32 fd; | 704 | __u32 fd; |
689 | __u32 gsi; | 705 | __u32 gsi; |
690 | __u32 flags; | 706 | __u32 flags; |
691 | __u8 pad[20]; | 707 | __u32 resamplefd; |
708 | __u8 pad[16]; | ||
692 | }; | 709 | }; |
693 | 710 | ||
694 | struct kvm_clock_data { | 711 | struct kvm_clock_data { |