Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
2474e36
tests/tcg: add a multiarch signals test to stress test signal delivery
stsquad May 27, 2021
8837a67
meson.build: fix cosmetics of compiler display
stsquad May 27, 2021
e46c343
tests/tcg/configure.sh: tweak quoting of target_compiler
stsquad May 27, 2021
60f54c9
tests/acceptance: tag various arm tests as TCG only
stsquad May 27, 2021
94fe0fc
gitlab: work harder to avoid false positives in checkpatch
stsquad Jun 2, 2021
27d6241
gitlab-ci: Split gprof-gcov job
philmd May 25, 2021
7a3eed4
tests/vm: expose --source-path to scripts to find extra files
stsquad Jun 2, 2021
84995a3
scripts/checkpatch.pl: process .c.inc and .h.inc files as C source
mferst May 20, 2021
92440ae
target/riscv: Do not include 'pmp.h' in user emulation
philmd May 16, 2021
630da46
i386/kvm: The value passed to strerror should be positive
May 19, 2021
af0904e
misc: Correct relative include path
philmd May 16, 2021
7bc8a12
linux-user/syscall: Constify bitmask_transtbl fcntl/mmap flags_tlb[]
philmd May 17, 2021
4d231f3
docs: fix broken reference
jnsnow May 11, 2021
2b126a9
target/nios2: fix page-fit instruction count
Dovgalyuk May 11, 2021
775ef81
hw/display/macfb: Classify the "nubus-macfb" as display device
huth May 31, 2021
358f27c
target/hppa: Remove unused 'memory.h' header
philmd May 17, 2021
f23e4ba
target/mips: Fix 'Uncoditional' typo
philmd Jun 2, 2021
eb7bc9b
scripts/oss-fuzz: Fix typo in documentation
philmd Jun 2, 2021
f84d6e7
vhost-vdpa: Remove redundant declaration of address_space_memory
YongjiXie May 17, 2021
38bb06f
hw/riscv: sifive_u: Switch to use qemu_fdt_setprop_string_array() helper
lbmeng Apr 30, 2021
bfd5241
hw/riscv: virt: Switch to use qemu_fdt_setprop_string_array() helper
lbmeng Apr 30, 2021
6bcf907
hw/riscv: Support the official CLINT DT bindings
lbmeng Apr 30, 2021
0f29f9e
hw/riscv: Support the official PLIC DT bindings
lbmeng Apr 30, 2021
290515f
docs/system/riscv: Correct the indentation level of supported devices
lbmeng Apr 30, 2021
d3f4e70
docs/system/riscv: sifive_u: Document '-dtb' usage
lbmeng Apr 30, 2021
9d39584
hw/riscv: Use macros for BIOS image names
lbmeng Apr 30, 2021
7b66a4c
hw/riscv: microchip_pfsoc: Support direct kernel boot
lbmeng Apr 30, 2021
454d403
target/riscv: fix wfi exception behavior
josecm Apr 20, 2021
015679f
docs/system: Move the RISC-V -bios information to removed
alistair23 May 3, 2021
a2573ad
target/riscv: Remove unnecessary riscv_*_names[] declaration
lbmeng May 14, 2021
91dbe99
target/riscv: Dump CSR mscratch/sscratch/satp
changbindu May 19, 2021
031771d
target/riscv/pmp: Add assert for ePMP operations
alistair23 May 20, 2021
d720725
target/riscv: Pass the same value to oprsz and maxsz.
May 21, 2021
100f4bc
target/riscv: reformat @sh format encoding for B-extension
kito-cheng May 5, 2021
e9b3a49
target/riscv: rvb: count leading/trailing zeros
kito-cheng May 5, 2021
fdd1fa6
target/riscv: rvb: count bits set
frankchang0125 May 5, 2021
87bc572
target/riscv: rvb: logic-with-negate
kito-cheng May 5, 2021
84b1076
target/riscv: rvb: pack two words into one register
kito-cheng May 5, 2021
30f9bd5
target/riscv: rvb: min/max instructions
kito-cheng May 5, 2021
adc6793
target/riscv: rvb: sign-extend instructions
kito-cheng May 5, 2021
c5395ce
target/riscv: add gen_shifti() and gen_shiftiw() helper functions
frankchang0125 May 5, 2021
8f8235b
target/riscv: rvb: single-bit instructions
frankchang0125 May 5, 2021
b59395f
target/riscv: rvb: shift ones
kito-cheng May 5, 2021
3f3f38b
target/riscv: rvb: rotate (left/right)
kito-cheng May 5, 2021
6211de1
target/riscv: rvb: generalized reverse
frankchang0125 May 5, 2021
a40d770
target/riscv: rvb: generalized or-combine
frankchang0125 May 5, 2021
d684d08
target/riscv: rvb: address calculation
kito-cheng May 5, 2021
96fcb61
target/riscv: rvb: add/shift with prefix zero-extend
kito-cheng May 5, 2021
c2b171b
target/riscv: rvb: support and turn on B-extension from command line
kito-cheng May 5, 2021
a388101
target/riscv: rvb: add b-ext version cpu option
frankchang0125 May 5, 2021
144b811
yank: Unregister function when using TLS migration
LeoBras Jun 1, 2021
9c40502
migration/rdma: Fix cm event use after free
zhijianli88 Jun 2, 2021
e0e6b86
channel-socket: Only set CLOEXEC if we have space for fds
dagrh Apr 21, 2021
7f1cc6b
io/net-listener: Call the notifier during finalize
dagrh Apr 21, 2021
5d229aa
migration: Add cleanup hook for inwards migration
dagrh Apr 21, 2021
48364d6
migration/socket: Close the listener at the end
dagrh Apr 21, 2021
64dd7d9
sockets: Support multipath TCP
dagrh Apr 21, 2021
708cd36
migration/dirtyrate: make sample page count configurable
Jun 7, 2021
b1be08e
hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds
xzpeter Jun 7, 2021
00e75e5
vhost-vdpa: skip ram device from the IOTLB mapping
jasowang Jun 2, 2021
f2319df
vhost-vdpa: map virtqueue notification area if possible
jasowang Apr 15, 2021
c313acc
vhost-vdpa: don't initialize backend_features
jasowang Jun 2, 2021
2bef4c0
vhost-vdpa: remove the unused vhost_vdpa_get_acked_features()
jasowang Jun 2, 2021
f97fba6
netdev: add more commands to preconfig mode
bonzini May 11, 2021
3e97cc2
Remove some duplicate trace code.
raolei-intel Jun 8, 2021
e8ed158
Fix the qemu crash when guest shutdown during checkpoint
raolei-intel Jun 8, 2021
caf06e9
Optimize the function of filter_send
raolei-intel Jun 8, 2021
c7a4d4b
Remove migrate_set_block_enabled in checkpoint
raolei-intel Jun 8, 2021
beb4a5e
Add a function named packet_new_nocopy for COLO.
raolei-intel Jun 8, 2021
513c217
Add the function of colo_compare_cleanup
raolei-intel Jun 8, 2021
94236f4
Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()
raolei-intel Jun 8, 2021
615c052
target/ppc: Implement pdepd instruction
mferst Jun 11, 2021
e47eb56
target/ppc: Implement vpdepd instruction
mferst Jun 11, 2021
f2c8713
target/ppc: Implement pextd instruction
mferst Jun 15, 2021
c60f2b2
target/ppc: Implement vpextd instruction
mferst Jun 15, 2021
5c09a3b
tests/tcg/ppc64le: tests for paddi
mferst Jun 24, 2021
68176e4
tests/tcg/ppc64le: tests for setbc/setbcr/stnbc/setnbcr
mferst Jun 24, 2021
dbda36c
tests/tcg/ppc64le: tests for cfuged
mferst Jun 24, 2021
7f50fae
tests/tcg/ppc64le: tests for vcfuged
mferst Jun 24, 2021
d4509c4
tests/tcg/ppc64le: tests for pdepd/vpdepd
mferst Jun 24, 2021
403fd14
tests/tcg/ppc64le: tests for pextd/vpextd
mferst Jun 24, 2021
9184b85
tests/tcg/ppc64le: added speed test
Jul 12, 2021
945d018
tests/tcg/ppc64le: tests for blendvb
Jul 13, 2021
ac32432
tests/tcg;ppc64le: tests for the other blend instructions
Jul 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .gitlab-ci.d/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -558,16 +558,27 @@ check-deprecated:
allow_failure: true

