Hi Michael,
Thanks for your interest in contributing this!
(CC: +Naveen, +Keith, -linux-nvme)
Some observations and commets on your patch submission below.
Firstly, your mail delivery is broken - this is not getting through to
qemu-devel. Also, I don't think kernel developers have that much
int
在 2022/8/24 12:03, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
Update vhost_dev_virtqueue_restart() for vhost-user scenario.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/virtio/vhost.c | 26 ++
1 file changed, 22 insertions(+), 4 deletions(-)
d
在 2022/8/24 11:56, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
Update vhost_dev_virtqueue_stop() for vhost-user scenario.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/virtio/vhost.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/hw/virtio/vhost
在 2022/8/24 12:05, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
Update vhost_net_virtqueue_stop() for vhost-user scenario.
Let's explain why it is needed now or why it doesn't cause any issue
or it's a bug fix or not.
Thanks
This patch is to suppport vq reset for vhost-user.
We n
在 2022/8/20 01:13, Eugenio Pérez 写道:
It was returned as error before. Instead of it, simply update the
corresponding field so qemu can send it in the migration data.
Signed-off-by: Eugenio Pérez
---
Looks correct.
Adding Si Wei for double check.
Thanks
hw/net/virtio-net.c | 17 +
在 2022/8/20 01:13, Eugenio Pérez 写道:
Same way as with the MAC, restore the expected number of queues at
device's start.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa
在 2022/8/20 01:13, Eugenio Pérez 写道:
Since there may be many commands we need to issue to load the NIC
state, let's split them in individual functions
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
net/vhost-vdpa.c | 39 +--
1 file changed,
在 2022/8/16 09:06, Kangjie Xu 写道:
Host Kernel Patch:
https://github.com/middaywords/linux/commit/19a91e0d7167b2031e46078c6215c213b89cb2c3
Btw, this patch could be posted right now. Then it would be more easier
for people to try you series.
Thanks
在 2022/8/16 09:06, Kangjie Xu 写道:
The virtio queue reset function has already been defined in the virtio spec 1.2.
The relevant virtio spec information is here:
https://github.com/oasis-tcs/virtio-spec/issues/124
https://github.com/oasis-tcs/virtio-spec/issues/139
This patch set is
在 2022/8/16 09:06, Kangjie Xu 写道:
Update vhost_net_virtqueue_restart() for vhost-user scenario.
Similar to previous patch, let's explain why it it needed.
Thanks
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/net/vhost_net.c | 4
1 file changed, 4 insertions(+)
dif
在 2022/8/16 09:06, Kangjie Xu 写道:
Update vhost_net_virtqueue_stop() for vhost-user scenario.
Let's explain why it is needed now or why it doesn't cause any issue or
it's a bug fix or not.
Thanks
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/net/vhost_net.c | 4
1
在 2022/8/16 09:06, Kangjie Xu 写道:
Update vhost_dev_virtqueue_restart() for vhost-user scenario.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/virtio/vhost.c | 26 ++
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/vhost.c b/hw/v
在 2022/8/16 09:06, Kangjie Xu 写道:
Update vhost_dev_virtqueue_stop() for vhost-user scenario.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/virtio/vhost.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index fc3f55
在 2022/8/24 10:40, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce vhost_virtqueue_stop(), which can reset the virtqueue
in the device. Then it will unmap vrings and the desc of the
virtqueue.
This patch only considers the case for vhost-kernel, when
NetClientDriver is NET_CLIENT_
Hi Marc,
On 8/15/22 4:29 PM, Gavin Shan wrote:
There are three high memory regions, which are VIRT_HIGH_REDIST2,
VIRT_HIGH_PCIE_ECAM and VIRT_HIGH_PCIE_MMIO. Their base addresses
are floating on highest RAM address. However, they can be disabled
in several cases.
(1) One specific high memo
在 2022/8/24 10:53, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
The interface to set enable status for a single vring is lacked in
VhostOps, since the vhost_set_vring_enable_op will manipulate all
virtqueues in a device.
Resetting a single vq will rely on this interface.
Signed-off-by:
在 2022/8/24 10:50, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce the interface vhost_reset_vring(). The interface is a wrapper
to send a VHOST_USER_RESET_VRING message to the back-end. It will reset
an individual vring in the back-end. Meanwhile, it will wait for a reply
to ensur
在 2022/8/16 09:06, Kangjie Xu 写道:
The interface to set enable status for a single vring is lacked in
VhostOps, since the vhost_set_vring_enable_op will manipulate all
virtqueues in a device.
Resetting a single vq will rely on this interface.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
在 2022/8/24 10:44, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce vhost_net_virtqueue_restart(), which can restart the
virtqueue when the vhost net started running before. If it fails
to restart the virtqueue, the device will be stopped.
This patch only considers the case for vho
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce the interface vhost_reset_vring(). The interface is a wrapper
to send a VHOST_USER_RESET_VRING message to the back-end. It will reset
an individual vring in the back-end. Meanwhile, it will wait for a reply
to ensure the reset has been completed.
Sig
在 2022/8/24 10:40, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce vhost_virtqueue_stop(), which can reset the virtqueue
in the device. Then it will unmap vrings and the desc of the
virtqueue.
This patch only considers the case for vhost-kernel, when
NetClientDriver is NET_CLIENT_D
在 2022/8/16 09:06, Kangjie Xu 写道:
To support the reset operation for an individual virtqueue,
we introduce a new message VHOST_USER_RESET_VRING. This
message is submitted by the front-end to reset an individual
virtqueue to initial states in the back-end. The reply is
needed to ensure that the
在 2022/8/24 10:37, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce vhost_dev_virtqueue_restart(), which can restart the
virtqueue when the vhost has already started running.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/virtio/vhost.c | 13 +
i
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce vhost_net_virtqueue_restart(), which can restart the
virtqueue when the vhost net started running before. If it fails
to restart the virtqueue, the device will be stopped.
This patch only considers the case for vhost-kernel, when
NetClientDriver is N
在 2022/8/23 16:03, Kangjie Xu 写道:
在 2022/8/23 15:52, Jason Wang 写道:
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce vhost_dev_virtqueue_stop(), which can ummap the
vrings and the desc of it.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/virtio/vhost.c | 9 +
in
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce vhost_virtqueue_stop(), which can reset the virtqueue
in the device. Then it will unmap vrings and the desc of the
virtqueue.
This patch only considers the case for vhost-kernel, when
NetClientDriver is NET_CLIENT_DRIVER_TAP.
Signed-off-by: Kangjie
在 2022/8/16 09:06, Kangjie Xu 写道:
Introduce vhost_dev_virtqueue_restart(), which can restart the
virtqueue when the vhost has already started running.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/virtio/vhost.c | 13 +
include/hw/virtio/vhost.h | 2 ++
2
在 2022/8/24 02:30, Eugenio Pérez 写道:
CVQ of net vhost-vdpa devices can be intercepted since the addition of x-svq.
The virtio-net device model is updated. The migration was blocked because
although the state can be megrated between VMM it was not possible to restore
on the destination NIC.
Thi
在 2022/8/24 10:26, Jason Wang 写道:
On Sun, Aug 21, 2022 at 8:29 PM Zheyu Ma wrote:
The DMA engine is started by I/O access and then itself accesses the
I/O registers, triggering a reentrancy bug.
The following log can reveal it:
==5637==ERROR: AddressSanitizer: stack-overflow
#0 0x559543
On Sun, Aug 21, 2022 at 8:29 PM Zheyu Ma wrote:
>
> The DMA engine is started by I/O access and then itself accesses the
> I/O registers, triggering a reentrancy bug.
>
> The following log can reveal it:
> ==5637==ERROR: AddressSanitizer: stack-overflow
> #0 0x5595435f6078 in tulip_xmit_list_u
Hello,
I'm trying to use the QEMU NVMe userspace driver and I'm hitting an error when
trying to use more than one device from an IOMMU group:
Failed to open VFIO group file: /dev/vfio/39: Device or resource busy
If devices belong to different IOMMU groups, then it works as expected.
For ea
On Tue, 23 Aug 2022, Bernhard Beschow wrote:
On Tue, Aug 23, 2022 at 2:35 AM BALATON Zoltan wrote:
On Tue, 23 Aug 2022, Bernhard Beschow wrote:
The object creation now happens in chip-specific init methods which
allows the realize methods to be consolidated into one method. Shifting
the logic
On Tue, 23 Aug 2022, Bernhard Beschow wrote:
On Tue, Aug 23, 2022 at 2:20 AM BALATON Zoltan wrote:
On Tue, 23 Aug 2022, Bernhard Beschow wrote:
Signed-off-by: Bernhard Beschow
---
hw/isa/vt82c686.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/hw/isa/vt82c686
On Tue, 23 Aug 2022, Bernhard Beschow wrote:
On Tue, Aug 23, 2022 at 2:44 AM BALATON Zoltan wrote:
On Tue, 23 Aug 2022, Bernhard Beschow wrote:
Resolves duplicate code in the boards.
Signed-off-by: Bernhard Beschow
---
hw/isa/vt82c686.c | 16
hw/mips/fuloong2e.c | 4
Cache the translation from guest to host address, so we may
use direct loads when we hit on the primary translation page.
Look up the second translation page only once, during translation.
This obviates another lookup of the second page within tb_gen_code
after translation.
Fixes a bug in that pl
From: Ilya Leoshkevich
Right now translator stops right *after* the end of a page, which
breaks reporting of fault locations when the last instruction of a
multi-insn translation block crosses a page boundary.
Signed-off-by: Ilya Leoshkevich
Reviewed-by: Richard Henderson
Message-Id: <20220817
Pass these along to translator_loop -- pc may be used instead
of tb->pc, and host_pc is currently unused. Adjust all targets
at one time.
Acked-by: Alistair Francis
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
include/exec/exec-all.h | 1
The only user can easily use translator_lduw and
adjust the type to signed during the return.
Reviewed-by: Alistair Francis
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
include/exec/translator.h | 1 -
target/i386/tcg/translate.c | 2 +-
2 file
From: Ilya Leoshkevich
Right now translator stops right *after* the end of a page, which
breaks reporting of fault locations when the last instruction of a
multi-insn translation block crosses a page boundary.
An implementation, like the one arm and s390x have, would require an
i386 length disas
These will be useful in properly ending the TB.
Reviewed-by: Alistair Francis
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
target/riscv/translate.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/target/riscv/transla
Right now the translator stops right *after* the end of a page, which
breaks reporting of fault locations when the last instruction of a
multi-insn translation block crosses a page boundary.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1155
Reviewed-by: Alistair Francis
Acked-by: Ilya
From: Ilya Leoshkevich
Currently it's possible to execute pages that do not have PAGE_EXEC
if there is an existing translation block. Fix by clearing tb_jmp_cache
and invalidating TBs, which forces recheck of permission bits.
Signed-off-by: Ilya Leoshkevich
Message-Id: <20220817150506.592862-2-
Simplify the implementation of get_page_addr_code_hostp
by reusing the existing probe_access infrastructure.
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
accel/tcg/cputlb.c | 76 --
1 file changed, 26 in
It was non-obvious to me why we can raise an exception in
the middle of a comparison function, but it works.
While nearby, use TARGET_PAGE_ALIGN instead of open-coding.
Signed-off-by: Richard Henderson
---
accel/tcg/cpu-exec.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
di
From: Ilya Leoshkevich
Introduce a function that checks whether a given address is on the same
page as where disassembly started. Having it improves readability of
the following patches.
Reviewed-by: Alistair Francis
Signed-off-by: Ilya Leoshkevich
Message-Id: <20220811095534.241224-3-...@linu
We're about to start validating PAGE_EXEC, which means
that we've got to put this code into a section that is
both writable and executable.
Note that this test did not run on hardware beforehand either.
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
The function is not used outside of cpu-exec.c. Move it and
its subroutines up in the file, before the first use.
Reviewed-by: Alistair Francis
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
include/exec/exec-all.h | 3 -
accel/tcg/cpu-exec.c
The base qemu_ram_addr_from_host function is already in
softmmu/physmem.c; move the nofail version to be adjacent.
Reviewed-by: Alistair Francis
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
include/exec/cpu-common.h | 1 +
accel/tcg/cputlb.c
Map the stack executable if required by default or on demand.
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
include/elf.h| 1 +
linux-user/qemu.h| 1 +
linux-user/elfload.c | 19 ++-
3 files changed, 20 insertions(+),
We're about to start validating PAGE_EXEC, which means that we've
got to the vsyscall page executable. We had been special casing
this entirely within translate.
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
linux-user/elfload.c | 23 +
The current implementation is a no-op, simply returning addr.
This is incorrect, because we ought to be checking the page
permissions for execution.
Make get_page_addr_code inline for both implementations.
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Acked-by: Alistair Francis
Signed
The mmap_lock is held around tb_gen_code. While the comment
is correct that the lock is dropped when tb_gen_code runs out
of memory, the lock is *not* dropped when an exception is
raised reading code for translation.
Acked-by: Alistair Francis
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkev
Changes from v6:
* Fix an unintentional behaviour change in patches 8 & 12, which
had inspired the old patches 13 & 14 to fix (removed).
* Added a new documentation patch 13.
r~
Ilya Leoshkevich (4):
linux-user: Clear translations and tb_jmp_cache on mprotect()
accel/tcg: Introduce
We're about to start validating PAGE_EXEC, which means
that we've got to mark the commpage executable. We had
been placing the commpage outside of reserved_va, which
was incorrect and lead to an abort.
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
We're about to start validating PAGE_EXEC, which means that we've
got to mark page zero executable. We had been special casing this
entirely within translate.
Acked-by: Ilya Leoshkevich
Tested-by: Ilya Leoshkevich
Signed-off-by: Richard Henderson
---
linux-user/elfload.c | 34
On 8/23/22 09:04, Peter Maydell wrote:
Two small patches to armv7m_load_kernel(). The first is just getting
rid of some dead code, that I noticed while working on the function.
The second is to make boards pass armv7m_load_kernel() the base
address for loading guest (non-ELF) binaries. At the m
On Mon, 22 Aug 2022 at 06:24, Peter Maydell wrote:
>
> This patchset implements the Armv8.5 feature FEAT_PMUv3p5, which is
> a set of minor enhancements to the PMU:
> * EL2 and EL3 can now prohibit the cycle counter from counting
>when in EL2 or when Secure, using new MDCR_EL2.HCCD and
>M
On 8/19/22 04:00, Peter Maydell wrote:
The main aim of this patchset is to implement FEAT_ETS.
FEAT_ETS provides tighter guarantees on some memory orderings
involving translation table walks that permit guest code to
skip the context-synchronization event they would otherwise
need to do after a T
On 8/12/22 07:35, Enrik Berkhan wrote:
In more recent Raspbian OS Linux kernels, the fb driver gives up
immediately if RPI_FIRMWARE_FRAMEBUFFER_GET_NUM_DISPLAYS fails or no
displays are reported.
This change simply always reports one display. It makes bcm2835_fb work
again with these more recent
On 8/18/22 17:20, Hao Wu wrote:
Add cortex A35 core and enable it for virt board.
Signed-off-by: Hao Wu
Reviewed-by: Joe Komlodi
---
docs/system/arm/virt.rst | 1 +
hw/arm/virt.c| 1 +
target/arm/cpu64.c | 80
3 files changed, 8
Per the comment in s390_cpu_record_sigsegv, the saved address
is always page aligned.
Signed-off-by: Richard Henderson
---
target/s390x/tcg/mem_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index 4c0f8ba
This reverts commit db9aab5783a2fb62250e12f0c4cfed5e1778c189.
This patch breaks the contract of s390_probe_access, in that
it no longer returns an exception code, nor set __excp_addr.
Reported-by: David Hildenbrand
Signed-off-by: Richard Henderson
---
target/s390x/tcg/mem_helper.c | 18 +++
First, as pointed out by David; second by inspection.
I really wish there were a better way to structure this,
but alas, I don't see any alternatives that aren't just
different but similar amounts of ugly.
r~
Richard Henderson (2):
Revert "target/s390x: Use probe_access_flags in s390_probe_a
On 8/23/22 08:25, Alex Bennée wrote:
All of the QEMU tests eventually end up derrived from this class. Move
the default timeout from LinuxTest to ensure we catch them all. As 15
minutes is fairly excessive we drop the default down to 2 minutes
which is a more reasonable target for tests to aim fo
On 8/23/22 09:04, Peter Maydell wrote:
Currently armv7m_load_kernel() takes the size of the block of memory
where it should load the initial guest image, but assumes that it
should always load it at address 0. This happens to be true of all
our M-profile boards at the moment, but it isn't guaran
On 8/23/22 09:04, Peter Maydell wrote:
Arm system emulation targets always have TARGET_BIG_ENDIAN clear, so
there is no need to have handling in armv7m_load_kernel() for the
case when it is defined. Remove the unnecessary code.
Side notes:
* our M-profile implementation is always little-endia
On Thu, Aug 11, 2022 at 4:57 AM Atish Patra wrote:
>
> Historically, The mtime/mtimecmp has been part of the CPU because
> they are per hart entities. However, they actually belong to aclint
> which is a MMIO device.
>
> Move them to the ACLINT device. This also emulates the real hardware
> more c
The project has reached the magic size at which we see
/usr/aarch64-linux-gnu/lib/libc.a(init-first.o): in function
`__libc_init_first':
(.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against \
symbol `__environ' defined in .bss section in
/usr/aarch64-linux-gnu/lib/libc.
On Wed, Aug 24, 2022 at 5:19 AM Atish Kumar Patra wrote:
>
>
>
> On Mon, Aug 22, 2022 at 5:38 PM Alistair Francis wrote:
>>
>> On Wed, Aug 17, 2022 at 9:24 AM Atish Patra wrote:
>> >
>> > From: Atish Patra
>> >
>> > Qemu can monitor the following cache related PMU events through
>> > tlb_fill f
On Tue, Aug 23, 2022 at 08:31:03PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> On 8/23/22 01:23, Stefan Hajnoczi wrote:
> > The remainder of the patch series reworks the existing QEMU
> > bdrv_register_buf()
> > API so virtio-blk emulation efficiently map guest RAM for libblkio - some
> > libblki
On Tue, Aug 23, 2022 at 10:01:59AM +0200, David Hildenbrand wrote:
> On 23.08.22 00:24, Stefan Hajnoczi wrote:
> > Register guest RAM using BlockRAMRegistrar and set the
> > BDRV_REQ_REGISTERED_BUF flag so block drivers can optimize memory
> > accesses in I/O requests.
> >
> > This is for vdpa-blk
On Mon, Aug 22, 2022 at 5:38 PM Alistair Francis
wrote:
> On Wed, Aug 17, 2022 at 9:24 AM Atish Patra wrote:
> >
> > From: Atish Patra
> >
> > Qemu can monitor the following cache related PMU events through
> > tlb_fill functions.
> >
> > 1. DTLB load/store miss
> > 3. ITLB prefetch miss
> >
>
On 8/23/22 07:04, Kevin Wolf wrote:
The following changes since commit ba58ccbef60338d0b7334c714589a6423a3e7f91:
Merge tag 'for-7.1-hppa' of https://github.com/hdeller/qemu-hppa into
staging (2022-08-19 09:35:29 -0700)
are available in the Git repository at:
git://repo.or.cz/qemu/kevin.
On Tue, Aug 23, 2022 at 2:44 AM BALATON Zoltan wrote:
> On Tue, 23 Aug 2022, Bernhard Beschow wrote:
> > Resolves duplicate code in the boards.
> >
> > Signed-off-by: Bernhard Beschow
> > ---
> > hw/isa/vt82c686.c | 16
> > hw/mips/fuloong2e.c | 4
> > hw/ppc/pegasos2.c
We can restore the device state in the destination via CVQ now. Remove
the migration blocker.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
include/hw/virtio/vhost-vdpa.h | 1 -
hw/virtio/vhost-vdpa.c | 15 ---
net/vhost-vdpa.c | 2 --
3 files changed
On Tue, Aug 23, 2022 at 2:35 AM BALATON Zoltan wrote:
> On Tue, 23 Aug 2022, Bernhard Beschow wrote:
> > The object creation now happens in chip-specific init methods which
> > allows the realize methods to be consolidated into one method. Shifting
> > the logic into the init methods has the addi
This is needed so the destination vdpa device see the same state a the
guest set in the source.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
v9:
* Use guest acked features instead of device's.
* Constify vhost_vdpa and VirtIONet variables.
* Delete unneeded increment of cursor.
v8:
* D
From: Marc-André Lureau
If you specify a known backend but it isn't compiled in, or failed to
initialize, you get a simple warning and the "none" backend as a
fallback, and QEMU runs happily:
$ qemu-system-x86_64 -audiodev id=audio,driver=dsound
audio: Unknown audio driver `dsound'
audio: warnin
So we can reuse it to inject state messages.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
--
v7:
* Remove double free error
v6:
* Do not assume in buffer sent to the device is sizeof(virtio_net_ctrl_ack)
v5:
* Do not use an artificial !NULL VirtQueueElement
* Use only out size instead of
It allows per-net client operations right after device's successful
start. In particular, to load the device status.
Vhost-vdpa net will use it to add the CVQ buffers to restore the device
status.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
v5: Rename start / load, naming it more spec
On Tue, Aug 23, 2022 at 2:20 AM BALATON Zoltan wrote:
> On Tue, 23 Aug 2022, Bernhard Beschow wrote:
> > Signed-off-by: Bernhard Beschow
> > ---
> > hw/isa/vt82c686.c | 12 +++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
As this series will reuse them to restore the device state at the end of
a migration (or a device start), let's allocate only once at the device
start so we don't duplicate their map and unmap.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
v10: Solve conflict on vhost_iova_tree_remove ca
Since QEMU will be able to inject new elements on CVQ to restore the
state, we need not to depend on a VirtQueueElement to know if a new
element has been used by the device or not. Instead of check that, check
if there are new elements only using used idx on vhost_svq_flush.
Signed-off-by: Eugenio
Since we're going to allow SVQ to add elements without the guest's
knowledge and without its own VirtQueueElement, it's easier to check if
an element is a valid head checking a different thing than the
VirtQueueElement.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
hw/virtio/vhost-shado
Next patches will add a new info callback to restore NIC status through
CVQ. Since only the CVQ vhost device is needed, create it with a new
NetClientInfo.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
v5: Create a new NetClientInfo instead of reusing the dataplane one.
---
net/vhost-vd
As discussed in previous series [1], this memory barrier is useless with
the atomic read of used idx at vhost_svq_more_used. Deleting it.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-07/msg02616.html
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
hw/virtio/vhost-shadow-virt
CVQ of net vhost-vdpa devices can be intercepted since the addition of x-svq.
The virtio-net device model is updated. The migration was blocked because
although the state can be megrated between VMM it was not possible to restore
on the destination NIC.
This series add support for SVQ to inject ex
Used by the backend to perform actions after the device is stopped.
In particular, vdpa net use it to unmap CVQ buffers to the device,
cleaning the actions performed in prepare().
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
v9: Replace performend by performed in patch message
---
inc
This is used by the backend to perform actions before the device is
started.
In particular, vdpa net use it to map CVQ buffers to the device, so it
can send control commands using them.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
v9: Rename also in patch message
v8: Rename NetClientIn
It was easier to allow vhost_svq_add to handle the memory. Now that we
will allow qemu to add elements to a SVQ without the guest's knowledge,
it's better to handle it in the caller.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
hw/virtio/vhost-shadow-virtqueue.c | 10 --
1 file
We can unbind twice a file descriptor if we call twice
vhost_svq_set_svq_kick_fd because of this. Since it comes from vhost and
not from SVQ, that file descriptor could be a different thing that
guest's vhost notifier.
Likewise, it can happens the same if a guest start and stop the device
multiple
It's convenient to call iova_tree_remove from a map returned from
iova_tree_find or iova_tree_find_iova. With the current code this is not
possible, since we will free it, and then we will try to search for it
again.
Fix it making accepting the map by value, forcing a copy of the
argument. Not app
Reduce code duplication.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
hw/virtio/vhost-vdpa.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index e208dd000e..23ae5ef48b 100644
--- a/hw/virtio/vhost-v
If a map fails for whatever reason, it must not be saved in the tree.
Otherwise, qemu will try to unmap it in cleanup, leaving to more errors.
Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ")
Reported-by: Lei Yang
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
hw/virtio/
Collection of iova tree fixes detected preparing live migration with real
devices and multiqueue.
These cannot be triggered in simple setups (vdpa_sim_net, no display, no
device reset with different features) but it's possible to trigger them with
real devices or if the kernel fails some step like
Nothing actually reads the return value, but an error in cleaning some
entries could cause device stop to abort, making a restart impossible.
Better ignore explicitely the return value.
Reported-by: Lei Yang
Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ")
Signed-off-by: Eugenio P
Although the device will be reset before usage, the right thing to do is
to clean it.
Reported-by: Lei Yang
Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ")
Signed-off-by: Eugenio Pérez
---
v2:
* Call vhost_iova_tree_remove with the map as value.
* report_error on vhost_vdpa_dma_
Next patch will skip the registering of dma maps that the vdpa device
rejects in the iova tree. We need to consider that here or we cause a
SIGSEGV accessing result.
Reported-by: Lei Yang
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
hw/virtio/vhost-vdpa.c | 4
1 file changed, 4 i
On 8/23/22 05:58, Alexey Kardashevskiy wrote:
On 22/08/2022 20:30, Daniel Henrique Barboza wrote:
On 8/22/22 00:29, Alexey Kardashevskiy wrote:
On 22/08/2022 13:05, David Gibson wrote:
On Fri, Aug 19, 2022 at 06:42:34AM -0300, Daniel Henrique Barboza wrote:
On 8/18/22 23:11, Alexey
Hi everyone,
As some of you might have noticed, my email setup broke a little over
a month ago. At the time I was on leave, so did not notice for a
while. And upon my return, it turned out it had broken in New and
Exciting ways - so it took some time to restore.
This has now been achieved, and I
1 - 100 of 207 matches
Mail list logo