Re: [Qemu-devel] [PATCH] iotests: fix 185

2017-08-07 Thread Kevin Wolf
Am 07.08.2017 um 16:16 hat Vladimir Sementsov-Ogievskiy geschrieben: > 185 iotest is broken. > > How to test: > > i=0; while ./check -qcow2 -nocache 185; do ((i+=1)); echo N = $i; \ > done; echo N = $i > > finished for me like this: > > 185 2s ... - output mismatch (see 185.out.bad) > --- /wor

[Qemu-devel] [PATCH for-2.11 3/4] booke206: allow to specify an mmucfg value at the init

2017-08-07 Thread KONRAD Frederic
This allows to init the MMUCFG SPR with a non NULL value. Signed-off-by: KONRAD Frederic --- target/ppc/translate_init.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 01723bd..2627cbe 100644 --- a/targ

Re: [Qemu-devel] [PATCH for-2.10] iotests: fix 185

2017-08-07 Thread Vladimir Sementsov-Ogievskiy
07.08.2017 18:46, Vladimir Sementsov-Ogievskiy wrote: 07.08.2017 17:29, Eric Blake wrote: On 08/07/2017 09:16 AM, Vladimir Sementsov-Ogievskiy wrote: 185 iotest is broken. How to test: i=0; while ./check -qcow2 -nocache 185; do ((i+=1)); echo N = $i; \ done; echo N = $i finished for me l

Re: [Qemu-devel] About virtio device hotplug in Q35! 【外域邮件.谨慎查阅】

2017-08-07 Thread Alex Williamson
On Mon, 7 Aug 2017 21:00:04 +0800 Bob Chen wrote: > Bad news... The performance had dropped dramatically when using emulated > switches. > > I was referring to the PCIe doc at > https://github.com/qemu/qemu/blob/master/docs/pcie.txt > > # qemu-system-x86_64_2.6.2 -enable-kvm -cpu host,kvm=off -

Re: [Qemu-devel] About virtio device hotplug in Q35! 【外域邮件.谨慎查阅】

