From patchwork Thu Mar 10 11:16:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janosch Frank X-Patchwork-Id: 12776162 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA5B6C433F5 for ; Thu, 10 Mar 2022 11:18:27 +0000 (UTC) Received: from localhost ([::1]:35708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nSGoM-00070Z-Px for qemu-devel@archiver.kernel.org; Thu, 10 Mar 2022 06:18:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSGmd-0004Gh-Rp for qemu-devel@nongnu.org; Thu, 10 Mar 2022 06:16:40 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:32556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSGmc-0005t8-5Z for qemu-devel@nongnu.org; Thu, 10 Mar 2022 06:16:39 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22AB6UEK030195 for ; Thu, 10 Mar 2022 11:16:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=kOHEyNfe+Lk07VzkI2et3Ng3Woccm+KKZLNymM5uzJU=; b=mRZkkEytNaYVBKmrrxZ7TSBHJKnpKiZZ22six/IX/ixghOEmiyLn8nR0QZE0r94Hpdsn Y8FOZNaQubXlq7jGrPW2F9uQzNkqXOQDdr8Vfq8y61odbXVn/b7j6i5a7jvKEVxcVd6y BePMiW9hPH1faBvtv7nMeTwXVA2eYddIy93G6vgrAyO0j3ynpCx4W/vPtRqLtqxnKYrt 9Y7MIbm5bNvn0jaj/Wlp4Kib0tjJm1AoXlO69/MW+LXZMIaRsNsjkhaRzry1HcoBOMjB N+xt+kjCsrjeM2M5vzKJUr6dqzVfNE4OxzM2wE1T2upCEU3yxhxPDnWycJ69emz7ZELf og== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3epwy3nb07-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 10 Mar 2022 11:16:36 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 22ABArLw031161 for ; Thu, 10 Mar 2022 11:16:36 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3epwy3nayk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Mar 2022 11:16:36 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 22ABC1aK024037; Thu, 10 Mar 2022 11:16:33 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma04ams.nl.ibm.com with ESMTP id 3enqgnq1px-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Mar 2022 11:16:33 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22ABGVoJ54264102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Mar 2022 11:16:31 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 17DD74C046; Thu, 10 Mar 2022 11:16:31 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8EAE54C044; Thu, 10 Mar 2022 11:16:30 +0000 (GMT) Received: from linux6.. (unknown [9.114.12.104]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 10 Mar 2022 11:16:30 +0000 (GMT) From: Janosch Frank To: qemu-devel@nongnu.org Subject: [PATCH 3/5] dump: Reorder struct DumpState Date: Thu, 10 Mar 2022 11:16:06 +0000 Message-Id: <20220310111608.3362-4-frankja@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220310111608.3362-1-frankja@linux.ibm.com> References: <20220310111608.3362-1-frankja@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ux5SPgMaOZDu8JxNn14j9kknVw6vq3dB X-Proofpoint-ORIG-GUID: mbMv5Q1KwiZiHqhB7B36xjRbtcuObNKd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-10_03,2022-03-09_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 clxscore=1015 malwarescore=0 spamscore=0 suspectscore=0 phishscore=0 mlxlogscore=758 lowpriorityscore=0 adultscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203100059 Received-SPF: pass client-ip=148.163.156.1; envelope-from=frankja@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, mhartmay@linux.ibm.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Let's move ELF related members into one block and guest memory related ones into another to improve readability. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson --- include/sysemu/dump.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h index 4c5a593b81..186348a972 100644 --- a/include/sysemu/dump.h +++ b/include/sysemu/dump.h @@ -154,24 +154,28 @@ 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; + /* Guest memory related data */ GuestPhysBlock *next_block; ram_addr_t start; bool has_filter; int64_t begin; int64_t length; + /* Elf dump related data */ + uint32_t phdr_num; + uint32_t shdr_num; + uint32_t sh_info; + ssize_t note_size; + hwaddr shdr_offset; + hwaddr phdr_offset; + hwaddr note_offset; + hwaddr section_offset; + void *elf_header; void *elf_section_hdrs; uint64_t elf_section_data_size;