[PATCH RFC 14/19] vfio_user: setup MSI/X interrupts and PCI config operations

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_USER_DEVICE_SET_IRQS to setup interrup configuration. vfio_pci_write_config/vfio_pci_read_config iforms the remote server of PCI config space reads and writes. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman ---

[PATCH RFC 15/19] vfio-user: vfio user device realize

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Setup INTx interrupts and a device region info cache for remote device info. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- include/hw/vfio/vfio-common.h | 1 + hw/vfio/common.c | 33 ++-

[PATCH RFC 13/19] vfio-user: respond to remote DMA read/write requests

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 16 hw/vfio/pci.c | 67 ++ hw/vfio/user.c | 21 +++- 3 files changed, 103

Re: [PATCH v3 0/5] hw/nvme: fix mmio read

2021-07-19 Thread Klaus Jensen
On Jul 14 08:01, Klaus Jensen wrote: > From: Klaus Jensen > > Fix mmio read issues on big-endian hosts. The core issue is that values > in the BAR is not stored in little endian as required. > > Fix that and add a regression test for this. This required a bit of > cleanup, so it blew up into a

Re: spapr_events: Sure we may ignore migrate_add_blocker() failure?

2021-07-19 Thread David Gibson
On Mon, Jul 19, 2021 at 09:18:07AM +0200, Markus Armbruster wrote: > David Gibson writes: > > > On Thu, Jul 15, 2021 at 03:32:06PM +0200, Markus Armbruster wrote: > >> Commit 2500fb423a "migration: Include migration support for machine > >> check handling" adds this: > >> > >> ret =

[PATCH 00/12] Clipboard fixes (for 6.1?)

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is a few fixes I have collected while working on clipboard-related code. There are some obvious code improvements/fixes, and better handling of release & unregister to avoid dangling pointers and improve user experience. Marc-André Lureau (12): ui/vdagent:

Re: [PATCH qemu] ppc/vof: Fix Coverity issues

2021-07-19 Thread Alexey Kardashevskiy
On 7/19/21 13:57, David Gibson wrote: On Tue, Jul 13, 2021 at 11:46:38PM +1000, Alexey Kardashevskiy wrote: This fixes NEGATIVE_RETURNS, OVERRUN issues reported by the Coverity. This adds a comment about the return parameters number in the VOF hcall. The reason for such counting is to keep

RE: [PULL V2 3/6] hmp-commands: Add new HMP command for filter passthrough

2021-07-19 Thread Zhang, Chen
> -Original Message- > From: Jason Wang > Sent: Thursday, July 15, 2021 12:21 PM > To: Zhang, Chen ; Dr. David Alan Gilbert > ; Markus Armbruster > Cc: qemu-dev ; Eric Blake > ; Daniel P. Berrangé ; Gerd > Hoffmann ; Li Zhijian ; Lukas > Straub > Subject: Re: [PULL V2 3/6]

Re: [PATCH 03/12] ui/gtk-clipboard: use existing macros

2021-07-19 Thread Philippe Mathieu-Daudé
On 7/19/21 9:26 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Rather than hardcoding strings Why not write a full sentence? It is only 3 words saved, and we could directly understand the comment without having to look at the subject. > > Signed-off-by: Marc-André Lureau

Re: [PATCH v5 3/5] block/nbd: refactor nbd_recv_coroutines_wake_all()

2021-07-19 Thread Vladimir Sementsov-Ogievskiy
17.07.2021 00:25, Eric Blake wrote: On Wed, Jul 14, 2021 at 07:59:14PM +0300, Vladimir Sementsov-Ogievskiy wrote: Split out nbd_recv_coroutine_wake(), as it will be used in separate. s/in separate/separately/ Also add a possibility to wake only first found sleeping coroutine.

Re: [PATCH 2/6] plugins/cache: limited the scope of a mutex lock

2021-07-19 Thread Alex Bennée
Mahmoud Mandour writes: > It's not necessary to lock the address translation portion of the > vcpu_mem_access callback. > > Signed-off-by: Mahmoud Mandour > --- > contrib/plugins/cache.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/contrib/plugins/cache.c

Re: [PATCH] hw/net/net_tx_pkt: Fix crash detected by fuzzer

2021-07-19 Thread Pankaj Gupta
> QEMU currently crashes when it's started like this: > > cat << EOF | ./qemu-system-i386 -device vmxnet3 -nodefaults -qtest stdio > outl 0xcf8 0x80001014 > outl 0xcfc 0xe0001000 > outl 0xcf8 0x80001018 > outl 0xcf8 0x80001004 > outw 0xcfc 0x7 > outl 0xcf8 0x80001083 > write 0x0 0x1 0xe1 > write

