target-arm queue
Subsystems (2)
target-arm queue for rc2. This has 3 Arm related bug fixes, and a couple of non-arm patches which don't have an obviously better route into the tree.
thanks
-- PMM
The following changes since commit b9e02bb3f98174209dbd5c96858e65a31723221b:
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-07-19' into staging (2019-07-22 10:11:28 +0100)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20190722
for you to fetch changes up to ddb45afbfbc639365d6c934e4e29f6de5e5e2a0e:
contrib/elf2dmp: Build download.o with CURL_CFLAGS (2019-07-22 14:07:39 +0100)
----------------------------------------------------------------
target-arm queue:
* target/arm: Add missing break statement for Hypervisor Trap Exception (fixes handling of SMC insn taken to AArch32 Hyp mode via HCR.TSC)
* hw/arm/fsl-imx6ul.c: Remove dead SMP-related code
* target/arm: Limit ID register assertions to TCG
* configure: Clarify URL to source downloads
* contrib/elf2dmp: Build download.o with CURL_CFLAGS
----------------------------------------------------------------
Peter Maydell (4):
hw/arm/fsl-imx6ul.c: Remove dead SMP-related code target/arm: Limit ID register assertions to TCG
configure: Clarify URL to source downloads contrib/elf2dmp: Build download.o with CURL_CFLAGS
Philippe Mathieu-Daudé (1):
target/arm: Add missing break statement for Hypervisor Trap Exception
configure | 2 +- Makefile | 1 - contrib/elf2dmp/Makefile.objs | 3 +++ include/hw/arm/fsl-imx6ul.h | 2 +- hw/arm/fsl-imx6ul.c | 62 +++++++++++++------------------------------ hw/arm/mcimx6ul-evk.c | 2 +- target/arm/cpu.c | 7 +++-- target/arm/helper.c | 1 + 8 files changed, 30 insertions(+), 50 deletions(-)
[Qemu-devel] [PULL 1/5] target/arm: Add missing break statement for Hypervisor Trap Exception
From: Philippe Mathieu-Daudé <[email protected]>
Reported by GCC9 when building with -Wimplicit-fallthrough=2:
target/arm/helper.c: In function ‘arm_cpu_do_interrupt_aarch32_hyp’:
target/arm/helper.c:7958:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
7958 | addr = 0x14;
| ~~~~~^~~~~~
target/arm/helper.c:7959:5: note: here
7959 | default:
| ^~~~~~~cc1: all warnings being treated as errors
Message-id: [email protected]
--- target/arm/helper.c | 1 + 1 file changed, 1 insertion(+)
target/arm/helper.c +1 -0
@@ -7956,6 +7956,7 @@ static void arm_cpu_do_interrupt_aarch32_hyp(CPUState *cs)break ;case EXCP_HYP_TRAP : addr =0x14 ; +break ;default :cpu_abort (cs,"Unhandled exception 0x%x\n" , cs->exception_index); }
Signature · 1 line
2.20.1
[Qemu-devel] [PULL 2/5] hw/arm/fsl-imx6ul.c: Remove dead SMP-related code
In reply to Peter MaydellThe i.MX6UL always has a single Cortex-A7 CPU (we set FSL_IMX6UL_NUM_CPUS to 1 in line with this). This means that all the code in fsl-imx6ul.c to handle multiple CPUs is dead code, and Coverity is now complaining that it is unreachable (CID 1403008, 1403011).
Remove the unreachable code and the only-executes-once loops, and replace the single-entry cpu[] array in the FSLIMX6ULState with a simple cpu member.
Message-id: [email protected]
--- include/hw/arm/fsl-imx6ul.h | 2 +- hw/arm/fsl-imx6ul.c | 62 +++++++++++-------------------------- hw/arm/mcimx6ul-evk.c | 2 +- 3 files changed, 20 insertions(+), 46 deletions(-)
include/hw/arm/fsl-imx6ul.h +1 -1
@@ -61,7 +61,7 @@ typedef struct FslIMX6ULState {DeviceState parent_obj;/*< public >*/ -ARMCPU cpu[FSL_IMX6UL_NUM_CPUS ]; +ARMCPU cpu;A15MPPrivState a7mpcore;IMXGPTState gpt[FSL_IMX6UL_NUM_GPTS ];IMXEPITState epit[FSL_IMX6UL_NUM_EPITS ];
hw/arm/fsl-imx6ul.c +18 -44
94 lines not on this page · raw message
hw/arm/mcimx6ul-evk.c +1 -1
@@ -71,7 +71,7 @@ static void mcimx6ul_evk_init(MachineState *machine) }if (!qtest_enabled ()) { -arm_load_kernel (&s->soc.cpu[0 ], &boot_info); +arm_load_kernel (&s->soc.cpu, &boot_info); } }
Signature · 1 line
2.20.1
[Qemu-devel] [PULL 3/5] target/arm: Limit ID register assertions to TCG
In reply to Peter MaydellIn arm_cpu_realizefn() we make several assertions about the values of guest ID registers:
* if the CPU provides AArch32 v7VE or better it must advertise the ARM_DIV feature
* if the CPU provides AArch32 A-profile v6 or better it must advertise the Jazelle feature
These are essentially consistency checks that our ID register specifications in cpu.c didn't accidentally miss out a feature, because increasingly the TCG emulation gates features on the values in ID registers rather than using old-style checks of ARM_FEATURE_FOO bits.
Unfortunately, these asserts can cause problems if we're running KVM, because in that case we don't control the values of the ID registers -- we read them from the host kernel. In particular, if the host kernel is older than 4.15 then it doesn't expose the ID registers via the KVM_GET_ONE_REG ioctl, and we set up dummy values for some registers and leave the rest at zero. (See the comment in target/arm/kvm64.c kvm_arm_get_host_cpu_features().) This set of dummy values is not sufficient to pass our assertions, and so on those kernels running an AArch32 guest on AArch64 will assert.
We could provide a more sophisticated set of dummy ID registers in this case, but that still leaves the possibility of a host CPU which reports bogus ID register values that would cause us to assert. It's more robust to only do these ID register checks if we're using TCG, as that is the only case where this is truly a QEMU code bug.
Message-id: [email protected]
--- target/arm/cpu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
target/arm/cpu.c +5 -2
@@ -1369,6 +1369,9 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)* There exist AArch64 cpus without AArch32 support. When KVM * queries ID_ISAR0_EL1 on such a host, the value is UNKNOWN. * Similarly, we cannot check ID_AA64PFR0 without AArch64 support. +* As a general principle, we also do not make ID register +* consistency checks anywhere unless using TCG, because only +* for TCG would a consistency-check failure be a QEMU bug. */ if (arm_feature (&cpu->env,ARM_FEATURE_AARCH64 )) { no_aa32 = !cpu_isar_feature (aa64_aa32, cpu);
@@ -1383,7 +1386,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)* Presence of EL2 itself is ARM_FEATURE_EL2, and of the * Security Extensions is ARM_FEATURE_EL3. */ -assert (no_aa32 ||cpu_isar_feature (arm_div, cpu)); +assert (!tcg_enabled () || no_aa32 ||cpu_isar_feature (arm_div, cpu));set_feature (env,ARM_FEATURE_LPAE );set_feature (env,ARM_FEATURE_V7 ); }
@@ -1409,7 +1412,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)if (arm_feature (env,ARM_FEATURE_V6 )) {set_feature (env,ARM_FEATURE_V5 );if (!arm_feature (env,ARM_FEATURE_M )) { -assert (no_aa32 ||cpu_isar_feature (jazelle, cpu)); +assert (!tcg_enabled () || no_aa32 ||cpu_isar_feature (jazelle, cpu));set_feature (env,ARM_FEATURE_AUXCR ); } }
Signature · 1 line
2.20.1
[Qemu-devel] [PULL 4/5] configure: Clarify URL to source downloads
In reply to Peter MaydellIf configure detects that it's being run on a source tree which is missing git modules, it prints an error messages suggesting that the user downloads a correct source archive from the project website. However https://www.qemu.org/download/ is a link to a page with multiple tabs, with the default being the one telling users how to get binaries from their distro. Clarify the URL we print to include the #source anchor, so that the browser will go directly to the source-tarball instructions.
Message-id: [email protected]
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
@@ -323,7 +323,7 @@ else echo "to acquire QEMU source archives. Non-GIT builds are only" echo "supported with source archives linked from:" echo - echo " https://www.qemu.org/download/" + echo " https://www.qemu.org/download/#source" echo echo "Developers working with GIT can use scripts/archive-source.sh" echo "if they need to create valid source archives."
Signature · 1 line
2.20.1
[Qemu-devel] [PULL 5/5] contrib/elf2dmp: Build download.o with CURL_CFLAGS
In reply to Peter Maydellcontrib/elf2dmp has a source file which uses curl/curl.h; although we link the final executable with CURL_LIBS, we forgot to build this source file with CURL_CFLAGS, so if the curl header is in a place that's not already on the system include path then it will fail to build.
Add a line specifying the cflags needed for download.o; while we are here, bring the specification of the libs into line with this, since using a per-object variable setting is preferred over adding them to the final executable link line.
Message-id: [email protected]
--- Makefile | 1 - contrib/elf2dmp/Makefile.objs | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-)
Makefile +0 -1
@@ -626,7 +626,6 @@ ifneq ($(EXESUF),) qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI) endif -elf2dmp$(EXESUF): LIBS += $(CURL_LIBS) elf2dmp$(EXESUF): $(elf2dmp-obj-y) $(call LINK, $^)
contrib/elf2dmp/Makefile.objs +3 -0
@@ -1 +1,4 @@ elf2dmp-obj-y = main.o addrspace.o download.o pdb.o qemu_elf.o + +download.o-cflags := $(CURL_CFLAGS) +download.o-libs := $(CURL_LIBS)
Signature · 1 line
2.20.1
Peter Maydell
AppliedQuoted 20 lines · Peter Maydell
target-arm queue for rc2. This has 3 Arm related bug fixes, and a couple of non-arm patches which don't have an obviously better route into the tree.
thanks
-- PMMThe following changes since commit
b9e02bb3f98174209dbd5c96858e65a31723221b:Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-07-19' into staging (2019-07-22 10:11:28 +0100)
are available in the Git repository at:
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20190722
for you to fetch changes up to
ddb45afbfbc639365d6c934e4e29f6de5e5e2a0e:contrib/elf2dmp: Build download.o with
CURL_CFLAGS(2019-07-22 14:07:39 +0100)
Quoted 9 lines
----------------------------------------------------------------
target-arm queue:
* target/arm: Add missing break statement for Hypervisor Trap Exception (fixes handling of SMC insn taken to AArch32 Hyp mode via HCR.TSC)
*hw/arm/fsl-imx6ul.c: Remove dead SMP-related code
* target/arm: Limit ID register assertions to TCG
* configure: Clarify URL to source downloads
* contrib/elf2dmp: Build download.o withCURL_CFLAGS
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1
for any user-visible changes.
-- PMM