Re: [PATCH 0/8] arm/virt: add usb support

2020-10-26 Thread Gerd Hoffmann
On Fri, Oct 23, 2020 at 12:36:05PM +0100, Peter Maydell wrote: > On Fri, 23 Oct 2020 at 08:10, Gerd Hoffmann wrote: > > > > Bring new microvm goodies to arm virt too. Wire up > > -machine usb=on, add sysbus-xhci in case it is enabled. > > So my question here is the usual one -- why can't we > ju

Re: [PATCH 1/4] microvm: make number of virtio transports runtime configurable

2020-10-26 Thread Gerd Hoffmann
Hi, > > +mms->virtio_irq_base = 5; > > +mms->virtio_num_transports = 8; > > +if (x86_machine_is_acpi_enabled(x86ms)) { > > +mms->virtio_irq_base = 16; > > +} > > can we unify and use the same base in both cases? Well, without ACPI the IO-APIC detection seems to not work

Re: [PATCH v2 2/9] configure: cross-compiling without cross_prefix

2020-10-26 Thread Paolo Bonzini
On 25/10/20 20:24, Joelle van Dyne wrote: > As the patch stands --cross-prefix="" works but I like having the > --enable-cross-compile option because it's more clear of the intention > (in logs and such). I've been struggling to come up with a concise > modification to the help text for --cross-pre

Re: [PATCH] win32: boot broken when bind & data dir are the same

2020-10-26 Thread Paolo Bonzini
On 24/10/20 11:14, Sunil Muthuswamy wrote: > With upstream commit#ea1edcd7da1a "vl: relocate paths to data > directories", the data dir logic was unified between POSIX & > Win32. That patch moved to using 'get_relocated_path()', to > find the data dir. There is a latent bug in get_relocated_path >

Re: [PATCH] hw/sd: Zero out function selection fields before being populated

2020-10-26 Thread Philippe Mathieu-Daudé
On 10/24/20 3:49 AM, Bin Meng wrote: From: Bin Meng The function selection fields (399:376) should be zeroed out to prevent leftover from being or'ed into the switch function status data structure. This fixes the boot failure as seen in the acceptance testing on the orangepi target. Fixes: b6

Re: [PATCH v2] tests/acceptance: Test case for detecting -object crashes

2020-10-26 Thread Philippe Mathieu-Daudé
On 10/13/20 8:01 PM, Cleber Rosa wrote: On Tue, Oct 13, 2020 at 01:46:11PM -0400, Eduardo Habkost wrote: On Sun, Oct 11, 2020 at 11:18:59PM -0400, Cleber Rosa wrote: On Sat, Oct 10, 2020 at 09:54:16AM +0200, Philippe Mathieu-Daudé wrote: On 10/9/20 10:29 PM, Eduardo Habkost wrote: Add a simp

[Bug 1901440] Re: Instability in IVSHMEM after updating QEMU 4.2 -> 5.0

2020-10-26 Thread Thomas Huth
Can you reproduce this with the latest upstream QEMU release (v5.1)? Or did you only try with the versions that ship with Ubuntu? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1901440 Title: Instab

Re: [PATCH v2] tests/acceptance: Test case for detecting -object crashes

2020-10-26 Thread Philippe Mathieu-Daudé
Hi Eduardo, Thomas, On 10/9/20 10:29 PM, Eduardo Habkost wrote: Add a simple test case that will run QEMU directly (without QMP) just to check for crashes when using `-object`. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * "Running command:" log message instead of "Command:" (Cleber)

Re: [PATCH 4/4] microvm: reconfigure irqs if second ioapic is available

2020-10-26 Thread Gerd Hoffmann
On Fri, Oct 23, 2020 at 08:52:09PM +0200, Igor Mammedov wrote: > On Fri, 16 Oct 2020 13:43:28 +0200 > Gerd Hoffmann wrote: > > > Use GSI 16+ for PCIe (needs acpi_build_madt() tweak). > > Use GSI 24+ (second ioapic) for virtio-mmio. > > Use all irq lines of the second ioapic > > and allow up to 24

[PATCH 0/9] dev-serial: minor fixes and improvements

2020-10-26 Thread Mark Cave-Ayland
This series comes from a client project that I have been working on over the past few months which involves communicating with serial hardware and associated simulators using the QEMU USB serial device. With thanks to Craig Stevens at Renesas for giving permission for these patches to be upstreame

[PATCH 2/9] dev-serial: use USB_SERIAL QOM macro for USBSerialState assignments

2020-10-26 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/usb/dev-serial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 7a5fa3770e..77ce89d38b 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -204,7 +204,7 @@ static void usb_s

[PATCH 4/9] dev-serial: add trace-events for baud rate and data parameters

