[PATCH v2] gitlab-ci.yml: Add oss-fuzz build tests

2020-07-20 Thread Thomas Huth
From: Alexander Bulekov This tries to build and run the fuzzers with the same build-script used by oss-fuzz. This doesn't guarantee that the builds on oss-fuzz will also succeed, since oss-fuzz provides its own compiler and fuzzer vars, but it can catch changes that are not compatible with the th

Re: sysbus_create_simple Vs qdev_create

2020-07-20 Thread Markus Armbruster
Eduardo Habkost writes: > On Fri, Jul 17, 2020 at 07:10:57AM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > I'd also note that the use of "parent" in the code is also >> > ambiguous. It can mean: >> > >> > * QOM parent type, i.e. TypeInfo.parent. Related fields: >> > * p

Re: sysbus_create_simple Vs qdev_create

2020-07-20 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 17 Jul 2020 at 17:32, Daniel P. Berrangé wrote: >> Personally I've not seen a problem with the term "parent" in >> this scenario. The class inheritance metaphor maps reasonably >> clearly to a parent/child metaphor. > > It's not bad in itself; it's just that it me

Re: [PATCH v5 10/11] hw/arm: Wire up BMC boot flash for npcm750-evb and quanta-gsj

2020-07-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 7/17/20 10:27 AM, Philippe Mathieu-Daudé wrote: >> On 7/17/20 10:03 AM, Thomas Huth wrote: >>> On 17/07/2020 09.48, Philippe Mathieu-Daudé wrote: +Thomas >>> On 7/16/20 10:56 PM, Havard Skinnemoen wrote: > On Wed, Jul 15, 2020 at 1:54 PM Havard Sk

Re: Memory leak in bitmap code?

2020-07-20 Thread Vladimir Sementsov-Ogievskiy
20.07.2020 09:16, Thomas Huth wrote: Hi, looks like the LeakSanitizer spotted a memory leak in the bitmap related code ... not sure why it just triggered with Richard's pull request, and I can also not reproduce it... But since there is a nice backtrace in it and there have been some bitmap-r

Re: [PATCH v2 2/3] usb/hcd-xhci: Move qemu-xhci device to hcd-xhci-pci.c

2020-07-20 Thread Thomas Huth
On 20/07/2020 10.00, Sai Pavan Boddu wrote: > HI Philippe, > >> -Original Message- >> From: Philippe Mathieu-Daudé >> Sent: Thursday, June 25, 2020 1:48 PM >> To: Markus Armbruster ; Sai Pavan Boddu >> ; Thomas Huth >> Cc: Gerd Hoffmann ; Peter Maydell >> ; Eduardo Habkost ; >> qemu-deve

Re: [PATCH 0/2] virtio: non-legacy device handling

2020-07-20 Thread David Hildenbrand
On 07.07.20 12:54, Cornelia Huck wrote: > As discussed in "virtio-fs: force virtio 1.x usage", it seems like > a good idea to make sure that any new virtio device (which does not > support legacy virtio) is indeed a non-transitional device, just to > catch accidental misconfigurations. We can easil

RE: [PATCH v2 2/3] usb/hcd-xhci: Move qemu-xhci device to hcd-xhci-pci.c

2020-07-20 Thread Sai Pavan Boddu
HI Philippe, > -Original Message- > From: Philippe Mathieu-Daudé > Sent: Thursday, June 25, 2020 1:48 PM > To: Markus Armbruster ; Sai Pavan Boddu > ; Thomas Huth > Cc: Gerd Hoffmann ; Peter Maydell > ; Eduardo Habkost ; > qemu-devel@nongnu.org; Alistair Francis ; > 'Marc-André Lureau' ;

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

