[PATCH 1/2] util/compatfd.c: Fixed style issues

2021-03-15 Thread Mahmoud Mandour
Fixed two styling issues that caused checkpatch.pl errors. Signed-off-by: Mahmoud Mandour --- util/compatfd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/compatfd.c b/util/compatfd.c index ee47dd8089..174f394533 100644 --- a/util/compatfd.c +++

[PATCH 2/2] util/compatfd.c: Replaced a malloc call with g_malloc.

2021-03-15 Thread Mahmoud Mandour
Replaced a call to malloc() and its respective call to free() with g_malloc() and g_free(). g_malloc() is preferred more than g_try_* functions, which return NULL on error, when the size of the requested allocation is small. This is because allocating few bytes should not be a problem in a

Re: [PATCH 8/8] tools/virtiofsd: Replacing malloc-like calls with GLib's variants

2021-03-15 Thread Mahmoud Mandour
On Mon, Mar 15, 2021 at 12:01 PM Stefan Hajnoczi wrote: > On Sun, Mar 14, 2021 at 05:23:24AM +0200, Mahmoud Mandour wrote: > > @@ -130,7 +130,7 @@ static struct fuse_req *fuse_ll_alloc_req(struct > fuse_session *se) > > { > > struct fuse_req *req; > > > > -req = (struct fuse_req

Re: [PATCH v3] Add missing initialization for g_autofree variables

2021-03-15 Thread Cornelia Huck
On Mon, 15 Mar 2021 11:13:52 +0100 mreza...@redhat.com wrote: > From: Miroslav Rezanina > > When declaring g_autofree variable without inicialization, compiler > will raise "may be used uninitialized in this function" warning due > to automatic free handling. > > This is mentioned in

Re: [PATCH v2 5/7] vhost-user: Introduce nested event loop in vhost_user_read()

2021-03-15 Thread Stefan Hajnoczi
On Fri, Mar 12, 2021 at 10:22:10AM +0100, Greg Kurz wrote: > A deadlock condition potentially exists if a vhost-user process needs > to request something to QEMU on the slave channel while processing a > vhost-user message. > > This doesn't seem to affect any vhost-user implementation so far, but

Re: [PATCH v2 4/7] vhost-user: Convert slave channel to QIOChannelSocket

2021-03-15 Thread Stefan Hajnoczi
On Fri, Mar 12, 2021 at 10:22:09AM +0100, Greg Kurz wrote: > The slave channel is implemented with socketpair() : QEMU creates > the pair, passes one of the socket to virtiofsd and monitors the > other one with the main event loop using qemu_set_fd_handler(). > > In order to fix a potential

Re: [PATCH] net/macos: implement vmnet-based netdev

2021-03-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210315103209.20870-1-akihiko.od...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210315103209.20870-1-akihiko.od...@gmail.com Subject: [PATCH] net/macos: implement

Re: [PATCH v2 3/7] vhost-user: Factor out duplicated slave_fd teardown code

2021-03-15 Thread Stefan Hajnoczi
On Fri, Mar 12, 2021 at 10:22:08AM +0100, Greg Kurz wrote: > Signed-off-by: Greg Kurz > --- > hw/virtio/vhost-user.c | 19 ++- > 1 file changed, 10 insertions(+), 9 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v2 2/7] vhost-user: Fix double-close on slave_read() error path

2021-03-15 Thread Stefan Hajnoczi
On Fri, Mar 12, 2021 at 10:22:07AM +0100, Greg Kurz wrote: > Some message types, e.g. VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG, > can convey file descriptors. These must be closed before returning > from slave_read() to avoid being leaked. This can currently be done > in two different places: > >

Re: [PATCH v2 1/7] vhost-user: Drop misleading EAGAIN checks in slave_read()

2021-03-15 Thread Stefan Hajnoczi
On Fri, Mar 12, 2021 at 10:22:06AM +0100, Greg Kurz wrote: > slave_read() checks EAGAIN when reading or writing to the socket > fails. This gives the impression that the slave channel is in > non-blocking mode, which is certainly not the case with the current > code base. And the rest of the code

[PATCH] net/macos: implement vmnet-based netdev

2021-03-15 Thread Akihiko Odaki
From: Phillip Tennen This patch implements a new netdev device, reachable via -netdev vmnet-macos, that’s backed by macOS’s vmnet framework. The vmnet framework provides native bridging support, and its usage in this patch is intended as a replacement for attempts to use a tap device via the

Re: [PATCH v2 01/13] net: Add ETH_ZLEN define in eth.h

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 11:15 AM, Bin Meng wrote: > Hi Philippe, > > On Mon, Mar 15, 2021 at 5:13 PM Philippe Mathieu-Daudé > wrote: >> >> On 3/15/21 8:57 AM, Bin Meng wrote: >>> Add a new macro ETH_ZLEN which represents the minimum size of an >>> Ethernet frame without FCS. >>> >>> Signed-off-by: Bin Meng

Re: [PATCH v3 14/16] hw/ppc: Use hreg_store_msr for msr updates

2021-03-15 Thread Cédric Le Goater
On 3/14/21 6:59 PM, Richard Henderson wrote: > Only one of the three places in hw/ppc that modify msr updated > hflags. Even in that case, use the official interface instead > of a direct call to hreg_compute_hflags. ppc_store_msr() is the interface to use. > Signed-off-by: Richard Henderson >

Re: [PATCH v2 02/13] net: Add a 'do_not_pad" to NetClientState

2021-03-15 Thread Peter Maydell
On Mon, 15 Mar 2021 at 10:17, Bin Meng wrote: > > Hi Philippe, > > On Mon, Mar 15, 2021 at 5:22 PM Philippe Mathieu-Daudé > wrote: > > > > On 3/15/21 10:18 AM, Philippe Mathieu-Daudé wrote: > > > On 3/15/21 10:17 AM, Philippe Mathieu-Daudé wrote: > > >> On 3/15/21 8:57 AM, Bin Meng wrote: > >

Re: [PATCH v3] Add missing initialization for g_autofree variables

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 11:13 AM, mreza...@redhat.com wrote: > From: Miroslav Rezanina > > When declaring g_autofree variable without inicialization, compiler Typo "initialization" > will raise "may be used uninitialized in this function" warning due > to automatic free handling. > > This is mentioned in

Re: [PATCH v2 02/13] net: Add a 'do_not_pad" to NetClientState

2021-03-15 Thread Bin Meng
Hi Philippe, On Mon, Mar 15, 2021 at 5:22 PM Philippe Mathieu-Daudé wrote: > > On 3/15/21 10:18 AM, Philippe Mathieu-Daudé wrote: > > On 3/15/21 10:17 AM, Philippe Mathieu-Daudé wrote: > >> On 3/15/21 8:57 AM, Bin Meng wrote: > >>> This adds a flag in NetClientState, so that a net client can

Re: [PATCH v2 01/13] net: Add ETH_ZLEN define in eth.h

2021-03-15 Thread Bin Meng
Hi Philippe, On Mon, Mar 15, 2021 at 5:13 PM Philippe Mathieu-Daudé wrote: > > On 3/15/21 8:57 AM, Bin Meng wrote: > > Add a new macro ETH_ZLEN which represents the minimum size of an > > Ethernet frame without FCS. > > > > Signed-off-by: Bin Meng > > --- > > > > include/net/eth.h | 1 + > > 1

Re: [PATCH] ui/cocoa: Do not raise keys before QEMU resigns active

2021-03-15 Thread Akihiko Odaki
2021年3月15日(月) 16:32 Gerd Hoffmann : > > On Sun, Mar 14, 2021 at 04:01:47PM +0900, Akihiko Odaki wrote: > > ui/cocoa used to raise all keys before it resigns active to prevent a > > stuck key problem caused by key up events it does not see while it is > > inactive. The problem is solved by checking

[PATCH v3] Add missing initialization for g_autofree variables

2021-03-15 Thread mrezanin
From: Miroslav Rezanina When declaring g_autofree variable without inicialization, compiler will raise "may be used uninitialized in this function" warning due to automatic free handling. This is mentioned in docs/devel/style.rst (quote from section "Automatic memory deallocation"): *

Re: [RFC PATCH 4/8] qtest/fuzz: Restrict CPU I/O instructions

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 6:14 AM, Thomas Huth wrote: > On 15/03/2021 00.29, Philippe Mathieu-Daudé wrote: >> Restrict CPU I/O instructions to architectures providing >> I/O bus. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >>   tests/qtest/fuzz/generic_fuzz.c   | 16 ++-- >>  

Re: [Virtio-fs] [PATCH 3/3] virtiofsd: Don't allow empty filenames

2021-03-15 Thread Greg Kurz
On Sun, 14 Mar 2021 19:36:04 -0400 Vivek Goyal wrote: > On Fri, Mar 12, 2021 at 03:10:03PM +0100, Greg Kurz wrote: > > POSIX.1-2017 clearly stipulates that empty filenames aren't > > allowed ([1] and [2]). Since virtiofsd is supposed to mirror > > the host file system hierarchy and the host can

Re: [PATCH 8/8] tools/virtiofsd: Replacing malloc-like calls with GLib's variants

2021-03-15 Thread Stefan Hajnoczi
On Sun, Mar 14, 2021 at 05:23:24AM +0200, Mahmoud Mandour wrote: > @@ -130,7 +130,7 @@ static struct fuse_req *fuse_ll_alloc_req(struct > fuse_session *se) > { > struct fuse_req *req; > > -req = (struct fuse_req *)calloc(1, sizeof(struct fuse_req)); > +req = g_try_new(struct

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-15 Thread Max Reitz
On 12.03.21 19:43, Vladimir Sementsov-Ogievskiy wrote: 12.03.2021 21:15, Max Reitz wrote: On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH v16 00/23] i386 cleanup PART 2

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 10:44 AM, Claudio Fontana wrote: > Hi Philippe, > > On 3/14/21 1:00 AM, Philippe Mathieu-Daudé wrote: >> Hi Claudio, >> >> I am looking at this code: >> >> $ git grep tcg_ softmmu/physmem.c >> softmmu/physmem.c:153:static void >> tcg_log_global_after_sync(MemoryListener *listener); >>

Re: [PULL 00/16] Net patches

2021-03-15 Thread Philippe Mathieu-Daudé
On Mon, Mar 15, 2021 at 9:10 AM Jason Wang wrote: > 在 2021/3/15 下午1:39, Thomas Huth 写道: > > On 14/03/2021 12.37, Peter Maydell wrote: > >> On Fri, 12 Mar 2021 at 06:16, Jason Wang wrote: > >>> > >>> The following changes since commit > >>> f4abdf32714d1845b7c01ec136dd2b04c2f7db47: > >>> > >>>

Re: [PATCH 7/8] tools/virtiofsd/fuse_opt.c: Replaced a malloc with GLib's g_try_malloc

2021-03-15 Thread Stefan Hajnoczi
On Sun, Mar 14, 2021 at 05:23:23AM +0200, Mahmoud Mandour wrote: > Replaced a malloc() call and its respective free() with > GLib's g_try_malloc() and g_free() calls. > > Signed-off-by: Mahmoud Mandour > --- > tools/virtiofsd/fuse_opt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2

[PULL 1/1] virtio-blk: Respect discard granularity

2021-03-15 Thread Stefan Hajnoczi
From: Akihiko Odaki Report the configured granularity for discard operation to the guest. If this is not set use the block size. Since until now we have ignored the configured discard granularity and always reported the block size, let's add 'report-discard-granularity' property and disable it

Re: [PATCH 6/8] tools/virtiofsd/buffer.c: replaced a calloc call with GLib's g_try_new0

2021-03-15 Thread Stefan Hajnoczi
On Sun, Mar 14, 2021 at 05:23:22AM +0200, Mahmoud Mandour wrote: > Replaced a call to calloc() and its respective free() call > with GLib's g_try_new0() and g_free() calls. > > Signed-off-by: Mahmoud Mandour > --- > tools/virtiofsd/buffer.c | 4 ++-- > 1 file changed, 2 insertions(+), 2

[PULL 0/1] Block patches

2021-03-15 Thread Stefan Hajnoczi
The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.0-pull-= request' into staging (2021-03-14 17:47:49 +) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git

Re: [PATCH v16 00/23] i386 cleanup PART 2

2021-03-15 Thread Claudio Fontana
Hi Philippe, On 3/14/21 1:00 AM, Philippe Mathieu-Daudé wrote: > Hi Claudio, > > On 2/4/21 5:39 PM, Claudio Fontana wrote: >> v15 -> v16: >> >> * cpu: Move synchronize_from_tb() to tcg_ops: >> - adjusted comments (Alex) >> >> * cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass:

Re: [PATCH] Hexagon (target/hexagon) remove unnecessary semicolons

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 5:55 AM, Taylor Simpson wrote: > Address feedback from Richard Henderson < > Reported-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Taylor Simpson > --- > target/hexagon/gen_tcg.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff

Re: [PATCH v3 27/30] hmp: QAPIfy object_add

2021-03-15 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/03/21 14:28, Markus Armbruster wrote: >> Kevin Wolf writes: >> >>> This switches the HMP command object_add from a QemuOpts-based parser to >>> user_creatable_add_from_str() which uses a keyval parser and enforces >>> the QAPI schema. >>> >>> Apart from being a

Re: [PATCH v7 0/2] target/s390x: Implement the MVPG condition-code-option bit

2021-03-15 Thread Thomas Huth
On 15/03/2021 09.54, David Hildenbrand wrote: Based on work from Richard and Thomas. v6 -> v7: - "target/s390x: Implement the MVPG condition-code-option bit" -- Fix PGM_PROTECTION for QEMU_USER_ONLY (overridden by patch #2) I just double-checked my version of the MVPG kvm-unit-test and some

Re: [PATCH v2 02/13] net: Add a 'do_not_pad" to NetClientState

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 10:18 AM, Philippe Mathieu-Daudé wrote: > On 3/15/21 10:17 AM, Philippe Mathieu-Daudé wrote: >> On 3/15/21 8:57 AM, Bin Meng wrote: >>> This adds a flag in NetClientState, so that a net client can tell >>> its peer that the packets do not need to be padded to the minimum >>> size of an

[PULL V2 17/20] tests: Add tests for query-netdev command

2021-03-15 Thread Jason Wang
From: Alexey Kirillov A simply qtest that checks for correct number of netdevs in the response of the query-netdev. Signed-off-by: Alexey Kirillov Acked-by: Thomas Huth Signed-off-by: Jason Wang --- tests/qtest/meson.build | 3 + tests/qtest/test-query-netdev.c | 120

Re: [PATCH v2] edid: add support for DisplayID extension (5k resolution)

2021-03-15 Thread m...@knazarov.com
The change to edid_checksum is needed because the DisplayID section has another checksum inside for the actually used part of its 128-byte extension block. The checksum in this case uses the same algorithm, but for a shorter block. Thus I added a parameter to specify the size of the block.

[PULL V2 15/20] pvrdma: wean code off pvrdma_ring.h kernel header

2021-03-15 Thread Jason Wang
From: Cornelia Huck The pvrdma code relies on the pvrdma_ring.h kernel header for some basic ring buffer handling. The content of that header isn't very exciting, but contains some (q)atomic_*() invocations that (a) cause manual massaging when doing a headers update, and (b) are an indication

[PULL V2 20/20] net: Do not fill legacy info_str for backends

2021-03-15 Thread Jason Wang
From: Alexey Kirillov As we use QAPI NetClientState->stored_config to store and get information about backend network devices, we can drop fill of legacy field info_str for them. We still use info_str field for NIC and hubports, so we can not completely remove it. Signed-off-by: Alexey

[PULL V2 14/20] lan9118: switch to use qemu_receive_packet() for loopback

2021-03-15 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang ---

Re: [PATCH] Hexagon (target/hexagon) fix typo in comment

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 5:55 AM, Taylor Simpson wrote: > Signed-of-by: Taylor Simpson 'git-commit -s' flag add the S-o-b line automatically ;) Otherwise: Reviewed-by: Philippe Mathieu-Daudé > --- > target/hexagon/op_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[PULL V2 19/20] hmp: Use QAPI NetdevInfo in hmp_info_network

2021-03-15 Thread Jason Wang
From: Alexey Kirillov Replace usage of legacy field info_str of NetClientState for backend network devices with QAPI NetdevInfo stored_config that already used in QMP query-netdev. This change increases the detail of the "info network" output and takes a more general approach to composing the

Re: [PATCH v2 02/13] net: Add a 'do_not_pad" to NetClientState

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 8:57 AM, Bin Meng wrote: > This adds a flag in NetClientState, so that a net client can tell > its peer that the packets do not need to be padded to the minimum > size of an Ethernet frame (60 bytes) before sending to it. > > Signed-off-by: Bin Meng > --- > > include/net/net.h | 1 +

[PULL V2 13/20] cadence_gem: switch to use qemu_receive_packet() for loopback

2021-03-15 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alexander Bulekov

[PULL V2 16/20] qapi: net: Add query-netdev command

2021-03-15 Thread Jason Wang
From: Alexey Kirillov The query-netdev command is used to get the configuration of the current network device backends (netdevs). This is the QMP analog of the HMP command "info network" but only for netdevs (i.e. excluding NIC and hubports). The query-netdev command returns an array of objects

Re: [PATCH v2 02/13] net: Add a 'do_not_pad" to NetClientState

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 10:17 AM, Philippe Mathieu-Daudé wrote: > On 3/15/21 8:57 AM, Bin Meng wrote: >> This adds a flag in NetClientState, so that a net client can tell >> its peer that the packets do not need to be padded to the minimum >> size of an Ethernet frame (60 bytes) before sending to it. >> >>

[PULL V2 11/20] rtl8139: switch to use qemu_receive_packet() for loopback

2021-03-15 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826 Reviewed-by: Philippe

[PULL V2 09/20] sungem: switch to use qemu_receive_packet() for loopback

2021-03-15 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis

[PULL V2 07/20] dp8393x: switch to use qemu_receive_packet() for loopback packet

2021-03-15 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé --- hw/net/dp8393x.c | 2 +- 1 file changed, 1 insertion(+), 1

[PULL V2 18/20] net: Move NetClientState.info_str to dynamic allocations

2021-03-15 Thread Jason Wang
From: Alexey Kirillov The info_str field of the NetClientState structure is static and has a size of 256 bytes. This amount is often unclaimed, and the field itself is used exclusively for HMP "info network". The patch translates info_str to dynamic memory allocation. This action is also

[PULL V2 06/20] e1000: switch to use qemu_receive_packet() for loopback

2021-03-15 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/e1000.c | 2 +- 1 file changed, 1

[PULL V2 08/20] msf2-mac: switch to use qemu_receive_packet() for loopback

2021-03-15 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/msf2-emac.c | 2 +- 1 file

[PULL V2 12/20] pcnet: switch to use qemu_receive_packet() for loopback

2021-03-15 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1917085 Reviewed-by: Philippe

[PULL V2 04/20] e1000: fail early for evil descriptor

2021-03-15 Thread Jason Wang
During procss_tx_desc(), driver can try to chain data descriptor with legacy descriptor, when will lead underflow for the following calculation in process_tx_desc() for bytes: if (tp->size + bytes > msh) bytes = msh - tp->size; This will lead a infinite loop. So check

[PULL V2 03/20] net: validate that ids are well formed

2021-03-15 Thread Jason Wang
From: Paolo Bonzini When a network or network device is created from the command line or HMP, QemuOpts ensures that the id passes the id_wellformed check. However, QMP skips this: $ qemu-system-x86_64 -qmp stdio -S -nic user,id=123/456 qemu-system-x86_64: -nic user,id=123/456: Parameter

[PULL V2 05/20] net: introduce qemu_receive_packet()

2021-03-15 Thread Jason Wang
Some NIC supports loopback mode and this is done by calling nc->info->receive() directly which in fact suppresses the effort of reentrancy check that is done in qemu_net_queue_send(). Unfortunately we can't use qemu_net_queue_send() here since for loopback there's no sender as peer, so this patch

[PULL V2 10/20] tx_pkt: switch to use qemu_receive_packet_iov() for loopback

2021-03-15 Thread Jason Wang
This patch switches to use qemu_receive_receive_iov() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/net_tx_pkt.c | 2 +- 1 file

[PULL V2 02/20] net: Fix build error when DEBUG_NET is on

2021-03-15 Thread Jason Wang
From: Bin Meng "qemu-common.h" should be included to provide the forward declaration of qemu_hexdump() when DEBUG_NET is on. Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- net/net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/net.c

[PULL V2 00/20] Net patches

2021-03-15 Thread Jason Wang
The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.0-pull-request' into staging (2021-03-14 17:47:49 +) are available in the git repository at: https://github.com/jasowang/qemu.git

[PULL V2 01/20] virtio-net: calculating proper msix vectors on init

2021-03-15 Thread Jason Wang
Currently, the default msix vectors for virtio-net-pci is 3 which is obvious not suitable for multiqueue guest, so we depends on the user or management tools to pass a correct vectors parameter. In fact, we can simplifying this by calculating the number of vectors on realize. Consider we have N

Re: [PATCH v2 01/13] net: Add ETH_ZLEN define in eth.h

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 8:57 AM, Bin Meng wrote: > Add a new macro ETH_ZLEN which represents the minimum size of an > Ethernet frame without FCS. > > Signed-off-by: Bin Meng > --- > > include/net/eth.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/net/eth.h b/include/net/eth.h > index

Re: [PATCH] utils: Use fma in qemu_strtosz

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 12:48 AM, Richard Henderson wrote: > Use fma to simulatneously scale and round up fraction. "simultaneously" > The libm function will always return a properly rounded double precision > value, which will eliminate any extra precision the x87 co-processor may > give us, which will keep

Re: [PATCH 0/3] hw: Constify VMStateDescription

2021-03-15 Thread Keqian Zhu
Hi Philippe, It seems that vmstate_ecc_state and vmstate_x86_cpu can also be constified. Found by . Thanks, Keqian On 2021/3/14 1:11, Philippe Mathieu-Daudé wrote: > VMStateDescription isn't supposed to be modified. > > > > Philippe Mathieu-Daudé (3): > > hw/arm: Constify

Re: [PATCH v3 0/4] acpi: Set proper maximum size for "etc/table-loader" blob

2021-03-15 Thread David Hildenbrand
On 04.03.21 11:55, David Hildenbrand wrote: Fix and cleanup initializing the maximum size of mutable ACPI blobs. v1/v2 -> v3: - 'acpi: Set proper maximum size for "etc/table-loader" blob' -- Move "etc/table-loader" change to separate patch -- Extend description -- Fixup maximum size (now really

[PATCH v7 2/2] target/s390x: Store r1/r2 for page-translation exceptions during MVPG

2021-03-15 Thread David Hildenbrand
The PoP states: When EDAT-1 does not apply, and a program interruption due to a page-translation exception is recognized by the MOVE PAGE instruction, the contents of the R1 field of the instruction are stored in bit positions 0-3 of location 162, and the contents of the R2

[PATCH v7 0/2] target/s390x: Implement the MVPG condition-code-option bit

2021-03-15 Thread David Hildenbrand
Based on work from Richard and Thomas. v6 -> v7: - "target/s390x: Implement the MVPG condition-code-option bit" -- Fix PGM_PROTECTION for QEMU_USER_ONLY (overridden by patch #2) v5 -> v6: - "target/s390x: Implement the MVPG condition-code-option bit" -- Better handle CONFIG_USER_ONLY -- Factor

[PATCH v7 1/2] target/s390x: Implement the MVPG condition-code-option bit

2021-03-15 Thread David Hildenbrand
From: Richard Henderson If the CCO bit is set, MVPG should not generate an exception but report page translation faults via a CC code. Create a new helper, access_prepare_nf, which can use probe_access_flags in non-faulting mode, and then handle watchpoints. Reviewed-by: Richard Henderson

Re: [PATCH v2] Add missing initialization for g_autofree variables

2021-03-15 Thread Miroslav Rezanina
On Mon, Mar 15, 2021 at 09:08:01AM +0100, Thomas Huth wrote: > On 15/03/2021 09.00, mreza...@redhat.com wrote: > > From: Miroslav Rezanina > > > > When declaring g_autofree variable without inicialization, compiler > > will raise "may be used uninitialized in this function" warning due > > to

Re: [PATCH v7 0/5] Introducing QMP query-netdev command

2021-03-15 Thread Jason Wang
在 2021/3/12 下午6:29, Alexey Kirillov 写道: ping Patchew page: https://patchew.org/QEMU/20210303095910.78277-1-lekir...@yandex-team.ru Applied. Thanks 03.03.2021, 13:01, "Alexey Kirillov" : This patch series introduces a new QMP command "query-netdev" to get information about currently

Re: [PATCH v2] Add missing initialization for g_autofree variables

2021-03-15 Thread Thomas Huth
On 15/03/2021 09.00, mreza...@redhat.com wrote: From: Miroslav Rezanina When declaring g_autofree variable without inicialization, compiler will raise "may be used uninitialized in this function" warning due to automatic free handling. This is mentioned in docs/devel/style.rst (quote from

[PATCH v2 13/13] hw/net: sunhme: Remove the logic of padding short frames in the receive path

2021-03-15 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- hw/net/sunhme.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/hw/net/sunhme.c b/hw/net/sunhme.c index

Re: [PULL 00/16] Net patches

2021-03-15 Thread Jason Wang
在 2021/3/15 下午1:39, Thomas Huth 写道: On 14/03/2021 12.37, Peter Maydell wrote: On Fri, 12 Mar 2021 at 06:16, Jason Wang wrote: The following changes since commit f4abdf32714d1845b7c01ec136dd2b04c2f7db47:    Merge remote-tracking branch

[PATCH v2 12/13] hw/net: sungem: Remove the logic of padding short frames in the receive path

2021-03-15 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- hw/net/sungem.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/hw/net/sungem.c b/hw/net/sungem.c index

[PATCH v2 08/13] hw/net: i82596: Remove the logic of padding short frames in the receive path

2021-03-15 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- hw/net/i82596.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/hw/net/i82596.c b/hw/net/i82596.c index

[PATCH v2] Add missing initialization for g_autofree variables

2021-03-15 Thread mrezanin
From: Miroslav Rezanina When declaring g_autofree variable without inicialization, compiler will raise "may be used uninitialized in this function" warning due to automatic free handling. This is mentioned in docs/devel/style.rst (quote from section "Automatic memory deallocation"): *

[PATCH v2 11/13] hw/net: rtl8139: Remove the logic of padding short frames in the receive path

2021-03-15 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- hw/net/rtl8139.c | 12 1 file changed, 12 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index

[PATCH v2 07/13] hw/net: vmxnet3: Remove the logic of padding short frames in the receive path

2021-03-15 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. This actually reverts commit 40a87c6c9b11ef9c14e0301f76abf0eb2582f08e. Signed-off-by: Bin Meng --- hw/net/vmxnet3.c | 10 -- 1 file changed, 10 deletions(-)

[PATCH v2 06/13] hw/net: e1000: Remove the logic of padding short frames in the receive path

2021-03-15 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. This actually reverts commit 78aeb23eded2d0b765bf9145c71f80025b568acd. Signed-off-by: Bin Meng --- hw/net/e1000.c | 11 +-- 1 file changed, 1 insertion(+),

[PATCH v2 03/13] net: slirp: Pad short frames to minimum size before send

2021-03-15 Thread Bin Meng
The minimum Ethernet frame length is 60 bytes. For short frames with smaller length like ARP packets (only 42 bytes), on a real world NIC it can choose either padding its length to the minimum required 60 bytes, or sending it out directly to the wire. Such behavior can be hardcoded or controled by

[PATCH v2 10/13] hw/net: pcnet: Remove the logic of padding short frames in the receive path

2021-03-15 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- hw/net/pcnet.c | 9 - 1 file changed, 9 deletions(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index f3f18d8598..16330335cd

[PATCH v2 02/13] net: Add a 'do_not_pad" to NetClientState

2021-03-15 Thread Bin Meng
This adds a flag in NetClientState, so that a net client can tell its peer that the packets do not need to be padded to the minimum size of an Ethernet frame (60 bytes) before sending to it. Signed-off-by: Bin Meng --- include/net/net.h | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2 05/13] hw/net: virtio-net: Initialize nc->do_not_pad to true

2021-03-15 Thread Bin Meng
For virtio-net, there is no need to pad the Ethernet frame size to 60 bytes before sending to it. Signed-off-by: Bin Meng --- hw/net/virtio-net.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 96a3cc8357..66b9ff4511 100644 ---

[PATCH v2 04/13] net: tap: Pad short frames to minimum size before send

2021-03-15 Thread Bin Meng
Do the same for tap backend as what we did for slirp. Signed-off-by: Bin Meng --- net/tap-win32.c | 12 net/tap.c | 12 2 files changed, 24 insertions(+) diff --git a/net/tap-win32.c b/net/tap-win32.c index 2b5dcda36e..ec35ab8ce7 100644 --- a/net/tap-win32.c

[PATCH v2 09/13] hw/net: ne2000: Remove the logic of padding short frames in the receive path

2021-03-15 Thread Bin Meng
Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. Signed-off-by: Bin Meng --- hw/net/ne2000.c | 12 1 file changed, 12 deletions(-) diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index

[PATCH v2 01/13] net: Add ETH_ZLEN define in eth.h

2021-03-15 Thread Bin Meng
Add a new macro ETH_ZLEN which represents the minimum size of an Ethernet frame without FCS. Signed-off-by: Bin Meng --- include/net/eth.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net/eth.h b/include/net/eth.h index 0671be6916..7c825ecb2f 100644 --- a/include/net/eth.h +++

[PATCH v2 00/13] net: Pad short frames for network backends

2021-03-15 Thread Bin Meng
The minimum Ethernet frame length is 60 bytes. For short frames with smaller length like ARP packets (only 42 bytes), on a real world NIC it can choose either padding its length to the minimum required 60 bytes, or sending it out directly to the wire. Such behavior can be hardcoded or controled by

[Bug 1916112] Re: Illegal instruction crash of QEMU on Jetson Nano

2021-03-15 Thread Ravishankar
Working well now. Thank you. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1916112 Title: Illegal instruction crash of QEMU on Jetson Nano Status in QEMU: Fix Committed Bug description: I

Re: [PATCH v2] edid: add support for DisplayID extension (5k resolution)

2021-03-15 Thread Gerd Hoffmann
> +typedef struct Timings { > +static void generate_timings(Timings *timings, uint32_t refresh_rate, > + uint32_t xres, uint32_t yres) Adding these should be splitted to a separate patch. > -static void edid_checksum(uint8_t *edid) > +static void

Re: [PATCH] ui/cocoa: Do not raise keys before QEMU resigns active

2021-03-15 Thread Gerd Hoffmann
On Sun, Mar 14, 2021 at 04:01:47PM +0900, Akihiko Odaki wrote: > ui/cocoa used to raise all keys before it resigns active to prevent a > stuck key problem caused by key up events it does not see while it is > inactive. The problem is solved by checking -[NSEvent modifierFlags] in > commit

Re: [PATCH 5/8] util/compatfd.c: Replaced a malloc with GLib's variant

2021-03-15 Thread Thomas Huth
On 15/03/2021 07.43, Mahmoud Mandour wrote: If it's unrelated, then maybe better do it in a separate patch. I thought so but I didn't know whether it was a so-small change that it didn't require its own patch or not. I will amend that. Since this is only a very small allocation, I

Re: [PATCH] hw/display/virtio-vga: made vga memory size configurable

2021-03-15 Thread Gerd Hoffmann
On Sun, Mar 14, 2021 at 01:23:14PM +0100, vit...@cyberhaven.com wrote: > From: Vitaly Chipounov > > This enables higher resolutions. No. virtio-vga supports higher resolutions just fine once the guest driver is loaded. The video memory is used at boot only, before the guest driver is loaded,

Re: [PATCH 5/8] util/compatfd.c: Replaced a malloc with GLib's variant

2021-03-15 Thread Mahmoud Mandour
> > If it's unrelated, then maybe better do it in a separate patch. > I thought so but I didn't know whether it was a so-small change that it didn't require its own patch or not. I will amend that. Since this is only a very small allocation, I think it would be better to > use g_malloc() here

Re: Questions about timer interrupt handling in QEMU

2021-03-15 Thread Pavel Dovgalyuk
On 14.03.2021 12:04, Arnabjyoti Kalita wrote: Hello all, This is a continuation of some of the questions I had about the clock record-replay handling process in QEMU. My previous post is here - https://www.mail-archive.com/qemu-discuss@nongnu.org/msg06231.html

Re: [PATCH v3] multi-process: Initialize variables declared with g_auto*

2021-03-15 Thread Miroslav Rezanina
On Mon, Mar 15, 2021 at 02:20:10PM +0800, Zenghui Yu wrote: > On 2021/3/15 13:48, Miroslav Rezanina wrote: > > Missing declaration without initialization in hw/s390x/s390-pci-vfio.c > > othwerwise correct. Will you send v4 with missing initialization or > > should I send then as another patch? >

Re: [PATCH v3] multi-process: Initialize variables declared with g_auto*

2021-03-15 Thread Zenghui Yu
On 2021/3/15 13:48, Miroslav Rezanina wrote: Missing declaration without initialization in hw/s390x/s390-pci-vfio.c othwerwise correct. Will you send v4 with missing initialization or should I send then as another patch? I'd prefer the latter so that subsystem maintainers can take the separate

[PATCH 1/7] block/nbd: avoid touching freed connect_thread

2021-03-15 Thread Roman Kagan
When the NBD connection is being torn down, the connection thread gets canceled and "detached", meaning it is about to get freed. If this happens while the connection coroutine yielded waiting for the connection thread to complete, when it resumes it may access the invalidated connection thread

[PATCH 4/7] block/nbd: transfer reconnection stuff across aio_context switch

2021-03-15 Thread Roman Kagan
Make varios pieces of reconnection logic correctly survive the transition of the BDRVNBDState from one aio_context to another. In particular, - cancel the reconnect_delay_timer and rearm it in the new context; - cancel the sleep of the connection_co between reconnect attempt so that it

Re: [PATCH 5/8] util/compatfd.c: Replaced a malloc with GLib's variant

2021-03-15 Thread Thomas Huth
On 14/03/2021 04.23, Mahmoud Mandour wrote: Replaced a malloc() call and its respective free() call with GLib's g_try_malloc() and g_free(). Also, did slight styling changes that were producing style errors when using the checkpatch.pl script against the file. If it's unrelated, then maybe

[PATCH 2/7] block/nbd: use uniformly nbd_client_connecting_wait

2021-03-15 Thread Roman Kagan
Use nbd_client_connecting_wait uniformly all over the block/nbd.c. While at this, drop the redundant check for nbd_client_connecting_wait in reconnect_delay_timer_init, as all its callsites do this check too. Signed-off-by: Roman Kagan --- block/nbd.c | 34 +++--- 1

[PATCH 5/7] block/nbd: better document a case in nbd_co_establish_connection

2021-03-15 Thread Roman Kagan
Cosmetic: adjust the comment and the return value in nbd_co_establish_connection where it's entered while the connection thread is still running. Signed-off-by: Roman Kagan --- block/nbd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index

[PATCH 7/7] block/nbd: stop manipulating in_flight counter

2021-03-15 Thread Roman Kagan
As the reconnect logic no longer interferes with drained sections, it appears unnecessary to explicitly manipulate the in_flight counter. Fixes: 5ad81b4946 ("nbd: Restrict connection_co reentrance") Signed-off-by: Roman Kagan --- block/nbd.c | 6 -- nbd/client.c | 2 -- 2 files changed, 8

<    1   2   3   4   5   6   >