[PATCH RFC 19/19] vfio-user: add migration cli options and version negotiation

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- hw/vfio/user.h | 4 hw/vfio/pci.c | 5 + hw/vfio/user.c | 33 + 3 files changed, 42 insertions(+) diff --git a/hw/vfio/user.h

[PATCH RFC 16/19] vfio-user: pci reset

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_USER_DEVICE_RESET to reset remote device. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 1 + hw/vfio/pci.c | 29 ++--- hw/vfio/user.c | 12 3 files

Re: [PATCH v4 1/2] qdev-properties: Add a new macro with bitmask check for uint64_t property

2021-07-19 Thread Yang Weijiang
Hello, maintainers, Could you review this patch series kindly since the legacy LBR patches have been merged in 5.12 kernel tree? Thanks! On Sun, Jun 20, 2021 at 10:42:36AM +0800, Yang, Weijiang wrote: > The DEFINE_PROP_UINT64_CHECKMASK maro applies certain mask check agaist > user-supplied

Failing iotest 206

2021-07-19 Thread Thomas Huth
Hi, iotest 206 fails for me with: $ ./check -qcow2 206 QEMU -- ".../tests/qemu-iotests/../../qemu-system-x86_64" -nodefaults -display none -accel qtest QEMU_IMG -- ".../tests/qemu-iotests/../../qemu-img" QEMU_IO -- ".../tests/qemu-iotests/../../qemu-io" --cache writeback

Re: [PATCH v2 02/21] docs: collect the disparate device emulation docs into one section

2021-07-19 Thread Alex Bennée
Markus Armbruster writes: > Cc: QOM maintainers for additional eyes. > > Alex Bennée writes: > >> While we are at it add a brief preamble that explains some of the >> common concepts in QEMU's device emulation which will hopefully lead >> to less confusing about our dizzying command line

[PULL V3 for 6.2 3/6] hmp-commands: Add new HMP command for filter passthrough

2021-07-19 Thread Zhang Chen
Add hmp_passthrough_filter_add and hmp_passthrough_filter_del make user can maintain object network passthrough list in human monitor Signed-off-by: Zhang Chen --- hmp-commands.hx | 26 ++ include/monitor/hmp.h | 2 ++ monitor/hmp-cmds.c| 63

Re: [PATCH] qtest/hyperv: Introduce a simple hyper-v test

2021-07-19 Thread Vitaly Kuznetsov
Andrew Jones writes: > On Fri, Jul 16, 2021 at 02:55:28PM +0200, Vitaly Kuznetsov wrote: >> For the beginning, just test 'hv-passthrough' and a couple of custom >> Hyper-V enlightenments configurations through QMP. Later, it would >> be great to complement this by checking CPUID values from

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-19 Thread Stefan Hajnoczi
On Fri, Jul 16, 2021 at 05:23:50PM +0200, Kevin Wolf wrote: > Am 13.07.2021 um 15:10 hat Stefan Hajnoczi geschrieben: > > AIO_WAIT_WHILE() requires that AioContext is acquired according to its > > documentation, but I'm not sure that's true anymore. Thread-safe/atomic > > primitives are used by

[PATCH RFC 12/19] vfio-user: probe remote device's BARs

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[PATCH RFC 09/19] vfio-user: get device info and get irq info

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_USER_DEVICE_GET_INFO and VFIO_USER_DEVICE_GET_IRQ_INFO commands. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 27 +++ hw/vfio/pci.c | 32

RE: [PATCH 2/2] ui/gtk-egl: blitting partial guest fb to the proper scanout surface

2021-07-19 Thread Kasireddy, Vivek
Hi DW, > eb_fb_blit needs more parameters which describe x and y offsets and width > and height of the actual scanout to specify the size and cordination of > partial image to blit in the guest fb in case the guest fb contains multiple > display outputs. > > Signed-off-by: Dongwon Kim > --- >

Re: spapr_events: Sure we may ignore migrate_add_blocker() failure?

