Re: [Qemu-devel] [for-2.7 PATCH v3 11/15] spapr_drc: Prevent detach racing against attach for CPU DR

2016-06-02 Thread David Gibson
On Thu, May 12, 2016 at 09:18:21AM +0530, Bharata B Rao wrote: > If a CPU is hot removed while hotplug of the same is still in progress, > the guest crashes. Prevent this by ensuring that detach is done only > after attach has completed. > > The existing code already prevents such race for PCI hot

Re: [Qemu-devel] [for-2.7 PATCH v3 09/15] spapr: CPU hotplug support

2016-06-02 Thread David Gibson
On Thu, May 12, 2016 at 09:18:19AM +0530, Bharata B Rao wrote: > Set up device tree entries for the hotplugged CPU core and use the > exising RTAS event logging infrastructure to send CPU hotplug notification > to the guest. > > Signed-off-by: Bharata B Rao Reviewed-by: David Gibson > --- > h

Re: [Qemu-devel] [for-2.7 PATCH v3 10/15] xics, xics_kvm: Handle CPU unplug correctly

2016-06-02 Thread David Gibson
On Thu, May 12, 2016 at 09:18:20AM +0530, Bharata B Rao wrote: > XICS is setup for each CPU during initialization. Provide a routine > to undo the same when CPU is unplugged. While here, move ss->cs management > into xics from xics_kvm since there is nothing KVM specific in it. > Also ensure xics r

Re: [Qemu-devel] [for-2.7 PATCH v3 12/15] spapr: CPU hot unplug support

2016-06-02 Thread David Gibson
On Thu, May 12, 2016 at 09:18:22AM +0530, Bharata B Rao wrote: > Remove the CPU core device by removing the underlying CPU thread devices. > Hot removal of CPU for sPAPR guests is achieved by sending the hot unplug > notification to the guest. Release the vCPU object after CPU hot unplug so > that

Re: [Qemu-devel] [PATCH v2 3/3] q35: allow dynamic sysbus

2016-06-02 Thread Marcel Apfelbaum
On 06/03/2016 09:33 AM, Markus Armbruster wrote: Marcel Apfelbaum writes: Allow adding sysbus devices with -device on Q35. At first Q35 will support only intel-iommu to be added this way, however the command line will support all sysbus devices. Mark with 'cannot_instantiate_with_device_add_

Re: [Qemu-devel] [PATCH v5 20/27] qemu-iotests: 046: Move version detection out from verify_io

2016-06-02 Thread Fam Zheng
On Wed, 05/25 15:23, Max Reitz wrote: > > -verify_io | $QEMU_IO "$TEST_IMG" | _filter_qemu_io > > +if ($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep "compat: 0.10" > > > /dev/null); then > > +# For v2 images, discarded clusters are read from the backing file > > +# Keep the variable empty

[Qemu-devel] Why is "spapr-pci-host-bridge" no-user?

