History

KVM: s390: migrate vcpu interrupt state

This patch adds support to migrate vcpu interrupts. Two new vcpu ioctls are added which get/set the complete status of pending interrupts in one go. The ioctls are marked as available with the new capability KVM_CAP_S390_IRQ_STATE. We can not use a ONEREG, as the number of pending local interrupts is not constant and depends on the number of CPUs. To retrieve the interrupt state we add an ioctl KVM_S390_GET_IRQ_STATE. Its input parameter is a pointer to a struct kvm_s390_irq_state which has a buffer and length. For all currently pending interrupts, we copy a struct kvm_s390_irq into the buffer and pass it to userspace. To store interrupt state into a buffer provided by userspace, we add an ioctl KVM_S390_SET_IRQ_STATE. It passes a struct kvm_s390_irq_state into the kernel and injects all interrupts contained in the buffer.

Jens Freimann committed 11 years ago

Commit 816c7661 parent 79e87a15 files · +252 −0Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/kvm.h+11−0
@@ -558,6 +558,13 @@ struct kvm_s390_irq { · 557 unmodified lines
558 } u;558 } u;
559};559};
560 560
561struct kvm_s390_irq_state {
562 __u64 buf;
563 __u32 flags;
564 __u32 len;
565 __u32 reserved[4];
566};
567
561/* for KVM_SET_GUEST_DEBUG */568/* for KVM_SET_GUEST_DEBUG */
562 569
563#define KVM_GUESTDBG_ENABLE 0x00000001570#define KVM_GUESTDBG_ENABLE 0x00000001
@@ -803,6 +810,7 @@ struct kvm_ppc_smmu_info { · 239 unmodified lines
803#define KVM_CAP_S390_USER_STSI 109810#define KVM_CAP_S390_USER_STSI 109
804#define KVM_CAP_S390_SKEYS 110811#define KVM_CAP_S390_SKEYS 110
805#define KVM_CAP_S390_INJECT_IRQ 113812#define KVM_CAP_S390_INJECT_IRQ 113
813#define KVM_CAP_S390_IRQ_STATE 114
806 814
807#ifdef KVM_CAP_IRQ_ROUTING815#ifdef KVM_CAP_IRQ_ROUTING
808 816
@@ -1185,6 +1193,9 @@ struct kvm_s390_ucas_mapping { · 376 unmodified lines
1185#define KVM_S390_SET_SKEYS _IOW(KVMIO, 0xb3, struct kvm_s390_skeys)1193#define KVM_S390_SET_SKEYS _IOW(KVMIO, 0xb3, struct kvm_s390_skeys)
1186/* Available with KVM_CAP_S390_INJECT_IRQ */1194/* Available with KVM_CAP_S390_INJECT_IRQ */
1187#define KVM_S390_IRQ _IOW(KVMIO, 0xb4, struct kvm_s390_irq)1195#define KVM_S390_IRQ _IOW(KVMIO, 0xb4, struct kvm_s390_irq)
1196/* Available with KVM_CAP_S390_IRQ_STATE */
1197#define KVM_S390_SET_IRQ_STATE _IOW(KVMIO, 0xb5, struct kvm_s390_irq_state)
1198#define KVM_S390_GET_IRQ_STATE _IOW(KVMIO, 0xb6, struct kvm_s390_irq_state)
1188 1199
1189#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)1200#define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
1190#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)1201#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t