Peter Maydell [Mon, 16 Aug 2021 18:03:05 +0000 (19:03 +0100)]
target/arm: Implement HSTR.TJDBX
In v7A, the HSTR register has a TJDBX bit which traps NS EL0/EL1
access to the JOSCR and JMCR trivial Jazelle registers, and also BXJ.
Implement these traps. In v8A this HSTR bit doesn't exist, so don't
trap for v8A CPUs.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210816180305.20137-3-peter.maydell@linaro.org
Peter Maydell [Mon, 16 Aug 2021 18:03:04 +0000 (19:03 +0100)]
target/arm: Implement HSTR.TTEE
In v7, the HSTR register has a TTEE bit which allows EL0/EL1 accesses
to the Thumb2EE TEECR and TEEHBR registers to be trapped to the
hypervisor. Implement these traps.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210816180305.20137-2-peter.maydell@linaro.org
Peter Maydell [Mon, 16 Aug 2021 13:58:42 +0000 (14:58 +0100)]
hw/arm/virt: Delete EL3 error checksnow provided in CPU realize
Now that the CPU realize function will fail cleanly if we ask for EL3
when KVM is enabled, we don't need to check for errors explicitly in
the virt board code. The reported message is slightly different;
it is now:
qemu-system-aarch64: Cannot enable KVM when guest CPU has EL3 enabled
instead of:
qemu-system-aarch64: mach-virt: KVM does not support Security extensions
We don't delete the MTE check because there the logic is more
complex; deleting the check would work but makes the error message
less helpful, as it would read:
qemu-system-aarch64: MTE requested, but not supported by the guest CPU
instead of:
qemu-system-aarch64: mach-virt: KVM does not support providing MTE to the guest CPU
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id:
20210816135842.25302-4-peter.maydell@linaro.org
Peter Maydell [Mon, 16 Aug 2021 13:58:41 +0000 (14:58 +0100)]
target/arm: Avoid assertion trying to use KVM and multiple ASes
KVM cannot support multiple address spaces per CPU; if you try to
create more than one then cpu_address_space_init() will assert.
In the Arm CPU realize function, detect the configurations which
would cause us to need more than one AS, and cleanly fail the
realize rather than blundering on into the assertion. This
turns this:
$ qemu-system-aarch64 -enable-kvm -display none -cpu max -machine raspi3b
qemu-system-aarch64: ../../softmmu/physmem.c:747: cpu_address_space_init: Assertion `asidx == 0 || !kvm_enabled()' failed.
Aborted
into:
$ qemu-system-aarch64 -enable-kvm -display none -machine raspi3b
qemu-system-aarch64: Cannot enable KVM when guest CPU has EL3 enabled
and this:
$ qemu-system-aarch64 -enable-kvm -display none -machine mps3-an524
qemu-system-aarch64: ../../softmmu/physmem.c:747: cpu_address_space_init: Assertion `asidx == 0 || !kvm_enabled()' failed.
Aborted
into:
$ qemu-system-aarch64 -enable-kvm -display none -machine mps3-an524
qemu-system-aarch64: Cannot enable KVM when using an M-profile guest CPU
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/528
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id:
20210816135842.25302-3-peter.maydell@linaro.org
Peter Maydell [Mon, 16 Aug 2021 13:58:40 +0000 (14:58 +0100)]
raspi: Use error_fatal for SoC realize errors, not error_abort
The SoC realize can fail for legitimate reasons, because it propagates
errors up from CPU realize, which in turn can be provoked by user
error in setting commandline options. Use error_fatal so we report
the error message to the user and exit, rather than asserting
via error_abort.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id:
20210816135842.25302-2-peter.maydell@linaro.org
Peter Maydell [Fri, 13 Aug 2021 15:05:06 +0000 (16:05 +0100)]
tests/tcg/multiarch/linux-test: Zero-initialize sockaddr structs
Zero-initialize sockaddr_in and sockaddr_un structs that we're about
to fill in and pass to bind() or connect(), to ensure we don't leave
possible implementation-defined extension fields as uninitialized
garbage.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id:
20210813150506.7768-5-peter.maydell@linaro.org
Peter Maydell [Fri, 13 Aug 2021 15:05:05 +0000 (16:05 +0100)]
tests/qtest/ipmi-bt-test: Zero-initialize sockaddr struct
Zero-initialize the sockaddr_in struct that we're about to fill in
and pass to bind(), to ensure we don't leave possible
implementation-defined extension fields as uninitialized garbage.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-id:
20210813150506.7768-4-peter.maydell@linaro.org
Peter Maydell [Fri, 13 Aug 2021 15:05:04 +0000 (16:05 +0100)]
gdbstub: Zero-initialize sockaddr structs
Zero-initialize sockaddr_in and sockaddr_un structs that we're about
to fill in and pass to bind() or connect(), to ensure we don't leave
possible implementation-defined extension fields as uninitialized
garbage.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id:
20210813150506.7768-3-peter.maydell@linaro.org
Peter Maydell [Fri, 13 Aug 2021 15:05:03 +0000 (16:05 +0100)]
net: Zero sockaddr_in in parse_host_port()
We don't currently zero-initialize the 'struct sockaddr_in' that
parse_host_port() fills in, so any fields we don't explicitly
initialize might be left as random garbage. POSIX states that
implementations may define extensions in sockaddr_in, and that those
extensions must not trigger if zero-initialized. So not zero
initializing might result in inadvertently triggering an impdef
extension.
memset() the sockaddr_in before we start to fill it in.
Fixes: Coverity CID 1005338
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id:
20210813150506.7768-2-peter.maydell@linaro.org
Peter Maydell [Thu, 12 Aug 2021 15:15:25 +0000 (16:15 +0100)]
softmmu/physmem.c: Check return value from realpath()
The realpath() function can return NULL on error, so we need to check
for it to avoid crashing when we try to strstr() into it.
This can happen if we run out of memory, or if /sys/ is not mounted,
among other situations.
Fixes: Coverity 1459913, 1460474
Fixes: ce317be98db0 ("exec: fetch the alignment of Linux devdax pmem character device nodes")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Jingqi Liu <jingqi.liu@intel.com>
Message-id:
20210812151525.31456-1-peter.maydell@linaro.org
Peter Maydell [Thu, 12 Aug 2021 15:06:24 +0000 (16:06 +0100)]
softmmu/physmem.c: Remove unneeded NULL check in qemu_ram_alloc_from_fd()
In the alignment check added to qemu_ram_alloc_from_fd() in commit
ce317be98db0dfdfa, the condition includes a check that 'mr' is not
NULL. This check is unnecessary because we can assume that the
caller always passes us a valid MemoryRegion, and indeed later in the
function we assume mr is not NULL when we pass it to file_ram_alloc()
as new_block->mr. Remove it.
Fixes: Coverity 1459867
Fixes: ce317be98d ("exec: fetch the alignment of Linux devdax pmem character device nodes")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Jingqi Liu <jingqi.liu@intel.com>
Message-id:
20210812150624.29139-1-peter.maydell@linaro.org
Peter Maydell [Thu, 12 Aug 2021 14:18:03 +0000 (15:18 +0100)]
hw/core/loader: In gunzip(), check index is in range before use, not after
The gunzip() function reads various fields from a passed in source
buffer in order to skip a header before passing the actual compressed
data to the zlib inflate() function. It does check whether the
passed in buffer is too small, but unfortunately it checks that only
after reading bytes from the src buffer, so it could read off the end
of the buffer.
You can see this with valgrind:
$ printf "%b" '\x1f\x8b' > /tmp/image
$ valgrind qemu-system-aarch64 -display none -M virt -cpu max -kernel /tmp/image
[...]
==19224== Invalid read of size 1
==19224== at 0x67302E: gunzip (loader.c:558)
==19224== by 0x673907: load_image_gzipped_buffer (loader.c:788)
==19224== by 0xA18032: load_aarch64_image (boot.c:932)
==19224== by 0xA18489: arm_setup_direct_kernel_boot (boot.c:1063)
==19224== by 0xA18D90: arm_load_kernel (boot.c:1317)
==19224== by 0x9F3651: machvirt_init (virt.c:2114)
==19224== by 0x794B7A: machine_run_board_init (machine.c:1272)
==19224== by 0xD5CAD3: qemu_init_board (vl.c:2618)
==19224== by 0xD5CCA6: qmp_x_exit_preconfig (vl.c:2692)
==19224== by 0xD5F32E: qemu_init (vl.c:3713)
==19224== by 0x5ADDB1: main (main.c:49)
==19224== Address 0x3802a873 is 0 bytes after a block of size 3 alloc'd
==19224== at 0x4C31B0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19224== by 0x61E7657: g_file_get_contents (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.4)
==19224== by 0x673895: load_image_gzipped_buffer (loader.c:771)
==19224== by 0xA18032: load_aarch64_image (boot.c:932)
==19224== by 0xA18489: arm_setup_direct_kernel_boot (boot.c:1063)
==19224== by 0xA18D90: arm_load_kernel (boot.c:1317)
==19224== by 0x9F3651: machvirt_init (virt.c:2114)
==19224== by 0x794B7A: machine_run_board_init (machine.c:1272)
==19224== by 0xD5CAD3: qemu_init_board (vl.c:2618)
==19224== by 0xD5CCA6: qmp_x_exit_preconfig (vl.c:2692)
==19224== by 0xD5F32E: qemu_init (vl.c:3713)
==19224== by 0x5ADDB1: main (main.c:49)
Check that we have enough bytes of data to read the header bytes that
we read before we read them.
Fixes: Coverity 1458997
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id:
20210812141803.20913-1-peter.maydell@linaro.org
Peter Maydell [Fri, 30 Jul 2021 10:59:47 +0000 (11:59 +0100)]
stubs: Remove unused arch_type.c stub
We added a stub for the arch_type global in commit
5964ed56d9a1 so
that we could compile blockdev.c into the tools. However, in commit
9db1d3a2be9bf we removed the only use of arch_type from blockdev.c.
The stub is therefore no longer needed, and we can delete it again,
together with the QEMU_ARCH_NONE value that only the stub was using.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210730105947.28215-9-peter.maydell@linaro.org
Peter Maydell [Fri, 30 Jul 2021 10:59:46 +0000 (11:59 +0100)]
arch_init.h: Don't include arch_init.h unnecessarily
arch_init.h only defines the QEMU_ARCH_* enumeration and the
arch_type global. Don't include it in files that don't use those.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id:
20210730105947.28215-8-peter.maydell@linaro.org
Peter Maydell [Fri, 30 Jul 2021 10:59:45 +0000 (11:59 +0100)]
arch_init.h: Move QEMU_ARCH_VIRTIO_* to qdev-monitor.c
The QEMU_ARCH_VIRTIO_* defines are used only in one file,
qdev-monitor.c. Move them to that file.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id:
20210730105947.28215-7-peter.maydell@linaro.org
Peter Maydell [Fri, 30 Jul 2021 10:59:44 +0000 (11:59 +0100)]
arch_init.h: Add QEMU_ARCH_HEXAGON
When Hexagon was added we forgot to add it to the QEMU_ARCH_*
enumeration. This doesn't cause a visible effect because at the
moment Hexagon is linux-user only and the QEMU_ARCH_* constants are
only used in softmmu, but we might as well add it in, since it's the
only architecture currently missing from the list.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-id:
20210730105947.28215-6-peter.maydell@linaro.org
Peter Maydell [Fri, 30 Jul 2021 10:59:43 +0000 (11:59 +0100)]
meson.build: Define QEMU_ARCH in config-target.h
Instead of using an ifdef ladder in arch_init.c (which we then have
to manually update every time we add or remove a target
architecture), have meson.build put "#define QEMU_ARCH QEMU_ARCH_FOO"
in the config-target.h file.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210730105947.28215-5-peter.maydell@linaro.org
Peter Maydell [Fri, 30 Jul 2021 10:59:42 +0000 (11:59 +0100)]
softmmu/arch_init.c: Trim down include list
arch_init.c does very little but has a long list of #include lines.
Remove all the unnecessary ones.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210730105947.28215-4-peter.maydell@linaro.org
Peter Maydell [Fri, 30 Jul 2021 10:59:41 +0000 (11:59 +0100)]
monitor: Use accel_find("kvm") instead of kvm_available()
The kvm_available() function reports whether KVM support was
compiled into the QEMU binary; it returns the value of the
CONFIG_KVM define.
The only place in the codebase where we use this function is
in qmp_query_kvm(). Now that accelerators are based on QOM
classes we can instead use accel_find("kvm") and remove the
kvm_available() function.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210730105947.28215-3-peter.maydell@linaro.org
Peter Maydell [Fri, 30 Jul 2021 10:59:40 +0000 (11:59 +0100)]
softmmu: Use accel_find("xen") instead of xen_available()
The xen_available() function is used only to produce an error
for some Xen-specific command line options in QEMU binaries where
Xen support was not compiled in: it just returns the value of
the CONFIG_XEN define.
Now that accelerators are QOM classes, we can check for
"does this binary have Xen compiled in" with accel_find("xen"),
and drop the xen_available() function.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210730105947.28215-2-peter.maydell@linaro.org
Peter Maydell [Tue, 27 Jul 2021 17:04:14 +0000 (18:04 +0100)]
MAINTAINERS: Add ACPI specs documents to ACPI and NVDIMM sections
Add entries for the ACPI specs documents in docs/specs to
appropriate sections of MAINTAINERS.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-id:
20210727170414.3368-6-peter.maydell@linaro.org
Peter Maydell [Tue, 27 Jul 2021 17:04:13 +0000 (18:04 +0100)]
docs/specs/acpi_nvdimm: Convert to rST
Convert the ACPI NVDIMM spec document to rST.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-id:
20210727170414.3368-5-peter.maydell@linaro.org
Peter Maydell [Tue, 27 Jul 2021 17:04:12 +0000 (18:04 +0100)]
docs/specs/acpi_pci_hotplug: Convert to rST
Convert the PCI hotplug spec document to rST.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Peter Maydell [Tue, 27 Jul 2021 17:04:11 +0000 (18:04 +0100)]
docs/specs/acpi_mem_hotplug: Convert to rST
Convert the acpi memory hotplug spec to rST.
Note that this includes converting a lot of weird whitespace
characters to plain old spaces (the rST parser does not like
whatever the old ones were).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-id:
20210727170414.3368-3-peter.maydell@linaro.org
Peter Maydell [Tue, 27 Jul 2021 17:04:10 +0000 (18:04 +0100)]
docs/specs/acpu_cpu_hotplug: Convert to rST
Do a basic conversion of the acpi_cpu_hotplug spec document to rST.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-id:
20210727170414.3368-2-peter.maydell@linaro.org
Andrew Jones [Mon, 23 Aug 2021 16:06:47 +0000 (18:06 +0200)]
target/arm/cpu64: Validate sve vector lengths are supported
Future CPU types may specify which vector lengths are supported.
We can apply nearly the same logic to validate those lengths
as we do for KVM's supported vector lengths. We merge the code
where we can, but unfortunately can't completely merge it because
KVM requires all vector lengths, power-of-two or not, smaller than
the maximum enabled length to also be enabled. The architecture
only requires all the power-of-two lengths, though, so TCG will
only enforce that.
Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210823160647.34028-5-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andrew Jones [Mon, 23 Aug 2021 16:06:46 +0000 (18:06 +0200)]
target/arm/cpu64: Replace kvm_supported with sve_vq_supported
Now that we have an ARMCPU member sve_vq_supported we no longer
need the local kvm_supported bitmap for KVM's supported vector
lengths.
Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210823160647.34028-4-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andrew Jones [Mon, 23 Aug 2021 16:06:45 +0000 (18:06 +0200)]
target/arm/kvm64: Ensure sve vls map is completely clear
bitmap_clear() only clears the given range. While the given
range should be sufficient in this case we might as well be
100% sure all bits are zeroed by using bitmap_zero().
Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210823160647.34028-3-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Andrew Jones [Mon, 23 Aug 2021 16:06:44 +0000 (18:06 +0200)]
target/arm/cpu: Introduce sve_vq_supported bitmap
Allow CPUs that support SVE to specify which SVE vector lengths they
support by setting them in this bitmap. Currently only the 'max' and
'host' CPU types supports SVE and 'host' requires KVM which obtains
its supported bitmap from the host. So, we only need to initialize the
bitmap for 'max' with TCG. And, since 'max' should support all SVE
vector lengths we simply fill the bitmap. Future CPU types may have
less trivial maps though.
Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210823160647.34028-2-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Ani Sinha [Thu, 19 Aug 2021 16:26:37 +0000 (21:56 +0530)]
hw/arm/Kconfig: no need to enable ACPI_MEMORY_HOTPLUG/ACPI_NVDIMM explicitly
Since commit
36b79e3219d ("hw/acpi/Kconfig: Add missing Kconfig dependencies (build error)"),
ACPI_MEMORY_HOTPLUG and ACPI_NVDIMM is implicitly turned on when
ACPI_HW_REDUCED is selected. ACPI_HW_REDUCED is already enabled. No need to
turn on ACPI_MEMORY_HOTPLUG or ACPI_NVDIMM explicitly. This is a minor cleanup.
Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id:
20210819162637.518507-1-ani@anisinha.ca
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Philippe Mathieu-Daudé [Thu, 19 Aug 2021 16:34:22 +0000 (18:34 +0200)]
hw/dma/xlnx-zdma Always expect 'dma' link property to be set
Simplify by always passing a MemoryRegion property to the device.
Doing so we can move the AddressSpace field to the device struct,
removing need for heap allocation.
Update the Xilinx ZynqMP / Versal SoC models to pass the default
system memory instead of a NULL value.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id:
20210819163422.
2863447-5-philmd@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Philippe Mathieu-Daudé [Thu, 19 Aug 2021 16:34:21 +0000 (18:34 +0200)]
hw/dma/xlnx_csu_dma: Always expect 'dma' link property to be set
Simplify by always passing a MemoryRegion property to the device.
Doing so we can move the AddressSpace field to the device struct,
removing need for heap allocation.
Update the Xilinx ZynqMP SoC model to pass the default system
memory instead of a NULL value.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id:
20210819163422.
2863447-4-philmd@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Philippe Mathieu-Daudé [Thu, 19 Aug 2021 16:34:20 +0000 (18:34 +0200)]
hw/dma/xlnx_csu_dma: Run trivial checks early in realize()
If some property are not set, we'll return indicating a failure,
so it is pointless to allocate / initialize some fields too early.
Move the trivial checks earlier in realize().
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id:
20210819163422.
2863447-3-philmd@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Philippe Mathieu-Daudé [Thu, 19 Aug 2021 16:34:19 +0000 (18:34 +0200)]
hw/arm/xlnx-zynqmp: Realize qspi controller *after* qspi_dma
If we link QOM object (a) as a property of QOM object (b),
we must set the property *before* (b) is realized.
Move QSPI realization *after* QSPI DMA.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id:
20210819163422.
2863447-2-philmd@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Thu, 26 Aug 2021 12:42:34 +0000 (13:42 +0100)]
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-08-26' into staging
QAPI patches patches for 2021-08-26
# gpg: Signature made Thu 26 Aug 2021 13:18:34 BST
# gpg: using RSA key
354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2021-08-26:
qapi: make 'if' condition strings simple identifiers
qapi: add 'not' condition operation
qapi: Use 'if': { 'any': ... } where appropriate
qapi: add 'any' condition
qapi: replace if condition list with dict {'all': [...]}
qapidoc: introduce QAPISchemaIfCond.docgen()
qapi: introduce QAPISchemaIfCond.cgen()
qapi: add QAPISchemaIfCond.is_present()
qapi: wrap Sequence[str] in an object
docs: update the documentation upfront about schema configuration
qapi: Fix crash on redefinition with a different condition
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Marc-André Lureau [Wed, 4 Aug 2021 08:31:05 +0000 (12:31 +0400)]
qapi: make 'if' condition strings simple identifiers
Change the 'if' condition strings to be C-agnostic. It will accept
'[A-Z][A-Z0-9_]*' identifiers. This allows to express configuration
conditions in other languages (Rust or Python for ex) or other more
suitable forms.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: John Snow <jsnow@redhat.com>
Message-Id: <
20210804083105.97531-11-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Rebased with semantic conflict in redefined-event.json]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Marc-André Lureau [Wed, 4 Aug 2021 08:31:04 +0000 (12:31 +0400)]
qapi: add 'not' condition operation
For the sake of completeness, introduce the 'not' condition.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20210804083105.97531-10-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Long line broken in tests/qapi-schema/qapi-schema-test.json]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Marc-André Lureau [Wed, 4 Aug 2021 08:31:03 +0000 (12:31 +0400)]
qapi: Use 'if': { 'any': ... } where appropriate
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <
20210804083105.97531-9-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Marc-André Lureau [Wed, 4 Aug 2021 08:31:02 +0000 (12:31 +0400)]
qapi: add 'any' condition
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20210804083105.97531-8-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Marc-André Lureau [Wed, 4 Aug 2021 08:31:01 +0000 (12:31 +0400)]
qapi: replace if condition list with dict {'all': [...]}
Replace the simple list sugar form with a recursive structure that will
accept other operators in the following commits (all, any or not).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20210804083105.97531-7-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Accidental code motion undone. Degenerate :forms: comment dropped.
Helper _check_if() moved. Error messages tweaked. ui.json updated.
Accidental changes to qapi-schema-test.json dropped.]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Marc-André Lureau [Wed, 4 Aug 2021 08:31:00 +0000 (12:31 +0400)]
qapidoc: introduce QAPISchemaIfCond.docgen()
Instead of building the condition documentation from a list of string,
use the result generated from QAPISchemaIfCond.docgen().
This changes the generated documentation from:
- COND1, COND2... (where COND1, COND2 are Literal nodes, and ',' is Text)
to:
- COND1 and COND2 (the whole string as a Literal node)
This will allow us to generate more complex conditions in the following
patches, such as "(COND1 and COND2) or COND3".
Adding back the differentiated formatting is left to the wish list.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20210804083105.97531-6-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[TODO comment added]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Marc-André Lureau [Wed, 4 Aug 2021 08:30:59 +0000 (12:30 +0400)]
qapi: introduce QAPISchemaIfCond.cgen()
Instead of building prepocessor conditions from a list of string, use
the result generated from QAPISchemaIfCond.cgen() and hide the
implementation details.
Note: this patch introduces a minor regression, generating a redundant
pair of parenthesis. This is mostly fixed in a later patch in this
series ("qapi: replace if condition list with dict [..]")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20210804083105.97531-5-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message tweaked]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Marc-André Lureau [Wed, 4 Aug 2021 08:30:58 +0000 (12:30 +0400)]
qapi: add QAPISchemaIfCond.is_present()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <
20210804083105.97531-4-marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Marc-André Lureau [Wed, 4 Aug 2021 08:30:57 +0000 (12:30 +0400)]
qapi: wrap Sequence[str] in an object
Mechanical change, except for a new assertion in
QAPISchemaEntity.ifcond().
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20210804083105.97531-3-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Rebased with obvious conflicts, commit message adjusted]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Marc-André Lureau [Wed, 4 Aug 2021 08:30:56 +0000 (12:30 +0400)]
docs: update the documentation upfront about schema configuration
Update the documentation describing the changes in this series.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <
20210804083105.97531-2-marcandre.lureau@redhat.com>
[Rebased with straightforward conflicts]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Markus Armbruster [Fri, 6 Aug 2021 12:05:10 +0000 (14:05 +0200)]
qapi: Fix crash on redefinition with a different condition
QAPISchema._make_implicit_object_type() asserts that when an implicit
object type is used multiple times, @ifcond is the same for all uses.
It will be for legitimate uses, i.e. simple union branch wrapper
types. A comment explains this.
The assertion fails when a command or event is redefined with a
different condition. The redefinition is an error, but it's flagged
only later.
Fixing the assertion would complicate matters further. Not
worthwhile, drop it instead. We really need to get rid of simple
unions.
Tweak test case redefined-event to cover redefinition with a different
condition.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <
20210806120510.
2367124-1-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Peter Maydell [Thu, 26 Aug 2021 09:42:34 +0000 (10:42 +0100)]
Merge remote-tracking branch 'remotes/ehabkost-gl/tags/x86-next-pull-request' into staging
x86 queue, 2021-08-25
Bug fixes:
* Remove split lock detect in Snowridge CPU model (Chenyi Qiang)
* Remove AVX_VNNI feature from Cooperlake cpu model (Yang Zhong)
# gpg: Signature made Wed 25 Aug 2021 20:53:59 BST
# gpg: using RSA key
5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
# gpg: issuer "ehabkost@redhat.com"
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full]
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6
* remotes/ehabkost-gl/tags/x86-next-pull-request:
i386/cpu: Remove AVX_VNNI feature from Cooperlake cpu model
target/i386: Remove split lock detect in Snowridge CPU model
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 25 Aug 2021 20:09:48 +0000 (21:09 +0100)]
Merge remote-tracking branch 'remotes/philmd/tags/mips-
20210825' into staging
MIPS patches queue
- minor simplifications in PREF / JR opcodes
- merge 32-bit/64-bit Release6 decodetree definitions
- converted NEC Vr54xx extension opcodes to decodetree
- housekeeping in gen_helper() macros
- replace TARGET_WORDS_BIGENDIAN #ifdef'ry by cpu_is_bigendian()
- allow Loongson 3A1000 to use up to 48-bit VAddr
# gpg: Signature made Wed 25 Aug 2021 12:04:31 BST
# gpg: using RSA key
FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE
* remotes/philmd/tags/mips-
20210825: (28 commits)
target/mips: Replace TARGET_WORDS_BIGENDIAN by cpu_is_bigendian()
target/mips: Store CP0_Config0 in DisasContext
target/mips: Replace GET_LMASK64() macro by get_lmask(64) function
target/mips: Replace GET_LMASK() macro by get_lmask(32) function
target/mips: Call cpu_is_bigendian & inline GET_OFFSET in ld/st helpers
target/mips: Define gen_helper() macros in translate.h
target/mips: Use tcg_constant_i32() in generate_exception_err()
target/mips: Inline gen_helper_0e0i()
target/mips: Inline gen_helper_1e1i() call in op_ld_INSN() macros
target/mips: Simplify gen_helper() macros by using tcg_constant_i32()
target/mips: Use tcg_constant_i32() in gen_helper_0e2i()
target/mips: Remove gen_helper_1e2i()
target/mips: Remove gen_helper_0e3i()
target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT
target/mips: Allow Loongson 3A1000 to use up to 48-bit VAddr
target/mips: Document Loongson-3A CPU definitions
target/mips: Convert Vr54xx MSA* opcodes to decodetree
target/mips: Convert Vr54xx MUL* opcodes to decodetree
target/mips: Convert Vr54xx MACC* opcodes to decodetree
target/mips: Introduce decodetree structure for NEC Vr54xx extension
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 25 Aug 2021 17:50:31 +0000 (18:50 +0100)]
Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-08-25' into staging
* Various updates for the documentation
# gpg: Signature made Wed 25 Aug 2021 11:27:27 BST
# gpg: using RSA key
27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg: issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg: aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5
* remotes/thuth-gitlab/tags/pull-request-2021-08-25:
docs: make sphinx-build be quiet by default
docs: split the CI docs into two files
docs/about/removed-features: Move some CLI options to the right location
docs/about: Add the missing release record in the subject
docs/about: Unify the subject format
docs/about: Remove the duplicated doc
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Yang Zhong [Fri, 20 Aug 2021 05:46:11 +0000 (13:46 +0800)]
i386/cpu: Remove AVX_VNNI feature from Cooperlake cpu model
The AVX_VNNI feature is not in Cooperlake platform, remove it
from cpu model.
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <
20210820054611.84303-1-yang.zhong@intel.com>
Fixes: c1826ea6a052 ("i386/cpu: Expose AVX_VNNI instruction to guest")
Cc: qemu-stable@nongnu.org
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Chenyi Qiang [Wed, 30 Jun 2021 01:20:53 +0000 (09:20 +0800)]
target/i386: Remove split lock detect in Snowridge CPU model
At present, there's no mechanism intelligent enough to virtualize split
lock detection correctly. Remove it in Snowridge CPU model to avoid the
feature exposure.
Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
Message-Id: <
20210630012053.10098-1-chenyi.qiang@intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Philippe Mathieu-Daudé [Wed, 18 Aug 2021 10:13:02 +0000 (12:13 +0200)]
target/mips: Replace TARGET_WORDS_BIGENDIAN by cpu_is_bigendian()
Add the inlined cpu_is_bigendian() function in "translate.h".
Replace the TARGET_WORDS_BIGENDIAN #ifdef'ry by calls to
cpu_is_bigendian().
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210818164321.
2474534-6-f4bug@amsat.org>
Philippe Mathieu-Daudé [Wed, 18 Aug 2021 10:12:12 +0000 (12:12 +0200)]
target/mips: Store CP0_Config0 in DisasContext
Most TCG helpers only have access to a DisasContext pointer,
not CPUMIPSState. Store a copy of CPUMIPSState::CP0_Config0
in DisasContext so we can access it from TCG helpers.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210818164321.
2474534-5-f4bug@amsat.org>
Philippe Mathieu-Daudé [Wed, 18 Aug 2021 10:11:41 +0000 (12:11 +0200)]
target/mips: Replace GET_LMASK64() macro by get_lmask(64) function
The target endianess information is stored in the BigEndian
bit of the Config0 register in CP0.
Replace the GET_LMASK() macro by an inlined get_lmask() function,
passing CPUMIPSState and the word size as argument.
We can remove another use of the TARGET_WORDS_BIGENDIAN definition.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210818215517.
2560994-4-f4bug@amsat.org>
Philippe Mathieu-Daudé [Wed, 18 Aug 2021 10:11:30 +0000 (12:11 +0200)]
target/mips: Replace GET_LMASK() macro by get_lmask(32) function
The target endianess information is stored in the BigEndian
bit of the Config0 register in CP0.
Replace the GET_LMASK() macro by an inlined get_lmask() function,
passing CPUMIPSState and the word size as argument.
We can remove one use of the TARGET_WORDS_BIGENDIAN definition.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210818215517.
2560994-3-f4bug@amsat.org>
Philippe Mathieu-Daudé [Wed, 18 Aug 2021 10:10:53 +0000 (12:10 +0200)]
target/mips: Call cpu_is_bigendian & inline GET_OFFSET in ld/st helpers
The target endianess information is stored in the BigEndian
bit of the Config0 register in CP0.
As a first step, inline the GET_OFFSET() macro, calling
cpu_is_bigendian() to get the 'direction' of the offset.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210818215517.
2560994-2-f4bug@amsat.org>
Philippe Mathieu-Daudé [Sun, 15 Aug 2021 14:02:41 +0000 (16:02 +0200)]
target/mips: Define gen_helper() macros in translate.h
To be able to split some code calling the gen_helper() macros
out of the huge translate.c, we need to define them in the
'translate.h' local header.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210816205107.
2051495-9-f4bug@amsat.org>
Philippe Mathieu-Daudé [Sun, 15 Aug 2021 13:56:13 +0000 (15:56 +0200)]
target/mips: Use tcg_constant_i32() in generate_exception_err()
excp/err are temporaries input, so we can replace tcg_const_i32()
calls by tcg_constant_i32() equivalent.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210816205107.
2051495-8-f4bug@amsat.org>
Philippe Mathieu-Daudé [Sun, 15 Aug 2021 13:48:58 +0000 (15:48 +0200)]
target/mips: Inline gen_helper_0e0i()
gen_helper_0e0i() is one-line long and is only used twice:
simply inline it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210816205107.
2051495-7-f4bug@amsat.org>
Philippe Mathieu-Daudé [Sun, 15 Aug 2021 13:46:09 +0000 (15:46 +0200)]
target/mips: Inline gen_helper_1e1i() call in op_ld_INSN() macros
gen_helper_1e1i() is one-line long and is used in one place:
simply inline it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210816205107.
2051495-6-f4bug@amsat.org>
Philippe Mathieu-Daudé [Sun, 15 Aug 2021 13:07:40 +0000 (15:07 +0200)]
target/mips: Simplify gen_helper() macros by using tcg_constant_i32()
In all call sites the last argument is always used as a
read-only value, so we can replace tcg_const_i32() temporary
by tcg_constant_i32().
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210816205107.
2051495-5-f4bug@amsat.org>
Philippe Mathieu-Daudé [Sun, 15 Aug 2021 13:51:49 +0000 (15:51 +0200)]
target/mips: Use tcg_constant_i32() in gen_helper_0e2i()
$rt register is used read-only, so we can replace tcg_const_i32()
temporary by tcg_constant_i32().
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210816205107.
2051495-4-f4bug@amsat.org>
Philippe Mathieu-Daudé [Thu, 12 Aug 2021 13:41:40 +0000 (15:41 +0200)]
target/mips: Remove gen_helper_1e2i()
gen_helper_1e2i() is unused since commit
33a07fa2db6
("target/mips: reimplement SC instruction emulation
and use cmpxchg"), remove it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210816205107.
2051495-3-f4bug@amsat.org>
Philippe Mathieu-Daudé [Thu, 12 Aug 2021 13:45:45 +0000 (15:45 +0200)]
target/mips: Remove gen_helper_0e3i()
gen_helper_0e3i() is unused since commit
895c2d04359
("target-mips: switch to AREG0 free mode"), remove it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210816205107.
2051495-2-f4bug@amsat.org>
Philippe Mathieu-Daudé [Mon, 16 Aug 2021 00:04:04 +0000 (02:04 +0200)]
target/mips: Remove duplicated check_cp1_enabled() calls in Loongson EXT
We already call check_cp1_enabled() earlier in the "pre-conditions"
checks for GSLWXC1 and GSLDXC1 in gen_loongson_lsdc2() prologue.
Remove the duplicated calls.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Message-Id: <
20210816001031.
1720432-1-f4bug@amsat.org>
Philippe Mathieu-Daudé [Fri, 13 Aug 2021 10:36:46 +0000 (12:36 +0200)]
target/mips: Allow Loongson 3A1000 to use up to 48-bit VAddr
Per the manual '龙芯 GS264 处理器核用户手册' v1.0, chapter
1.1.5 SEGBITS: the 3A1000 (based on GS464 core) implements
48 virtual address bits in each 64-bit segment, not 40.
Fixes: af868995e1b ("target/mips: Add Loongson-3 CPU definition")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Message-Id: <
20210813110149.
1432692-3-f4bug@amsat.org>
Philippe Mathieu-Daudé [Fri, 13 Aug 2021 10:37:12 +0000 (12:37 +0200)]
target/mips: Document Loongson-3A CPU definitions
Document the cores on which each Loongson-3A CPU is based (see
commit
af868995e1b, "target/mips: Add Loongson-3 CPU definition").
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Message-Id: <
20210813110149.
1432692-2-f4bug@amsat.org>
Philippe Mathieu-Daudé [Wed, 28 Jul 2021 11:26:10 +0000 (13:26 +0200)]
target/mips: Convert Vr54xx MSA* opcodes to decodetree
Convert the following Integer Multiply-Accumulate opcodes:
* MSAC Multiply, negate, accumulate, and move LO
* MSACHI Multiply, negate, accumulate, and move HI
* MSACHIU Unsigned multiply, negate, accumulate, and move HI
* MSACU Unsigned multiply, negate, accumulate, and move LO
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20210808173018.90960-8-f4bug@amsat.org>
Philippe Mathieu-Daudé [Wed, 28 Jul 2021 11:25:53 +0000 (13:25 +0200)]
target/mips: Convert Vr54xx MUL* opcodes to decodetree
Convert the following Integer Multiply-Accumulate opcodes:
* MULHI Multiply and move HI
* MULHIU Unsigned multiply and move HI
* MULS Multiply, negate, and move LO
* MULSHI Multiply, negate, and move HI
* MULSHIU Unsigned multiply, negate, and move HI
* MULSU Unsigned multiply, negate, and move LO
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20210808173018.90960-7-f4bug@amsat.org>
Philippe Mathieu-Daudé [Wed, 28 Jul 2021 11:20:42 +0000 (13:20 +0200)]
target/mips: Convert Vr54xx MACC* opcodes to decodetree
Convert the following Integer Multiply-Accumulate opcodes:
* MACC Multiply, accumulate, and move LO
* MACCHI Multiply, accumulate, and move HI
* MACCHIU Unsigned multiply, accumulate, and move HI
* MACCU Unsigned multiply, accumulate, and move LO
Since all opcodes are generated using the same pattern, we
add the gen_helper_mult_acc_t typedef and MULT_ACC() macro
to remove boilerplate code.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20210808173018.90960-6-f4bug@amsat.org>
Philippe Mathieu-Daudé [Wed, 28 Jul 2021 11:18:48 +0000 (13:18 +0200)]
target/mips: Introduce decodetree structure for NEC Vr54xx extension
The decoder is called but doesn't decode anything. This will
ease reviewing the next commit.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20210801235926.
3178085-3-f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Philippe Mathieu-Daudé [Mon, 16 Nov 2020 15:41:05 +0000 (16:41 +0100)]
target/mips: Extract NEC Vr54xx helpers to vr54xx_helper.c
Extract NEC Vr54xx helpers from op_helper.c to a new file:
'vr54xx_helper.c'.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20201120210844.
2625602-14-f4bug@amsat.org>
Philippe Mathieu-Daudé [Mon, 16 Nov 2020 15:39:20 +0000 (16:39 +0100)]
target/mips: Extract NEC Vr54xx helper definitions
Extract the NEC Vr54xx helper definitions to
'vendor-vr54xx_helper.h'.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20201120210844.
2625602-15-f4bug@amsat.org>
Philippe Mathieu-Daudé [Sat, 7 Aug 2021 07:36:49 +0000 (09:36 +0200)]
target/mips: Introduce generic TRANS() macro for decodetree helpers
Plain copy/paste of the TRANS() macro introduced in the PPC
commit
f2aabda8ac9 ("target/ppc: Move D/DS/X-form integer
loads to decodetree") to the MIPS target.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <
20210808173018.90960-2-f4bug@amsat.org>
Philippe Mathieu-Daudé [Tue, 27 Jul 2021 19:13:49 +0000 (21:13 +0200)]
target/mips: Rename 'rtype' as 'r'
We'll soon have more opcode and decoded arguments, and 'rtype'
is not very helpful. Naming it simply 'r' ease reviewing the
.decode files when we have many opcodes.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20210801234202.
3167676-5-f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Philippe Mathieu-Daudé [Sun, 1 Aug 2021 18:29:29 +0000 (20:29 +0200)]
target/mips: Merge 32-bit/64-bit Release6 decodetree definitions
We don't need to maintain 2 sets of decodetree definitions.
Merge them into a single file.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20210801234202.
3167676-4-f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Philippe Mathieu-Daudé [Sat, 31 Jul 2021 13:23:47 +0000 (15:23 +0200)]
target/mips: Decode vendor extensions before MIPS ISAs
In commit
ffc672aa977 ("target/mips/tx79: Move MFHI1 / MFLO1
opcodes to decodetree") we misplaced the decoder call. Move
it to the correct place.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20210801234202.
3167676-3-f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Philippe Mathieu-Daudé [Thu, 29 Jul 2021 14:02:57 +0000 (16:02 +0200)]
target/mips: Simplify PREF opcode
check_insn() checks for any bit in the set, and INSN_R5900 is
just another bit added to the set. No need to special-case it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20210801234202.
3167676-2-f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Philippe Mathieu-Daudé [Fri, 30 Jul 2021 22:27:17 +0000 (00:27 +0200)]
target/mips: Remove JR opcode unused arguments
JR opcode (Jump Register) only takes 1 argument, $rs.
JALR (Jump And Link Register) takes 3: $rs, $rd and $hint.
Commit
6af0bf9c7c3 added their processing into decode_opc() as:
case 0x08 ... 0x09: /* Jumps */
gen_compute_branch(ctx, op1 | EXT_SPECIAL, rs, rd, sa);
having both opcodes handled in the same function: gen_compute_branch.
Per JR encoding, both $rd and $hint ('sa') are decoded as zero.
Later this code got extracted to decode_opc_special(),
commit
7a387fffce5 used definitions instead of magic values:
case OPC_JR ... OPC_JALR:
gen_compute_branch(ctx, op1, rs, rd, sa);
Finally commit
0aefa33318b moved OPC_JR out of decode_opc_special,
to a new 'decode_opc_special_legacy' function:
@@ -15851,6 +15851,9 @@ static void decode_opc_special_legacy(CPUMIPSState *env, DisasContext *ctx)
+ case OPC_JR:
+ gen_compute_branch(ctx, op1, 4, rs, rd, sa);
+ break;
@@ -15933,7 +15936,7 @@ static void decode_opc_special(CPUMIPSState *env, DisasContext *ctx)
- case OPC_JR ... OPC_JALR:
+ case OPC_JALR:
gen_compute_branch(ctx, op1, 4, rs, rd, sa);
break;
Since JR is now handled individually, it is pointless to decode
and pass it unused arguments. Replace them by simple zero value
to avoid confusion with this opcode.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <
20210730225507.
2642827-1-f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Peter Maydell [Wed, 25 Aug 2021 10:39:04 +0000 (11:39 +0100)]
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-
20210825' into staging
target-arm queue:
* More MVE emulation work
* Implement M-profile trapping on division by zero
* kvm: use RCU_READ_LOCK_GUARD() in kvm_arch_fixup_msi_route()
* hw/char/pl011: add support for sending break
* fsl-imx6ul: Instantiate SAI1/2/3 and ASRC as unimplemented devices
* hw/dma/pl330: Add memory region to replace default
* sbsa-ref: Rename SBSA_GWDT enum value
* fsl-imx7: Instantiate SAI1/2/3 as unimplemented devices
* docs: Document how to use gdb with unix sockets
# gpg: Signature made Wed 25 Aug 2021 11:34:50 BST
# gpg: using RSA key
E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* remotes/pmaydell/tags/pull-target-arm-
20210825: (44 commits)
docs: Document how to use gdb with unix sockets
fsl-imx7: Instantiate SAI1/2/3 as unimplemented devices
sbsa-ref: Rename SBSA_GWDT enum value
hw/dma/pl330: Add memory region to replace default
fsl-imx6ul: Instantiate SAI1/2/3 and ASRC as unimplemented devices
hw/char/pl011: add support for sending break
target/arm: kvm: use RCU_READ_LOCK_GUARD() in kvm_arch_fixup_msi_route()
target/arm: Implement M-profile trapping on division by zero
target/arm: Re-indent sdiv and udiv helpers
target/arm: Implement MVE interleaving loads/stores
target/arm: Implement MVE scatter-gather immediate forms
target/arm: Implement MVE scatter-gather insns
target/arm: Implement MVE VCTP
target/arm: Implement MVE VPNOT
target/arm: Implement MVE VMOV to/from 2 general-purpose registers
target/arm: Implement MVE VMAXA, VMINA
target/arm: Implement MVE VQABS, VQNEG
target/arm: Implement MVE saturating doubling multiply accumulates
target/arm: Implement MVE VMLA
target/arm: Implement MVE VMLADAV and VMLSLDAV
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Daniel P. Berrangé [Thu, 12 Aug 2021 10:24:27 +0000 (11:24 +0100)]
docs: make sphinx-build be quiet by default
The sphinx-build is fairly verbose spitting out pages of output to the
console, which causes errors from other build commands to be scrolled
off the top of the terminal. This can leave the mistaken impression that
the build passed, when in fact there was a failure.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
20210812102427.
4036399-1-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Thu, 12 Aug 2021 18:04:02 +0000 (19:04 +0100)]
docs: split the CI docs into two files
This splits the CI docs into one file talking about job setup and usage
and another file describing provisioning of custom runners.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <
20210812180403.
4129067-2-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Thomas Huth [Wed, 18 Aug 2021 11:29:08 +0000 (13:29 +0200)]
docs/about/removed-features: Move some CLI options to the right location
Some of the removed CLI options have been added to the wrong section
in the "Removed features" chapter - they've been put into the
"Related binaries" section instead. Move them now into the correct
"System emulator command line arguments" section.
Message-Id: <
20210818112908.102205-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Sebastian Meyer [Tue, 10 Aug 2021 16:04:36 +0000 (18:04 +0200)]
docs: Document how to use gdb with unix sockets
With gdb 9.0 and better it is possible to connect to a gdbstub
over unix sockets, which is better than a TCP socket connection
in some situations. The QEMU command line to set this up is
non-obvious; document it.
Signed-off-by: Sebastian Meyer <meyer@absint.com>
Message-id:
162867284829.27377.
4784930719350564918-0@git.sr.ht
[PMM: Tweaked commit message; adjusted wording in a couple of
places; fixed rST formatting issue; moved section up out of
the 'advanced debugging options' subsection]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Guenter Roeck [Tue, 10 Aug 2021 17:56:07 +0000 (10:56 -0700)]
fsl-imx7: Instantiate SAI1/2/3 as unimplemented devices
Instantiate SAI1/2/3 as unimplemented devices to avoid Linux kernel crashes
such as the following.
Unhandled fault: external abort on non-linefetch (0x808) at 0xd19b0000
pgd = (ptrval)
[
d19b0000] *pgd=
82711811, *pte=
308a0653, *ppte=
308a0453
Internal error: : 808 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.14.0-rc5 #1
...
[<
c095e974>] (regmap_mmio_write32le) from [<
c095eb48>] (regmap_mmio_write+0x3c/0x54)
[<
c095eb48>] (regmap_mmio_write) from [<
c09580f4>] (_regmap_write+0x4c/0x1f0)
[<
c09580f4>] (_regmap_write) from [<
c0959b28>] (regmap_write+0x3c/0x60)
[<
c0959b28>] (regmap_write) from [<
c0d41130>] (fsl_sai_runtime_resume+0x9c/0x1ec)
[<
c0d41130>] (fsl_sai_runtime_resume) from [<
c0942464>] (__rpm_callback+0x3c/0x108)
[<
c0942464>] (__rpm_callback) from [<
c0942590>] (rpm_callback+0x60/0x64)
[<
c0942590>] (rpm_callback) from [<
c0942b60>] (rpm_resume+0x5cc/0x808)
[<
c0942b60>] (rpm_resume) from [<
c0942dfc>] (__pm_runtime_resume+0x60/0xa0)
[<
c0942dfc>] (__pm_runtime_resume) from [<
c0d4231c>] (fsl_sai_probe+0x2b8/0x65c)
[<
c0d4231c>] (fsl_sai_probe) from [<
c0935b08>] (platform_probe+0x58/0xb8)
[<
c0935b08>] (platform_probe) from [<
c0933264>] (really_probe.part.0+0x9c/0x334)
[<
c0933264>] (really_probe.part.0) from [<
c093359c>] (__driver_probe_device+0xa0/0x138)
[<
c093359c>] (__driver_probe_device) from [<
c0933664>] (driver_probe_device+0x30/0xc8)
[<
c0933664>] (driver_probe_device) from [<
c0933c88>] (__driver_attach+0x90/0x130)
[<
c0933c88>] (__driver_attach) from [<
c0931060>] (bus_for_each_dev+0x78/0xb8)
[<
c0931060>] (bus_for_each_dev) from [<
c093254c>] (bus_add_driver+0xf0/0x1d8)
[<
c093254c>] (bus_add_driver) from [<
c0934a30>] (driver_register+0x88/0x118)
[<
c0934a30>] (driver_register) from [<
c01022c0>] (do_one_initcall+0x7c/0x3a4)
[<
c01022c0>] (do_one_initcall) from [<
c1601204>] (kernel_init_freeable+0x198/0x22c)
[<
c1601204>] (kernel_init_freeable) from [<
c0f5ff2c>] (kernel_init+0x10/0x128)
[<
c0f5ff2c>] (kernel_init) from [<
c010013c>] (ret_from_fork+0x14/0x38)
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Message-id:
20210810175607.538090-1-linux@roeck-us.net
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Eduardo Habkost [Fri, 6 Aug 2021 02:31:19 +0000 (22:31 -0400)]
sbsa-ref: Rename SBSA_GWDT enum value
The SBSA_GWDT enum value conflicts with the SBSA_GWDT() QOM type
checking helper, preventing us from using a OBJECT_DEFINE* or
DEFINE_INSTANCE_CHECKER macro for the SBSA_GWDT() wrapper.
If I understand the SBSA 6.0 specification correctly, the signal
being connected to IRQ 16 is the WS0 output signal from the
Generic Watchdog. Rename the enum value to SBSA_GWDT_WS0 to be
more explicit and avoid the name conflict.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-id:
20210806023119.431680-1-ehabkost@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Wen, Jianxian [Wed, 18 Aug 2021 10:17:00 +0000 (10:17 +0000)]
hw/dma/pl330: Add memory region to replace default
Add property memory region which can connect with IOMMU region to support SMMU translate.
Signed-off-by: Jianxian Wen <jianxian.wen@verisilicon.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id:
4C23C17B8E87E74E906A25A3254A03F4FA1FEC31@SHASXM03.verisilicon.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Guenter Roeck [Tue, 10 Aug 2021 16:03:18 +0000 (09:03 -0700)]
fsl-imx6ul: Instantiate SAI1/2/3 and ASRC as unimplemented devices
Instantiate SAI1/2/3 and ASRC as unimplemented devices to avoid random
Linux kernel crashes, such as
Unhandled fault: external abort on non-linefetch (0x808) at 0xd1580010
pgd = (ptrval)
[
d1580010] *pgd=
8231b811, *pte=
02034653, *ppte=
02034453
Internal error: : 808 [#1] SMP ARM
...
[<
c095e974>] (regmap_mmio_write32le) from [<
c095eb48>] (regmap_mmio_write+0x3c/0x54)
[<
c095eb48>] (regmap_mmio_write) from [<
c09580f4>] (_regmap_write+0x4c/0x1f0)
[<
c09580f4>] (_regmap_write) from [<
c095837c>] (_regmap_update_bits+0xe4/0xec)
[<
c095837c>] (_regmap_update_bits) from [<
c09599b4>] (regmap_update_bits_base+0x50/0x74)
[<
c09599b4>] (regmap_update_bits_base) from [<
c0d3e9e4>] (fsl_asrc_runtime_resume+0x1e4/0x21c)
[<
c0d3e9e4>] (fsl_asrc_runtime_resume) from [<
c0942464>] (__rpm_callback+0x3c/0x108)
[<
c0942464>] (__rpm_callback) from [<
c0942590>] (rpm_callback+0x60/0x64)
[<
c0942590>] (rpm_callback) from [<
c0942b60>] (rpm_resume+0x5cc/0x808)
[<
c0942b60>] (rpm_resume) from [<
c0942dfc>] (__pm_runtime_resume+0x60/0xa0)
[<
c0942dfc>] (__pm_runtime_resume) from [<
c0d3ecc4>] (fsl_asrc_probe+0x2a8/0x708)
[<
c0d3ecc4>] (fsl_asrc_probe) from [<
c0935b08>] (platform_probe+0x58/0xb8)
[<
c0935b08>] (platform_probe) from [<
c0933264>] (really_probe.part.0+0x9c/0x334)
[<
c0933264>] (really_probe.part.0) from [<
c093359c>] (__driver_probe_device+0xa0/0x138)
[<
c093359c>] (__driver_probe_device) from [<
c0933664>] (driver_probe_device+0x30/0xc8)
[<
c0933664>] (driver_probe_device) from [<
c0933c88>] (__driver_attach+0x90/0x130)
[<
c0933c88>] (__driver_attach) from [<
c0931060>] (bus_for_each_dev+0x78/0xb8)
[<
c0931060>] (bus_for_each_dev) from [<
c093254c>] (bus_add_driver+0xf0/0x1d8)
[<
c093254c>] (bus_add_driver) from [<
c0934a30>] (driver_register+0x88/0x118)
[<
c0934a30>] (driver_register) from [<
c01022c0>] (do_one_initcall+0x7c/0x3a4)
[<
c01022c0>] (do_one_initcall) from [<
c1601204>] (kernel_init_freeable+0x198/0x22c)
[<
c1601204>] (kernel_init_freeable) from [<
c0f5ff2c>] (kernel_init+0x10/0x128)
[<
c0f5ff2c>] (kernel_init) from [<
c010013c>] (ret_from_fork+0x14/0x38)
or
Unhandled fault: external abort on non-linefetch (0x808) at 0xd19b0000
pgd = (ptrval)
[
d19b0000] *pgd=
82711811, *pte=
308a0653, *ppte=
308a0453
Internal error: : 808 [#1] SMP ARM
...
[<
c095e974>] (regmap_mmio_write32le) from [<
c095eb48>] (regmap_mmio_write+0x3c/0x54)
[<
c095eb48>] (regmap_mmio_write) from [<
c09580f4>] (_regmap_write+0x4c/0x1f0)
[<
c09580f4>] (_regmap_write) from [<
c0959b28>] (regmap_write+0x3c/0x60)
[<
c0959b28>] (regmap_write) from [<
c0d41130>] (fsl_sai_runtime_resume+0x9c/0x1ec)
[<
c0d41130>] (fsl_sai_runtime_resume) from [<
c0942464>] (__rpm_callback+0x3c/0x108)
[<
c0942464>] (__rpm_callback) from [<
c0942590>] (rpm_callback+0x60/0x64)
[<
c0942590>] (rpm_callback) from [<
c0942b60>] (rpm_resume+0x5cc/0x808)
[<
c0942b60>] (rpm_resume) from [<
c0942dfc>] (__pm_runtime_resume+0x60/0xa0)
[<
c0942dfc>] (__pm_runtime_resume) from [<
c0d4231c>] (fsl_sai_probe+0x2b8/0x65c)
[<
c0d4231c>] (fsl_sai_probe) from [<
c0935b08>] (platform_probe+0x58/0xb8)
[<
c0935b08>] (platform_probe) from [<
c0933264>] (really_probe.part.0+0x9c/0x334)
[<
c0933264>] (really_probe.part.0) from [<
c093359c>] (__driver_probe_device+0xa0/0x138)
[<
c093359c>] (__driver_probe_device) from [<
c0933664>] (driver_probe_device+0x30/0xc8)
[<
c0933664>] (driver_probe_device) from [<
c0933c88>] (__driver_attach+0x90/0x130)
[<
c0933c88>] (__driver_attach) from [<
c0931060>] (bus_for_each_dev+0x78/0xb8)
[<
c0931060>] (bus_for_each_dev) from [<
c093254c>] (bus_add_driver+0xf0/0x1d8)
[<
c093254c>] (bus_add_driver) from [<
c0934a30>] (driver_register+0x88/0x118)
[<
c0934a30>] (driver_register) from [<
c01022c0>] (do_one_initcall+0x7c/0x3a4)
[<
c01022c0>] (do_one_initcall) from [<
c1601204>] (kernel_init_freeable+0x198/0x22c)
[<
c1601204>] (kernel_init_freeable) from [<
c0f5ff2c>] (kernel_init+0x10/0x128)
[<
c0f5ff2c>] (kernel_init) from [<
c010013c>] (ret_from_fork+0x14/0x38)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Message-id:
20210810160318.87376-1-linux@roeck-us.net
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Jan Luebbe [Fri, 6 Aug 2021 14:47:00 +0000 (16:47 +0200)]
hw/char/pl011: add support for sending break
Break events are currently only handled by chardev/char-serial.c, so we
just ignore errors, which results in no behaviour change for other
chardevs.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Message-id:
20210806144700.
3751979-1-jlu@pengutronix.de
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Hamza Mahfooz [Tue, 27 Jul 2021 23:52:01 +0000 (19:52 -0400)]
target/arm: kvm: use RCU_READ_LOCK_GUARD() in kvm_arch_fixup_msi_route()
As per commit
5626f8c6d468 ("rcu: Add automatically released rcu_read_lock
variants"), RCU_READ_LOCK_GUARD() should be used instead of
rcu_read_{un}lock().
Signed-off-by: Hamza Mahfooz <someguy@effective-light.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id:
20210727235201.11491-1-someguy@effective-light.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Fri, 30 Jul 2021 15:16:36 +0000 (16:16 +0100)]
target/arm: Implement M-profile trapping on division by zero
Unlike A-profile, for M-profile the UDIV and SDIV insns can be
configured to raise an exception on division by zero, using the CCR
DIV_0_TRP bit.
Implement support for setting this bit by making the helper functions
raise the appropriate exception.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210730151636.17254-3-peter.maydell@linaro.org
Peter Maydell [Fri, 30 Jul 2021 15:16:35 +0000 (16:16 +0100)]
target/arm: Re-indent sdiv and udiv helpers
We're about to make a code change to the sdiv and udiv helper
functions, so first fix their indentation and coding style.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20210730151636.17254-2-peter.maydell@linaro.org
Peter Maydell [Fri, 13 Aug 2021 16:11:57 +0000 (17:11 +0100)]
target/arm: Implement MVE interleaving loads/stores
Implement the MVE interleaving load/store functions VLD2, VLD4, VST2
and VST4. VLD2 loads 16 bytes of data from memory and writes to 2
consecutive Qregs; VLD4 loads 16 bytes of data from memory and writes
to 4 consecutive Qregs. The 'pattern' field in the encoding
determines the offset into memory which is accessed and also which
elements in the Qregs are written to. (The intention is that a
sequence of four consecutive VLD4 with different pattern values
performs a complete de-interleaving load of 64 bytes into all
elements of the 4 Qregs.) VST2 and VST4 do the same, but for stores.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Peter Maydell [Fri, 13 Aug 2021 16:11:57 +0000 (17:11 +0100)]
target/arm: Implement MVE scatter-gather immediate forms
Implement the MVE VLDR/VSTR insns which do scatter-gather using base
addresses from Qm plus or minus an immediate offset (possibly with
writeback). Note that writeback is not predicated but it does have
to honour ECI state, so we have to add an eci_mask check to the
VSTR_SG macros (the VLDR_SG macros already needed this to be able
to distinguish "skip beat" from "set predicated element to 0").
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Peter Maydell [Fri, 13 Aug 2021 16:11:56 +0000 (17:11 +0100)]
target/arm: Implement MVE scatter-gather insns
Implement the MVE gather-loads and scatter-stores which
form the address by adding a base value from a scalar
register to an offset in each element of a vector.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Peter Maydell [Fri, 13 Aug 2021 16:11:56 +0000 (17:11 +0100)]
target/arm: Implement MVE VCTP
Implement the MVE VCTP insn, which sets the VPR.P0 predicate bits so
as to predicate any element at index Rn or greater is predicated. As
with VPNOT, this insn itself is predicable and subject to beatwise
execution.
The calculation of the mask is the same as is used to determine
ltpmask in mve_element_mask(), but we precalculate masklen in
generated code to avoid having to have 4 helpers specialized by size.
We put the decode line in with the low-overhead-loop insns in
t32.decode because it's logically part of that collection of insn
patterns, even though it is an MVE only insn.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Peter Maydell [Fri, 13 Aug 2021 16:11:56 +0000 (17:11 +0100)]
target/arm: Implement MVE VPNOT
Implement the MVE VPNOT insn, which inverts the bits in VPR.P0
(subject to both predication and to beatwise execution).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Peter Maydell [Fri, 13 Aug 2021 16:11:55 +0000 (17:11 +0100)]
target/arm: Implement MVE VMOV to/from 2 general-purpose registers
Implement the MVE VMOV forms that move data between 2 general-purpose
registers and 2 32-bit lanes in a vector register.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Peter Maydell [Fri, 13 Aug 2021 16:11:55 +0000 (17:11 +0100)]
target/arm: Implement MVE VMAXA, VMINA
Implement the MVE VMAXA and VMINA insns, which take the absolute
value of the signed elements in the input vector and then accumulate
the unsigned max or min into the destination vector.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Peter Maydell [Fri, 13 Aug 2021 16:11:55 +0000 (17:11 +0100)]
target/arm: Implement MVE VQABS, VQNEG
Implement the MVE 1-operand saturating operations VQABS and VQNEG.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>