aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPierre Morel <pmorel@linux.ibm.com>2023-10-16 20:39:11 +0200
committerThomas Huth <thuth@redhat.com>2023-10-20 07:16:53 +0200
commitaf37bad52e7c216c044f919d6254c77be0eacbc6 (patch)
tree1433b37a9ee3822f181720969169bb67bd16a0bd /include
parent3d6e75f4df67980479cc0912b842202f2093aeeb (diff)
downloadqemu-af37bad52e7c216c044f919d6254c77be0eacbc6.zip
qemu-af37bad52e7c216c044f919d6254c77be0eacbc6.tar.gz
qemu-af37bad52e7c216c044f919d6254c77be0eacbc6.tar.bz2
s390x/cpu topology: interception of PTF instruction
When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervisor activates the interpretation by using the KVM_CAP_S390_CPU_TOPOLOGY KVM extension. The PTF instructions with function code 0 and 1 are intercepted and must be emulated by the userland hypervisor. During RESET all CPU of the configuration are placed in horizontal polarity. Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Co-developed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Message-ID: <20231016183925.2384704-8-nsg@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/s390x/s390-virtio-ccw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/s390x/s390-virtio-ccw.h b/include/hw/s390x/s390-virtio-ccw.h
index 9bba21a..c1d46e7 100644
--- a/include/hw/s390x/s390-virtio-ccw.h
+++ b/include/hw/s390x/s390-virtio-ccw.h
@@ -30,6 +30,12 @@ struct S390CcwMachineState {
uint8_t loadparm[8];
};
+#define S390_PTF_REASON_NONE (0x00 << 8)
+#define S390_PTF_REASON_DONE (0x01 << 8)
+#define S390_PTF_REASON_BUSY (0x02 << 8)
+#define S390_TOPO_FC_MASK 0xffUL
+void s390_handle_ptf(S390CPU *cpu, uint8_t r1, uintptr_t ra);
+
struct S390CcwMachineClass {
/*< private >*/
MachineClass parent_class;