2020-10-26 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/usb/dev-serial.c | 3 +++ hw/usb/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index abc316c7bf..badf8785db 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -307,6 +307,7 @@ static

[PATCH 6/9] dev-serial: add always-plugged property to ensure USB device is always attached

2020-10-26 Thread Mark Cave-Ayland
Some operating systems will generate a new device ID when a USB device is unplugged and then replugged into the USB. If this is done whilst switching between multiple applications over a virtual serial port, the change of device ID requires going back into the OS/application to locate the new dev

[PATCH 1/9] dev-serial: style changes to improve readability and checkpatch fixes

2020-10-26 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/usb/dev-serial.c | 230 1 file changed, 126 insertions(+), 104 deletions(-) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index b1622b7c7f..7a5fa3770e 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-se

[PATCH 3/9] dev-serial: convert from DPRINTF to trace-events

2020-10-26 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/usb/dev-serial.c | 28 ++-- hw/usb/trace-events | 8 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 77ce89d38b..abc316c7bf 100644 --- a/hw/usb/dev-serial.c ++

[PATCH 5/9] dev-serial: replace DeviceOutVendor/DeviceInVendor with equivalent macros from usb.h

2020-10-26 Thread Mark Cave-Ayland
The DeviceOutVendor and DeviceInVendor macros can be replaced with their equivalent VendorDeviceOutRequest and VendorDeviceRequest macros from usb.h. Signed-off-by: Mark Cave-Ayland --- hw/usb/dev-serial.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --

[PATCH 8/9] dev-serial: fix FTDI_GET_MDM_ST response

2020-10-26 Thread Mark Cave-Ayland
The FTDI_GET_MDM_ST response should only return a single byte indicating the modem status with bit 0 cleared (as documented in the Linux ftdi_sio.h header file). Signed-off-by: Mark Cave-Ayland --- hw/usb/dev-serial.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/us

[PATCH 7/9] dev-serial: add support for setting data_bits in QEMUSerialSetParams

2020-10-26 Thread Mark Cave-Ayland
Also implement the behaviour reported in Linux's ftdi_sio.c whereby if an invalid data_bits value is provided then the hardware defaults to using 8. Signed-off-by: Mark Cave-Ayland --- hw/usb/dev-serial.c | 17 + hw/usb/trace-events | 1 + 2 files changed, 18 insertions(+) dif

[PATCH 9/9] dev-serial: store flow control and xon/xoff characters

2020-10-26 Thread Mark Cave-Ayland
Note that whilst the device does not do anything with these values, they are logged with trace events and stored to allow future implementation. The default flow control is set to none at reset as documented in the Linux ftdi_sio.h header file. Signed-off-by: Mark Cave-Ayland --- hw/usb/dev-ser

Re: [PATCH v7 04/17] fuzz: Add DMA support to the generic-fuzzer

2020-10-26 Thread Thomas Huth
On 23/10/2020 17.07, Alexander Bulekov wrote: > When a virtual-device tries to access some buffer in memory over DMA, we > add call-backs into the fuzzer(next commit). The fuzzer checks verifies > that the DMA request maps to a physical RAM address and fills the memory > with fuzzer-provided data.

[PATCH RFC] memory: pause all vCPUs for the duration of memory transactions