2021-07-19 Thread Markus Armbruster
David Gibson writes: > On Thu, Jul 15, 2021 at 03:32:06PM +0200, Markus Armbruster wrote: >> Commit 2500fb423a "migration: Include migration support for machine >> check handling" adds this: >> >> ret = migrate_add_blocker(spapr->fwnmi_migration_blocker, _err); >> if (ret == -EBUSY) {

[PATCH 01/12] ui/vdagent: fix leak on error path

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau info is leaked if more than 10 entries Signed-off-by: Marc-André Lureau --- include/ui/clipboard.h | 2 ++ ui/vdagent.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index

[PATCH 08/12] ui/vdagent: split clipboard recv message handling

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 157 +-- 1 file changed, 89 insertions(+), 68 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index bce9f44b7b..f716f2d8c3 100644 --- a/ui/vdagent.c +++

[PATCH 11/12] ui/vdagent: send release when no clipboard owner

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index 65c9663e0d..34e1c332ee 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -345,6 +345,24 @@

[PATCH 06/12] ui/clipboard: release owned grabs on unregister

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/clipboard.c | 9 + 1 file changed, 9 insertions(+) diff --git a/ui/clipboard.c b/ui/clipboard.c index 56c14509fe..a9512f01a7 100644 --- a/ui/clipboard.c +++ b/ui/clipboard.c @@ -13,6 +13,15 @@ void

Re: [PATCH v3 08/13] target/avr: Advance pc in avr_tr_breakpoint_check

2021-07-19 Thread Philippe Mathieu-Daudé
On 7/18/21 12:18 AM, Richard Henderson wrote: > Since 0b00b0c1e05b, tb->size must not be zero. > Advance pc so that the breakpoint covers the insn at the bp. > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/489 > Signed-off-by: Richard Henderson > --- > target/avr/translate.c | 1 + >

Re: Initialize RAM from a file and save it to the file

2021-07-19 Thread Philippe Mathieu-Daudé
Hi Hiroko, On 7/19/21 11:34 AM, Hiroko Shimizu wrote: > Hello,  > I'd like to initialize RAM from a specific file when RAM is created. > Then,  I tried using memory_region_init_ram_from_file(). To load a file after the machine is created and before the VM is started I use the 'generic loader

Re: [PATCH 2/3] iothread: add aio-max-batch parameter

2021-07-19 Thread Stefano Garzarella
On Tue, Jul 13, 2021 at 03:51:15PM +0100, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 05:00:18PM +0200, Stefano Garzarella wrote: diff --git a/qapi/misc.json b/qapi/misc.json index 156f98203e..f64bb69f74 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -86,6 +86,9 @@ # @poll-shrink: how

[PATCH RFC 10/19] vfio-user: device region read/write

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_REGION_READ and VFIO_REGION_WRITE commands. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 16 hw/vfio/common.c | 17 +++-- hw/vfio/pci.c| 13 +

[PATCH RFC 17/19] vfio-user: probe remote device ROM BAR

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 38 ++ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[PATCH RFC 11/19] vfio-user: get region and DMA map/unmap operations

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_USER_DEVICE_GET_REGION_INFO to get device regions and VFIO_USER_DMA_MAP/UNMAP to tell remote server the DMA addresses it can access. Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/vfio/user.h

[PATCH RFC 00/19] vfio-user implementation

2021-07-19 Thread Elena Ufimtseva
Hi We are happy to introduce the next stage of the multi-process QEMU project[1]. vfio-user is a protocol that allows a device to be emulated in a separate process outside of QEMU. It encapsulates the messages sent from QEMU to the kernel VFIO driver, and sends them to a remote process over a

[PATCH 04/12] ui/gtk-clipboard: fix clipboard enum typo

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index 5e817ae55c..2c78de9500 100644 --- a/ui/gtk-clipboard.c +++ b/ui/gtk-clipboard.c @@ -155,7 +155,7 @@

[PATCH 09/12] ui/vdagent: use qemu_clipboard_info helper

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index f716f2d8c3..65c9663e0d 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -47,7 +47,6 @@

Re: [PATCH qemu] ppc/vof: Fix Coverity issues

2021-07-19 Thread Greg Kurz
On Tue, 13 Jul 2021 23:46:38 +1000 Alexey Kardashevskiy wrote: > This fixes NEGATIVE_RETURNS, OVERRUN issues reported by the Coverity. > > This adds a comment about the return parameters number in the VOF hcall. > The reason for such counting is to keep the numbers look the same in >

Re: [PATCH v3 0/5] hw/nvme: fix mmio read

2021-07-19 Thread Stefan Hajnoczi
On Mon, Jul 19, 2021 at 08:43:33AM +0200, Klaus Jensen wrote: > On Jul 14 08:01, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Fix mmio read issues on big-endian hosts. The core issue is that values > > in the BAR is not stored in little endian as required. > > > > Fix that and add a

Re: [PATCH] gitlab-ci: Remove the second superfluous macos task

2021-07-19 Thread Daniel P . Berrangé
On Mon, Jul 19, 2021 at 09:30:51AM +0200, Thomas Huth wrote: > While there might have been bigger differnces between the -base and > the -xcode images in the beginning, they almost vanished in the > current builds, e.g. when comparing the output of the "configure" > step after cleaning up the

Re: [PATCH v3 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-19 Thread Peter Maydell
On Wed, 14 Jul 2021 at 07:01, Klaus Jensen wrote: > > From: Klaus Jensen > > The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to > make up the 64 bit logical PMRMSC register. > > Make it so. > > Signed-off-by: Klaus Jensen > --- > include/block/nvme.h | 31

[PATCH RFC 18/19] vfio-user: migration support

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Send migration region operations to remote server. Send VFIO_USER_USER_DIRTY_PAGES to get remote dirty bitmap. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 17 +++ hw/vfio/common.c

[PATCH 05/12] ui/clipboard: add helper to retrieve current clipboard

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- include/ui/clipboard.h | 9 + ui/clipboard.c | 15 +++ 2 files changed, 24 insertions(+) diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index eb789a285a..e9fcb15c66 100644 ---

[PATCH 02/12] ui/vdagent: remove copy-pasta comment

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index f6ef8d1993..5ae5734c81 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -516,7 +516,7 @@ static void

[PULL V3 for 6.2 6/6] net/net.c: Add handler for passthrough filter command

2021-07-19 Thread Zhang Chen
Use the connection protocol,src port,dst port,src ip,dst ip as the key to passthrough certain network traffic in object with network packet processing function. Signed-off-by: Zhang Chen --- net/net.c | 199 +- 1 file changed, 197

[PULL V3 for 6.2 5/6] net/colo-compare: Add passthrough list to CompareState

2021-07-19 Thread Zhang Chen
Add passthrough list for each CompareState. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28 net/colo-compare.h | 12 2 files changed, 40 insertions(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index dcd24bb113..64e72c82f1 100644 ---

Re: [PULL V3 for 6.2 0/6] COLO-Proxy patches for 2021-06-25

2021-07-19 Thread Peter Maydell
On Mon, 19 Jul 2021 at 10:10, Zhang Chen wrote: > > Hi Jason, > > Please help to queue COLO-proxy patches to net branch. Hi Chen; for this kind of pull request that isn't intended to go directly into master, could I ask you to follow the notes in

Re: [PATCH for 6.1 1/2] ui/gtk: add a keyboard fifo to the VTE consoles

2021-07-19 Thread Daniel P . Berrangé
On Sun, Jul 18, 2021 at 02:00:03PM +0100, Peter Maydell wrote: > On Sun, 18 Jul 2021 at 08:50, Volker Rümelin wrote: > > > > Since commit 8eb13bbbac ("ui/gtk: vte: fix sending multiple > > characeters") it's very easy to lock up QEMU with the gtk ui. > > If you configure a guest with a serial

Re: [PATCH v3 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-19 Thread Klaus Jensen
On Jul 19 10:13, Peter Maydell wrote: > On Wed, 14 Jul 2021 at 07:01, Klaus Jensen wrote: > > > > From: Klaus Jensen > > > > The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to > > make up the 64 bit logical PMRMSC register. > > > > Make it so. > > > > Signed-off-by: Klaus

Re: [PATCH] target/ppc: Ease L=0 requirement on cmp/cmpi/cmpl/cmpli for ppc32

2021-07-19 Thread BALATON Zoltan
On Mon, 19 Jul 2021, David Gibson wrote: On Thu, Jul 15, 2021 at 09:29:50AM -0300, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst In commit 8f0a4b6a9, we started to require L=0 for ppc32 to match what The Programming Environments Manual say: "For 32-bit implementations, the L field

[PATCH RFC 06/19] vfio-user: negotiate protocol with remote server

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Send version and capabilities and validate reply. Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/vfio/user.h | 8 ++ hw/vfio/pci.c | 10 +++ hw/vfio/user.c | 223 +

[PATCH RFC 05/19] vfio-user: connect vfio proxy to remote server

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 2 ++ hw/vfio/pci.c | 16 ++ hw/vfio/user.c | 87 ++ 3 files changed, 105 insertions(+) diff

[PATCH RFC 02/19] vfio-user: add VFIO base abstract class

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Add an abstract base class both the kernel driver and user socket implementations can use to share code. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/pci.h | 25 ++-- hw/vfio/pci.c | 63

[PATCH 07/12] ui/vdagent: unregister clipboard peer on finalize

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vdagent.c b/ui/vdagent.c index 5ae5734c81..bce9f44b7b 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -782,6 +782,7 @@ static void vdagent_chr_fini(Object *obj)

[PATCH] gitlab-ci: Remove the second superfluous macos task

2021-07-19 Thread Thomas Huth
While there might have been bigger differnces between the -base and the -xcode images in the beginning, they almost vanished in the current builds, e.g. when comparing the output of the "configure" step after cleaning up the differences due to temporary path names, I only get: $ diff -u

[PULL V3 for 6.2 0/6] COLO-Proxy patches for 2021-06-25

2021-07-19 Thread Zhang Chen
Hi Jason, Please help to queue COLO-proxy patches to net branch. Thanks Chen The following changes since commit fd79f89c76c8e2f409dd9db5d7a367b1f64b6dc6: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210718' into staging (2021-07-18 13:46:39 +0100) are available in

[PULL V3 for 6.2 1/6] qapi/net: Add IPFlowSpec and QMP command for filter passthrough

2021-07-19 Thread Zhang Chen
Since the real user scenario does not need to monitor all traffic. Add passthrough-filter-add and passthrough-filter-del to maintain a network passthrough list in object with network packet processing function. Add IPFlowSpec struct for all QMP commands. Most the fields of IPFlowSpec are

[PULL V3 for 6.2 4/6] net/colo-compare: Move data structure and define to .h file.

2021-07-19 Thread Zhang Chen
Rename structure with COLO index and move it to .h file, It make other modules can reuse COLO code. Signed-off-by: Zhang Chen --- net/colo-compare.c | 132 - net/colo-compare.h | 86 + 2 files changed, 109 insertions(+),

Re: [PATCH v3 3/5] hw/nvme: fix out-of-bounds reads

2021-07-19 Thread Peter Maydell
On Wed, 14 Jul 2021 at 07:01, Klaus Jensen wrote: > > From: Klaus Jensen > > Peter noticed that mmio access may read into the NvmeParams member in > the NvmeCtrl struct. > > Fix the bounds check. > > Reported-by: Peter Maydell > Signed-off-by: Klaus Jensen > --- > hw/nvme/ctrl.c | 27

Re: [PATCH 3/6] plugins/cache: Fixed a use-after-free bug with multithreaded usermode

2021-07-19 Thread Alex Bennée
Mahmoud Mandour writes: > Since callbacks may be interleaved because of multithreaded execution, > we should not make assumptions about `plugin_exit` either. The problem > with `plugin_exit` is that it frees shared data structures (caches and > `miss_ht` hash table). It should not be assumed

Re: [PATCH v3 4/5] hw/nvme: fix mmio read

2021-07-19 Thread Peter Maydell
On Wed, 14 Jul 2021 at 07:01, Klaus Jensen wrote: > > From: Klaus Jensen > > The new PMR test unearthed a long-standing issue with MMIO reads on > big-endian hosts. > > Fix this by unconditionally storing all controller registers in little > endian. > > Cc: Gollu Appalanaidu > Reported-by:

RE: [PATCH 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts

2021-07-19 Thread Kasireddy, Vivek
Hi DW, > When guest is running Linux/X11 with extended multiple displays mode enabled, > the guest shares one scanout resource each time containing whole surface > rather than sharing individual display output separately. This extended frame > is properly splited and rendered on the corresponding

[PATCH RFC 08/19] vfio-user: VFIO container setup & teardown

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Create SW-emulated containers and groups for vfio-user in lieu of the host IOMMU based ones used by the kernel driver VFIO implementation. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/hw/vfio/vfio-common.h |

[PATCH RFC 04/19] vfio-user: Define type vfio_user_pci_dev_info

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson New class for vfio-user with its class and instance constructors and destructors. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 49 + 1 file changed, 49

[PATCH RFC 03/19] vfio-user: define VFIO Proxy and communication functions

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Add user.c and user.h files for vfio-user with the basic send and receive functions. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user.h| 120 ++ include/hw/vfio/vfio-common.h | 2

[PATCH RFC 07/19] vfio-user: define vfio-user pci ops

2021-07-19 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 8ca1431cca..388b7d82d7 100644 ---

[PATCH RFC 01/19] vfio-user: introduce vfio-user protocol specification

2021-07-19 Thread Elena Ufimtseva
From: Thanos Makatos This patch introduces the vfio-user protocol specification (formerly known as VFIO-over-socket), which is designed to allow devices to be emulated outside QEMU, in a separate process. vfio-user reuses the existing VFIO defines, structs and concepts. This patch is sourced

[PATCH 03/12] ui/gtk-clipboard: use existing macros

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Rather than hardcoding strings Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index bff28d2030..5e817ae55c 100644 --- a/ui/gtk-clipboard.c +++

[PATCH 12/12] ui/gtk-clipboard: emit release clipboard events

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index 4e4b3c52bb..16b2e2063e 100644 --- a/ui/gtk-clipboard.c +++ b/ui/gtk-clipboard.c @@ -144,7

[PATCH 10/12] ui/gtk-clipboard: use qemu_clipboard_info helper

2021-07-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- include/ui/gtk.h | 1 - ui/gtk-clipboard.c | 14 ++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/ui/gtk.h b/include/ui/gtk.h index 9516670ebc..60e9cdc39c 100644 --- a/include/ui/gtk.h +++

Re: [PATCH v3 3/5] hw/nvme: fix out-of-bounds reads

2021-07-19 Thread Stefan Hajnoczi
On Wed, Jul 14, 2021 at 08:01:23AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Peter noticed that mmio access may read into the NvmeParams member in > the NvmeCtrl struct. > > Fix the bounds check. > > Reported-by: Peter Maydell > Signed-off-by: Klaus Jensen > --- > hw/nvme/ctrl.c |

[PULL V3 for 6.2 2/6] util/qemu-sockets.c: Add inet_parse_base to handle InetSocketAddressBase

2021-07-19 Thread Zhang Chen
No need to carry the flag all the time in many scenarios. Signed-off-by: Zhang Chen --- include/qemu/sockets.h | 1 + util/qemu-sockets.c| 14 ++ 2 files changed, 15 insertions(+) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 0c34bf2398..3a0f8fa8f2 100644

Re: [PATCH 1/6] plugins/cache: Fixed a bug with destroying FIFO metadata

2021-07-19 Thread Alex Bennée
Mahmoud Mandour writes: > This manifests itself when associativity degree is greater than the > number of sets and FIFO is used, otherwise it's also a memory leak > whenever FIFO was used. > > Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée > --- > contrib/plugins/cache.c | 2 +- >

[PULL 0/5] Misc fixes for 6.1

2021-07-19 Thread Thomas Huth
Hi Peter! The following changes since commit fd79f89c76c8e2f409dd9db5d7a367b1f64b6dc6: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210718' into staging (2021-07-18 13:46:39 +0100) are available in the Git repository at: https://gitlab.com/thuth/qemu.git

Re: [PATCH 3/6] plugins/cache: Fixed a use-after-free bug with multithreaded usermode

2021-07-19 Thread Alex Bennée
Mahmoud Mandour writes: > On Mon, Jul 19, 2021 at 11:48 AM Alex Bennée wrote: > > Mahmoud Mandour writes: > > > Since callbacks may be interleaved because of multithreaded execution, > > we should not make assumptions about `plugin_exit` either. The problem > > with `plugin_exit` is that

[PATCH v4 03/33] qom: Add memory-backend-epc ObjectOptions support

2021-07-19 Thread Yang Zhong
Add the new 'memory-backend-epc' user creatable QOM object in the ObjectOptions to support SGX since v6.1, or the sgx backend object cannot bootup. Signed-off-by: Yang Zhong v1-->v2: - Added the new MemoryBackendEpcProperties and related documents, and updated the blurb(Eric Blake). ---

[PATCH v4 05/33] vl: Add sgx compound properties to expose SGX EPC sections to guest

2021-07-19 Thread Yang Zhong
From: Sean Christopherson Because SGX EPC is enumerated through CPUID, EPC "devices" need to be realized prior to realizing the vCPUs themselves, i.e. long before generic devices are parsed and realized. From a virtualization perspective, the CPUID aspect also means that EPC sections cannot be

[PATCH v4 23/33] sgx-epc: Add the reset interface for sgx-epc virt device

2021-07-19 Thread Yang Zhong
If the VM is reset, we need make sure sgx virt epc in clean status. Once the VM is reset, and sgx epc virt device will be reseted by reset callback registered by qemu_register_reset(). Since this epc virt device depend on backend, this reset will call backend reset interface to re-mmap epc to

[PATCH v4 32/33] sgx-epc: Add the fill_device_info() callback support

2021-07-19 Thread Yang Zhong
Since there is no fill_device_info() callback support, and when we execute "info memory-devices" command in the monitor, the segfault will be found. This patch will add this callback support and "info memory-devices" will show sgx epc memory exposed to guest. The result as below: qemu) info

[PATCH v4 24/33] sgx-epc: Avoid bios reset during sgx epc initialization

2021-07-19 Thread Yang Zhong
Since bios do the reset when qemu boot up, and sgx epc will be reset by the registered reset callback function. Like this, the sgx epc will do two times initialization. This patch will check protected mode from cr0 register, and will bypass reset operation from bios. The reset callback will only

Re: [PATCH 3/6] plugins/cache: Fixed a use-after-free bug with multithreaded usermode

2021-07-19 Thread Mahmoud Mandour
On Mon, Jul 19, 2021 at 1:08 PM Alex Bennée wrote: > > Mahmoud Mandour writes: > > > On Mon, Jul 19, 2021 at 11:48 AM Alex Bennée > wrote: > > > > Mahmoud Mandour writes: > > > > > Since callbacks may be interleaved because of multithreaded execution, > > > we should not make assumptions

Re: [PATCH v3 08/10] accel/tcg: Expand ATOMIC_MMU_LOOKUP_*

2021-07-19 Thread Peter Maydell
On Sat, 17 Jul 2021 at 20:24, Richard Henderson wrote: > > Unify the parameters of atomic_mmu_lookup between cputlb.c and > user-exec.c. Call the function directly, and remove the macros. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 1/4] target-arm: Introduce ARM_FEATURE_A64FX

2021-07-19 Thread Peter Maydell
On Fri, 16 Jul 2021 at 06:27, Shuuichirou Ishii wrote: > > This function is used to distinguish HPC extensions in the Fujitsu A64FX > processor. > > HPC (High Performance Computing) extensions are A64FX processor-specific > features > that are implemented to improve application performance for

Re: [PATCH 3/4] tests/arm-cpu-features: Add A64FX processor related tests

2021-07-19 Thread Peter Maydell
On Fri, 16 Jul 2021 at 06:27, Shuuichirou Ishii wrote: > > Signed-off-by: Shuuichirou Ishii > --- > tests/qtest/arm-cpu-features.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c > index 8252b85..979c6f8 100644 > ---

Re: [PATCH 01/13] plugins: allow plugin arguments to be passed directly

2021-07-19 Thread Alex Bennée
Mahmoud Mandour writes: > Passing arguments to plugins had to be done through "arg=". > This is redundant and introduces confusion especially when the argument > has a name and value (e.g. `-plugin plugin_name,arg="argname=argvalue"`). > > This allows passing plugin arguments directly e.g: > >

Re: [PATCH v3 0/9] tests: Add test cases for TPM 1.2 ACPI tables

2021-07-19 Thread Markus Armbruster
Igor Mammedov writes: > On Thu, 15 Jul 2021 07:49:13 +0200 > Markus Armbruster wrote: > >> Philippe Mathieu-Daudé writes: >> >> > On 7/14/21 4:43 PM, Markus Armbruster wrote: >> >> Philippe Mathieu-Daudé writes: >> >> >> >>> +Markus >> >> [...] >> >> >>> IMO the "right" solution is

Re: [PATCH v8 9/9] qtest/hyperv: Introduce a simple hyper-v test

2021-07-19 Thread Igor Mammedov
On Fri, 16 Jul 2021 14:12:06 +0200 Vitaly Kuznetsov wrote: > Igor Mammedov writes: > > > On Thu, 8 Jul 2021 17:02:22 -0400 > > Eduardo Habkost wrote: > > > >> On Tue, Jun 08, 2021 at 02:08:17PM +0200, Vitaly Kuznetsov wrote: > >> > For the beginning, just test 'hv-passthrough' and a

Re: [RFC PATCH] tcg/plugins: implement a qemu_plugin_user_exit helper

2021-07-19 Thread Alex Bennée
Alex Bennée writes: > In user-mode emulation there is a small race between preexit_cleanup > and exit_group() which means we may end up calling instrumented > instructions before the kernel reaps child threads. To solve this we > implement a new helper which ensures the callbacks are flushed

[PATCH v2] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-07-19 Thread Denis Plotnikov
On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging and VHOST_USER_SET_VRING_ADDR per each started ring to enable "used ring" data logging. The issue

Re: [PATCH 02/13] plugins/api: added a boolean parsing plugin api

2021-07-19 Thread Alex Bennée
Mahmoud Mandour writes: > This call will help boolean argument parsing since arguments are now > passed to plugins as a name and value. > > Signed-off-by: Mahmoud Mandour > --- > include/qemu/qemu-plugin.h | 13 + > plugins/api.c | 5 + > 2 files changed, 18

[PULL 1/5] ci: build & store windows installer

2021-07-19 Thread Thomas Huth
From: Gerd Hoffmann Build windows installer for qemu in gitlab CI, store the result as artifact. Signed-off-by: Gerd Hoffmann Reviewed-by: Willian Rampazzo Reviewed-by: Thomas Huth Message-Id: <20210623091137.1156959-2-kra...@redhat.com> Signed-off-by: Thomas Huth ---

Re: [PATCH 3/3] linux-aio: limit the batch size using `aio-max-batch` parameter

2021-07-19 Thread Stefano Garzarella
On Tue, Jul 13, 2021 at 03:58:04PM +0100, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 05:00:19PM +0200, Stefano Garzarella wrote: @@ -371,7 +375,7 @@ static int laio_do_submit(int fd, struct qemu_laiocb *laiocb, off_t offset, s->io_q.in_queue++; if (!s->io_q.blocked &&

[PATCH 2/2] qom: use correct field name when getting/setting alias properties

2021-07-19 Thread Paolo Bonzini
Alias targets have a different name than the alias property itself (e.g. a machine's pflash0 might be an alias of a property named 'drive'). When the target's getter or setter invokes the visitor, it will use a different name than what the caller expects, and the visitor will not be able to find

[PATCH v4 00/33] Qemu SGX virtualization

2021-07-19 Thread Yang Zhong
Since Sean Christopherson has left Intel and i am responsible for Qemu SGX upstream work. His @intel.com address will be bouncing and his new email( sea...@google.com) is also in CC lists. This series is Qemu SGX virtualization implementation rebased on latest Qemu release. The numa support for

[PATCH v4 06/33] i386: Add primary SGX CPUID and MSR defines

2021-07-19 Thread Yang Zhong
From: Sean Christopherson Add CPUID defines for SGX and SGX Launch Control (LC), as well as defines for their associated FEATURE_CONTROL MSR bits. Define the Launch Enclave Public Key Hash MSRs (LE Hash MSRs), which exist when SGX LC is present (in CPUID), and are writable when SGX LC is

[PATCH v4 11/33] i386: Add feature control MSR dependency when SGX is enabled

2021-07-19 Thread Yang Zhong
From: Sean Christopherson SGX adds multiple flags to FEATURE_CONTROL to enable SGX and Flexible Launch Control. Signed-off-by: Sean Christopherson Signed-off-by: Yang Zhong --- target/i386/kvm/kvm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target/i386/kvm/kvm.c

[PATCH v4 07/33] i386: Add SGX CPUID leaf FEAT_SGX_12_0_EAX

2021-07-19 Thread Yang Zhong
From: Sean Christopherson CPUID leaf 12_0_EAX is an Intel-defined feature bits leaf enumerating the CPU's SGX capabilities, e.g. supported SGX instruction sets. Currently there are four enumerated capabilities: - SGX1 instruction set, i.e. "base" SGX - SGX2 instruction set for dynamic

[PATCH v4 09/33] i386: Add SGX CPUID leaf FEAT_SGX_12_1_EAX

2021-07-19 Thread Yang Zhong
From: Sean Christopherson CPUID leaf 12_1_EAX is an Intel-defined feature bits leaf enumerating the platform's SGX capabilities that may be utilized by an enclave, e.g. whether or not an enclave can gain access to the provision key. Currently there are six capabilities: - INIT: set when the

[PATCH v4 22/33] hostmem-epc: Add the reset interface for EPC backend reset

2021-07-19 Thread Yang Zhong
Add the sgx_memory_backend_reset() interface to handle EPC backend reset when VM is reset. This reset function will destroy previous backend memory region and re-mmap the EPC section for guest. Signed-off-by: Yang Zhong --- backends/hostmem-epc.c | 16 include/hw/i386/pc.h |

[PATCH v4 25/33] hostmem-epc: Make prealloc consistent with qemu cmdline during reset

2021-07-19 Thread Yang Zhong
If qemu cmdline set the prealloc property for sgx epc and VM do the reset the prealloc property will be different with cmdline settings. This patch can make sure same prealloc property setting with cmdline. Signed-off-by: Yang Zhong --- backends/hostmem-epc.c | 10 ++ 1 file changed, 10

  1   2   3   4   >