[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 06/11] s390x: Add protected dump cap
From: |
marcandre . lureau |
Subject: |
[PULL v2 06/11] s390x: Add protected dump cap |
Date: |
Tue, 25 Oct 2022 11:49:58 +0400 |
From: Janosch Frank <frankja@linux.ibm.com>
Add a protected dump capability for later feature checking.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Message-Id: <20221017083822.43118-7-frankja@linux.ibm.com>
---
target/s390x/kvm/kvm_s390x.h | 1 +
target/s390x/kvm/kvm.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/target/s390x/kvm/kvm_s390x.h b/target/s390x/kvm/kvm_s390x.h
index aaae8570de..f9785564d0 100644
--- a/target/s390x/kvm/kvm_s390x.h
+++ b/target/s390x/kvm/kvm_s390x.h
@@ -26,6 +26,7 @@ int kvm_s390_set_cpu_state(S390CPU *cpu, uint8_t cpu_state);
void kvm_s390_vcpu_interrupt_pre_save(S390CPU *cpu);
int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu);
int kvm_s390_get_hpage_1m(void);
+int kvm_s390_get_protected_dump(void);
int kvm_s390_get_ri(void);
int kvm_s390_get_zpci_op(void);
int kvm_s390_get_clock(uint8_t *tod_high, uint64_t *tod_clock);
diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c
index 508c24cfec..04cae0b999 100644
--- a/target/s390x/kvm/kvm.c
+++ b/target/s390x/kvm/kvm.c
@@ -158,6 +158,7 @@ static int cap_hpage_1m;
static int cap_vcpu_resets;
static int cap_protected;
static int cap_zpci_op;
+static int cap_protected_dump;
static bool mem_op_storage_key_support;
@@ -364,6 +365,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
cap_vcpu_resets = kvm_check_extension(s, KVM_CAP_S390_VCPU_RESETS);
cap_protected = kvm_check_extension(s, KVM_CAP_S390_PROTECTED);
cap_zpci_op = kvm_check_extension(s, KVM_CAP_S390_ZPCI_OP);
+ cap_protected_dump = kvm_check_extension(s, KVM_CAP_S390_PROTECTED_DUMP);
kvm_vm_enable_cap(s, KVM_CAP_S390_USER_SIGP, 0);
kvm_vm_enable_cap(s, KVM_CAP_S390_VECTOR_REGISTERS, 0);
@@ -2045,6 +2047,11 @@ int kvm_s390_assign_subch_ioeventfd(EventNotifier
*notifier, uint32_t sch,
return kvm_vm_ioctl(kvm_state, KVM_IOEVENTFD, &kick);
}
+int kvm_s390_get_protected_dump(void)
+{
+ return cap_protected_dump;
+}
+
int kvm_s390_get_ri(void)
{
return cap_ri;
--
2.37.3
- [PULL v2 00/11] Dump patches, marcandre . lureau, 2022/10/25
- [PULL v2 01/11] dump: Use a buffer for ELF section data and headers, marcandre . lureau, 2022/10/25
- [PULL v2 03/11] dump: Reorder struct DumpState, marcandre . lureau, 2022/10/25
- [PULL v2 02/11] dump: Write ELF section headers right after ELF header, marcandre . lureau, 2022/10/25
- [PULL v2 10/11] s390x: pv: Add dump support, marcandre . lureau, 2022/10/25
- [PULL v2 04/11] dump: Reintroduce memory_offset and section_offset, marcandre . lureau, 2022/10/25
- [PULL v2 05/11] dump: Add architecture section and section string table support, marcandre . lureau, 2022/10/25
- [PULL v2 11/11] dump/win_dump: limit number of processed PRCBs, marcandre . lureau, 2022/10/25
- [PULL v2 06/11] s390x: Add protected dump cap,
marcandre . lureau <=
- [PULL v2 07/11] s390x: Introduce PV query interface, marcandre . lureau, 2022/10/25
- [PULL v2 08/11] include/elf.h: add s390x note types, marcandre . lureau, 2022/10/25
- [PULL v2 09/11] s390x: Add KVM PV dump interface, marcandre . lureau, 2022/10/25
- Re: [PULL v2 00/11] Dump patches, Stefan Hajnoczi, 2022/10/25