[Qemu-devel] [PATCH v7 10/12] target/arm: PMU: Set PMCR.N to 4

2018-11-05 Thread Aaron Lindsay
This both advertises that we support four counters and enables them because the pmu_num_counters() reads this value from PMCR. Signed-off-by: Aaron Lindsay Signed-off-by: Aaron Lindsay --- target/arm/helper.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/

[Qemu-devel] [PATCH v7 11/12] target/arm: Implement PMSWINC

2018-11-05 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Richard Henderson --- target/arm/helper.c | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 11eb62bdda..cff3a5a562 100644 --- a/target/arm/helper.c

Re: [Qemu-devel] [PULL 00/36] Block layer patches

2018-11-05 Thread Peter Maydell
On 5 November 2018 at 16:37, Kevin Wolf wrote: > The following changes since commit b2f7a038bb4c4fc5ce6b8486e8513dfd97665e2a: > > Merge remote-tracking branch 'remotes/rth/tags/pull-softfloat-20181104' > into staging (2018-11-05 10:32:49 +) > > are available in the Git repository at: > >

Re: [Qemu-devel] [Qemu-arm] [PATCH 2/2] target/arm: Fix ATS1Hx instructions

2018-11-05 Thread Edgar E. Iglesias
On Tue, Oct 16, 2018 at 10:37:03AM +0100, Peter Maydell wrote: > ATS1HR and ATS1HW (which allow AArch32 EL2 to do address translations > on the EL2 translation regime) were implemented in commit 14db7fe09a2c8. > However, we got them wrong: these should do stage 1 address translations > as defined f

[Qemu-devel] [PATCH v1 1/1] riscv: spike: Fix memory leak in the board init

2018-11-05 Thread Alistair Francis
Coverity caught a malloc() call that was never freed. This patch ensures that we free the memory but also updates the allocation to use g_strdup_printf() instead of malloc(). Signed-off-by: Alistair Francis Suggested-by: Peter Maydell --- hw/riscv/spike.c | 6 +++--- 1 file changed, 3 insertion

Re: [Qemu-devel] [PATCH v6 2/5] hw/riscv/virt: Connect the gpex PCIe

2018-11-05 Thread Alistair Francis
On Mon, Nov 5, 2018 at 5:24 AM Bin Meng wrote: > > Hi, > > On Wed, Oct 31, 2018 at 6:22 AM Alistair Francis > wrote: > > > > Connect the gpex PCIe device based on the device tree included in the > > HiFive Unleashed ROM. > > > > Signed-off-by: Alistair Francis > > --- > > default-configs/riscv3

Re: [Qemu-devel] [PATCH] target/mips: Add initrd support for Boston board

2018-11-05 Thread Paul Burton
Hi Aleksandar, On Tue, Oct 23, 2018 at 03:12:14PM +0200, Aleksandar Markovic wrote: > From: Aleksandar Rikalo > > Add support for initial ramdisk loading for the Mips Boston board. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Aleksandar Rikalo > Signed-off-by: Aleksandar Markovic

Re: [Qemu-devel] [PATCH 0/1 resend] Add vhost-pci-blk driver

2018-11-05 Thread Vitaly Mayatskih
On Mon, Nov 5, 2018 at 12:45 PM Michael S. Tsirkin wrote: > I think you should Cc more widely to get meaningful > review. At least virtio-blk and block layer core people. Thanks, it turns out I missed the existence of qemu/scripts directory completely. -- wbr, Vitaly

Re: [Qemu-devel] [PULL v2 00/28] pci, pc, virtio: fixes, features

2018-11-05 Thread Michael S. Tsirkin
On Mon, Nov 05, 2018 at 03:05:27PM +, Peter Maydell wrote: > On 25 October 2018 at 01:52, Michael S. Tsirkin wrote: > > The following changes since commit 13399aad4fa87b2878c49d02a5d3bafa6c966ba3: > > > > Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-10-22' > > into stag

Re: [Qemu-devel] [PATCH v3 1/7] qapi: use qemu_strtoi64() in parse_str

2018-11-05 Thread Markus Armbruster
David Hildenbrand writes: > On 05.11.18 16:37, Markus Armbruster wrote: >> David Hildenbrand writes: >> >>> On 31.10.18 18:55, Markus Armbruster wrote: David Hildenbrand writes: > On 31.10.18 15:40, Markus Armbruster wrote: >> David Hildenbrand writes: >> >>> The qem

[Qemu-devel] [PATCH 0/1 V2] Add vhost-pci-blk driver

2018-11-05 Thread Vitaly Mayatskikh
V2 changes: - checkpatch style fixes - correct size detection of disk image placed on a file system This driver moves virtio-blk host-side processing to kernel (via new vhost_blk kernel driver). It accelerates virtual disk performance close to the bare metal levels, especially for parellel loads.

[Qemu-devel] [PATCH 1/1 V2] Add vhost-pci-blk driver

2018-11-05 Thread Vitaly Mayatskikh
This driver uses the kernel-mode acceleration for virtio-blk and allows to get a near bare metal disk performance inside a VM. Signed-off-by: Vitaly Mayatskikh --- configure | 10 + default-configs/virtio.mak| 1 + hw/block/Makefile.objs| 1 + hw/block/vhost-

Re: [Qemu-devel] [PATCH v4 3/8] block: Null pointer dereference in blk_root_get_parent_desc()