2020-10-26 Thread Vitaly Kuznetsov
Currently, KVM doesn't provide an API to make atomic updates to memmap when the change touches more than one memory slot, e.g. in case we'd like to punch a hole in an existing slot. Reports are that multi-CPU Q35 VMs booted with OVMF sometimes print something like X64 Exception Type - 0E(#PF

Re: [RFC PATCH 0/4] tests/acceptance: Test U-Boot/Linux from Armbian 20.08 on Orange Pi PC

2020-10-26 Thread Philippe Mathieu-Daudé
On 10/23/20 3:18 PM, Philippe Mathieu-Daudé wrote: Series meant to help Bin Meng to debug the SD card issue reported by Michael Roth. Philippe Mathieu-Daudé (4): Revert "hw/sd: Fix incorrect populated function switch status data structure" tests/acceptance: Allow running Orange Pi tes

Re: [PATCH 0/6] tests/acceptance: Test the Fuloong 2E machine

2020-10-26 Thread Philippe Mathieu-Daudé
On 10/21/20 12:50 PM, Philippe Mathieu-Daudé wrote: This series add tests for the MIPS Fuloong 2E machine. I have been using these tests for over 1 year now. After recent discussions with Huacai and Mark regarding how to contribute tests for machines using private blob, I think it is time to pub

Re: [PATCH v7 17/17] scripts/oss-fuzz: ignore the generic-fuzz target

2020-10-26 Thread Thomas Huth
On 23/10/2020 17.07, Alexander Bulekov wrote: > generic-fuzz is not a standalone fuzzer - it requires some env variables > to be set. On oss-fuzz, we set these with some predefined > generic-fuzz-{...} targets, that are thin wrappers around generic-fuzz. > Do not make a link for the generic-fuzz fr

Re: [PATCH v1 00/16] RISC-V: Start to remove xlen preprocess

2020-10-26 Thread Bin Meng
Hi Alistair, On Fri, Oct 23, 2020 at 11:44 PM Alistair Francis wrote: > > The RISC-V QEMU port currently has lot of preprocessor directives that > check if we are targetting a 32-bit or 64-bit CPU. This means that the > 64-bit RISC-V target can not run 32-bit CPUs. This is different to most > oth

Re: [PATCH v1 08/16] target/riscv: fpu_helper: Match function defs in HELPER macros

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:44 PM Alistair Francis wrote: > Could you please put some details as to why changing uint64_t to target_ulong (and vice versa) is needed? > Signed-off-by: Alistair Francis > --- > target/riscv/fpu_helper.c | 16 > 1 file changed, 8 insertions(+), 8 d

Re: [PATCH v1 03/16] riscv: virt: Remove target macro conditionals

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:44 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > include/hw/riscv/virt.h | 6 -- > hw/riscv/virt.c | 2 +- > 2 files changed, 1 insertion(+), 7 deletions(-) > Reviewed-by: Bin Meng Tested-by: Bin Meng

Re: [PATCH v1 04/16] hw/riscv: boot: Remove compile time XLEN checks

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:44 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > include/hw/riscv/boot.h | 8 +++--- > hw/riscv/boot.c | 55 ++--- > hw/riscv/sifive_u.c | 2 +- > hw/riscv/spike.c| 3 ++- > hw/riscv/vi

Re: [PATCH v1 01/16] target/riscv: Add a TYPE_RISCV_CPU_BASE CPU

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:44 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.h | 6 ++ > 1 file changed, 6 insertions(+) > Reviewed-by: Bin Meng Tested-by: Bin Meng

Re: [PATCH v1 05/16] hw/riscv: virt: Remove compile time XLEN checks

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:44 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > hw/riscv/virt.c | 32 +--- > 1 file changed, 17 insertions(+), 15 deletions(-) > Reviewed-by: Bin Meng Tested-by: Bin Meng

Re: [PATCH v1 06/16] hw/riscv: spike: Remove compile time XLEN checks

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:44 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > hw/riscv/spike.c | 45 - > 1 file changed, 24 insertions(+), 21 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH v1 02/16] riscv: spike: Remove target macro conditionals

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:44 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > include/hw/riscv/spike.h | 6 -- > hw/riscv/spike.c | 2 +- > 2 files changed, 1 insertion(+), 7 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH v1 07/16] hw/riscv: sifive_u: Remove compile time XLEN checks

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:44 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > hw/riscv/sifive_u.c | 57 - > 1 file changed, 31 insertions(+), 26 deletions(-) > > diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c > index 978c

Re: [PATCH v1 10/16] target/riscv: Specify the XLEN for CPUs

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:45 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.c | 33 +++-- > 1 file changed, 23 insertions(+), 10 deletions(-) > Reviewed-by: Bin Meng Tested-by: Bin Meng

[PATCH 1/4] qga: Add spaces around operator

2020-10-26 Thread AlexChen
Reported-by: Euler Robot Signed-off-by: AlexChen --- qga/channel-win32.c | 6 +++--- qga/commands-posix.c | 4 ++-- qga/commands-win32.c | 24 qga/commands.c | 4 ++-- qga/main.c | 4 ++-- 5 files changed, 21 insertions(+), 21 deletions(-) diff --gi

Re: [PATCH v1 09/16] target/riscv: Add a riscv_cpu_is_32bit() helper function

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:45 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.h | 2 ++ > target/riscv/cpu.c | 9 + > 2 files changed, 11 insertions(+) > Reviewed-by: Bin Meng Tested-by: Bin Meng

Re: [PATCH v1 12/16] target/riscv: cpu_helper: Remove compile time XLEN checks

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:45 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.h| 6 ++--- > target/riscv/cpu_helper.c | 52 --- > 2 files changed, 29 insertions(+), 29 deletions(-) > > diff --git a/target/riscv/

[PATCH 2/4] qga: Delete redundant spaces

2020-10-26 Thread AlexChen
Reported-by: Euler Robot Signed-off-by: AlexChen --- qga/commands-win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 2c341c7bea..de6e07f275 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -1234,7 +1234

Re: [PATCH v1 14/16] target/riscv: cpu: Set XLEN independently from target

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:45 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.c | 25 - > 1 file changed, 16 insertions(+), 9 deletions(-) > Reviewed-by: Bin Meng Tested-by: Bin Meng

[PATCH 4/4] qga: Switch and case should be at the same indent