2016-06-02 Thread Markus Armbruster
Commit 09aa9a5 "spapr-pci: enable adding PHB via -device" set cannot_instantiate_with_device_add_yet without also adding a comment explaining why. It is currently the only one lacking such a comment. Let's fix that. Unfortunately, the commit message doesn't tell me (or I'm too dense to understand

Re: [Qemu-devel] [PATCH v3 0/2] Add QEMU support for Intel local MCE

2016-06-02 Thread Haozhong Zhang
On 06/03/16 14:09, Haozhong Zhang wrote: > This is v3 of LMCE patch series. Previous ones can be found at > v2: https://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg01731.html > v1: https://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg01651.html > v0: https://lists.nongnu.org/archi

Re: [Qemu-devel] [PATCH RFC 0/8] cpus: make "-cpu cpux, features" global properties

2016-06-02 Thread David Hildenbrand
> On Thu, Jun 02, 2016 at 10:44:49PM +0200, David Hildenbrand wrote: > > > Current CLI option -cpu cpux,features serves as template > > > for all created cpus of type: cpux. However QEMU parses > > > "features" every time it creates a cpu instance and applies > > > them to it while doing parsing. >

Re: [Qemu-devel] [PATCH v5 19/27] qemu-iotests: 140: Disable image lock for qemu-io access

2016-06-02 Thread Fam Zheng
On Wed, 05/25 15:16, Max Reitz wrote: > On 17.05.2016 09:35, Fam Zheng wrote: > > The VM is still on, the image locking check would complain. > > No, it wouldn't. We are opening an NBD URL that is provided by the VM. > > Even if it would, we are only reading data, so an -r would probably be > bet

Re: [Qemu-devel] [PATCH v2 3/3] q35: allow dynamic sysbus

2016-06-02 Thread Markus Armbruster
Marcel Apfelbaum writes: > Allow adding sysbus devices with -device on Q35. > > At first Q35 will support only intel-iommu to be added this way, > however the command line will support all sysbus devices. > > Mark with 'cannot_instantiate_with_device_add_yet' the ones > causing immediate problems

Re: [Qemu-devel] [PATCH v5 18/27] mirror: Disable image locking on target backing chain

2016-06-02 Thread Fam Zheng
On Tue, 05/24 20:20, Max Reitz wrote: > On 17.05.2016 09:35, Fam Zheng wrote: > > In sync=none the backing image of s->target is s->common.bs, which could > > be exclusively locked, the image locking wouldn't work here. > > Why is the backing image s->common.bs when the bdrv_open() call > explicit

Re: [Qemu-devel] [PATCH 4/4] 9p: switch back to readdir()

2016-06-02 Thread Greg Kurz
On Thu, 2 Jun 2016 15:00:26 -0600 Eric Blake wrote: > On 06/02/2016 02:52 AM, Greg Kurz wrote: > > This patch changes the 9p code to use readdir() again instead of > > readdir_r(), which is deprecated in glibc 2.24. > > > > All the locking was put in place by a previous patch. > > > > Signed-of

Re: [Qemu-devel] [PATCH 4/6 Resend] Vhost-pci RFC: Detailed Description in the Virtio Specification Format

2016-06-02 Thread Wang, Wei W
On Thu 6/2/2016 7:13 PM, Xiao Guangrong wrote: > On 06/02/2016 04:43 PM, Wang, Wei W wrote: > > On Thu 6/2/2016 11:52 AM, Xiao Guangrong wrote: > >> On 06/02/2016 11:15 AM, Wang, Wei W wrote: > >>> On Wed 6/1/2016 4:15 PM, Xiao Guangrong wrote: > On 05/29/2016 04:11 PM, Wei Wang wrote: >

Re: [Qemu-devel] [PATCH] scsi-disk: fix reads from scsi-disk devices

2016-06-02 Thread xiaoqiang zhao
在 2016年06月03日 13:17, Mark Cave-Ayland 写道: Commit fcaafb1001b9c42817714dd3b2aadcfdb997b53d accidentally broke reads from scsi-disk devices when being updated from its original form to use the new byte-based block functions. Add the extra missing sector to offset conversion in order to restore re

[Qemu-devel] [PATCH v3 0/2] Add QEMU support for Intel local MCE

2016-06-02 Thread Haozhong Zhang
This is v3 of LMCE patch series. Previous ones can be found at v2: https://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg01731.html v1: https://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg01651.html v0: https://lists.nongnu.org/archive/html/qemu-devel/2015-12/msg01498.html Changes

[Qemu-devel] [PATCH v3 2/2] target-i386: add migration support for Intel LMCE

2016-06-02 Thread Haozhong Zhang
LMCE is disabled by default, but a cpu option 'lmce=on/off' is provided to enable/disable it. Migration is only allowed between VCPUs with the same lmce option. Signed-off-by: Haozhong Zhang --- Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Boris Pet

[Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support

2016-06-02 Thread Haozhong Zhang
This patch adds the support to inject SRAR and SRAO as LMCE, i.e. they will be injected to only one VCPU rather than broadcast to all VCPUs. As KVM reports LMCE support on Intel platforms, this features is only available on Intel platforms. Signed-off-by: Ashok Raj Signed-off-by: Haozhong Zhang

Re: [Qemu-devel] [PATCH 4/7] scsi-disk: introduce dma_readv and dma_writev

2016-06-02 Thread xiaoqiang zhao
在 2016年06月03日 13:22, Mark Cave-Ayland 写道: On 03/06/16 03:56, xiaoqiang zhao wrote: 在 2016年06月02日 03:07, Mark Cave-Ayland 写道: On 23/05/16 13:54, Paolo Bonzini wrote: These are replacements for blk_aio_preadv and blk_aio_pwritev that allow customization of the data path. They reuse the DM

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-06-02 Thread Greg Kurz
On Fri, 3 Jun 2016 11:16:04 +1000 David Gibson wrote: > On Thu, Jun 02, 2016 at 06:04:37PM +0200, Greg Kurz wrote: > > On Wed, 1 Jun 2016 12:33:28 +1000 > > David Gibson wrote: > > > > > On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: > > > > > > > > > > > > On 31/05/2016 1

[Qemu-devel] [RFC PATCH v1 2/3] spapr: Remove alignment gap b/n RAM and hotplug regions

2016-06-02 Thread Bharata B Rao
Let the alignment b/n RAM and memory hotplug region be equal to LMB size (256MB) so that there is no gap b/n RAM and hotplug region. This new alignment is true for only pseries-2.7 onwards and the older machine types continue to have the earlier 1GB alignment. Suggested-by: David Gibson Signed-of

Re: [Qemu-devel] [virtio-comment] [PATCH 5/6 Resend] Vhost-pci RFC: Future Security Enhancement

2016-06-02 Thread Wang, Wei W
On Thu 6/2/2016 5:27 PM, Jan Kiszka wrote: > On 2016-05-31 10:00, Wang, Wei W wrote: > > On Mon 5/30/2016 2:24 PM, Jan Kiszka Wrote: > >> On 2016-05-29 10:11, Wei Wang wrote: > >>> Signed-off-by: Wei Wang > >>> --- > >>> FutureWorks | 21 + > >>> 1 file changed, 21 insertions(

[Qemu-devel] [RFC PATCH v1 1/3] spapr: Introduce pseries-2.7 machine type

2016-06-02 Thread Bharata B Rao
Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 44e401a..30b9731 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2344,18 +2344,36 @@ static const TypeInfo spapr_m

[Qemu-devel] [RFC PATCH v1 0/3] spapr: Work around the memory hotplug failure with DDW

2016-06-02 Thread Bharata B Rao
Memory hotplug can fail when upcoming, yet-to-be-upstreamed, 2.7 feature DDW is enabled. This happens due to a guest kernel bug which results in DDW code in QEMU obtaining incorrect value of max possible memory address. This incorrect max mem value results in incorrect DDW size which later causes h

[Qemu-devel] [RFC PATCH v1 3/3] spapr: spapr: Work around the memory hotplug failure with DDW

2016-06-02 Thread Bharata B Rao
Memory hotplug can fail for some combinations of RAM and maxmem when DDW is enabled in the presence of devices like nec-usb-xhci. DDW depends on maximum addressable memory returned by guest and this value is currently being calculated wrongly by the guest kernel routine memory_hotplug_max(). While

Re: [Qemu-devel] [for-2.7 PATCH v3 08/15] spapr: convert boot CPUs into CPU core devices

2016-06-02 Thread David Gibson
On Thu, May 12, 2016 at 09:18:18AM +0530, Bharata B Rao wrote: > Introduce sPAPRMachineClass.dr_cpu_enabled to indicate support for > CPU core hotplug. Initialize boot time CPUs as core deivces and prevent > topologies that result in partially filled cores. Both of these are done > only if CPU core

Re: [Qemu-devel] [for-2.7 PATCH v3 07/15] spapr: Abstract CPU core device and type specific core devices

2016-06-02 Thread David Gibson
On Thu, May 12, 2016 at 09:18:17AM +0530, Bharata B Rao wrote: > Add sPAPR specific abastract CPU core device that is based on generic > CPU core device. Use this as base type to create sPAPR CPU specific core > devices. > > TODO: > - Add core types for other remaining CPU types > - Handle CPU mod

Re: [Qemu-devel] [PATCH 4/7] scsi-disk: introduce dma_readv and dma_writev

2016-06-02 Thread Mark Cave-Ayland
On 03/06/16 03:56, xiaoqiang zhao wrote: > 在 2016年06月02日 03:07, Mark Cave-Ayland 写道: >> On 23/05/16 13:54, Paolo Bonzini wrote: >> >>> >These are replacements for blk_aio_preadv and blk_aio_pwritev that >>> allow >>> >customization of the data path. They reuse the DMA helpers' DMAIOFunc >>> >call

[Qemu-devel] [PATCH] scsi-disk: fix reads from scsi-disk devices

2016-06-02 Thread Mark Cave-Ayland
Commit fcaafb1001b9c42817714dd3b2aadcfdb997b53d accidentally broke reads from scsi-disk devices when being updated from its original form to use the new byte-based block functions. Add the extra missing sector to offset conversion in order to restore read functionality. Signed-off-by: Mark Cave-Ay

Re: [Qemu-devel] [for-2.7 PATCH v3 06/15] cpu: Abstract CPU core type

2016-06-02 Thread David Gibson
On Thu, Jun 02, 2016 at 03:12:09PM -0300, Eduardo Habkost wrote: > On Thu, Jun 02, 2016 at 01:38:58PM +1000, David Gibson wrote: > > On Thu, May 12, 2016 at 09:18:16AM +0530, Bharata B Rao wrote: > > > Add an abstract CPU core type that could be used by machines that want > > > to define and hotplu

Re: [Qemu-devel] [for-2.7 PATCH v3 05/15] qdev: hotplug: Introduce HotplugHandler.pre_plug() callback

2016-06-02 Thread David Gibson
On Thu, Jun 02, 2016 at 11:32:13AM +0200, Igor Mammedov wrote: > On Thu, 2 Jun 2016 11:15:44 +1000 > David Gibson wrote: > > > On Thu, May 12, 2016 at 09:18:15AM +0530, Bharata B Rao wrote: > > > From: Igor Mammedov > > > > > > pre_plug callback is to be called before device.realize() is > > >

[Qemu-devel] [PATCH v5 08/10] block: BdrvDirtyBitmap serialization interface

2016-06-02 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy Several functions to provide necessary access to BdrvDirtyBitmap for block-migration.c Signed-off-by: Vladimir Sementsov-Ogievskiy [Add the "finish" parameters. - Fam] Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 37 +++

[Qemu-devel] [PATCH v5 02/10] HBitmap: Introduce "meta" bitmap to track bit changes

2016-06-02 Thread Fam Zheng
Upon each bit toggle, the corresponding bit in the meta bitmap will be set. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 2 +- include/qemu/hbitmap.h | 17 + util/hbitmap.c | 69 +++--- 3 files chan

[Qemu-devel] [PATCH v5 10/10] block: More operations for meta dirty bitmap

2016-06-02 Thread Fam Zheng
Callers can create an iterator of meta bitmap with bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on it. Meta iterators are also counted by bitmap->active_iterators. Also add a couple of functions to retrieve granularity and count. Signed-off-by: Fam Zheng Reviewed-by: Max

[Qemu-devel] [PATCH v5 05/10] block: Add two dirty bitmap getters

2016-06-02 Thread Fam Zheng
For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng Reviewed-by: John Snow --- block/dirty-bitmap.c | 10 ++ include/block/dirty-bitmap.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/block/dirty-bitmap.c b/block/dirty-bi

[Qemu-devel] [PATCH v5 07/10] hbitmap: serialization

2016-06-02 Thread Fam Zheng
From: Vladimir Sementsov-Ogievskiy Functions to serialize / deserialize(restore) HBitmap. HBitmap should be saved to linear sequence of bits independently of endianness and bitmap array element (unsigned long) size. Therefore Little Endian is chosen. These functions are appropriate for dirty bit

[Qemu-devel] [PATCH v5 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-06-02 Thread Fam Zheng
We use a loop over bs->dirty_bitmaps to make sure the caller is only releasing a bitmap owned by bs. Let's also assert that in this case the caller is releasing a bitmap that does exist. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bloc

[Qemu-devel] [PATCH v5 04/10] block: Support meta dirty bitmap

2016-06-02 Thread Fam Zheng
The added group of operations enables tracking of the changed bits in the dirty bitmap. Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 52 include/block/dirty-bitmap.h | 9 2 files changed, 61 insertions(+) diff --git a/block/d

[Qemu-devel] [PATCH v5 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-06-02 Thread Fam Zheng
HBitmap is an implementation detail of block dirty bitmap that should be hidden from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying HBitmapIter. A small difference in the interface is, before, an HBitmapIter is initialized in place, now the new BdrvDirtyBitmapIter must be dyn

[Qemu-devel] [PATCH v5 09/10] tests: Add test code for hbitmap serialization

2016-06-02 Thread Fam Zheng
Acked-by: John Snow Signed-off-by: Fam Zheng --- tests/test-hbitmap.c | 139 +++ 1 file changed, 139 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index c00c2b5..8f64941 100644 --- a/tests/test-hbitmap.c +++ b/tests/test-h

[Qemu-devel] [PATCH v5 00/10] Dirty bitmap changes for migration/persistence work

2016-06-02 Thread Fam Zheng
v5: Rebase: first 5 patches from last revision are already merged. Addressed Max's comments: 01: - "block.c" -> "block/dirty-bitmap.c" in commit message. - "an BdrvDirtyBitmapIter" -> "an BdrvDirtyBitmapIter" in code comment. - hbitmap_next => next_dirty as variable name.

[Qemu-devel] [PATCH v5 03/10] tests: Add test code for meta bitmap

2016-06-02 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: John Snow --- tests/test-hbitmap.c | 116 +++ 1 file changed, 116 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index abe1427..c00c2b5 100644 --- a/tests/test-hbitmap.c +++ b/tests/tes

Re: [Qemu-devel] [QEMU PATCH v2] target-i386: Add Skylake-Client CPU model

2016-06-02 Thread Xiao Guangrong
On 05/23/2016 09:46 PM, Paolo Bonzini wrote: On 20/05/2016 23:39, Eduardo Habkost wrote: Introduce Skylake-Client CPU model, which inherits the features from Broadwell and supports some additional features that are: MPX, XSAVEC, and XGETBV1. Signed-off-by: Eduardo Habkost Signed-off-by: Xi

[Qemu-devel] [Bug 1588591] [NEW] Qemu 2.6 Solaris 8 Sparc telnet terminate itself

2016-06-02 Thread Zhen Ning Lim
Public bug reported: With Qemu 2.6, Solaris 8 can be installed and run. However, it sometimes terminate itself with I/O thread spun for 1000 iterations. qemu-system-sparc -nographic -monitor null -serial mon:telnet:0.0.0.0:3000,server -hda ./Sparc8.disk -m 256 -boot c -net nic,macaddr=52:54:0:1

Re: [Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
On 06/03/2016 10:13 AM, Changlong Xie wrote: On 06/03/2016 09:45 AM, Eric Blake wrote: On 06/02/2016 07:26 PM, Changlong Xie wrote: + +ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT, 0660, errp); This does not look right, it looks like it's going to open the file to write t

Re: [Qemu-devel] [PATCH v2 0/2] AVX2 configure fixes

2016-06-02 Thread Li, Liang Z
> Cc: amit.s...@redhat.com > Subject: [PATCH v2 0/2] AVX2 configure fixes > > From: "Dr. David Alan Gilbert" > > Hi, > This pair of patches fixes a couple of issues that we found during test. > The first is that the configure test is pessimistic when compiled with -O2, > the > second is that

Re: [Qemu-devel] [PATCH 4/7] scsi-disk: introduce dma_readv and dma_writev

2016-06-02 Thread xiaoqiang zhao
在 2016年06月02日 03:07, Mark Cave-Ayland 写道: On 23/05/16 13:54, Paolo Bonzini wrote: >These are replacements for blk_aio_preadv and blk_aio_pwritev that allow >customization of the data path. They reuse the DMA helpers' DMAIOFunc >callback type, so that the same function can be used in either t

Re: [Qemu-devel] [PATCH v2] raw-posix: Fetch max sectors for host block device

2016-06-02 Thread Fam Zheng
On Thu, 06/02 20:42, Eric Blake wrote: > On 06/02/2016 08:07 PM, Fam Zheng wrote: > > This is sometimes a useful value we should count in. > > > > Signed-off-by: Fam Zheng > > --- > > block/raw-posix.c | 24 > > 1 file changed, 24 insertions(+) > > > > Will conflict wi

Re: [Qemu-devel] [PATCH v2] raw-posix: Fetch max sectors for host block device

2016-06-02 Thread Eric Blake
On 06/02/2016 08:07 PM, Fam Zheng wrote: > This is sometimes a useful value we should count in. > > Signed-off-by: Fam Zheng > --- > block/raw-posix.c | 24 > 1 file changed, 24 insertions(+) > Will conflict with patches I'm about to post to rework BlockLimits to be by

Re: [Qemu-devel] [PATCH v4 09/15] block: Support meta dirty bitmap

2016-06-02 Thread Fam Zheng
On Fri, 03/11 16:17, Max Reitz wrote: > On 08.03.2016 05:45, Fam Zheng wrote: > > The added group of operations enables tracking of the changed bits in > > the dirty bitmap. > > > > Signed-off-by: Fam Zheng > > --- > > block/dirty-bitmap.c | 52 > > ++

Re: [Qemu-devel] [PATCH v4 08/15] tests: Add test code for meta bitmap

2016-06-02 Thread Fam Zheng
On Fri, 03/11 15:58, Max Reitz wrote: > > +/* Test "unset" -> "set" will update meta */ > > +hbitmap_set(data->hb, start, count); > > +hbitmap_check_meta(data, check_start, check_count); > > + > > +/* Test "set" -> "set" will not update meta */ > > +hbitmap_reset_all(data->meta)

Re: [Qemu-devel] [PATCH v4 00/15] Dirty bitmap changes for migration/persistence work

2016-06-02 Thread Fam Zheng
On Thu, 06/02 18:49, John Snow wrote: > > > On 06/02/2016 07:43 AM, Vladimir Sementsov-Ogievskiy wrote: > > Hi, what are the plans? > > > > I'm not sure. Fam, part of this series was merged, wasn't it? > > Do you have outstanding work that you'd like me to take over and push > through for you?

Re: [Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
On 06/03/2016 09:45 AM, Eric Blake wrote: On 06/02/2016 07:26 PM, Changlong Xie wrote: + +ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT, 0660, errp); This does not look right, it looks like it's going to open the file to write to it. You probably want O_RDONLY, also I don't

[Qemu-devel] [PATCH v2] raw-posix: Fetch max sectors for host block device

2016-06-02 Thread Fam Zheng
This is sometimes a useful value we should count in. Signed-off-by: Fam Zheng --- block/raw-posix.c | 24 1 file changed, 24 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index a4f5a1b..32f9596 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@

Re: [Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
On 06/02/2016 11:14 PM, Anthony PERARD wrote: On Thu, Jun 02, 2016 at 06:36:46PM +0800, Changlong Xie wrote: +void qmp_xen_load_devices_state(const char *filename, Error **errp) +{ +QEMUFile *f; +QIOChannelFile *ioc; +int ret; + +/* Guest must be paused before loading the device

Re: [Qemu-devel] [QEMU RFC PATCH v3 1/6] Migration: Defined VMStateDescription struct for spapr_drc

2016-06-02 Thread David Gibson
On Thu, Jun 02, 2016 at 05:28:45PM -0700, Jianjun Duan wrote: > > > On 06/01/2016 09:07 PM, David Gibson wrote: > > On Tue, May 31, 2016 at 11:02:39AM -0700, Jianjun Duan wrote: > >> To manage hotplug/unplug of dynamic resources such as PCI cards, > >> memory, and CPU on sPAPR guests, a firmware

Re: [Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Eric Blake
On 06/02/2016 07:26 PM, Changlong Xie wrote: >>> + >>> +ioc = qio_channel_file_new_path(filename, O_WRONLY | O_CREAT, >>> 0660, errp); >> >> This does not look right, it looks like it's going to open the file >> to write to it. You probably want O_RDONLY, also I don't think the >> O_CREAT flag

Re: [Qemu-devel] [PATCH 1/2] raw-posix: Fetch max sectors for host block device from sysfs

2016-06-02 Thread Fam Zheng
On Thu, 06/02 14:54, Kevin Wolf wrote: > Also a quick search on the internet suggests that the BLKSECTGET ioctl > is what we're looking for, so hopefully using sysfs is unnecessary > anyway. Oops! Looks like something went terribly wrong with my "quick search", will post v2. Thanks! Fam

Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing

2016-06-02 Thread Fam Zheng
On Thu, 06/02 16:13, Eduardo Habkost wrote: > On Wed, Jun 01, 2016 at 05:45:12PM +0800, Fam Zheng wrote: > [...] > > + > > +CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.) > > +# Makes the definition constant after the first expansion > > +DOCKER_SRC_COPY = $(eval DOCKER_SRC_COPY := > > docker-s

Re: [Qemu-devel] [PATCH v5 1/1] Introduce "xen-load-devices-state"

2016-06-02 Thread Changlong Xie
On 06/02/2016 11:14 PM, Anthony PERARD wrote: On Thu, Jun 02, 2016 at 06:36:46PM +0800, Changlong Xie wrote: +void qmp_xen_load_devices_state(const char *filename, Error **errp) +{ +QEMUFile *f; +QIOChannelFile *ioc; +int ret; + +/* Guest must be paused before loading the device

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-06-02 Thread David Gibson
On Thu, Jun 02, 2016 at 06:04:37PM +0200, Greg Kurz wrote: > On Wed, 1 Jun 2016 12:33:28 +1000 > David Gibson wrote: > > > On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: > > > > > > > > > On 31/05/2016 15:10, Greg Kurz wrote: > > > >>> > > +#if defined(TARGET_PPC64) || defined

Re: [Qemu-devel] [RFC PATCH v0 0/2] Increase max memslots to 512 for PowerPC

2016-06-02 Thread David Gibson
On Thu, Jun 02, 2016 at 07:37:37PM +0530, Bharata B Rao wrote: > On Thu, Jun 02, 2016 at 09:03:15AM +0200, Thomas Huth wrote: > > On 02.06.2016 06:39, Bharata B Rao wrote: > > ... > > > Agreed. Here is the updated patch: > > > > > > spapr: Increase hotpluggable memory slots to 256 > > > > > > Fro

Re: [Qemu-devel] [RFC v2 PATCH 01/13] Introduce TCGOpcode for memory barrier

2016-06-02 Thread Richard Henderson
On 06/02/2016 02:37 PM, Sergey Fedorov wrote: On 03/06/16 00:18, Richard Henderson wrote: On 06/02/2016 01:38 PM, Sergey Fedorov wrote: On 02/06/16 23:36, Richard Henderson wrote: On 06/02/2016 09:30 AM, Sergey Fedorov wrote: I think we need to extend TCG load/store instruction attributes to

[Qemu-devel] [PATCH 8/9] target-avr: adding instruction translation

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/translate-inst.c | 2511 +++ target-avr/translate.h | 123 +++ 2 files changed, 2634 insertions(+) create mode 100644 target-avr/translate-inst.c create mode 100644 target-avr/translate.h diff --git a/ta

[Qemu-devel] [PATCH 9/9] target-avr: updating translate.c to use instructions translation

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/Makefile.objs | 4 +- target-avr/translate.c | 132 --- 2 files changed, 59 insertions(+), 77 deletions(-) diff --git a/target-avr/Makefile.objs b/target-avr/Makefile.objs index c503546..8d06d54 100644 -

[Qemu-devel] [PATCH 4/9] target-avr: adding instructions encodings

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/translate-inst.h | 838 1 file changed, 838 insertions(+) create mode 100644 target-avr/translate-inst.h diff --git a/target-avr/translate-inst.h b/target-avr/translate-inst.h new file mode 100644 index 00

[Qemu-devel] [PATCH 5/9] target-avr: adding AVR interrupt handling

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/helper.c | 64 - 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/target-avr/helper.c b/target-avr/helper.c index fbab91d..bb47a87 100644 --- a/target-avr/helper.c +++ b/target-avr/helper

[Qemu-devel] [PATCH 1/9] target-avr: AVR cores support is added. 1. basic CPU structure 2. registers 3. no instructions

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- arch_init.c | 2 + configure | 5 + default-configs/avr-softmmu.mak | 1 + disas/Makefile.objs | 1 + disas/avr.c | 10 ++ include/disas/bfd.h | 7 + include/sysemu/a

[Qemu-devel] [PATCH 7/9] target-avr: adding instruction decoder

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/decode.c | 724 1 file changed, 724 insertions(+) create mode 100644 target-avr/decode.c diff --git a/target-avr/decode.c b/target-avr/decode.c new file mode 100644 index 000..b846f1d --- /dev/

[Qemu-devel] [PATCH 3/9] target-avr: adding a sample AVR board

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- hw/Makefile.objs | 1 + hw/avr/Makefile.objs | 1 + hw/avr/sample-io.c | 217 +++ hw/avr/sample.c | 118 4 files changed, 337 insertions(+) create mode 100644 hw/avr/Make

[Qemu-devel] [PATCH 6/9] target-avr: adding helpers for IN, OUT, SLEEP, WBR & unsupported instructions

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/helper.c | 117 +++- target-avr/helper.h | 5 +++ 2 files changed, 111 insertions(+), 11 deletions(-) diff --git a/target-avr/helper.c b/target-avr/helper.c index bb47a87..b93589a 100644 --- a/target-a

[Qemu-devel] [PATCH 2/9] target-avr: adding AVR CPU features/flavors

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/cpu.c | 311 ++- target-avr/cpu.h | 59 +++ 2 files changed, 368 insertions(+), 2 deletions(-) diff --git a/target-avr/cpu.c b/target-avr/cpu.c index cfc1aee..97653c5 100644 --- a/target-avr

[Qemu-devel] AVR cores

2016-06-02 Thread Michael Rolnik
This series of patches adds 8bit AVR cores to QEMU. All instruction, except BREAK/DES/SPM/SPMX, are implemented. Not fully tested yet. However I was able to execute simple code with functions. e.g fibonacci calculation. This series of patches include a non real, sample board. No fuses support yet

Re: [Qemu-devel] [PULL V4 00/31] Net patches

2016-06-02 Thread Fam Zheng
On Thu, 06/02 13:05, Eric Blake wrote: > On 06/02/2016 12:09 PM, Dmitry Fleytman wrote: > > > > > The build did not pass because of tracepoint e1000e_rx_rss_ip6 which failed > > to compile. > > > > This tracepoint has 11 parameters, when 1 parameter is removed build > > succeeds. > > Could it

Re: [Qemu-devel] [QEMU RFC PATCH v3 1/6] Migration: Defined VMStateDescription struct for spapr_drc

2016-06-02 Thread Jianjun Duan
On 06/01/2016 09:07 PM, David Gibson wrote: > On Tue, May 31, 2016 at 11:02:39AM -0700, Jianjun Duan wrote: >> To manage hotplug/unplug of dynamic resources such as PCI cards, >> memory, and CPU on sPAPR guests, a firmware abstraction known as >> a Dynamic Resource Connector (DRC) is used to assi

Re: [Qemu-devel] [PATCH v2 0/8] virtio-blk: multiqueue support

2016-06-02 Thread Stefan Hajnoczi
On Mon, May 30, 2016 at 06:25:58PM -0700, Stefan Hajnoczi wrote: > v2: > * Simplify s->rq live migration [Paolo] > * Use more efficient bitmap ops for batch notification [Paolo] > * Fix perf regression due to batch notify BH in wrong AioContext [Christian] > > The virtio_blk guest driver has su

Re: [Qemu-devel] [PATCH RFC 0/8] cpus: make "-cpu cpux, features" global properties

2016-06-02 Thread Eduardo Habkost
On Thu, Jun 02, 2016 at 10:44:49PM +0200, David Hildenbrand wrote: > > Current CLI option -cpu cpux,features serves as template > > for all created cpus of type: cpux. However QEMU parses > > "features" every time it creates a cpu instance and applies > > them to it while doing parsing. > > > > Th

Re: [Qemu-devel] [PATCH 10/10] target-avr: fixing code style

2016-06-02 Thread Peter Maydell
On 2 June 2016 at 21:07, Michael Rolnik wrote: > Signed-off-by: Michael Rolnik > --- > target-avr/cpu-qom.h| 38 + > target-avr/cpu.c| 100 > +--- > target-avr/cpu.h| 74 >

Re: [Qemu-devel] [PATCH v4 00/15] Dirty bitmap changes for migration/persistence work

2016-06-02 Thread John Snow
On 06/02/2016 07:43 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi, what are the plans? > I'm not sure. Fam, part of this series was merged, wasn't it? Do you have outstanding work that you'd like me to take over and push through for you? --js > On 26.05.2016 03:47, Fam Zheng wrote: >> On Wed,

Re: [Qemu-devel] [PULL V4 00/31] Net patches

2016-06-02 Thread Peter Maydell
On 2 June 2016 at 19:38, Dmitry Fleytman wrote: > From lttng/tracepoint.h: > > … > > /* > * TP_ARGS takes tuples of type, argument separated by a comma. > * It can take up to 10 tuples (which means that less than 10 tuples is > * fine too). > * Each tuple is also separated by a comma. > */ >

Re: [Qemu-devel] [RFC v2 PATCH 01/13] Introduce TCGOpcode for memory barrier

2016-06-02 Thread Sergey Fedorov
On 03/06/16 00:18, Richard Henderson wrote: > On 06/02/2016 01:38 PM, Sergey Fedorov wrote: >> On 02/06/16 23:36, Richard Henderson wrote: >>> On 06/02/2016 09:30 AM, Sergey Fedorov wrote: I think we need to extend TCG load/store instruction attributes to provide information about guest o

Re: [Qemu-devel] [RFC v2 PATCH 01/13] Introduce TCGOpcode for memory barrier

2016-06-02 Thread Richard Henderson
On 06/02/2016 01:38 PM, Sergey Fedorov wrote: On 02/06/16 23:36, Richard Henderson wrote: On 06/02/2016 09:30 AM, Sergey Fedorov wrote: I think we need to extend TCG load/store instruction attributes to provide information about guest ordering requirements and leave this TCG operation only for

Re: [Qemu-devel] [libvirt] [PATCH] target-i386: Remove xlevel & hv-spinlocks option fixups

2016-06-02 Thread Eric Blake
On 06/02/2016 10:55 AM, Eduardo Habkost wrote: > The "fixup will be removed in future versions" warnings are > present since QEMU 1.7.0, at least, so users should have fixed > their scripts and configurations, already. > > In the case of libvirt users, libvirt doesn't use the "xlevel" > option, an

Re: [Qemu-devel] [PATCH 4/4] 9p: switch back to readdir()

2016-06-02 Thread Eric Blake
On 06/02/2016 02:52 AM, Greg Kurz wrote: > This patch changes the 9p code to use readdir() again instead of > readdir_r(), which is deprecated in glibc 2.24. > > All the locking was put in place by a previous patch. > > Signed-off-by: Greg Kurz > --- > +++ b/hw/9pfs/codir.c > @@ -17,8 +17,7 @@

[Qemu-devel] [Bug 1588328] Re: Qemu 2.6 Solaris 9 Sparc Segmentation Fault

2016-06-02 Thread Mark Cave-Ayland
That basically looks like it should work. The only time I've seen random segfaults similar to this is with a corrupted disk, so the first question to ask is whether you've verified the ISO image you are using? Unfortunately this isn't an image I currently have access to, but I can report my Solaris

Re: [Qemu-devel] [PATCH 3/4] 9p: add locking to V9fsDir

2016-06-02 Thread Eric Blake
On 06/02/2016 02:52 AM, Greg Kurz wrote: > If several threads call concurrently readdir() with the same directory s/call concurrently/concurrently call/ > stream pointer, it is possible that they all get a pointer to the same > dirent structure, whose content is overwritten each time readdir() is

Re: [Qemu-devel] [PATCH] sdl2: skip init without outputs

2016-06-02 Thread Cole Robinson
On 06/01/2016 10:08 AM, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > ui/sdl2.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/ui/sdl2.c b/ui/sdl2.c > index 909038f..30d2a3c 100644 > --- a/ui/sdl2.c > +++ b/ui/sdl2.c > @@ -794,6 +794,9 @@ void sdl_display_init(DisplayS

Re: [Qemu-devel] [PATCH RFC 0/8] cpus: make "-cpu cpux, features" global properties

2016-06-02 Thread David Hildenbrand
> Current CLI option -cpu cpux,features serves as template > for all created cpus of type: cpux. However QEMU parses > "features" every time it creates a cpu instance and applies > them to it while doing parsing. > > That doesn't work well with -device/device_add infrastructure > as it has no idea

Re: [Qemu-devel] [RFC v2 PATCH 01/13] Introduce TCGOpcode for memory barrier

2016-06-02 Thread Sergey Fedorov
On 02/06/16 23:36, Richard Henderson wrote: > On 06/02/2016 09:30 AM, Sergey Fedorov wrote: >> I think we need to extend TCG load/store instruction attributes to >> provide information about guest ordering requirements and leave this TCG >> operation only for explicit barrier instruction translatio

Re: [Qemu-devel] [RFC v2 PATCH 08/13] tcg/s390: Add support for fence

2016-06-02 Thread Richard Henderson
On 06/02/2016 12:31 PM, Sergey Fedorov wrote: On 31/05/16 21:39, Pranith Kumar wrote: Cc: Alexander Graf Signed-off-by: Richard Henderson Signed-off-by: Pranith Kumar --- tcg/s390/tcg-target.inc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s3

Re: [Qemu-devel] [RFC v2 PATCH 01/13] Introduce TCGOpcode for memory barrier

2016-06-02 Thread Richard Henderson
On 06/02/2016 09:30 AM, Sergey Fedorov wrote: I think we need to extend TCG load/store instruction attributes to provide information about guest ordering requirements and leave this TCG operation only for explicit barrier instruction translation. I do not agree. I think separate barriers are m

Re: [Qemu-devel] [RFC v2 PATCH 01/13] Introduce TCGOpcode for memory barrier

2016-06-02 Thread Richard Henderson
On 06/02/2016 11:42 AM, Pranith Kumar wrote: Yes, I am working on adding flag argument to the TCG MemOp which indicates this. Please don't. I don't think this is the right way to go. r~

Re: [Qemu-devel] [PATCH RFC 0/2] enable iommu with -device

2016-06-02 Thread Marcel Apfelbaum
On 05/31/2016 04:44 AM, Peter Xu wrote: On Mon, May 30, 2016 at 05:14:15PM +0300, Marcel Apfelbaum wrote: On 05/30/2016 04:43 PM, Peter Xu wrote: On Mon, May 23, 2016 at 05:01:28PM +0300, Marcel Apfelbaum wrote: This is a proposal on how to create the iommu with '-device intel-iommu' instead o

Re: [Qemu-devel] [RFC v1 04/12] atomic: introduce atomic_dec_fetch.

2016-06-02 Thread Sergey Fedorov
On 15/04/16 17:23, Alex Bennée wrote: > Useful for counting down. > > Signed-off-by: Alex Bennée Reviewed-by: Sergey Fedorov > --- > include/qemu/atomic.h | 4 > 1 file changed, 4 insertions(+) > > diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h > index 8f1d8d9..5dba7db 100644

[Qemu-devel] [PATCH] linux-user: check if NETLINK_ROUTE is available

2016-06-02 Thread Laurent Vivier
Some IFLA_* symbols can be missing in the host linux/if_link.h, but as they are enums and not "#defines", check in "configure" if last known (IFLA_PROTO_DOWN) is available and if not, disable management of NETLINK_ROUTE protocol. Signed-off-by: Laurent Vivier --- Note: This patch must be appl

[Qemu-devel] [PATCH v2 3/3] q35: allow dynamic sysbus

2016-06-02 Thread Marcel Apfelbaum
Allow adding sysbus devices with -device on Q35. At first Q35 will support only intel-iommu to be added this way, however the command line will support all sysbus devices. Mark with 'cannot_instantiate_with_device_add_yet' the ones causing immediate problems (e.g. crashes). Signed-off-by: Marcel

[Qemu-devel] [PATCH 05/10] target-avr: adding AVR interrupt handling

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/helper.c | 64 - 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/target-avr/helper.c b/target-avr/helper.c index aec37af..ed22b37 100644 --- a/target-avr/helper.c +++ b/target-avr/helper

Re: [Qemu-devel] [PATCH] tests: start a /qga/guest-exec test

2016-06-02 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2016-05-24 08:48:41) > From: Marc-André Lureau > > Test a few guest-exec guest agent commands, added in qemu 2.5. > > Signed-off-by: Marc-André Lureau > --- > tests/test-qga.c | 70 > > 1 file change

[Qemu-devel] [PATCH v2 2/3] hw/iommu: enable iommu with -device

2016-06-02 Thread Marcel Apfelbaum
Use the standard '-device iommu' instead of '-machine,iommu=on' to create the IOMMU device. Signed-off-by: Marcel Apfelbaum --- hw/core/machine.c | 20 hw/i386/intel_iommu.c | 17 + hw/pci-host/q35.c | 28 qemu-options.hx

[Qemu-devel] [PATCH 08/10] target-avr: adding instruction translation

2016-06-02 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- target-avr/translate-inst.c | 2443 +++ target-avr/translate.h | 123 +++ 2 files changed, 2566 insertions(+) create mode 100644 target-avr/translate-inst.c create mode 100644 target-avr/translate.h diff --git a/ta

  1   2   3   4   >