[PATCH] linux-user: fix target_to_host_timespec64()

2020-08-27 Thread Laurent Vivier
in 32 bit mode, drop the padding in tv_nsec. If host is 64bit and target is 32bit, the padding bytes will be copied from the target and as the kernel checks the value, the syscall exits with EINVAL. Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) d

Re: [PATCH 06/12] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context()

2020-08-27 Thread Pan Nengyuan
On 2020/8/26 20:20, Li Qiang wrote: > Pan Nengyuan 于2020年8月14日周五 下午6:15写道: >> >> Receiving error in local variable err, and forgot to free it. >> Considering that there is no place to deal with it. Clean up. >> >> Reported-by: Euler Robot >> Signed-off-by: Pan Nengyuan >> --- >> Cc: Gerd Hoff

Re: [PATCH 4/8] sclpconsole: Use TYPE_* constants

2020-08-27 Thread Cornelia Huck
On Wed, 26 Aug 2020 14:43:30 -0400 Eduardo Habkost wrote: > This will make future conversion to use OBJECT_DECLARE* easier. > > Signed-off-by: Eduardo Habkost > --- > Cc: Cornelia Huck > Cc: Halil Pasic > Cc: Christian Borntraeger > Cc: Thomas Huth > Cc: "Marc-André Lureau" > Cc: Paolo Bon

Re: [PATCH v5 06/12] migration/dirtyrate: Record hash results for each sampled page

2020-08-27 Thread Zheng Chuan
On 2020/8/26 20:30, Dr. David Alan Gilbert wrote: > * David Edmondson (d...@dme.org) wrote: >> On Monday, 2020-08-24 at 17:14:34 +08, Chuan Zheng wrote: >> >>> Record hash results for each sampled page, crc32 is taken to calculate >>> hash results for each sampled 4K-page. >>> >>> Signed-off-by:

RE: [PATCH v2 09/10] hw/intc: Remove redundant statement in exynos4210_combiner_read()

2020-08-27 Thread Chenqun (kuhn)
> Subject: Re: [PATCH v2 09/10] hw/intc: Remove redundant statement in > exynos4210_combiner_read() > > On Tue, 25 Aug 2020 at 12:26, Chen Qun wrote: > > > > Clang static code analyzer show warning: > > hw/intc/exynos4210_combiner.c:231:9: warning: Value stored to 'val' is never > read > >

Re: [PATCH v5 06/12] migration/dirtyrate: Record hash results for each sampled page

2020-08-27 Thread David Edmondson
On Thursday, 2020-08-27 at 14:28:03 +08, Zheng Chuan wrote: +static struct RamblockDirtyInfo * +alloc_ramblock_dirty_info(int *block_index, + struct RamblockDirtyInfo *block_dinfo) +{ +struct RamblockDirtyInfo *info = NULL; +int index

Re: [PULL 0/3] Fixes 20200825 patches

2020-08-27 Thread Thomas Huth
On 25/08/2020 08.20, Gerd Hoffmann wrote: > The following changes since commit 30aa19446d82358a30eac3b556b4d6641e00b7c1: > > Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20200812' > into staging (2020-08-24 16:39:53 +0100) > > are available in the Git repository at: > > g

Re: [PATCH] meson: move pixman detection to meson

2020-08-27 Thread Thomas Huth
On 27/08/2020 08.14, Paolo Bonzini wrote: > > > Il gio 27 ago 2020, 06:53 Thomas Huth > ha scritto: > > > -else > > -  error_exit "pixman >= 0.21.8 not present." \ > > -      "Please install the pixman devel package." > > -fi > > The "else" part now

Re: [PATCH] ninjatool: quote dollars in variables

2020-08-27 Thread Laurent Vivier
Le 26/08/2020 à 21:01, Paolo Bonzini a écrit : > Otherwise, dollars (such as in the special $ORIGIN rpath) are > eaten by Make. > > Reported-by: Laurent Vivier > Signed-off-by: Paolo Bonzini > --- > scripts/ninjatool.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a

[RFC PATCH v4 1/2] hw/riscv: sifive_u: Add backend drive support

2020-08-27 Thread Green Wan
Add '-drive' support to OTP device. Allow users to assign a raw file as OTP image. Signed-off-by: Green Wan --- hw/riscv/sifive_u_otp.c | 50 + include/hw/riscv/sifive_u_otp.h | 2 ++ 2 files changed, 52 insertions(+) diff --git a/hw/riscv/sifive_u_otp.c

[RFC PATCH v4 2/2] hw/riscv: sifive_u: Add write-once protection

2020-08-27 Thread Green Wan
Add array to store the 'written' status for all bit of OTP to block the write operation to the same bit. Ignore the control register offset from 0x0 to 0x38 of OTP memory mapping. Signed-off-by: Green Wan --- hw/riscv/sifive_u_otp.c | 21 + include/hw/riscv/sifive_u_o

[RFC PATCH v4 0/2] Add file-backed and write-once features to OTP

2020-08-27 Thread Green Wan
Based RFC v3 to fix: - Fix all nits-related - Use blk for blk_by_legacy_dinfo(dinfo) - Move SET_WRITTEN_BIT out from else branch Summary of Patches - First patch is to add file-backed implementation to allow users to use '-drive' to assign an OTP raw image file. OTP image file must be bigg

Re: Help with usb-host hostdevice property

2020-08-27 Thread Gerd Hoffmann
Hi, > usb 1-1: Invalid ep0 maxpacket: 64 > usb usb1-port1: unable to enumerate USB device https://patchwork.ozlabs.org/project/qemu-devel/patch/20200826145239.6077-18-kra...@redhat.com/ HTH, Gerd

Re: [PATCH v5 09/12] migration/dirtyrate: Implement get_sample_page_period() and block_sample_page_period()

2020-08-27 Thread Zheng Chuan
On 2020/8/26 18:17, David Edmondson wrote: > On Monday, 2020-08-24 at 17:14:37 +08, Chuan Zheng wrote: > >> Implement get_sample_page_period() and set_sample_page_period() to >> sleep specific time between sample actions. >> >> Signed-off-by: Chuan Zheng >> --- >> migration/dirtyrate.c | 24 +

Re: [PATCH v3 28/74] s390x: Move typedef SCLPEventFacility to event-facility.h

2020-08-27 Thread Thomas Huth
On 25/08/2020 21.20, Eduardo Habkost wrote: > This will make future conversion to OBJECT_DECLARE* easier. > > In sclp.h, use "struct SCLPEventFacility" to avoid introducing > unnecessary header dependencies. > > Acked-by: Cornelia Huck > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Eduardo

Re: Why QEMU should move from C to Rust (clickbait alert ;))