2020-10-26 Thread AlexChen
Reported-by: Euler Robot Signed-off-by: AlexChen --- qga/main.c | 52 ++-- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/qga/main.c b/qga/main.c index 69660d9abd..33e510ba19 100644 --- a/qga/main.c +++ b/qga/main.c @@ -280,20 +280

Re: [PATCH v1 11/16] target/riscv: cpu: Remove compile time XLEN checks

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:45 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.h | 6 ++ > target/riscv/cpu.c | 17 + > 2 files changed, 11 insertions(+), 12 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH v1 13/16] target/riscv: csr: Remove compile time XLEN checks

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:45 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu_bits.h | 2 - > target/riscv/csr.c | 182 +--- > 2 files changed, 96 insertions(+), 88 deletions(-) > > diff --git a/target/riscv/cpu_b

Re: [PATCH v1 16/16] target/riscv: Consolidate *statush registers

2020-10-26 Thread Bin Meng
On Fri, Oct 23, 2020 at 11:45 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.h| 24 ++- > target/riscv/cpu_bits.h | 14 ++--- > target/riscv/cpu.c| 7 ++- > target/riscv/cpu_helper.c | 41 ++--

[PATCH 3/4] qga: Open brace '{' following struct go on the same

2020-10-26 Thread AlexChen
Reported-by: Euler Robot Signed-off-by: AlexChen --- qga/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index 308ebd6581..69660d9abd 100644 --- a/qga/main.c +++ b/qga/main.c @@ -694,8 +694,7 @@ DWORD WINAPI service_ctrl_handler(DWORD ctrl, DW

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

2020-10-26 Thread AlexChen
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 indent qga/channel-win32.c | 6 ++--- qga/commands-posix.c |

Re: [PATCH V2 02/14] ppc/: fix some comment spelling errors

2020-10-26 Thread Thomas Huth
On 09/10/2020 08.44, zhaolichang wrote: > I found that there are many spelling errors in the comments of > qemu/target/ppc. > I used spellcheck to check the spelling errors and found some errors in the > folder. > > Signed-off-by: zhaolichang > Reviewed-by: David Edmondson > --- > target/ppc/

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-26 Thread Peter Krempa
On Fri, Oct 23, 2020 at 19:27:55 +0200, Igor Mammedov wrote: > On Fri, 23 Oct 2020 11:54:40 -0400 > "Michael S. Tsirkin" wrote: > > > On Fri, Oct 23, 2020 at 09:47:14AM +0300, Marcel Apfelbaum wrote: > > > Hi David, > > > > > > On Fri, Oct 23, 2020 at 6:49 AM David Gibson wrote: > > > > > >

Re: [PATCH v2 0/6] Add support for Control-Flow Integrity

2020-10-26 Thread Daniel P . Berrangé
On Fri, Oct 23, 2020 at 03:33:31PM -0500, Eric Blake wrote: > On 10/23/20 3:06 PM, Daniele Buono wrote: > > v2: Several months (and structural changes in QEMU) have passed since v1. > > While the spirit of the patch is similar, the implementation is changed > > in multiple points, and should addres

Re: [PATCH 1/9] dev-serial: style changes to improve readability and checkpatch fixes

2020-10-26 Thread Samuel Thibault
Mark Cave-Ayland, le lun. 26 oct. 2020 08:33:53 +, a ecrit: > Signed-off-by: Mark Cave-Ayland Reviewed-by: Samuel thibault > --- > hw/usb/dev-serial.c | 230 > 1 file changed, 126 insertions(+), 104 deletions(-) > > diff --git a/hw/usb/dev-seri

Re: [PATCH 2/9] dev-serial: use USB_SERIAL QOM macro for USBSerialState assignments

2020-10-26 Thread Samuel Thibault
Mark Cave-Ayland, le lun. 26 oct. 2020 08:33:54 +, a ecrit: > Signed-off-by: Mark Cave-Ayland Reviewed-by: Samuel Thibault > --- > hw/usb/dev-serial.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c > index 7a5fa3770

Re: [PATCH 3/9] dev-serial: convert from DPRINTF to trace-events

2020-10-26 Thread Samuel Thibault
Mark Cave-Ayland, le lun. 26 oct. 2020 08:33:55 +, a ecrit: > Signed-off-by: Mark Cave-Ayland Reviewed-by: Samuel Thibault > --- > hw/usb/dev-serial.c | 28 ++-- > hw/usb/trace-events | 8 > 2 files changed, 22 insertions(+), 14 deletions(-) > > diff --gi

Re: [PATCH 5/9] dev-serial: replace DeviceOutVendor/DeviceInVendor with equivalent macros from usb.h

2020-10-26 Thread Samuel Thibault
Mark Cave-Ayland, le lun. 26 oct. 2020 08:33:57 +, a ecrit: > The DeviceOutVendor and DeviceInVendor macros can be replaced with their > equivalent VendorDeviceOutRequest and VendorDeviceRequest macros from usb.h. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: Samuel Thibault > --- > hw

Re: [PATCH] ACPI: Avoid infinite recursion when dump-vmstate

2020-10-26 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Fri, 23 Oct 2020 19:54:41 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > On Mon, 19 Oct 2020 17:31:56 +0800 > > > Peng Liang wrote: > > > > > > > There is a field with vmstate_ghes_state as vms

Re: [PATCH 4/9] dev-serial: add trace-events for baud rate and data parameters

2020-10-26 Thread Samuel Thibault
Mark Cave-Ayland, le lun. 26 oct. 2020 08:33:56 +, a ecrit: > Signed-off-by: Mark Cave-Ayland Reviewed-by: Samuel Thibault > --- > hw/usb/dev-serial.c | 3 +++ > hw/usb/trace-events | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c > ind

Re: [PATCH 6/9] dev-serial: add always-plugged property to ensure USB device is always attached

2020-10-26 Thread Samuel Thibault
Mark Cave-Ayland, le lun. 26 oct. 2020 08:33:58 +, a ecrit: > Some operating systems will generate a new device ID when a USB device is > unplugged > and then replugged into the USB. If this is done whilst switching between > multiple > applications over a virtual serial port, the change of d

Re: [PATCH 7/9] dev-serial: add support for setting data_bits in QEMUSerialSetParams

2020-10-26 Thread Samuel Thibault
Mark Cave-Ayland, le lun. 26 oct. 2020 08:33:59 +, a ecrit: > Also implement the behaviour reported in Linux's ftdi_sio.c whereby if an > invalid > data_bits value is provided then the hardware defaults to using 8. > > Signed-off-by: Mark Cave-Ayland Reviewed-by: Samuel Thibault > --- >

[Bug 1901440] Re: Instability in IVSHMEM after updating QEMU 4.2 -> 5.0

2020-10-26 Thread Dave G
This problem occurred with the QEMU 5.0 version that was distributed with the Ubuntu 20.10 update. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1901440 Title: Instability in IVSHMEM after updating

Re: [PATCH v2 2/6] configure: avoid new clang 11+ warnings

2020-10-26 Thread Paolo Bonzini
On 23/10/20 22:06, Daniele Buono wrote: > 1 error generated. > > The data structure is UASStatus, which must end with a QTAILQ_ENTRY, so > I believe we cannot have uas_iu at the end. Since this is a gnu > extension but CLANG supports it, just add > -Wno-gnu-variable-sized-type-not-at-end This is

Re: [PATCH RESEND v2 1/7] tests/migration: fix memleak in wait_command/wait_command_fd

2020-10-26 Thread Maxim Levitsky
On Fri, 2020-10-23 at 14:12 +0800, Chen Qun wrote: > Properly free each command resp to avoid memory leak. > ASAN shows memory leak stack: > > Indirect leak of 2352520 byte(s) in 571 object(s) allocated from: > #0 0x7f6ca3308d4e in __interceptor_calloc (/lib64/libasan.so.5+0x112d4e) > #1 0

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-26 Thread Paolo Bonzini
On 23/10/20 22:06, Daniele Buono wrote: > This patch allows to compile QEMU with link-time optimization (LTO). > Compilation with LTO is handled directly by meson. This patch adds checks > in configure to make sure the toolchain supports LTO. > > Currently, allow LTO only with clang, since I have

Re: [PATCH v2 4/6] cfi: Initial support for cfi-icall in QEMU

2020-10-26 Thread Paolo Bonzini
On 23/10/20 22:06, Daniele Buono wrote: > + > +#ifdef CONFIG_CFI > +/* If CFI is enabled, use an attribute to disable cfi-icall on the following > + * function */ > +#define __disable_cfi__ __attribute__((no_sanitize("cfi-icall"))) > +#else > +/* If CFI is not enabled, use an empty define to not ch

Re: [PATCH 8/9] dev-serial: fix FTDI_GET_MDM_ST response

2020-10-26 Thread Samuel Thibault
Hello, (Cc-ing Aurelien who introduced the support for modem control, and Jason who added the missing THRE and TEMT flags). Mark Cave-Ayland, le lun. 26 oct. 2020 08:34:00 +, a ecrit: > The FTDI_GET_MDM_ST response should only return a single byte indicating the > modem status with bit 0 clea

Re: [PATCH 9/9] dev-serial: store flow control and xon/xoff characters

2020-10-26 Thread Samuel Thibault
Mark Cave-Ayland, le lun. 26 oct. 2020 08:34:01 +, a ecrit: > Note that whilst the device does not do anything with these values, they are > logged with trace events and stored to allow future implementation. > > The default flow control is set to none at reset as documented in the Linux > ftd

Re: [PATCH 0/8] arm/virt: add usb support

2020-10-26 Thread Peter Maydell
On Mon, 26 Oct 2020 at 07:01, Gerd Hoffmann wrote: > On Fri, Oct 23, 2020 at 12:36:05PM +0100, Peter Maydell wrote: > > On Fri, 23 Oct 2020 at 08:10, Gerd Hoffmann wrote: > > > > > > Bring new microvm goodies to arm virt too. Wire up > > > -machine usb=on, add sysbus-xhci in case it is enabled.

Re: [PATCH 0/9] dev-serial: minor fixes and improvements

2020-10-26 Thread Samuel Thibault
Hello, Mark Cave-Ayland, le lun. 26 oct. 2020 08:33:52 +, a ecrit: > This series comes from a client project that I have been working on over the > past few months which involves communicating with serial hardware and > associated simulators using the QEMU USB serial device. Thanks for these!

Re: [PATCH v2 6/6] configure: add support for Control-Flow Integrity

2020-10-26 Thread Paolo Bonzini
On 23/10/20 22:06, Daniele Buono wrote: > + > +if test "$cfi" = "yes"; then > + # Compiler/Linker Flags that needs to be added for cfi: > + # -fsanitize=cfi-icall to enable control-flow integrity checks on > + #indirect function calls. > + # -fsanitize-cfi-icall-generalize-pointers

Re: [PATCH v3] net: remove an assert call in eth_get_gso_type

2020-10-26 Thread Peter Maydell
On Wed, 21 Oct 2020 at 10:23, P J P wrote: > > +-- On Wed, 21 Oct 2020, Jason Wang wrote --+ > | It should not be a guest error, since guest is allowed to send a packet > | other than IPV4(6). > > * Ah...sigh! :( > > * I very hesitantly used guest_error mask, since it was g_assert-ing before. >

Re: [PATCH V2 02/14] ppc/: fix some comment spelling errors

2020-10-26 Thread Greg Kurz
On Mon, 26 Oct 2020 10:14:00 +0100 Thomas Huth wrote: > On 09/10/2020 08.44, zhaolichang wrote: > > I found that there are many spelling errors in the comments of > > qemu/target/ppc. > > I used spellcheck to check the spelling errors and found some errors in the > > folder. > > > > Signed-off

[PULL 01/31] tests/migration: fix memleak in wait_command/wait_command_fd

2020-10-26 Thread Thomas Huth
From: Chen Qun Properly free each command resp to avoid memory leak. ASAN shows memory leak stack: Indirect leak of 2352520 byte(s) in 571 object(s) allocated from: #0 0x7f6ca3308d4e in __interceptor_calloc (/lib64/libasan.so.5+0x112d4e) #1 0x7f6ca3127a50 in g_malloc0 (/lib64/libglib-2.0

[PULL 04/31] accel: move qtest CpusAccel functions to a common location

2020-10-26 Thread Thomas Huth
From: Jason Andryuk Move and rename accel/qtest/qtest-cpus.c files to accel/dummy-cpus.c so it can be re-used by Xen. Signed-off-by: Jason Andryuk Message-Id: <20201013140511.5681-3-jandr...@gmail.com> Reviewed-by: Claudio Fontana Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- accel

[PULL 05/31] accel: Add xen CpusAccel using dummy-cpus

2020-10-26 Thread Thomas Huth
From: Jason Andryuk Xen was broken by commit 1583a3898853 ("cpus: extract out qtest-specific code to accel/qtest"). Xen relied on qemu_init_vcpu() calling qemu_dummy_start_vcpu() in the default case, but that was replaced by g_assert_not_reached(). Add a minimal "CpusAccel" for Xen using the du

[PULL 03/31] accel: Remove _WIN32 ifdef from qtest-cpus.c

2020-10-26 Thread Thomas Huth
From: Jason Andryuk dummy-cpus.c is only compiled with CONFIG_POSIX, so the _WIN32 condition will never evaluate true. Remove it. Signed-off-by: Jason Andryuk Message-Id: <20201013140511.5681-2-jandr...@gmail.com> Acked-by: Paolo Bonzini Reviewed-by: Claudio Fontana Reviewed-by: Thomas Huth

[PULL 02/31] tests/qtest/libqtest: Fix detection of architecture for binaries without path

2020-10-26 Thread Thomas Huth
The qtests can be run directly by specifying the QEMU binary with the QTEST_QEMU_BINARY environment variable, for example: $ QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/qtest/test-hmp However, if you specify a binary without a path, for example with QTEST_QEMU_BINARY=qemu-system-x8

[PULL 00/31] qtests and gitlab-CI/acceptance patches

2020-10-26 Thread Thomas Huth
Hi Peter, the following changes since commit 4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430: Merge remote-tracking branch 'remotes/kraxel/tags/modules-20201022-pull-request' into staging (2020-10-22 12:33:21 +0100) are available in the Git repository at: https://gitlab.com/huth/qemu.git tags/p

[PULL 12/31] fuzz: Add DMA support to the generic-fuzzer

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov When a virtual-device tries to access some buffer in memory over DMA, we add call-backs into the fuzzer(next commit). The fuzzer checks verifies that the DMA request maps to a physical RAM address and fills the memory with fuzzer-provided data. The patterns that we use to

[PULL 09/31] memory: Add FlatView foreach function

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov Acked-by: Paolo Bonzini Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov Message-Id: <20201023150746.107063-2-alx...@bu.edu> Signed-off-by: Thomas Huth --- include/exec/memory.h | 5 + softmmu/memory.c | 13 + 2 files changed, 18 insert

[PULL 10/31] fuzz: Add generic virtual-device fuzzer

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov This is a generic fuzzer designed to fuzz a virtual device's MemoryRegions, as long as they exist within the Memory or Port IO (if it exists) AddressSpaces. The fuzzer's input is interpreted into a sequence of qtest commands (outb, readw, etc). The interpreted commands are

[PULL 07/31] libqtest: fix the order of buffered events

2020-10-26 Thread Thomas Huth
From: Maxim Levitsky By a mistake I added the pending events in a wrong order. Fix this by using g_list_append. Signed-off-by: Maxim Levitsky Message-Id: <20201019163702.471239-3-mlevi...@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/libqtest.c | 2 +- 1 file changed, 1 insertion(+),

[PULL 14/31] fuzz: Add fuzzer callbacks to DMA-read functions

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov We should be careful to not call any functions besides fuzz_dma_read_cb. Without --enable-fuzzing, fuzz_dma_read_cb is an empty inlined function. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny Message-Id: <20201023150746.107063-7-alx...@bu.edu> Signed-off-by

[PULL 06/31] tests/qtest: Make npcm7xx_timer-test conditional on CONFIG_NPCM7XX

2020-10-26 Thread Thomas Huth
From: Havard Skinnemoen This test won't work if qemu was compiled without CONFIG_NPCM7XX, as pointed out by Thomas Huth on a different patch. Signed-off-by: Havard Skinnemoen Message-Id: <20201023210637.351238-2-hskinnem...@google.com> Signed-off-by: Thomas Huth --- tests/qtest/meson.build |

[PULL 08/31] libqtest: fix memory leak in the qtest_qmp_event_ref

2020-10-26 Thread Thomas Huth
From: Maxim Levitsky The g_list_remove_link doesn't free the link element, opposed to what I thought. Switch to g_list_delete_link that does free it. Also refactor the code a bit. Thanks for Max Reitz for helping me with this. Signed-off-by: Maxim Levitsky Message-Id: <20201019163702.471239-4-

[PULL 15/31] fuzz: Add support for custom crossover functions

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov libfuzzer supports a "custom crossover function". Libfuzzer often tries to blend two inputs to create a new interesting input. Sometimes, we have a better idea about how to blend inputs together. This change allows fuzzers to specify a custom function for blending two inpu

[PULL 11/31] fuzz: Add PCI features to the generic fuzzer

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov This patch compares TYPE_PCI_DEVICE objects against the user-provided matching pattern. If there is a match, we use some hacks and leverage QOS to map each possible BAR for that device. Now fuzzed inputs might be converted to pci_read/write commands which target specific.

[PULL 21/31] fuzz: add an "opaque" to the FuzzTarget struct

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov It can be useful to register FuzzTargets that have nearly-identical initialization handlers (e.g. for using the same fuzzing code, with different configuration options). Add an opaque pointer to the FuzzTarget struct, so that FuzzTargets can hold some data, useful for stor

[PULL 20/31] fuzz: Add instructions for using generic-fuzz

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov Message-Id: <20201023150746.107063-13-alx...@bu.edu> Signed-off-by: Thomas Huth --- docs/devel/fuzzing.txt | 39 +++ 1 file changed, 39 insertions(+) diff --git a/docs/devel

[PULL 17/31] fuzz: add a crossover function to generic-fuzzer

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov Message-Id: <20201023150746.107063-10-alx...@bu.edu> Signed-off-by: Thomas Huth --- tests/qtest/fuzz/generic_fuzz.c | 86 + 1 file changed, 86 insertions(+) diff --git a/tests/q

[PULL 22/31] fuzz: add generic-fuzz configs for oss-fuzz

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov Predefine some generic-fuzz configs. For each of these, we will create a separate FuzzTarget that can be selected through argv0 and, therefore, fuzzed on oss-fuzz. Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov Message-Id: <20201023150746.107063-15-alx...@bu

[PULL 24/31] scripts/oss-fuzz: use hardlinks instead of copying

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov Prior to this, fuzzers in the output oss-fuzz directory were exactly the same executable, with a different name to do argv[0]-based fuzz-target selection. This is a waste of space, especially since these binaries can weigh many MB. Instead of copying, use hard links, to c

[PATCH v29 01/17] vfio: Add function to unmap VFIO region

2020-10-26 Thread Kirti Wankhede
This function will be used for migration region. Migration region is mmaped when migration starts and will be unmapped when migration is complete. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Reviewed-by: Cornelia Huck --- hw/vfio/common.c | 32 --

[PULL 25/31] scripts/oss-fuzz: ignore the generic-fuzz target

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov generic-fuzz is not a standalone fuzzer - it requires some env variables to be set. On oss-fuzz, we set these with some predefined generic-fuzz-{...} targets, that are thin wrappers around generic-fuzz. Do not make a link for the generic-fuzz from the oss-fuzz build, so os

[PULL 16/31] fuzz: add a DISABLE_PCI op to generic-fuzzer

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov This new operation is used in the next commit, which concatenates two fuzzer-generated inputs. With this operation, we can prevent the second input from clobbering the PCI configuration performed by the first. Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny M

[PULL 27/31] test/acceptance: Remove the CONTINUOUS_INTEGRATION tags

2020-10-26 Thread Thomas Huth
We are not running the acceptance tests on Travis anymore, so these checks can be removed now. Message-Id: <20201023073351.251332-3-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/acceptance/ppc_prep_40p.py | 2 -- 1 file changed, 2 deletions(-) diff

[PULL 19/31] scripts/oss-fuzz: Add crash trace minimization script

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov Once we find a crash, we can convert it into a QTest trace. Usually this trace will contain many operations that are unneeded to reproduce the crash. This script tries to minimize the crashing trace, by removing operations and trimming QTest bufwrite(write addr len data...

[PULL 28/31] tests/acceptance: Enable AVOCADO_ALLOW_UNTRUSTED_CODE in the gitlab-CI

2020-10-26 Thread Thomas Huth
The tests are running in containers here, so it should be OK to run with AVOCADO_ALLOW_UNTRUSTED_CODE enabled in this case. Message-Id: <20201023073351.251332-4-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion

[PATCH 0/4] qemu-storage-daemon: QAPIfy --chardev the stupid way

2020-10-26 Thread Markus Armbruster
Kevin's "[PATCH v2 0/6] qemu-storage-daemon: QAPIfy --chardev" involves surgery to the QAPI generator. Some (most?) of it should go away if we deprecate the "data" wrappers due to simple unions in QMP. Do we really need to mess with the code generator to solve the problem at hand? Let's recapit

[PULL 26/31] tests/acceptance/ppc_prep_40p: Fix the URL to the NetBSD-4.0 archive

2020-10-26 Thread Thomas Huth
The current URL on cdn.netbsd.org is failing - using archive.netbsd.org instead seems to be fine. Message-Id: <20201023073351.251332-2-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/acceptance/ppc_prep_40p.py | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v29 00/17] Add migration support for VFIO devices

2020-10-26 Thread Kirti Wankhede
Hi, This Patch set adds migration support for VFIO devices in QEMU. This Patch set include patches as below: Patch 1-2: - Few code refactor Patch 3: - Added save and restore functions for PCI configuration space. Used pci_device_save() and pci_device_load() so that config space cache is saved

[PATCH 1/4] char/stdio: Fix QMP default for 'signal'

2020-10-26 Thread Markus Armbruster
From: Kevin Wolf Commit 02c4bdf1 tried to make signal=on the default for stdio chardevs except for '-serial mon:stdio', but it forgot about QMP and accidentally switched the QMP default from true (except for -nographic) to false (always). The QMP documentation was kept unchanged and still describ

[PULL 29/31] test/docker/dockerfiles: Add missing packages for acceptance tests

2020-10-26 Thread Thomas Huth
Some of the "check-acceptance" tests are still skipped in the CI since the docker images do not provide the necessary packages, e.g. the netcat binary. Add them to get more test coverage. Message-Id: <20201023073351.251332-5-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Tho

[PULL 18/31] scripts/oss-fuzz: Add script to reorder a generic-fuzzer trace

2020-10-26 Thread Thomas Huth
From: Alexander Bulekov The generic-fuzzer uses hooks to fulfill DMA requests just-in-time. This means that if we try to use QTEST_LOG=1 to build a reproducer, the DMA writes will be logged _after_ the in/out/read/write that triggered the DMA read. To work work around this, the generic-fuzzer ann

  1   2   3   4   5   6   7   >