[PATCH v3 5/5] s390x/pci: Honor DMA limits set by vfio

2020-09-15 Thread Matthew Rosato
When an s390 guest is using lazy unmapping, it can result in a very large number of oustanding DMA requests, far beyond the default limit configured for vfio. Let's track DMA usage similar to vfio in the host, and trigger the guest to flush their DMA mappings before vfio runs out. Signed-off-by:

Re: [PATCH v3 14/15] hw/block/nvme: Use zone metadata file for persistence

2020-09-15 Thread Klaus Jensen
On Sep 14 07:14, Dmitry Fomichev wrote: > A ZNS drive that is emulated by this module is currently initialized > with all zones Empty upon startup. However, actual ZNS SSDs save the > state and condition of all zones in their internal NVRAM in the event > of power loss. When such a drive is

Re: [PATCH 1/5] qom: Allow objects to be allocated with increased alignment

2020-09-15 Thread Richard Henderson
On 9/15/20 11:07 AM, Eduardo Habkost wrote: > On Tue, Sep 15, 2020 at 10:46:31AM -0700, Richard Henderson wrote: >> It turns out that some hosts have a default malloc alignment less >> than that required for vectors. >> >> We assume that, with compiler annotation on CPUArchState, that we >> can

Re: PATCH: Increase System Firmware Max Size

2020-09-15 Thread McMillan, Erich
Apologies, ignore previous patch. The relevant patch is below: >From 473daf6129debf8d158a9ae1aff788c5bdbbc799 Mon Sep 17 00:00:00 2001 From: Erich McMillan Date: Tue, 15 Sep 2020 13:23:25 -0500 Subject: [PATCH 2/2] Add max firmware size as optional parameter Signed-off-by: Erich McMillan ---

Re: PATCH: Increase System Firmware Max Size

2020-09-15 Thread McMillan, Erich
Hi all, I've rewritten the FLASH_SIZE_LIMIT as a command line parameter as requested, but I'd like some feedback. My current concerns are: 1. I'm not too happy using an global variable in this manner, but I'm not sure the appropriate way to share this information between vl.c and

Re: [PATCH] hw/scsi/vmw_pvscsi.c: Fix wrong usage of gboolean types in PVSCSIState

2020-09-15 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > Hi Amey, > > On 9/14/20 1:44 AM, Amey Narkhede wrote: > > rings_info_valid, msg_ring_info_valid and use_msg fields of struct > > PVSCSIState are using gboolean TRUE/FALSE values with the type uint8_t. > > Change their type to bool along with

Re: riscv32 wait() problem, qemu or glibc?

