mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge tag 'pull-target-arm-20211215' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
target-arm queue: * ITS: error reporting cleanup * aspeed: improve documentation * Fix STM32F2XX USART data register readout * allow emulated GICv3 to be disabled in non-TCG builds * fix exception priority for singlestep, misaligned PC, bp, etc * Correct calculation of tlb range invalidate length * npcm7xx_emc: fix missing queue_flush * virt: Add VIOT ACPI table for virtio-iommu * target/i386: Use assert() to sanity-check b1 in SSE decode * Don't include qemu-common unnecessarily # gpg: Signature made Wed 15 Dec 2021 02:39:37 AM PST # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [full] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [full] * tag 'pull-target-arm-20211215' of https://git.linaro.org/people/pmaydell/qemu-arm: (33 commits) tests/acpi: add expected blob for VIOT test on virt machine tests/acpi: add expected blobs for VIOT test on q35 machine tests/acpi: add test case for VIOT tests/acpi: allow updates of VIOT expected data files hw/arm/virt: Use object_property_set instead of qdev_prop_set hw/arm/virt: Reject instantiation of multiple IOMMUs hw/arm/virt: Remove device tree restriction for virtio-iommu hw/arm/virt-acpi-build: Add VIOT table for virtio-iommu hw/net: npcm7xx_emc fix missing queue_flush target/arm: Correct calculation of tlb range invalidate length hw/arm: Don't include qemu-common.h unnecessarily target/rx/cpu.h: Don't include qemu-common.h target/hexagon/cpu.h: don't include qemu-common.h include/hw/i386: Don't include qemu-common.h in .h files target/i386: Use assert() to sanity-check b1 in SSE decode tests/tcg: Add arm and aarch64 pc alignment tests target/arm: Suppress bp for exceptions with more priority target/arm: Assert thumb pc is aligned target/arm: Take an exception if PC is misaligned target/arm: Split compute_fsr_fsc out of arm_deliver_fault ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@@ -14,6 +14,7 @@ AST2400 SoC based machines :
|
||||
|
||||
- ``palmetto-bmc`` OpenPOWER Palmetto POWER8 BMC
|
||||
- ``quanta-q71l-bmc`` OpenBMC Quanta BMC
|
||||
- ``supermicrox11-bmc`` Supermicro X11 BMC
|
||||
|
||||
AST2500 SoC based machines :
|
||||
|
||||
@@ -21,12 +22,16 @@ AST2500 SoC based machines :
|
||||
- ``romulus-bmc`` OpenPOWER Romulus POWER9 BMC
|
||||
- ``witherspoon-bmc`` OpenPOWER Witherspoon POWER9 BMC
|
||||
- ``sonorapass-bmc`` OCP SonoraPass BMC
|
||||
- ``swift-bmc`` OpenPOWER Swift BMC POWER9
|
||||
- ``swift-bmc`` OpenPOWER Swift BMC POWER9 (to be removed in v7.0)
|
||||
- ``fp5280g2-bmc`` Inspur FP5280G2 BMC
|
||||
- ``g220a-bmc`` Bytedance G220A BMC
|
||||
|
||||
AST2600 SoC based machines :
|
||||
|
||||
- ``ast2600-evb`` Aspeed AST2600 Evaluation board (Cortex-A7)
|
||||
- ``tacoma-bmc`` OpenPOWER Witherspoon POWER9 AST2600 BMC
|
||||
- ``rainier-bmc`` IBM Rainier POWER10 BMC
|
||||
- ``fuji-bmc`` Facebook Fuji BMC
|
||||
|
||||
Supported devices
|
||||
-----------------
|
||||
@@ -51,13 +56,13 @@ Supported devices
|
||||
* Front LEDs (PCA9552 on I2C bus)
|
||||
* LPC Peripheral Controller (a subset of subdevices are supported)
|
||||
* Hash/Crypto Engine (HACE) - Hash support only. TODO: HMAC and RSA
|
||||
* ADC
|
||||
|
||||
|
||||
Missing devices
|
||||
---------------
|
||||
|
||||
* Coprocessor support
|
||||
* ADC (out of tree implementation)
|
||||
* PWM and Fan Controller
|
||||
* Slave GPIO Controller
|
||||
* Super I/O Controller
|
||||
@@ -73,16 +78,25 @@ Missing devices
|
||||
Boot options
|
||||
------------
|
||||
|
||||
The Aspeed machines can be started using the ``-kernel`` option to
|
||||
load a Linux kernel or from a firmware. Images can be downloaded from
|
||||
the OpenBMC jenkins :
|
||||
The Aspeed machines can be started using the ``-kernel`` and ``-dtb`` options
|
||||
to load a Linux kernel or from a firmware. Images can be downloaded from the
|
||||
OpenBMC jenkins :
|
||||
|
||||
https://jenkins.openbmc.org/job/ci-openbmc/lastSuccessfulBuild/distro=ubuntu,label=docker-builder
|
||||
https://jenkins.openbmc.org/job/ci-openbmc/lastSuccessfulBuild/
|
||||
|
||||
or directly from the OpenBMC GitHub release repository :
|
||||
|
||||
https://github.com/openbmc/openbmc/releases
|
||||
|
||||
To boot a kernel directly from a Linux build tree:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ qemu-system-arm -M ast2600-evb -nographic \
|
||||
-kernel arch/arm/boot/zImage \
|
||||
-dtb arch/arm/boot/dts/aspeed-ast2600-evb.dtb \
|
||||
-initrd rootfs.cpio
|
||||
|
||||
The image should be attached as an MTD drive. Run :
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -27,6 +27,7 @@ config ARM_VIRT
|
||||
select DIMM
|
||||
select ACPI_HW_REDUCED
|
||||
select ACPI_APEI
|
||||
select ACPI_VIOT
|
||||
|
||||
config CHEETAH
|
||||
bool
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/datadir.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/datadir.h"
|
||||
#include "hw/boards.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/datadir.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/sysbus.h"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "hw/qdev-core.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/datadir.h"
|
||||
#include "qemu/units.h"
|
||||
#include "sysemu/blockdev.h"
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/datadir.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "hw/arm/stm32f405_soc.h"
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/datadir.h"
|
||||
#include "cpu.h"
|
||||
#include "hw/sysbus.h"
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "kvm_arm.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "hw/acpi/ghes.h"
|
||||
#include "hw/acpi/viot.h"
|
||||
|
||||
#define ARM_SPI_BASE 32
|
||||
|
||||
@@ -1011,6 +1012,12 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (vms->iommu == VIRT_IOMMU_VIRTIO) {
|
||||
acpi_add_table(table_offsets, tables_blob);
|
||||
build_viot(ms, tables_blob, tables->linker, vms->virtio_iommu_bdf,
|
||||
vms->oem_id, vms->oem_table_id);
|
||||
}
|
||||
|
||||
/* XSDT is pointed to by RSDP */
|
||||
xsdt = tables_blob->len;
|
||||
build_xsdt(tables_blob, tables->linker, table_offsets, vms->oem_id,
|
||||
|
||||
+10
-11
@@ -29,7 +29,6 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qemu/datadir.h"
|
||||
#include "qemu/units.h"
|
||||
#include "qemu/option.h"
|
||||
@@ -2494,6 +2493,11 @@ static void virt_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev,
|
||||
hwaddr db_start = 0, db_end = 0;
|
||||
char *resv_prop_str;
|
||||
|
||||
if (vms->iommu != VIRT_IOMMU_NONE) {
|
||||
error_setg(errp, "virt machine does not support multiple IOMMUs");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (vms->msi_controller) {
|
||||
case VIRT_MSI_CTRL_NONE:
|
||||
return;
|
||||
@@ -2513,8 +2517,9 @@ static void virt_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev,
|
||||
db_start, db_end,
|
||||
VIRTIO_IOMMU_RESV_MEM_T_MSI);
|
||||
|
||||
qdev_prop_set_uint32(dev, "len-reserved-regions", 1);
|
||||
qdev_prop_set_string(dev, "reserved-regions[0]", resv_prop_str);
|
||||
object_property_set_uint(OBJECT(dev), "len-reserved-regions", 1, errp);
|
||||
object_property_set_str(OBJECT(dev), "reserved-regions[0]",
|
||||
resv_prop_str, errp);
|
||||
g_free(resv_prop_str);
|
||||
}
|
||||
}
|
||||
@@ -2614,16 +2619,10 @@ static HotplugHandler *virt_machine_get_hotplug_handler(MachineState *machine,
|
||||
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
||||
|
||||
if (device_is_dynamic_sysbus(mc, dev) ||
|
||||
(object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM))) {
|
||||
object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) ||
|
||||
object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) {
|
||||
return HOTPLUG_HANDLER(machine);
|
||||
}
|
||||
if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) {
|
||||
VirtMachineState *vms = VIRT_MACHINE(machine);
|
||||
|
||||
if (!vms->bootinfo.firmware_loaded || !virt_is_acpi_enabled(vms)) {
|
||||
return HOTPLUG_HANDLER(machine);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,10 +103,11 @@ static uint64_t stm32f2xx_usart_read(void *opaque, hwaddr addr,
|
||||
return retvalue;
|
||||
case USART_DR:
|
||||
DB_PRINT("Value: 0x%" PRIx32 ", %c\n", s->usart_dr, (char) s->usart_dr);
|
||||
retvalue = s->usart_dr & 0x3FF;
|
||||
s->usart_sr &= ~USART_SR_RXNE;
|
||||
qemu_chr_fe_accept_input(&s->chr);
|
||||
qemu_set_irq(s->irq, 0);
|
||||
return s->usart_dr & 0x3FF;
|
||||
return retvalue;
|
||||
case USART_BRR:
|
||||
return s->usart_brr;
|
||||
case USART_CR1:
|
||||
|
||||
@@ -25,6 +25,11 @@ config APIC
|
||||
select MSI_NONBROKEN
|
||||
select I8259
|
||||
|
||||
config ARM_GIC_TCG
|
||||
bool
|
||||
default y
|
||||
depends on ARM_GIC && TCG
|
||||
|
||||
config ARM_GIC_KVM
|
||||
bool
|
||||
default y
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ARM Generic Interrupt Controller v3
|
||||
* ARM Generic Interrupt Controller v3 (emulation)
|
||||
*
|
||||
* Copyright (c) 2015 Huawei.
|
||||
* Copyright (c) 2016 Linaro Limited
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* ARM Generic Interrupt Controller v3
|
||||
* ARM Generic Interrupt Controller v3 (emulation)
|
||||
*
|
||||
* Copyright (c) 2016 Linaro Limited
|
||||
* Written by Peter Maydell
|
||||
@@ -21,14 +21,6 @@
|
||||
#include "hw/irq.h"
|
||||
#include "cpu.h"
|
||||
|
||||
void gicv3_set_gicv3state(CPUState *cpu, GICv3CPUState *s)
|
||||
{
|
||||
ARMCPU *arm_cpu = ARM_CPU(cpu);
|
||||
CPUARMState *env = &arm_cpu->env;
|
||||
|
||||
env->gicv3state = (void *)s;
|
||||
};
|
||||
|
||||
static GICv3CPUState *icc_cs_from_env(CPUARMState *env)
|
||||
{
|
||||
return env->gicv3state;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* ARM Generic Interrupt Controller v3
|
||||
*
|
||||
* Copyright (c) 2016 Linaro Limited
|
||||
* Written by Peter Maydell
|
||||
*
|
||||
* This code is licensed under the GPL, version 2 or (at your option)
|
||||
* any later version.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "gicv3_internal.h"
|
||||
#include "cpu.h"
|
||||
|
||||
void gicv3_set_gicv3state(CPUState *cpu, GICv3CPUState *s)
|
||||
{
|
||||
ARMCPU *arm_cpu = ARM_CPU(cpu);
|
||||
CPUARMState *env = &arm_cpu->env;
|
||||
|
||||
env->gicv3state = (void *)s;
|
||||
};
|
||||
+27
-12
@@ -274,21 +274,36 @@ static bool process_its_cmd(GICv3ITSState *s, uint64_t value, uint32_t offset,
|
||||
if (res != MEMTX_OK) {
|
||||
return result;
|
||||
}
|
||||
} else {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: invalid command attributes: "
|
||||
"invalid dte: %"PRIx64" for %d (MEM_TX: %d)\n",
|
||||
__func__, dte, devid, res);
|
||||
return result;
|
||||
}
|
||||
|
||||
if ((devid > s->dt.maxids.max_devids) || !dte_valid || !ite_valid ||
|
||||
!cte_valid || (eventid > max_eventid)) {
|
||||
|
||||
/*
|
||||
* In this implementation, in case of guest errors we ignore the
|
||||
* command and move onto the next command in the queue.
|
||||
*/
|
||||
if (devid > s->dt.maxids.max_devids) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: invalid command attributes "
|
||||
"devid %d or eventid %d or invalid dte %d or"
|
||||
"invalid cte %d or invalid ite %d\n",
|
||||
__func__, devid, eventid, dte_valid, cte_valid,
|
||||
ite_valid);
|
||||
/*
|
||||
* in this implementation, in case of error
|
||||
* we ignore this command and move onto the next
|
||||
* command in the queue
|
||||
*/
|
||||
"%s: invalid command attributes: devid %d>%d",
|
||||
__func__, devid, s->dt.maxids.max_devids);
|
||||
|
||||
} else if (!dte_valid || !ite_valid || !cte_valid) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: invalid command attributes: "
|
||||
"dte: %s, ite: %s, cte: %s\n",
|
||||
__func__,
|
||||
dte_valid ? "valid" : "invalid",
|
||||
ite_valid ? "valid" : "invalid",
|
||||
cte_valid ? "valid" : "invalid");
|
||||
} else if (eventid > max_eventid) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: invalid command attributes: eventid %d > %d\n",
|
||||
__func__, eventid, max_eventid);
|
||||
} else {
|
||||
/*
|
||||
* Current implementation only supports rdbase == procnum
|
||||
|
||||
+7
-4
@@ -3,12 +3,14 @@ softmmu_ss.add(when: 'CONFIG_ARM_GIC', if_true: files(
|
||||
'arm_gic.c',
|
||||
'arm_gic_common.c',
|
||||
'arm_gicv2m.c',
|
||||
'arm_gicv3.c',
|
||||
'arm_gicv3_common.c',
|
||||
'arm_gicv3_dist.c',
|
||||
'arm_gicv3_its_common.c',
|
||||
'arm_gicv3_redist.c',
|
||||
))
|
||||
softmmu_ss.add(when: 'CONFIG_ARM_GIC_TCG', if_true: files(
|
||||
'arm_gicv3.c',
|
||||
'arm_gicv3_dist.c',
|
||||
'arm_gicv3_its.c',
|
||||
'arm_gicv3_redist.c',
|
||||
))
|
||||
softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_pic.c'))
|
||||
softmmu_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c'))
|
||||
@@ -25,7 +27,8 @@ softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_PMU', if_true: files('xlnx-pmu-iomod-in
|
||||
|
||||
specific_ss.add(when: 'CONFIG_ALLWINNER_A10_PIC', if_true: files('allwinner-a10-pic.c'))
|
||||
specific_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c', 'apic_common.c'))
|
||||
specific_ss.add(when: 'CONFIG_ARM_GIC', if_true: files('arm_gicv3_cpuif.c'))
|
||||
specific_ss.add(when: 'CONFIG_ARM_GIC', if_true: files('arm_gicv3_cpuif_common.c'))
|
||||
specific_ss.add(when: 'CONFIG_ARM_GIC_TCG', if_true: files('arm_gicv3_cpuif.c'))
|
||||
specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files('arm_gic_kvm.c'))
|
||||
specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: files('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c'))
|
||||
specific_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c'))
|
||||
|
||||
+8
-10
@@ -284,6 +284,12 @@ static void emc_halt_rx(NPCM7xxEMCState *emc, uint32_t mista_flag)
|
||||
emc_set_mista(emc, mista_flag);
|
||||
}
|
||||
|
||||
static void emc_enable_rx_and_flush(NPCM7xxEMCState *emc)
|
||||
{
|
||||
emc->rx_active = true;
|
||||
qemu_flush_queued_packets(qemu_get_queue(emc->nic));
|
||||
}
|
||||
|
||||
static void emc_set_next_tx_descriptor(NPCM7xxEMCState *emc,
|
||||
const NPCM7xxEMCTxDesc *tx_desc,
|
||||
uint32_t desc_addr)
|
||||
@@ -581,13 +587,6 @@ static ssize_t emc_receive(NetClientState *nc, const uint8_t *buf, size_t len1)
|
||||
return len;
|
||||
}
|
||||
|
||||
static void emc_try_receive_next_packet(NPCM7xxEMCState *emc)
|
||||
{
|
||||
if (emc_can_receive(qemu_get_queue(emc->nic))) {
|
||||
qemu_flush_queued_packets(qemu_get_queue(emc->nic));
|
||||
}
|
||||
}
|
||||
|
||||
static uint64_t npcm7xx_emc_read(void *opaque, hwaddr offset, unsigned size)
|
||||
{
|
||||
NPCM7xxEMCState *emc = opaque;
|
||||
@@ -703,7 +702,7 @@ static void npcm7xx_emc_write(void *opaque, hwaddr offset,
|
||||
emc->regs[REG_MGSTA] |= REG_MGSTA_RXHA;
|
||||
}
|
||||
if (value & REG_MCMDR_RXON) {
|
||||
emc->rx_active = true;
|
||||
emc_enable_rx_and_flush(emc);
|
||||
} else {
|
||||
emc_halt_rx(emc, 0);
|
||||
}
|
||||
@@ -739,8 +738,7 @@ static void npcm7xx_emc_write(void *opaque, hwaddr offset,
|
||||
break;
|
||||
case REG_RSDR:
|
||||
if (emc->regs[REG_MCMDR] & REG_MCMDR_RXON) {
|
||||
emc->rx_active = true;
|
||||
emc_try_receive_next_packet(emc);
|
||||
emc_enable_rx_and_flush(emc);
|
||||
}
|
||||
break;
|
||||
case REG_MIIDA:
|
||||
|
||||
@@ -48,16 +48,8 @@ static void virtio_iommu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
|
||||
VirtIOIOMMU *s = VIRTIO_IOMMU(vdev);
|
||||
|
||||
if (!qdev_get_machine_hotplug_handler(DEVICE(vpci_dev))) {
|
||||
MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
|
||||
|
||||
error_setg(errp,
|
||||
"%s machine fails to create iommu-map device tree bindings",
|
||||
mc->name);
|
||||
error_append_hint(errp,
|
||||
"Check your machine implements a hotplug handler "
|
||||
"for the virtio-iommu-pci device\n");
|
||||
error_append_hint(errp, "Check the guest is booted without FW or with "
|
||||
"-no-acpi\n");
|
||||
error_setg(errp, "Check your machine implements a hotplug handler "
|
||||
"for the virtio-iommu-pci device");
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < s->nb_reserved_regions; i++) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user