2020-08-27 Thread Sergio Lopez
On Fri, Aug 21, 2020 at 04:18:03PM -0400, Alex Carter wrote: > Hi everyone, > > My name is Alex, I’m a student at the University of Michigan and I just > completed an internship at IBM Research. There, I have been working on a > project very related to this topic. I tested using Cloud Hypervisor’s

Re: [PATCH v3 21/74] s390_flic: Move KVMS390FLICState typedef to header

2020-08-27 Thread Thomas Huth
On 25/08/2020 21.20, Eduardo Habkost wrote: > Move typedef closer to the type check macros, to make it easier > to convert the code to OBJECT_DEFINE_TYPE() in the future. > > Acked-by: Cornelia Huck > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Eduardo Habkost > --- > Changes v2 -> v3: non

Re: [PATCH v2 20/58] mcf_fec: Move mcf_fec_state typedef to header

2020-08-27 Thread Thomas Huth
On 20/08/2020 02.11, Eduardo Habkost wrote: > Move typedef closer to the type check macros, to make it easier > to convert the code to OBJECT_DEFINE_TYPE() in the future. > > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Eduardo Habkost > --- > Changes v1 -> v2: none > > --- > Cc: Thomas Hut

Re: [PATCH v3 0/8] linux-user: Adding support for a group of btrfs ioctls

2020-08-27 Thread Daniel P . Berrangé
On Sun, Aug 23, 2020 at 09:50:06PM +0200, Filip Bozuta wrote: > This series covers support for following btrfs ioctls > > *BTRFS_SUBVOL_CREATE *BTRFS_IOC_ADD_DEV > *BTRFS_SUBVOL_SETFLAGS *BTRFS_IOC_RM_DEV > *BTRFS_SUBVOL_GETFLAGS *BTRFS_IOC_DEV_INFO > *BTR

Re: [PATCH v5 09/12] migration/dirtyrate: Implement get_sample_page_period() and block_sample_page_period()

2020-08-27 Thread Zheng Chuan
On 2020/8/27 16:01, Zheng Chuan wrote: > > > On 2020/8/26 18:17, David Edmondson wrote: >> On Monday, 2020-08-24 at 17:14:37 +08, Chuan Zheng wrote: >> >>> Implement get_sample_page_period() and set_sample_page_period() to >>> sleep specific time between sample actions. >>> >>> Signed-off-by:

Re: [PATCH v5 10/12] migration/dirtyrate: Implement calculate_dirtyrate() function

2020-08-27 Thread Zheng Chuan
On 2020/8/26 18:21, David Edmondson wrote: > On Monday, 2020-08-24 at 17:14:38 +08, Chuan Zheng wrote: > >> Implement calculate_dirtyrate() function. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> --- >> migration/dirtyrate.c | 45 +++

Re: Meson build on macOS: undefined symbol treatment

2020-08-27 Thread Thomas Huth
On 26/08/2020 15.11, Emmanuel Blot wrote: > Hi, > > I’ve noticed that since meson builds have been enabled, on macOS, the > build outcome with undefined symbols has changed: > > - prior to meson introduction (v5.1.0): >   * referencing an undeclared symbol in source code led to a warning at > com

Re: [PATCH] meson: move pixman detection to meson

2020-08-27 Thread Paolo Bonzini
Il gio 27 ago 2020, 09:28 Thomas Huth ha scritto: > But I've tested the patch now, and it does not work: > > .../qemu/meson.build:117:3: ERROR: Unknown variable "have_system". > > Should the pixman test maybe be moved to a later spot in the file? It > currently shows up before the have_system var

Re: [PATCH] ninjatool: quote dollars in variables