2020-09-15 Thread Andreas K . Hüttel
Not sure if this helps in any way, but I tried if the problem is specific to the return value 42. Leading to more confusing results... though this looks more like an emulator problem than a libc problem to me now. Happy to debug further, but with limited ideas on how to proceed. (riscv-ilp32

RE: [PATCH v3 02/15] hw/block/nvme: Report actual LBA data shift in LBAF

2020-09-15 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Tuesday, September 15, 2020 3:34 AM > To: Dmitry Fomichev > Cc: Keith Busch ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Maxim Levitsky > ; Fam Zheng ; Niklas Cassel > ; Damien Le Moal ; > qemu-bl...@nongnu.org;

RE: [PATCH v3 01/15] hw/block/nvme: Define 64 bit cqe.result

2020-09-15 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Tuesday, September 15, 2020 3:37 AM > To: Dmitry Fomichev > Cc: Keith Busch ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Maxim Levitsky > ; Fam Zheng ; Niklas Cassel > ; Damien Le Moal ; > qemu-bl...@nongnu.org;

RE: [PATCH v2 00/15] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-09-15 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Tuesday, September 15, 2020 3:44 AM > To: Dmitry Fomichev > Cc: Keith Busch ; Klaus Jensen > ; Kevin Wolf ; Philippe > Mathieu-Daudé ; Maxim Levitsky > ; Fam Zheng ; Niklas Cassel > ; Damien Le Moal ; > qemu-bl...@nongnu.org;

Re: [PATCH V1 32/32] vfio-pci: improved tracing

2020-09-15 Thread Dr. David Alan Gilbert
* Steve Sistare (steven.sist...@oracle.com) wrote: > Print more info for existing trace points: > trace_kvm_irqchip_add_msi_route. > trace_pci_update_mappings_del > trace_pci_update_mappings_add > > Add new trace points: > trace_kvm_irqchip_assign_irqfd > trace_msix_table_mmio_write >

[Bug 1892604] Re: qemu-system-arm: ../hw/usb/hcd-dwc2.c:666: dwc2_glbreg_read: Assertion `addr <= GINTSTS2' failed.

2020-09-15 Thread Petunia
ah, well then its the same error: qemu-system-arm: /build/qemu/src/qemu-5.1.0/hw/usb/hcd-dwc2.c:666: dwc2_glbreg_read: Assertion `addr <= GINTSTS2' failed. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Bug 1895053] Re: Cannot nspawn raspbian 10 [FAILED] Failed to start Journal Service.

2020-09-15 Thread Petunia
I take back everything and claim the opposite... same error as bug reporter -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1895053 Title: Cannot nspawn raspbian 10 [FAILED] Failed to start Journal

[PATCH v2 2/2] hw: usb: hcd-ohci: check for processed TD before retire

2020-09-15 Thread P J P
From: Prasad J Pandit While servicing OHCI transfer descriptors(TD), ohci_service_iso_td retires a TD if it has passed its time frame. It does not check if the TD was already processed once and holds an error code in TD_CC. It may happen if the TD list has a loop. Add check to avoid an infinite

[PATCH v2 1/2] hw: usb: hcd-ohci: check len and frame_number variables

2020-09-15 Thread P J P
From: Prasad J Pandit While servicing the OHCI transfer descriptors(TD), OHCI host controller derives variables 'start_addr', 'end_addr', 'len' etc. from values supplied by the host controller driver. Host controller driver may supply values such that using above variables leads to out-of-bounds

[PATCH v2 0/2] hw: usb: hcd-ohci: fix oob access and loop issues

2020-09-15 Thread P J P
From: Prasad J Pandit Hello, * While servicing transfer descriptors(TD) in ohci_service[_iso]_td routines, it may lead to out-of-bounds access and/or infinite loop issues, as the OHCI controller driver may supply malicious values to derive frame_number, start_addr, end_addr etc.

Re: [PATCH v10 15/26] cirrus: Building freebsd in a single short

2020-09-15 Thread Yonggang Luo
On Wed, Sep 16, 2020 at 1:48 AM Philippe Mathieu-Daudé wrote: > > Typo "single shot" in subject? Yeap, single shot, hope the maintainer fix it > > > On 9/15/20 7:12 PM, Yonggang Luo wrote: > > This reverts commit 45f7b7b9f38f5c4d1529a37c93dedfc26a231bba > > ("cirrus.yml: Split FreeBSD job into

Re: [PATCH 1/5] qom: Allow objects to be allocated with increased alignment

2020-09-15 Thread Eduardo Habkost
On Tue, Sep 15, 2020 at 10:46:31AM -0700, Richard Henderson wrote: > It turns out that some hosts have a default malloc alignment less > than that required for vectors. > > We assume that, with compiler annotation on CPUArchState, that we > can properly align the vector portion of the guest

[PATCH 4/5] target/riscv: Set instance_align on RISCVCPU TypeInfo

2020-09-15 Thread Richard Henderson
Fix alignment of CPURISCVState.vreg. Signed-off-by: Richard Henderson --- Cc: Alistair Francis Cc: qemu-ri...@nongnu.org --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 57c006df5d..0bbfd7f457 100644 ---

[Bug 1892604] Re: qemu-system-arm: ../hw/usb/hcd-dwc2.c:666: dwc2_glbreg_read: Assertion `addr <= GINTSTS2' failed.

2020-09-15 Thread Brendan Dolan-Gavitt
That part is easily fixed by running qemu-img resize 2016-05-27-raspbian-jessie.img 4G -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1892604 Title: qemu-system-arm: ../hw/usb/hcd-dwc2.c:666:

[PATCH 1/5] qom: Allow objects to be allocated with increased alignment

2020-09-15 Thread Richard Henderson
It turns out that some hosts have a default malloc alignment less than that required for vectors. We assume that, with compiler annotation on CPUArchState, that we can properly align the vector portion of the guest state. Fix the alignment of the allocation by using qemu_memalloc when required.

Re: [PATCH] guest agent: Fixes for windows guest agent building on msys2/mingw

2020-09-15 Thread Philippe Mathieu-Daudé
On 9/15/20 7:41 PM, 罗勇刚(Yonggang Luo) wrote: > On Wed, Sep 16, 2020 at 12:41 AM Philippe Mathieu-Daudé > mailto:phi...@redhat.com>> wrote: >> >> On 9/15/20 6:33 PM, Yonggang Luo wrote: >> > error message: >> > "cc" "-Iqga/qemu-ga.exe.p" "-Iqga" "-I../qga" "-I." "-Iqapi" > "-Itrace" "-Iui"

[Bug 1892604] Re: qemu-system-arm: ../hw/usb/hcd-dwc2.c:666: dwc2_glbreg_read: Assertion `addr <= GINTSTS2' failed.

2020-09-15 Thread Petunia
for me the output is: % qemu-system-arm -M raspi2 -m 1G -dtb bcm2709-rpi-2-b.dtb -kernel kernel7.img -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2" -sd 2016-05-27-raspbian-jessie.img -smp 4 -serial stdio -display none WARNING: Image format

Re: [PATCH V1 22/32] char: qio_channel_socket_accept reuse fd

2020-09-15 Thread Daniel P . Berrangé
On Tue, Sep 15, 2020 at 06:33:34PM +0100, Dr. David Alan Gilbert wrote: > * Steve Sistare (steven.sist...@oracle.com) wrote: > > From: Mark Kanda > > > > Add an fd argument to qio_channel_socket_accept. If not -1, the channel > > uses that fd instead of accepting a new socket connection. All

Re: [PATCH v10 15/26] cirrus: Building freebsd in a single short

2020-09-15 Thread Philippe Mathieu-Daudé
Typo "single shot" in subject? On 9/15/20 7:12 PM, Yonggang Luo wrote: > This reverts commit 45f7b7b9f38f5c4d1529a37c93dedfc26a231bba > ("cirrus.yml: Split FreeBSD job into two parts"). > > freebsd 1 hour limit not hit anymore > > I think we going to a wrong direction, I think there is some

[PATCH 2/5] target/arm: Set instance_align on CPUARM TypeInfo

2020-09-15 Thread Richard Henderson
Fix alignment of CPUARMState.vfp.zregs. Signed-off-by: Richard Henderson --- Cc: Peter Maydell Cc: qemu-...@nongnu.org --- target/arm/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 7b5ea65fab..a7643deab4 100644 --- a/target/arm/cpu.c +++

Re: [PATCH v2 6/8] configure: include tilegx-linux-user in the deprecation logic

2020-09-15 Thread Richard Henderson
On 9/15/20 6:43 AM, Alex Bennée wrote: > The target is already marked as deprecated in the documentation. > > Signed-off-by: Alex Bennée > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 6/8] configure: include tilegx-linux-user in the deprecation logic

2020-09-15 Thread Philippe Mathieu-Daudé
On 9/15/20 3:43 PM, Alex Bennée wrote: > The target is already marked as deprecated in the documentation. > > Signed-off-by: Alex Bennée > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure b/configure > index 58be974065c8..dfd7f18dcb24 100755 >

[PATCH 0/5] qom: Allow object to be aligned

2020-09-15 Thread Richard Henderson
I've seen some failures on arm and s390x hosts after enabling host vector support. It turns out that the malloc for these hosts does not provide 16-byte alignment. We already have a function that can alloc with alignment, but we need to pass this down from the structure. We also don't want to

[PATCH 5/5] target/s390x: Set instance_align on S390CPU TypeInfo

2020-09-15 Thread Richard Henderson
Fix alignment of CPUS390XState.vregs. Signed-off-by: Richard Henderson --- Cc: David Hildenbrand Cc: Cornelia Huck Cc: qemu-s3...@nongnu.org --- target/s390x/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 749cd548f0..e350edc9f5 100644

[PATCH v2] hw/block/nand: Decommission the NAND museum

2020-09-15 Thread Philippe Mathieu-Daudé
This is the QEMU equivalent of this Linux commit (but 7 years later): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f7025a43a9da2 The MTD subsystem has its own small museum of ancient NANDs in a form of the CONFIG_MTD_NAND_MUSEUM_IDS configuration option.

[PATCH] hw/scsi/lsi53c895a: Sanitize some trace events format

2020-09-15 Thread Philippe Mathieu-Daudé
Make some lsi53c895a trace events more understandable. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/trace-events | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/scsi/trace-events b/hw/scsi/trace-events index 9a4a60ca635..ac4209f361e 100644 ---

[PATCH 3/5] target/ppc: Set instance_align on PowerPCCPU TypeInfo

2020-09-15 Thread Richard Henderson
Fix alignment of CPUPPCState.vsr. Signed-off-by: Richard Henderson --- Cc: David Gibson Cc: qemu-...@nongnu.org --- target/ppc/translate_init.c.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.inc index 230a062d29..accb4f2fae

[Bug 1895053] Re: Cannot nspawn raspbian 10 [FAILED] Failed to start Journal Service.

2020-09-15 Thread Petunia
tldr: i dont have the same issue as described in your bug see my post there: https://bugs.launchpad.net/qemu/+bug/1892604/comments/6 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1895053 Title:

Re: [PATCH V1 22/32] char: qio_channel_socket_accept reuse fd

2020-09-15 Thread Dr. David Alan Gilbert
* Steve Sistare (steven.sist...@oracle.com) wrote: > From: Mark Kanda > > Add an fd argument to qio_channel_socket_accept. If not -1, the channel > uses that fd instead of accepting a new socket connection. All callers > pass -1 in this patch, so no functional change. Doesn't some of this

[PATCH v10 25/26] block: Fixes nfs compiling error on msys2/mingw

2020-09-15 Thread Yonggang Luo
These compiling errors are fixed: ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory 27 | #include | ^~~~ compilation terminated. ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' 63 | blkcnt_t st_blocks; | ^~~~ ../block/nfs.c:

[PATCH v10 23/26] meson: upgrade meson for execute custom ninjatool under msys2 properly

2020-09-15 Thread Yonggang Luo
* Bump versions to 0.55.2 for release * Tag Info: object 008d13038f95e7c7d8ad553f14e408da5b94c360 type commit tag 0.55.2 tagger Jussi Pakkanen 2020/9/11 1:24:47 Signed-off-by: Yonggang Luo --- meson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson b/meson index

Re: [PATCH 00/13] dma: Let the DMA API take MemTxAttrs argument and propagate MemTxResult

2020-09-15 Thread Philippe Mathieu-Daudé
This series is fully review. Paolo, does it belong to your tree? On 9/4/20 5:44 PM, Philippe Mathieu-Daudé wrote: > Salvaging cleanups patches from the RFC series "Forbid DMA write > accesses to MMIO regions" [*], propagating MemTxResult and > adding documentation. > > [*]

Re: [PATCH 0/3] pci: Let PCI DMA API functions propagate a MemTxResult

2020-09-15 Thread Philippe Mathieu-Daudé
On 9/4/20 6:26 PM, Philippe Mathieu-Daudé wrote: > The DMA API propagates MemTxResult: > - MEMTX_OK, > - MEMTX_device_ERROR, > - MEMTX_DECODE_ERROR. > > Let the PCI DMA API propagate them, as they are > clearer than an undocumented 'int'. > > Based-on: <20200904154439.643272-1-phi...@redhat.com>

Re: [PATCH] hw/input/tsc2xxx: Reduce MouseTransformInfo structure exposure

2020-09-15 Thread Philippe Mathieu-Daudé
ping? On 9/7/20 3:01 AM, Philippe Mathieu-Daudé wrote: > Commit a5d7eb6534a ("Add TSC2301 touchscreen & keypad controller") > added the MouseTransformInfo declaration in "ui/console.h", > however it is only used in "hw/input/tsc2xxx.h". > Reduce the structure exposure by moving it to the single

Re: [PATCH] hw/arm/aspeed: Map the UART5 device unconditionally

2020-09-15 Thread Philippe Mathieu-Daudé
ping? On 9/5/20 11:24 PM, Philippe Mathieu-Daudé wrote: > The UART5 is present on the machine regardless there is a > character device connected to it. Map it unconditionally. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/arm/aspeed_ast2600.c | 8 +++- > hw/arm/aspeed_soc.c | 8

Re: [PATCH] hw/mips/malta: Fix FPGA I/O region size

2020-09-15 Thread Philippe Mathieu-Daudé
ping? On 9/5/20 11:30 PM, Philippe Mathieu-Daudé wrote: > The FPGA present on the CoreCard has an I/O region 1MiB wide. > > Refs: > - Atlas User’s Manual (Document Number: MD5) > - Malta User’s Manual (Document Number: MD00048) > > Fixes: ea85df72b60 ("mips_malta: convert to memory API") >

Re: [PATCH v2 5/8] configure: clean-up the target-list-exclude logic

2020-09-15 Thread Richard Henderson
On 9/15/20 6:43 AM, Alex Bennée wrote: > Rather than sed and loop just do a grep. > > Signed-off-by: Alex Bennée > --- > configure | 10 +- > 1 file changed, 1 insertion(+), 9 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH v10 26/26] block: enable libnfs on msys2/mingw in cirrus.yml

