Re: Out-of-Process Device Emulation session at KVM Forum 2020

2020-11-02 Thread Jason Wang
On 2020/11/2 下午6:13, Stefan Hajnoczi wrote: On Mon, Nov 02, 2020 at 10:51:18AM +0800, Jason Wang wrote: On 2020/10/30 下午9:15, Stefan Hajnoczi wrote: On Fri, Oct 30, 2020 at 12:08 PM Jason Wang wrote: On 2020/10/30 下午7:13, Stefan Hajnoczi wrote: On Fri, Oct 30, 2020 at 9:46 AM Jason Wang

[PATCH] target/microblaze: Fix possible array out of bounds in mmu_write()

2020-11-02 Thread AlexChen
The size of env->mmu.regs is 3, but the range of 'rn' is [0, 5]. To avoid data access out of bounds, only if 'rn' is less than 3, we can print env->mmu.regs[rn]. In other cases, we can print env->mmu.regs[MMU_R_TLBX]. Reported-by: Euler Robot Signed-off-by: Alex Chen ---

Re: [PULL 1/1] linux-user: Support futex_time64

2020-11-02 Thread Laurent Vivier
Le 02/11/2020 à 19:15, Peter Maydell a écrit : > On Mon, 30 Mar 2020 at 11:31, Laurent Vivier wrote: >> >> From: Alistair Francis >> >> Add support for host and target futex_time64. If futex_time64 exists on >> the host we try that first before falling back to the standard futex >> syscall. > >

Re: [PATCH for-5.2] tcg: Remove assert from set_jmp_reset_offset

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/3/20 4:39 AM, Richard Henderson wrote: > The range check done here is done later, more appropriately, > at the end of tcg_gen_code. Maybe mention commit 6e6c4efed99 ("tcg: Restart after TB code generation overflow")? (no need to repost). > There, a failing range check > results in a

Re: [PATCH-for-5.2 v3] hw/mips: Remove the 'r4k' machine

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/3/20 7:58 AM, Thomas Huth wrote: > On 02/11/2020 21.13, Philippe Mathieu-Daudé wrote: >> We deprecated the support for the 'r4k' machine for the 5.0 release >> (commit d32dc61421), which means that our deprecation policy allows >> us to drop it in release 5.2. Remove the code. >> >> To

Re: [PATCH-for-5.2 v3] hw/mips: Remove the 'r4k' machine

2020-11-02 Thread Thomas Huth
On 02/11/2020 21.13, Philippe Mathieu-Daudé wrote: > We deprecated the support for the 'r4k' machine for the 5.0 release > (commit d32dc61421), which means that our deprecation policy allows > us to drop it in release 5.2. Remove the code. > > To repeat the rationale from the deprecation note: >

Re: [PATCH-for-5.2] hw/mips: Remove the 'r4k' machine

2020-11-02 Thread Thomas Huth
On 02/11/2020 11.26, Philippe Mathieu-Daudé wrote: > We deprecated the support for the 'r4k' machine for the 5.0 release > (commit d32dc61421), which means that our deprecation policy allows > us to drop it in release 5.2. Remove the code. > > To repeat the rationale from the deprecation note: >

RE: [PATCH for-5.2] tcg: Remove assert from set_jmp_reset_offset

2020-11-02 Thread Sai Pavan Boddu
Hi Richard > -Original Message- > From: Richard Henderson > Sent: Tuesday, November 3, 2020 9:10 AM > To: qemu-devel@nongnu.org > Cc: Sai Pavan Boddu > Subject: [PATCH for-5.2] tcg: Remove assert from set_jmp_reset_offset > > The range check done here is done later, more appropriately,

Re: [PATCH v2 11/11] sockets: Make abstract UnixSocketAddress depend on CONFIG_LINUX

2020-11-02 Thread Markus Armbruster
Eric Blake writes: > On 11/2/20 3:44 AM, Markus Armbruster wrote: >> The abstract socket namespace is a non-portable Linux extension. An >> attempt to use it elsewhere should fail with ENOENT (the abstract >> address looks like a "" pathname, which does not resolve). We report >> this failure

[PATCH-for-5.2 v2] hw/virtio/vhost-backend: Fix Coverity CID 1432871

2020-11-02 Thread Philippe Mathieu-Daudé
Fix uninitialized value issues reported by Coverity: Field 'msg.reserved' is uninitialized when calling write(). While the 'struct vhost_msg' does not have a 'reserved' field, we still initialize it to have the two parts of the function consistent. Reported-by: Coverity (CID 1432864: UNINIT)

Re: [PATCH] hw/9pfs: virtio-9p: Ensure config space is a multiple of 4 bytes

2020-11-02 Thread Bin Meng
On Tue, Nov 3, 2020 at 2:26 PM Bin Meng wrote: > > Hi Michael, > > On Fri, Oct 30, 2020 at 5:29 PM Michael S. Tsirkin wrote: > > > > On Thu, Oct 29, 2020 at 04:25:41PM +0800, Bin Meng wrote: > > > From: Bin Meng > > > > > > At present the virtio device config space access is handled by the > >