2020-08-27 Thread Paolo Bonzini
Il gio 27 ago 2020, 09:33 Laurent Vivier ha scritto: > This actually fixes the '-Wl,-rpath,$ORIGIN/', but doesn't fix the crash > with statically linked binaries. > I will try to reproduce when I am back; it works for Peter so there must be something different in the setup. In any case, if need

Re: [PATCH v6 01/20] microvm: name qboot binary qboot.rom

2020-08-27 Thread Sergio Lopez
On Wed, Aug 26, 2020 at 12:52:35PM +0200, Gerd Hoffmann wrote: > qboot isn't a bios and shouldnt be named that way. > > Signed-off-by: Gerd Hoffmann > --- > hw/i386/microvm.c | 4 ++-- > pc-bios/{bios-microvm.bin => qboot.rom} | Bin > roms/Makefile

Re: [PATCH v6 12/20] microvm/acpi: disable virtio-mmio cmdline hack

2020-08-27 Thread Sergio Lopez
On Wed, Aug 26, 2020 at 12:52:46PM +0200, Gerd Hoffmann wrote: > ... in case we are using ACPI. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Igor Mammedov > --- > hw/i386/microvm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Sergio Lopez > diff --git a/hw/i386/m

Re: [PATCH] meson: move pixman detection to meson

2020-08-27 Thread Thomas Huth
On 26/08/2020 09.02, Paolo Bonzini wrote: > When pixman is not installed (or too old), but virglrenderer is available > and "configure" has been run with "--disable-system", the build currently > aborts when trying to compile vhost-user-gpu (since it requires pixman). > > Let's skip the build of v

Re: [PATCH v5 09/12] migration/dirtyrate: Implement get_sample_page_period() and block_sample_page_period()

2020-08-27 Thread David Edmondson
On Thursday, 2020-08-27 at 16:01:37 +08, Zheng Chuan wrote: > On 2020/8/26 18:17, David Edmondson wrote: >> On Monday, 2020-08-24 at 17:14:37 +08, Chuan Zheng wrote: >> >>> Implement get_sample_page_period() and set_sample_page_period() to >>> sleep specific time between sample actions. >>> >>> S

Re: [PATCH v5 06/12] migration/dirtyrate: Record hash results for each sampled page

2020-08-27 Thread Dr. David Alan Gilbert
* Zheng Chuan (zhengch...@huawei.com) wrote: > > > On 2020/8/26 20:35, Dr. David Alan Gilbert wrote: > > * Chuan Zheng (zhengch...@huawei.com) wrote: > >> Record hash results for each sampled page, crc32 is taken to calculate > >> hash results for each sampled 4K-page. > >> > >> Signed-off-by: Ch

Re: [PATCH v3 0/7] colo: Introduce resource agent and test suite/CI

2020-08-27 Thread Lukas Straub
On Tue, 18 Aug 2020 14:27:01 +0200 Lukas Straub wrote: > On Tue, 4 Aug 2020 12:46:29 +0200 > Lukas Straub wrote: > > > Hello Everyone, > > So here is v3. Patch 1 can already be merged independently of the others. > > Please review. > > > > Regards, > > Lukas Straub > > > > Based-on: > > "Int

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

2020-08-27 Thread Lukas Straub
On Tue, 18 Aug 2020 14:26:31 +0200 Lukas Straub wrote: > On Tue, 4 Aug 2020 10:11:22 +0200 > Lukas Straub wrote: > > > Hello Everyone, > > In many cases, if qemu has a network connection (qmp, migration, chardev, > > etc.) > > to some other server and that server dies or hangs, qemu hangs too.

[Bug 1893010] Re: qemu linux-user doesn't support OFD fcntl locks

2020-08-27 Thread Mike Gelfand
The attached patch fixes the issue for me. ** Patch added: "qemu-5.0.0-ofd-fcntl.patch" https://bugs.launchpad.net/qemu/+bug/1893010/+attachment/5405131/+files/qemu-5.0.0-ofd-fcntl.patch -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to

[Bug 1893003] Re: qemu linux-user doesn't translate host/target data for iovec I/O

2020-08-27 Thread Mike Gelfand
The attached patch fixes the issue for me, but is incomplete (and not thoroughly tested) as I've only implemented inotify data translation for readv syscall. ** Patch added: "qemu-5.0.0-inotify-readv.patch" https://bugs.launchpad.net/qemu/+bug/1893003/+attachment/5405134/+files/qemu-5.0.0-inot

Re: [PATCH] ninjatool: quote dollars in variables

2020-08-27 Thread Paolo Bonzini
Found; https://github.com/mesonbuild/Meson/issues/5191. (With the fix there's no rpath at all in the QEMU build process). Let's ask for a backport to 0.55.2. Paolo Il gio 27 ago 2020, 10:22 Paolo Bonzini ha scritto: > > > Il gio 27 ago 2020, 09:33 Laurent Vivier ha scritto: > >> This actuall

Re: [PATCH for-5.2 v2 3/9] pc-bios/s390-ccw: Introduce ENODEV define and remove guards of others