2020-09-15 Thread Yonggang Luo
At the begging libnfs are not enabled because of compiling error, now it's fixed so enable it Signed-off-by: Yonggang Luo --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index 90ed891865..ca4d7db64f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@

Re: [PATCH v2 01/10] capstone: Convert Makefile bits to meson bits

2020-09-15 Thread Yonggang Luo
On Wed, Sep 16, 2020 at 1:14 AM Paolo Bonzini wrote: > > On 15/09/20 19:07, 罗勇刚(Yonggang Luo) wrote: > > > > Linux distributions generally do not want to have bundled libraries, so > > > > Yes, bundled libraries is a bad idea, but static linked library is > > another case, that won't affect >

Re: [PATCH v2 01/10] capstone: Convert Makefile bits to meson bits

2020-09-15 Thread Yonggang Luo
On Wed, Sep 16, 2020 at 1:00 AM Paolo Bonzini wrote: > On 15/09/20 18:12, 罗勇刚(Yonggang Luo) wrote: > > > > I suggest remove the capstone=system option cause the system library > > may not satisfy the requirements of qemu and create in-consistence > > expereince when bug or error happens about

Re: [PATCH v2 8/8] configure: add [lm32|unicore32]-softmmu to deprecation logic

2020-09-15 Thread Richard Henderson
On 9/15/20 6:43 AM, Alex Bennée wrote: > While we are at it move the few places where they are into the > deprecation build bucket. > > Signed-off-by: Alex Bennée > --- > configure | 2 +- > .gitlab-ci.yml | 9 + > .shippable.yml | 2 +- > 3 files changed, 7 insertions(+), 6

