From nobody Mon Feb 9 23:03:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622822759; cv=none; d=zohomail.com; s=zohoarc; b=maV+TV/AbBXXWn01eMZasxJXtUqfA0B4Jl3Pr0Apr69hi1DphN5wJDHTIQe/e26wX78mRZ6ArerLkirXcWkCXQyq5bK9xwMD2HCv3XokZ1xb+7zlVtcj8u11yGeyXu9h+8eSP5bT4Hw3+KgXei8MVidxUVXCQ1TCMMY8WJBTlmU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622822759; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PvoZ38UPnJd1eKmSeIml7qGU1C99SJRJFwjVwPNmxyQ=; b=Ey0VpoVOr+T/lMCs+H9zj7+wJnPDX4z6YWQaWNKR9XXhd4wKiVbNeRVIZmx6hNYBbAAsUZPiETc+iao5GDl8+v9Rg/qptqhAcqq8v7XDvCl8TjOcHWkQWJLEPSwOOrOEYsnez8VsLWOTwPyHOEUl7MkvGnUzd8xOlT2jUl3IKKA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622822759441737.9846122688882; Fri, 4 Jun 2021 09:05:59 -0700 (PDT) Received: from localhost ([::1]:55134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpCKc-0004i3-8c for importer@patchew.org; Fri, 04 Jun 2021 12:05:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpC8h-0003JE-Fg for qemu-devel@nongnu.org; Fri, 04 Jun 2021 11:53:39 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:43961) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpC8f-0000BZ-7u for qemu-devel@nongnu.org; Fri, 04 Jun 2021 11:53:39 -0400 Received: by mail-wr1-x434.google.com with SMTP id u7so4356061wrs.10 for ; Fri, 04 Jun 2021 08:53:36 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k5sm7410470wrv.85.2021.06.04.08.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 08:53:31 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2B8701FFE8; Fri, 4 Jun 2021 16:53:22 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PvoZ38UPnJd1eKmSeIml7qGU1C99SJRJFwjVwPNmxyQ=; b=WhDJQAnY3k93ah2JXs8svrOJqarM9rzDCIGg2lCLXaLb1MB+qwEKlXbJUck6ARlEMU xkxDelggXdNRmv7U9pZciDXaJ7AHDQMSSuYUsEGQzxwtAoOz1L0n+U5WuI1LZ2pEMK0s AALde1wF1pJG+vxWOF0dTy7glllusqHIxpV+u0gpMNkmljll/GsDgiYTeEJ8xVQIrKDa LhpH98TFSn/UFhGsUlpc+28UClrKMaNcIvyYKXc/Tejf3BCk98VOaY5AMImwgvZqutk8 zVtBQKwwtZcA6tjJbioIbqEfkvrqxW/gQMA1UaIwkyi6gR7sQ4jQeFgvHrRdp89q+gpZ Z+QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PvoZ38UPnJd1eKmSeIml7qGU1C99SJRJFwjVwPNmxyQ=; b=Rn0dp0UJd4ZPgqUJ881yRw6AyKhL+SUr4JfBFubELlZ4BYGLXvABvKEehEZgAVv5kN w+B6q/F4RjX96nzc3ZPfS+RBtUg8Kc+vTFAVuCE7VWXArMumv3zeZlPpCtx/NPs0Obft +Ja7wNRJH2MYlKi1yeg8wvQ9tWUpIlC1ZPW+FxYQuILK55RYaq5l7KO4lBvjf5LuIbC2 EDAvhgHCNY0G7B+823XqXvZzxNad/kI3ZbpbRi+gIH0rfrp/uQ/uf+k39Lp8Tnx3RIFI wGBCgTS0NYDdgW9xTl8ssXbFZ0yWdgUTFFETD41lpTJ3fEvIXM6ETRY6MAGkVinCCLlT xYPA== X-Gm-Message-State: AOAM530ZK52WGdQ/pFsxZXObiQdXNxdYj4z5nBe/Nriufy5wg7V5EGhG CVtxHBhjkNQlLil76hGuoK+9kg== X-Google-Smtp-Source: ABdhPJzd71KTg8NS+O7HlSHid/SqIqWQggSrjeGg4w0PjiY2HoSfVdHKWbTz/EXFKyI+FjMphwLZkw== X-Received: by 2002:a5d:50ca:: with SMTP id f10mr4460353wrt.411.1622822015734; Fri, 04 Jun 2021 08:53:35 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v16 77/99] target/arm: arch_dump: restrict ELFCLASS64 to AArch64 Date: Fri, 4 Jun 2021 16:52:50 +0100 Message-Id: <20210604155312.15902-78-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210604155312.15902-1-alex.bennee@linaro.org> References: <20210604155312.15902-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-arm@nongnu.org, Richard Henderson , Claudio Fontana , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Claudio Fontana this will allow us to restrict more code to TARGET_AARCH64 Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e --- v16 - fix conflict now notes in arm_sysemu_ops --- target/arm/arch_dump.c | 12 +++++++----- target/arm/cpu.c | 2 ++ roms/u-boot | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/target/arm/arch_dump.c b/target/arm/arch_dump.c index 0184845310..9cc75a6fda 100644 --- a/target/arm/arch_dump.c +++ b/target/arm/arch_dump.c @@ -23,6 +23,8 @@ #include "elf.h" #include "sysemu/dump.h" =20 +#ifdef TARGET_AARCH64 + /* struct user_pt_regs from arch/arm64/include/uapi/asm/ptrace.h */ struct aarch64_user_regs { uint64_t regs[31]; @@ -141,7 +143,6 @@ static int aarch64_write_elf64_prfpreg(WriteCoreDumpFun= ction f, return 0; } =20 -#ifdef TARGET_AARCH64 static off_t sve_zreg_offset(uint32_t vq, int n) { off_t off =3D sizeof(struct aarch64_user_sve_header); @@ -229,7 +230,6 @@ static int aarch64_write_elf64_sve(WriteCoreDumpFunctio= n f, =20 return 0; } -#endif =20 int arm_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, int cpuid, void *opaque) @@ -272,15 +272,15 @@ int arm_cpu_write_elf64_note(WriteCoreDumpFunction f,= CPUState *cs, return ret; } =20 -#ifdef TARGET_AARCH64 if (cpu_isar_feature(aa64_sve, cpu)) { ret =3D aarch64_write_elf64_sve(f, env, cpuid, s); } -#endif =20 return ret; } =20 +#endif /* TARGET_AARCH64 */ + /* struct pt_regs from arch/arm/include/asm/ptrace.h */ struct arm_user_regs { uint32_t regs[17]; @@ -449,12 +449,14 @@ ssize_t cpu_get_note_size(int class, int machine, int= nr_cpus) size_t note_size; =20 if (class =3D=3D ELFCLASS64) { +#ifdef TARGET_AARCH64 note_size =3D AARCH64_PRSTATUS_NOTE_SIZE; note_size +=3D AARCH64_PRFPREG_NOTE_SIZE; -#ifdef TARGET_AARCH64 if (cpu_isar_feature(aa64_sve, cpu)) { note_size +=3D AARCH64_SVE_NOTE_SIZE(&cpu->env); } +#else + return -1; /* unsupported */ #endif } else { note_size =3D ARM_PRSTATUS_NOTE_SIZE; diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 0b20faaca0..b297d0e6aa 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1380,7 +1380,9 @@ static const struct SysemuCPUOps arm_sysemu_ops =3D { .get_phys_page_attrs_debug =3D arm_cpu_get_phys_page_attrs_debug, .asidx_from_attrs =3D arm_asidx_from_attrs, .write_elf32_note =3D arm_cpu_write_elf32_note, +#ifdef TARGET_AARCH64 .write_elf64_note =3D arm_cpu_write_elf64_note, +#endif .virtio_is_big_endian =3D arm_cpu_virtio_is_big_endian, .legacy_vmsd =3D &vmstate_arm_cpu, }; diff --git a/roms/u-boot b/roms/u-boot index b46dd116ce..d3689267f9 160000 --- a/roms/u-boot +++ b/roms/u-boot @@ -1 +1 @@ -Subproject commit b46dd116ce03e235f2a7d4843c6278e1da44b5e1 +Subproject commit d3689267f92c5956e09cc7d1baa4700141662bff --=20 2.20.1