Re: [PATCH-for-5.2? 2/5] tests/acceptance: Restore MIPS Malta multicore tests

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/2/20 3:42 PM, Philippe Mathieu-Daudé wrote: > Since 42a052333a6 ("hw/misc/mips_cpc: Start vCPU when powered on") > the multicore support of the MIPS Malta board has been fixed. > > This reverts commit 61bbce96fe4c8e3a2b7df5a67ba7dc6ba418e54b. > > Signed-off-by: Philippe Mathieu-Daudé >

Re: [PATCH v2 09/11] char-socket: Fix qemu_chr_socket_address() for abstract sockets

2020-11-02 Thread Markus Armbruster
Eric Blake writes: > On 11/2/20 3:44 AM, Markus Armbruster wrote: >> Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket >> support" neglected to update qemu_chr_socket_address(). It shows >> shows neither @abstract nor @tight. Fix that. >> >> Reviewed-by: Paolo Bonzini >>

Re: [PATCH] hw/9pfs: virtio-9p: Ensure config space is a multiple of 4 bytes

2020-11-02 Thread Bin Meng
Hi Michael, On Fri, Oct 30, 2020 at 5:29 PM Michael S. Tsirkin wrote: > > On Thu, Oct 29, 2020 at 04:25:41PM +0800, Bin Meng wrote: > > From: Bin Meng > > > > At present the virtio device config space access is handled by the > > virtio_config_readX() and virtio_config_writeX() APIs. They

Re: [PULL 09/12] qga: add ssh-{add,remove}-authorized-keys

2020-11-02 Thread Markus Armbruster
Michael Roth writes: > On Mon, Nov 02, 2020 at 04:49:27PM +0100, Markus Armbruster wrote: [...] >> checkpatch ERROR: Use g_assert or g_assert_not_reached >> >> See commit 6e9389563e "checkpatch: Disallow glib asserts in main code" >> for rationale. > > Thanks for the pointer, I couldn't figure

Re: [PATCH v2 1/3] softmmu: Do not use C99 // comments

2020-11-02 Thread Markus Armbruster
chaihaoyu writes: > Hi, recently I found some code style problems while using checkpatch.pl > tool,please review. > > Date: Tue, 3 Nov 2020 11:01:40 +0800 > signed-off-by: Haoyu Chai > --- > softmmu/memory.c | 2 +- > softmmu/memory_mapping.c | 2 +- > softmmu/physmem.c| 2 +- >

Re: [Bug 1902470] Re: migration with TLS-MultiFD is stuck when the dst-libvirtd service restarts