Re: [PATCH v2 2/8] iotests: Drop readlink -f

2020-09-15 Thread Richard Henderson
On 9/15/20 6:43 AM, Alex Bennée wrote: > From: Max Reitz > > On macOS, (out of the box) readlink does not have -f. We do not really > need readlink here, though, it was just a replacement for realpath > (which is not available on our BSD test systems), which we needed to > make the $(dirname)

Re: [PATCH v2 4/8] configure: also skip deprecated targets with target-list-exclude

2020-09-15 Thread Richard Henderson
On 9/15/20 6:43 AM, Alex Bennée wrote: > Now the user has to make an even more deliberate decision to > enable a deprecated target rather than getting it as a side effect of > using --target-exclude-list. > > Signed-off-by: Alex Bennée > --- > configure | 11 --- > 1 file changed, 8

[PATCH v10 22/26] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full

2020-09-15 Thread Yonggang Luo
drain_call_rcu is necessary on win32, because under win32, if you don't close the file before remove it, the remove would be fail. Signed-off-by: Yonggang Luo --- tests/test-logging.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-logging.c b/tests/test-logging.c index

[PATCH v10 21/26] tests: Fixes test-qdev-global-props.c

2020-09-15 Thread Yonggang Luo
On win32 the line ending are \r\n, so we skip the \n in function test_dynamic_globalprop Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- tests/test-qdev-global-props.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test-qdev-global-props.c