2020-08-27 Thread Thomas Huth
On 06/08/2020 15.27, Janosch Frank wrote: > On 8/6/20 12:53 PM, Thomas Huth wrote: >> Remove the "#ifndef E..." guards from the defines here - the header >> guard S390_CCW_H at the top of the file should avoid double definition, >> and if the error code is defined in a different file already, we're

Re: [PATCH 00/77] target/microblaze improvements

2020-08-27 Thread Edgar E. Iglesias
On Tue, Aug 25, 2020 at 01:58:33PM -0700, Richard Henderson wrote: > Well, this is larger than I expected. > > I started off thinking conversion to decodetree would be quick, > after I reviewed the mttcg patches last week. Then I realized > that this could also use conversion to the generic trans

[PATCH 2/2] m25p80: Add the n25q256a SFDP table

2020-08-27 Thread Cédric Le Goater
The same values were collected on 4 differents OpenPower systems, palmettos, romulus and tacoma. Signed-off-by: Cédric Le Goater --- hw/block/m25p80_sfdp.h | 2 ++ hw/block/m25p80.c | 6 -- hw/block/m25p80_sfdp.c | 49 ++ hw/block/Makefile.objs

[PATCH 0/2] m25p80: Add SFDP support

2020-08-27 Thread Cédric Le Goater
Hello, JEDEC STANDARD JESD216 for Serial Flash Discovery Parameters (SFDP) provides a mean to describe the features of a serial flash device using a set of internal parameter tables. Support in Linux has been added some time ago and the spi-nor driver is using it more often to detect the flash set

[PATCH 1/2] m25p80: Add basic support for the SFDP command

2020-08-27 Thread Cédric Le Goater
JEDEC STANDARD JESD216 for Serial Flash Discovery Parameters (SFDP) provides a mean to describe the features of a serial flash device using a set of internal parameter tables. This is the initial framework for the RDSFDP command giving access to a private SFDP area under the flash. This area now n

Re: [PATCH v5 07/10] block: introduce preallocate filter

2020-08-27 Thread Vladimir Sementsov-Ogievskiy
26.08.2020 16:51, David Edmondson wrote: + file-systems with slow allocation. + + Supported options: + + .. program:: preallocate + .. option:: prealloc-align + +On preallocation, align file length to this number, default 1M. *the file length As for “number”... Well, it is a number. B

Re: [PATCH] ninjatool: quote dollars in variables

2020-08-27 Thread Paolo Bonzini
... and actually it's fixed in 0.55.1. We can therefore just update the submodule and declare 0.55.1 the minimum required version for QEMU. Paolo Il gio 27 ago 2020, 11:10 Paolo Bonzini ha scritto: > Found; https://github.com/mesonbuild/Meson/issues/5191. > > (With the fix there's no rpath at a

Re: [PATCH] pc-bios: s390x: Add a comment to the io and external new PSW setup

2020-08-27 Thread Thomas Huth
On 22/07/2020 10.05, Janosch Frank wrote: > On 7/22/20 9:39 AM, Christian Borntraeger wrote: >> >> >> On 22.07.20 09:24, Janosch Frank wrote: >>> On 7/22/20 8:43 AM, Christian Borntraeger wrote: On 15.07.20 16:08, Janosch Frank wrote: > Normally they don't need to be set up befor

[PATCH RFC v3 01/14] linux-header: Update linux/kvm.h

2020-08-27 Thread Yifei Jiang
Update linux-headers/linux/kvm.h from https://github.com/kvm-riscv/linux. Only use this header file, so here do not update all linux headers by update-linux-headers.sh until above KVM series is accepted. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- linux-headers/linux/kvm.h | 8

[PATCH RFC v3 00/14] Add riscv kvm accel support

2020-08-27 Thread Yifei Jiang
This series adds both riscv32 and riscv64 kvm support, and implements migration based on riscv. It is based on temporarily unaccepted kvm: https://github.com/kvm-riscv/linux Compared to RFC v2, the migration is supported in this series. The new added migration feature also requires the following p

[PATCH RFC v3 06/14] target/riscv: Support start kernel directly by KVM

2020-08-27 Thread Yifei Jiang
Get kernel and fdt start address in virt.c, and pass them to KVM when cpu reset. In addition, add kvm_riscv.h to place riscv specific interface. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- hw/riscv/virt.c | 8 target/riscv/cpu.c | 4 target/riscv/cpu.

[PATCH RFC v3 03/14] target/riscv: Implement function kvm_arch_init_vcpu

2020-08-27 Thread Yifei Jiang
Get isa info from kvm while kvm init. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- target/riscv/kvm.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c index 8c386d9acf..7983f43f3f 100644 --- a/targ

[PATCH RFC v3 13/14] target/riscv: Implement virtual time adjusting with vm state changing

2020-08-27 Thread Yifei Jiang
We hope that virtual time adjusts with vm state changing. When a vm is stopped, guest virtual time should stop counting and kvm_timer should be stopped. When the vm is resumed, guest virtual time should continue to count and kvm_timer should be restored. Signed-off-by: Yifei Jiang Signed-off-by:

[PATCH RFC v3 05/14] arget/riscv: Implement kvm_arch_put_registers

