Re: [Qemu-devel] [PATCH 09/14] qemu-iotests: Rewrite 207 for blockdev-create job

2018-05-29 Thread Max Reitz
On 2018-05-25 18:33, Kevin Wolf wrote: > This rewrites the test case 207 to work with the new x-blockdev-create > job rather than the old synchronous version of the command. > > Most of the test cases stay the same as before (the exception being some > improved 'size' options that allow distinguis

[Qemu-devel] [PATCH v2 0/2] xlnx-zynqmp: Change the Cortex-R5 for Cortex-R5F

2018-05-29 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" The ZynqMP actually has Cortex-R5Fs with the optional FPU enabled. Cheers, Edgar ChangeLog: v1 -> v2: * Update ZCU102 description to mention R5Fs Edgar E. Iglesias (2): target-arm: Add the Cortex-R5F xlnx-zynqmp: Swap Cortex-R5 for Cortex-R5F hw/arm/xlnx-zcu102

[Qemu-devel] [PATCH v2 2/2] xlnx-zynqmp: Swap Cortex-R5 for Cortex-R5F

2018-05-29 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" The ZynqMP has Cortex-R5Fs with the optional FPU enabled. Reviewed-by: KONRAD Frederic Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Edgar E. Iglesias --- hw/arm/xlnx-zcu102.c | 2 +- hw/arm/xlnx

[Qemu-devel] [PATCH v2 1/2] target-arm: Add the Cortex-R5F

2018-05-29 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add the Cortex-R5F with the optional FPU enabled. Reviewed-by: KONRAD Frederic Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Edgar E. Iglesias --- target/arm/cpu.c | 9 + 1 file changed,

Re: [Qemu-devel] [PATCH v5 45/49] tests/tcg/Makefile: update to be called from Makefile.target

2018-05-29 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Hi Alex, > > On 05/25/2018 11:19 AM, Alex Bennée wrote: >> This make is now invoked from each individual target make with the >> appropriate CC and EXTRA_CFLAGS set for each guest. It then includes >> additional Makefile.targets from: >> >> - tests/tcg/multiar

Re: [Qemu-devel] [PATCH 4/4] spapr: introduce a new IRQ backend using fixed IRQ number ranges

2018-05-29 Thread Cédric Le Goater
>> +static void spapr_irq_range_free_msi(sPAPRMachineState *spapr, int irq, int >> num) >> +{ >> +bitmap_clear(spapr->irq_map, irq, num); >> +} >> + >> +/* >> + * New XICS IRQ backend >> + * >> + * using the IRQ ranges and device indexes >> + */ >> +static void spapr_irq_init_2_13(sPAPRMachine

Re: [Qemu-devel] [PATCH v5 35/49] tests/tcg: enable building for Alpha

2018-05-29 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > (Cc'ing Samuel who replied in a previous thread) > > Hi Alex, > > On 05/25/2018 11:19 AM, Alex Bennée wrote: >> We can't use our normal Debian based compilers as Alpha isn't an >> officially supported architecture. However it is available as a port >> and fortun

Re: [Qemu-devel] [PULL v1 00/38] Xilinx queue

2018-05-29 Thread Peter Maydell
On 29 May 2018 at 11:49, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > The following changes since commit 5a5c383b1373aeb6c87a0d6060f6c3dc7c53082b: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-2.13-pull-request' into staging > (2018-05-25 10:04:36 +0100)

Re: [Qemu-devel] [PATCH v2 4/5] scripts/qemu.py: introduce set_console() method

2018-05-29 Thread Cleber Rosa
On 05/26/2018 12:54 AM, Philippe Mathieu-Daudé wrote: > Hi Cleber, > > On 05/25/2018 03:42 PM, Cleber Rosa wrote: >> The set_console() method is intended to ease higher level use cases >> that require a console device. >> >> The amount of intelligence is limited on purpose, requiring either the

Re: [Qemu-devel] [PATCH 10/14] qemu-iotests: Rewrite 210 for blockdev-create job

2018-05-29 Thread Max Reitz
On 2018-05-25 18:33, Kevin Wolf wrote: > This rewrites the test case 210 to work with the new x-blockdev-create > job rather than the old synchronous version of the command. > > All of the test cases stay the same as before, but in order to be able > to implement proper job handling, the test case

Re: [Qemu-devel] [PATCH v4 01/21] vfio: Include "exec/address-spaces.h" directly in the source file

2018-05-29 Thread Alex Williamson
On Tue, 29 May 2018 12:45:28 +0200 Paolo Bonzini wrote: > On 29/05/2018 11:53, Cornelia Huck wrote: > > On Mon, 28 May 2018 21:36:31 -0300 > > Philippe Mathieu-Daudé wrote: > > > >> On 05/28/2018 09:06 PM, Michael S. Tsirkin wrote: > >>> On Mon, May 28, 2018 at 05:48:05PM -0600, Alex Willia

Re: [Qemu-devel] [Qemu-block] [PATCH v2 21/40] job: Convert block_job_cancel_async() to Job

2018-05-29 Thread Kashyap Chamarthy
On Tue, May 29, 2018 at 02:30:47PM +0200, Max Reitz wrote: > On 2018-05-29 13:59, Kashyap Chamarthy wrote: > > On Fri, May 25, 2018 at 10:00:35AM +0200, Kevin Wolf wrote: [...] > >> It can, and it already has its final semantics, so nothing has to change > >> before 3.0. job-cancel is equivalent

Re: [Qemu-devel] [PATCH 11/14] qemu-iotests: Rewrite 211 for blockdev-create job

2018-05-29 Thread Max Reitz
On 2018-05-25 18:33, Kevin Wolf wrote: > This rewrites the test case 211 to work with the new x-blockdev-create > job rather than the old synchronous version of the command. > > All of the test cases stay the same as before, but in order to be able > to implement proper job handling, the test case

Re: [Qemu-devel] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response

2018-05-29 Thread Philippe Mathieu-Daudé
Hi Cédric, In title: "Get Parameters" (plural) On 05/29/2018 03:28 AM, Cédric Le Goater wrote: > This is a minimum response to exercise the kernel. This type is mandatory in DMTF Standard v1.0.1 indeed (DSP0222). > > Signed-off-by: Cédric Le Goater > --- > slirp/ncsi.c | 23 +

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-29 Thread Eduardo Habkost
On Tue, May 29, 2018 at 12:14:28PM +0200, Kevin Wolf wrote: > Am 29.05.2018 um 11:23 hat Max Reitz geschrieben: > > On 2018-05-28 21:09, Kevin Wolf wrote: > > > Am 28.05.2018 um 20:44 hat Max Reitz geschrieben: > > >> On 2018-05-28 20:38, Kevin Wolf wrote: > > >>> Am 28.05.2018 um 20:30 hat Richard

Re: [Qemu-devel] [PATCH v2 4/5] scripts/qemu.py: introduce set_console() method

2018-05-29 Thread Eduardo Habkost
On Tue, May 29, 2018 at 09:01:42AM -0400, Cleber Rosa wrote: > On 05/26/2018 12:54 AM, Philippe Mathieu-Daudé wrote: > > Hi Cleber, > > > > On 05/25/2018 03:42 PM, Cleber Rosa wrote: > >> The set_console() method is intended to ease higher level use cases > >> that require a console device. > >> >

Re: [Qemu-devel] [PATCH 12/14] qemu-iotests: Rewrite 212 for blockdev-create job

2018-05-29 Thread Max Reitz
On 2018-05-25 18:33, Kevin Wolf wrote: > This rewrites the test case 212 to work with the new x-blockdev-create > job rather than the old synchronous version of the command. > > All of the test cases stay the same as before, but in order to be able > to implement proper job handling, the test case

Re: [Qemu-devel] [Qemu-block] [PATCH v2 21/40] job: Convert block_job_cancel_async() to Job

2018-05-29 Thread Kashyap Chamarthy
On Tue, May 29, 2018 at 03:10:58PM +0200, Kashyap Chamarthy wrote: > On Tue, May 29, 2018 at 02:30:47PM +0200, Max Reitz wrote: [...] > > The special behavior is that you can use block-job-cancel after > > BLOCK_JOB_READY to complete the job, but not pivot to it. I don't think > > we have a real

Re: [Qemu-devel] [PATCH 6/6] slirp/ncsi: add checksum support

2018-05-29 Thread Philippe Mathieu-Daudé
On 05/29/2018 03:28 AM, Cédric Le Goater wrote: > The checksum field of a NC-SI packet contains a value that may be > included in each command and response. The verification is optional > but the Linux driver does so when a non-zero value is provided. Let's > extend the model to compute the checksu

Re: [Qemu-devel] [PATCH v2 1/8] docker: sort images list displayed by 'make docker'

2018-05-29 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Hi Alex, > > On 01/17/2018 06:37 AM, Alex Bennée wrote: >> >> Philippe Mathieu-Daudé writes: >> >>> we can now directly see different version sort consecutively. >>> >>> Signed-off-by: Philippe Mathieu-Daudé >> >> I of course meant: >> >> Reviewed-by: Alex Ben

Re: [Qemu-devel] [PATCH v4 01/14] memory-device: drop assert related to align and start of address space

2018-05-29 Thread Igor Mammedov
On Thu, 17 May 2018 10:15:14 +0200 David Hildenbrand wrote: > The start of the address space does not have to be aligned for the > search. Handle this case explicitly when starting the search for a new > address. That's true, but commit message doesn't explain why address_space_start should be al

Re: [Qemu-devel] [PATCH 13/14] qemu-iotests: Rewrite 213 for blockdev-create job

2018-05-29 Thread Max Reitz
On 2018-05-25 18:33, Kevin Wolf wrote: > This rewrites the test case 213 to work with the new x-blockdev-create > job rather than the old synchronous version of the command. > > All of the test cases stay the same as before, but in order to be able > to implement proper job handling, the test case

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/6] ftgmac100: compute maximum frame size depending on the protocol

2018-05-29 Thread Philippe Mathieu-Daudé
On 05/29/2018 03:28 AM, Cédric Le Goater wrote: > The maximum frame size includes the CRC and depends if a VLAN tag is > inserted or not. Adjust the frame size limit in the transmit handler > using on the FTGMAC100State buffer size and in the receive handler use > the packet protocol. > > Signed-o

Re: [Qemu-devel] [PATCH 14/14] block/create: Mark blockdev-create stable

2018-05-29 Thread Max Reitz
On 2018-05-25 18:33, Kevin Wolf wrote: > We're ready to declare the blockdev-create job stable. This renames the > corresponding QMP command from x-blockdev-create to blockdev-create. > > Signed-off-by: Kevin Wolf > --- > qapi/block-core.json | 4 ++-- > qapi/job.json | 2 +-

Re: [Qemu-devel] [Qemu-arm] [PATCH] arm: fix malloc type mismatch

2018-05-29 Thread Peter Maydell
On 24 May 2018 at 22:55, Philippe Mathieu-Daudé wrote: > Cc'ing qemu-devel for patchew and co > > On 05/24/2018 06:37 PM, Paolo Bonzini wrote: >> cpregs_keys is an uint32_t* so the allocation should use uint32_t. >> g_new is even better because it is type-safe. >> >> Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [Qemu-arm] [PATCH 2/6] ftgmac100: add IEEE 802.1Q VLAN support

2018-05-29 Thread Philippe Mathieu-Daudé
Hi Cédric, On 05/29/2018 03:28 AM, Cédric Le Goater wrote: > The ftgmac100 NIC supports VLAN tag insertion and the MAC engine also > has a control to remove VLAN tags from received packets. > > The VLAN control bits and VLAN tag information are contained in the > second word of the transmit and r

Re: [Qemu-devel] [Qemu-arm] [PATCH v3] aspeed_scu: Implement RNG register

2018-05-29 Thread Philippe Mathieu-Daudé
On 05/29/2018 01:19 AM, Joel Stanley wrote: > The ASPEED SoCs contain a single register that returns random data when > read. This models that register so that guests can use it. > > The random number data register has a corresponding control register, > however it returns data regardless of the s

Re: [Qemu-devel] [RFC v2 7/7] hw/arm/virt: Register two redistributor regions when necessary

2018-05-29 Thread Auger Eric
Hi, On 05/22/2018 02:43 PM, Peter Maydell wrote: > On 13 May 2018 at 15:35, Eric Auger wrote: >> With a VGICv3 KVM device, if the number of vcpus exceeds the >> capacity of the legacy redistributor region (123 redistributors), >> we now attempt to register the second redistributor region. This >>

Re: [Qemu-devel] [RFC v2 3/7] hw/intc/arm_gicv3: Introduce redist-region-count array property

2018-05-29 Thread Auger Eric
Hi Peter, On 05/29/2018 11:13 AM, Peter Maydell wrote: > On 29 May 2018 at 10:08, Auger Eric wrote: >> Hi Peter, >> On 05/22/2018 02:27 PM, Peter Maydell wrote: >>> On 13 May 2018 at 15:35, Eric Auger wrote: To prepare for multiple redistributor regions, we introduce an array of uint32

Re: [Qemu-devel] [PATCH v2] ARM: ACPI: Fix use-after-free due to memory realloc

2018-05-29 Thread Peter Maydell
On 29 May 2018 at 04:08, Shannon Zhao wrote: > acpi_data_push uses g_array_set_size to resize the memory size. If there > is no enough contiguous memory, the address will be changed. So previous > pointer could not be used any more. It must update the pointer and use > the new one. > > Reviewed-by

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-29 Thread Dr. David Alan Gilbert
* Richard W.M. Jones (rjo...@redhat.com) wrote: > On Fri, May 18, 2018 at 06:09:56PM +0100, Daniel P. Berrangé wrote: > > The closest to a cross-hypervisor standard is OVF which can store > > metadata about required hardware for a VM. I'm pretty sure it does > > not have the concept of machine type

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-29 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Seriously, though: are disk images a sane way to package software? They're not actually terrible. You can just start a VM with them straight away, no unpacking required, no installation time. Especially when used with something like -snapshot. It'

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-29 Thread Eduardo Habkost
On Tue, May 29, 2018 at 03:03:16PM +0100, Dr. David Alan Gilbert wrote: > * Richard W.M. Jones (rjo...@redhat.com) wrote: > > On Fri, May 18, 2018 at 06:09:56PM +0100, Daniel P. Berrangé wrote: > > > The closest to a cross-hypervisor standard is OVF which can store > > > metadata about required har

Re: [Qemu-devel] [PATCH v2 4/5] scripts/qemu.py: introduce set_console() method

2018-05-29 Thread Cleber Rosa
On 05/25/2018 02:42 PM, Cleber Rosa wrote: > The set_console() method is intended to ease higher level use cases > that require a console device. > > The amount of intelligence is limited on purpose, requiring either the > device type explicitly, or the existence of a machine (pattern) > defini

Re: [Qemu-devel] [RFC v2 7/7] hw/arm/virt: Register two redistributor regions when necessary

2018-05-29 Thread Peter Maydell
On 29 May 2018 at 14:43, Auger Eric wrote: > I just noticed virt_machine_class_init still clamps the max_cpus to 255. > This is checked in vl.c > > Do we want the 3.0 machine expose more than 255 vcpus, 512 for instance? > I understand this mc->max_cpus is something rather static, that is > refine

Re: [Qemu-devel] [PATCH for 2.10 31/35] syscall: replace strcpy() by g_strlcpy()

2018-05-29 Thread Philippe Mathieu-Daudé
Hi Laurent, On 07/24/2017 04:28 PM, Laurent Vivier wrote: > Le 24/07/2017 à 20:27, Philippe Mathieu-Daudé a écrit : >> linux-user/syscall.c:9860:17: warning: Call to function 'strcpy' is insecure >> as it does not provide bounding of the memory buffer. Replace unbounded copy >> functions with an

Re: [Qemu-devel] [Qemu-arm] [PATCH v4 1/2] arm_gicv3_kvm: kvm_dist_get/put_priority: skip the registers banked by GICR_IPRIORITYR

2018-05-29 Thread Peter Maydell
On 25 May 2018 at 12:22, Shannon Zhao wrote: > While for_each_dist_irq_reg loop starts from GIC_INTERNAL, it forgot to > offset the date array and index. This will overlap the GICR registers > value and leave the last GIC_INTERNAL irq's registers out of update. > > Fixes: 367b9f527becdd20ddf116e17

Re: [Qemu-devel] [PATCH for 2.10 15/35] usb: correctly handle Zero Length Packets

2018-05-29 Thread Philippe Mathieu-Daudé
On 07/24/2017 03:27 PM, Philippe Mathieu-Daudé wrote: > USB Specification Revision 2.0, §5.5.3: > The Data stage of a control transfer from an endpoint to the host is > complete when the endpoint does one of the following: > • Has transferred exactly the amount of data specified during the Set

Re: [Qemu-devel] [PATCH for 2.10 26/35] linux-user: use is_error() to avoid warnings and make the code clearer

2018-05-29 Thread Philippe Mathieu-Daudé
Hi Laurent, On 07/24/2017 04:16 PM, Laurent Vivier wrote: > Le 24/07/2017 à 20:27, Philippe Mathieu-Daudé a écrit : >> linux-user/flatload.c:740:9: warning: Loss of sign in implicit conversion >> if (res > (unsigned long)-4096) >> ^~~ >> >> Reported-by: Clang Static Analyzer >> Signed-

Re: [Qemu-devel] [PATCH 3/5] Acceptance tests: add quick VNC tests

2018-05-29 Thread Eduardo Habkost
On Fri, May 25, 2018 at 12:27:46PM -0400, Cleber Rosa wrote: > > > On 05/25/2018 01:37 AM, Fam Zheng wrote: > > On Thu, 05/24 20:58, Cleber Rosa wrote: > >> This patch adds a few simple behavior tests for VNC. These tests > >> introduce manipulation of the QEMUMachine arguments, by setting > >>

Re: [Qemu-devel] [PATCH for 2.10 21/35] arm/sysbus-fdt: fix null pointer dereference

2018-05-29 Thread Philippe Mathieu-Daudé
Hi Eric, On 07/24/2017 06:57 PM, Eric Blake wrote: > On 07/24/2017 04:52 PM, Eric Blake wrote: >> On 07/24/2017 04:48 PM, Philippe Mathieu-Daudé wrote: >>> On 07/24/2017 06:09 PM, Peter Maydell wrote: On 24 July 2017 at 19:27, Philippe Mathieu-Daudé wrote: > Use error_report() + exit() i

Re: [Qemu-devel] [Qemu-block] [PATCH 03/14] job: Add error message for failing jobs

2018-05-29 Thread Jeff Cody
On Fri, May 25, 2018 at 06:33:16PM +0200, Kevin Wolf wrote: > So far we relied on job->ret and strerror() to produce an error message > for failed jobs. Not surprisingly, this tends to result in completely > useless messages. > > This adds a Job.error field that can contain an error string for a >

Re: [Qemu-devel] [Qemu-arm] [PATCH v4 2/2] arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR

2018-05-29 Thread Peter Maydell
On 25 May 2018 at 12:22, Shannon Zhao wrote: > While we skip the GIC_INTERNAL irqs, we don't change the register offset > accordingly. This will overlap the GICR registers value and leave the > last GIC_INTERNAL irq's registers out of update. > > Fix this by skipping the registers banked by GICR.

Re: [Qemu-devel] [Qemu-block] [PATCH 01/14] vdi: Fix vdi_co_do_create() return value

2018-05-29 Thread Jeff Cody
On Fri, May 25, 2018 at 06:33:14PM +0200, Kevin Wolf wrote: > .bdrv_co_create() is supposed to return 0 on success, but vdi could > return a positive value instead. Fix this. > > Signed-off-by: Kevin Wolf > --- > block/vdi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/vdi.c b

Re: [Qemu-devel] [Qemu-block] [PATCH 02/14] vhdx: Fix vhdx_co_create() return value

2018-05-29 Thread Jeff Cody
On Fri, May 25, 2018 at 06:33:15PM +0200, Kevin Wolf wrote: > .bdrv_co_create() is supposed to return 0 on success, but vhdx could > return a positive value instead. Fix this. > > Signed-off-by: Kevin Wolf > --- > block/vhdx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --g

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-29 Thread Richard W.M. Jones
On Tue, May 29, 2018 at 11:14:11AM -0300, Eduardo Habkost wrote: > On Tue, May 29, 2018 at 03:03:16PM +0100, Dr. David Alan Gilbert wrote: > > * Richard W.M. Jones (rjo...@redhat.com) wrote: > > > On Fri, May 18, 2018 at 06:09:56PM +0100, Daniel P. Berrangé wrote: > > > > The closest to a cross-hyp

Re: [Qemu-devel] [Bug 1404278] Re: tap connections not working on windows host

2018-05-29 Thread timsoft
i'll check with a more recent version and report back On 22/05/2018 14:33, Thomas Huth wrote: > Looking through old bug tickets... can you still reproduce this issue > with the latest version of QEMU? Or could we close this ticket nowadays? > > ** Changed in: qemu > Status: New => Incomple

Re: [Qemu-devel] [PATCH v7 1/3] qmp: adding 'wakeup-suspend-support' in query-target

2018-05-29 Thread Eduardo Habkost
On Mon, May 28, 2018 at 09:23:54AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: [...] > > [1] Doing a: > > $ git grep 'STR.*machine, "' > > on libvirt source is enough to find some code demonstrating where > > query-machines is already lacking today: [...] > How can we get from this

Re: [Qemu-devel] [PATCH v1] xlnx-zdma: Correct mem leaks and memset to zero on desc unaligned errors

2018-05-29 Thread Peter Maydell
On 28 May 2018 at 19:48, Francisco Iglesias wrote: > Coverity found that the string return by 'object_get_canonical_path' was not > being freed at two locations in the model (CID 1391294 and CID 1391293) and > also that a memset was being called with a value greater than the max of a > byte > on

Re: [Qemu-devel] [PATCH 3/5] Acceptance tests: add quick VNC tests

2018-05-29 Thread Cleber Rosa
On 05/29/2018 10:32 AM, Eduardo Habkost wrote: > On Fri, May 25, 2018 at 12:27:46PM -0400, Cleber Rosa wrote: >> >> >> On 05/25/2018 01:37 AM, Fam Zheng wrote: >>> On Thu, 05/24 20:58, Cleber Rosa wrote: This patch adds a few simple behavior tests for VNC. These tests introduce manipu

Re: [Qemu-devel] [PATCH v7 0/5] virtio-balloon: free page hint reporting support

2018-05-29 Thread Hailiang Zhang
On 2018/4/24 14:13, Wei Wang wrote: This is the deivce part implementation to add a new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device receives the guest free page hints from the driver and clears the corresponding bits in the dirty bitmap, so that those free pa

Re: [Qemu-devel] [PATCH 0/8] block: more byte-based cleanups: vectored I/O

2018-05-29 Thread Eric Blake
On 05/28/2018 06:19 AM, Kevin Wolf wrote: Am 25.04.2018 um 20:32 hat Eric Blake geschrieben: Based-on: <20180424192506.149089-1-ebl...@redhat.com> ([PATCH v2 0/6] block: byte-based AIO read/write) Based-on: <20180424220157.177385-1-ebl...@redhat.com> ([PATCH] block: Merge .bdrv_co_writev{, _flag

Re: [Qemu-devel] [PATCH 2/8] qcow: Switch get_cluster_offset to be byte-based

2018-05-29 Thread Eric Blake
On 05/28/2018 05:52 AM, Kevin Wolf wrote: Am 25.04.2018 um 20:32 hat Eric Blake geschrieben: We are gradually moving away from sector-based interfaces, towards byte-based. Make the change for the internal helper function get_cluster_offset(), by changing n_start and n_end to by byte offsets rat

Re: [Qemu-devel] [PATCH 3/8] qcow: Switch qcow_co_readv to byte-based calls

2018-05-29 Thread Eric Blake
On 05/28/2018 06:04 AM, Kevin Wolf wrote: Am 25.04.2018 um 20:32 hat Eric Blake geschrieben: We are gradually moving away from sector-based interfaces, towards byte-based. Make the change for the internals of the qcow driver read function, by iterating over offset/bytes instead of sector_num/nb

Re: [Qemu-devel] [RFC PATCH] hw/misc/unimp: Add create_unimplemented_subregion_device()

2018-05-29 Thread Peter Maydell
On 28 May 2018 at 07:11, Philippe Mathieu-Daudé wrote: > The create_unimplemented_device() function is very useful to > register unimplemented devices to the SysBus 'absolute' address. > > Some devices are modelled as container of memory subregions, > the subregions being mmio-mapped relatively to

Re: [Qemu-devel] [PATCH 2/8] qcow: Switch get_cluster_offset to be byte-based

2018-05-29 Thread Kevin Wolf
Am 29.05.2018 um 17:03 hat Eric Blake geschrieben: > On 05/28/2018 05:52 AM, Kevin Wolf wrote: > > Am 25.04.2018 um 20:32 hat Eric Blake geschrieben: > > > We are gradually moving away from sector-based interfaces, towards > > > byte-based. Make the change for the internal helper function > > > ge

[Qemu-devel] [PATCH] vfio/pci: Default display option to "off"

2018-05-29 Thread Alex Williamson
Commit a9994687cb9b ("vfio/display: core & wireup") added display support to vfio-pci with the default being "auto", which breaks existing VMs when the vGPU requires GL support but had no previous requirement for a GL compatible configuration. "Off" is the safer default as we impose no new require

Re: [Qemu-devel] [PATCH for 2.10 26/35] linux-user: use is_error() to avoid warnings and make the code clearer

2018-05-29 Thread Laurent Vivier
Le 29/05/2018 à 16:25, Philippe Mathieu-Daudé a écrit : > Hi Laurent, Hi Philippe, > On 07/24/2017 04:16 PM, Laurent Vivier wrote: >> Le 24/07/2017 à 20:27, Philippe Mathieu-Daudé a écrit : >>> linux-user/flatload.c:740:9: warning: Loss of sign in implicit conversion >>> if (res > (unsigned l

Re: [Qemu-devel] [PATCH for 2.10 31/35] syscall: replace strcpy() by g_strlcpy()

2018-05-29 Thread Laurent Vivier
Le 29/05/2018 à 16:19, Philippe Mathieu-Daudé a écrit : > Hi Laurent, > > On 07/24/2017 04:28 PM, Laurent Vivier wrote: >> Le 24/07/2017 à 20:27, Philippe Mathieu-Daudé a écrit : >>> linux-user/syscall.c:9860:17: warning: Call to function 'strcpy' is >>> insecure as it does not provide bounding o

Re: [Qemu-devel] [Qemu-arm] [PATCH v3] aspeed_scu: Implement RNG register

2018-05-29 Thread Peter Maydell
On 29 May 2018 at 05:19, Joel Stanley wrote: > The ASPEED SoCs contain a single register that returns random data when > read. This models that register so that guests can use it. > > The random number data register has a corresponding control register, > however it returns data regardless of the

Re: [Qemu-devel] [PATCH v7 4/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-05-29 Thread Michael S. Tsirkin
On Tue, Apr 24, 2018 at 02:13:47PM +0800, Wei Wang wrote: > The new feature enables the virtio-balloon device to receive hints of > guest free pages from the free page vq. > > balloon_free_page_start - start guest free page hint reporting. > balloon_free_page_stop - stop guest free page hint repor

Re: [Qemu-devel] [PATCH] vfio/pci: Default display option to "off"

2018-05-29 Thread Alex Williamson
[Cc +Erik,libvirt] Sorry, should have cc'd libvirt with this initially since display support is under development. I think "off" is the better compatibility option, but perhaps the damage is done since it was the 2.12 default. Thanks, Alex On Tue, 29 May 2018 09:18:10 -0600 Alex Williamson wr

Re: [Qemu-devel] [PATCH v7 0/5] virtio-balloon: free page hint reporting support

2018-05-29 Thread Michael S. Tsirkin
On Tue, May 29, 2018 at 11:00:21PM +0800, Hailiang Zhang wrote: > On 2018/4/24 14:13, Wei Wang wrote: > > This is the deivce part implementation to add a new feature, > > VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device > > receives the guest free page hints from the driver

Re: [Qemu-devel] [PATCH for 2.10 21/35] arm/sysbus-fdt: fix null pointer dereference

2018-05-29 Thread Eric Blake
[adding Markus, as the error maintainer] On 05/29/2018 09:33 AM, Philippe Mathieu-Daudé wrote: Ok I see, Clang is unaware than error_setg(&error_fatal) is a noreturn. Indeed, and that's because error_setg(&error_fatal) is not in preferred form. Patch dropped. That's a shame. Rather, we

Re: [Qemu-devel] [Qemu-arm] [PATCH] hw/arm/mps2-tz: Put ethernet controller behind PPC

2018-05-29 Thread Peter Maydell
Ping for review? thanks -- PMM On 15 May 2018 at 18:14, Peter Maydell wrote: > The ethernet controller in the AN505 MPC FPGA image is behind > the same AHB Peripheral Protection Controller that handles > the graphics and GPIOs. (In the documentation this is clear > in the block diagram but the

Re: [Qemu-devel] [PATCH] vl.c: Don't zero-initialize statics for serial_hds

2018-05-29 Thread Peter Maydell
Ping for application via qemu-trivial? thanks -- PMM On 26 April 2018 at 15:19, Thomas Huth wrote: > On 26.04.2018 16:02, Peter Maydell wrote: >> checkpatch reminds us that statics shouldn't be zero-initialized: >> >> ERROR: do not initialise statics to 0 or NULL >> #35: FILE: vl.c:157: >> +stat

Re: [Qemu-devel] [PATCH] nbd/server: introduce NBD_CMD_CACHE

2018-05-29 Thread Vladimir Sementsov-Ogievskiy
17.05.2018 16:34, Eric Blake wrote: On 05/17/2018 04:52 AM, Vladimir Sementsov-Ogievskiy wrote: Finally, what about this? 13.04.2018 17:31, Vladimir Sementsov-Ogievskiy wrote: Handle nbd CACHE command. Just do read, without sending read data back. Cache mechanism should be done by exported nod

Re: [Qemu-devel] [Qemu-block] [PATCH 04/14] block/create: Make x-blockdev-create a job

2018-05-29 Thread Jeff Cody
On Fri, May 25, 2018 at 06:33:17PM +0200, Kevin Wolf wrote: > This changes the x-blockdev-create QMP command so that it doesn't block > the monitor and the main loop any more, but starts a background job that > performs the image creation. > This comes down to "user error", but now that the monit

Re: [Qemu-devel] storing machine data in qcow images?

2018-05-29 Thread Dr. David Alan Gilbert
* Eduardo Habkost (ehabk...@redhat.com) wrote: > On Tue, May 29, 2018 at 03:03:16PM +0100, Dr. David Alan Gilbert wrote: > > * Richard W.M. Jones (rjo...@redhat.com) wrote: > > > On Fri, May 18, 2018 at 06:09:56PM +0100, Daniel P. Berrangé wrote: > > > > The closest to a cross-hypervisor standard i

Re: [Qemu-devel] [PATCH v2] ARM: ACPI: Fix use-after-free due to memory realloc

2018-05-29 Thread Shannon Zhao
> 在 2018年5月29日,21:53,Peter Maydell 写道: > >> On 29 May 2018 at 04:08, Shannon Zhao wrote: >> acpi_data_push uses g_array_set_size to resize the memory size. If there >> is no enough contiguous memory, the address will be changed. So previous >> pointer could not be used any more. It must updat

Re: [Qemu-devel] [PATCH] nbd/client: Relax handling of large NBD_CMD_BLOCK_STATUS reply

2018-05-29 Thread Vladimir Sementsov-Ogievskiy
04.05.2018 01:26, Eric Blake wrote: The NBD spec is proposing a relaxation of NBD_CMD_BLOCK_STATUS where a server may have the final extent per context give a length beyond the original request, if it can easily prove that subsequent bytes have the same status, on the grounds that a client can ta

Re: [Qemu-devel] [PATCH] qcow2: Fix Coverity warning when calculating the refcount cache size

2018-05-29 Thread Eric Blake
On 05/28/2018 10:01 AM, Alberto Garcia wrote: MIN_REFCOUNT_CACHE_SIZE is 4 and the cluster size is guaranteed to be at most 2MB, so the minimum refcount cache size (in bytes) is always going to fit in a 32-bit integer. Coverity doesn't know that, and since we're storing the result in a uint64_t

Re: [Qemu-devel] [Qemu-block] [PATCH 04/14] block/create: Make x-blockdev-create a job

2018-05-29 Thread Kevin Wolf
Am 29.05.2018 um 17:27 hat Jeff Cody geschrieben: > On Fri, May 25, 2018 at 06:33:17PM +0200, Kevin Wolf wrote: > > This changes the x-blockdev-create QMP command so that it doesn't block > > the monitor and the main loop any more, but starts a background job that > > performs the image creation. >

Re: [Qemu-devel] [PATCH v4 01/14] memory-device: drop assert related to align and start of address space

2018-05-29 Thread David Hildenbrand
On 29.05.2018 15:27, Igor Mammedov wrote: > On Thu, 17 May 2018 10:15:14 +0200 > David Hildenbrand wrote: > >> The start of the address space does not have to be aligned for the >> search. Handle this case explicitly when starting the search for a new >> address. > That's true, > but commit messa

[Qemu-devel] [Bug 1773753] Re: virsh start, after virsh managed save hangs and vm goes to paused state with qemu version v2.12.0-813-g5a5c383b13-dirty on powerpc

2018-05-29 Thread Fabiano Rosas
I was able to reproduce this with: qemu - v2.12.0-813-g5a5c383 host/guest kernel - 4.11 libvirt - 3.9.0 It bisects to: 36c2f8b migration: Delay start of migration main routines However, the issue did *not* reproduce with: qemu - v2.12.0-865-ge609fa7 host/guest kernel - 4.11 libvirt - 3.9.0

[Qemu-devel] [PATCH v2 0/2] qapi: allow empty branches in flat unions

2018-05-29 Thread Anton Nefedov
since v1: - reworked to always allow empty branches - more types removed in patch 2 v1: http://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg02525.html Anton Nefedov (2): qapi: allow empty branches in flat unions qapi: remove empty flat union branches and types docs/devel/qapi-code-

[Qemu-devel] [PATCH v2 2/2] qapi: remove empty flat union branches and types

2018-05-29 Thread Anton Nefedov
Flat unions may now have uncovered branches, so it is possible to get rid of empty types defined for that purpose only. Signed-off-by: Anton Nefedov --- qapi/block-core.json | 55 qapi/crypto.json | 13 + qapi/misc.json |

Re: [Qemu-devel] [RFC PATCH] hw/misc/unimp: Add create_unimplemented_subregion_device()

2018-05-29 Thread Philippe Mathieu-Daudé
On 05/29/2018 12:08 PM, Peter Maydell wrote: > On 28 May 2018 at 07:11, Philippe Mathieu-Daudé wrote: >> The create_unimplemented_device() function is very useful to >> register unimplemented devices to the SysBus 'absolute' address. >> >> Some devices are modelled as container of memory subregion

[Qemu-devel] [PATCH v2 1/2] qapi: allow empty branches in flat unions

2018-05-29 Thread Anton Nefedov
It often happens that just a few discriminator values imply extra data in a flat union. Existing checks did not make possible to leave other values uncovered. Such cases had to be worked around by either stating a dummy (empty) type or introducing another (subset) discriminator enumeration. Both o

Re: [Qemu-devel] [[Qemu devel] RFC] hw/net: Add Smartfusion2 emac block

2018-05-29 Thread Peter Maydell
On 26 May 2018 at 10:51, Subbaraya Sundeep wrote: > Modelled Ethernet MAC of Smartfusion2 SoC. > Micrel KSZ8051 PHY is present on Emcraft's SOM kit hence same > PHY is emulated. > > Signed-off-by: Subbaraya Sundeep Hi; thanks for this patch. I have some review comments, but they're fairly minor

Re: [Qemu-devel] [Qemu-arm] [PATCH 2/6] ftgmac100: add IEEE 802.1Q VLAN support

2018-05-29 Thread Cédric Le Goater
On 05/29/2018 03:34 PM, Philippe Mathieu-Daudé wrote: > Hi Cédric, > > On 05/29/2018 03:28 AM, Cédric Le Goater wrote: >> The ftgmac100 NIC supports VLAN tag insertion and the MAC engine also >> has a control to remove VLAN tags from received packets. >> >> The VLAN control bits and VLAN tag infor

Re: [Qemu-devel] [Qemu-arm] [PATCH 0/6] ftgmac100 and NC-SI enhancements for the Aspeed SoC

2018-05-29 Thread Cédric Le Goater
On 05/29/2018 02:34 PM, Philippe Mathieu-Daudé wrote: > Hi Cédric, > > On 05/29/2018 03:28 AM, Cédric Le Goater wrote: >> Hello, >> >> Here is a couple of enhancements and fixes for the ftgmac100 NIC used >> on the Aspeed SoC. It includes VLAN and multicast support. >> >> Following is an assorted

Re: [Qemu-devel] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response

2018-05-29 Thread Cédric Le Goater
On 05/29/2018 03:11 PM, Philippe Mathieu-Daudé wrote: > Hi Cédric, > > In title: "Get Parameters" (plural) > > On 05/29/2018 03:28 AM, Cédric Le Goater wrote: >> This is a minimum response to exercise the kernel. > > This type is mandatory in DMTF Standard v1.0.1 indeed (DSP0222). > >> >> Signe

Re: [Qemu-devel] [PATCH v2 00/40] Generic background jobs

2018-05-29 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Hi > > On Tue, May 22, 2018 at 1:01 PM, Kevin Wolf wrote: > > Am 18.05.2018 um 20:41 hat Dr. David Alan Gilbert geschrieben: > >> * Kevin Wolf (kw...@redhat.com) wrote: > >> > Before we can make x-blockdev-create a background job, we need

[Qemu-devel] [PATCH v2 00/20] Drain fixes and cleanups, part 3

2018-05-29 Thread Kevin Wolf
This is the third and hopefully for now last part of my work to fix drain. The main goal of this series is to make drain robust against graph changes that happen in any callbacks of in-flight requests while we drain a block node. The individual patches describe the details, but the rough plan is t

[Qemu-devel] [PATCH v2 01/20] test-bdrv-drain: bdrv_drain() works with cross-AioContext events

2018-05-29 Thread Kevin Wolf
As long as nobody keeps the other I/O thread from working, there is no reason why bdrv_drain() wouldn't work with cross-AioContext events. The key is that the root request we're waiting for is in the AioContext we're polling (which it always is for bdrv_drain()) so that aio_poll() is woken up in th

[Qemu-devel] [PATCH v2 02/20] block: Use bdrv_do_drain_begin/end in bdrv_drain_all()

2018-05-29 Thread Kevin Wolf
bdrv_do_drain_begin/end() implement already everything that bdrv_drain_all_begin/end() need and currently still do manually: Disable external events, call parent drain callbacks, call block driver callbacks. It also does two more things: The first is incrementing bs->quiesce_counter. bdrv_drain_a

[Qemu-devel] [PATCH v2 03/20] block: Remove 'recursive' parameter from bdrv_drain_invoke()

2018-05-29 Thread Kevin Wolf
All callers pass false for the 'recursive' parameter now. Remove it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/io.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/block/io.c b/block/io.c index 73579b31cf..48d4d4df22 100644 --- a/block/i

[Qemu-devel] [PATCH v2 04/20] block: Don't manually poll in bdrv_drain_all()

2018-05-29 Thread Kevin Wolf
All involved nodes are already idle, we called bdrv_do_drain_begin() on them. The comment in the code suggested that this was not correct because the completion of a request on one node could spawn a new request on a different node (which might have been drained before, so we wouldn't drain the ne

[Qemu-devel] [PATCH v2 05/20] tests/test-bdrv-drain: bdrv_drain_all() works in coroutines now

2018-05-29 Thread Kevin Wolf
Since we use bdrv_do_drained_begin/end() for bdrv_drain_all_begin/end(), coroutine context is automatically left with a BH, preventing the deadlocks that made bdrv_drain_all*() unsafe in coroutine context. Now that we even removed the old polling code as dead code, it's obvious that it's compatible

[Qemu-devel] [PATCH v2 12/20] block: Don't poll in parent drain callbacks

2018-05-29 Thread Kevin Wolf
bdrv_do_drained_begin() is only safe if we have a single BDRV_POLL_WHILE() after quiescing all affected nodes. We cannot allow that parent callbacks introduce a nested polling loop that could cause graph changes while we're traversing the graph. Split off bdrv_do_drained_begin_quiesce(), which onl

[Qemu-devel] [PATCH v2 06/20] block: Avoid unnecessary aio_poll() in AIO_WAIT_WHILE()

2018-05-29 Thread Kevin Wolf
Commit 91af091f923 added an additional aio_poll() to BDRV_POLL_WHILE() in order to make sure that all pending BHs are executed on drain. This was the wrong place to make the fix, as it is useless overhead for all other users of the macro and unnecessarily complicates the mechanism. This patch effe

[Qemu-devel] [PATCH v2 13/20] test-bdrv-drain: Graph change through parent callback

2018-05-29 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 130 1 file changed, 130 insertions(+) diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index 4b788e323e..ca7b6a3fdf 100644 --- a/tests/test-bdrv-drain.c +++ b/tests/test-bdrv-d

[Qemu-devel] [PATCH v2 09/20] test-bdrv-drain: Add test for node deletion

2018-05-29 Thread Kevin Wolf
From: Max Reitz This patch adds two bdrv-drain tests for what happens if some BDS goes away during the drainage. The basic idea is that you have a parent BDS with some child nodes. Then, you drain one of the children. Because of that, the party who actually owns the parent decides to (A) delete

[Qemu-devel] [PATCH v2 20/20] test-bdrv-drain: Test graph changes in drain_all section

2018-05-29 Thread Kevin Wolf
This tests both adding and remove a node between bdrv_drain_all_begin() and bdrv_drain_all_end(), and enabled the existing detach test for drain_all. Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 75 +++-- 1 file changed, 73 insertions(+), 2

[Qemu-devel] [PATCH v2 08/20] block: Remove bdrv_drain_recurse()

2018-05-29 Thread Kevin Wolf
For bdrv_drain(), recursively waiting for child node requests is pointless because we didn't quiesce their parents, so new requests could come in anyway. Letting the function work only on a single node makes it more consistent. For subtree drains and drain_all, we already have the recursion in bdr

[Qemu-devel] [PATCH v2 07/20] block: Really pause block jobs on drain

2018-05-29 Thread Kevin Wolf
We already requested that block jobs be paused in .bdrv_drained_begin, but no guarantee was made that the job was actually inactive at the point where bdrv_drained_begin() returned. This introduces a new callback BdrvChildRole.bdrv_drained_poll() and uses it to make bdrv_drain_poll() consider bloc

[Qemu-devel] [PATCH v2 17/20] block: Move bdrv_drain_all_begin() out of coroutine context

2018-05-29 Thread Kevin Wolf
Before we can introduce a single polling loop for all nodes in bdrv_drain_all_begin(), we must make sure to run it outside of coroutine context like we already do for bdrv_do_drained_begin(). Signed-off-by: Kevin Wolf --- block/io.c | 22 +- 1 file changed, 17 insertions(+),

[Qemu-devel] [PATCH v2 18/20] block: ignore_bds_parents parameter for drain functions

2018-05-29 Thread Kevin Wolf
In the future, bdrv_drained_all_begin/end() will drain all invidiual nodes separately rather than whole subtrees. This means that we don't want to propagate the drain to all parents any more: If the parent is a BDS, it will already be drained separately. Recursing to all parents is unnecessary work

[Qemu-devel] [PATCH v2 19/20] block: Allow graph changes in bdrv_drain_all_begin/end sections

2018-05-29 Thread Kevin Wolf
bdrv_drain_all_*() used bdrv_next() to iterate over all root nodes and did a subtree drain for each of them. This works fine as long as the graph is static, but sadly, reality looks different. If the graph changes so that root nodes are added or removed, we would have to compensate for this. bdrv_

<    1   2   3   4   >