[PATCH v10 24/26] ci: Enable msys2 ci in cirrus

2020-09-15 Thread Yonggang Luo
Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides

[PATCH v10 19/26] tests: Fixes test-io-channel-file by mask only owner file state mask bits

2020-09-15 Thread Yonggang Luo
This is the error on msys2/mingw Running test test-io-channel-file ** ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438) ERROR test-io-channel-file - Bail out!

[PATCH v10 00/26] W32, W64 msys2/mingw patches

2020-09-15 Thread Yonggang Luo
V9-V10 * gcrypt: test_tls_psk_init should write binary file instead text file. Split #include out, that line not belong this patch * tests: Enable crypto tests under msys2/mingw move qemu_socketpair into oslib-win32.c and rename to socketpair move qemu_link into osdep.c Fixes code style

[PATCH v10 04/26] win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS.

2020-09-15 Thread Yonggang Luo
First, this reduce the size of configure, configure are tending to removal in future, and this didn't introduce any new feature or remove any exist feature. Second, the current localtime_r detection are conflict with ncursesw detection in mingw, when ncursesw detected, it will provide the

Re: [PATCH v2 01/10] capstone: Convert Makefile bits to meson bits

2020-09-15 Thread Paolo Bonzini
On 15/09/20 19:07, 罗勇刚(Yonggang Luo) wrote: > > Linux distributions generally do not want to have bundled libraries, so > > Yes, bundled libraries is a bad idea, but static linked library is > another case, that won't affect > the Linux distributions.  As far as Linux distributions are

[PATCH v10 20/26] tests: fix test-util-sockets.c

2020-09-15 Thread Yonggang Luo
Fixes following errors: Running test test-util-sockets ERROR test-util-sockets - missing test plan # Start of name tests ** ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1) Bail out!

[PATCH v10 18/26] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c

2020-09-15 Thread Yonggang Luo
This is a fixes for (C:\work\xemu\qemu\build\tests\test-aio-multithread.exe:19100): GLib-CRITICAL **: 23:03:24.965: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed ERROR test-aio-multithread - Bail out! GLib-FATAL-CRITICAL: g_source_remove_poll: assertion '!SOURCE_DESTROYED

[PATCH v10 16/26] tests: Convert g_free to g_autofree macro in test-logging.c

2020-09-15 Thread Yonggang Luo
g_autofree are prefer than g_free when possible. Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- tests/test-logging.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index

[Bug 1895703] [NEW] performance degradation in tcg since Meson switch

2020-09-15 Thread Philippe Mathieu-Daudé
Public bug reported: The buildsys conversion to Meson (1d806cef0e3..7fd51e68c34) introduced a degradation in performance in some TCG targets: Test Program: matmult_double Target

[PATCH v10 01/26] rcu: Implement drain_call_rcu

2020-09-15 Thread Yonggang Luo
From: Maxim Levitsky This will allow is to preserve the semantics of hmp_device_del, that the device is deleted immediatly which was changed by previos patch that delayed this to RCU callback Signed-off-by: Maxim Levitsky Suggested-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi ---

[PATCH v10 03/26] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-15 Thread Yonggang Luo
The mingw pkg-config are showing following absolute path and contains : as the separator, so we must not use : as path separator. and we know the command line parameter are not likely contains newline, we could use newline as path command line parameter separator -D_XOPEN_SOURCE=600