2020-07-20 Thread David Hildenbrand
On 24.06.20 22:23, Collin Walling wrote: > Rework the SCLP boundary check to account for different SCLP commands > (eventually) allowing different boundary sizes. > > Move the length check code into a separate function, and introduce a > new function to determine the length of the read SCP data (i

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

2020-07-20 Thread David Hildenbrand
On 24.06.20 22:23, Collin Walling wrote: > The header of the SCCB contains the actual length of the SCCB. Instead > of using a static 4K size, let's allow for a variable size determined > by the value set in the header. The proper checks are already in place > to ensure the SCCB length is sufficent

Re: [PATCH v6 13/13] tests/acceptance: console boot tests for quanta-gsj

2020-07-20 Thread Joel Stanley
On Fri, 17 Jul 2020 at 12:33, Cédric Le Goater wrote: > > On 7/17/20 8:02 AM, Havard Skinnemoen wrote: > > This adds two acceptance tests for the quanta-gsj machine. > > > > One test downloads a lightly patched openbmc flash image from github and > > verifies that it boots all the way to the login

Re: [PATCH] hw/i386/kvm/ioapic.c: fix typo in error message

2020-07-20 Thread Stefano Garzarella
+Cc qemu-triv...@nongnu.org On Fri, Jul 17, 2020 at 09:35:14PM +0900, Kenta Ishiguro wrote: > Fix a typo in an error message for KVM_SET_IRQCHIP ioctl: > "KVM_GET_IRQCHIP" should be "KVM_SET_IRQCHIP". > > Signed-off-by: Kenta Ishiguro > --- > hw/i386/kvm/ioapic.c | 2 +- > 1 file changed, 1 ins

[Bug 1880287] Re: gcc crashes in hppa emulation

2020-07-20 Thread Laurent Vivier
** Tags added: tcg -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1880287 Title: gcc crashes in hppa emulation Status in QEMU: New Bug description: There seems to be a translation bug in the q

Re: [PATCH-for-5.1] qdev: Allow to create hotplug device before plugging it to a bus

2020-07-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Commit 510ef98dca made qdev_realize() support bus-less devices, > asserting either the device is bus-less or the device is created > on a bus. Commit 464a22c757 used qdev_realize() instead of > object_property_set_bool(). Since qdev_realize() now checks for > a bu

[PATCH for-5.1? 0/3] Fix nbd reconnect dead-locks

2020-07-20 Thread Vladimir Sementsov-Ogievskiy
Hi all! I've found some dead-locks, which can be easily triggered on master branch with default nbd configuration (reconnect-delay is 0), here are fixes. 01-02 fix real dead-locks 03 - hm. I'm not sure that the problem is reachable on master, I've faced it in my development branch where I move i

[PATCH 2/3] block/nbd: on shutdown terminate connection attempt

2020-07-20 Thread Vladimir Sementsov-Ogievskiy
On shutdown nbd driver may be in a connecting state. We should shutdown it as well, otherwise we may hang in nbd_teardown_connection, waiting for conneciton_co to finish in BDRV_POLL_WHILE(bs, s->connection_co) loop if remote server is down. How to reproduce the dead lock: 1. Create nbd-fault-inj

[PATCH 1/3] block/nbd: allow drain during reconnect attempt

2020-07-20 Thread Vladimir Sementsov-Ogievskiy
It should be to reenter qio_channel_yield() on io/channel read/write path, so it's safe to reduce in_flight and allow attaching new aio context. And no problem to allow drain itself: connection attempt is not a guest request. Moreover, if remote server is down, we can hang in negotiation, blocking

[PATCH 3/3] block/nbd: nbd_co_reconnect_loop(): don't sleep if drained

2020-07-20 Thread Vladimir Sementsov-Ogievskiy
We try to go to wakeable sleep, so that, if drain begins it will break the sleep. But what if nbd_client_co_drain_begin() already called and s->drained is already true? We'll go to sleep, and drain will have to wait for the whole timeout. Let's improve it. Signed-off-by: Vladimir Sementsov-Ogievsk

Re: [PATCH 1/3] block/nbd: allow drain during reconnect attempt

2020-07-20 Thread Vladimir Sementsov-Ogievskiy
20.07.2020 12:00, Vladimir Sementsov-Ogievskiy wrote: It should be to reenter qio_channel_yield() on io/channel read/write should be safe I mean path, so it's safe to reduce in_flight and allow attaching new aio context. And no problem to allow drain itself: connection attempt is not a guest

Re: [PATCH 0/2] virtio: non-legacy device handling

2020-07-20 Thread Michael S. Tsirkin
On Mon, Jul 20, 2020 at 10:09:57AM +0200, David Hildenbrand wrote: > On 07.07.20 12:54, Cornelia Huck wrote: > > As discussed in "virtio-fs: force virtio 1.x usage", it seems like > > a good idea to make sure that any new virtio device (which does not > > support legacy virtio) is indeed a non-tran

Re: [PATCH 0/2] virtio: non-legacy device handling

2020-07-20 Thread David Hildenbrand
On 20.07.20 11:03, Michael S. Tsirkin wrote: > On Mon, Jul 20, 2020 at 10:09:57AM +0200, David Hildenbrand wrote: >> On 07.07.20 12:54, Cornelia Huck wrote: >>> As discussed in "virtio-fs: force virtio 1.x usage", it seems like >>> a good idea to make sure that any new virtio device (which does not

Re: [PATCH] hw/net/xgmac: Fix buffer overflow in xgmac_enet_send()

2020-07-20 Thread Peter Maydell
On Tue, 14 Jul 2020 at 10:09, Jason Wang wrote: > > > On 2020/7/10 下午7:07, Peter Maydell wrote: > > On Fri, 10 Jul 2020 at 10:20, Mauro Matteo Cascella > > wrote: > >> A buffer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It > >> occurs while sending an Ethernet frame due to missi

Re: [PATCH v3 00/18] hw/block/nvme: bump to v1.3

2020-07-20 Thread Klaus Jensen
On Jul 6 08:12, Klaus Jensen wrote: > From: Klaus Jensen > > This adds mandatory features of NVM Express v1.3 to the emulated NVMe > device. > > > v3: > * hw/block/nvme: additional tracing > - Reverse logic in nvme_cid(). (Philippe) > - Move nvme_cid() and nvme_sqid() to source file.

Re: [PATCH] hw/net/xgmac: Fix buffer overflow in xgmac_enet_send()

2020-07-20 Thread Jason Wang
On 2020/7/20 下午5:14, Peter Maydell wrote: On Tue, 14 Jul 2020 at 10:09, Jason Wang wrote: On 2020/7/10 下午7:07, Peter Maydell wrote: On Fri, 10 Jul 2020 at 10:20, Mauro Matteo Cascella wrote: A buffer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It occurs while sending an Et

Re: [PATCH for-5.2] spapr: Simplify error handling in spapr_phb_realize()

2020-07-20 Thread Markus Armbruster
Greg Kurz writes: > The spapr_phb_realize() function has a local_err variable which > is used to: > > 1) check failures of spapr_irq_findone() and spapr_irq_claim() > > 2) prepend extra information to the error message > > Recent work from Markus Armbruster highlighted we get better > code when t

