[PATCH v3 0/3] various: Remove unnecessary casts

2020-05-12 Thread Philippe Mathieu-Daudé
Remove unnecessary casts using coccinelle scripts. The CPU()/OBJECT() patches don't introduce logical change, The DEVICE() one removes various OBJECT_CHECK() calls. Since v3: - Fixed patch #2 description (Markus) - Add A-b/R-b tags Since v2: - Reword description (Markus) - Add A-b/R-b tags Phil

[PATCH v3 2/3] various: Remove unnecessary OBJECT() cast

2020-05-12 Thread Philippe Mathieu-Daudé
The OBJECT() macro is defined as: #define OBJECT(obj) ((Object *)(obj)) Remove the unnecessary OBJECT() casts when we already know the pointer is of Object type. Patch created mechanically using spatch with this script: @@ typedef Object; Object *o; @@ - OBJECT(o) + o Acked-b

[PATCH v3 3/3] hw: Remove unnecessary DEVICE() cast

2020-05-12 Thread Philippe Mathieu-Daudé
The DEVICE() macro is defined as: #define DEVICE(obj) OBJECT_CHECK(DeviceState, (obj), TYPE_DEVICE) which expands to: ((DeviceState *)object_dynamic_cast_assert((Object *)(obj), (name), __FILE__, __LINE__,

[PATCH v3 1/3] target: Remove unnecessary CPU() cast

2020-05-12 Thread Philippe Mathieu-Daudé
The CPU() macro is defined as: #define CPU(obj) ((CPUState *)(obj)) which expands to: ((CPUState *)object_dynamic_cast_assert((Object *)(obj), (name), __FILE__, __LINE__, __func__)) This assertion can only fail when @obj points to something other th

Re: [PATCH v2 0/3] qom: Few trivial patches

2020-05-12 Thread Philippe Mathieu-Daudé
ping? On 5/4/20 1:56 PM, Philippe Mathieu-Daudé wrote: Some QOM patches worth salvaging while doing housekeeping. Since v1: - Fixed test build failure (patchew) Philippe Mathieu-Daudé (3): qom/object: Move Object typedef to 'qemu/typedefs.h' io/task: Move 'qom/object.h' header to source

[PATCH v3 0/2] scripts: More Python fixes

2020-05-12 Thread Philippe Mathieu-Daudé
Trivial Python3 fixes, again... Since v2: - Remove patch updating MAINTAINERS Since v1: - Added Alex Bennée A-b tags - Addressed John Snow review comments - Use /usr/bin/env - Do not modify os.path (dropped last patch) Philippe Mathieu-Daudé (2): scripts/qemugdb: Remove shebang header sc

[PATCH v3 1/2] scripts/qemugdb: Remove shebang header

2020-05-12 Thread Philippe Mathieu-Daudé
These scripts are loaded as plugin by GDB (and they don't have any __main__ entry point). Remove the shebang header. Acked-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- scripts/qemugdb/__init__.py | 3 +-- scripts/qemugdb/aio.py | 3 +-- scripts/qemugdb/coroutine.py | 3 +--

[PATCH v3 2/2] scripts/qmp: Use Python 3 interpreter

2020-05-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- scripts/qmp/qom-get | 2 +- scripts/qmp/qom-list | 2 +- scripts/qmp/qom-set | 2 +- scripts/qmp/qom-tree | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/qmp/qom-get b/scripts/qmp/qom-get index 007b4cd442..7c5ede91bb 10075

Re: [PATCH 1/2] hw/mips/mips_int: De-duplicate KVM interrupt delivery

2020-05-12 Thread Philippe Mathieu-Daudé
On 4/29/20 10:48 AM, chen huacai wrote: Hi, Philippe, On Wed, Apr 29, 2020 at 4:30 PM Philippe Mathieu-Daudé wrote: Refactor duplicated code in a single place. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_int.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-)

Re: [PATCH 2/2] target/mips/kvm: Assert unreachable code is not used

2020-05-12 Thread Philippe Mathieu-Daudé
+Paolo On 4/29/20 10:29 AM, Philippe Mathieu-Daudé wrote: This code must not be used outside of KVM. Abort if it is. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/kvm.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/mips/kvm.c b/target/mips/kvm.c

Re: [RFC PATCH 0/3] hw/net/tulip: Fix LP#1874539

2020-05-12 Thread Philippe Mathieu-Daudé
Hi Jason, On 4/27/20 5:32 AM, Jason Wang wrote: On 2020/4/26 下午3:57, Peter Maydell wrote: On Sun, 26 Apr 2020 at 03:50, Jason Wang  wrote: Looks good to me. Would you please send a formal patch and cc Peter. Consider we are about to release 5.0, it's better for him to apply the patch direct

[PATCH] i386/kvm: fix a use-after-free when vcpu plug/unplug

2020-05-12 Thread Pan Nengyuan
When we hotplug vcpus, cpu_update_state is added to vm_change_state_head in kvm_arch_init_vcpu(). But it forgot to delete in kvm_arch_destroy_vcpu() after unplug. Then it will cause a use-after-free access. This patch delete it in kvm_arch_destroy_vcpu() to fix that. Reproducer: virsh setvcpu

Re: [PATCH v1 1/8] s390/sclp: remove SCLPDevice param from prepare_cpu_entries