# gprof/gcov are GCC features
gprof-gcov:
build-gprof-gcov:
extends: .native_build_job_template
needs:
job: amd64-ubuntu2004-container
variables:
IMAGE: ubuntu2004
CONFIGURE_ARGS: --enable-gprof --enable-gcov
MAKE_CHECK_ARGS: check
TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
timeout: 70m
artifacts:
expire_in: 1 days
paths:
- build

check-gprof-gcov:
extends: .native_test_job_template
needs:
- job: build-gprof-gcov
artifacts: true
variables:
IMAGE: ubuntu2004
MAKE_CHECK_ARGS: check
after_script:
- ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh

Expand Down
6 changes: 5 additions & 1 deletion .gitlab-ci.d/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ check-patch:
image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
needs:
job: amd64-centos8-container
script: .gitlab-ci.d/check-patch.py
script:
- git config --local diff.renamelimit 0
- git config --local diff.renames True
- git config --local diff.algorithm histogram
- .gitlab-ci.d/check-patch.py
variables:
GIT_DEPTH: 1000
rules:
Expand Down
19 changes: 0 additions & 19 deletions docs/system/deprecated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,6 @@ pcspk-audiodev=<name>``.
``tty`` and ``parport`` are aliases that will be removed. Instead, the
actual backend names ``serial`` and ``parallel`` should be used.