Re: [PATCH] hw/i386/kvm/ioapic.c: fix typo in error message

2020-07-20 Thread Philippe Mathieu-Daudé
On 7/17/20 2:35 PM, Kenta Ishiguro wrote: > Fix a typo in an error message for KVM_SET_IRQCHIP ioctl: > "KVM_GET_IRQCHIP" should be "KVM_SET_IRQCHIP". > > Signed-off-by: Kenta Ishiguro > --- > hw/i386/kvm/ioapic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/i386/

Re: [PATCH for-5.1 0/4] Document virt and a few other Arm boards

2020-07-20 Thread Peter Maydell
On Mon, 13 Jul 2020 at 18:57, Peter Maydell wrote: > > This series adds some documentation to the system manual for > previously undocumented Arm board types. Applied to target-arm.next for 5.1 with the minor wording tweaks/additions suggested by various reviewers -- thanks! -- PMM

[PATCH 2/2] target/riscv/pmp.c: Fix the index offset on RV64

2020-07-20 Thread Zong Li
On RV64, the reg_index is 2 (pmpcfg2 CSR) after the seventh pmp entry, it is not 1 (pmpcfg1 CSR) like RV32. In the original implementation, the second parameter of pmp_write_cfg is "reg_index * sizeof(target_ulong)", and we get the the result which is started from 16 if reg_index is 2, but we expec

[PATCH 0/2] Fix some PMP implementation

2020-07-20 Thread Zong Li
This patch set contains the fixes for wrong index of pmpcfg CSR on rv64, and the pmp range in CSR function table. Zong Li (2): target/riscv: Fix the range of pmpcfg of CSR funcion table target/riscv/pmp.c: Fix the index offset on RV64 target/riscv/csr.c | 2 +- target/riscv/pmp.c | 9 +++

Replacing existing kernel with new on qemuriscv64

2020-07-20 Thread Pankaj Vinadrao Joshi
Hi , I am trying to replace my existing kernel image which is 5.5.6 to 5.5.7 on qemuriscv64 i would like to mention i have built my qemu image with openembedded-core. i have tried to build the kernel 5.5.7 natively,i was able to build the kernel successfully and in my /boot folder i am able to

[PATCH 1/2] target/riscv: Fix the range of pmpcfg of CSR funcion table

2020-07-20 Thread Zong Li
The range of Physical Memory Protection should be from CSR_PMPCFG0 to CSR_PMPCFG3, not to CSR_PMPADDR9. Signed-off-by: Zong Li --- target/riscv/csr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index ac01c835e1..6a96a01b1c 100644 --

Re: [PATCH v6 13/13] tests/acceptance: console boot tests for quanta-gsj

2020-07-20 Thread Philippe Mathieu-Daudé
On 7/20/20 10:22 AM, Joel Stanley wrote: > On Fri, 17 Jul 2020 at 12:33, Cédric Le Goater wrote: >> >> On 7/17/20 8:02 AM, Havard Skinnemoen wrote: >>> This adds two acceptance tests for the quanta-gsj machine. >>> >>> One test downloads a lightly patched openbmc flash image from github and >>> ve

Re: [PATCH 0/2] virtio: non-legacy device handling

2020-07-20 Thread Halil Pasic
On Tue, 7 Jul 2020 12:54:44 +0200 Cornelia Huck wrote: > As discussed in "virtio-fs: force virtio 1.x usage", it seems like > a good idea to make sure that any new virtio device (which does not > support legacy virtio) is indeed a non-transitional device, just to > catch accidental misconfigurat

Re: [PATCH 2/2] hw/arm: remove exit(1) in case of missing ROM

2020-07-20 Thread Peter Maydell
On Wed, 15 Jul 2020 at 11:19, Pavel Dovgalyuk wrote: > > This patch updates ARM-based machines to allow starting them without ROM. > In this case CPU starts to execute instructions from the empty memory, > but QEMU allows introspecting the machine configuration. > > Signed-off-by: Pavel Dovgalyuk