2017-08-07 Thread Alex Williamson
On Mon, 7 Aug 2017 21:04:16 +0800 Bob Chen wrote: > Besides, I checked the lspci -vvv output, no capabilities of Access Control > are seen. Are these switches onboard an NVIDIA card or are they separate components? The examples I have on NVIDIA cards do include ACS: +-02.0-[42-47]00.0-[43-

Re: [Qemu-devel] [PATCH v4 2/3] pci: add QEMU-specific PCI capability structure

2017-08-07 Thread Alexander Bezzubikov
2017-08-07 18:52 GMT+03:00 Marcel Apfelbaum : > On 05/08/2017 23:29, Aleksandr Bezzubikov wrote: >> >> On PCI init PCI bridge devices may need some >> extra info about bus number to reserve, IO, memory and >> prefetchable memory limits. QEMU can provide this >> with special vendor-specific PCI capa

Re: [Qemu-devel] [Qemu-block] [PATCH 06/17] block/nbd-client: fix nbd_read_reply_entry

2017-08-07 Thread Vladimir Sementsov-Ogievskiy
07.08.2017 18:33, Eric Blake wrote: On 08/07/2017 10:13 AM, Eric Blake wrote: On 08/07/2017 07:56 AM, Vladimir Sementsov-Ogievskiy wrote: 07.08.2017 14:52, Eric Blake wrote: On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote: Set reply.handle to 0 on error path to prevent normal path

Re: [Qemu-devel] [PATCH] tests/pxe: Check virtio-net-ccw on s390x

2017-08-07 Thread Cornelia Huck
On Thu, 3 Aug 2017 15:30:19 +0200 Thomas Huth wrote: > Now that we've got a firmware that can do TFTP booting on s390x (i.e. > the pc-bios/s390-netboot.img), we can enable the PXE tester for this > architecture, too. I'll take this through the s390x tree, unless someone objects. > > Signed-of

Re: [Qemu-devel] [PATCH 0/3] respect bdrv_getlength() error code

2017-08-07 Thread Kevin Wolf
Am 04.08.2017 um 17:10 hat Denis V. Lunev geschrieben: > These cases were reported by Markus Armbruster > Patches add error checking of the bdrv_getlength() call or remove > the call of that function. Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [RFC PATCH 14/56] migration: Fix migrate-set-cache-size error reporting

2017-08-07 Thread Juan Quintela
Markus Armbruster wrote: > qmp_migrate_set_cache_size() calls xbzrle_cache_resize() to do the > actual work, which in turn calls cache_init() to resize the cache. If > cache_init() fails, xbzrle_cache_resize() reports that error with > error_report() and fails. qmp_migrate_set_cache_size() detec

[Qemu-devel] [PATCH for-2.10] throttle: Make LeakyBucket.avg and LeakyBucket.max integer types

2017-08-07 Thread Alberto Garcia
Both the throttling limits set with the throttling.iops-* and throttling.bps-* options and their QMP equivalents defined in the BlockIOThrottle struct are integer values. Those limits are also reported in the BlockDeviceInfo struct and they are integers there as well. Therefore there's no reason

Re: [Qemu-devel] [RFC PATCH 15/56] migration: Make XBZRLE cache size unsigned in QAPI/QMP

2017-08-07 Thread Juan Quintela
Markus Armbruster wrote: > Sizes should use QAPI type 'size' (uint64_t). migrate-set-cache-size > parameter @value is 'int' (int64_t). qmp_migrate_set_cache_size() > ensures it fits into size_t. page_cache.c implicitly converts the > signed size to unsigned types (it can't quite decide whether

Re: [Qemu-devel] [Qemu-block] [PATCH 06/17] block/nbd-client: fix nbd_read_reply_entry

2017-08-07 Thread Eric Blake
On 08/07/2017 11:09 AM, Vladimir Sementsov-Ogievskiy wrote: > On 08/04/2017 10:14 AM, Vladimir Sementsov-Ogievskiy wrote: >> Set reply.handle to 0 on error path to prevent normal path of >> nbd_co_receive_reply. >> >> The client still tried to send a flush request to the server, when

Re: [Qemu-devel] [PATCH for-2.10] iotests: fix 185

2017-08-07 Thread Vladimir Sementsov-Ogievskiy
07.08.2017 18:57, Vladimir Sementsov-Ogievskiy wrote: 07.08.2017 18:46, Vladimir Sementsov-Ogievskiy wrote: 07.08.2017 17:29, Eric Blake wrote: On 08/07/2017 09:16 AM, Vladimir Sementsov-Ogievskiy wrote: 185 iotest is broken. How to test: i=0; while ./check -qcow2 -nocache 185; do ((i+=1));

Re: [Qemu-devel] [PATCH v4 3/3] pci: enable RedHat PCI bridges to reserve additional buses on PCI init

2017-08-07 Thread Marcel Apfelbaum
On 05/08/2017 23:29, Aleksandr Bezzubikov wrote: In case of Red Hat Generic PCIE Root Port reserve additional buses, which number is provided in a vendor-specific capability. Hi Aleksandr, It seems the subject/commit description does not cover all that the patch does, not it also deals with o

Re: [Qemu-devel] [PATCH v4 2/3] pci: add QEMU-specific PCI capability structure

2017-08-07 Thread Marcel Apfelbaum
On 07/08/2017 19:02, Alexander Bezzubikov wrote: 2017-08-07 18:52 GMT+03:00 Marcel Apfelbaum : On 05/08/2017 23:29, Aleksandr Bezzubikov wrote: On PCI init PCI bridge devices may need some extra info about bus number to reserve, IO, memory and prefetchable memory limits. QEMU can provide this

[Qemu-devel] (no subject)

2017-08-07 Thread Eduardo Otubo
zhangchen.f...@cn.fujitsu.com, wang.guan...@zte.com.cn, wang.yong...@zte.com.cn Bcc: Subject: colo-compare: segfault and assert on colo_compare_finalize Reply-To: Hi all, I have found a problem on colo-compare that leads to segmentation fault when calling qemu like this: $ qemu-system-x86_64

Re: [Qemu-devel] [PATCH v4 2/5] hw/pci: introduce pcie-pci-bridge device

2017-08-07 Thread Marcel Apfelbaum
On 05/08/2017 23:27, Aleksandr Bezzubikov wrote: Introduce a new PCIExpress-to-PCI Bridge device, which is a hot-pluggable PCI Express device and supports devices hot-plug with SHPC. Hi Aleksandr, This device is intended to replace the DMI-to-PCI Bridge in an overwhelming majority of use-ca

[Qemu-devel] [Bug 1708551] Re: macOS Guest Reading USB 3.0 Bus as USB 2.0

2017-08-07 Thread Thomas Huth
Ok, could you maybe try something like this instead: qemu-system-x86_64 ... -usb \ -device qemu-xhci,id=xhci \ -device usb-tablet,bus=usb-bus.0 \ -device usb-kbd,bus=usb-bus.0 \ -device usb-host,bus=xhci.0,vendorid=0x05ac,productid=0x12a8 i.e. use "bus=xhci.0" for the usb-host de

Re: [Qemu-devel] [PATCH v4 2/5] hw/pci: introduce pcie-pci-bridge device

2017-08-07 Thread Alexander Bezzubikov
2017-08-07 19:39 GMT+03:00 Marcel Apfelbaum : > On 05/08/2017 23:27, Aleksandr Bezzubikov wrote: >> >> Introduce a new PCIExpress-to-PCI Bridge device, >> which is a hot-pluggable PCI Express device and >> supports devices hot-plug with SHPC. >> > > > Hi Aleksandr, > >> This device is intended to r

Re: [Qemu-devel] [PATCH v4 3/5] hw/pci: introduce bridge-only vendor-specific capability to provide some hints to firmware

2017-08-07 Thread Marcel Apfelbaum
On 05/08/2017 23:27, Aleksandr Bezzubikov wrote: On PCI init PCI bridges may need some extra info about bus number, IO, memory and prefetchable memory to reserve. QEMU can provide this with a special vendor-specific PCI capability. Hi Aleksandr, Signed-off-by: Aleksandr Bezzubikov --- hw/

Re: [Qemu-devel] [RFC PATCH 16/56] migration: Make XBZRLE transferred size unsigned in QAPI/QMP

2017-08-07 Thread Juan Quintela
Markus Armbruster wrote: > Sizes should use QAPI type 'size' (uint64_t). XBZRLECacheStats member > @bytes is 'int' (int64_t). save_xbzrle_page() computes the byte count > increment in size_t, implicitly converts it to int, then adds that to > @bytes. > > Change the XBZRLECacheStats member to 'si

Re: [Qemu-devel] [PATCH v4 4/5] hw/pci: add QEMU-specific PCI capability to the Generic PCI Express Root Port

2017-08-07 Thread Marcel Apfelbaum
On 05/08/2017 23:27, Aleksandr Bezzubikov wrote: To enable hotplugging of a newly created pcie-pci-bridge, we need to tell firmware (SeaBIOS in this case) to reserve additional buses or IO/MEM/PREF space for pcie-root-port. Additional bus reservation allows us to hotplug pcie-pci-bridge into this

[Qemu-devel] colo-compare: segfault and assert on colo_compare_finalize

2017-08-07 Thread Eduardo Otubo
(please ignore my last email, looks like mutt wants play games lately) Hi all, I have found a problem on colo-compare that leads to segmentation fault when calling qemu like this: $ qemu-system-x86_64 -S -machine pc -object colo-compare,id=test-object First I got an assert failed: (qemu-sys

Re: [Qemu-devel] [RFC PATCH 18/56] migration: Make parameter max-bandwidth unsigned in QAPI/QMP

2017-08-07 Thread Juan Quintela
Markus Armbruster wrote: > Byte rates should use QAPI type 'size' (uint64_t). > migrate_set_speed's parameter @value and member @max-bandwidth of > MigrationParameters and MigrateSetParameters are 'int' (int64_t). > > Change them all to 'size'. > > migrate_set_speed and migrate-set-parameters now

Re: [Qemu-devel] [RFC PATCH 17/56] migration: Make MigrationStats sizes unsigned in QAPI/QMP

2017-08-07 Thread Juan Quintela
Markus Armbruster wrote: > Sizes should use QAPI type 'size' (uint64_t). MigrationStats members > @transferred, @remaining, @total, @normal-bytes, @page-size are 'int' > (int64_t). populate_ram_info(), populate_disk_info() and and many > places that update them in global variable @ram_counters i

Re: [Qemu-devel] AVMF & OVMF blobs in QEMU tree???

2017-08-07 Thread Laszlo Ersek
On 08/07/17 16:40, Peter Maydell wrote: > On 7 August 2017 at 15:31, Igor Mammedov wrote: >> As I recall there were issues with FAT driver licensing in edk2, >> but I've heard there were some changes in that regard. >> >> Is there any other reasons why we are not putting subj. >> in QEMU tree like

[Qemu-devel] [PATCH v5] vmgenid: replace x-write-pointer-available hack

2017-08-07 Thread Marc-André Lureau
This compat property sole function is to prevent the device from being instantiated. Instead of requiring an extra compat property, check if fw_cfg has DMA enabled. fw_cfg is a built-in device that is initialized very early by the machine init code. We have at least one other device that also ass

Re: [Qemu-devel] [PATCH v4 2/5] hw/pci: introduce pcie-pci-bridge device

2017-08-07 Thread Marcel Apfelbaum
On 07/08/2017 19:42, Alexander Bezzubikov wrote: 2017-08-07 19:39 GMT+03:00 Marcel Apfelbaum : On 05/08/2017 23:27, Aleksandr Bezzubikov wrote: Introduce a new PCIExpress-to-PCI Bridge device, which is a hot-pluggable PCI Express device and supports devices hot-plug with SHPC. Hi Aleksandr

[Qemu-devel] [PATCH v3 0/3] Vmstate-static-checker.py fix upstream

2017-08-07 Thread dverma
This is an update to the script vmstate-static-checker.py. The whitelist has been updated and newer functions have been added to reduce the false positives generated by the script while testing migration. The code has been cleaned and updated to follow PEP8 guidelines. dverma (3): Fix format an

[Qemu-devel] [PATCH v3 2/3] Update the existing whitelist

2017-08-07 Thread dverma
Appended newer fields and introduced new names in the whitelist --- scripts/vmstate-static-checker.py | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py index b416b66..ae41e44 100755 ---

[Qemu-devel] [PATCH v3 1/3] Fix format and styles; make code more pythonic

2017-08-07 Thread dverma
- Format fixes, cleaned up the print statement - Style fixes, e.g. changed "if not x in y" to "if x not in y" - Improved variable names --- scripts/vmstate-static-checker.py | 111 +- 1 file changed, 62 insertions(+), 49 deletions(-) diff --git a/scripts/vmstat

[Qemu-devel] [PATCH v3 3/3] Add new functions for whitelisting and their calls

2017-08-07 Thread dverma
The 'check_updated_properties' function keeps track of properties that were added/removed from fields across qemu versions. The 'check_updated_sizes' function reduces false positives generated especially while testing backward migration by keeping a list of common size/version changes. The 'check_n

[Qemu-devel] [for-2.10 PATCH 1/3] spapr_drc: abort if object_property_add_child() fails

2017-08-07 Thread Greg Kurz
object_property_add_child() can only fail in two cases: - the child already has a parent, which shouldn't happen since the DRC was allocated a few lines above - the parent already has a child with the same name, which would mean the caller tries to create a DRC that already exists In both case

[Qemu-devel] [for-2.10 PATCH 0/3] spapr: fix PCI hotplug issue when PHBs don't have index

2017-08-07 Thread Greg Kurz
While working on PHB hotplug for 2.11, a bug was discovered in the PCI DR logic in the PHB code: it relies on the PHB index property to be set but it doesn't enforce it. It is hence possible to create two PHBs with the same index (ie, the default value -1), even though this isn't expected by the re

[Qemu-devel] [for-2.10 PATCH 2/3] spapr_drc: add Error ** argument to spapr_dr_connector_new()

2017-08-07 Thread Greg Kurz
This just allow spapr_dr_connector_new() to propagate errors to its callers. It doesn't change any functionality. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |4 ++-- hw/ppc/spapr_drc.c |4 ++-- hw/ppc/spapr_pci.c |2 +- include/hw/ppc/spapr_drc.h |2 +

[Qemu-devel] [Bug 1050694] Re: Interrupt 0xffffffff when debug is turned on

2017-08-07 Thread Thomas Huth
Triaging old bug tickets ... is there still something left to do here, or could we close this ticket nowadays? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpa

[Qemu-devel] [Bug 1088617] Re: qemu-system-mipsel save/restore broken

2017-08-07 Thread Thomas Huth
Triaging old bug tickets ... can you still reproduce this issue with the latest version of QEMU? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/108

[Qemu-devel] [for-2.10 PATCH 3/3] spapr: error out if PHB fails to setup PCI DRCs

2017-08-07 Thread Greg Kurz
It is currently possible to start QEMU with two PHBs without using the index property: -device spapr-pci-host-bridge,id=pci1,\ buid=0x8002001,\ liobn=0x8100,\ liobn64=0x8101,\

Re: [Qemu-devel] [PATCH v3 1/3] Fix format and styles; make code more pythonic

2017-08-07 Thread Eric Blake
On 08/07/2017 11:53 AM, dverma wrote: > - Format fixes, cleaned up the print statement > - Style fixes, e.g. changed "if not x in y" to "if x not in y" > - Improved variable names > --- Missing a Signed-off-by: tag; without that, we can't accept the patch. Can you please resubmit with that fixed?

[Qemu-devel] [PATCH v5 1/8] fw_cfg: rename read callback

2017-08-07 Thread Marc-André Lureau
The callback is called on select. Furthermore, the next patch introduced a new callback, so rename the function type with a generic name. Signed-off-by: Marc-André Lureau --- include/hw/loader.h | 2 +- include/hw/nvram/fw_cfg.h | 7 --- hw/core/loader.c | 2 +- hw/nvram/f

[Qemu-devel] [PATCH v5 0/8] KASLR kernel dump support

2017-08-07 Thread Marc-André Lureau
Recent linux kernels enable KASLR to randomize phys/virt memory addresses. This series aims to provide enough information in qemu dumps so that crash utility can work with randomized kernel too (it hasn't been tested on other archs than x86 though, help welcome). The previous design to provide qem

[Qemu-devel] [PATCH v5 5/8] dump: update phys_base header field based on VMCOREINFO content

2017-08-07 Thread Marc-André Lureau
If the guest note is VMCOREINFO, try to get phys_base from it. Signed-off-by: Marc-André Lureau --- dump.c| 56 +-- docs/specs/fw_cfg.txt | 8 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/dump.c b/dump.c

[Qemu-devel] [PATCH v5 7/8] scripts/dump-guest-memory.py: add vmcoreinfo

2017-08-07 Thread Marc-André Lureau
Add vmcoreinfo ELF note if fw-cfg has the memory location details. Signed-off-by: Marc-André Lureau --- scripts/dump-guest-memory.py | 51 1 file changed, 51 insertions(+) diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py index

[Qemu-devel] [PATCH v5 3/8] fw_cfg: add vmcoreinfo file

2017-08-07 Thread Marc-André Lureau
See docs/specs/fw_cfg.txt for details. The "etc/vmcoreinfo" is added when using "-global fw_cfg.vmcoreinfo=on" qemu option. Disabled by default for machine types v2.9 and older. Signed-off-by: Marc-André Lureau --- include/hw/compat.h | 8 include/hw/nvram/fw_cfg.h | 9 +++

[Qemu-devel] [PATCH v5 2/8] fw_cfg: add write callback

2017-08-07 Thread Marc-André Lureau
Reintroduce the write callback that was removed when write support was removed in commit 023e3148567ac898c7258138f8e86c3c2bb40d07. The write_cb callback is called when a write reaches the end of file, that is when the write pointer/offset reaches the size of the file. Signed-off-by: Marc-André Lu

[Qemu-devel] [PATCH v5 6/8] kdump: set vmcoreinfo location

2017-08-07 Thread Marc-André Lureau
kdump header provides offset and size of the vmcoreinfo content, append it if available (skip the ELF note header). crash-7.1.9 was the first version that started looking in the vmcoreinfo data for phys_base instead of in the kdump_sub_header. Signed-off-by: Marc-André Lureau --- dump.c | 24 ++

[Qemu-devel] [PATCH v5 4/8] dump: add guest ELF note

2017-08-07 Thread Marc-André Lureau
Read the guest ELF PT_NOTE from guest memory when fw_cfg etc/vmcoreinfo entry provides the location, and write it as an additional note in the dump. Signed-off-by: Marc-André Lureau --- include/sysemu/dump.h | 2 + dump.c| 103 ++

[Qemu-devel] [PATCH v5 8/8] MAINTAINERS: add Dump maintainers

2017-08-07 Thread Marc-André Lureau
Proposing myself, since I have some familiarity with the code now. Signed-off-by: Marc-André Lureau Acked-by: Laszlo Ersek --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ccee28b12d..ed07334ffb 100644 --- a/MAINTAINERS +++ b/MAINTAINE

Re: [Qemu-devel] >256 Virtio-net-pci hotplug Devices

2017-08-07 Thread Kinsella, Ray
Hi Marcel, Yup - I am using Seabios by default. I took all the measures from the Kernel time reported in syslog. As Seabios wasn't exhibiting any obvious scaling problem. Ray K -Original Message- From: Marcel Apfelbaum [mailto:mar...@redhat.com] Sent: Wednesday, August 2, 2017 5:43 AM

[Qemu-devel] [PATCH 2/3] Update the existing whitelist

2017-08-07 Thread dverma
Appended newer fields and introduced new names in the whitelist Signed-off-by: Deepak Verma --- scripts/vmstate-static-checker.py | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py ind

[Qemu-devel] [PATCH 0/3] Vmstate-static-checker.py fix upstream

2017-08-07 Thread dverma
From: Deepak Verma This is an update to the script vmstate-static-checker.py. The whitelist has been updated and newer functions have been added to reduce the false positives generated by the script while testing migration. The code has been cleaned and updated to follow PEP8 guidelines. dverma

[Qemu-devel] [PATCH 1/3] Fix format and styles; make code more pythonic

2017-08-07 Thread dverma
- Format fixes, cleaned up the print statement - Style fixes, e.g. changed "if not x in y" to "if x not in y" - Improved variable names Signed-off-by: Deepak Verma --- scripts/vmstate-static-checker.py | 111 +- 1 file changed, 62 insertions(+), 49 deletions(-

[Qemu-devel] [PATCH 3/3] Add new functions for whitelisting and their calls

2017-08-07 Thread dverma
The 'check_updated_properties' function keeps track of properties that were added/removed from fields across qemu versions. The 'check_updated_sizes' function reduces false positives generated especially while testing backward migration by keeping a list of common size/version changes. The 'check_n

Re: [Qemu-devel] Virtual RDMA device

2017-08-07 Thread Marcel Apfelbaum
On 01/08/2017 0:52, Michael S. Tsirkin wrote: On Mon, Jul 31, 2017 at 10:10:15PM +0300, Marcel Apfelbaum wrote: [...] This seems to be the mail thread with most CCs. Hi Michael, Please copy the upstream lists. virtio-dev, virtualization and qemu-devel for starters. I'd say linux-rdma as

[Qemu-devel] [PATCH for-2.10 0/4] More blk_getlength() fixes

2017-08-07 Thread Eric Blake
Thanks again to Markus for catching these spots. Eric Blake (4): vpc: Check failure of bdrv_getlength() qcow: Check failure of bdrv_getlength() and bdrv_truncate() qcow2: Drop debugging dump_refcounts() qcow2: Check failure of bdrv_getlength() block/qcow.c | 64 +

[Qemu-devel] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Eric Blake
This also requires changing the return type of get_cluster_offset() and adjusting all callers. Use osdep.h macros instead of open-coded rounding while in the area. Reported-by: Markus Armbruster Signed-off-by: Eric Blake --- block/qcow.c | 64 ++-

[Qemu-devel] [PATCH 3/4] qcow2: Drop debugging dump_refcounts()

2017-08-07 Thread Eric Blake
It's been #if 0'd since its introduction in 2006, commit 585f8587. We can revive dead code if we need it, but in the meantime, it has bit-rotted (for example, not checking for failure in bdrv_getlength()). Signed-off-by: Eric Blake --- block/qcow2.c | 21 - 1 file changed, 21

[Qemu-devel] [PATCH 1/4] vpc: Check failure of bdrv_getlength()

2017-08-07 Thread Eric Blake
vpc_open() was checking for bdrv_getlength() failure in one, but not the other, location. Reported-by: Markus Armbruster Signed-off-by: Eric Blake --- block/vpc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/block/vpc.c b/block/vpc.c index 574879ba7c..468d10ec1c 1

[Qemu-devel] [PATCH 4/4] qcow2: Check failure of bdrv_getlength()

2017-08-07 Thread Eric Blake
qcow2_co_pwritev_compressed() should not call bdrv_truncate() if determining the size failed. Reported-by: Markus Armbruster Signed-off-by: Eric Blake --- block/qcow2.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index 99407403ea..40ba26

Re: [Qemu-devel] [PATCH 1/4] vpc: Check failure of bdrv_getlength()

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 05:30 PM, Eric Blake wrote: vpc_open() was checking for bdrv_getlength() failure in one, but not the other, location. Reported-by: Markus Armbruster Signed-off-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- block/vpc.c | 9 - 1 file changed, 8 insertions(+

Re: [Qemu-devel] [PATCH] tests/pxe: Check virtio-net-ccw on s390x

2017-08-07 Thread Michael S. Tsirkin
On Thu, Aug 03, 2017 at 03:30:19PM +0200, Thomas Huth wrote: > Now that we've got a firmware that can do TFTP booting on s390x (i.e. > the pc-bios/s390-netboot.img), we can enable the PXE tester for this > architecture, too. > > Signed-off-by: Thomas Huth > --- > Since this only adds a test, I g

Re: [Qemu-devel] [PATCH 3/4] qcow2: Drop debugging dump_refcounts()

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 05:30 PM, Eric Blake wrote: It's been #if 0'd since its introduction in 2006, commit 585f8587. We can revive dead code if we need it, but in the meantime, it has bit-rotted (for example, not checking for failure in bdrv_getlength()). Signed-off-by: Eric Blake Reviewed-by: Philip

[Qemu-devel] [Bug 1709170] [NEW] QEMU fails to honor O_TMPFILE

2017-08-07 Thread Thiago Macieira
Public bug reported: When making a call like open("/tmp", O_TMPFILE | O_RDWR); under QEMU, we ged -EISDIR. Under any kernel 3.11 or later, we are supposed to get an unnamed file in /tmp. In case the filesystem for /tmp does not support unnamed files, we are supposed to get EOPNOTSUPP. [I don

Re: [Qemu-devel] [PATCH 4/4] qcow2: Check failure of bdrv_getlength()

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 05:30 PM, Eric Blake wrote: qcow2_co_pwritev_compressed() should not call bdrv_truncate() if determining the size failed. Reported-by: Markus Armbruster Signed-off-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- block/qcow2.c | 5 - 1 file changed, 4 insertions

Re: [Qemu-devel] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 05:30 PM, Eric Blake wrote: This also requires changing the return type of get_cluster_offset() and adjusting all callers. Use osdep.h macros instead of open-coded rounding while in the area. Reported-by: Markus Armbruster Signed-off-by: Eric Blake Reviewed-by: Philippe Mathie

Re: [Qemu-devel] [Qemu-arm] [PATCH 2/2] loader: Ignore zero-sized ELF segments

2017-08-07 Thread Philippe Mathieu-Daudé
On 08/07/2017 11:39 AM, Peter Maydell wrote: Some ELF files have program headers that specify segments that are of zero size. Ignore them, rather than trying to create zero-length ROM blobs for them, because the zero-length blob can falsely trigger the overlapping-ROM-blobs check. Signed-off-by:

Re: [Qemu-devel] [PATCH for-2.10] throttle: Make LeakyBucket.avg and LeakyBucket.max integer types

2017-08-07 Thread Eric Blake
On 08/07/2017 11:15 AM, Alberto Garcia wrote: > Both the throttling limits set with the throttling.iops-* and > throttling.bps-* options and their QMP equivalents defined in the > BlockIOThrottle struct are integer values. > > Those limits are also reported in the BlockDeviceInfo struct and they >

[Qemu-devel] [PULL 0/2] virtio: fix for rc2

2017-08-07 Thread Michael S. Tsirkin
The following changes since commit e6a74868d92f858ac33915b6772999d7de2fd288: build-sys: add --disable-vhost-user (2017-08-03 15:55:41 +0300) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to e2a7f28693

[Qemu-devel] [PULL 1/2] hw/i386: allow SHPC for Q35 machine

2017-08-07 Thread Michael S. Tsirkin
From: Aleksandr Bezzubikov Unmask previously masked SHPC feature in _OSC method. Signed-off-by: Aleksandr Bezzubikov Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[Qemu-devel] [PULL 2/2] cpu: add APIs to allocate/free CPU environment

2017-08-07 Thread Michael S. Tsirkin
These will be implemented and then used by follow-up patches. Signed-off-by: Michael S. Tsirkin --- include/qom/cpu.h | 31 +++ qom/cpu.c | 34 ++ 2 files changed, 65 insertions(+) diff --git a/include/qom/cpu.h b/include/qom/c

Re: [Qemu-devel] [PULL 1/2] hw/i386: allow SHPC for Q35 machine

2017-08-07 Thread Michael S. Tsirkin
On Tue, Aug 08, 2017 at 12:40:08AM +0300, Michael S. Tsirkin wrote: > From: Aleksandr Bezzubikov > > Unmask previously masked SHPC feature in _OSC method. > > Signed-off-by: Aleksandr Bezzubikov > Reviewed-by: Marcel Apfelbaum > Reviewed-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsir

Re: [Qemu-devel] [PATCH for-2.11 0/5] qmp-shell non-interactive mode, delete scripts/qmp/qmp

2017-08-07 Thread John Snow
On 08/04/2017 05:36 PM, Eduardo Habkost wrote: > This series adds the ability to run QMP commands > non-interactively to qmp-shell, and deletes scripts/qmp/qmp. > > Eduardo Habkost (5): > qmp-shell: Use argparse module > qmp-shell: Pass split cmdargs to __build_cmd() > qmp-shell: execute_c

[Qemu-devel] [PATCH for-2.10] block/nfs: fix mutex assertion in nfs_file_close()

2017-08-07 Thread Jeff Cody
Commit c096358e747e88fc7364e40e3c354ee0bb683960 introduced assertion checks for when qemu_mutex() functions are called without the corresponding qemu_mutex_init() having initialized the mutex. This uncovered a latent bug in qemu's nfs driver - in nfs_client_close(), the NFSClient structure is over

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/4] More blk_getlength() fixes

2017-08-07 Thread John Snow
On 08/07/2017 04:30 PM, Eric Blake wrote: > Thanks again to Markus for catching these spots. > > Eric Blake (4): > vpc: Check failure of bdrv_getlength() > qcow: Check failure of bdrv_getlength() and bdrv_truncate() > qcow2: Drop debugging dump_refcounts() > qcow2: Check failure of bdrv_

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/8] memory.h: Move MemTxResult type to memattrs.h

2017-08-07 Thread Alistair Francis
On Fri, Aug 4, 2017 at 5:59 PM, Edgar E. Iglesias wrote: > On Fri, Aug 04, 2017 at 06:20:42PM +0100, Peter Maydell wrote: >> Move the MemTxResult type to memattrs.h. We're going to want to >> use it in cpu/qom.h, which doesn't want to include all of >> memory.h. In practice MemTxResult and MemTxAt

Re: [Qemu-devel] [Qemu-block] [PATCH 1/4] vpc: Check failure of bdrv_getlength()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:04PM -0500, Eric Blake wrote: > vpc_open() was checking for bdrv_getlength() failure in one, but > not the other, location. > > Reported-by: Markus Armbruster > Signed-off-by: Eric Blake > --- > block/vpc.c | 9 - > 1 file changed, 8 insertions(+), 1 deleti

Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:05PM -0500, Eric Blake wrote: > This also requires changing the return type of get_cluster_offset() > and adjusting all callers. > > Use osdep.h macros instead of open-coded rounding while in the > area. > > Reported-by: Markus Armbruster > Signed-off-by: Eric Blake

Re: [Qemu-devel] [Qemu-block] [PATCH 4/4] qcow2: Check failure of bdrv_getlength()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:07PM -0500, Eric Blake wrote: > qcow2_co_pwritev_compressed() should not call bdrv_truncate() > if determining the size failed. > > Reported-by: Markus Armbruster > Signed-off-by: Eric Blake Reviewed-by: Jeff Cody > --- > block/qcow2.c | 5 - > 1 file cha

Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] qcow: Check failure of bdrv_getlength() and bdrv_truncate()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:05PM -0500, Eric Blake wrote: > This also requires changing the return type of get_cluster_offset() > and adjusting all callers. > > Use osdep.h macros instead of open-coded rounding while in the > area. > > Reported-by: Markus Armbruster > Signed-off-by: Eric Blake

Re: [Qemu-devel] [Qemu-block] [PATCH 3/4] qcow2: Drop debugging dump_refcounts()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 03:30:06PM -0500, Eric Blake wrote: > It's been #if 0'd since its introduction in 2006, commit 585f8587. > We can revive dead code if we need it, but in the meantime, it has > bit-rotted (for example, not checking for failure in bdrv_getlength()). > > Signed-off-by: Eric Bl

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.10 0/5] block: bdrv_reopen() fixes

2017-08-07 Thread John Snow
On 08/03/2017 11:02 AM, Kevin Wolf wrote: > This is the first part of some fixes to bdrv_reopen(), which seems > reasonable enough to merge for 2.10. > > There is much more wrong with bdrv_reopen() currently, especially with > respect to op blocker permissions (basically the required permissions

[Qemu-devel] [PATCH 09/22] translate-all: introduce iterator macros for tagged TB lists

2017-08-07 Thread Emilio G. Cota
These will soon gain a couple of users. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 8f6f8f1..396c10c 100644 --- a/accel/tcg/translate-all.c +++ b/a

[Qemu-devel] [PATCH 04/22] qht: fix kernel-doc markup in qht.h

2017-08-07 Thread Emilio G. Cota
While at it, s/stuct/struct/. Signed-off-by: Emilio G. Cota --- include/qemu/qht.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/qht.h b/include/qemu/qht.h index 56c2c77..531aa95 100644 --- a/include/qemu/qht.h +++ b/include/qemu/qht.h @@ -166,7 +166,7 @@

[Qemu-devel] [PATCH 00/22] tcg: tb_lock removal

2017-08-07 Thread Emilio G. Cota
This series applies on top of the "multiple TCG contexts" series, v4: https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg06769.html Highlights: - First, fix a few typos I encountered while working on this (patches 1-3). I could send them separately to qemu-trivial if you prefer. - QHT:

[Qemu-devel] [PATCH 02/22] linux-user: fix 'finshed' typo in comment

2017-08-07 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bbf7913..b1e993f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6231,7 +6231,7 @@ static void *clone_func(

[Qemu-devel] [PATCH 03/22] translate-all: fix 'consisits' typo in comment

2017-08-07 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index db3d42c..fe3388a 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -257,7 +257,7 @@ s

[Qemu-devel] [PATCH 10/22] translate-all: iterate over TBs in a page with page_for_each_tb

2017-08-07 Thread Emilio G. Cota
This commit does several things, but to avoid churn I merged them all into the same commit. To wit: - Use uintptr_t instead of TranslationBlock * for the list of TBs in a page. Just like we did in (c37e6d7e "tcg: Use uintptr_t type for jmp_list_{next|first} fields of TB"), the rationale is the

[Qemu-devel] [PATCH 11/22] translate-all: exit from tb_phys_invalidate if qht_remove fails

2017-08-07 Thread Emilio G. Cota
Groundwork for supporting parallel TCG generation. Once tb_lock goes away, it is conceivable that two (or more) threads might race while invalidating the same TB. We currently do not check for this, which means we would wrongly invalidate the same TB more than once. Fix this by using qht_remove a

[Qemu-devel] [PATCH 01/22] disas/arm: fix 'instuction' typo in comment

2017-08-07 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- disas/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/arm.c b/disas/arm.c index 27396dd..a08bbbe 100644 --- a/disas/arm.c +++ b/disas/arm.c @@ -1651,7 +1651,7 @@ print_insn_coprocessor (bfd_vma pc, struct disassemble_info *info, l

[Qemu-devel] [PATCH 08/22] tcg: move tb_ctx.tb_phys_invalidate_count to tcg_ctx

2017-08-07 Thread Emilio G. Cota
Thereby making it per-TCGContext. Once we remove tb_lock, this will avoid an atomic increment every time a TB is invalidated. Signed-off-by: Emilio G. Cota --- include/exec/tb-context.h | 1 - tcg/tcg.h | 3 +++ accel/tcg/translate-all.c | 5 +++-- tcg/tcg.c |

[Qemu-devel] [PATCH 06/22] qht: return existing entry when qht_insert fails

2017-08-07 Thread Emilio G. Cota
The meaning of "existing" is now changed to "matches in hash and ht->cmp result". This is saner than just checking the pointer value. Note that we now return NULL on insertion success, or the existing pointer on failure. We can do this because NULL pointers are not allowed to be inserted in QHT.

[Qemu-devel] [PATCH 13/22] translate-all: remove hole in PageDesc

2017-08-07 Thread Emilio G. Cota
Groundwork for supporting parallel TCG generation. Move the hole to the end of the struct, so that a u32 field can be added there without bloating the struct. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tc

[Qemu-devel] [PATCH 20/22] exec: remove tb_lock from notdirty_mem_write

2017-08-07 Thread Emilio G. Cota
By passing a locked page_collection to tb_invalidate_phys_page_fast. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.h | 3 ++- accel/tcg/translate-all.c | 8 exec.c| 11 +-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/accel/t

[Qemu-devel] [PATCH 12/22] translate-all: make l1_map lockless

2017-08-07 Thread Emilio G. Cota
Groundwork for supporting parallel TCG generation. We never remove entries from the radix tree, so we can use cmpxchg to implement lockless insertions. Signed-off-by: Emilio G. Cota --- docs/devel/multi-thread-tcg.txt | 4 ++-- accel/tcg/translate-all.c | 24 ++-- 2 f

[Qemu-devel] [PATCH 05/22] qht: require a default comparison function

2017-08-07 Thread Emilio G. Cota
qht_lookup now uses the default cmp function. qht_lookup_custom is defined to retain the old behaviour, that is a cmp function is explicitly provided. qht_insert will gain use of the default cmp in the next patch. Signed-off-by: Emilio G. Cota --- include/qemu/qht.h| 23

[Qemu-devel] [PATCH 14/22] translate-all: work page-by-page in tb_invalidate_phys_range_1

2017-08-07 Thread Emilio G. Cota
So that we pass a same-page range to tb_invalidate_phys_page_range, instead of always passing an end address that could be on a different page. As discussed with Peter Maydell on the list, tb_invalidate_phys_page_range doesn't actually do much with 'end', which explains why we have never hit a bug

[Qemu-devel] [PATCH 19/22] cputlb: remove tb_lock from tlb_flush functions

2017-08-07 Thread Emilio G. Cota
The acquisition of tb_lock was added when the async tlb_flush was introduced in e3b9ca810 ("cputlb: introduce tlb_flush_* async work.") tb_lock was there to allow us to do memset() on the tb_jmp_cache's. However, since f3ced3c5928 ("tcg: consistently access cpu->tb_jmp_cache atomically") all acces

[Qemu-devel] [PATCH 15/22] translate-all: move tb_invalidate_phys_page_range up in the file

2017-08-07 Thread Emilio G. Cota
This greatly simplifies next commit's diff. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 77 --- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index e8f663f..76fec

[Qemu-devel] [PATCH 16/22] translate-all: use per-page locking in !user-mode

2017-08-07 Thread Emilio G. Cota
Groundwork for supporting parallel TCG generation. Instead of using a global lock (tb_lock) to protect changes to pages, use fine-grained, per-page locks in !user-mode. User-mode stays with mmap_lock. Sometimes changes need to happen atomically on more than one page (e.g. when a TB that spans acr

<    1   2   3   4   >