** Changed in: qemu
Status: Expired => Confirmed
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1802915
Title:
GTK display refresh rate is throttled
Status in QEMU:
Confirmed
Bug descript
On 10/28/21 2:08 PM, Philippe Mathieu-Daudé wrote:
The following commits added various user-mode tests
for various MSA instructions:
- 0fdd986a6c8 ("Add tests for MSA integer add instructions")
- 1be82d89011 ("Add tests for MSA integer average instructions")
- 1d336c87a3c ("Add tests for M
On 10/29/21 17:34, Markus Armbruster wrote:
> Eric Blake writes:
>
>> On Thu, Oct 28, 2021 at 12:25:16PM +0200, Markus Armbruster wrote:
>>> The generated visitor functions call visit_deprecated_accept() and
>>> visit_deprecated() when visiting a struct member with special feature
>>> flag 'depre
On 10/29/21 17:28, Eric Blake wrote:
> On Thu, Oct 28, 2021 at 12:25:17PM +0200, Markus Armbruster wrote:
>> The code to check command policy can see special feature flag
>> 'deprecated' as command flag QCO_DEPRECATED. I want to make feature
>> flag 'unstable' visible there as well, so I can add p
On 10/28/21 2:08 PM, Philippe Mathieu-Daudé wrote:
Convert instructions with an immediate bit index and
data format df/m to decodetree.
Since the 'data format' field is a constant value, use
tcg_constant_i32() instead of a TCG temporary.
Reviewed-by: Jiaxun Yang
Signed-off-by: Philippe Mathieu-
On 10/28/21 2:08 PM, Philippe Mathieu-Daudé wrote:
Convert 3-register floating-point or fixed-point operations
to decodetree.
Reviewed-by: Jiaxun Yang
Signed-off-by: Philippe Mathieu-Daudé
---
v3:
- Add plus_1(), extract DF in decoder
- Remove TRANS_MSA(), call check_msa_enabled in trans_X()
---
On 10/28/21 2:08 PM, Philippe Mathieu-Daudé wrote:
+@3r .. ... df:2 wt:5ws:5 wd:5 .. &msa_r
Nit: should this be called @3rf, since it includes df and...
+TRANS(SLD, trans_msa_3rf, gen_helper_msa_sld_df);
... you use trans_msa_3rf as the implementatio
On 10/28/21 2:08 PM, Philippe Mathieu-Daudé wrote:
Convert 3-register operations to decodetree.
Per the Encoding of Operation Field for 3R Instruction Format'
(Table 3.25), these instructions are not defined for the BYTE
format. Therefore the TRANS_DF_iii_b() macro returns 'false'
in that case,
In this series, we want to remove the AioContext lock and instead
use the already existent job_mutex to protect the job structures
and list. This is part of the work to get rid of AioContext lock
usage in favour of smaller granularity locks.
In patches 1-3-5-6-7, we split the job API in two header
job-monitor.h contains all functions of job.h that are used by the
monitor and essentially all functions that do not define a
JobDriver/Blockdriver.
Right now just move the headers, proper categorization and API
definition will come in the next commit.
No functional change intended.
Signed-off-b
job-common.h contains all struct and common function that currently
are in job.h and will be shared by job-monitor and job-driver in
the next commits.
No functional change intended.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/job-common.h | 300 +++
Categorize the fields in struct Job to understand which need
to be protected by the job muutex and which not.
Also move job_type() and job_type_str() there, as they are
common helper functions.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/job-common.h | 62
job mutex will be used to protect the job struct elements and list,
replacing AioContext locks.
Right now use a shared lock for all jobs, in order to keep things
simple. Once the AioContext lock is gone, we can introduce per-job
locks.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/
These functions assume that the job lock is held by the
caller, to avoid TOC/TOU conditions.
Introduce also additional helpers that define _locked
functions (useful when the job_mutex is globally applied).
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/job-monitor.h | 61 +++
Same as AIO_WAIT_WHILE macro, but if we are in the Main loop
do not release and then acquire ctx_ 's aiocontext.
Once all Aiocontext locks go away, this macro will replace
AIO_WAIT_WHILE.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/block/aio-wait.h | 15 +++
1 file changed
Instead of having the lock in job_tnx_apply, move it inside
in the callback. This will be helpful for next commits, when
we introduce job_lock/unlock pairs.
job_transition_to_pending() and job_needs_finalize() do not
need to be protected by the aiocontext lock.
No functional change intended.
Sig
job-driver.h contains all functions of job.h that are used by
the drivers (JobDriver, BlockJobDriver).
These functions are unaware of the job_mutex,
so they all will take and release the lock internally.
No functional change intended.
Signed-off-by: Emanuele Giuseppe Esposito
---
include/qemu/
find_block_job() and find_job() cannot be handled like
all other functions in the previous commit: in order
to avoid unneccessary job lock/unlock, replace the
aiocontext lock with the job_lock.
However, once we start dropping these aiocontex locks
we also break the assumptions of the callees in th
Now that we removed the aiocontext in find_* functions,
we need to remove it also in all other functions of the job API
that assumed the lock was held.
Therefore:
- when possible, remove completely the aiocontext lock/unlock pair
- if it is used by some other funcitons too, just leave the job API
job_event_* functions can be all static, as they are not used
outside job.c
Add also missing notifier initialization for the on_idle
list in job_create().
Signed-off-by: Emanuele Giuseppe Esposito
---
job.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/job.c
Based-on:
^ (hw/sh4: Codeing style fixes)
Continuing the clean up stared in previous series. This got big enough
for now so I'll wait until these are merged (hopefully before the
freeze) before going on so I don't have to carry them in my tree. Only
plan to submit another version if needed from r
Introduce the job locking mechanism through the whole job API,
following the comments and requirements of job-monitor (assume
lock is held) and job-driver (lock is not held).
At this point, we do not care if the job lock is inside or outside
the aiocontext. The aiocontext is going away and it is u
These functions will be useful when job_lock is globally applied,
as they will allow drivers to access the job struct fields
without worrying about the job lock.
Now that we are done with the job API header split, update also
the comments in blockjob.c (and move them in job.c).
Signed-off-by: Ema
In preparation to the job_lock/unlock patch, remove these
aiocontext locks.
The main reason these two locks are removed here is because
they are inside a loop iterating on the jobs list. Once the
job_lock is added, it will have to protect the whole loop,
wrapping also the aiocontext acquire/release
Add missing job synchronization in the unit tests, with
both explicit locks and helpers.
Signed-off-by: Emanuele Giuseppe Esposito
---
tests/unit/test-bdrv-drain.c | 40 +++---
tests/unit/test-block-iothread.c | 4 +++
tests/unit/test-blockjob-txn.c | 10 ++
tests/unit
Signed-off-by: BALATON Zoltan
Reviewed-by: Richard Henderson
---
hw/char/sh_serial.c | 13 ++-
hw/char/trace-events | 4 +++
hw/intc/sh_intc.c | 79 +++
hw/intc/trace-events | 8 +
hw/sh4/sh7750.c | 8 ++---
hw/sh4/trace-events |
Replace fprintf with qemu_log_mask LOG_GUEST_ERROR as the intention is
to handle valid accesses in these functions so if we get to these
errors then it's an invalid access. Do not abort as that would allow
the guest to crash QEMU and the practice in other devices is to not do
that just log and igno
Signed-off-by: BALATON Zoltan
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
---
hw/sh4/r2d.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 57ccae7249..72759413f3 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -26
Signed-off-by: BALATON Zoltan
---
hw/char/sh_serial.c | 29 +
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c
index 5ee93dc732..80a548d19d 100644
--- a/hw/char/sh_serial.c
+++ b/hw/char/sh_serial.c
@@ -381,18 +3
The sh_intc_register() function is only used at one place. Move them
together so it's easier to see what's going on.
Signed-off-by: BALATON Zoltan
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
---
hw/intc/sh_intc.c | 60 +++
1 fi
The INTC_A7 local macro does the same as the A7ADDR from
include/sh/sh.h so use the latter and drop the local macro definition.
Signed-off-by: BALATON Zoltan
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
hw/intc/sh_intc.c | 12 +---
1 file changed, 5 insertions
Instead of allocating timer with timer_new store it directly in the
state struct. This makes it simpler to free it together with the device.
Signed-off-by: BALATON Zoltan
---
hw/char/sh_serial.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/char/sh_serial.c b/
Turn the INTC_MODE defines into an enum and clean up the function
returning these to make it clearer by removing nested ifs and
superfluous parenthesis. The one remaining #define is a flag which is
moved further apart by changing its value from 8 to 0x80 to leave some
spare bits as this is or-ed wi
Rename the iomem region to "intc" from "interrupt-controller" which
makes the info mtree output less wide as it is already too wide
because of all the aliases. Also drop the format macro which was only
used twice in close proximity so we can just use the literal string
instead without a macro defin
Coding style says types should be camel case.
Signed-off-by: BALATON Zoltan
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
---
hw/char/sh_serial.c | 24 +++-
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/hw/char/sh_serial.c b/hw/char/sh
The INT_REG_PARAMS macro was only used a few times within one function
on adjacent lines and is actually more complex than writing out the
parameters so simplify it by expanding the macro at call sites and
dropping the #define.
Signed-off-by: BALATON Zoltan
Reviewed-by: Philippe Mathieu-Daudé
Re
Signed-off-by: BALATON Zoltan
---
hw/char/sh_serial.c | 98 +++--
hw/sh4/sh7750.c | 56 +++---
include/hw/sh4/sh.h | 9 +
3 files changed, 101 insertions(+), 62 deletions(-)
diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.
All the places that call abort should not happen which is better
marked by g_assert_not_reached.
Signed-off-by: BALATON Zoltan
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
---
hw/intc/sh_intc.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/hw
Normally there are at least two sh_serial instances. Add device id to
trace messages to make it clear which instance they belong to
otherwise its not possible to tell which serial device is accessed.
Signed-off-by: BALATON Zoltan
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson
The hw_error function calls abort and is not meant to be used by
devices. Use qemu_log_mask instead to log and ignore invalid accesses.
Also fix format strings to allow dropping type casts of hwaddr and use
__func__ instead of hard coding function name in the message which
were wrong in two cases.
Signed-off-by: BALATON Zoltan
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
---
hw/timer/sh_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c
index 02eb865908..cc7c1897a8 100644
--- a/hw/timer/sh_timer.c
++
Drop unneded parenthesis and split up one complex expression to write
it with less brackets so it's easier to follow.
Signed-off-by: BALATON Zoltan
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
---
hw/intc/sh_intc.c | 9 +
1 file changed, 5 insertions(+), 4 deletio
Use g_new0 instead of g_malloc0 and avoid some unneeded temporary
variable assignments.
Signed-off-by: BALATON Zoltan
---
hw/intc/sh_intc.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c
index eb58707e83..66d3a0f972 1006
Address of element i is one word thus clearer than array + i.
Signed-off-by: BALATON Zoltan
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
---
hw/intc/sh_intc.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/hw/intc/sh_int
It's more readable to keep things on one line if it fits the length limit.
Signed-off-by: BALATON Zoltan
Reviewed-by: Philippe Mathieu-Daudé
---
hw/timer/sh_timer.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c
index 2038a
According to coding style types should be camel case, also remove
unneded casts from void *.
Signed-off-by: BALATON Zoltan
Reviewed-by: Philippe Mathieu-Daudé
---
The tmu012_state is left for now, that's the real exported object with
SHTimerState being an internal object for a single timer. I'll
The sh_intc_locate function will either init these or not return so no
need to initialise them.
Signed-off-by: BALATON Zoltan
---
hw/intc/sh_intc.c | 21 ++---
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c
index 66d3a0f972..
Instead of if !expr continue else do something it is more straight
forward to say if expr then do something, especially if the action is
just a few lines. Remove such uses of continue to make the code easier
to follow.
Signed-off-by: BALATON Zoltan
Reviewed-by: Richard Henderson
---
hw/intc/sh_
On 10/28/21 11:59 AM, Thomas Huth wrote:
We recently bumped our minimum required version of GCC to 7.4
and Clang to 6.0, and those compiler versions should support
the __thread keyword already.
Signed-off-by: Thomas Huth
---
configure | 11 ---
1 file changed, 11 deletions(-)
Review
This function is very simple and provides no advantage. Call sites
become simpler without it so just write it in line and drop the
separate function.
Signed-off-by: BALATON Zoltan
---
hw/intc/sh_intc.c | 54 +++
hw/sh4/sh7750.c | 4 ++--
2 files cha
On Thu, Oct 28, 2021 at 05:09:11PM +0200, Philippe Mathieu-Daudé wrote:
> Respin of Yanan Wang v3, based on
> "hw/core: Restrict qdev-hotplug to sysemu"
>
> Based-on: 20211028150521.1973821-1-phi...@redhat.com
> https://lore.kernel.org/qemu-devel/20211028150521.1973821-1-phi...@redhat.com
>
> git
The timer memory region is only accessed via aliases that are 0x1000
bytes long, no need to have the timer region larger than that.
Signed-off-by: BALATON Zoltan
---
hw/timer/sh_timer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.
On 10/28/21 2:21 PM, Philippe Mathieu-Daudé wrote:
FCR0_HAS2008 flag has been enabled in commit ba5c79f2622
("target-mips: indicate presence of IEEE 754-2008 FPU in
R6/R5+MSA CPUs"), so remove the obsolete FIXME comment.
Signed-off-by: Philippe Mathieu-Daudé
---
target/mips/cpu-defs.c.inc | 1
On 10/28/21 2:08 PM, Philippe Mathieu-Daudé wrote:
Convert the COPY_U opcode (Element Copy to GPR Unsigned) to
decodetree.
Since the 'n' field is a constant value, use tcg_constant_i32()
instead of a TCG temporary.
Reviewed-by: Jiaxun Yang
Signed-off-by: Philippe Mathieu-Daudé
---
v2: Add NULL_
On 10/29/21 16:22, Damien Hedde wrote:
> Right now the allowance check for adding a sysbus device using
> -device cli option (or device_add qmp command) is done well after
> the device has been created. It is done during the machine init done
> notifier: machine_init_notify() in hw/core/machine.c
>
On 10/29/21 18:55, Markus Armbruster wrote:
> Markus Armbruster writes:
>
>> The code to check policy for handling deprecated input is triplicated.
>> Factor it out into compat_policy_input_ok() before I mess with it in
>> the next commit.
>>
>> Signed-off-by: Markus Armbruster
>> Reviewed-by: P
On 10/12/21 12:10, Taylor Simpson wrote:
> Build the infrastructure to create overrides for HVX instructions.
> We create a new empty file (gen_tcg_hvx.h) that will be populated
> in subsequent patches.
>
> Signed-off-by: Taylor Simpson
> ---
> target/hexagon/gen_tcg_hvx.h| 21 ++
The ticket has been re-opened here:
https://gitlab.com/qemu-project/qemu/-/issues/700
... so let's keep this one here closed, please.
** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #700
https://gitlab.com/qemu-project/qemu/-/issues/700
** Changed in: qemu
Status: Confirmed
On Thu, Oct 28, 2021 at 05:05:17PM +0200, Philippe Mathieu-Daudé wrote:
> Restrict various hw/core/ files to sysemu,
> add stubs for qdev-hotplug.
>
> Philippe Mathieu-Daudé (4):
> hw/core: Restrict sysemu specific files
> hw/core: Declare meson source set
> hw/core: Extract hotplug-related
Markus Armbruster writes:
> The code to check policy for handling deprecated input is triplicated.
> Factor it out into compat_policy_input_ok() before I mess with it in
> the next commit.
>
> Signed-off-by: Markus Armbruster
> Reviewed-by: Philippe Mathieu-Daudé
> ---
> include/qapi/compat-po
On 10/29/21 12:01 AM, yangxiaojuan wrote:
+env->CSR_CPUID = (cs->cpu_index & 0x1ff);
Any reason to have a copy of cpu_index, as opposed to just using that field?
CSR_CPUID is read-only after all.
Yes, we need this value, the uefi code read this CPUID when Start slave cores.
That's not
On 10/29/21 10:23 AM, Philippe Mathieu-Daudé wrote:
On 10/29/21 18:35, Richard Henderson wrote:
On 10/28/21 2:08 PM, Philippe Mathieu-Daudé wrote:
+@3r .. ... df:2 wt:5ws:5 wd:5 .. &msa_r
Nit: should this be called @3rf, since it includes df and...
"3R" is how the
On 10/29/21 18:35, Richard Henderson wrote:
> On 10/28/21 2:08 PM, Philippe Mathieu-Daudé wrote:
>> +@3r .. ... df:2 wt:5ws:5 wd:5 .. &msa_r
>
> Nit: should this be called @3rf, since it includes df and...
"3R" is how the manual names this instruction class:
Figure 3
On 10/29/21 16:22, Damien Hedde wrote:
> Add an early check to test if the requested sysbus device type
> is allowed by the current machine before creating the device. This
> impacts both -device cli option and device_add qmp command.
>
> Before this patch, the check was done well after the device
On 10/28/21 11:26 PM, yangxiaojuan wrote:
(1) For the iocsr registers, most of them act on the interrupt controller, the
read and write will go to interrupt's mmio read/write.
So I modified the addr to their mmio range. The ext interrupt controller use
the sysbus's function to handle the interr
On 10/28/21 9:32 PM, Richard Henderson wrote:
The following changes since commit c52d69e7dbaaed0ffdef8125e79218672c30161d:
Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20211027'
into staging (2021-10-27 11:45:18 -0700)
are available in the Git repository at:
https://g
On 10/26/21 20:09, Philippe Mathieu-Daudé wrote:
> When using the Loongson-3A4000 CPU, the MSAIR is returned with a
> zero value (because unimplemented). Checking on real hardware,
> this value appears incorrect:
>
> $ cat /proc/cpuinfo
> system type : generic-loongson-machine
> machine
On 10/28/21 23:21, Philippe Mathieu-Daudé wrote:
> FCR0_HAS2008 flag has been enabled in commit ba5c79f2622
> ("target-mips: indicate presence of IEEE 754-2008 FPU in
> R6/R5+MSA CPUs"), so remove the obsolete FIXME comment.
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> target/mips/cpu-defs.
On 10/29/21 19:34, Philippe Mathieu-Daudé wrote:
> On 10/29/21 16:22, Damien Hedde wrote:
>> Add an early check to test if the requested sysbus device type
>> is allowed by the current machine before creating the device. This
>> impacts both -device cli option and device_add qmp command.
>>
>> Befo
Implementation of RFC of device state capability:
https://lists.oasis-open.org/archives/virtio-comment/202012/msg5.html
With this capability, vdpa device can reset it's index so it can start
consuming from guest after disabling shadow virtqueue (SVQ), with state
not 0.
The use case is to test
Command to set shadow virtqueue mode.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 22 ++
net/vhost-vdpa.c | 6 ++
2 files changed, 28 insertions(+)
diff --git a/qapi/net.json b/qapi/net.json
index 7fab2e7cd8..b191b6787b 100644
--- a/qapi/net.json
+++ b/qapi/net.
This series enable shadow virtqueue (SVQ) for vhost-vdpa devices. This
is intended as a new method of tracking the memory the devices touch
during a migration process: Instead of relay on vhost device's dirty
logging capability, SVQ intercepts the VQ dataplane forwarding the
descriptors between VM
We need to know it to switch to Shadow VirtQueue and back to normal
operation.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 1 +
hw/virtio/vhost-vdpa.c | 5 +
2 files changed, 6 insertions(+)
diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-
Is needed so vhost-vdpa knows what to send to device as kick event fd.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 4
hw/virtio/vhost-shadow-virtqueue.c | 10 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-shadow-virtqueu
As qemu guidelines:
Unless a pointer is used to modify the pointed-to storage, give it the
"const" attribute.
In the particular case of iova_tree_find it allows to enforce what is
requested by its comment, since the compiler would shout in case of
modifying or freeing the const-qualified returned
The -1 assumes that all devices with no cvq have an spare vq allocated
for them, but with no offer of VIRTIO_NET_F_CTRL_VQ. This may not be the
case, and the device may have a pair number of queues.
To fix this, just resort to the lower even number of queues.
Fixes: 049eb15b5fc9 ("vhost: record t
If device supports host notifiers, this makes one jump less (kernel) to
deliver SVQ notifications to it.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 23 ++-
2 files changed, 24 insertions(+), 1 deletion(-)
This allows vhost-vdpa device to retrieve device -> svq call eventfd.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 12
2 files changed, 14 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio
Vhost shadow virtqueue (SVQ) is an intermediate jump for virtqueue
notifications and buffers, allowing qemu to track them. While qemu is
forwarding the buffers and virtqueue changes, is able to commit the
memory it's being dirtied, the same way regular qemu's VirtIO devices
do.
This commit only ex
So the guest can stop and start net device. It freely implements the RFC
https://lists.oasis-open.org/archives/virtio-comment/202012/msg00027.html
To stop (as "pause") the device is required to migrate status and vring
addresses between device and SVQ. Once the device is stopped, the driver
can re
This allows vhost-vdpa device to set SVQ -> guest notifier to SVQ.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 1 +
hw/virtio/vhost-shadow-virtqueue.c | 16
2 files changed, 17 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio
This function allow vhost-vdpa backend to override kick_fd.
There are a few pieces still missing, like the guest's kick handler in
SVQ, and how to handle the first set of kick file descriptor, that has
its own complexities. These will be added in next patches.
Signed-off-by: Eugenio Pérez
---
h
At this mode no buffer forwarding will be performed in SVQ mode: Qemu
will just forward the guest's kicks to the device.
Also, host notifiers must be disabled at SVQ start, and they will not
start if SVQ has been enabled when device is stopped. This will be
addressed in next patches.
Signed-off-b
We need to know it to switch to Shadow VirtQueue.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 2 ++
hw/virtio/vhost-vdpa.c | 5 +
2 files changed, 7 insertions(+)
diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h
index 6d60092c96..2f5
At this mode no buffer forwarding will be performed in SVQ mode: Qemu
just forward the guest's kicks to the device.
Shadow virtqueue notifications forwarding is disabled when vhost_dev
stops, so code flow follows usual cleanup.
Also, host notifiers must be disabled at SVQ start, and they will not
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 64f71bd51b..89d77f3452 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -758,16 +
This will make qemu aware of the device used buffers, allowing it to
write the guest memory with its contents if needed.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 15 +++
hw/virtio/vhost-vdpa.c | 13 +
2 files changed, 28 insertions
This iova tree function allows it to look for a hole in allocated
regions and return a totally new translation for a given translated
address.
It's usage is mainly to allow devices to access qemu address space,
remapping guest's one into a new iova space where qemu can add chunks of
addresses.
Si
This allows it to test if the guest has aknowledge an invalid transport
feature for SVQ. This will include packed vq layout, invalid descriptors
or event idx at the moment we start forwarding buffers.
We don't check for device features here since they will be re-negotiated
again. This allows SVQ t
This allows it to test if the guest has aknowledge an invalid transport
feature for SVQ. This will include packed vq layout or event_idx,
where VirtIO device needs help from SVQ.
There is not needed at this moment, but since SVQ will not re-negotiate
features again with the guest, a failure in ack
Track memory translations of devices with IOMMU (all vhost-vdpa
devices at the moment). It does not work if device has restrictions in
its iova range at the moment.
Updates to tree are protected by BQL, each one always run from main
event loop context.
Signed-off-by: Eugenio Pérez
---
include/h
It reports the shadow virtqueue address from qemu virtual address space.
Since this will be different from the guest's vaddr, but device can
access it, SVQ takes special care about its alignment & lack of garbage
data. It assumes that IOMMU will work in host_page_size ranges for
that.
Signed-off-
Use translations added in VhostIOVATree in SVQ.
Now every element needs to remember the iova / GPA address also, so
VirtQueue can consume the elements properly. This adds a little
overhead per VQ element, having to allocate more memory to stash them.
As a possible optimization, this allocation co
This is needed to enable or disable SVQ.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index c2580693b3..fc8396ba8a 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@
On 10/12/21 3:10 AM, Taylor Simpson wrote:
Signed-off-by: Taylor Simpson
---
target/hexagon/gen_tcg_hvx.h | 106 +++
1 file changed, 106 insertions(+)
Reviewed-by: Richard Henderson
r~
Initial version of shadow virtqueue that actually forward buffers. There
are no iommu support at the moment, and that will be addressed in future
patches of this series. Since all vhost-vdpa devices uses forced IOMMU,
this means that SVQ is not usable at this point of the series on any
device.
For
On 10/12/21 3:10 AM, Taylor Simpson wrote:
Signed-off-by: Taylor Simpson
---
target/hexagon/gen_tcg_hvx.h | 42 ++
1 file changed, 42 insertions(+)
Reviewed-by: Richard Henderson
r~
On 10/12/21 3:10 AM, Taylor Simpson wrote:
+void mem_vector_scatter_init(CPUHexagonState *env, int slot,
+ target_ulong base_vaddr,
+ int length, int element_size)
+{
+int i;
+
+for (i = 0; i < sizeof(MMVector); i++) {
+env->
This tree is able to look for a translated address from an IOVA address.
At first glance is similar to util/iova-tree. However, SVQ working on
devices with limited IOVA space need more capabilities, like allocating
IOVA chunks or perform reverse translations (qemu addresses to iova).
The allocati
On 10/12/21 3:11 AM, Taylor Simpson wrote:
Signe-off-by: Taylor Simpson
"Signed"
Reviewed-by: Richard Henderson
r~
101 - 200 of 448 matches
Mail list logo