Re: [PATCH] hw/i386/kvm/ioapic.c: fix typo in error message

2020-07-20 Thread Kenta Ishiguro
No, it didn't. I just checked the usage of this API and I found this inconsistent error message. On Mon, Jul 20, 2020 at 6:31 PM Philippe Mathieu-Daudé wrote: > On 7/17/20 2:35 PM, Kenta Ishiguro wrote: > > Fix a typo in an error message for KVM_SET_IRQCHIP ioctl: > > "KVM_GET_IRQCHIP" should be

[PATCH-for-5.1] hw/misc/aspeed_sdmc: Fix incorrect memory size

2020-07-20 Thread Philippe Mathieu-Daudé
The SDRAM Memory Controller has a 32-bit address bus, thus supports up to 4 GiB of DRAM. There is a signed to unsigned conversion error with the AST2600 maximum memory size: (uint64_t)(2048 << 20) = (uint64_t)(-2147483648) = 0x4000 =

[PATCH for-5.1] block: fix bdrv_aio_cancel() for ENOMEDIUM requests

2020-07-20 Thread Stefan Hajnoczi
bdrv_aio_cancel() calls aio_poll() on the AioContext for the given I/O request until it has completed. ENOMEDIUM requests are special because there is no BlockDriverState when the drive has no medium! Define a .get_aio_context() function for BlkAioEmAIOCB requests so that bdrv_aio_cancel() can fin

Re: [RFC PATCH-for-5.1] hw/ide: Do not block for AIO while resetting a drive

2020-07-20 Thread Stefan Hajnoczi
On Fri, Jul 17, 2020 at 07:19:38PM +0200, Philippe Mathieu-Daudé wrote: > Last minute chat: > 19:01 f4bug: use bdrv_aio_cancel_async() if possible because it > won't block the current thread. > 19:02 f4bug: For example, in device emulation code where the guest > has requested to cancel an I/O r

[PATCH 2/3] module: ignore NULL type

2020-07-20 Thread Gerd Hoffmann
Just return in case module_load_qom_one(NULL) is called. vga_interface_available() can do that. Signed-off-by: Gerd Hoffmann --- util/module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/module.c b/util/module.c index 90e9bd42c6c7..0ab00851f0a4 100644 --- a/util/module.c +++ b/ut

[PATCH 1/3] qxl: fix modular builds with dtrace

2020-07-20 Thread Gerd Hoffmann
Checking the enable/disable state of tracepoints via trace_event_get_state_backends() does not work for modules. qxl checks the state for a small optimization (avoid g_strndup call in case log_buf will not be used anyway), so we can just drop that check for modular builds. Signed-off-by: Gerd Hof

[PATCH 0/3] module fixes

2020-07-20 Thread Gerd Hoffmann
Gerd Hoffmann (3): qxl: fix modular builds with dtrace module: ignore NULL type module: silence errors for module_load_qom_all(). include/qemu/module.h | 8 hw/display/qxl.c | 9 + softmmu/qtest.c | 2 +- util/module.c | 20 +--- 4 f

Re: [PATCH-for-5.1] hw/misc/aspeed_sdmc: Fix incorrect memory size

2020-07-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200720095829.22839-1-f4...@amsat.org/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #! /

Re: [PATCH for-5.1] Makefile: Remove config-devices.mak on "make clean"

