DeviceId, which maps the peripheral and PCell registers of a PL011
device, was not treating each register value as a 32 bit value.
Change DeviceId enum to return register values via constified getter
functions instead of leveraging the std::ops::Index<_> trait.
While at it, print errors when gues
On Sun, Nov 17, 2024 at 1:16 PM Paolo Bonzini wrote:
>
>
>
> Il dom 17 nov 2024, 11:21 Manos Pitsidianakis
> ha scritto:
>>>
>>> This seems extremely verbose and rather obscures the fact that these
>>> registers are a set of adjacent simple ID registers, compared to
>>> the previous code which d
From: "Maciej S. Szmigiero"
multifd_send() function is currently not thread safe, make it thread safe
by holding a lock during its execution.
This way it will be possible to safely call it concurrently from multiple
threads.
Signed-off-by: Maciej S. Szmigiero
---
migration/multifd.c | 7 +
From: Kaiwen Xue
This adds checks in ops performed on xireg and xireg2-xireg6 so that the
counter delegation function will receive a valid xiselect value with the
proper extensions enabled.
Co-developed-by: Atish Patra
Signed-off-by: Kaiwen Xue
Reviewed-by: Alistair Francis
Signed-off-by: Ati
On Mon, Nov 18, 2024 at 10:18 AM Joel Stanley wrote:
>
> Guest code was performing a byte load to the SCU MMIO region, leading to
> the guest code crashing (it should be using proper accessors, but
> that is not Qemu's bug). Hardware and the documentation[1] both agree that
> byte loads are okay,
Hi Michael,
On 11/16/24 19:49, Michael Tokarev wrote:
25.10.2024 20:58, Pierrick Bouvier wrote:
When instrumenting memory accesses for plugin, we force memory accesses
to use the slow path for mmu [1]. This create a situation where we end
up calling ptw_setl_slow. This was fixed recently in [2]
The constants defined through the preprocessor must be unsigned. Also,
unsigned integer constants are consistent across different bases (see
section 6.4.4.1 of the C99 standard draft).
Signed-off-by: Ioan-Cristian CÎRSTEA
---
hw/char/bcm2835_aux.c | 52 +--
On Fri, Oct 11, 2024 at 5:05 AM Daniel Henrique Barboza
wrote:
>
> The current logic to determine if we don't need an emulated APLIC
> controller, i.e. KVM will provide for us, is to determine if we're
> running KVM, with in-kernel irqchip support, and running
> aia=aplic-imsic. This is modelled b
Guest code was performing a byte load to the SCU MMIO region, leading to
the guest code crashing (it should be using proper accessors, but
that is not Qemu's bug). Hardware and the documentation[1] both agree that
byte loads are okay, so change all of the aspeed devices to accept a
minimum access s
On Fri, Oct 11, 2024 at 5:04 AM Daniel Henrique Barboza
wrote:
>
> Similar to the riscv_is_kvm_aia_aplic_imsic() helper from riscv_aplic.c,
> the existing virt_use_kvm_aia() is testing for KVM aia=aplic-imsic with
> in-kernel irqchip enabled. It is not checking for a generic AIA support.
>
> Renam
From: "Maciej S. Szmigiero"
This SaveVMHandler helps device provide its own asynchronous transmission
of the remaining data at the end of a precopy phase via multifd channels,
in parallel with the transfer done by save_live_complete_precopy handlers.
These threads are launched only when multifd
As per the ratified AIA spec v1.0, three stateen bits control AIA CSR
access.
Bit 60 controls the indirect CSRs
Bit 59 controls the most AIA CSR state
Bit 58 controls the IMSIC state such as stopei and vstopei
Enable the corresponding bits in [m|h]stateen and enable corresponding
checks in the CS
Add configuration options so that they can be enabled/disabld from
qemu commandline.
Acked-by: Alistair Francis
Signed-off-by: Atish Patra
---
target/riscv/cpu.c | 4
1 file changed, 4 insertions(+)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 410ca2e3a666..2a4f285a974f 1006
From: Kaiwen Xue
This adds the indirect access registers required by sscsrind/smcsrind
and the operations on them. Note that xiselect and xireg are used for
both AIA and sxcsrind, and the behavior of accessing them depends on
whether each extension is enabled and the value stored in xiselect.
Co
From: Kaiwen Xue
This adds the properties for sxcsrind. Definitions of new registers and
implementations will come with future patches.
Signed-off-by: Atish Patra
Signed-off-by: Kaiwen Xue
---
target/riscv/cpu.c | 2 ++
target/riscv/cpu_cfg.h | 2 ++
2 files changed, 4 insertions(+)
diff
This series adds the counter delegation extension support. The counter
delegation ISA extension(Smcdeleg/Ssccfg) actually depends on multiple ISA
extensions.
1. S[m|s]csrind : The indirect CSR extension[1] which defines additional
5 ([M|S|VS]IREG2-[M|S|VS]IREG6) register to address size limitat
From: Kaiwen Xue
This adds definitions for counter delegation, including the new
scountinhibit register and the mstateen.CD bit.
Signed-off-by: Kaiwen Xue
Reviewed-by: Alistair Francis
Signed-off-by: Atish Patra
---
target/riscv/cpu.h | 1 +
target/riscv/cpu_bits.h | 8 +++-
target/
This adds the properties for counter delegation ISA extensions
(Smcdeleg/Ssccfg). Definitions of new registers and and implementation
will come in the next set of patches.
Signed-off-by: Atish Patra
---
target/riscv/cpu.c | 2 ++
target/riscv/cpu_cfg.h | 2 ++
2 files changed, 4 insertions(+
From: "Maciej S. Szmigiero"
A new function multifd_queue_device_state() is provided for device to queue
its state for transmission via a multifd channel.
Signed-off-by: Maciej S. Szmigiero
---
include/migration/misc.h | 4 ++
migration/meson.build| 1 +
migration/multif
On Fri, Oct 11, 2024 at 5:05 AM Daniel Henrique Barboza
wrote:
>
> The helper is_kvm_aia() is checking not only for AIA, but for
> aplic-imsic (i.e. "aia=aplic-imsic" in 'virt' RISC-V machine) with an
> in-kernel chip present.
>
> Rename it to be a bit clear what the helper is doing since we'll ad
On Fri, Oct 11, 2024 at 5:04 AM Daniel Henrique Barboza
wrote:
>
> In create_fdt_sockets() we have the following pattern:
>
> if (kvm_enabled() && virt_use_kvm_aia(s)) {
> (... do stuff ...)
> } else {
> (... do other stuff ...)
> }
> if (kvm_enabled() && virt_use_k
On Fri, Oct 11, 2024 at 5:05 AM Daniel Henrique Barboza
wrote:
>
> Before adding support to kernel-irqchip=split when using KVM AIA we need
> to change how we create the in-kernel AIA device.
>
> In the use case we have so far, i.e. in-kernel irqchip without split
> mode, both the s-mode APLIC and
AP in armv7 short descriptor mode has 3 bits and also domain, which
makes it incompatible with other arm schemas.
To make it possible to share get_S1prot between armv8, armv7 long
format, armv7 short format and armv6 it's easier to make caller
decode AP.
Signed-off-by: Pavel Skripkin
---
target
Some hardware devices now support PCIe 5.0, so change the default
speed of the PCIe root port on new machine types.
For passthrough Nvidia H20, this will be able to increase the h2d/d2h
bandwidth ~17%.
Origin:
[CUDA Bandwidth Test] - Starting...
Running on...
Device 0: NVIDIA H20
Quick Mode
The dependant ISA features are enabled at the end of cpu_realize
in finalize_features. Thus, PMU init should be invoked after that
only. Move the init invocation to riscv_tcg_cpu_finalize_features.
Reviewed-by: Alistair Francis
Signed-off-by: Atish Patra
---
target/riscv/tcg/tcg-cpu.c | 28
On Fri, Oct 11, 2024 at 5:07 AM Daniel Henrique Barboza
wrote:
>
> The last step to enable KVM AIA aplic-imsic with irqchip in split mode
> is to deal with how MSIs are going to be sent. In our current design we
> don't allow an APLIC controller to send MSIs unless it's on m-mode. And
> we also do
On Fri, Oct 11, 2024 at 5:05 AM Daniel Henrique Barboza
wrote:
>
> Remove the 'irqchip_split()' restriction in kvm_arch_init() now that
> we have support for "-accel kvm,kernel-irqchip=split".
>
> Signed-off-by: Daniel Henrique Barboza
Reviewed-by: Alistair Francis
Alistair
> ---
> target/ri
On Fri, Oct 11, 2024 at 5:05 AM Daniel Henrique Barboza
wrote:
>
> Also add a new page, docs/specs/riscv-aia.rst, where we're documenting
> the state of AIA support in QEMU w.r.t the controllers being emulated or
> not depending on the AIA and accelerator settings.
>
> Signed-off-by: Daniel Henriq
On Fri, Oct 11, 2024 at 5:04 AM Daniel Henrique Barboza
wrote:
>
> Hi,
>
> This series adds AIA irqchip_split support, effective when using AIA
> with aia=aplic-imsic and -accel kvm,kernel-irqchip=split.
>
> The main difference between what we currently have and irqchip_split()
> mode is that, whe
On Mon, Oct 21, 2024 at 1:06 PM wrote:
>
> From: Tommy Wu
>
> Because the RNMI interrupt trap handler address is implementation defined.
> We add the 'rnmi-interrupt-vector' and 'rnmi-exception-vector' as the property
> of the harts. It’s very easy for users to set the address based on their
> ex
On Mon, Oct 21, 2024 at 1:05 PM wrote:
>
> From: Tommy Wu
>
> This patch adds a new instruction 'mnret'. 'mnret' is an M-mode-only
> instruction that uses the values in `mnepc` and `mnstatus` to return to the
> program counter, privilege mode, and virtualization mode of the
> interrupted context.
The counter delegation/configuration extensions depend on the following
extensions.
1. Smcdeleg - To enable counter delegation from M to S
2. S[m|s]csrind - To enable indirect access CSRs
Add an implied rule so that these extensions are enabled by default
if the sscfg extension is enabled.
Signe
On 15.11.24 22:55, Eric Blake wrote:
While testing the use of qemu-nbd in a Pod of a Kubernetes cluster, I
got LOTS of log messages of the forms:
qemu-nbd: option negotiation failed: Failed to read flags: Unexpected
end-of-file before all data were read
qemu-nbd: option negotiation failed: Fail
On 26.10.24 19:30, Vincent Vanlaer wrote:
Signed-off-by: Vincent Vanlaer
---
block/commit.c | 61 --
1 file changed, 34 insertions(+), 27 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index 078e54f51f..5c24c8b80a 100644
--- a/block/
On Sun, Nov 17, 2024, 12:14 PM Peter Maydell
wrote:
> On Sat, 16 Nov 2024 at 22:18, Manos Pitsidianakis
> wrote:
> >
> > DeviceId, which maps the peripheral and PCell registers of a PL011
> > device, was not treating each register value as a 32 bit value.
> >
> > Change DeviceId enum to return r
Il dom 17 nov 2024, 11:21 Manos Pitsidianakis <
manos.pitsidiana...@linaro.org> ha scritto:
> This seems extremely verbose and rather obscures the fact that these
>> registers are a set of adjacent simple ID registers, compared to
>> the previous code which defined them as an array of values.
>
>
On 11/16/24 19:41, Michael Tokarev wrote:
12.11.2024 23:37, Richard Henderson wrote:
Most binaries don't actually depend on more than page alignment,
but any binary can request it. Not honoring this was a bug.
This became obvious when gdb reported
Failed to read a valid object file image
This commit allows software to enable/disable both the receiver and the
transmitter through the CNTL register.
Signed-off-by: Ioan-Cristian CÎRSTEA
---
hw/char/bcm2835_aux.c | 50 +--
include/hw/char/bcm2835_aux.h | 3 ++-
2 files changed, 44 insertions(+
This commit implements the LSR register found in standard UART 16550.
Signed-off-by: Ioan-Cristian CÎRSTEA
---
hw/char/bcm2835_aux.c | 64 ---
include/hw/char/bcm2835_aux.h | 2 +-
2 files changed, 60 insertions(+), 6 deletions(-)
diff --git a/hw/char/bc
This commits implements the required logic for STAT & IIR registers. The
STAT register is an extension of the UART 16550 that provides useful
(more helpful than the base state register) insights of the peripheral
state. The STAT register is intrinsically related to the IIR register,
so this commit
This commit implements the required logic for receiver overrun and idle
bitfields in the STAT register. Currently, the receiver is always
reported as idle.
Signed-off-by: Ioan-Cristian CÎRSTEA
---
hw/char/bcm2835_aux.c | 26 --
1 file changed, 16 insertions(+), 10 deletio
The previous BCM2835 mini UART implementation used a hard-coded FIFO.
This commit changes the implementation by making use of the provided
Fifo8.
Signed-off-by: Ioan-Cristian CÎRSTEA
---
hw/char/bcm2835_aux.c | 61 ++-
include/hw/char/bcm2835_aux.h | 10 ++
This commit changes data transmission: instead of using the blocking
function `qemu_chr_fe_write_all()`, the transmit logic using the
asynchronous counterpart `qemu_chr_fe_write()`.
Signed-off-by: Ioan-Cristian CÎRSTEA
---
hw/char/bcm2835_aux.c | 110 ++
i
From: "Maciej S. Szmigiero"
It's possible for {load,save}_cleanup SaveVMHandlers to get called without
the corresponding {load,save}_setup handler being called first.
One such example is if {load,save}_setup handler of a proceeding device
returns error.
In this case the migration core cleanup co
From: "Maciej S. Szmigiero"
This QEMU_VM_COMMAND sub-command and its switchover_start SaveVMHandler is
used to mark the switchover point in main migration stream.
It can be used to inform the destination that all pre-switchover main
migration stream data has been sent/received so it can start to
From: "Maciej S. Szmigiero"
Implement the multifd device state transfer via additional per-device
thread inside save_live_complete_precopy_thread handler.
Switch between doing the data transfer in the new handler and doing it
in the old save_state handler depending on the
x-migration-multifd-tra
On Sat, 16 Nov 2024 at 22:18, Manos Pitsidianakis
wrote:
>
> DeviceId, which maps the peripheral and PCell registers of a PL011
> device, was not treating each register value as a 32 bit value.
>
> Change DeviceId enum to return register values via constified getter
> functions instead of leveragi
From: Peter Xu
The newly introduced device state buffer can be used for either storing
VFIO's read() raw data, but already also possible to store generic device
states. After noticing that device states may not easily provide a max
buffer size (also the fact that RAM MultiFDPages_t after all als
From: "Maciej S. Szmigiero"
The multifd received data needs to be reassembled since device state
packets sent via different multifd channels can arrive out-of-order.
Therefore, each VFIO device state packet carries a header indicating its
position in the stream.
The last such VFIO device state
From: "Maciej S. Szmigiero"
Some drivers might want to make use of auxiliary helper threads during VM
state loading, for example to make sure that their blocking (sync) I/O
operations don't block the rest of the migration process.
Add a migration core managed thread pool to facilitate this use c
From: "Maciej S. Szmigiero"
It's possible for load_cleanup SaveVMHandler to get called without
load_setup handler being called first.
Since we'll be soon running cleanup operations there that access objects
that need earlier initialization in load_setup let's make sure these
cleanups only run wh
From: "Maciej S. Szmigiero"
Some of these SaveVMHandlers were missing the BQL behavior annotation,
making people wonder what it exactly is.
Signed-off-by: Maciej S. Szmigiero
---
include/migration/register.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/include/migration/registe
From: "Maciej S. Szmigiero"
Migration code wants to manage device data sending threads in one place.
QEMU has an existing thread pool implementation, however it is limited
to queuing AIO operations only and essentially has a 1:1 mapping between
the current AioContext and the AIO ThreadPool in us
From: "Maciej S. Szmigiero"
This function name conflicts with one used by a future generic thread pool
function and it was only used by one test anyway.
Update the trace event name in thread_pool_submit_aio() accordingly.
Signed-off-by: Maciej S. Szmigiero
---
include/block/thread-pool.h |
From: "Maciej S. Szmigiero"
So it can be safety accessed from multiple threads.
Signed-off-by: Maciej S. Szmigiero
---
hw/vfio/migration.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 4b2b06b45195..683f2ae98d5e 100644
On Sun, Nov 17, 2024 at 9:40 AM Paolo Bonzini wrote:
>
>
>
> Il sab 16 nov 2024, 23:18 Manos Pitsidianakis
> ha scritto:
>>
>> -const PL011_ID_ARM: [c_uchar; 8] = [0x11, 0x10, 0x14, 0x00, 0x0d, 0xf0,
>> 0x05, 0xb1];
>> -const PL011_ID_LUMINARY: [c_uchar; 8] = [0x11, 0x00, 0x18, 0x01, 0x
We observed failing WXN tests in our OS which we tracked down to missing
WXN handling in qemu.
The problem was in that short descriptor format walker did not respect WXN
bit. To fix it, make it possible to call get_S1prot() from
get_phys_addr_v6().
Tested localy that all permission-related tests
To share missing SCTRL.{U}WXN and SCR.SIF in short format walker, use
get_S1prot instead of open-coded checks.
Signed-off-by: Pavel Skripkin
---
target/arm/ptw.c | 41 ++---
1 file changed, 18 insertions(+), 23 deletions(-)
diff --git a/target/arm/ptw.c b/tar
From: "Maciej S. Szmigiero"
And rename existing load_device_config_state trace event to
load_device_config_state_end for consistency since it is triggered at the
end of loading of the VFIO device config state.
This way both the start and end points of particular device config
loading operation (
From: "Maciej S. Szmigiero"
Read packet header first so in the future we will be able to
differentiate between a RAM multifd packet and a device state multifd
packet.
Since these two are of different size we can't read the packet body until
we know which packet type it is.
Signed-off-by: Maciej
From: "Maciej S. Szmigiero"
Add a basic support for receiving device state via multifd channels -
channels that are shared with RAM transfers.
Depending whether MULTIFD_FLAG_DEVICE_STATE flag is present or not in the
packet header either device state (MultiFDPacketDeviceState_t) or RAM
data (exi
From: "Maciej S. Szmigiero"
Automatic memory management helps avoid memory safety issues.
Signed-off-by: Maciej S. Szmigiero
---
migration/qemu-file.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index 11c2120edd72..fdf21324df07 100644
---
From: "Maciej S. Szmigiero"
These names conflict with ones used by future generic thread pool
equivalents.
Generic names should belong to the generic pool type, not specific (AIO)
type.
Signed-off-by: Maciej S. Szmigiero
---
include/block/aio.h | 8 ++---
include/block/thread-pool.h |
From: "Maciej S. Szmigiero"
Since device state transfer via multifd channels requires multifd
channels with packets and is currently not compatible with multifd
compression add an appropriate query function so device can learn
whether it can actually make use of it.
Signed-off-by: Maciej S. Szmi
From: "Maciej S. Szmigiero"
This way if there are fields there that needs explicit disposal (like, for
example, some attached buffers) they will be handled appropriately.
Add a related assert to multifd_set_payload_type() in order to make sure
that this function is only used to fill a previously
65 matches
Mail list logo