2018-11-05 Thread Liam Merwick
On 04/11/18 23:57, Max Reitz wrote: On 19.10.18 22:39, Liam Merwick wrote: The dev_id returned by the call to blk_get_attached_dev_id() in blk_root_get_parent_desc() can be NULL (an internal call to object_get_canonical_path may have returned NULL). Instead of just checking this case before

Re: [Qemu-devel] [PATCH v4 5/8] block: Fix potential Null pointer dereferences in vvfat.c

2018-11-05 Thread Liam Merwick
On 05/11/18 00:19, Max Reitz wrote: On 19.10.18 22:39, Liam Merwick wrote: The calls to find_mapping_for_cluster() may return NULL but it isn't always checked for before dereferencing the value returned. Additionally, add some asserts to cover cases where NULL can't be returned but which migh

Re: [Qemu-devel] [PATCH v4 6/8] block: dump_qlist() may dereference a Null pointer

2018-11-05 Thread Liam Merwick
On 05/11/18 00:07, Max Reitz wrote: On 19.10.18 22:39, Liam Merwick wrote: A NULL 'list' passed into function dump_qlist() isn't correctly validated and can be passed to qlist_first() where it is dereferenced. Given that dump_qlist() is static, and callers already do the right thing, just ad

[Qemu-devel] [PATCH v5 1/5] job: Fix off-by-one assert checks for JobSTT and JobVerbTable

2018-11-05 Thread Liam Merwick
In the assert checking the array dereference of JobVerbTable[verb] in job_apply_verb() the check of the index, verb, allows an overrun because an index equal to the array size is permitted. Similarly, in the assert check of JobSTT[s0][s1] with index s1 in job_state_transition(), an off-by-one over

[Qemu-devel] [PATCH v5 2/5] block: Null pointer dereference in blk_root_get_parent_desc()

2018-11-05 Thread Liam Merwick
The dev_id returned by the call to blk_get_attached_dev_id() in blk_root_get_parent_desc() can be NULL (an internal call to object_get_canonical_path may have returned NULL). Instead of just checking this case before before dereferencing, adjust blk_get_attached_dev_id() to return the empty string

[Qemu-devel] [PATCH v5 4/5] block: Fix potential Null pointer dereferences in vvfat.c

2018-11-05 Thread Liam Merwick
The calls to find_mapping_for_cluster() may return NULL but it isn't always checked for before dereferencing the value returned. Additionally, add some asserts to cover cases where NULL can't be returned but which might not be obvious at first glance. Signed-off-by: Liam Merwick --- block/vvfat.

[Qemu-devel] [PATCH v5 5/5] qcow2: Read outside array bounds in qcow2_pre_write_overlap_check()

2018-11-05 Thread Liam Merwick
The commit for 0e4e4318eaa5 increments QCOW2_OL_MAX_BITNR but does not add an array entry for QCOW2_OL_BITMAP_DIRECTORY_BITNR to metadata_ol_names[]. As a result, an array dereference of metadata_ol_names[8] in qcow2_pre_write_overlap_check() could result in a read outside of the array bounds. Fi

[Qemu-devel] [PATCH v5 3/5] qemu-img: assert block_job_get() does not return NULL in img_commit()

2018-11-05 Thread Liam Merwick
Although the function block_job_get() can return NULL, it would be a serious bug if it did so (because the job yields before executing anything (if it started successfully); but otherwise, commit_active_start() would have returned an error). However, as a precaution, before dereferencing the 'job'

[Qemu-devel] [PATCH v5 0/5] off-by-one and NULL pointer accesses detected by static analysis

2018-11-05 Thread Liam Merwick
Below are a number of fixes to some off-by-one, read outside array bounds, and NULL pointer accesses detected by an internal Oracle static analysis tool (Parfait). https://labs.oracle.com/pls/apex/f?p=labs:49:P49_PROJECT_ID:13 v1 -> v2 Based on feedback from Eric Blake: patch2: reworded commi

Re: [Qemu-devel] [PATCH v3] oslib-posix: Use MAP_STACK in qemu_alloc_stack() on OpenBSD

2018-11-05 Thread Brad Smith
ping. On 10/19/2018 8:52 AM, Brad Smith wrote: Use MAP_STACK in qemu_alloc_stack() on OpenBSD. Added to our 6.4 release. MAP_STACK Indicate that the mapping is used as a stack. This flag must be used in combination with MAP_ANON and MAP_PRIVATE. Implement

Re: [Qemu-devel] [PATCH v3 1/6] qemu-nbd: add support for authorization of TLS clients

2018-11-05 Thread Eric Blake
On 10/9/18 8:23 AM, Daniel P. Berrangé wrote: From: "Daniel P. Berrange" Currently any client which can complete the TLS handshake is able to use the NBD server. The server admin can turn on the 'verify-peer' option for the x509 creds to require the client to provide a x509 certificate. This me

Re: [Qemu-devel] [PATCH RFC 4/4] net/slirp: add ipv6-hostfwd option for user netdev type

2018-11-05 Thread Eric Blake
On 10/25/18 7:03 PM, Maxim Samoylov wrote: This allows forwarding TCP6 and UDP6 connections down to netdev=user connected guests. Signed-off-by: Maxim Samoylov --- hmp-commands.hx | 31 include/net/slirp.h | 2 + net/slirp.c | 214

Re: [Qemu-devel] [PATCH] include: Add a comment to explain the origin of sizes' lookup table