2020-07-20 Thread Peter Maydell
On Fri, 17 Jul 2020 at 16:30, Philippe Mathieu-Daudé wrote: > > On 7/17/20 5:25 PM, Peter Maydell wrote: > > The config-devices.mak files are generated by "make", and so they > > should be deleted by "make clean". > > > > (This is different from config-host.mak and config-all-disas.mak, > > which

[PATCH 3/3] module: silence errors for module_load_qom_all().

2020-07-20 Thread Gerd Hoffmann
Add mayfail bool parameter to module loading functions. Set it to true for module_load_qom_all() because device modules might not load into all system emulation variants. qemu-system-s390x for example will not load qxl because it lacks vga support. Makes "make check" less chatty. Signed-off-by:

Re: [PATCH-for-5.1] hw/misc/aspeed_sdmc: Fix incorrect memory size

2020-07-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200720095829.22839-1-f4...@amsat.org/ Hi, This series seems to have some coding style problems. See output below for more information: N/A. Internal error while reading log file The full log is available at http://patchew.org/logs/20200720095829.22839

Re: [GIT PULL] I2C updates

2020-07-20 Thread Peter Maydell
On Thu, 16 Jul 2020 at 18:49, Corey Minyard wrote: > > The following changes since commit 45db94cc90c286a9965a285ba19450f448760a09: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20200707' > into staging (2020-07-10 16:43:40 +0100) > > are available in the Git repository

Re: [PATCH 0/3] hw/arm/virt: Introduce kvm-steal-time

2020-07-20 Thread Peter Maydell
On Sat, 11 Jul 2020 at 11:10, Andrew Jones wrote: > > KVM supports the ability to publish the amount of time that VCPUs > were runnable, but not running due to other host threads running > instead, to the guest. The guest scheduler may use that information > when making decisions and the guest may

[REPORT] [GSoC - TCG Continuous Benchmarking] [#5] Finding Commits Affecting QEMU Performance

2020-07-20 Thread Ahmed Karaman
Hi, The fifth report of the TCG Continuous Benchmarking project concludes a mini-series of three reports that dealt with the performance comparison and analysis of QEMU 5.0 and 5.1-pre-soft-freeze. The report presents a new Python script that utilizes "git bisect" for running a binary search with

Re: [Bug 1878255] Re: Assertion failure in bdrv_aio_cancel, through ide

2020-07-20 Thread Stefan Hajnoczi
Here is another patch that attempts to fix this: https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg05758.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1878255 Title: Assertion failure i

Re: device compatibility interface for live migration with assigned devices

2020-07-20 Thread Sean Mooney
On Mon, 2020-07-20 at 11:41 +0800, Jason Wang wrote: > On 2020/7/18 上午12:12, Alex Williamson wrote: > > On Thu, 16 Jul 2020 16:32:30 +0800 > > Yan Zhao wrote: > > > > > On Thu, Jul 16, 2020 at 12:16:26PM +0800, Jason Wang wrote: > > > > On 2020/7/14 上午7:29, Yan Zhao wrote: > > > > > hi folks, > >

Re: various iotests failures apparently due to overly optimistic timeout settings

2020-07-20 Thread Kevin Wolf
Am 19.07.2020 um 14:07 hat Peter Maydell geschrieben: > I just had a bunch of iotests fail on a freebsd VM test run. > I think the machine the VM runs on is sometimes a bit heavily > loaded for I/O, which means the VM can run slowly. This causes > various over-optimistic timeouts in the iotest test

Re: [PATCH v2 1/4] scripts/tracetool: Fix dtrace generation for macOS

2020-07-20 Thread Roman Bolshakov
On Sun, Jul 19, 2020 at 03:52:08PM +0200, Philippe Mathieu-Daudé wrote: > On 7/17/20 11:35 AM, Roman Bolshakov wrote: > > dtrace USDT is fully supported since OS X 10.6. There are a few > > peculiarities compared to other dtrace flavors. > > > > 1. It doesn't accept empty files. > > 2. It doesn't

Re: [PATCH v2 1/4] scripts/tracetool: Fix dtrace generation for macOS

2020-07-20 Thread Philippe Mathieu-Daudé
On 7/20/20 12:50 PM, Roman Bolshakov wrote: > On Sun, Jul 19, 2020 at 03:52:08PM +0200, Philippe Mathieu-Daudé wrote: >> On 7/17/20 11:35 AM, Roman Bolshakov wrote: >>> dtrace USDT is fully supported since OS X 10.6. There are a few >>> peculiarities compared to other dtrace flavors. >>> >>> 1. It

VMState in QEMU

2020-07-20 Thread Pratik Parvati
Hi team, Can someone please explain to me briefly the significance of VMState in Migration. I understand that this reduces the lot of duplication of code across all the devices in QEMU with the common put and get implementation somewhere in the code. Does this have any other significance? Is it m

Re: [PATCH v2 4/4] net/colo: Match is-enabled probe to tracepoint

2020-07-20 Thread Roman Bolshakov
On Sat, Jul 18, 2020 at 05:58:56PM +, Zhang, Chen wrote: > > -Original Message- > > From: Roman Bolshakov > > Sent: Friday, July 17, 2020 5:35 PM > > @@ -533,12 +535,12 @@ static int colo_packet_compare_udp(Packet *spkt, > > Packet *ppkt) > > ppkt->

[PATCH for-5.2 1/3] qga/qapi-schema: Document -1 for invalid PCI address fields

2020-07-20 Thread Thomas Huth
The "guest-get-fsinfo" could also be used for non-PCI devices in the future. And the code in GuestPCIAddress() in qga/commands-win32.c seems to be using "-1" for fields that it can not determine already. Thus let's properly document "-1" as value for invalid PCI address fields. Signed-off-by: Thom

[PATCH for-5.2 0/3] Allow guest-get-fsinfo also for non-PCI devices

2020-07-20 Thread Thomas Huth
The information that can be retrieved via UDEV is also usable for non-PCI devices. So let's allow build_guest_fsinfo_for_real_device() on non-PCI devices, too. This is required to fix the bug that CCW devices show up without "Target" when running libvirt's "virsh domfsinfo" command (see https://bug

[PATCH for-5.2 3/3] qga/commands-posix: Move the udev code from the pci to the generic function

2020-07-20 Thread Thomas Huth
The libudev-related code is independent from the other pci-related code and can be re-used for non-pci devices (like ccw devices on s390x). Thus move this part to the generic function. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1755075 Signed-off-by: Thomas Huth --- qga/commands-posix.

[PATCH for-5.2 2/3] qga/commands-posix: Rework build_guest_fsinfo_for_real_device() function

2020-07-20 Thread Thomas Huth
We are going to support non-PCI devices soon. For this we need to split the generic GuestDiskAddress and GuestDiskAddressList memory allocation and chaining into a separate function first. Signed-off-by: Thomas Huth --- qga/commands-posix.c | 65 1 fi

Re: [RFC PATCH-for-5.1 v2] hw/ide: Avoid #DIV/0! FPU exception by setting CD-ROM sector count

2020-07-20 Thread Darren Kenny
On Friday, 2020-07-17 at 15:38:47 +02, Philippe Mathieu-Daudé wrote: > libFuzzer found an undefined behavior (#DIV/0!) in ide_set_sector() > when using a CD-ROM (reproducer available on the BugLink): > > UndefinedBehaviorSanitizer:DEADLYSIGNAL > ==12163==ERROR: UndefinedBehaviorSanitizer: FPE o

Re: [PATCH for-5.2] spapr: Simplify error handling in spapr_phb_realize()

2020-07-20 Thread David Gibson
On Mon, Jul 20, 2020 at 11:29:06AM +0200, Markus Armbruster wrote: > Greg Kurz writes: > > > The spapr_phb_realize() function has a local_err variable which > > is used to: > > > > 1) check failures of spapr_irq_findone() and spapr_irq_claim() > > > > 2) prepend extra information to the error mes

[PATCH 01/16] hw/block/nvme: memset preallocated requests structures

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen This is preparatory to subsequent patches that change how QSGs/IOVs are handled. It is important that the qsg and iov members of the NvmeRequest are initially zeroed. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 2 +- 1 file changed, 1 inser

[PATCH 00/16] hw/block/nvme: dma handling and address mapping cleanup

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen This series consists of patches that refactors dma read/write and adds a number of address mapping helper functions. Based-on: <20200706061303.246057-1-...@irrelevant.dk> Klaus Jensen (16): hw/block/nvme: memset preallocated requests structures hw/block/nvme: add mapping

[PATCH 06/16] hw/block/nvme: pass request along for tracing

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Pass along the NvmeRequest in various functions since it is very useful for tracing. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 67 +-- hw/block/trace-events | 1 + 2 files changed, 40 inserti

[PATCH 02/16] hw/block/nvme: add mapping helpers

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and use them in nvme_map_prp. This fixes a bug where in the case of a CMB transfer, the device would map to the buffer with a wrong length. Fixes: b2b2b67a00574 ("nvme: Add support for Read Data and Write Data

[PATCH 04/16] hw/block/nvme: remove redundant has_sg member

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Remove the has_sg member from NvmeRequest since it's redundant. Also, make sure the request iov is destroyed at completion time. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 11 ++- hw/block/nvme.h | 1 - 2 files changed, 6 inserti

[PATCH 03/16] hw/block/nvme: replace dma_acct with blk_acct equivalent

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen The QSG isn't always initialized, so accounting could be wrong. Issue a call to blk_acct_start instead with the size taken from the QSG or IOV depending on the kind of I/O. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 5 - 1 file changed

[PATCH 05/16] hw/block/nvme: refactor dma read/write

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Refactor the nvme_dma_{read,write}_prp functions into a common function taking a DMADirection parameter. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 88 - 1 file changed, 43 insertions(+), 45

[PATCH 07/16] hw/block/nvme: add request mapping helper

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Introduce the nvme_map helper to remove some noise in the main nvme_rw function. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c

[PATCH 09/16] hw/block/nvme: refactor request bounds checking

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Hoist bounds checking into its own function and check for wrap-around. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme

[PATCH 08/16] hw/block/nvme: verify validity of prp lists in the cmb

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Before this patch the device already supported PRP lists in the CMB, but it did not check for the validity of it nor announced the support in the Identify Controller data structure LISTS field. If some of the PRPs in a PRP list are in the CMB, then ALL entries must be there. T

[PATCH 11/16] hw/block/nvme: be consistent about zeros vs zeroes

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen The NVM Express specification generally uses 'zeroes' and not 'zeros', so let us align with it. Cc: Fam Zheng Signed-off-by: Klaus Jensen --- block/nvme.c | 4 ++-- hw/block/nvme.c | 8 include/block/nvme.h | 4 ++-- 3 files changed, 8 insertions(+), 8

[PATCH 12/16] hw/block/nvme: refactor NvmeRequest clearing

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Move clearing of the structure from "clear before use" to "clear after use". Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index e2932239c661..431f26c2f589 100644 --

[PATCH 14/16] hw/block/nvme: consolidate qsg/iov clearing

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Always destroy the request qsg/iov at the end of request use. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 48 +--- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 54cd20

[PATCH 10/16] hw/block/nvme: add check for mdts

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Add 'mdts' device parameter to control the Maximum Data Transfer Size of the controller and check that it is respected. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 32 ++-- hw/block/nvme.h | 1 + hw/

Re: [PATCH 3/7] pc-bios: s390x: Remove unneeded dasd-ipl.c reset psw mask changes

2020-07-20 Thread Thomas Huth
On 15/07/2020 11.40, Janosch Frank wrote: > jump_to_low_kernel() and the functions that it calls will already or > 64 bit addressing into the reset psw mask when executing > jump_to_IPL_2() after the diag308 subcode 1. But there is also a check in jump_to_low_kernel that could be affected by your

[PATCH 15/16] hw/block/nvme: remove NvmeCmd parameter

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Keep a copy of the raw nvme command in the NvmeRequest and remove the now redundant NvmeCmd parameter. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 177 +--- hw/block/nvme.h | 1 + 2 files changed, 93 insertions(+), 85 delet

Re: [PATCH] net: check payload length limit for all frames

2020-07-20 Thread Li Qiang
Alexander Bulekov 于2020年7月20日周一 上午11:33写道: > > On 200720 0754, P J P wrote: > > +-- On Fri, 17 Jul 2020, Li Qiang wrote --+ > > | P J P 于2020年7月17日周五 下午5:09写道: > > | > @Alex, would it be possible to share the reproduces on the upstream bug > > | > LP#1886362? > > | > > | Maybe you mean the reprod

[PATCH 13/16] hw/block/nvme: add a namespace reference in NvmeRequest

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Instead of passing around the NvmeNamespace, add it as a member in the NvmeRequest structure. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 21 ++--- hw/block/nvme.h | 1 + 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/block/nvme.c

[PATCH 16/16] hw/block/nvme: use preallocated qsg/iov in nvme_dma_prp

2020-07-20 Thread Klaus Jensen
From: Klaus Jensen Since clean up of the request qsg/iov is now always done post-use, there is no need to use a stack-allocated qsg/iov in nvme_dma_prp. Signed-off-by: Klaus Jensen Acked-by: Keith Busch Reviewed-by: Maxim Levitsky --- hw/block/nvme.c | 18 ++ 1 file changed,

[Bug 1887854] Re: Spurious Data Abort on qemu-system-aarch64

2020-07-20 Thread K
An update for anyone interested: I didn't remember seeing the leading 0x10 because the values are correct when retrieved from memory. They get packed into a structure that gets returned in a single register, so the 0x10 second element ends up in the upper 4 bytes of x0 which is provided as the firs

What is this mean of the comment?

2020-07-20 Thread tugouxp
Hi folks: in flollowing comment of tcg.h, it says every helper max need 6 input argument and 1 output argument, but why here both multiply by 2 in here? what is the 14 mean? thank you! 520 /* While we limit helpers to 6 arguments, for 32-bit hosts, with padding, 521this imples

Re: [PATCH 4/7] pc-bios: s390x: Rework data initialization

2020-07-20 Thread Thomas Huth
On 15/07/2020 11.40, Janosch Frank wrote: > Sometimes a memset is nicer to read than multiple struct->data = 0; > > Signed-off-by: Janosch Frank > Reviewed-by: Pierre Morel > --- > pc-bios/s390-ccw/dasd-ipl.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/pc-bi

Re: VMState in QEMU

2020-07-20 Thread Philippe Mathieu-Daudé
On 7/20/20 12:58 PM, Pratik Parvati wrote: > Hi team, > > Can someone please explain to me briefly the significance of VMState in > Migration. This is documented in docs/devel/migration.rst. Which part of this document is not clear enough to you? So we could improve it.

Re: [PATCH 4/7] pc-bios: s390x: Rework data initialization

2020-07-20 Thread Janosch Frank
On 7/20/20 1:56 PM, Thomas Huth wrote: > On 15/07/2020 11.40, Janosch Frank wrote: >> Sometimes a memset is nicer to read than multiple struct->data = 0; >> >> Signed-off-by: Janosch Frank >> Reviewed-by: Pierre Morel >> --- >> pc-bios/s390-ccw/dasd-ipl.c | 7 ++- >> 1 file changed, 2 insert

Re: [PATCH 3/7] pc-bios: s390x: Remove unneeded dasd-ipl.c reset psw mask changes

2020-07-20 Thread Janosch Frank
On 7/20/20 1:45 PM, Thomas Huth wrote: > On 15/07/2020 11.40, Janosch Frank wrote: >> jump_to_low_kernel() and the functions that it calls will already or >> 64 bit addressing into the reset psw mask when executing >> jump_to_IPL_2() after the diag308 subcode 1. > > But there is also a check in ju

[PATCH] qdev: Document qdev_prop_set_drive_err() return value

2020-07-20 Thread Philippe Mathieu-Daudé
Since commit 73ac1aac39 qdev_prop_set_drive_err() returns a boolean value. Document it. Fixes: 73ac1aac39 "Make functions taking Error ** return bool, not void" Signed-off-by: Philippe Mathieu-Daudé --- include/hw/qdev-properties.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw

[PATCH] tcg: update comments for save_iotlb_data in cputlb

2020-07-20 Thread Alex Bennée
I missed Emilio's review comments: Message-ID: <20200718205107.GA994221@sff> and the patch got merged. Correcting the comments now. Reviewed-by: Emilio G. Cota Signed-off-by: Alex Bennée --- accel/tcg/cputlb.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/a

[Bug 1805256] Re: qemu-img hangs on rcu_call_ready_event logic in Aarch64 when converting images

2020-07-20 Thread Rafael David Tinoco
Thanks @dannf! I spoke to Christian and him and I agreed to confine this change into ARM builds only (as SRU for Bionic). Preparing it... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1805256 Title:

[PATCH-for-5.1] hw/nvram/fw_cfg: Let fw_cfg_add_from_generator() return boolean value

2020-07-20 Thread Philippe Mathieu-Daudé
Commits b6d7e9b66f..a43770df5d simplified the error propagation. Similarly to commit 6fd5bef10b "qom: Make functions taking Error** return bool, not void", let fw_cfg_add_from_generator() return a boolean value, not void. This allow to simplify parse_fw_cfg() and fixes the error handling issue repo

Re: [PATCH] qdev: Document qdev_prop_set_drive_err() return value

2020-07-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200720121659.31886-1-f4...@amsat.org/ Hi, This series failed build test on FreeBSD host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that ha

Re: [PATCH 0/2] Fix for write sharing on luks raw images

2020-07-20 Thread Max Reitz
On 19.07.20 14:20, Maxim Levitsky wrote: > A rebase gone wrong, and I ended up allowing a luks image > to be opened at the same time by two VMs without any warnings/overrides. > > Fix that and also add an iotest to prevent this from happening. > > Best regards, > Maxim Levisky > > Maxim Le

Re: [PATCH-for-5.1 4/4] hw/avr/boot: Fix memory leak in avr_load_firmware()

2020-07-20 Thread Philippe Mathieu-Daudé
ping? On 7/14/20 6:42 PM, Philippe Mathieu-Daudé wrote: > The value returned by qemu_find_file() must be freed. > > This fixes Coverity issue CID 1430449, which points out > that the memory returned by qemu_find_file() is leaked. > > Fixes: Coverity CID 1430449 (RESOURCE_LEAK) > Fixes: 7dd8f6fde

[PULL 04/12] util: Implement qemu_get_thread_id() for OpenBSD

2020-07-20 Thread Peter Maydell
From: David CARLIER Implement qemu_get_thread_id() for OpenBSD hosts, using getthrid(). Signed-off-by: David Carlier Reviewed-by: Brad Smith Message-id: ca+xhmqxd6gqdbaj8tx0cmej3si7qyksm8u1km47e_-u7mc3...@mail.gmail.com Reviewed-by: Peter Maydell [PMM: tidied up commit message] Signed-off-by:

[PULL 02/12] hw/arm/virt: Error for MTE enabled with KVM

2020-07-20 Thread Peter Maydell
From: Richard Henderson While we expect KVM to support MTE at some future point, it certainly won't be ready in time for qemu 5.1. Signed-off-by: Richard Henderson Message-id: 20200713213341.590275-3-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/

[PULL 01/12] hw/arm/virt: Enable MTE via a machine property

2020-07-20 Thread Peter Maydell
From: Richard Henderson Control this cpu feature via a machine property, much as we do with secure=on, since both require specialized support in the machine setup to be functional. Default MTE to off, since this feature implies extra overhead. Signed-off-by: Richard Henderson Message-id: 20200

[PULL 00/12] target-arm queue

2020-07-20 Thread Peter Maydell
in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20200720 for you to fetch changes up to 6a0b7505f1fd6769c3f1558fda76464d51e4118a: docs/system: Document the arm virt board (2020-07-20 11:3

[PULL 07/12] qdev: Document GPIO related functions

2020-07-20 Thread Peter Maydell
Add documentation comments for the various qdev functions related to creating and connecting GPIO lines. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200711142425.16283-4-peter.mayd...@linaro.org --- include/hw/qdev-core.h | 191 +

[PULL 03/12] hw/arm/virt: Disable memory hotplug when MTE is enabled

2020-07-20 Thread Peter Maydell
From: Richard Henderson When MTE is enabled, tag memory must exist for all RAM. It might be possible to simultaneously hot plug tag memory alongside the corresponding normal memory, but for now just disable hotplug. Signed-off-by: Richard Henderson Message-id: 20200713213341.590275-4-richard.h

[PULL 05/12] qdev: Move doc comments from qdev.c to qdev-core.h

2020-07-20 Thread Peter Maydell
The doc-comments which document the qdev API are split between the header file and the C source files, because as a project we haven't been consistent about where we put them. Move all the doc-comments in qdev.c to the header files, so that users of the APIs don't have to look at the implementatio

  1   2   3   >