2020-08-27 Thread Yifei Jiang
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- target/riscv/kvm.c | 142 - 1 file changed, 141 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c in

[PATCH RFC v3 04/14] target/riscv: Implement kvm_arch_get_registers

2020-08-27 Thread Yifei Jiang
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- target/riscv/kvm.c | 150 - 1 file changed, 149 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c

[PATCH RFC v3 14/14] target/riscv: Support virtual time context synchronization

2020-08-27 Thread Yifei Jiang
Add virtual time context description to vmstate_riscv_cpu. After cpu being loaded, virtual time context is updated to KVM. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- target/riscv/cpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target/riscv/cpu.c b/target/ris

[PATCH RFC v3 10/14] target/riscv: Add sifive_plic vmstate

2020-08-27 Thread Yifei Jiang
Add sifive_plic vmstate for supporting sifive_plic migration. Current vmstate framework only supports one structure parameter as num field to describe variable length arrays, so introduce num_enables. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- hw/riscv/sifive_plic.c | 24 +

[PATCH RFC v3 12/14] target/riscv: Add kvm_riscv_get/put_regs_timer

2020-08-27 Thread Yifei Jiang
Add kvm_riscv_get/put_regs_timer to synchronize virtual time context from KVM. The frequency of virtual time is not supported by KVM_SET_ONE_REG, So it's useless to synchronize the frequency of virtual time. To set register of RISCV_TIMER_REG(state) will occur a error from KVM on kvm_timer_state =

[PATCH RFC v3 07/14] hw/riscv: PLIC update external interrupt by KVM when kvm enabled

2020-08-27 Thread Yifei Jiang
Only support supervisor external interrupt currently. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- hw/riscv/sifive_plic.c | 31 ++- target/riscv/kvm.c | 19 +++ target/riscv/kvm_riscv.h | 1 + 3 files changed, 42 insertions(+), 9

Re: [PATCH 64/77] target/microblaze: Convert mbar to decodetree

2020-08-27 Thread Edgar E. Iglesias
On Tue, Aug 25, 2020 at 01:59:37PM -0700, Richard Henderson wrote: > Split this out of the normal branch instructions, as it requires > special handling. End the TB only for an instruction barrier. > > Signed-off-by: Richard Henderson > --- > target/microblaze/insns.decode | 2 + > target/micr

[PATCH RFC v3 11/14] target/riscv: Support riscv cpu vmstate

2020-08-27 Thread Yifei Jiang
Describe gpr, fpr and csr in vmstate_riscv_cpu. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- target/riscv/cpu.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index d8c32a8f84..b698f4adbb 100644 --- a

[PATCH RFC v3 02/14] target/riscv: Add target/riscv/kvm.c to place the public kvm interface

2020-08-27 Thread Yifei Jiang
Add target/riscv/kvm.c to place kvm_arch_* function needed by kvm/kvm-all.c. Meanwhile, add kvm support in configure file. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin Reviewed-by: Alistair Francis --- configure| 1 + target/riscv/kvm.c | 128 +++

Re: [PATCH v2 09/10] hw/intc: Remove redundant statement in exynos4210_combiner_read()

2020-08-27 Thread Peter Maydell
On Thu, 27 Aug 2020 at 08:01, Chenqun (kuhn) wrote: > > > Subject: Re: [PATCH v2 09/10] hw/intc: Remove redundant statement in > > exynos4210_combiner_read() > > The code as it stands is definitely wrong, but I'm not sure this is the > > correct fix. > > Surely the intention must have been to re

[PATCH RFC v3 08/14] target/riscv: Handler KVM_EXIT_RISCV_SBI exit

2020-08-27 Thread Yifei Jiang
Use char-fe handler console sbi call, which implement early console io while apply 'earlycon=sbi' into kernel parameters. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- target/riscv/kvm.c | 42 - target/riscv/sbi_ecall_interface.h | 72 +

[PATCH RFC v3 09/14] target/riscv: Add host cpu type

2020-08-27 Thread Yifei Jiang
Currently, host cpu is inherited simply. Signed-off-by: Yifei Jiang Signed-off-by: Yipeng Yin --- target/riscv/cpu.c | 6 ++ target/riscv/cpu.h | 1 + 2 files changed, 7 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 266e70cc47..d8c32a8f84 100644 --- a/target/risc

[PATCH v2 0/4] pc-bios: s390x: Cleanup part 2

2020-08-27 Thread Janosch Frank
So, here are a few more cleanup patches mostly cleaning up ipl code and some of the assembly. The patches are available here: https://github.com/frankjaa/qemu/pull/new/cleanup_bios2 v2: * Fixed psw saving in use reset psw patch (thanks Jason) * Dropped a lot of patches which were

[PATCH v2 4/4] pc-bios: s390x: Go into disabled wait when encountering a PGM exception

2020-08-27 Thread Janosch Frank
Let's setup a PGM PSW, so we won't load 0s when a program exception happens. Instead we'll load a disabled wait PSW. Signed-off-by: Janosch Frank --- pc-bios/s390-ccw/start.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S index 939aac3a

Re: [PULL 0/3] Fixes 20200825 patches