[PATCH v10 17/26] tests: Fixes test-io-channel-socket.c tests under msys2/mingw

2020-09-15 Thread Yonggang Luo
Currently test-io-channel-socket doesn't init with qemu_init_main_loop and that's cause the qemu_aio_context not inited, and the following is the stack when null pointer accessed: qemu_fd_register (c:\work\xemu\qemu\util\main-loop.c:336) qemu_try_set_nonblock

[PATCH v10 02/26] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-15 Thread Yonggang Luo
The currently random version capstone have the following compiling issue: CC /c/work/xemu/qemu/build/slirp/src/arp_table.o make[1]: *** No rule to make target “/c/work/xemu/qemu/build/capstone/capstone.lib”。 Stop. Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 are the tagged

[PATCH v10 05/26] curses: Fixes curses compiling errors.

2020-09-15 Thread Yonggang Luo
This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) |

[PATCH v10 07/26] tests: Fixes test-replication.c on msys2/mingw.

2020-09-15 Thread Yonggang Luo
On Windows there is no path like /tmp/s_local_disk.XX Use g_get_tmp_dir instead of /tmp. Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- tests/test-replication.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c

[PATCH v10 08/26] tests: test-replication disable /replication/secondary/* on msys2/mingw.

2020-09-15 Thread Yonggang Luo
They caused failure on msys2/mingw, that's because file-win32.c not implement .bdrv_reopen_prepare/commit/abort yet. This is the error message: > $ ./tests/test-replication.exe > # random seed: R02S3f4d1c01af2b0a046990e0235c481faf > 1..13 > # Start of replication tests > # Start of primary tests

Re: [PATCH v2 01/10] capstone: Convert Makefile bits to meson bits

2020-09-15 Thread Paolo Bonzini
On 15/09/20 18:12, 罗勇刚(Yonggang Luo) wrote: > > I suggest remove the capstone=system option cause the system library > may not satisfy the requirements of qemu and create in-consistence > expereince when bug or error happens about capstone. We either have > git submodule capstone or nothing at

Re: [PATCH v2 1/8] linux-user: test, don't assert addr != test in pgb_reserved_va

2020-09-15 Thread Richard Henderson
On 9/15/20 6:43 AM, Alex Bennée wrote: > On older kernels which don't implement MAP_FIXED_NOREPLACE the kernel > may still fail to give us the address we asked for despite having > already probed the map for a valid hole. Asserting isn't particularly > useful to the user so let us move the check

[PATCH v10 11/26] gcrypt: test_tls_psk_init should write binary file instead text file.

2020-09-15 Thread Yonggang Luo
On windows, if open file with "w", it's will automatically convert "\n" to "\r\n" when writing to file. Signed-off-by: Yonggang Luo --- tests/crypto-tls-psk-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/crypto-tls-psk-helpers.c

[PATCH v10 06/26] tests: disable /char/stdio/* tests in test-char.c on win32

2020-09-15 Thread Yonggang Luo
These tests are blocking test-char to be finished. Disable them by using variable is_win32, so we doesn't need macro to open it. and easy recover those function latter. Signed-off-by: Yonggang Luo --- tests/test-char.c | 27 +-- 1 file changed, 17 insertions(+), 10

[PATCH v10 10/26] meson: Use -b to ignore CR vs. CR-LF issues on Windows

2020-09-15 Thread Yonggang Luo
Ideally we would use the '--strip-trailing-cr' option, but not being POSIX is a portability problem (i.e. BSDs and Solaris based OSes). Instead use the '-b' option which, although doing slightly more, produce the expected result on Windows." Signed-off-by: Yonggang Luo Reviewed-by: Eric Blake

[PATCH v10 14/26] vmstate: Fixes test-vmstate.c on msys2/mingw

2020-09-15 Thread Yonggang Luo
The vmstate are valid on win32, just need generate tmp path properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé --- tests/test-vmstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v10 15/26] cirrus: Building freebsd in a single short

2020-09-15 Thread Yonggang Luo
This reverts commit 45f7b7b9f38f5c4d1529a37c93dedfc26a231bba ("cirrus.yml: Split FreeBSD job into two parts"). freebsd 1 hour limit not hit anymore I think we going to a wrong direction, I think there is some tests a stall the test runner, please look at

[PATCH v10 13/26] meson: remove empty else and duplicated gio deps

2020-09-15 Thread Yonggang Luo
Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build index 690723b470..23cb1b8742 100644 --- a/meson.build +++ b/meson.build @@ -317,7 +317,6 @@ opengl = not_found if 'CONFIG_OPENGL' in

[PATCH v10 12/26] tests: Enable crypto tests under msys2/mingw

2020-09-15 Thread Yonggang Luo
Fixes following tests on msys2/mingw 'test-crypto-tlscredsx509' test-crypto-tlssession' 'test-io-channel-tls' These tests are failure with: ERROR test-crypto-tlscredsx509 - missing test plan ERROR test-crypto-tlssession - missing test plan ERROR test-io-channel-tls - missing test plan Because on

[PATCH v10 09/26] osdep: file locking functions are not available on Win32

2020-09-15 Thread Yonggang Luo
Do not declare the following locking functions on Win32: int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void);

Re: [PATCH v2 01/10] capstone: Convert Makefile bits to meson bits

2020-09-15 Thread Paolo Bonzini
On 15/09/20 16:27, Richard Henderson wrote: > On 9/14/20 11:27 PM, Paolo Bonzini wrote: >> Looks good. Can you just add a "# Submodules" heading above the test? >> >> I would also like to remove the "yes" value (that is, the default fails if >> the >> internal copy is not there) but it can be

Re: couple meson issues

2020-09-15 Thread Paolo Bonzini
On 15/09/20 15:44, Andrew Jones wrote: > Hi Paolo, > > I noticed that 'make check-qtest-aarch64' no longer runs the > arm-cpu-feature test. I simply did > > diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build > index 874b5be62be2..db169a53b530 100644 > --- a/tests/qtest/meson.build >

[PATCH v8 6/7] block: drop bdrv_prwv

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
Now that we are not maintaining boilerplate code for coroutine wrappers, there is no more sense in keeping the extra indirection layer of bdrv_prwv(). Let's drop it and instead generate pure bdrv_preadv() and bdrv_pwritev(). Currently, bdrv_pwritev() and bdrv_preadv() are returning bytes on

[PATCH v8 0/7] coroutines: generate wrapper code

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
Hi all! The aim of the series is to reduce code-duplication and writing parameters structure-packing by hand around coroutine function wrappers. Benefits: - no code duplication - less indirection v8: 04: - rebase on meson build - script interface is changed to satisfy meson

[PATCH v8 7/7] block/io: refactor save/load vmstate

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
Like for read/write in a previous commit, drop extra indirection layer, generate directly bdrv_readv_vmstate() and bdrv_writev_vmstate(). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/coroutines.h| 10 +++ include/block/block.h | 6 ++-- block/io.c

[PATCH v8 4/7] scripts: add block-coroutine-wrapper.py

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
We have a very frequent pattern of creating coroutine from function with several arguments: - create structure to pack parameters - create _entry function to call original function taking parameters from struct - do different magic to handle completion: set ret to NOT_DONE or

[PATCH v8 2/7] block/io: refactor coroutine wrappers

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
Most of our coroutine wrappers already follow this convention: We have 'coroutine_fn bdrv_co_()' as the core function, and a wrapper 'bdrv_()' which does parameters packing and call bdrv_run_co(). The only outsiders are the bdrv_prwv_co and bdrv_common_block_status_above wrappers. Let's refactor

[PATCH v8 5/7] block: generate coroutine-wrapper code

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
Use code generation implemented in previous commit to generated coroutine wrappers in block.c and block/io.c Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/coroutines.h| 6 +- include/block/block.h | 16 ++-- block.c | 73 ---

[PATCH v8 1/7] block: return error-code from bdrv_invalidate_cache

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
This is the only coroutine wrapper from block.c and block/io.c which doesn't return a value, so let's convert it to the common behavior, to simplify moving to generated coroutine wrappers in a further commit. Also, bdrv_invalidate_cache is a void function, returning error only through **errp

[PATCH v8 3/7] block: declare some coroutine functions in block/coroutines.h

2020-09-15 Thread Vladimir Sementsov-Ogievskiy
We are going to keep coroutine-wrappers code (structure-packing parameters, BDRV_POLL wrapper functions) in separate auto-generated files. So, we'll need a header with declaration of original _co_ functions, for those which are static now. As well, we'll need declarations for wrapper functions. Do

Re: [PATCH 7/9] tests/performance: Add nightly tests

2020-09-15 Thread Aleksandar Markovic
On Wednesday, September 2, 2020, Alex Bennée wrote: > > Ahmed Karaman writes: > > > A nightly performance testing system to monitor any change in QEMU > > performance across seventeen different targets. > > > > The system includes eight different benchmarks to provide a variety > > of testing

Re: [PATCH] guest agent: Fixes for windows guest agent building on msys2/mingw

2020-09-15 Thread Philippe Mathieu-Daudé
On 9/15/20 6:33 PM, Yonggang Luo wrote: > error message: > "cc" "-Iqga/qemu-ga.exe.p" "-Iqga" "-I../qga" "-I." "-Iqapi" "-Itrace" "-Iui" > "-Iui/shader" "-IC:/CI-Tools/msys64/mingw64/include" > "-IC:/CI-Tools/msys64/mingw64/include/glib-2.0" > "-IC:/CI-Tools/msys64/mingw64/lib/glib-2.0/include"

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

2020-09-15 Thread Li Qiang
Chuan Zheng 于2020年9月15日周二 上午10:34写道: > > Implement calculate_dirtyrate() function. > > Signed-off-by: Chuan Zheng > Signed-off-by: YanYing Zhuang > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang > --- > migration/dirtyrate.c | 45 +++-- >

Re: [PATCH v9 09/12] migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid()

2020-09-15 Thread Li Qiang
Chuan Zheng 于2020年9月15日周二 上午10:34写道: > > Implement is_sample_period_valid() to check if the sample period is vaild and > do set_sample_page_period() to sleep specific time between sample actions. > > Signed-off-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert > Reviewed-by: David Edmondson

Re: [PATCH v2 03/10] disas: Move host asm annotations to tb_gen_code

2020-09-15 Thread Thomas Huth
On 15/09/2020 01.02, Richard Henderson wrote: > Instead of creating GStrings and passing them into log_disas, > just print the annotations directly in tb_gen_code. > > Fix the annotations for the slow paths of the TB, after the > part implementing the final guest instruction. > > Signed-off-by:

Re: [PATCH v9 07/12] migration/dirtyrate: Compare page hash results for recorded sampled page

2020-09-15 Thread Li Qiang
Chuan Zheng 于2020年9月15日周二 上午10:34写道: > > Compare page hash results for recorded sampled page. > > Signed-off-by: Chuan Zheng > Signed-off-by: YanYing Zhuang > Reviewed-by: Dr. David Alan Gilbert > --- > migration/dirtyrate.c | 63 > +++ > 1

[PATCH] guest agent: Fixes for windows guest agent building on msys2/mingw

2020-09-15 Thread Yonggang Luo
error message: "cc" "-Iqga/qemu-ga.exe.p" "-Iqga" "-I../qga" "-I." "-Iqapi" "-Itrace" "-Iui" "-Iui/shader" "-IC:/CI-Tools/msys64/mingw64/include" "-IC:/CI-Tools/msys64/mingw64/include/glib-2.0" "-IC:/CI-Tools/msys64/mingw64/lib/glib-2.0/include" "-fdiagnostics-color=auto" "-pipe" "-Wall"

Re: [PATCH v9 08/12] migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE

2020-09-15 Thread Li Qiang
Chuan Zheng 于2020年9月15日周二 上午10:34写道: > > In order to sample real RAM, skip ramblock with size below MIN_RAMBLOCK_SIZE > which is set as 128M. > > Signed-off-by: Chuan Zheng > Reviewed-by: David Edmondson > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang > --- >

Re: [PATCH] pci: check bus pointer before dereference

2020-09-15 Thread Philippe Mathieu-Daudé
+Igor On 9/15/20 3:51 PM, Li Qiang wrote: > P J P 于2020年8月27日周四 下午7:52写道: >> >> From: Prasad J Pandit >> >> While mapping IRQ level in pci_change_irq_level() routine, >> it does not check if pci_get_bus() returned a valid pointer. >> It may lead to a NULL pointer dereference issue. Add check to

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

2020-09-15 Thread Li Qiang
Chuan Zheng 于2020年9月15日周二 上午10:34写道: > > Record hash results for each sampled page, crc32 is taken to calculate > hash results for each sampled length in TARGET_PAGE_SIZE. > > Signed-off-by: Chuan Zheng > Signed-off-by: YanYing Zhuang > Reviewed-by: David Edmondson Reviewed-by: Li Qiang >

Re: [PATCH v9 04/12] migration/dirtyrate: Add dirtyrate statistics series functions

2020-09-15 Thread Li Qiang
Chuan Zheng 于2020年9月15日周二 上午10:34写道: > > Add dirtyrate statistics functions to record/update dirtyrate info. > > Signed-off-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang > --- > migration/dirtyrate.c | 32 >

Re: [PATCH v9 05/12] migration/dirtyrate: move RAMBLOCK_FOREACH_MIGRATABLE into ram.h

2020-09-15 Thread Li Qiang
Chuan Zheng 于2020年9月15日周二 上午10:34写道: > > RAMBLOCK_FOREACH_MIGRATABLE is need in dirtyrate measure, > move the existing definition up into migration/ram.h > > Signed-off-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert > Reviewed-by: David Edmondson Reviewed-by: Li Qiang > --- >

Re: [PATCH v9 03/12] migration/dirtyrate: Add RamblockDirtyInfo to store sampled page info

2020-09-15 Thread Li Qiang
Chuan Zheng 于2020年9月15日周二 上午10:34写道: > > Add RamblockDirtyInfo to store sampled page info of each ramblock. > > Signed-off-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert > Reviewed-by: David Edmondson Reviewed-by: Li Qiang > --- > migration/dirtyrate.h | 18 ++ > 1

<    1   2   3   4   5   >