diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2015-11-04 16:33:33 +0100 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-02-10 13:12:50 +0100 |
commit | 634790b82759c98ee57c80966d859083fa2fcd8c (patch) | |
tree | 4b97fd83e565d6e9d6a1772fb11f1c54ce26f920 /include/uapi/linux/kvm.h | |
parent | 0e8bc06a2fbb4d6b688baa8e2416cd07f9453595 (diff) | |
download | linux-634790b82759c98ee57c80966d859083fa2fcd8c.tar.gz linux-634790b82759c98ee57c80966d859083fa2fcd8c.tar.bz2 linux-634790b82759c98ee57c80966d859083fa2fcd8c.zip |
KVM: s390: migration / injection of prog irq ilc
We have to migrate the program irq ilc and someday we will have to
specify the ilc without KVM trying to autodetect the value.
Let's reuse one of the spare fields in our program irq that should
always be set to 0 by user space. Because we also want to make use
of 0 ilcs ("not available"), we need a validity indicator.
If no valid ilc is given, we try to autodetect the ilc via the current
icptcode and icptstatus + parameter and store the valid ilc in the
irq structure.
This has a nice effect: QEMU's making use of KVM_S390_IRQ /
KVM_S390_SET_IRQ_STATE / KVM_S390_GET_IRQ_STATE for migration will
directly migrate the ilc without any changes.
Please note that we use bit 0 as validity and bit 1,2 for the ilc, so
by applying the ilc mask we directly get the ilen which is usually what
we work with.
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'include/uapi/linux/kvm.h')
-rw-r--r-- | include/uapi/linux/kvm.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 9da905157cee..4e20a40bb10f 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -541,7 +541,12 @@ struct kvm_s390_pgm_info { __u8 exc_access_id; __u8 per_access_id; __u8 op_access_id; - __u8 pad[3]; +#define KVM_S390_PGM_FLAGS_ILC_VALID 0x01 +#define KVM_S390_PGM_FLAGS_ILC_0 0x02 +#define KVM_S390_PGM_FLAGS_ILC_1 0x04 +#define KVM_S390_PGM_FLAGS_ILC_MASK 0x06 + __u8 flags; + __u8 pad[2]; }; struct kvm_s390_prefix_info { |