Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
cpu_sig_intel ();
}
-#else /* !x86_64 */
+#elif defined(__s390x__)
+
+#define SYSFS_PROT_VIRT "/sys/firmware/uv/prot_virt_guest"
+
+static void
+cpu_sig (void)
+{
+ int fd = open("/sys/firmware/uv/prot_virt_guest", O_RDONLY);
+ char c;
+ if (fd < 0)
+ return;
+
+ if (read(fd, &c, 1) == 1 && c == '1')
+ puts("s390-protvirt");
+
+ close(fd);
+}
+
+
+#else /* ! x86_64 && ! s390x */
static void
cpu_sig (void)
Status: tested on Microsoft Azure SEV-SNP & TDX CVM
+=item B<s390x-protvirt>
+
+This is a confidential guest running on s390x with the
+Protected Virtualization (Secure Execution) technology
+
=back
=head1 EXIT STATUS