Dump patches
From: Marc-André Lureau <[email protected]>
The following changes since commit e750a7ace492f0b450653d4ad368a77d6f660fb8:
Merge tag 'pull-9p-20221024' of https://github.com/cschoenebeck/qemu into staging (2022-10-24 14:27:12 -0400)
are available in the Git repository at:
https://gitlab.com/marcandre.lureau/qemu.git tags/dump-pull-request
for you to fetch changes up to 1c08fb2d72aac3324bb537a70d05523c1a8984ab:
dump/win_dump: limit number of processed PRCBs (2022-10-25 11:47:35 +0400)
----------------------------------------------------------------
dump queue
Hi
The "dump" queue, with:
- [PATCH v3/v4 0/9] dump: Cleanup and consolidation
- [PATCH v4 0/4] dump: add 32-bit guest Windows support
----------------------------------------------------------------
Janosch Frank (10):
dump: Use a buffer for ELF section data and headers
dump: Write ELF section headers right after ELF header
dump: Reorder struct DumpState
dump: Reintroduce memory_offset and section_offset
dump: Add architecture section and section string table support
s390x: Add protected dump cap
s390x: Introduce PV query interface
include/elf.h: add s390x note types
s390x: Add KVM PV dump interface
s390x: pv: Add dump support
Viktor Prutyanov (1):
dump/win_dump: limit number of processed PRCBs
include/elf.h | 2 + include/hw/s390x/pv.h | 19 +++ include/sysemu/dump-arch.h | 3 + include/sysemu/dump.h | 26 +++- target/s390x/kvm/kvm_s390x.h | 1 + dump/dump.c | 288 +++++++++++++++++++++++++++-------- dump/win_dump.c | 7 + hw/s390x/pv.c | 112 ++++++++++++++ hw/s390x/s390-virtio-ccw.c | 6 + target/s390x/arch_dump.c | 262 +++++++++++++++++++++++++++---- target/s390x/kvm/kvm.c | 7 + 11 files changed, 635 insertions(+), 98 deletions(-)
Signature · 1 line
2.37.3
[PULL v2 01/11] dump: Use a buffer for ELF section data and headers
From: Janosch Frank <[email protected]>
Currently we're writing the NULL section header if we overflow the physical header number in the ELF header. But in the future we'll add custom section headers AND section data.
To facilitate this we need to rearange section handling a bit. As with the other ELF headers we split the code into a prepare and a write step.
Message-Id: <[email protected]>
--- include/sysemu/dump.h | 2 ++ dump/dump.c | 75 +++++++++++++++++++++++++++++-------------- 2 files changed, 53 insertions(+), 24 deletions(-)
include/sysemu/dump.h +2 -0
@@ -177,6 +177,8 @@ typedef struct DumpState {int64_t filter_area_begin;/* Start address of partial guest memory area */ int64_t filter_area_length;/* Length of partial guest memory area */ +void *elf_section_hdrs;/* Pointer to section header buffer */ +uint8_t *note_buf;/* buffer for notes */ size_t note_buf_offset;/* the writing place in note_buf */ uint32_t nr_cpus;/* number of guest's cpu */
dump/dump.c +51 -24
94 lines not on this page · raw message
Signature · 1 line
2.37.3
[PULL v2 11/11] dump/win_dump: limit number of processed PRCBs
In reply to [email protected]From: Viktor Prutyanov <[email protected]>
When number of CPUs utilized by guest Windows is less than defined in QEMU (i.e., desktop versions of Windows severely limits number of CPU sockets), patch_and_save_context routine accesses non-existent PRCB and fails. So, limit number of processed PRCBs by NumberProcessors taken from guest Windows driver.
Message-Id: <[email protected]>
--- dump/win_dump.c | 7 +++++++ 1 file changed, 7 insertions(+)
dump/win_dump.c +7 -0
@@ -273,6 +273,13 @@ static void patch_and_save_context(WinDumpHeader *h, bool x64,uint64_t Context;WinContext ctx; +if (i >=WIN_DUMP_FIELD (NumberProcessors)) { +warn_report ("win-dump: number of QEMU CPUs is bigger than" +" NumberProcessors (%u) in guest Windows" , +WIN_DUMP_FIELD (NumberProcessors)); +return ; + } +if (cpu_read_ptr (x64, first_cpu, KiProcessorBlock + i *win_dump_ptr_size (x64), &Prcb)) {
Signature · 1 line
2.37.3
[PULL v2 06/11] s390x: Add protected dump cap
In reply to [email protected]From: Janosch Frank <[email protected]>
Add a protected dump capability for later feature checking.
Message-Id: <[email protected]>
--- target/s390x/kvm/kvm_s390x.h | 1 + target/s390x/kvm/kvm.c | 7 +++++++ 2 files changed, 8 insertions(+)
target/s390x/kvm/kvm_s390x.h +1 -0
@@ -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);
target/s390x/kvm/kvm.c +7 -0
@@ -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;
Signature · 1 line
2.37.3
[PULL v2 05/11] dump: Add architecture section and section string table support
In reply to [email protected]From: Janosch Frank <[email protected]>
Add hooks which architectures can use to add arbitrary data to custom sections.
Also add a section name string table in order to identify section contents
Message-Id: <[email protected]>
--- include/sysemu/dump-arch.h | 3 + include/sysemu/dump.h | 3 + dump/dump.c | 186 +++++++++++++++++++++++++++++++------ 3 files changed, 166 insertions(+), 26 deletions(-)
include/sysemu/dump-arch.h +3 -0
@@ -21,6 +21,9 @@ typedef struct ArchDumpInfo {uint32_t page_size;/* The target's page size. If it's variable and * unknown, then this should be the maximum. */ uint64_t phys_base;/* The target's physmem base. */ +void (*arch_sections_add_fn)(DumpState *s); +uint64_t (*arch_sections_write_hdr_fn)(DumpState *s,uint8_t *buff); +int (*arch_sections_write_fn)(DumpState *s,uint8_t *buff); } ArchDumpInfo;struct GuestPhysBlockList ;/* memory_mapping.h */
include/sysemu/dump.h +3 -0
@@ -180,6 +180,9 @@ typedef struct DumpState {hwaddr note_offset;void *elf_section_hdrs;/* Pointer to section header buffer */ +void *elf_section_data;/* Pointer to section data buffer */ +uint64_t elf_section_data_size;/* Size of section data */ +GArray *string_table_buf;/* String table data buffer */ uint8_t *note_buf;/* buffer for notes */ size_t note_buf_offset;/* the writing place in note_buf */
dump/dump.c +160 -26
275 lines not on this page · raw message
Signature · 1 line
2.37.3
[PULL v2 03/11] dump: Reorder struct DumpState
In reply to [email protected]From: Janosch Frank <[email protected]>
Let's move ELF related members into one block and guest memory related ones into another to improve readability.
Message-Id: <[email protected]>
--- include/sysemu/dump.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
include/sysemu/dump.h +9 -7
@@ -154,15 +154,8 @@ typedef struct DumpState {GuestPhysBlockList guest_phys_blocks;ArchDumpInfo dump_info;MemoryMappingList list; -uint32_t phdr_num; -uint32_t shdr_num;bool resume;bool detached; -ssize_t note_size; -hwaddr shdr_offset; -hwaddr phdr_offset; -hwaddr section_offset; -hwaddr note_offset;hwaddr memory_offset;int fd;
@@ -177,6 +170,15 @@ typedef struct DumpState {int64_t filter_area_begin;/* Start address of partial guest memory area */ int64_t filter_area_length;/* Length of partial guest memory area */ +/* Elf dump related data */ +uint32_t phdr_num; +uint32_t shdr_num; +ssize_t note_size; +hwaddr shdr_offset; +hwaddr phdr_offset; +hwaddr section_offset; +hwaddr note_offset; +void *elf_section_hdrs;/* Pointer to section header buffer */ uint8_t *note_buf;/* buffer for notes */
Signature · 1 line
2.37.3
[PULL v2 08/11] include/elf.h: add s390x note types
In reply to [email protected]From: Janosch Frank <[email protected]>
Adding two s390x note types
Message-Id: <[email protected]>
--- include/elf.h | 2 ++ 1 file changed, 2 insertions(+)
include/elf.h +2 -0
@@ -1650,6 +1650,8 @@ typedef struct elf64_shdr {#define NT_TASKSTRUCT 4#define NT_AUXV 6#define NT_PRXFPREG 0x46e62b7f/* copied from gdb5.1/include/elf/common.h */ +#define NT_S390_PV_CPU_DATA 0x30e/* s390 protvirt cpu dump data */ +#define NT_S390_RI_CB 0x30d/* s390 runtime instrumentation */ #define NT_S390_GS_CB 0x30b/* s390 guarded storage registers */ #define NT_S390_VXRS_HIGH 0x30a/* s390 vector registers 16-31 */ #define NT_S390_VXRS_LOW 0x309/* s390 vector registers 0-15 (lower half) */
Signature · 1 line
2.37.3
[PULL v2 04/11] dump: Reintroduce memory_offset and section_offset
In reply to [email protected]From: Janosch Frank <[email protected]>
section_offset will later be used to store the offset to the section data which will be stored last. For now memory_offset is only needed to make section_offset look nicer.
Message-Id: <[email protected]>
--- dump/dump.c | 2 ++ 1 file changed, 2 insertions(+)
dump/dump.c +2 -0
@@ -1876,6 +1876,8 @@ static void dump_init(DumpState *s, int fd, bool has_format, s->phdr_offset = s->shdr_offset +sizeof (Elf32_Shdr) * s->shdr_num; s->note_offset = s->phdr_offset +sizeof (Elf32_Phdr) * s->phdr_num; } + s->memory_offset = s->note_offset + s->note_size; + s->section_offset = s->memory_offset + s->total_size;return ;
Signature · 1 line
2.37.3
[PULL v2 07/11] s390x: Introduce PV query interface
In reply to [email protected]From: Janosch Frank <[email protected]>
Introduce an interface over which we can get information about UV data.
Message-Id: <[email protected]>
--- include/hw/s390x/pv.h | 10 +++++++ hw/s390x/pv.c | 61 ++++++++++++++++++++++++++++++++++++++ hw/s390x/s390-virtio-ccw.c | 6 ++++ 3 files changed, 77 insertions(+)
include/hw/s390x/pv.h +10 -0
@@ -38,6 +38,7 @@ static inline bool s390_is_pv(void)return ccw->pv; } +int s390_pv_query_info (void );int s390_pv_vm_enable (void );void s390_pv_vm_disable (void );int s390_pv_set_sec_parms (uint64_t origin,uint64_t length);
@@ -46,8 +47,13 @@ void s390_pv_prep_reset(void);int s390_pv_verify (void );void s390_pv_unshare (void );void s390_pv_inject_reset_error (CPUState *cs); +uint64_t kvm_s390_pv_dmp_get_size_cpu (void ); +uint64_t kvm_s390_pv_dmp_get_size_mem_state (void ); +uint64_t kvm_s390_pv_dmp_get_size_completion_data (void ); +bool kvm_s390_pv_info_basic_valid (void );#else /* CONFIG_KVM */ static inline bool s390_is_pv (void ) {return false; } +static inline int s390_pv_query_info (void ) {return 0 ; }static inline int s390_pv_vm_enable (void ) {return 0 ; }static inline void s390_pv_vm_disable (void ) {}static inline int s390_pv_set_sec_parms (uint64_t origin,uint64_t length) {return 0 ; }
@@ -56,6 +62,10 @@ static inline void s390_pv_prep_reset(void) {}static inline int s390_pv_verify (void ) {return 0 ; }static inline void s390_pv_unshare (void ) {}static inline void s390_pv_inject_reset_error (CPUState *cs) {}; +static inline uint64_t kvm_s390_pv_dmp_get_size_cpu (void ) {return 0 ; } +static inline uint64_t kvm_s390_pv_dmp_get_size_mem_state (void ) {return 0 ; } +static inline uint64_t kvm_s390_pv_dmp_get_size_completion_data (void ) {return 0 ; } +static inline bool kvm_s390_pv_info_basic_valid (void ) {return false; }#endif /* CONFIG_KVM */ int s390_pv_kvm_init (ConfidentialGuestSupport *cgs,Error **errp);
hw/s390x/pv.c +61 -0
79 lines not on this page · raw message
hw/s390x/s390-virtio-ccw.c +6 -0
@@ -366,6 +366,12 @@ static int s390_machine_protect(S390CcwMachineState *ms) ms->pv = true; +/* Will return 0 if API is not available since it's not vital */ + rc =s390_pv_query_info (); +if (rc) { + goto out_err; + } +/* Set SE header and unpack */ rc =s390_ipl_prepare_pv_header ();if (rc) {
Signature · 1 line
2.37.3
[PULL v2 02/11] dump: Write ELF section headers right after ELF header
In reply to [email protected]From: Janosch Frank <[email protected]>
Let's start bundling the writes of the headers and of the data so we have a clear ordering between them. Since the ELF header uses offsets to the headers we can freely order them.
Message-Id: <[email protected]>
--- dump/dump.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-)
dump/dump.c +14 -17
@@ -583,6 +583,8 @@ static void dump_begin(DumpState *s, Error **errp)* -------------- * | elf header | * -------------- +* | sctn_hdr | +* -------------- * | PT_NOTE | * -------------- * | PT_LOAD |
@@ -591,8 +593,6 @@ static void dump_begin(DumpState *s, Error **errp)* -------------- * | PT_LOAD | * -------------- -* | sec_hdr | -* -------------- * | elf note | * -------------- * | memory |
@@ -608,20 +608,20 @@ static void dump_begin(DumpState *s, Error **errp)return ; } -/* write PT_NOTE to vmcore */ -write_elf_phdr_note (s, errp); +/* write section headers to vmcore */ +write_elf_section_headers (s, errp);if (*errp) {return ; } -/* write all PT_LOADs to vmcore */ -write_elf_phdr_loads (s, errp); +/* write PT_NOTE to vmcore */ +write_elf_phdr_note (s, errp);if (*errp) {return ; } -/* write section headers to vmcore */ -write_elf_section_headers (s, errp); +/* write all PT_LOADs to vmcore */ +write_elf_phdr_loads (s, errp);if (*errp) {return ; }
@@ -1868,16 +1868,13 @@ static void dump_init(DumpState *s, int fd, bool has_format, }if (dump_is_64bit (s)) { - s->phdr_offset =sizeof (Elf64_Ehdr); - s->shdr_offset = s->phdr_offset +sizeof (Elf64_Phdr) * s->phdr_num; - s->note_offset = s->shdr_offset +sizeof (Elf64_Shdr) * s->shdr_num; - s->memory_offset = s->note_offset + s->note_size; + s->shdr_offset =sizeof (Elf64_Ehdr); + s->phdr_offset = s->shdr_offset +sizeof (Elf64_Shdr) * s->shdr_num; + s->note_offset = s->phdr_offset +sizeof (Elf64_Phdr) * s->phdr_num; }else { - - s->phdr_offset =sizeof (Elf32_Ehdr); - s->shdr_offset = s->phdr_offset +sizeof (Elf32_Phdr) * s->phdr_num; - s->note_offset = s->shdr_offset +sizeof (Elf32_Shdr) * s->shdr_num; - s->memory_offset = s->note_offset + s->note_size; + s->shdr_offset =sizeof (Elf32_Ehdr); + s->phdr_offset = s->shdr_offset +sizeof (Elf32_Shdr) * s->shdr_num; + s->note_offset = s->phdr_offset +sizeof (Elf32_Phdr) * s->phdr_num; }return ;
Signature · 1 line
2.37.3
[PULL v2 09/11] s390x: Add KVM PV dump interface
In reply to [email protected]From: Janosch Frank <[email protected]>
Let's add a few bits of code which hide the new KVM PV dump API from us via new functions.
Message-Id: <[email protected]>
--- include/hw/s390x/pv.h | 9 ++++++++ hw/s390x/pv.c | 51 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+)
include/hw/s390x/pv.h +9 -0
@@ -51,6 +51,10 @@ uint64_t kvm_s390_pv_dmp_get_size_cpu(void);uint64_t kvm_s390_pv_dmp_get_size_mem_state (void );uint64_t kvm_s390_pv_dmp_get_size_completion_data (void );bool kvm_s390_pv_info_basic_valid (void ); +int kvm_s390_dump_init (void ); +int kvm_s390_dump_cpu (S390CPU *cpu,void *buff); +int kvm_s390_dump_mem_state (uint64_t addr,size_t len,void *dest); +int kvm_s390_dump_completion_data (void *buff);#else /* CONFIG_KVM */ static inline bool s390_is_pv (void ) {return false; }static inline int s390_pv_query_info (void ) {return 0 ; }
@@ -66,6 +70,11 @@ static inline uint64_t kvm_s390_pv_dmp_get_size_cpu(void) { return 0; }static inline uint64_t kvm_s390_pv_dmp_get_size_mem_state (void ) {return 0 ; }static inline uint64_t kvm_s390_pv_dmp_get_size_completion_data (void ) {return 0 ; }static inline bool kvm_s390_pv_info_basic_valid (void ) {return false; } +static inline int kvm_s390_dump_init (void ) {return 0 ; } +static inline int kvm_s390_dump_cpu (S390CPU *cpu,void *buff) {return 0 ; } +static inline int kvm_s390_dump_mem_state (uint64_t addr,size_t len, +void *dest) {return 0 ; } +static inline int kvm_s390_dump_completion_data (void *buff) {return 0 ; }#endif /* CONFIG_KVM */ int s390_pv_kvm_init (ConfidentialGuestSupport *cgs,Error **errp);
hw/s390x/pv.c +51 -0
57 lines not on this page · raw message
Signature · 1 line
2.37.3
[PULL v2 10/11] s390x: pv: Add dump support
In reply to [email protected]From: Janosch Frank <[email protected]>
Sometimes dumping a guest from the outside is the only way to get the data that is needed. This can be the case if a dumping mechanism like KDUMP hasn't been configured or data needs to be fetched at a specific point. Dumping a protected guest from the outside without help from fw/hw doesn't yield sufficient data to be useful. Hence we now introduce PV dump support.
The PV dump support works by integrating the firmware into the dump process. New Ultravisor calls are used to initiate the dump process, dump cpu data, dump memory state and lastly complete the dump process. The UV calls are exposed by KVM via the new KVM_PV_DUMP command and its subcommands. The guest's data is fully encrypted and can only be decrypted by the entity that owns the customer communication key for the dumped guest. Also dumping needs to be allowed via a flag in the SE header.
On the QEMU side of things we store the PV dump data in the newly introduced architecture ELF sections (storage state and completion data) and the cpu notes (for cpu dump data).
Users can use the zgetdump tool to convert the encrypted QEMU dump to an unencrypted one.
Message-Id: <[email protected]>
--- include/sysemu/dump.h | 5 + dump/dump.c | 12 +- target/s390x/arch_dump.c | 262 +++++++++++++++++++++++++++++++++++---- 3 files changed, 246 insertions(+), 33 deletions(-)
include/sysemu/dump.h +5 -0
@@ -215,4 +215,9 @@ typedef struct DumpState {uint16_t cpu_to_dump16 (DumpState *s,uint16_t val);uint32_t cpu_to_dump32 (DumpState *s,uint32_t val);uint64_t cpu_to_dump64 (DumpState *s,uint64_t val); + +int64_t dump_filtered_memblock_size (GuestPhysBlock *block,int64_t filter_area_start, +int64_t filter_area_length); +int64_t dump_filtered_memblock_start (GuestPhysBlock *block,int64_t filter_area_start, +int64_t filter_area_length);#endif
dump/dump.c +6 -6
@@ -708,9 +708,9 @@ static void dump_begin(DumpState *s, Error **errp)write_elf_notes (s, errp); } -static int64_t dump_filtered_memblock_size (GuestPhysBlock *block, -int64_t filter_area_start, -int64_t filter_area_length) +int64_t dump_filtered_memblock_size (GuestPhysBlock *block, +int64_t filter_area_start, +int64_t filter_area_length) {int64_t size, left, right;
@@ -728,9 +728,9 @@ static int64_t dump_filtered_memblock_size(GuestPhysBlock *block,return size; } -static int64_t dump_filtered_memblock_start (GuestPhysBlock *block, -int64_t filter_area_start, -int64_t filter_area_length) +int64_t dump_filtered_memblock_start (GuestPhysBlock *block, +int64_t filter_area_start, +int64_t filter_area_length) {if (filter_area_length) {/* return -1 if the block is not within filter area */
target/s390x/arch_dump.c +235 -27
337 lines not on this page · raw message
Signature · 1 line
2.37.3
Please solve this CI failure:
c++ -o qemu-system-s390x .../usr/bin/ld: libqemu-s390x-softmmu.fa.p/target_s390x_arch_dump.c.o: in
function `arch_sections_add':/home/gitlab-runner/builds/Y1MP9VSY/0/qemu-project/qemu/build/../target/s390x/arch_dump.c:392:
undefined reference to `kvm_s390_get_protected_dump'/usr/bin/ld: libqemu-s390x-softmmu.fa.p/target_s390x_arch_dump.c.o: in
function `cpu_get_dump_info':/home/gitlab-runner/builds/Y1MP9VSY/0/qemu-project/qemu/build/../target/s390x/arch_dump.c:452:
undefined reference to `kvm_s390_get_protected_dump'
collect2: error: ld returned 1 exit status
https://gitlab.com/qemu-project/qemu/-/jobs/3226673649
Thanks,
Stefan
Hi Janosch
Quoted 11 lines · Stefan Hajnoczi
Please solve this CI failure:
c++ -o qemu-system-s390x ...
/usr/bin/ld:libqemu-s390x-softmmu.fa.p/target_s390x_arch_dump.c.o: in function `arch_sections_add':
/home/gitlab-runner/builds/Y1MP9VSY/0/qemu-project/qemu/build/../target/s390x/arch_dump.c:392:
undefined reference to `kvm_s390_get_protected_dump'/usr/bin/ld:libqemu-s390x-softmmu.fa.p/target_s390x_arch_dump.c.o: in
function `cpu_get_dump_info':
Quoted 7 lines
/home/gitlab-runner/builds/Y1MP9VSY/0/qemu-project/qemu/build/../target/s390x/arch_dump.c:452:
undefined reference to `kvm_s390_get_protected_dump'
collect2: error: ld returned 1 exit status
Ok to squash this with "s390x: Add protected dump cap" patch ? that should solve it hopefully.
target/s390x/kvm/stubs.c new file +12 -0
@@ -0,0 +1,12 @@ +/* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" + +#include "kvm_s390x.h" + +int kvm_s390_get_protected_dump (void ) +{ +return false; +}
target/s390x/kvm/meson.build +2 -0
@@ -1,6 +1,8 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 'kvm.c' +), if_false: files( + 'stubs.c' ))
Quoted 19 lines · Marc-André Lureau
Hi Janosch
Quoted 15 lines · Stefan Hajnoczi
Please solve this CI failure:
c++ -o qemu-system-s390x ...
/usr/bin/ld:libqemu-s390x-softmmu.fa.p/target_s390x_arch_dump.c.o: in function `arch_sections_add':
/home/gitlab-runner/builds/Y1MP9VSY/0/qemu-project/qemu/build/../target/s390x/arch_dump.c:392:
undefined reference to `kvm_s390_get_protected_dump'/usr/bin/ld:libqemu-s390x-softmmu.fa.p/target_s390x_arch_dump.c.o: in
function `cpu_get_dump_info':
/home/gitlab-runner/builds/Y1MP9VSY/0/qemu-project/qemu/build/../target/s390x/arch_dump.c:452:
undefined reference to `kvm_s390_get_protected_dump'
collect2: error: ld returned 1 exit status
Quoted 5 lines
Quoted 3 lines
Ok to squash this with "s390x: Add protected dump cap" patch ? that should solve it hopefully.
Sure, LGTM
Quoted 31 lines
target/s390x/kvm/stubs.c new file +12
-0@@ -0,0 +1,12 @@ +/* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" + +#include "kvm_s390x.h" + +int kvm_s390_get_protected_dump (void ) +{ +return false; +}target/s390x/kvm/meson.build +2
-0@@ -1,6 +1,8 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 'kvm.c' +), if_false: files( + 'stubs.c' ))