RISC-V ``-bios`` (since 5.1)
''''''''''''''''''''''''''''

QEMU 4.1 introduced support for the -bios option in QEMU for RISC-V for the
RISC-V virt machine and sifive_u machine. QEMU 4.1 had no changes to the
default behaviour to avoid breakages.

QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default``.

QEMU 5.1 has three options:
1. ``-bios default`` - This is the current default behavior if no -bios option
is included. This option will load the default OpenSBI firmware automatically.
The firmware is included with the QEMU release and no user interaction is
required. All a user needs to do is specify the kernel they want to boot
with the -kernel option
2. ``-bios none`` - QEMU will not automatically load any firmware. It is up
to the user to load all the images they need.
3. ``-bios <file>`` - Tells QEMU to load the specified file as the firmwrae.

Short-form boolean options (since 6.0)
''''''''''''''''''''''''''''''''''''''

Expand Down
5 changes: 5 additions & 0 deletions docs/system/removed-features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ devices. Drives the board doesn't pick up can no longer be used with
This option was undocumented and not used in the field.
Use `-device usb-ccid`` instead.

RISC-V firmware not booted by default (removed in 5.1)
''''''''''''''''''''''''''''''''''''''''''''''''''''''

QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default``
for the RISC-V ``virt`` machine and ``sifive_u`` machine.

QEMU Machine Protocol (QMP) commands
------------------------------------
Expand Down
50 changes: 35 additions & 15 deletions docs/system/riscv/microchip-icicle-kit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,53 @@ Supported devices

The ``microchip-icicle-kit`` machine supports the following devices:

* 1 E51 core
* 4 U54 cores
* Core Level Interruptor (CLINT)
* Platform-Level Interrupt Controller (PLIC)
* L2 Loosely Integrated Memory (L2-LIM)
* DDR memory controller
* 5 MMUARTs
* 1 DMA controller
* 2 GEM Ethernet controllers
* 1 SDHC storage controller
* 1 E51 core
* 4 U54 cores
* Core Level Interruptor (CLINT)
* Platform-Level Interrupt Controller (PLIC)
* L2 Loosely Integrated Memory (L2-LIM)
* DDR memory controller
* 5 MMUARTs
* 1 DMA controller
* 2 GEM Ethernet controllers
* 1 SDHC storage controller

Boot options
------------

The ``microchip-icicle-kit`` machine can start using the standard -bios
functionality for loading its BIOS image, aka Hart Software Services (HSS_).
HSS loads the second stage bootloader U-Boot from an SD card. It does not
support direct kernel loading via the -kernel option. One has to load kernel
from U-Boot.
HSS loads the second stage bootloader U-Boot from an SD card. Then a kernel
can be loaded from U-Boot. It also supports direct kernel booting via the
-kernel option along with the device tree blob via -dtb. When direct kernel
boot is used, the OpenSBI fw_dynamic BIOS image is used to boot a payload
like U-Boot or OS kernel directly.

The user provided DTB should have the following requirements:

* The /cpus node should contain at least one subnode for E51 and the number
of subnodes should match QEMU's ``-smp`` option
* The /memory reg size should match QEMU’s selected ram_size via ``-m``
* Should contain a node for the CLINT device with a compatible string
"riscv,clint0"

QEMU follows below truth table to select which payload to execute:

===== ========== =======
-bios -kernel payload
===== ========== =======
N N HSS
Y don't care HSS
N Y kernel
===== ========== =======

The memory is set to 1537 MiB by default which is the minimum required high
memory size by HSS. A sanity check on ram size is performed in the machine
init routine to prompt user to increase the RAM size to > 1537 MiB when less
than 1537 MiB ram is detected.

Boot the machine
----------------
Running HSS
-----------

HSS 2020.12 release is tested at the time of writing. To build an HSS image
that can be booted by the ``microchip-icicle-kit`` machine, type the following
Expand Down
77 changes: 56 additions & 21 deletions docs/system/riscv/sifive_u.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ Supported devices

The ``sifive_u`` machine supports the following devices:

* 1 E51 / E31 core
* Up to 4 U54 / U34 cores
* Core Level Interruptor (CLINT)
* Platform-Level Interrupt Controller (PLIC)
* Power, Reset, Clock, Interrupt (PRCI)
* L2 Loosely Integrated Memory (L2-LIM)
* DDR memory controller
* 2 UARTs
* 1 GEM Ethernet controller
* 1 GPIO controller
* 1 One-Time Programmable (OTP) memory with stored serial number
* 1 DMA controller
* 2 QSPI controllers
* 1 ISSI 25WP256 flash
* 1 SD card in SPI mode
* 1 E51 / E31 core
* Up to 4 U54 / U34 cores
* Core Level Interruptor (CLINT)
* Platform-Level Interrupt Controller (PLIC)
* Power, Reset, Clock, Interrupt (PRCI)
* L2 Loosely Integrated Memory (L2-LIM)
* DDR memory controller
* 2 UARTs
* 1 GEM Ethernet controller
* 1 GPIO controller
* 1 One-Time Programmable (OTP) memory with stored serial number
* 1 DMA controller
* 2 QSPI controllers
* 1 ISSI 25WP256 flash
* 1 SD card in SPI mode

Please note the real world HiFive Unleashed board has a fixed configuration of
1 E51 core and 4 U54 core combination and the RISC-V core boots in 64-bit mode.
Expand All @@ -36,12 +36,21 @@ Hardware configuration information
----------------------------------

The ``sifive_u`` machine automatically generates a device tree blob ("dtb")
which it passes to the guest. This provides information about the addresses,
interrupt lines and other configuration of the various devices in the system.
Guest software should discover the devices that are present in the generated
DTB instead of using a DTB for the real hardware, as some of the devices are
not modeled by QEMU and trying to access these devices may cause unexpected
behavior.
which it passes to the guest, if there is no ``-dtb`` option. This provides
information about the addresses, interrupt lines and other configuration of
the various devices in the system. Guest software should discover the devices
that are present in the generated DTB instead of using a DTB for the real
hardware, as some of the devices are not modeled by QEMU and trying to access
these devices may cause unexpected behavior.

If users want to provide their own DTB, they can use the ``-dtb`` option.
These DTBs should have the following requirements:

* The /cpus node should contain at least one subnode for E51 and the number
of subnodes should match QEMU's ``-smp`` option
* The /memory reg size should match QEMU’s selected ram_size via ``-m``
* Should contain a node for the CLINT device with a compatible string
"riscv,clint0" if using with OpenSBI BIOS images

Boot options
------------
Expand Down Expand Up @@ -122,6 +131,32 @@ To boot the newly built Linux kernel in QEMU with the ``sifive_u`` machine:
-initrd /path/to/rootfs.ext4 \
-append "root=/dev/ram"

Alternatively, we can use a custom DTB to boot the machine by inserting a CLINT
node in fu540-c000.dtsi in the Linux kernel,

.. code-block:: none

clint: clint@2000000 {
compatible = "riscv,clint0";
interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
&cpu1_intc 3 &cpu1_intc 7
&cpu2_intc 3 &cpu2_intc 7
&cpu3_intc 3 &cpu3_intc 7
&cpu4_intc 3 &cpu4_intc 7>;
reg = <0x00 0x2000000 0x00 0x10000>;
};

with the following command line options:

.. code-block:: bash

$ qemu-system-riscv64 -M sifive_u -smp 5 -m 8G \
-display none -serial stdio \
-kernel arch/riscv/boot/Image \
-dtb arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dtb \
-initrd /path/to/rootfs.ext4 \
-append "root=/dev/ram"

To build a Linux mainline kernel that can be booted by the ``sifive_u`` machine
in 32-bit mode, use the rv32_defconfig configuration. A patch is required to
fix the 32-bit boot issue for Linux kernel v5.10.
Expand Down
13 changes: 12 additions & 1 deletion docs/system/target-riscv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,16 @@ undocumented; you can get a complete list by running
riscv/shakti-c
riscv/sifive_u

RISC-V CPU features
RISC-V CPU firmware
-------------------

When using the ``sifive_u`` or ``virt`` machine there are three different
firmware boot options:
1. ``-bios default`` - This is the default behaviour if no -bios option
is included. This option will load the default OpenSBI firmware automatically.
The firmware is included with the QEMU release and no user interaction is
required. All a user needs to do is specify the kernel they want to boot
with the -kernel option
2. ``-bios none`` - QEMU will not automatically load any firmware. It is up
to the user to load all the images they need.
3. ``-bios <file>`` - Tells QEMU to load the specified file as the firmware.
13 changes: 13 additions & 0 deletions hmp-commands-info.hx
Original file line number Diff line number Diff line change
Expand Up @@ -867,3 +867,16 @@ SRST
``info replay``
Display the record/replay information: mode and the current icount.
ERST

{
.name = "dirty_rate",
.args_type = "",
.params = "",
.help = "show dirty rate information",
.cmd = hmp_info_dirty_rate,
},

SRST
``info dirty_rate``
Display the vcpu dirty rate information.
ERST
16 changes: 16 additions & 0 deletions hmp-commands.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,7 @@ ERST
.help = "add host network device",
.cmd = hmp_netdev_add,
.command_completion = netdev_add_completion,
.flags = "p",
},

SRST
Expand All @@ -1283,6 +1284,7 @@ ERST
.help = "remove host network device",
.cmd = hmp_netdev_del,
.command_completion = netdev_del_completion,
.flags = "p",
},

SRST
Expand Down Expand Up @@ -1727,3 +1729,17 @@ ERST
.flags = "p",
},

SRST
``calc_dirty_rate`` *second*
Start a round of dirty rate measurement with the period specified in *second*.
The result of the dirty rate measurement may be observed with ``info
dirty_rate`` command.
ERST

{
.name = "calc_dirty_rate",
.args_type = "second:l,sample_pages_per_GB:l?",
.params = "second [sample_pages_per_GB]",
.help = "start a round of guest dirty rate measurement",
.cmd = hmp_calc_dirty_rate,
},
1 change: 1 addition & 0 deletions hw/display/macfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ static void macfb_nubus_class_init(ObjectClass *klass, void *data)
dc->desc = "Nubus Macintosh framebuffer";
dc->reset = macfb_nubus_reset;
dc->vmsd = &vmstate_macfb;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
device_class_set_props(dc, macfb_nubus_properties);
}

Expand Down
2 changes: 1 addition & 1 deletion hw/gpio/aspeed_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "qemu/host-utils.h"
#include "qemu/log.h"
#include "hw/gpio/aspeed_gpio.h"
#include "include/hw/misc/aspeed_scu.h"
#include "hw/misc/aspeed_scu.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "hw/irq.h"
Expand Down
6 changes: 3 additions & 3 deletions hw/i386/acpi-common.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef HW_I386_ACPI_COMMON_H
#define HW_I386_ACPI_COMMON_H
#include "include/hw/acpi/acpi_dev_interface.h"

#include "include/hw/acpi/bios-linker-loader.h"
#include "include/hw/i386/x86.h"
#include "hw/acpi/acpi_dev_interface.h"
#include "hw/acpi/bios-linker-loader.h"
#include "hw/i386/x86.h"

/* Default IOAPIC ID */
#define ACPI_BUILD_IOAPIC_ID 0x0
Expand Down
2 changes: 1 addition & 1 deletion hw/i386/kvm/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static void kvm_apic_put(CPUState *cs, run_on_cpu_data data)

ret = kvm_vcpu_ioctl(CPU(s->cpu), KVM_SET_LAPIC, &kapic);
if (ret < 0) {
fprintf(stderr, "KVM_SET_LAPIC failed: %s\n", strerror(ret));
fprintf(stderr, "KVM_SET_LAPIC failed: %s\n", strerror(-ret));
abort();
}
}
Expand Down
4 changes: 2 additions & 2 deletions hw/i386/kvm/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static void kvm_update_clock(KVMClockState *s)

ret = kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, &data);
if (ret < 0) {
fprintf(stderr, "KVM_GET_CLOCK failed: %s\n", strerror(ret));
fprintf(stderr, "KVM_GET_CLOCK failed: %s\n", strerror(-ret));
abort();
}
s->clock = data.clock;
Expand Down Expand Up @@ -189,7 +189,7 @@ static void kvmclock_vm_state_change(void *opaque, bool running,
data.clock = s->clock;
ret = kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data);
if (ret < 0) {
fprintf(stderr, "KVM_SET_CLOCK failed: %s\n", strerror(ret));
fprintf(stderr, "KVM_SET_CLOCK failed: %s\n", strerror(-ret));
abort();
}

Expand Down
Loading