2020-08-27 Thread Gerd Hoffmann
> if I've got that right, something in this pull request broke the gitlab > CI, see: > > https://gitlab.com/qemu-project/qemu/-/jobs/702680909 > > 216 (33/45) > tests/acceptance/vnc.py:Vnc.test_change_password_requires_a_password: > ERROR: Unexpected empty reply from server (0.08 s) > 217 (34/45

[PATCH RFC v2 3/4] pc-bios: s390x: Save io and external new PSWs before overwriting them

2020-08-27 Thread Janosch Frank
Currently we always overwrite the mentioned exception new PSWs before loading the enabled wait PSW. Let's save the PSW before overwriting and restore it right before starting the loaded kernel. Signed-off-by: Janosch Frank --- Maybe we should rather statically allocate a lowcore so we don't dirt

Re: [PATCH v5 11/12] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-08-27 Thread Zheng Chuan
On 2020/8/26 18:26, David Edmondson wrote: > On Monday, 2020-08-24 at 17:14:39 +08, Chuan Zheng wrote: > >> Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be >> called >> >> Signed-off-by: Chuan Zheng >> --- >> migration/dirtyrate.c | 45

[PATCH v2 2/4] pc-bios: s390x: Use reset PSW if avaliable

2020-08-27 Thread Janosch Frank
If a blob provides a reset PSW then we should use it instead of branching to the PSW address and using our own mask. Signed-off-by: Janosch Frank --- pc-bios/s390-ccw/bootmap.c | 1 + pc-bios/s390-ccw/jump2ipl.c | 48 ++--- pc-bios/s390-ccw/s390-ccw.h | 1 + 3

[PATCH v2 1/4] pc-bios: s390x: Fix bootmap.c zipl component entry data handling

2020-08-27 Thread Janosch Frank
The two main types of zipl component entries are execute and load/data. The last member of the component entry struct therefore denotes either a PSW or an address. Let's make this a bit more clear by introducing a union and cleaning up the code that uses that struct member. The execute type compon

Re: [PATCH 7/8] ppce500: Use TYPE_PPC_E500_PCI_BRIDGE constant

2020-08-27 Thread David Gibson
On Wed, Aug 26, 2020 at 02:43:33PM -0400, Eduardo Habkost wrote: > This will make future conversion to use OBJECT_DECLARE* easier. > > Signed-off-by: Eduardo Habkost Acked-by: David Gibson > --- > Cc: David Gibson > Cc: qemu-...@nongnu.org > Cc: qemu-devel@nongnu.org > --- > hw/pci-host/ppce

Re: [PATCH 1/8] etsec: Use TYPE_ETSEC_COMMON constant

2020-08-27 Thread David Gibson
On Wed, Aug 26, 2020 at 02:43:27PM -0400, Eduardo Habkost wrote: > This will make future conversion to use OBJECT_DECLARE* easier. > > Signed-off-by: Eduardo Habkost Acked-by: David Gibson > --- > Cc: David Gibson > Cc: Jason Wang > Cc: qemu-...@nongnu.org > Cc: qemu-devel@nongnu.org > --- >

Re: Help with usb-host hostdevice property

2020-08-27 Thread Diego Viola
On Thu, Aug 27, 2020 at 5:01 AM Gerd Hoffmann wrote: > > Hi, > > > usb 1-1: Invalid ep0 maxpacket: 64 > > usb usb1-port1: unable to enumerate USB device > > https://patchwork.ozlabs.org/project/qemu-devel/patch/20200826145239.6077-18-kra...@redhat.com/ That helps indeed, thanks Gerd! Tested-by

Re: [PATCH 64/77] target/microblaze: Convert mbar to decodetree

2020-08-27 Thread Richard Henderson
On 8/27/20 2:24 AM, Edgar E. Iglesias wrote: >> +/* >> + * Instruction access memory barrier. >> + * End the TB so that we recognize self-modified code immediately. >> + */ >> +if (mbar_imm & 1) { >> +dc->cpustate_changed = 1; >> +} > > This should be (mbar_imm & 1)

Re: [PATCH 00/77] target/microblaze improvements

2020-08-27 Thread Richard Henderson
On 8/27/20 2:11 AM, Edgar E. Iglesias wrote: > So a first general regression is that opcode 0 no longer > traps as an illegal instruction (seems to be treated as an > add with all r0). Oops, will fix. r~

Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct

2020-08-27 Thread Thomas Huth
On 07/02/2020 15.02, Jason J. Herne wrote: > On 2/7/20 6:28 AM, Christian Borntraeger wrote: >> Jason, >> >> can you run objdump -Sdr on jump2ipl.o on a broken variant? >> >> > To keep the volume lower, I've only pasted the output that I think > you're interested in. If you want to see the entire t

Re: [PATCH] ninjatool: quote dollars in variables

2020-08-27 Thread Peter Maydell
On Thu, 27 Aug 2020 at 10:20, Paolo Bonzini wrote: > > ... and actually it's fixed in 0.55.1. We can therefore just update the > submodule and declare 0.55.1 the minimum required version for QEMU. Oh, I meant to ask -- if 0.56 is the one that gets rid of the warnings about unstable-keyval backwa

Re: [PATCH 64/77] target/microblaze: Convert mbar to decodetree