2020-05-12 Thread David Hildenbrand
On 09.05.20 01:08, Collin Walling wrote: > It was never used in this function, so let's remove it. > > Signed-off-by: Collin Walling > --- > hw/s390x/sclp.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c > index ede056b3ef..156ff

Re: [PATCH v1 3/8] s390/sclp: rework sclp boundary and length checks

2020-05-12 Thread David Hildenbrand
On 09.05.20 01:08, Collin Walling wrote: > Let's factor out the SCLP boundary and length checks > into separate functions. > > Signed-off-by: Collin Walling > --- > hw/s390x/sclp.c | 41 +++-- > 1 file changed, 35 insertions(+), 6 deletions(-) > > diff --git

Re: [PATCH v1 4/8] s390/sclp: read sccb from mem based on sccb length

2020-05-12 Thread David Hildenbrand
On 09.05.20 01:08, Collin Walling wrote: > The header of the SCCB contains the actual length of the > SCCB. Instead of using a static 4K size, let's allow > for a variable size determined by the value set in the > header. The proper checks are already in place to ensure > the SCCB length is suffice

how to extend to load COFF executable image file

2020-05-12 Thread xiaolei
Hi all, I attempt to add DSP architecture support for some TI processor, based on QEMU 4.2. When I work on the executable file loading , I try to load COFF executable file. Following the ELF file processing scheme, I thought I could write a function similar to : rom_add_elf_program(l

Re: [PATCH v5 0/7] dwc-hsotg (aka dwc2) USB host controller emulation

2020-05-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200512064900.28554-1-pauld...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200512064900.28554-1-pauld...@gmail.com Subject: [PATCH v5 0/7] dwc-hsotg (aka dwc2) USB host controll

Re: Qemu, VNC and non-US keymaps

2020-05-12 Thread B3r3n
Hello Daniel, all, I am a bit confused. Ok, RFB protocol should be the solution that solves all, sending scancodes rather than doing keysyms stuff. No pb for me. So I removed my '-k fr' to my Qemu VM start as it was before. However, reading TightVNC & noVNC docs, both are able to perform RFB.

[PATCH v2] linux-user: support of semtimedop syscall

2020-05-12 Thread Matus Kysel
We should add support of semtimedop syscall as new version of glibc 2.31 uses semop based on semtimedop (commit: https://gitlab.com/freedesktop-sdk/mirrors/sourceware/glibc/-/commit/765cdd0bffd77960ae852104fc4ea5edcdb8aed3 ). Signed-off-by: Matus Kysel --- linux-user/syscall.c | 34 +++

[PATCH v2 0/3] hw: Use qdev gpio rather than qemu_allocate_irqs()

2020-05-12 Thread Philippe Mathieu-Daudé
Use a coccinelle script to convert few qemu_allocate_irqs() calls to the qdev gpio API. One memory leak removed in hw/openrisc/pic_cpu.c Since v1: - Referrenced Coverity CID (Stafford) - Reword AHCI description (Zoltan) Philippe Mathieu-Daudé (3): hw/ide/ahci: Use qdev gpio rather than qemu_al

[PATCH v2 1/3] hw/ide/ahci: Use qdev gpio rather than qemu_allocate_irqs()

2020-05-12 Thread Philippe Mathieu-Daudé
When plugging/unplugging devices on a AHCI bus, we might leak the memory returned by qemu_allocate_irqs(). We can avoid this leak by switching to using qdev_init_gpio_in(); the base class finalize will free the irqs that this allocates under the hood. Patch created mechanically using spatch with t

[PATCH v2 3/3] hw/openrisc/pic_cpu: Use qdev gpio rather than qemu_allocate_irqs()

2020-05-12 Thread Philippe Mathieu-Daudé
Coverity points out (CID 1421934) that we are leaking the memory returned by qemu_allocate_irqs(). We can avoid this leak by switching to using qdev_init_gpio_in(); the base class finalize will free the irqs that this allocates under the hood. Patch created mechanically using spatch with this scri

[PATCH v2 2/3] hw/mips/mips_int: Use qdev gpio rather than qemu_allocate_irqs()

2020-05-12 Thread Philippe Mathieu-Daudé
Switch to using the qdev gpio API which is preferred over qemu_allocate_irqs(). One step to eventually deprecate and remove qemu_allocate_irqs() one day. Patch created mechanically using spatch with this script inspired from commit d6ef883d9d7: @@ typedef qemu_irq; identifier irqs, handler;

Re: [PATCH] i386/kvm: fix a use-after-free when vcpu plug/unplug

2020-05-12 Thread Philippe Mathieu-Daudé
On 5/12/20 3:39 PM, Pan Nengyuan wrote: When we hotplug vcpus, cpu_update_state is added to vm_change_state_head in kvm_arch_init_vcpu(). But it forgot to delete in kvm_arch_destroy_vcpu() after unplug. Then it will cause a use-after-free access. This patch delete it in kvm_arch_destroy_vcpu() t

[PATCH 1/1] NetBSD/arm build fix

2020-05-12 Thread Nick Hudson
Fix building on NetBSD/arm by extracting the FSR value from the correct siginfo_t field. Signed-off-by: Nick Hudson --- accel/tcg/user-exec.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 52359949df..3637626456 100644 --- a/ac

Re: [PATCH 1/4] fuzz: add datadir for oss-fuzz compatability

2020-05-12 Thread Darren Kenny
On Monday, 2020-05-11 at 23:01:30 -04, Alexander Bulekov wrote: > This allows us to keep pc-bios in executable_dir/pc-bios, rather than > executable_dir/../pc-bios, which is incompatible with oss-fuzz' file > structure. > > Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny > --- > inc

Re: [PATCH 2/4] fuzz: fix typo in i440fx-qtest-reboot arguments

2020-05-12 Thread Darren Kenny
On Monday, 2020-05-11 at 23:01:31 -04, Alexander Bulekov wrote: > Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny > --- > tests/qtest/fuzz/i440fx_fuzz.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/qtest/fuzz/i440fx_fuzz.c b/tests/qtest/fuzz/i440fx_

Re: [PATCH 4/4] fuzz: run the main-loop in fork-server process

2020-05-12 Thread Darren Kenny
On Monday, 2020-05-11 at 23:01:33 -04, Alexander Bulekov wrote: > Without this, the time since the last main-loop keeps increasing, as the > fuzzer runs. The forked children need to handle all the "past-due" > timers, slowing them down, over time. With this change, the > parent/fork-server process

Re: [PATCH 3/4] fuzz: add mangled object name to linker script

2020-05-12 Thread Darren Kenny
On Monday, 2020-05-11 at 23:01:32 -04, Alexander Bulekov wrote: > Previously, we relied on "FuzzerTracePC*(.bss*)" to place libfuzzer's > fuzzer::TPC object into our contiguous shared-memory region. This does > not work for some libfuzzer builds, so this addition identifies the > region by its mang

Re: [PATCH v3 2/2] char-file: add test for distinct path= and pathin=

2020-05-12 Thread Darren Kenny
Hi Alex, On Monday, 2020-05-11 at 23:47:50 -04, Alexander Bulekov wrote: > Signed-off-by: Alexander Bulekov Thanks for making those changes. Reviewed-by: Darren Kenny Thanks, Darren. > --- > tests/test-char.c | 96 +++ > 1 file changed, 96 insert

Re: [PATCH] i386/kvm: fix a use-after-free when vcpu plug/unplug

2020-05-12 Thread Pan Nengyuan
On 5/12/2020 3:54 PM, Philippe Mathieu-Daudé wrote: > On 5/12/20 3:39 PM, Pan Nengyuan wrote: >> When we hotplug vcpus, cpu_update_state is added to vm_change_state_head >> in kvm_arch_init_vcpu(). But it forgot to delete in kvm_arch_destroy_vcpu() >> after >> unplug. Then it will cause a use-a

Re: [PATCH 04/12] hw/mips/fuloong2e: Fix typo in Fuloong machine name

2020-05-12 Thread Philippe Mathieu-Daudé
On 5/11/20 10:27 AM, Aleksandar Markovic wrote: пон, 11. мај 2020. у 10:12 Aleksandar Markovic је написао/ла: пон, 11. мај 2020. у 08:52 chen huacai је написао/ла: Hi, Philippe and Alexandar, On Mon, May 11, 2020 at 2:38 PM Philippe Mathieu-Daudé wrote: On 5/11/20 8:21 AM, Aleksandar Ma

Re: [PATCH 2/4] fuzz: fix typo in i440fx-qtest-reboot arguments

2020-05-12 Thread Philippe Mathieu-Daudé
On 5/12/20 5:01 AM, Alexander Bulekov wrote: Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/i440fx_fuzz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/fuzz/i440fx_fuzz.c b/tests/qtest/fuzz/i440fx_fuzz.c index ab5f112584..90e75ffaea 100644 --- a/tests/

Re: [PATCH RESEND v6 01/36] memory: alloc RAM from file at offset

2020-05-12 Thread Stefan Hajnoczi
On Wed, Apr 22, 2020 at 09:13:36PM -0700, elena.ufimts...@oracle.com wrote: > From: Jagannathan Raman > > Allow RAM MemoryRegion to be created from an offset in a file, instead > of allocating at offset of 0 by default. This is needed to synchronize > RAM between QEMU & remote process. > > Signe

AW: [PATCH 1/1] tricore: added AURIX TC277 D-Step TriBoard

2020-05-12 Thread Konopik, Andreas (EFS-GH2)
Hello Philippe, thank you for your feedback, implementing the TriBoard within an SoC structure seems to be best practice. We will rewrite the patch accordingly. I also attached an elf with an empty main-function to test the Machine. Best regards, Andreas > -Ursprüngliche Nachricht- >

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-05-12 Thread Nikolay Igotti
--- counter.c #include #include #include #include #include #include #include #include QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; // Files with descriptors after this one are intercepted for instruction counting marks. #define CATCH_BASE 0xcafebabe static uint64_

Re: AW: [PATCH 1/1] tricore: added AURIX TC277 D-Step TriBoard

2020-05-12 Thread Philippe Mathieu-Daudé
On 5/12/20 10:32 AM, Konopik, Andreas (EFS-GH2) wrote: Hello Philippe, thank you for your feedback, implementing the TriBoard within an SoC structure seems to be best practice. We will rewrite the patch accordingly. I also attached an elf with an empty main-function to test the Machine. Than

Re: [PATCH RESEND v6 01/36] memory: alloc RAM from file at offset

2020-05-12 Thread Daniel P . Berrangé
On Wed, Apr 22, 2020 at 09:13:36PM -0700, elena.ufimts...@oracle.com wrote: > From: Jagannathan Raman > > Allow RAM MemoryRegion to be created from an offset in a file, instead > of allocating at offset of 0 by default. This is needed to synchronize > RAM between QEMU & remote process. Can you e

Re: [PATCH 2/5] io/channel.c,io/channel-socket.c: Add yank feature

2020-05-12 Thread Daniel P . Berrangé
On Mon, May 11, 2020 at 10:00:42PM +0200, Lukas Straub wrote: > On Mon, 11 May 2020 12:51:46 +0100 > Daniel P. Berrangé wrote: > > > On Mon, May 11, 2020 at 01:14:41PM +0200, Lukas Straub wrote: > > > Add qio_channel_set_yank function to channel and to channel-socket, > > > which will register a

Re: [PATCH 3/5] block/nbd.c: Add yank feature

2020-05-12 Thread Daniel P . Berrangé
On Mon, May 11, 2020 at 07:05:24PM +0200, Lukas Straub wrote: > On Mon, 11 May 2020 17:19:09 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Lukas Straub (lukasstra...@web.de) wrote: > > > Add yank option, pass it to the socket-channel and register a yank > > > function which sets s->state = NBD_

Re: [PATCH v3 1/2] scripts/qemugdb: Remove shebang header

2020-05-12 Thread Kevin Wolf
Am 12.05.2020 um 09:06 hat Philippe Mathieu-Daudé geschrieben: > These scripts are loaded as plugin by GDB (and they don't > have any __main__ entry point). Remove the shebang header. > > Acked-by: Alex Bennée > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/qemugdb/__init__.py | 3 +

Re: [PATCH RESEND v6 11/36] multi-process: define mpqemu-link object

2020-05-12 Thread Stefan Hajnoczi
On Wed, Apr 22, 2020 at 09:13:46PM -0700, elena.ufimts...@oracle.com wrote: > From: Jagannathan Raman > > Defines mpqemu-link object which forms the communication link between > QEMU & emulation program. > Adds functions to configure members of mpqemu-link object instance. > Adds functions to sen

Re: [PATCH 4/5] chardev/char-socket.c: Add yank feature

2020-05-12 Thread Daniel P . Berrangé
On Mon, May 11, 2020 at 01:14:47PM +0200, Lukas Straub wrote: > Add yank option which is passed to the socket-channel. > > Signed-off-by: Lukas Straub > --- > chardev/char-socket.c | 8 > chardev/char.c| 3 +++ > qapi/char.json| 5 - > 3 files changed, 15 insertions(

[PATCH] qemu-nbd: Close inherited stderr

2020-05-12 Thread Raphael Pour
Hello, after e6df58a5, the inherited stderr 'old_stderr' won't get closed anymore if 'fork_process' is false. This causes other processes relying on EOF to infinitely block or crash. From 47ab9b517038d13117876a8bb3ef45c53d7f2f9e Mon Sep 17 00:00:00 2001 From: "Raphael Pour" Date: Tue, 12 May 202

Re: [PATCH v3 2/2] scripts/qmp: Use Python 3 interpreter

2020-05-12 Thread Kevin Wolf
Am 12.05.2020 um 09:06 hat Philippe Mathieu-Daudé geschrieben: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf

[Bug 1877794] Re: Constant Folding on 64-bit Subtraction causes SIGILL on linux-user glxgears ppc64le to x86_64 by way of generating bad shift instruction with c=-1

2020-05-12 Thread Laurent Vivier
QEMU has been selected to have a GSoC intern to work on new ioctl(): https://wiki.qemu.org/Google_Summer_of_Code_2020#Extend_linux-user_syscalls_and_ioctls Perhaps he can help you by working on DRM ioctl()? Perhaps you can send an RFC series to the QEMU mailing list? -- You received this bug not

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-12 Thread Daniel P . Berrangé
On Mon, May 11, 2020 at 08:12:18PM +0200, Lukas Straub wrote: > On Mon, 11 May 2020 12:49:47 +0100 > Daniel P. Berrangé wrote: > > > On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > > > Hello Everyone, > > > In many cases, if qemu has a network connection (qmp, migration, chardev,

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-12 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, May 11, 2020 at 08:12:18PM +0200, Lukas Straub wrote: > > On Mon, 11 May 2020 12:49:47 +0100 > > Daniel P. Berrangé wrote: > > > > > On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > > > > Hello Everyone, > > > > In many

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-12 Thread Dima Stepanov
On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: > > On 2020/5/11 下午5:11, Dima Stepanov wrote: > >On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: > >>On 2020/4/30 下午9:36, Dima Stepanov wrote: > >>>Since disconnect can happen at any time during initialization not all > >>>vri

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-12 Thread Dr. David Alan Gilbert
* Lukas Straub (lukasstra...@web.de) wrote: > On Mon, 11 May 2020 12:49:47 +0100 > Daniel P. Berrangé wrote: > > > On Mon, May 11, 2020 at 01:14:34PM +0200, Lukas Straub wrote: > > > Hello Everyone, > > > In many cases, if qemu has a network connection (qmp, migration, chardev, > > > etc.) > >

Re: Qemu, VNC and non-US keymaps

2020-05-12 Thread Daniel P . Berrangé
On Tue, May 12, 2020 at 09:45:20AM +0200, B3r3n wrote: > Hello Daniel, all, > > I am a bit confused. > > Ok, RFB protocol should be the solution that solves all, sending scancodes > rather than doing keysyms stuff. No pb for me. > So I removed my '-k fr' to my Qemu VM start as it was before. > >

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-12 Thread Dima Stepanov
On Tue, May 12, 2020 at 11:47:34AM +0800, Li Feng wrote: > Hi, Dima. > > If vhost_migration_log return < 0, then vhost_log_global_start will > trigger a crash. > Does your patch have process this abort? > If a disconnect happens in the migration stage, the correct operation > is to stop the migrat

Re: how to extend to load COFF executable image file

2020-05-12 Thread Peter Maydell
On Tue, 12 May 2020 at 08:41, xiaolei <1482995...@qq.com> wrote: > > Hi all, > I attempt to add DSP architecture support for some TI processor, based on > QEMU 4.2. Don't try to add new code to QEMU based on an old version. You should always work with the head-of-git. Otherwise you'll be dealin

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-12 Thread Lukas Straub
On Mon, 11 May 2020 16:46:45 +0100 "Dr. David Alan Gilbert" wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > ... > > That way if QEMU does get stuck, you can start by tearing down the > > least distruptive channel. eg try tearing down the migration connection > > first (which shou

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-12 Thread Dima Stepanov
On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: > > On 2020/5/11 下午5:25, Dima Stepanov wrote: > >On Mon, May 11, 2020 at 11:15:53AM +0800, Jason Wang wrote: > >>On 2020/4/30 下午9:36, Dima Stepanov wrote: > >>>If vhost-user daemon is used as a backend for the vhost device, then we > >>>s

Re: SBSA-REF maintainer email bouncing

2020-05-12 Thread Leif Lindholm
On Tue, May 12, 2020 at 08:34:13 +0200, Philippe Mathieu-Daudé wrote: > Hello, > > Radoslaw Biernacki is listed as maintainer for the SBSA-REF board. > > His radoslaw.bierna...@linaro.org email address no longer works, > apparently "Radoslaw Biernacki no longer works for Linaro". That was probab

Re: [PATCH 0/2] 9pfs: regression init_in_iov_from_pdu truncating size

2020-05-12 Thread Greg Kurz
On Sun, 10 May 2020 19:41:52 +0200 Christian Schoenebeck wrote: > Stefano, looks like your original patch needs some more fine tuning: > > https://bugs.launchpad.net/bugs/1877688 > > Please check if the assumptions I made about Xen are correct, and please > also test whether these changes still

Re: [PATCH v2 1/5] qemu-img: remove check that cvtnum value > MAX_INT

2020-05-12 Thread Eyal Moscovici
On 07/05/2020 0:49, Eric Blake wrote: On 5/6/20 4:34 PM, Eyal Moscovici wrote: Following commit f46bfdbfc8f95cf65d7818ef68a801e063c40332 (util/cutils: Change qemu_strtosz*() from int64_t to uint64_t) which added a similar check to cvtnum. As a result there is no need to check it separately ou

[RFC v3 for Linux] virtio_balloon: Add VIRTIO_BALLOON_VQ_INFLATE_CONT to handle THP split issue

2020-05-12 Thread Hui Zhu
The first and second version are in [1] and [2]. According to the comments from Michael, I updated the patch. 1. Removed the separate vq inflate_cont_vq and just use inflate_vq to transport inflate pages. 2. Add two max_pages_order and current_pages_order to virtio_balloon_config instead of p

[RFC v3 for QEMU] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT

2020-05-12 Thread Hui Zhu
If the guest kernel has many fragmentation pages, use virtio_balloon will split THP of QEMU when it calls MADV_DONTNEED madvise to release the balloon pages. Set option cont-pages to on will open flags VIRTIO_BALLOON_VQ_INFLATE_CONT and set default continuous pages order to THP order. Then It will

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-12 Thread Daniel P . Berrangé
On Tue, May 12, 2020 at 11:32:06AM +0200, Lukas Straub wrote: > On Mon, 11 May 2020 16:46:45 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > ... > > > That way if QEMU does get stuck, you can start by tearing down the > > > least distruptive

Re: [PATCH v2 2/5] qemu_img: add error report to cvtnum

2020-05-12 Thread Eyal Moscovici
On 07/05/2020 0:59, Eric Blake wrote: On 5/6/20 4:34 PM, Eyal Moscovici wrote: All calls to cvtnum check the return value and print the same error message more or less. And so error reporting moved to cvtnum to reduce duplicate code and provide a single error message. Acked-by: Mark Kanda

Re: [PATCH v2 5/5] qemu-img: Add --start-offset and --max-length to map

2020-05-12 Thread Eyal Moscovici
On 07/05/2020 1:04, Eric Blake wrote: On 5/6/20 4:34 PM, Eyal Moscovici wrote: The mapping operation of large disks especially ones stored over a long chain of QCOW2 files can take a long time to finish. Additionally when mapping fails there was no way recover by restarting the mapping from th

[PATCH v9] audio/jack: add JACK client audiodev

2020-05-12 Thread Geoffrey McRae
This commit adds a new audiodev backend to allow QEMU to use JACK as both an audio sink and source. Signed-off-by: Geoffrey McRae --- audio/Makefile.objs| 5 + audio/audio.c | 1 + audio/audio_template.h | 2 + audio/jackaudio.c | 667 +

Re: [PATCH v3 7/9] qcow2: Expose bitmaps' size during measure

2020-05-12 Thread Nir Soffer
On Fri, May 8, 2020 at 9:03 PM Eric Blake wrote: > > It's useful to know how much space can be occupied by qcow2 persistent > bitmaps, even though such metadata is unrelated to the guest-visible > data. Report this value as an additional field, present when > measuring an existing image and the o

[Bug 1657538] Re: qemu 2.7.x 2.8 softmmu dont work on BE machine

2020-05-12 Thread Thomas Huth
** Bug watch removed: Red Hat Bugzilla #1332449 https://bugzilla.redhat.com/show_bug.cgi?id=1332449 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1657538 Title: qemu 2.7.x 2.8 softmmu dont work

Re: [PATCH RESEND v6 12/36] multi-process: add functions to synchronize proxy and remote endpoints

2020-05-12 Thread Stefan Hajnoczi
On Wed, Apr 22, 2020 at 09:13:47PM -0700, elena.ufimts...@oracle.com wrote: > From: Jagannathan Raman > > In some cases, for example MMIO read, QEMU has to wait for the remote to > complete a command before proceeding. An eventfd based mechanism is > added to synchronize QEMU & remote process. W

Re: [PATCH RESEND v3 0/2] Makefile: libfdt: build only the strict necessary

2020-05-12 Thread Claudio Fontana
On 5/11/20 8:33 AM, David Gibson wrote: > On Wed, Apr 15, 2020 at 10:16:52AM +0200, Claudio Fontana wrote: >> On 4/14/20 4:03 AM, David Gibson wrote: >>> On Sat, Apr 11, 2020 at 11:31:48AM +0200, Claudio Fontana wrote: v2 -> v3: * changed into a 2 patch series; in the second patch we

Re: [PATCH RESEND v6 13/36] multi-process: setup PCI host bridge for remote device

2020-05-12 Thread Stefan Hajnoczi
On Wed, Apr 22, 2020 at 09:13:48PM -0700, elena.ufimts...@oracle.com wrote: > diff --git a/include/remote/pcihost.h b/include/remote/pcihost.h > new file mode 100644 > index 00..7aca9ccaf1 > --- /dev/null > +++ b/include/remote/pcihost.h > @@ -0,0 +1,45 @@ > +/* > + * PCI Host for remote de

[PATCH v4 0/6] scripts: More Python fixes

2020-05-12 Thread Philippe Mathieu-Daudé
Trivial Python3 fixes, again... Since v3: - Fixed missing scripts/qemugdb/timers.py (kwolf) - Cover more scripts - Check for __main__ in few scripts Since v2: - Remove patch updating MAINTAINERS Since v1: - Added Alex Bennée A-b tags - Addressed John Snow review comments - Use /usr/bin/env -

[PATCH v4 1/6] scripts/qemugdb: Remove shebang header

2020-05-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé These scripts are loaded as plugin by GDB (and they don't have any __main__ entry point). Remove the shebang header. Acked-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- scripts/qemugdb/__init__.py | 3 +-- scripts/qemugdb/aio.py | 3 +-- scripts

[PATCH v4 6/6] tests/migration/guestperf: Use Python 3 interpreter

2020-05-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- tests/migration/guestperf-batch.py | 2 +- tests/migration/guestperf-plot.py | 2 +- tests/migration/guestperf.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/migration/guestperf-batch.py b/tests/migration/guestperf

[PATCH v4 5/6] scripts/modules/module_block: Use Python 3 interpreter & add pseudo-main

2020-05-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- scripts/modules/module_block.py | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/scripts/modules/module_block.py b/scripts/modules/module_block.py index f23191fac1..2e7021b952 100644 --- a/scripts/modul

[PATCH v4 2/6] scripts/qemu-gdb: Use Python 3 interpreter

2020-05-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- scripts/qemu-gdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qemu-gdb.py b/scripts/qemu-gdb.py index f2a305c42e..e0bfa7b5a4 100644 --- a/scripts/qemu-gdb.py +++ b/scripts/qemu-gdb.py @@

[PATCH v4 3/6] scripts/qmp: Use Python 3 interpreter

2020-05-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- scripts/qmp/qom-get | 2 +- scripts/qmp/qom-list | 2 +- scripts/qmp/qom-set | 2 +- scripts/qmp/qom-tree | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/qmp/qom-get b/scripts/qmp/qom-get ind

[PATCH v4 4/6] scripts/kvm/vmxcap: Use Python 3 interpreter and add pseudo-main()

2020-05-12 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- scripts/kvm/vmxcap | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap index 971ed0e721..6fe66d5f57 100755 --- a/scripts/kvm/vmxcap +++ b/scripts/kvm/vmxcap @@ -1,4 +1,4 @@ -#!/usr/bin/python

Re: [PATCH v3 1/2] scripts/qemugdb: Remove shebang header

2020-05-12 Thread Philippe Mathieu-Daudé
On 5/12/20 10:55 AM, Kevin Wolf wrote: Am 12.05.2020 um 09:06 hat Philippe Mathieu-Daudé geschrieben: These scripts are loaded as plugin by GDB (and they don't have any __main__ entry point). Remove the shebang header. Acked-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- scrip

Re: [PATCH RESEND v6 14/36] multi-process: setup a machine object for remote device process

2020-05-12 Thread Stefan Hajnoczi
On Wed, Apr 22, 2020 at 09:13:49PM -0700, elena.ufimts...@oracle.com wrote: > From: Jagannathan Raman > > remote-machine object sets up various subsystems of the remote device > process. Instantiate PCI host bridge object and initialize RAM, IO & > PCI memory regions. > > Signed-off-by: John G J

[PATCH] tests/guest-debug: catch hanging guests

2020-05-12 Thread Alex Bennée
If gdb never actually connected with the guest we need to catch that and clean-up after ourselves. Signed-off-by: Alex Bennée --- tests/guest-debug/run-test.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py index d9af9573b9

Re: [RFC] bdrv_flush: only use fast path when in owned AioContext

2020-05-12 Thread Kevin Wolf
Am 11.05.2020 um 18:50 hat Stefan Reiter geschrieben: > Just because we're in a coroutine doesn't imply ownership of the context > of the flushed drive. In such a case use the slow path which explicitly > enters bdrv_flush_co_entry in the correct AioContext. > > Signed-off-by: Stefan Reiter > ---

Re: [PATCH v3 7/9] qcow2: Expose bitmaps' size during measure

2020-05-12 Thread Max Reitz
On 12.05.20 12:17, Nir Soffer wrote: > On Fri, May 8, 2020 at 9:03 PM Eric Blake wrote: >> >> It's useful to know how much space can be occupied by qcow2 persistent >> bitmaps, even though such metadata is unrelated to the guest-visible >> data. Report this value as an additional field, present w

Re: [PATCH v5 13/15] acpi: drop build_piix4_pm()

2020-05-12 Thread Gerd Hoffmann
On Mon, May 11, 2020 at 09:37:32PM +0200, Igor Mammedov wrote: > On Thu, 7 May 2020 15:16:38 +0200 > Gerd Hoffmann wrote: > > > The _SB.PCI0.PX13.P13C opregion (holds isa device enable bits) > > is not used any more, remove it from DSDT. > > > > Signed-off-by: Gerd Hoffmann > > --- > > hw/i38

Re: [PATCH v4 0/6] scripts: More Python fixes

2020-05-12 Thread Kevin Wolf
Am 12.05.2020 um 12:32 hat Philippe Mathieu-Daudé geschrieben: > Trivial Python3 fixes, again... > > Since v3: > - Fixed missing scripts/qemugdb/timers.py (kwolf) > - Cover more scripts > - Check for __main__ in few scripts I'm not sure if the __main__ check actually provides anything useful in s

Re: [PATCH 01/10] ui/win32-kbd-hook: handle AltGr in a hook procedure

2020-05-12 Thread Gerd Hoffmann
On Sun, May 10, 2020 at 08:42:55PM +0200, Volker Rümelin wrote: > Import win32 keyboard hooking code from project spice-gtk. > +/* > + * This work is licensed under the terms of the GNU GPL, version 2 or > + * (at your option) any later version. See the COPYING file in the > + * top-level direct

Re: [PATCH 02/10] ui/gtk: fix handling of AltGr key on Windows

2020-05-12 Thread Gerd Hoffmann
Hi, > +#ifdef CONFIG_WIN32 > +win32_kbd_set_grab(true); > +#endif Can we have stubs for these (see stubs/ directory for examples) so we can avoid the #ifdefs? thanks, Gerd

Re: [PATCH 03/10] ui/gkt: release all keys on grab-broken-event

2020-05-12 Thread Gerd Hoffmann
On Sun, May 10, 2020 at 08:42:57PM +0200, Volker Rümelin wrote: > There is no way to grab the Ctrl-Alt-Del key combination on > Windows. [ ... ] > +#ifdef CONFIG_WIN32 A comment here would be good (so you can see the reason for this without digging into the git commit log). thanks, Gerd

Re: [PATCH 09/10] ui/gtk: don't pass on win keys without keyboard grab

2020-05-12 Thread Gerd Hoffmann
On Sun, May 10, 2020 at 08:43:03PM +0200, Volker Rümelin wrote: > This patch applies commit c68f74b02e "win32: do not handle win > keys when the keyboard is not grabbed" from project spice-gtk > to ui/gtk.c. Which issue does this solve? thanks, Gerd

Re: [PATCH 10/10] ui/gtk: use native keyboard scancodes on Windows

2020-05-12 Thread Daniel P . Berrangé
On Sun, May 10, 2020 at 08:43:04PM +0200, Volker Rümelin wrote: > Since GTK 3.22 the function gdk_event_get_scancode() is > available. On Windows this function returns keyboard scancodes > and some extended flags. These raw keyboard scancodes are much > better suited for this use case than the half

Re: [PATCH 2/2] 9pfs: fix init_in_iov_from_pdu truncating size

2020-05-12 Thread Christian Schoenebeck
On Dienstag, 12. Mai 2020 00:09:46 CEST Stefano Stabellini wrote: > On Sun, 10 May 2020, Christian Schoenebeck wrote: > > Commit SHA-1 16724a173049ac29c7b5ade741da93a0f46edff7 introduced > > truncating the response to the currently available transport buffer > > size, which was supposed to fix an 9

Re: [RFC] bdrv_flush: only use fast path when in owned AioContext

2020-05-12 Thread Kevin Wolf
Am 12.05.2020 um 12:57 hat Kevin Wolf geschrieben: > Am 11.05.2020 um 18:50 hat Stefan Reiter geschrieben: > > Just because we're in a coroutine doesn't imply ownership of the context > > of the flushed drive. In such a case use the slow path which explicitly > > enters bdrv_flush_co_entry in the c

Re: [PATCH v4 4/6] scripts/kvm/vmxcap: Use Python 3 interpreter and add pseudo-main()

2020-05-12 Thread Paolo Bonzini
On 12/05/20 12:32, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/kvm/vmxcap | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap > index 971ed0e721..6fe66d5f57 100755 > --- a/scripts/kvm/vm

Re: [PATCH 04/10] ui/gtk: remove unused code

2020-05-12 Thread Philippe Mathieu-Daudé
On 5/10/20 8:42 PM, Volker Rümelin wrote: This code was last used before commit 2ec78706d1 "ui: convert GTK and SDL1 frontends to keycodemapdb". Signed-off-by: Volker Rümelin --- ui/gtk.c | 9 - 1 file changed, 9 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 5de2a75691..c70bfc

Re: [PATCH 05/10] ui/gtk: remove unused variable ignore_keys

2020-05-12 Thread Philippe Mathieu-Daudé
On 5/10/20 8:42 PM, Volker Rümelin wrote: Since the removal of GTK2 code "... in commit 89d85cde7 ..." the code around ignore_keys is unused. See commit 1a01716a30 "gtk: Avoid accel key leakage into guest on console switch" why it was needed before. Signed-off-by: Volker Rümelin With desc

Re: [PATCH 08/10] ui/sdl2-input: use trace-events to debug key events

2020-05-12 Thread Philippe Mathieu-Daudé
On 5/10/20 8:43 PM, Volker Rümelin wrote: Signed-off-by: Volker Rümelin --- ui/sdl2-input.c | 3 +++ ui/trace-events | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index 1f9fe831b3..f068382209 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -2

Re: [PATCH RESEND v6 01/36] memory: alloc RAM from file at offset

2020-05-12 Thread Jag Raman
> On May 12, 2020, at 4:48 AM, Daniel P. Berrangé wrote: > > On Wed, Apr 22, 2020 at 09:13:36PM -0700, elena.ufimts...@oracle.com wrote: >> From: Jagannathan Raman >> >> Allow RAM MemoryRegion to be created from an offset in a file, instead >> of allocating at offset of 0 by default. This is

Re: [PATCH RESEND v6 11/36] multi-process: define mpqemu-link object

2020-05-12 Thread Jag Raman
> On May 12, 2020, at 4:56 AM, Stefan Hajnoczi wrote: > > On Wed, Apr 22, 2020 at 09:13:46PM -0700, elena.ufimts...@oracle.com wrote: >> From: Jagannathan Raman >> >> Defines mpqemu-link object which forms the communication link between >> QEMU & emulation program. >> Adds functions to confi

Re: [libcamera-devel] [virtio-dev] Re: Fwd: Qemu Support for Virtio Video V4L2 driver

2020-05-12 Thread Dmitry Sepp
Hi Laurent, On Montag, 11. Mai 2020 16:31:36 CEST Laurent Pinchart wrote: > > I don't think this would be the right level of abstraction. The V4L2 API > is way too low-level when it comes to camera paravirtualization (and may > not be the only API we'll have in the future). I thus recommend > vir

Re: [PATCH RESEND v6 15/36] multi-process: setup memory manager for remote device

2020-05-12 Thread Stefan Hajnoczi
On Wed, Apr 22, 2020 at 09:13:50PM -0700, elena.ufimts...@oracle.com wrote: > diff --git a/exec.c b/exec.c > index 5b1e414099..1e02e00f00 100644 > --- a/exec.c > +++ b/exec.c > @@ -2371,6 +2371,23 @@ RAMBlock *qemu_ram_alloc_from_file(ram_addr_t size, > MemoryRegion *mr, > > return block; >

Re: [PATCH RESEND v6 14/36] multi-process: setup a machine object for remote device process

2020-05-12 Thread Jag Raman
> On May 12, 2020, at 6:43 AM, Stefan Hajnoczi wrote: > > On Wed, Apr 22, 2020 at 09:13:49PM -0700, elena.ufimts...@oracle.com wrote: >> From: Jagannathan Raman >> >> remote-machine object sets up various subsystems of the remote device >> process. Instantiate PCI host bridge object and init

Re: [PATCH 0/2] use unsigned type for MegasasState fields

2020-05-12 Thread P J P
+-- On Thu, 7 May 2020, P J P wrote --+ | Hello, | | * This series fixes an OOB access issue which may occur when a guest user | sets 's->reply_queue_head' field to a negative(or large positive) value, | via 'struct mfi_init_qinfo' object in megasas_init_firmware(). | | * Second patch updates

  1   2   3   4   >