2020-11-02 Thread Zheng Chuan
On 2020/11/3 4:16, Dr. David Alan Gilbert wrote: > * zhengchuan (zhengch...@huawei.com) wrote: >> Anyone who could help this would be appreciated since we have stuck for >> three days:( >> >> IIUC, the client (Src) has sent first hello message to sever(Dst), however >> due to something

Re: [PULL v3 23/32] s390x/pci: Add routine to get the vfio dma available count

2020-11-02 Thread Philippe Mathieu-Daudé
Hi Matthew, On 11/1/20 10:02 PM, Alex Williamson wrote: > From: Matthew Rosato > > Create new files for separating out vfio-specific work for s390 > pci. Add the first such routine, which issues VFIO_IOMMU_GET_INFO > ioctl to collect the current dma available count. > > Signed-off-by: Matthew

RE: [PATCH] Revert "vhost-blk: set features before setting inflight feature"

2020-11-02 Thread Yu, Jin
Hi Stefan, I have sent a version 2 and it should fix this issue. I also test it several times and I did not meet this issue again. Thanks for your report. Best Regards Jin > -Original Message- > From: Stefan Hajnoczi > Sent: Tuesday, November 3, 2020 12:57 AM >

[PATCH v2] vhost-blk: set features before setting inflight feature

2020-11-02 Thread Jin Yu
Virtqueue has split and packed, so before setting inflight, you need to inform the back-end virtqueue format. Signed-off-by: Jin Yu Acked-by: Raphael Norwitz --- v2: * Fixed the segfault. --- hw/block/vhost-user-blk.c | 6 ++ hw/virtio/vhost.c | 20

[PATCH v2 0/3] softmmu: some space-style problems while coding

2020-11-02 Thread chaihaoyu
Hi, recently I found some code style problems while using checkpatch.pl tool,please review. Date: Tue, 3 Nov 2020 11:19:37 +0800 Subject: [PATCH] space style signed-off-by: Haoyu Chai --- softmmu/physmem.c | 2 +- softmmu/qdev-monitor.c | 4 ++-- softmmu/vl.c | 12

[PATCH v2 3/3] softmmu: braces {} are necessary for all arms of this statement

2020-11-02 Thread chaihaoyu
Hi, recently I found some code style problems while using checkpatch.pl tool,please review. Date: Tue, 3 Nov 2020 10:09:34 +0800 Subject: [PATCH] braces {} are necessary for all arms of this statement signed-off-by: Haoyu Chai --- --- softmmu/cpus.c | 6 -- softmmu/dma-helpers.c |

[PATCH v2 2/3] softmmu: Don't use '#' flag of printf format

2020-11-02 Thread chaihaoyu
Hi, recently I found some code style problems while using checkpatch.pl tool,please review. Date: Tue, 3 Nov 2020 11:01:40 +0800 Subject: [PATCH] Don't use '#' flag of printf format signed-off-by: Haoyu Chai --- softmmu/device_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: Does QEMU's coverity-scan run need to track coverity issues in dtb or slirp ?

2020-11-02 Thread David Gibson
On Mon, Nov 02, 2020 at 07:54:14PM +, Peter Maydell wrote: > Currently QEMU's Coverity-Scan project has a bunch of unresolved > issues in code in dtc/ and also in slirp/. (I suspect most of them > are actually false-positives that got re-reported when we switched > to Meson and the filenames

[PATCH v2 1/3] softmmu: Do not use C99 // comments

2020-11-02 Thread chaihaoyu
Hi, recently I found some code style problems while using checkpatch.pl tool,please review. Date: Tue, 3 Nov 2020 11:01:40 +0800 signed-off-by: Haoyu Chai --- softmmu/memory.c | 2 +- softmmu/memory_mapping.c | 2 +- softmmu/physmem.c| 2 +- 3 files changed, 3 insertions(+), 3

[PATCH for-5.2] tcg: Remove assert from set_jmp_reset_offset

2020-11-02 Thread Richard Henderson
The range check done here is done later, more appropriately, at the end of tcg_gen_code. There, a failing range check results in a returned error code, which causes the TB to be restarted at half the size. Reported-by: Sai Pavan Boddu Signed-off-by: Richard Henderson --- Sai, would you try

Re: [PATCH 0/4] qga: Fix some style problems

2020-11-02 Thread AlexChen
Kindly ping. On 2020/10/26 17:05, AlexChen wrote: > Fix some error style problems found by checkpatch.pl. > > alexchen (4): > qga: Add spaces around operator > qga: Delete redundant spaces > qga: Open brace '{' following struct go on the same > qga: switch and case should be at the same

Re: [PATCH] crypto: Add spaces around operator

2020-11-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/bb45d748-01e4-2fde-9fe3-32a7db4b6...@huawei.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: bb45d748-01e4-2fde-9fe3-32a7db4b6...@huawei.com Subject: [PATCH] crypto: Add spaces

[PATCH] crypto: Add spaces around operator

2020-11-02 Thread shiliyang
I am reading crypto related code, find some code style problems while using checkpatch.pl to check crypto folder. Fix the error style problems. Signed-off-by: Liyang Shi --- crypto/aes.c | 6 +++--- crypto/desrfb.c | 2 +- crypto/tlscredsx509.c | 2 +- 3 files changed, 5

Re: [RFC PATCH v2 07/13] hw/arm/virt-acpi-build: distinguish possible and present cpus Message

2020-11-02 Thread Ying Fang
On 10/30/2020 1:20 AM, Andrew Jones wrote: You need to remove 'Message' from the summary. On Tue, Oct 20, 2020 at 09:14:34PM +0800, Ying Fang wrote: When building ACPI tables regarding CPUs we should always build them for the number of possible CPUs, not the number of present CPUs. We then

[PULL v3 08/12] glib-compat: add g_unix_get_passwd_entry_qemu()

2020-11-02 Thread Michael Roth
From: Marc-André Lureau The glib function was introduced in 2.64. It's a safer version of getpwnam, and also simpler to use than getpwnam_r. Currently, it's only use by the next patch in qemu-ga, which doesn't (well well...) need the thread safety guarantees. Since the fallback version is still

[PULL v3 05/12] qga: add command guest-get-disks

2020-11-02 Thread Michael Roth
From: Tomáš Golembiovský Add API and stubs for new guest-get-disks command. The command guest-get-fsinfo can be used to list information about disks and partitions but it is limited only to mounted disks with filesystem. This new command should allow listing information about disks of the VM

[PULL v3 07/12] qga: add implementation of guest-get-disks for Windows

2020-11-02 Thread Michael Roth
From: Tomáš Golembiovský The command lists all the physical disk drives. Unlike for Linux partitions and virtual volumes are not listed. Example output: { "return": [ { "name": ".\\PhysicalDrive0", "partition": false, "address": { "serial": "QM1",

[PULL v3 02/12] qga: Use common time encoding for guest-get-devices 'driver-date'

2020-11-02 Thread Michael Roth
From: Markus Armbruster guest-get-devices returns 'driver-date' as string in the format -MM-DD. Goes back to recent commit 2e4211cee4 "qga: add command guest-get-devices for reporting VirtIO devices". We should avoid use of multiple encodings for the same kind of data. Especially string

[PULL v3 04/12] qga: Flatten simple union GuestDeviceId

2020-11-02 Thread Michael Roth
From: Markus Armbruster Simple unions are simpler than flat unions in the schema, but more complicated in C and on the QMP wire: there's extra indirection in C and extra nesting on the wire, both pointless. They should be avoided in new code. GuestDeviceId was recently added for

[PULL v3 03/12] qga-win: Fix guest-get-devices error API violations

2020-11-02 Thread Michael Roth
From: Markus Armbruster The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call.

[PULL v3 00/12] qemu-ga patch queue for soft-freeze

2020-11-02 Thread Michael Roth
Hi Peter, Sorry to get these out so late, for some inexplicable reason my email client decided to flag all responses v1 as spam and I didn't notice until I double-checked the archives this morning. I've fixed the gcc-on-BSD and clang-on-linux issues you pointed out (PATCH 6) and added proper

[PULL v3 10/12] qga: add *reset argument to ssh-add-authorized-keys

2020-11-02 Thread Michael Roth
I prefer 'reset' over 'clear', since 'clear' and keys may have some other relations or meaning. Signed-off-by: Marc-André Lureau *fix disallowed g_assert* usage reported by checkpatch Signed-off-by: Michael Roth --- qga/commands-posix-ssh.c | 53

[PULL v3 01/12] qga: Rename guest-get-devices return member 'address' to 'id'

2020-11-02 Thread Michael Roth
From: Markus Armbruster Member 'address' is union GuestDeviceAddress with a single branch GuestDeviceAddressPCI, containing PCI vendor ID and device ID. This is not a PCI address. Type GuestPCIAddress is. Messed up in recent commit 2e4211cee4 "qga: add command guest-get-devices for reporting

[PULL v3 06/12] qga: add implementation of guest-get-disks for Linux

2020-11-02 Thread Michael Roth
From: Tomáš Golembiovský The command lists all disks (real and virtual) as well as disk partitions. For each disk the list of dependent disks is also listed and /dev path is used as a handle so it can be matched with "name" field of other returned disk entries. For disk partitions the

[PULL v3 11/12] meson: minor simplification

2020-11-02 Thread Michael Roth
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Michael Roth --- qga/meson.build | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qga/meson.build b/qga/meson.build index 635de9af41..4cb3b3f259 100644 --- a/qga/meson.build +++ b/qga/meson.build

[PULL v3 09/12] qga: add ssh-{add,remove}-authorized-keys

2020-11-02 Thread Michael Roth
From: Marc-André Lureau Add new commands to add and remove SSH public keys from ~/.ssh/authorized_keys. I took a different approach for testing, including the unit tests right with the code. I wanted to overwrite the function to get the user details, I couldn't easily do that over QMP.

[PULL v3 12/12] qga: add ssh-get-authorized-keys

2020-11-02 Thread Michael Roth
From: Marc-André Lureau Signed-off-by: Marc-André Lureau *fix-up merge conflicts due to qga-ssh-test being disabled in earlier patch due to G_TEST_OPTION_ISOLATE_DIRS triggering build-oss-fuzz leak detector. *fix up style and disallowed g_assert* usage reported by checkpatch Signed-off-by:

Re: [PULL v2 00/12] qemu-ga patch queue for soft-freeze

2020-11-02 Thread Michael Roth
On Mon, Nov 02, 2020 at 07:11:22PM -0600, Michael Roth wrote: > Hi Peter, > > Sorry to get these out so late, for some inexplicable reason my email > client decided to flag all responses v1 as spam and I didn't notice > until I double-checked the archives this morning. > > I've fixed the

[Bug 1902612] [NEW] assert issue locates in xhci_kick_epctx() in hw/usb/hcd-xhci.c

2020-11-02 Thread Gaoning Pan
Public bug reported: Hello, I found an assertion failure through hw/usb/hcd-xhci.c. This was found in latest version 5.1.0. An assertion-failure flaw was found in xhci_kick_epctx() in hw/usb/hcd- xhci.c . XHCI slot's endpoint context is enabled in xhci_configure_slot(), whose ep_ctx

RE: [PATCH 5/6] plugins/loader: fix uninitialized variable warning in plugin_reset_uninstall()

2020-11-02 Thread Chenqun (kuhn)
> -Original Message- > From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com] > Sent: Tuesday, November 3, 2020 10:18 AM > To: Chenqun (kuhn) ; qemu-devel@nongnu.org; > qemu-triv...@nongnu.org > Cc: Alex Bennée ; Zhanghailiang > ; ganqixin ; Euler > Robot > Subject: Re: [PATCH 5/6]

Re: [RFC PATCH v2 09/13] hw/arm/virt-acpi-build: add PPTT table

2020-11-02 Thread Ying Fang
On 10/30/2020 12:56 AM, Andrew Jones wrote: On Tue, Oct 20, 2020 at 09:14:36PM +0800, Ying Fang wrote: Add the Processor Properties Topology Table (PPTT) to present CPU topology information to the guest. Signed-off-by: Andrew Jones I don't know why I have an s-o-b here. I guess it's

Re: [PATCH 6/6] migration: fix uninitialized variable warning in migrate_send_rp_req_pages()

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/3/20 2:52 AM, Chen Qun wrote: > After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify > that the statements in the macro must be executed. As a result, some > variables > assignment statements in the macro may be considered as unexecuted by the > compiler. > > The

Re: [PATCH 1/6] target/xtensa: fix uninitialized variable warning

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/3/20 2:52 AM, Chen Qun wrote: > The compiler cannot determine whether the return values of the > xtensa_operand_is_register(isa, opc, opnd) > and xtensa_operand_is_visible(isa, opc, opnd) functions are the same. > So,it assumes that 'rf' is not assigned, but it's used. > > The compiler

Re: [PATCH 5/6] plugins/loader: fix uninitialized variable warning in plugin_reset_uninstall()

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/3/20 2:52 AM, Chen Qun wrote: > After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify > that the statements in the macro must be executed. As a result, some > variables > assignment statements in the macro may be considered as unexecuted by the > compiler. > > The

Re: [RFC PATCH v2 08/13] hw/acpi/aml-build: add processor hierarchy node structure

2020-11-02 Thread Ying Fang
On 10/30/2020 1:24 AM, Andrew Jones wrote: On Tue, Oct 20, 2020 at 09:14:35PM +0800, Ying Fang wrote: Add the processor hierarchy node structures to build ACPI information for CPU topology. Three helpers are introduced: (1) build_socket_hierarchy for socket description structure (2)

[PATCH-for-5.2 v3 7/7] util/vfio-helpers: Assert offset is aligned to page size

2020-11-02 Thread Philippe Mathieu-Daudé
mmap(2) states: 'offset' must be a multiple of the page size as returned by sysconf(_SC_PAGE_SIZE). Add an assertion to be sure we don't break this contract. Signed-off-by: Philippe Mathieu-Daudé --- util/vfio-helpers.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 3/6] util/qemu-timer: fix uninitialized variable warning in timer_mod_anticipate_ns()

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/3/20 2:52 AM, Chen Qun wrote: > After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify > that the statements in the macro must be executed. As a result, some > variables > assignment statements in the macro may be considered as unexecuted by the > compiler. > > The

[PATCH-for-5.2 v3 4/7] util/vfio-helpers: Trace where BARs are mapped

2020-11-02 Thread Philippe Mathieu-Daudé
For debugging purpose, trace where a BAR is mapped. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- util/vfio-helpers.c | 2 ++ util/trace-events | 1 + 2 files changed, 3 insertions(+) diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c

[PATCH-for-5.2 v3 3/7] util/vfio-helpers: Trace PCI BAR region info

2020-11-02 Thread Philippe Mathieu-Daudé
For debug purpose, trace BAR regions info. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- util/vfio-helpers.c | 8 util/trace-events | 1 + 2 files changed, 9 insertions(+) diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c index

Re: [PATCH-for-5.2? 3/5] tests/acceptance: Skip incomplete virtio_version tests using '@skip'

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/2/20 3:42 PM, Philippe Mathieu-Daudé wrote: > Prefer skipping incomplete tests with the "@skip" keyword, > rather than commenting the code. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/acceptance/virtio_version.py | 11 +++ > 1 file changed, 7 insertions(+), 4

[PATCH-for-5.2 v3 2/7] util/vfio-helpers: Trace PCI I/O config accesses

2020-11-02 Thread Philippe Mathieu-Daudé
We sometime get kernel panic with some devices on Aarch64 hosts. Alex Williamson suggests it might be broken PCIe root complex. Add trace event to record the latest I/O access before crashing. In case, assert our accesses are aligned. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi

Re: [PULL 09/12] qga: add ssh-{add,remove}-authorized-keys

2020-11-02 Thread Michael Roth
On Mon, Nov 02, 2020 at 04:49:27PM +0100, Markus Armbruster wrote: > Michael Roth writes: > > > From: Marc-André Lureau > > > > Add new commands to add and remove SSH public keys from > > ~/.ssh/authorized_keys. > > > > I took a different approach for testing, including the unit tests right > >

[PATCH-for-5.2 v3 0/7] util/vfio-helpers: Generic code strengthening

2020-11-02 Thread Philippe Mathieu-Daudé
v3: - Extract reviewed patches from "util/vfio-helpers: Allow using multiple MSIX IRQs" - Added "Assert offset is aligned to page size" which would have helped debugging: "block/nvme: Fix use of write-only doorbells page on Aarch64 arch" Missing review: 7 Based-on:

[PATCH-for-5.2 v3 6/7] util/vfio-helpers: Convert vfio_dump_mapping to trace events

2020-11-02 Thread Philippe Mathieu-Daudé
The QEMU_VFIO_DEBUG definition is only modifiable at build-time. Trace events can be enabled at run-time. As we prefer the latter, convert qemu_vfio_dump_mappings() to use trace events instead of fprintf(). Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe

[PATCH-for-5.2 v3 5/7] util/vfio-helpers: Improve DMA trace events

2020-11-02 Thread Philippe Mathieu-Daudé
For debugging purpose, trace where DMA regions are mapped. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- util/vfio-helpers.c | 3 ++- util/trace-events | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH-for-5.2 v3 1/7] util/vfio-helpers: Improve reporting unsupported IOMMU type

2020-11-02 Thread Philippe Mathieu-Daudé
Change the confuse "VFIO IOMMU check failed" error message by the explicit "VFIO IOMMU Type1 is not supported" once. Example on POWER: $ qemu-system-ppc64 -drive if=none,id=nvme0,file=nvme://0001:01:00.0/1,format=raw qemu-system-ppc64: -drive

[PATCH 6/6] migration: fix uninitialized variable warning in migrate_send_rp_req_pages()

2020-11-02 Thread Chen Qun
After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify that the statements in the macro must be executed. As a result, some variables assignment statements in the macro may be considered as unexecuted by the compiler. The compiler showed warning: migration/migration.c: In

[Bug 1901981] Re: assert issue locates in hw/usb/dev-storage.c:248: usb_msd_send_status

2020-11-02 Thread Gaoning Pan
** Changed in: qemu Assignee: (unassigned) => Gaoning Pan (hades0506) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1901981 Title: assert issue locates in hw/usb/dev-storage.c:248:

[PATCH 0/6] fix uninitialized variable warning

2020-11-02 Thread Chen Qun
Hi all, There are some variables initialized warnings reported by the compiler, even if the default CFLAG for the compiler parameters are uesed. This serial has added some default values or changed the assignment places for the variablies to fix them. Thanks, Chen Qun Chen Qun (6):

[PATCH 3/6] util/qemu-timer: fix uninitialized variable warning in timer_mod_anticipate_ns()

2020-11-02 Thread Chen Qun
After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify that the statements in the macro must be executed. As a result, some variables assignment statements in the macro may be considered as unexecuted by the compiler. The compiler showed warning: util/qemu-timer.c: In

[PATCH 1/6] target/xtensa: fix uninitialized variable warning

2020-11-02 Thread Chen Qun
The compiler cannot determine whether the return values of the xtensa_operand_is_register(isa, opc, opnd) and xtensa_operand_is_visible(isa, opc, opnd) functions are the same. So,it assumes that 'rf' is not assigned, but it's used. The compiler showed warning: target/xtensa/translate.c: In

[PATCH 5/6] plugins/loader: fix uninitialized variable warning in plugin_reset_uninstall()

2020-11-02 Thread Chen Qun
After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify that the statements in the macro must be executed. As a result, some variables assignment statements in the macro may be considered as unexecuted by the compiler. The compiler showed warning: plugins/loader.c: In

[PATCH 4/6] util/qemu-timer: fix uninitialized variable warning for expire_time

2020-11-02 Thread Chen Qun
After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify that the statements in the macro must be executed. As a result, some variables assignment statements in the macro may be considered as unexecuted by the compiler. The compiler showed warning: util/qemu-timer.c: In

[PATCH 2/6] hw/rdma/rdma_backend: fix uninitialized variable warning in rdma_poll_cq()

2020-11-02 Thread Chen Qun
After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify that the statements in the macro must be executed. As a result, some variables assignment statements in the macro may be considered as unexecuted by the compiler. The compiler showed warning: hw/rdma/rdma_backend.c: In

Re: [PATCH 0/3] tests/qtest: npcm7xx test fixes

2020-11-02 Thread Philippe Mathieu-Daudé
Cc'ing Daniel (patches 1-3) & Marc-André (2). On 11/3/20 2:14 AM, Havard Skinnemoen via wrote: > This series contains a fix for the randomness calculation in npcm7xx_rng-test. > It also makes test failures fatal. The last patch would have dumped the random > data to stderr if the randomness test

Re: [RFC PATCH v2 05/13] hw: add compat machines for 5.3

2020-11-02 Thread Ying Fang
On 10/30/2020 1:08 AM, Andrew Jones wrote: On Tue, Oct 20, 2020 at 09:14:32PM +0800, Ying Fang wrote: Add 5.2 machine types for arm/i440fx/q35/s390x/spapr. ^ 5.3 Thanks. Will fix, careless spelling mistake. Thanks, drew Signed-off-by: Ying Fang --- hw/arm/virt.c

Re: [PULL v2 00/12] qemu-ga patch queue for soft-freeze

2020-11-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201103011134.887744-1-michael.r...@amd.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201103011134.887744-1-michael.r...@amd.com Subject: [PULL v2 00/12] qemu-ga patch

[PATCH 3/3] tests/qtest/npcm7xx_rng-test: dump random data on failure

2020-11-02 Thread Havard Skinnemoen via
Dump the collected random data after a randomness test failure. Note that you won't actually see this unless you add g_test_set_nonfatal_assertions() back in. Signed-off-by: Havard Skinnemoen --- tests/qtest/npcm7xx_rng-test.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH 2/3] tests/qtest/npcm7xx: Don't call g_test_set_nonfatal_assertions

2020-11-02 Thread Havard Skinnemoen via
Even though g_test_set_nonfatal_assertions() makes test failure reporting a lot better, no other tests currently do this so we'll turn it off as well. Signed-off-by: Havard Skinnemoen --- tests/qtest/npcm7xx_gpio-test.c | 1 - tests/qtest/npcm7xx_rng-test.c| 1 -

[PULL v2 05/12] qga: add command guest-get-disks

2020-11-02 Thread Michael Roth
From: Tomáš Golembiovský Add API and stubs for new guest-get-disks command. The command guest-get-fsinfo can be used to list information about disks and partitions but it is limited only to mounted disks with filesystem. This new command should allow listing information about disks of the VM

[PULL v2 09/12] qga: add ssh-{add,remove}-authorized-keys

2020-11-02 Thread Michael Roth
From: Marc-André Lureau Add new commands to add and remove SSH public keys from ~/.ssh/authorized_keys. I took a different approach for testing, including the unit tests right with the code. I wanted to overwrite the function to get the user details, I couldn't easily do that over QMP.

[PULL v2 01/12] qga: Rename guest-get-devices return member 'address' to 'id'

2020-11-02 Thread Michael Roth
From: Markus Armbruster Member 'address' is union GuestDeviceAddress with a single branch GuestDeviceAddressPCI, containing PCI vendor ID and device ID. This is not a PCI address. Type GuestPCIAddress is. Messed up in recent commit 2e4211cee4 "qga: add command guest-get-devices for reporting

[PULL v2 06/12] qga: add implementation of guest-get-disks for Linux

2020-11-02 Thread Michael Roth
From: Tomáš Golembiovský The command lists all disks (real and virtual) as well as disk partitions. For each disk the list of dependent disks is also listed and /dev path is used as a handle so it can be matched with "name" field of other returned disk entries. For disk partitions the

[PATCH 0/3] tests/qtest: npcm7xx test fixes

2020-11-02 Thread Havard Skinnemoen via
This series contains a fix for the randomness calculation in npcm7xx_rng-test. It also makes test failures fatal. The last patch would have dumped the random data to stderr if the randomness test fails, except now that failures are fatal, it never actually gets a chance to do that. It may not

[PULL v2 12/12] qga: add ssh-get-authorized-keys

2020-11-02 Thread Michael Roth
From: Marc-André Lureau Signed-off-by: Marc-André Lureau *fix-up merge conflicts due to qga-ssh-test being disabled in earlier patch due to G_TEST_OPTION_ISOLATE_DIRS triggering build-oss-fuzz leak detector. Signed-off-by: Michael Roth --- qga/commands-posix-ssh.c | 66

[PATCH 1/3] tests/qtest/npcm7xx_rng-test: count runs properly

2020-11-02 Thread Havard Skinnemoen via
The number of runs is equal to the number of 0-1 and 1-0 transitions, plus one. Currently, it's counting the number of times these transitions do _not_ happen, plus one. Source: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-22r1a.pdf section 2.3.4 point (3).

[PULL v2 08/12] glib-compat: add g_unix_get_passwd_entry_qemu()

2020-11-02 Thread Michael Roth
From: Marc-André Lureau The glib function was introduced in 2.64. It's a safer version of getpwnam, and also simpler to use than getpwnam_r. Currently, it's only use by the next patch in qemu-ga, which doesn't (well well...) need the thread safety guarantees. Since the fallback version is still

[PULL v2 03/12] qga-win: Fix guest-get-devices error API violations

2020-11-02 Thread Michael Roth
From: Markus Armbruster The Error ** argument must be NULL, _abort, _fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call.

[PULL v2 11/12] meson: minor simplification

2020-11-02 Thread Michael Roth
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Michael Roth --- qga/meson.build | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qga/meson.build b/qga/meson.build index 635de9af41..4cb3b3f259 100644 --- a/qga/meson.build +++ b/qga/meson.build

[PULL v2 04/12] qga: Flatten simple union GuestDeviceId

2020-11-02 Thread Michael Roth
From: Markus Armbruster Simple unions are simpler than flat unions in the schema, but more complicated in C and on the QMP wire: there's extra indirection in C and extra nesting on the wire, both pointless. They should be avoided in new code. GuestDeviceId was recently added for

[PULL v2 00/12] qemu-ga patch queue for soft-freeze

2020-11-02 Thread Michael Roth
Hi Peter, Sorry to get these out so late, for some inexplicable reason my email client decided to flag all responses v1 as spam and I didn't notice until I double-checked the archives this morning. I've fixed the gcc-on-BSD and clang-on-linux issues you pointed out (PATCH 6) and added proper

[PULL v2 07/12] qga: add implementation of guest-get-disks for Windows

2020-11-02 Thread Michael Roth
From: Tomáš Golembiovský The command lists all the physical disk drives. Unlike for Linux partitions and virtual volumes are not listed. Example output: { "return": [ { "name": ".\\PhysicalDrive0", "partition": false, "address": { "serial": "QM1",

[PULL v2 02/12] qga: Use common time encoding for guest-get-devices 'driver-date'

2020-11-02 Thread Michael Roth
From: Markus Armbruster guest-get-devices returns 'driver-date' as string in the format -MM-DD. Goes back to recent commit 2e4211cee4 "qga: add command guest-get-devices for reporting VirtIO devices". We should avoid use of multiple encodings for the same kind of data. Especially string

[PULL v2 10/12] qga: add *reset argument to ssh-add-authorized-keys

2020-11-02 Thread Michael Roth
From: Marc-André Lureau I prefer 'reset' over 'clear', since 'clear' and keys may have some other relations or meaning. Signed-off-by: Marc-André Lureau Signed-off-by: Michael Roth --- qga/commands-posix-ssh.c | 53 qga/qapi-schema.json | 3 ++-

Re: [PATCH-for-5.2] target/mips: Deprecate nanoMIPS ISA

2020-11-02 Thread Richard Henderson
On 11/2/20 12:27 PM, Philippe Mathieu-Daudé wrote: > The nanoMIPS ISA has been announced in 2018 for various projects: > > GCC: https://gcc.gnu.org/legacy-ml/gcc/2018-05/msg00012.html > Linux: https://lwn.net/Articles/753605/ > QEMU:

Re: [PATCH v11 09/10] virtio-iommu: Set supported page size mask

2020-11-02 Thread Peter Xu
On Fri, Oct 30, 2020 at 07:05:09PM +0100, Jean-Philippe Brucker wrote: > From: Bharat Bhushan > > The virtio-iommu device can deal with arbitrary page sizes for virtual > endpoints, but for endpoints assigned with VFIO it must follow the page > granule used by the host IOMMU driver. > >

Re: Does QEMU's coverity-scan run need to track coverity issues in dtb or slirp ?

2020-11-02 Thread Peter Maydell
On Mon, 2 Nov 2020 at 20:37, Samuel Thibault wrote: > > Hello, > > Peter Maydell, le lun. 02 nov. 2020 19:54:14 +, a ecrit: > > Do dtc and slirp as upstream projects already track Coverity issues > > We started tracking them yes. OK, so I can just dismiss anything that comes up in slirp/ in

Re: [PATCH-for-5.2] hw/virtio/vhost-backend: Fix Coverity CID 1432871

2020-11-02 Thread Peter Maydell
On Mon, 2 Nov 2020 at 20:36, Philippe Mathieu-Daudé wrote: > > Fix uninitialized value issues reported by Coverity: > > Field 'msg.reserved' is uninitialized when calling write(). > > Reported-by: Coverity (CID 1432864: UNINIT) > Fixes: c471ad0e9bd ("vhost_net: device IOTLB support") >

Re: Does QEMU's coverity-scan run need to track coverity issues in dtb or slirp ?

2020-11-02 Thread Samuel Thibault
Hello, Peter Maydell, le lun. 02 nov. 2020 19:54:14 +, a ecrit: > Do dtc and slirp as upstream projects already track Coverity issues We started tracking them yes. Samuel

[PATCH-for-5.2] hw/virtio/vhost-backend: Fix Coverity CID 1432871

2020-11-02 Thread Philippe Mathieu-Daudé
Fix uninitialized value issues reported by Coverity: Field 'msg.reserved' is uninitialized when calling write(). Reported-by: Coverity (CID 1432864: UNINIT) Fixes: c471ad0e9bd ("vhost_net: device IOTLB support") Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/vhost-backend.c | 4 ++-- 1

Re: [PULL] nvme emulation patches for 5.2

2020-11-02 Thread Peter Maydell
01b43e8c0cc67af7c06d5: > > Merge remote-tracking branch 'remotes/philmd-gitlab/tags/sd-next-20201026' > into staging (2020-10-26 17:19:26 +) > > are available in the Git repository at: > > git://git.infradead.org/qemu-nvme.git tags/pull-nvm

[PATCH-for-5.2] target/mips: Deprecate nanoMIPS ISA

2020-11-02 Thread Philippe Mathieu-Daudé
The nanoMIPS ISA has been announced in 2018 for various projects: GCC: https://gcc.gnu.org/legacy-ml/gcc/2018-05/msg00012.html Linux: https://lwn.net/Articles/753605/ QEMU: https://www.mail-archive.com/qemu-devel@nongnu.org/msg530721.html Unfortunately the links referenced doesn't work

Re: [Bug 1902470] Re: migration with TLS-MultiFD is stuck when the dst-libvirtd service restarts

2020-11-02 Thread Dr. David Alan Gilbert
* zhengchuan (zhengch...@huawei.com) wrote: > Anyone who could help this would be appreciated since we have stuck for three > days:( > > IIUC, the client (Src) has sent first hello message to sever(Dst), however > due to something happened while restarted libvirtd, > The messages is lost, and

Re: [PATCH-for-5.2 v2] hw/mips: Remove the 'r4k' machine

2020-11-02 Thread Philippe Mathieu-Daudé
On 11/2/20 7:50 PM, Philippe Mathieu-Daudé wrote: > We deprecated the support for the 'r4k' machine for the 5.0 release > (commit d32dc61421), which means that our deprecation policy allows > us to drop it in release 5.2. Remove the code. > > To repeat the rationale from the deprecation note: > -

  1   2   3   4   >