2020-08-27 Thread Edgar E. Iglesias
On Thu, Aug 27, 2020 at 02:58:06AM -0700, Richard Henderson wrote: > On 8/27/20 2:24 AM, Edgar E. Iglesias wrote: > >> +/* > >> + * Instruction access memory barrier. > >> + * End the TB so that we recognize self-modified code immediately. > >> + */ > >> +if (mbar_imm & 1) { > >

Re: [PATCH] linux-user: fix target_to_host_timespec64()

2020-08-27 Thread Filip Bozuta
On 27.8.20. 09:04, Laurent Vivier wrote: in 32 bit mode, drop the padding in tv_nsec. If host is 64bit and target is 32bit, the padding bytes will be copied from the target and as the kernel checks the value, the syscall exits with EINVAL. Signed-off-by: Laurent Vivier --- linux-user/syscall.

Re: better file/line info for format string errors in trace events

2020-08-27 Thread Stefan Hajnoczi
On Tue, Aug 25, 2020 at 10:49:08PM +0100, Peter Maydell wrote: > If you have a format string error in a trace event it fails > like this: > > In file included from ../../hw/block/trace.h:1:0, > from ../../hw/block/fdc.c:48: > ./trace/trace-hw_block.h: In function '_nocheck__trace_

Re: [PULL v5 00/12] The following changes since commit 3461487523b897d324e8d91f3fd20ed55f849544:

2020-08-27 Thread Peter Maydell
On Wed, 26 Aug 2020 at 22:13, Helge Deller wrote: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20200727' into staging (2020-07-28 > 18:43:48 +0100) > > are available in the Git repository at: > > g...@github.com:hdeller/qemu-hppa.git tags/target-hppa-v3-pull-requ

Re: [PATCH 00/77] target/microblaze improvements

2020-08-27 Thread Edgar E. Iglesias
On Thu, Aug 27, 2020 at 03:01:57AM -0700, Richard Henderson wrote: > On 8/27/20 2:11 AM, Edgar E. Iglesias wrote: > > So a first general regression is that opcode 0 no longer > > traps as an illegal instruction (seems to be treated as an > > add with all r0). > > Oops, will fix. Thanks. Here's an

Re: [PULL 0/3] Fixes 20200825 patches

2020-08-27 Thread Peter Maydell
On Thu, 27 Aug 2020 at 08:20, Thomas Huth wrote: > Peter, what is still missing that you could use the gitlab CI as gating > tests, too? I think we're waiting on a respin of the scripts from Cleber, aren't we? Also we need figure out how to handle the conflict between "gitlab's git repo is mirro

[PATCH] meson: fix keymaps witout qemu-keymap

2020-08-27 Thread Gerd Hoffmann
In case the qemu-keymap tool generating them is neither installed on the system nor built from sources (due to xkbcommon not being available) qemu will not find the keymaps when started directly from the build tree, This happens because commit ddcf607fa3d6 ("meson: drop keymaps symlink") removed t

Re: [PATCH v7 8/8] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-08-27 Thread Daniel P . Berrangé
On Tue, Aug 04, 2020 at 10:12:01AM +0200, Lukas Straub wrote: > A connecting chardev object has an additional reference by the connecting > thread, so if the chardev is still connecting by the end of the test, > then the chardev object won't be freed. This in turn means that the yank > instance won

Re: [PATCH v7 1/8] Introduce yank feature

2020-08-27 Thread Daniel P . Berrangé
On Tue, Aug 04, 2020 at 10:11:34AM +0200, Lukas Straub wrote: > The yank feature allows to recover from hanging qemu by "yanking" > at various parts. Other qemu systems can register themselves and > multiple yank functions. Then all yank functions for selected > instances can be called by the 'yank

Re: [PATCH v7 2/8] block/nbd.c: Add yank feature

2020-08-27 Thread Daniel P . Berrangé
On Tue, Aug 04, 2020 at 10:11:37AM +0200, Lukas Straub wrote: > Register a yank function which shuts down the socket and sets > s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an > error occured. > > Signed-off-by: Lukas Straub > Acked-by: Stefan Hajnoczi > --- > block/nbd.c | 129

Re: [PATCH v7 3/8] chardev/char-socket.c: Add yank feature

2020-08-27 Thread Daniel P . Berrangé
On Tue, Aug 04, 2020 at 10:11:41AM +0200, Lukas Straub wrote: > Register a yank function to shutdown the socket on yank. > > Signed-off-by: Lukas Straub > Acked-by: Stefan Hajnoczi > --- > chardev/char-socket.c | 31 +++ > 1 file changed, 31 insertions(+) Reviewed-b

Re: [PATCH v7 4/8] migration: Add yank feature

2020-08-27 Thread Daniel P . Berrangé
On Tue, Aug 04, 2020 at 10:11:45AM +0200, Lukas Straub wrote: > Register yank functions on sockets to shut them down. > > Signed-off-by: Lukas Straub > Acked-by: Stefan Hajnoczi > --- > migration/channel.c | 12 > migration/migration.c | 25 +++

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

2020-08-27 Thread Daniel P . Berrangé
On Thu, Aug 27, 2020 at 10:42:46AM +0200, Lukas Straub wrote: > On Tue, 18 Aug 2020 14:26:31 +0200 > Lukas Straub wrote: > > > On Tue, 4 Aug 2020 10:11:22 +0200 > > Lukas Straub wrote: > > > > > Hello Everyone, > > > In many cases, if qemu has a network connection (qmp, migration, chardev, > >

Re: [PATCH] meson: fix qxl module build

2020-08-27 Thread Marc-André Lureau
On Thu, Aug 27, 2020 at 10:47 AM Gerd Hoffmann wrote: > Drop qxl object from softmmu source set, it is built as module. > > Also drop CONFIG_QXL condition from qxl_ss.add. First because it is > pointless, the whole thing is wrapped into "has_key('CONFIG_QXL')". > Second because it doesn't work f

[PATCH v3 01/10] hw/arm/virt-acpi-build:Remove dead assignment in build_madt()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: hw/arm/virt-acpi-build.c:641:5: warning: Value stored to 'madt' is never read madt = acpi_data_push(table_data, sizeof *madt); ^ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Igor Mamme

[PATCH v3 04/10] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: target/arm/translate-a64.c:13007:5: warning: Value stored to 'rd' is never read rd = extract32(insn, 0, 5); ^~ target/arm/translate-a64.c:13008:5: warning: Value stored to 'rn' is never read rn = extract32(insn, 5, 5);

[PATCH v3 00/10] trivial patchs for static code analyzer fixes

2020-08-27 Thread Chen Qun
Since v2: - Patch1: Addressed Li Qiang review comment. - Patch2: Addressed Peter Maydell and Li Qiang review comment. - Patch3:Delete memleak commit message, and Addressed Peter Maydell review comment. - Patch4: Addressed Peter Maydell review comment. - Patch6: Addressed Li Qiang review comment.

[PATCH v3 03/10] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: target/arm/translate-a64.c:8635:14: warning: Value stored to 'tcg_rn' during its initialization is never read TCGv_i64 tcg_rn = new_tmp_a64(s); ^~ ~~ target/arm/translate-a64.c:8636:14: warning: Value stored to 'tcg_rd' du

[PATCH v3 02/10] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: hw/arm/omap1.c:1760:15: warning: Value stored to 'cpu' during its initialization is never read CPUState *cpu = CPU(s->cpu); ^~~ ~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Peter Maydell Reviewed-by: Li Qi

[PATCH v3 06/10] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: hw/net/virtio-net.c:2077:5: warning: Value stored to 'tcp_flag' is never read tcp_flag &= VIRTIO_NET_TCP_FLAG; ^ ~~~ The 'VIRTIO_NET_TCP_FLAG' is '0x3F'. The last ‘tcp_flag’ assignment statement is the same as that of the

Re: [PATCH v2 (BROKEN) 0/6] migration: bring improved savevm/loadvm/delvm to QMP

2020-08-27 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Aug 26, 2020 at 05:52:06PM +0200, Markus Armbruster wrote: >> Sorry for taking so long to reply. >> >> Daniel P. Berrangé writes: >> >> > A followup to: >> > >> > v1: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg00866.html >> > >> > When QMP wa

[PATCH v3 07/10] vfio/platform: Remove dead assignment in vfio_intp_interrupt()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: hw/vfio/platform.c:239:9: warning: Value stored to 'ret' is never read ret = event_notifier_test_and_clear(intp->interrupt); ^ ~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by:

[PATCH v3 09/10] hw/intc: fix default registers value in exynos4210_combiner_read()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: hw/intc/exynos4210_combiner.c:231:9: warning: Value stored to 'val' is never read val = s->reg_set[offset >> 2]; The default register return value should be return 'val'. Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Igor Mitsyanko C

[PATCH v3 08/10] usb/bus: Remove dead assignment in usb_get_fw_dev_path()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: qemu/hw/usb/bus.c:615:13: warning: Value stored to 'pos' is never read pos += snprintf(fw_path + pos, fw_len - pos, "%s@%lx", Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Markus Armbruster --- Cc: Gerd Hoffmann Cc: Markus Ar

[PATCH v3 05/10] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: hw/virtio/vhost-user.c:606:9: warning: Value stored to 'mr' is never read mr = vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd); ^~ Reported-by: Euler Robot Signed-off-by:

[PATCH v3 10/10] hw/display/vga:Remove redundant statement in vga_draw_graphic()

2020-08-27 Thread Chen Qun
Clang static code analyzer show warning: hw/display/vga.c:1677:9: warning: Value stored to 'update' is never read update = full_update; ^~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Gerd Hoffmann Reviewed-by: Li Qiang --- Cc: Gerd Hoffmann

Re: [PATCH v2 (BROKEN) 0/6] migration: bring improved savevm/loadvm/delvm to QMP

2020-08-27 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Aug 26, 2020 at 07:28:24PM +0100, Daniel P. Berrangé wrote: >> On Wed, Aug 26, 2020 at 05:52:06PM +0200, Markus Armbruster wrote: >> > Open questions: >> > >> > * Do we want the QMP command to delete existing snapshots with >> > conflicting tag / ID, like H

  1   2   3   4   5   >