aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kvm.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 225b452e1d1d..8d696cf6edcc 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -449,6 +449,30 @@ struct kvm_ppc_pvinfo {
449 __u8 pad[108]; 449 __u8 pad[108];
450}; 450};
451 451
452/* for KVM_PPC_GET_SMMU_INFO */
453#define KVM_PPC_PAGE_SIZES_MAX_SZ 8
454
455struct kvm_ppc_one_page_size {
456 __u32 page_shift; /* Page shift (or 0) */
457 __u32 pte_enc; /* Encoding in the HPTE (>>12) */
458};
459
460struct kvm_ppc_one_seg_page_size {
461 __u32 page_shift; /* Base page shift of segment (or 0) */
462 __u32 slb_enc; /* SLB encoding for BookS */
463 struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ];
464};
465
466#define KVM_PPC_PAGE_SIZES_REAL 0x00000001
467#define KVM_PPC_1T_SEGMENTS 0x00000002
468
469struct kvm_ppc_smmu_info {
470 __u64 flags;
471 __u32 slb_size;
472 __u32 pad;
473 struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ];
474};
475
452#define KVMIO 0xAE 476#define KVMIO 0xAE
453 477
454/* machine type bits, to be used as argument to KVM_CREATE_VM */ 478/* machine type bits, to be used as argument to KVM_CREATE_VM */
@@ -591,6 +615,7 @@ struct kvm_ppc_pvinfo {
591#define KVM_CAP_PCI_2_3 75 615#define KVM_CAP_PCI_2_3 75
592#define KVM_CAP_KVMCLOCK_CTRL 76 616#define KVM_CAP_KVMCLOCK_CTRL 76
593#define KVM_CAP_SIGNAL_MSI 77 617#define KVM_CAP_SIGNAL_MSI 77
618#define KVM_CAP_PPC_GET_SMMU_INFO 78
594 619
595#ifdef KVM_CAP_IRQ_ROUTING 620#ifdef KVM_CAP_IRQ_ROUTING
596 621
@@ -800,6 +825,8 @@ struct kvm_s390_ucas_mapping {
800 struct kvm_assigned_pci_dev) 825 struct kvm_assigned_pci_dev)
801/* Available with KVM_CAP_SIGNAL_MSI */ 826/* Available with KVM_CAP_SIGNAL_MSI */
802#define KVM_SIGNAL_MSI _IOW(KVMIO, 0xa5, struct kvm_msi) 827#define KVM_SIGNAL_MSI _IOW(KVMIO, 0xa5, struct kvm_msi)
828/* Available with KVM_CAP_PPC_GET_SMMU_INFO */
829#define KVM_PPC_GET_SMMU_INFO _IOR(KVMIO, 0xa6, struct kvm_ppc_smmu_info)
803 830
804/* 831/*
805 * ioctls for vcpu fds 832 * ioctls for vcpu fds