2018-11-05 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20181103015821.30074-1-lbl...@janustech.com Subject: [Qemu-devel] [PATCH] include: Add a comment to explain the origin of sizes' lookup table === TEST SCRIPT BEGIN === #!/bi

Re: [Qemu-devel] [PATCH] qapi: misc: change the 'pc' to unsinged 64 in CpuInfo

2018-11-05 Thread Eric Blake
On 11/2/18 6:01 AM, Li Qiang wrote: When trigger a 'query-cpus' qmp, the pc is an signed value like following: {"arch": "x86", ... "pc": -1732653994, "halted": true,...} It is strange. Change it to uint64_t. Signed-off-by: Li Qiang --- qapi/misc.json | 12 ++-- 1 file changed, 6 ins

Re: [Qemu-devel] [PATCH 1/2] contrib/elf2dmp: use GLib file mapping

2018-11-05 Thread Eric Blake
On 11/1/18 7:28 PM, Viktor Prutyanov wrote: Replace POSIX mmap with GLib g_mapped_file_new to make elf2dmp cross-paltform. After this patch there are no direct POSIX calls. s/paltform/platform/ Signed-off-by: Viktor Prutyanov --- Makefile | 2 +- -- Eric Blake, Pri

Re: [Qemu-devel] [PULL 03/48] qemu-timer: introduce timer attributes

2018-11-05 Thread Eric Blake
On 10/18/18 3:31 PM, Paolo Bonzini wrote: From: Artem Pisarenko Attributes are simple flags, associated with individual timers for their whole lifetime. They intended to be used to mark individual timers for special handling when they fire. New/init functions family in timer interface updated

Re: [Qemu-devel] [PATCH v2 0/5] Various option help readability improvement suggestions

2018-11-05 Thread Max Reitz
On 05.11.18 15:18, Kevin Wolf wrote: > Am 19.10.2018 um 18:49 hat Max Reitz geschrieben: >> I noticed that with the (more or less) recent series from Marc-André the >> output of qemu-img amend -f qcow2 -o help changed to this: >> >> $ ./qemu-img amend -f qcow2 -o help >> Creation options for 'qcow2

Re: [Qemu-devel] [PATCH] block: Make more block drivers compile-time configurable

2018-11-05 Thread Max Reitz
On 05.11.18 16:25, Markus Armbruster wrote: > Max Reitz writes: > >> On 19.10.18 13:34, Markus Armbruster wrote: >>> From: Jeff Cody >>> >>> This adds configure options to control the following block drivers: >>> >>> * Bochs >>> * Cloop >>> * Dmg >>> * Qcow (V1) >>> * Vdi >>> * Vvfat >>> * qed >

Re: [Qemu-devel] [PATCH 2/4] scsi-generic: avoid out-of-bounds access to VPD page list

2018-11-05 Thread Max Reitz
On 29.10.18 18:34, Paolo Bonzini wrote: > A device can report an excessive number of VPD pages when asked for a > list; this can cause an out-of-bounds access to buf in > scsi_generic_set_vpd_bl_emulation. It should not happen, but > it is technically not incorrect so handle it: do not check any b

Re: [Qemu-devel] [PATCH 1/4] scsi-generic: keep VPD page list sorted

2018-11-05 Thread Max Reitz
On 29.10.18 18:34, Paolo Bonzini wrote: > Block limits emulation is just placing 0xb0 as the final byte of the > VPD pages list. However, VPD page numbers must be sorted, so change > that to an in-place insert. Since I couldn't find any disk that triggered > the loop more than once, this was test

Re: [Qemu-devel] [PATCH 4/4] scsi-generic: do not do VPD emulation for sense other than ILLEGAL_REQUEST

2018-11-05 Thread Max Reitz
On 29.10.18 18:34, Paolo Bonzini wrote: > Pass other sense, such as UNIT_ATTENTION or BUSY, directly to the > guest. > > Reported-by: Max Reitz > Signed-off-by: Paolo Bonzini > --- > hw/scsi/scsi-generic.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) [...] > @@ -269,12 +268

Re: [Qemu-devel] [PATCH 3/4] scsi-generic: avoid invalid access to struct when emulating block limits

2018-11-05 Thread Max Reitz
On 29.10.18 18:34, Paolo Bonzini wrote: > Emulation of the block limits VPD page called back into scsi-disk.c, > which however expected the request to be for a SCSIDiskState and > accessed a scsi-generic device outside the bounds of its struct > (namely to retrieve s->max_unmap_size and s->max_io_s

Re: [Qemu-devel] [PULL 05/33] virtio-blk: fix comment for virtio_blk_rw_complete

2018-11-05 Thread Dongli Zhang
On 11/06/2018 02:15 AM, Michael S. Tsirkin wrote: > From: Yaowei Bai > > Here should be submit_requests, there is no submit_merged_requests > function. > > Signed-off-by: Yaowei Bai > Reviewed-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsirkin > --- > hw/block/virtio-blk.c | 4 ++-

Re: [Qemu-devel] [PATCH for 3.2 v2 0/7] hw/arm/bcm2835: Add basic support for cprman (clock subsystem)

2018-11-05 Thread no-reply
Hi, This series failed 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. Type: series Message-id: 20181102001303.32640-1-f4...@amsat.org Subject: [Qemu-devel] [PATCH for 3.2 v2 0/7] hw/arm

Re: [Qemu-devel] [PULL 05/33] virtio-blk: fix comment for virtio_blk_rw_complete

2018-11-05 Thread Michael S. Tsirkin
On Tue, Nov 06, 2018 at 11:17:03AM +0800, Dongli Zhang wrote: > > > On 11/06/2018 02:15 AM, Michael S. Tsirkin wrote: > > From: Yaowei Bai > > > > Here should be submit_requests, there is no submit_merged_requests > > function. > > > > Signed-off-by: Yaowei Bai > > Reviewed-by: Michael S. Tsi

Re: [Qemu-devel] [RFC 0/2] vhost-vfio: introduce mdev based HW vhost backend

2018-11-05 Thread Jason Wang
On 2018/10/16 下午9:23, Xiao Wang wrote: What's this === Following the patch (vhost: introduce mdev based hardware vhost backend) https://lwn.net/Articles/750770/, which defines a generic mdev device for vhost data path acceleration (aliased as vDPA mdev below), this patch set introduces

[Qemu-devel] [PATCH 1/1] virtio-blk: fix comment for virtio_blk_rw_complete as nalloc is initially -1

2018-11-05 Thread Dongli Zhang
The initial value of nalloc is -1, but not 1. Signed-off-by: Dongli Zhang --- This is based on git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-

Re: [Qemu-devel] [PATCH RFC v7 7/9] migration: remove unused &local_err parameter in migrate_set_error

2018-11-05 Thread Fei Li
On 11/05/2018 09:59 PM, Juan Quintela wrote: Fei Li wrote: Always call migrate_set_error() to set the error state without relying on whether multifd_save_cleanup() succeeds. As the passed &local_err is never used in multifd_save_cleanup(), remove it. Error is not used, you are right. But t

Re: [Qemu-devel] [PULL 03/48] qemu-timer: introduce timer attributes

2018-11-05 Thread Artem Pisarenko
> hw/core/ptimer.o: In function `timer_new_tl': > /home/eblake/qemu/include/qemu/timer.h:536: undefined reference to > `timer_init_tl' > collect2: error: ld returned 1 exit status > make: *** [/home/eblake/qemu/rules.mak:124: tests/ptimer-test] Error 1 > make: *** Waiting for unfinished jobs I

Re: [Qemu-devel] [PATCH RFC v7 1/9] Fix segmentation fault when qemu_signal_init fails

2018-11-05 Thread Fei Li
Hi, On 11/05/2018 09:32 PM, Juan Quintela wrote: Fei Li wrote: When qemu_signal_init() fails in qemu_init_main_loop(), we return without setting an error. Its callers crash then when they try to report the error with error_report_err(). To avoid such segmentation fault, add a new Error para

[Qemu-devel] [PATCH 2/2] tpm: use loop iterator to set sts data field

2018-11-05 Thread P J P
From: Prasad J Pandit When TIS request is done, set 'sts' data field across all localities. Signed-off-by: Prasad J Pandit --- hw/tpm/tpm_tis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 20126dd838..58d90645bc 100644 --- a/hw/t

[Qemu-devel] [PATCH 1/2] tpm: check localities index

2018-11-05 Thread P J P
From: Prasad J Pandit While performing mmio device r/w operations, guest could set 'addr' parameter such that 'locty' index exceeds TPM_TIS_NUM_LOCALITIES=5. Add check to avoid OOB access. Reported-by: Cheng Feng Signed-off-by: Prasad J Pandit --- hw/tpm/tpm_tis.c | 10 -- 1 file chan

Re: [Qemu-devel] [PATCH RFC v7 6/9] migration: fix the multifd code when receiving less channels

2018-11-05 Thread Fei Li
On 11/02/2018 10:46 AM, Peter Xu wrote: On Thu, Nov 01, 2018 at 06:17:12PM +0800, Fei Li wrote: [...] @@ -1339,7 +1339,7 @@ bool multifd_recv_all_channels_created(void) } /* Return true if multifd is ready for the migration, otherwise false */ -bool multifd_recv_new_channel(QIOChann

Re: [Qemu-devel] [PATCH] target/ppc: fix mtmsr instruction for icount

2018-11-05 Thread Pavel Dovgalyuk
> From: David Gibson [mailto:da...@gibson.dropbear.id.au] > On Tue, Oct 30, 2018 at 12:30:31PM +0300, Pavel Dovgalyuk wrote: > > This patch fixes processing of mtmsr instructions in icount mode. > > In this mode writing to interrupt/peripheral state is controlled > > by can_do_io flag. This flag mu

Re: [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-05 Thread Dongli Zhang
On 11/06/2018 01:49 AM, Eric Blake wrote: > On 11/2/18 3:11 AM, Dongli Zhang wrote: >> Hi, >> >> Is there any way to emulate I/O timeout on qemu side (not fault injection in >> VM >> kernel) without modifying qemu source code? > > You may be interested in Rich's work on nbdkit. If you don't m

Re: [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest

2018-11-05 Thread Gerd Hoffmann
Hi, > > I can see that it simplifies the logic in spice-server if we have a > > single function call instead of two. So we could deprecate > > spice_qxl_set_max_monitors() in favour of your > > spice_qxl_set_device_info() variant. > > > > spice_qxl_set_max_monitors() would then basically do th

Re: [Qemu-devel] [PATCH v4 00/13] arm: nRF51 Devices and Microbit Support

2018-11-05 Thread no-reply
Hi, This series failed 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. Type: series Message-id: 20181102170730.12432-1-cont...@steffen-goertz.de Subject: [Qemu-devel] [PATCH v4 00/13] ar

Re: [Qemu-devel] [PATCH v6 2/5] hw/riscv/virt: Connect the gpex PCIe

2018-11-05 Thread Bin Meng
Hi Alistair, On Tue, Nov 6, 2018 at 3:47 AM Alistair Francis wrote: > > On Mon, Nov 5, 2018 at 5:24 AM Bin Meng wrote: > > > > Hi, > > > > On Wed, Oct 31, 2018 at 6:22 AM Alistair Francis > > wrote: > > > > > > Connect the gpex PCIe device based on the device tree included in the > > > HiFive U

Re: [Qemu-devel] [PATCH V2] migration/colo.c: Fix compilation issue when disable replication

2018-11-05 Thread Zhang Chen
On Mon, Nov 5, 2018 at 6:02 PM Thomas Huth wrote: > On 2018-11-01 03:12, Zhang Chen wrote: > > This compilation issue will occur when user use --disable-replication > > to config Qemu. > > > > Reported-by: Thomas Huth > > Signed-off-by: Zhang Chen > > --- > > migration/colo.c | 28

Re: [Qemu-devel] [PATCH 1/4] add QemuSupportState

2018-11-05 Thread Gerd Hoffmann
On Mon, Nov 05, 2018 at 11:49:40AM -0200, Eduardo Habkost wrote: > On Mon, Nov 05, 2018 at 08:30:28AM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > > - Maintainers can deprecate stuffs > > > > - Orphan code can become Supported > > > > - Once scheduled for removal, there is no way back > > > > -

Re: [Qemu-devel] [PATCH v4 00/13] arm: nRF51 Devices and Microbit Support

2018-11-05 Thread no-reply
Hi, This series failed docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 20181102170730.12432-1-cont...@steffen-goertz.de Subject: [Qemu-devel] [PATCH v4 00/13] a

Re: [Qemu-devel] [PATCH RFC v7 9/9] qemu_thread_create: propagate the error to callers to handle

2018-11-05 Thread Fei Li
On 11/05/2018 09:53 PM, Juan Quintela wrote: Fei Li wrote: Make qemu_thread_create() return a Boolean to indicate if it succeeds rather than failing with an error. And add an Error parameter to hold the error message and let the callers handle it. Nice work, thanks. Signed-off-by: Fei Li

[Qemu-devel] [PATCH v2 1/2] x86/cpu: Enable MOVDIRI cpu feature

2018-11-05 Thread Liu Jingqi
MOVDIRI moves doubleword or quadword from register to memory through direct store which is implemented by using write combining (WC) for writing data directly into memory without caching the data. The bit definition: CPUID.(EAX=7,ECX=0):ECX[bit 27] MOVDIRI The release document ref below link: htt

[Qemu-devel] [PATCH v2 2/2] x86/cpu: Enable MOVDIR64B cpu feature

2018-11-05 Thread Liu Jingqi
MOVDIR64B moves 64-bytes as direct-store with 64-bytes write atomicity. Direct store is implemented by using write combining (WC) for writing data directly into memory without caching the data. The bit definition: CPUID.(EAX=7,ECX=0):ECX[bit 28] MOVDIR64B The release document ref below link: http

[Qemu-devel] [PATCH v2 0/2] x86/cpu: Enable direct stores cpu features

2018-11-05 Thread Liu Jingqi
Enable direct stores cpu features including MOVDIRI and MOVDIR64B. MOVDIRI moves doubleword or quadword from register to memory through direct store. MOVDIR64B moves 64-bytes as direct-store with 64-bytes write atomicity. Changelog: v2: Separated from the series http://lists.nongnu.org/a

Re: [Qemu-devel] [PATCH v2 01/10] pci/pcie: rename hotplug handler callbacks

2018-11-05 Thread David Gibson
On Mon, Nov 05, 2018 at 11:20:35AM +0100, David Hildenbrand wrote: > The callbacks are also called for cold plugged devices. Drop the "hot" > to better match the actual callback names. > > While at it, also rename pcie_cap_slot_hotplug_common() to > pcie_cap_slot_check_common(). Uh.. this part o

Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/1] virtio-blk: fix comment for virtio_blk_rw_complete as nalloc is initially -1

2018-11-05 Thread Laurent Vivier
On 06/11/2018 05:52, Dongli Zhang wrote: > The initial value of nalloc is -1, but not 1. > > Signed-off-by: Dongli Zhang > --- > This is based on git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git > tags/for_upstream > > hw/block/virtio-blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

[Qemu-devel] [PATCH v5 1/7] numa: Fixed the memory leak of numa error message

2018-11-05 Thread Zhang Yi
object_get_canonical_path_component() returns a string which must be freed using g_free(). Signed-off-by: Zhang Yi --- numa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/numa.c b/numa.c index 50ec016..3875e1e 100644 --- a/numa.c +++ b/numa.c @@ -533,6 +533,7 @@ void memory_region_allocat

[Qemu-devel] [PATCH v5 2/7] util/mmap-alloc: switch qemu_ram_mmap() to 'flags' parameter

2018-11-05 Thread Zhang Yi
As more flag parameters besides the existing 'shared' are going to be added to qemu_ram_mmap(), let's switch 'shared' to a 'flags' parameter in advance, so as to ease the further additions. Signed-off-by: Haozhong Zhang Signed-off-by: Zhang Yi --- exec.c| 3 +-- include/qem

[Qemu-devel] [PATCH v5 0/7] nvdimm: support MAP_SYNC for memory-backend-file

2018-11-05 Thread Zhang Yi
Linux 4.15 introduces a new mmap flag MAP_SYNC, which can be used to guarantee the write persistence to mmap'ed files supporting DAX (e.g., files on ext4/xfs file system mounted with '-o dax'). A description of MAP_SYNC and MAP_SHARED_VALIDATE can be found at https://patchwork.kernel.org/patch

Re: [Qemu-devel] [PATCH v2 1/5] option: Make option help nicer to read

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:49 PM Max Reitz wrote: > > This adds some whitespace into the option help (including indentation) > and puts angle brackets around the type names. Furthermore, the list > name is no longer printed as part of every line, but only once in > advance, and only if the caller

Re: [Qemu-devel] [PATCH v2 3/5] qdev-monitor: Make device options help nicer

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:49 PM Max Reitz wrote: > > Just like in qemu_opts_print_help(), print the device name as a caption > instead of on every single line, indent all options, add angle brackets > around types, and align the descriptions after 24 characters. Also, > separate the descriptions

Re: [Qemu-devel] [PATCH 3/3] arm: allwinner: Enable USB EHCI

2018-11-05 Thread Gerd Hoffmann
> > > @@ -116,6 +116,8 @@ static void aw_a10_realize(DeviceState *dev, Error > > > **errp) > > > if (machine_usb(current_machine)) { > > > sysbus_create_simple("sysbus-ohci", 0x01c14400, s->irq[64]); > > > sysbus_create_simple("sysbus-ohci", 0x01c1c400, s->irq[65]); > > >

Re: [Qemu-devel] [PATCH v2 2/5] chardev: Indent list of chardevs

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:49 PM Max Reitz wrote: > > Following the example of qemu_opts_print_help(), indent all entries in > the list of character devices. > > Signed-off-by: Max Reitz Reviewed-by: Marc-André Lureau > --- > chardev/char.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(

Re: [Qemu-devel] [PATCH v2 4/5] object: Make option help nicer to read

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:49 PM Max Reitz wrote: > > Just like in qemu_opts_print_help(), print the object name as a caption > instead of on every single line, indent all options, add angle brackets > around types, and align the descriptions after 24 characters. > > Also, indent every object name

Re: [Qemu-devel] [PATCH v2 5/5] fw_cfg: Drop newline in @file description

2018-11-05 Thread Marc-André Lureau
On Fri, Oct 19, 2018 at 8:50 PM Max Reitz wrote: > > There is no good reason why there should be a newline in this > description, so remove it. > > Signed-off-by: Max Reitz > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau > --- > vl.c | 2 +- > 1 file changed, 1 insertion

Re: [Qemu-devel] [PATCH 1/2] hw: fw_cfg: ensure reboot_time is nonegative

2018-11-05 Thread Gerd Hoffmann
> -/* validate the input */ > -if (reboot_timeout > 0x) { > -error_report("reboot timeout is larger than 65535, force it to > 65535."); > -reboot_timeout = 0x; > + > +if (reboot_timeout >= 0) { > +/* validate the input */ > +if (reboot_timeout >

Re: [Qemu-devel] [PATCH 2/2] hw: fw_cfg: use qemu_opt_get_number to get splash-time and reboot-timeout

2018-11-05 Thread Gerd Hoffmann
> +uint64_t boot_splash_time = -1; Hmm, why use uint64_t here ... > +if ((int64_t)boot_splash_time >= 0) { ... then cast it to int64_t here? Isn't it easier to just use int64_t? cheers, Gerd

[Qemu-devel] [PATCH v5 5/7] util/mmap-alloc: Switch the RAM_SYNC flags to OnOffAuto

2018-11-05 Thread Zhang Yi
Signed-off-by: Zhang Yi A set of RAM_SYNC_ON_OFF_AUTO{AUTO,ON,OFF} flags are added to qemu_ram_mmap(): - If RAM_SYNC_ON_OFF_AUTO_ON is present, qemu_ram_mmap() will try to pass MAP_SYNC to mmap(). It will then fail if the host OS or the backend file do not support MAP_SYNC, or MAP_SYNC is co

[Qemu-devel] [PATCH v5 4/7] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2018-11-05 Thread Zhang Yi
When a file supporting DAX is used as vNVDIMM backend, mmap it with MAP_SYNC flag in addition can guarantee the persistence of guest write to the backend file without other QEMU actions (e.g., periodic fsync() by QEMU). A set of RAM_SYNC flags are added to qemu_ram_mmap(): Signed-off-by: Haozhong

[Qemu-devel] [PATCH v5 3/7] exec: switch qemu_ram_alloc_from_{file, fd} to the 'flags' parameter

2018-11-05 Thread Zhang Yi
As more flag parameters besides the existing 'share' are going to be added to qemu_ram_alloc_from_{file,fd}(), let's swith 'share' to a 'flags' parameters in advance, so as to ease the further additions. Signed-off-by: Haozhong Zhang Signed-off-by: Zhang Yi --- exec.c | 6 -- 1 file changed

[Qemu-devel] [PATCH v5 7/7] hostmem-file: add 'sync' option

2018-11-05 Thread Zhang Yi
This option controls whether QEMU mmap(2) the memory backend file with MAP_SYNC flag, which can fully guarantee the guest write persistence to the backend, if MAP_SYNC flag is supported by the host kernel (Linux kernel 4.15 and later) and the backend is a file supporting DAX (e.g., file on ext4/xfs

[Qemu-devel] [PATCH v5 6/7] hostmem: add more information in error messages

2018-11-05 Thread Zhang Yi
When there are multiple memory backends in use, including the object type name, ID and the property name in the error message can help users to locate the error. Signed-off-by: Haozhong Zhang Signed-off-by: Zhang Yi --- backends/hostmem-file.c | 6 -- backends/hostmem.c | 8 +--- 2

[Qemu-devel] [Bug 1801674] Re: Ubuntu16.04 LTS - PCI Pass Through in Ubuntu KVM 16.04.x must use QEMU with DDW support from PPA

2018-11-05 Thread Frank Heimes
** Also affects: qemu Importance: Undecided Status: New ** No longer affects: qemu ** Also affects: ubuntu-power-systems Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://b

Re: [Qemu-devel] [PULL 1/2] qxl: store channel id in qxl->id

2018-11-05 Thread Frediano Ziglio
> > Hi, > > > > vga->con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl); > > > +qxl->id = qemu_console_get_index(vga->con); /* == channel_id */ > > > +if (qxl->id != 0) { > > > +error_setg(errp, "primary qxl-vga device must be console 0 " > > > + "(fi

Re: [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest

2018-11-05 Thread Frediano Ziglio
> > > 2. Have a single function as follows: > > > > void spice_qxl_set_device_info(QXLInstance *instance, > >const char *device_address, > >uint32_t device_display_id_start, > >uint32_t device_display_

Re: [Qemu-devel] [PULL 1/2] qxl: store channel id in qxl->id

2018-11-05 Thread Gerd Hoffmann
Hi, > > vga->con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl); > > +qxl->id = qemu_console_get_index(vga->con); /* == channel_id */ > > +if (qxl->id != 0) { > > +error_setg(errp, "primary qxl-vga device must be console 0 " > > + "(first display dev

Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/1] virtio: pass argument by value for virtqueue_map_iovec()

2018-11-05 Thread Laurent Vivier
CC: Paolo as the use of modified num_sg has been removed by his patch: 3b3b062821 virtio: slim down allocation of VirtQueueElements On 02/11/2018 07:16, Dongli Zhang wrote: > Pass num_sg by value instead of by pointer, as num_sg is never modified in > virtqueue_map_iovec(). > > Signed-off-by:

Re: [Qemu-devel] [PATCH 4/4] MAINTAINERS: s390/boot: the ipl code and the bios belong together

2018-11-05 Thread Cornelia Huck
On Mon, 29 Oct 2018 16:42:25 +0100 Christian Borntraeger wrote: > The s390-ccw bios and the ipl code do work in lock-step. Let us merge > them in the maintainer file. > > Signed-off-by: Christian Borntraeger > --- > MAINTAINERS | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > dif

Re: [Qemu-devel] [PATCH v1 5/7] pci/shpc: move hotplug checks to preplug handler

2018-11-05 Thread David Hildenbrand
On 24.10.18 12:19, David Hildenbrand wrote: > Move the checks to the pre_plug handler. I don't see a reason to check > for the PCI slot when unplugging. > > Signed-off-by: David Hildenbrand > --- > hw/pci-bridge/pci_bridge_dev.c | 11 -- > hw/pci-bridge/pcie_pci_bridge.c | 11 --

Re: [Qemu-devel] [PATCH] tracetool: Include thread id information in log backend

2018-11-05 Thread Stefan Hajnoczi
On Thu, Oct 04, 2018 at 11:30:09AM -0300, Fabiano Rosas wrote: > Currently the log backend prints the process id of QEMU at the start > of each output line, but since threads share the same PID there is no > clear distinction between their outputs. > > Having the thread id present in the log makes

[Qemu-devel] New crash (was: Re: [PATCH qemu v5 2/3] hw/arm/sysbus-fdt: Allow device matching with DT compatible value)

2018-11-05 Thread Thomas Huth
On 2018-09-27 13:54, Geert Uytterhoeven wrote: > From: Auger Eric > > Up to now we have relied on the device type to identify a device tree > node creation function. Since we would like the vfio-platform device to > be instantiable with different compatible strings we introduce the > capability

Re: [Qemu-devel] New crash

2018-11-05 Thread Auger Eric
Hi Thomas, On 11/5/18 10:17 AM, Thomas Huth wrote: > On 2018-09-27 13:54, Geert Uytterhoeven wrote: >> From: Auger Eric >> >> Up to now we have relied on the device type to identify a device tree >> node creation function. Since we would like the vfio-platform device to >> be instantiable with d

Re: [Qemu-devel] [RFC PATCH spice v2 1/2] QXL interface: add functions to identify monitors in the guest

2018-11-05 Thread Lukáš Hrázký
On Mon, 2018-11-05 at 03:46 -0500, Frediano Ziglio wrote: > > > > > 2. Have a single function as follows: > > > > > > void spice_qxl_set_device_info(QXLInstance *instance, > > >const char *device_address, > > >uint32_t device_display

Re: [Qemu-devel] [PATCH V2] migration/colo.c: Fix compilation issue when disable replication

2018-11-05 Thread Thomas Huth
On 2018-11-01 03:12, Zhang Chen wrote: > This compilation issue will occur when user use --disable-replication > to config Qemu. > > Reported-by: Thomas Huth > Signed-off-by: Zhang Chen > --- > migration/colo.c | 28 +++- > 1 file changed, 27 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH v2 10/10] spapr_pci: perform unplug via the hotplug handler

2018-11-05 Thread David Hildenbrand
Introduce and use the "unplug" callback. This is a preparation for multi-stage hotplug handlers, whereby the bus hotplug handler is overwritten by the machine hotplug handler. This handler will then pass control to the bus hotplug handler. So to get this running cleanly, we also have to make sure

[Qemu-devel] [PATCH v2 09/10] pci/shpc: perform unplug via the hotplug handler

2018-11-05 Thread David Hildenbrand
Introduce and use the "unplug" callback. This is a preparation for multi-stage hotplug handlers, whereby the bus hotplug handler is overwritten by the machine hotplug handler. This handler will then pass control to the bus hotplug handler. So to get this running cleanly, we also have to make sure

[Qemu-devel] [PATCH v2 06/10] pci/pcihp: overwrite hotplug handler recursively from the start

2018-11-05 Thread David Hildenbrand
For now, the hotplug handler is not called for devices that are being cold plugged. The hotplug handler is setup when the machine initialization is fully done. Only bridges that were cold plugged are considered. Set the hotplug handler for the root piix bus directly when realizing. Overwrite the h

[Qemu-devel] [PATCH v2 08/10] pci/pcie: perform unplug via the hotplug handler

2018-11-05 Thread David Hildenbrand
Introduce and use the "unplug" callback. This is a preparation for multi-stage hotplug handlers, whereby the bus hotplug handler is overwritten by the machine hotplug handler. This handler will then pass control to the bus hotplug handler. So to get this running cleanly, we also have to make sure

[Qemu-devel] [PATCH v2 02/10] pci/shpc: rename hotplug handler callbacks

2018-11-05 Thread David Hildenbrand
The callbacks are also called for cold plugged devices. Drop the "hot" to better match the actual callback names. While at it, also rename shpc_device_hotplug_common() to shpc_device_plug_common(). Signed-off-by: David Hildenbrand --- hw/pci-bridge/pci_bridge_dev.c | 17 - hw/p

Re: [Qemu-devel] [PULL 1/2] qxl: store channel id in qxl->id

2018-11-05 Thread Frediano Ziglio
> Hi, > > > > vga->con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl); > > > +qxl->id = qemu_console_get_index(vga->con); /* == channel_id */ > > > +if (qxl->id != 0) { > > > +error_setg(errp, "primary qxl-vga device must be console 0 " > > > + "(first

[Qemu-devel] [PATCH v2 00/10] pci: hotplug handler reworks

2018-11-05 Thread David Hildenbrand
This series reworks some pci hotplug handlers (except for s390, that will require more work but is not required for now). 1. Route all unplug calls via the hotplug handler when called from the unplug_request handler. This will be required to get multi-stage hotplug handlers running, but also

[Qemu-devel] [PATCH v2 05/10] pci/pcihp: perform check for bus capability in pre_plug handler

2018-11-05 Thread David Hildenbrand
Perform the check in the pre_plug handler. In addition, we need the capability only if the device is actually hotplugged (and not created during machine initialization). This is a preparation for coldplugging pci devices via that hotplug handler. Reviewed-by: Igor Mammedov Signed-off-by: David Hi

Re: [Qemu-devel] [PATCH v3 4/7] range: add some more functions

2018-11-05 Thread David Hildenbrand
On 01.11.18 12:05, Igor Mammedov wrote: > On Thu, 1 Nov 2018 11:29:51 +0100 > David Hildenbrand wrote: > >> On 01.11.18 11:00, Igor Mammedov wrote: >>> On Tue, 23 Oct 2018 17:23:03 +0200 >>> David Hildenbrand wrote: >>> Add some more functions that will be used in memory-device context.

[Qemu-devel] [PATCH v2 03/10] s390x/pci: rename hotplug handler callbacks

2018-11-05 Thread David Hildenbrand
The callbacks are also called for cold plugged devices. Drop the "hot" to better match the actual callback names. Signed-off-by: David Hildenbrand --- hw/s390x/s390-pci-bus.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-

[Qemu-devel] [PATCH v2 07/10] pci/pcihp: perform unplug via the hotplug handler

2018-11-05 Thread David Hildenbrand
Introduce and use the "unplug" callback. This is a preparation for multi-stage hotplug handlers, whereby the bus hotplug handler is overwritten by the machine hotplug handler. This handler will then pass control to the bus hotplug handler. So to get this running cleanly, we also have to make sure

[Qemu-devel] [PATCH v2 04/10] pci/pcie: stop plug/unplug if the slot is locked

2018-11-05 Thread David Hildenbrand
We better stop right away. While at it, properly move the check to the pre_plug handler. Reviewed-by: Igor Mammedov Signed-off-by: David Hildenbrand --- hw/pci/pcie.c | 25 + hw/pci/pcie_port.c| 1 + include/hw/pci/pcie.h | 2 ++ 3 files changed, 20 inserti

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 10/10] spapr_pci: perform unplug via the hotplug handler

2018-11-05 Thread David Hildenbrand
On 05.11.18 11:31, Greg Kurz wrote: > On Mon, 5 Nov 2018 11:20:44 +0100 > David Hildenbrand wrote: > >> Introduce and use the "unplug" callback. >> >> This is a preparation for multi-stage hotplug handlers, whereby the bus >> hotplug handler is overwritten by the machine hotplug handler. This ha

  1   2   3   4   >