Re: [Qemu-devel] [PATCH] Fix default CPU model for ARM64

2015-05-08 Thread Pavel Fedin
Hello! > FWIW virt-manager 1.2.0 (just released) will do the following when creating a > new VM: > > - aarch64 + kvm : -cpu host > - aarch64 + tcg : -cpu cortex-a57 > - arm32 + kvm : -cpu host > - arm32 + tcg : defer to qemu > > Though if you explicitly request 'hypervisor default' then we won'

Re: [Qemu-devel] [PATCH v1 1/1] hw/ptimer: Do not artificially limit timers when using icount

2015-05-08 Thread Edgar E. Iglesias
On Mon, May 04, 2015 at 11:27:36AM +0200, Paolo Bonzini wrote: > > > On 04/05/2015 05:18, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Signed-off-by: Edgar E. Iglesias > > --- > > hw/core/ptimer.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git

Re: [Qemu-devel] [PATCH v4 4/4] spapr_pci: populate ibm,loc-code

2015-05-08 Thread Alexey Kardashevskiy
On 05/07/2015 05:21 PM, Nikunj A Dadhania wrote: Each hardware instance has a platform unique location code. The OF device tree that describes a part of a hardware entity must include the “ibm,loc-code” property with a value that represents the location code for that hardware entity. Populate i

Re: [Qemu-devel] [PATCH] Fix default CPU model for ARM64

2015-05-08 Thread Peter Crosthwaite
On Fri, May 8, 2015 at 12:14 AM, Pavel Fedin wrote: > Hello! > >> FWIW virt-manager 1.2.0 (just released) will do the following when creating a >> new VM: >> >> - aarch64 + kvm : -cpu host >> - aarch64 + tcg : -cpu cortex-a57 >> - arm32 + kvm : -cpu host >> - arm32 + tcg : defer to qemu >> >> Tho

Re: [Qemu-devel] [PULL 05/16] arch_init: Alloc and free data struct for compression

2015-05-08 Thread Juan Quintela
Paolo Bonzini wrote: > On 07/05/2015 18:46, Juan Quintela wrote: >> static CompressParam *comp_param; >> static QemuThread *compress_threads; >> +/* comp_done_cond is used to wake up the migration thread when >> + * one of the compression threads has finished the compression. >> + * comp_done_lo

Re: [Qemu-devel] [PATCH] qemu-nbd: only send a limited number of errno codes on the wire

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 08:45, Markus Armbruster wrote: >> Luckily, most common error values are more or less universal: in >> particular, of all errno values <= 34 (up to ERANGE), they are all >> the same on supported platforms except for 11 (which is EAGAIN on >> Windows and Linux, but EDEADLK on Darwin

Re: [Qemu-devel] [PATCH v6 22/22] hw/arm/virt: Enable dynamic generation of ACPI v5.1 tables

2015-05-08 Thread Shannon Zhao
On 2015/5/8 0:09, Peter Maydell wrote: > On 7 May 2015 at 10:29, Shannon Zhao wrote: >> From: Shannon Zhao >> >> Expose the needed device information to the table generation >> insfrastructure and register a machine_init_done notify to > > "infrastructure". > >> call virt_acpi_build(). >> >> Ad

[Qemu-devel] [PATCH] Add virt-v3 machine that uses GIC-500

2015-05-08 Thread Pavel Fedin
This is an alternative version of: https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg00945.html. Code merged with original "virt" implementation. I decided to stick to different machine name instead of adding an option because of compatibility with libvirt. In order to make use of a new

Re: [Qemu-devel] [PATCH] Fix default CPU model for ARM64

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 09:14, Pavel Fedin wrote: > Hello! > >> FWIW virt-manager 1.2.0 (just released) will do the following when creating a >> new VM: >> >> - aarch64 + kvm : -cpu host >> - aarch64 + tcg : -cpu cortex-a57 >> - arm32 + kvm : -cpu host >> - arm32 + tcg : defer to qemu >> >> Though if you

Re: [Qemu-devel] [PATCH COLO v3 01/14] docs: block replication's description

2015-05-08 Thread Stefan Hajnoczi
On Tue, May 05, 2015 at 04:23:56PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Fri, Apr 24, 2015 at 11:36:35AM +0200, Paolo Bonzini wrote: > > > > > > > > > On 24/04/2015 11:38, Wen Congyang wrote: > > > >> > > > > >> > That can be done with drive

Re: [Qemu-devel] [PATCH] Fix default CPU model for ARM64

2015-05-08 Thread Pavel Fedin
Hello! > Ignoring legacy, the ideal naming scheme would be: > > qemu-system-arm > aarch64-linux-user > aarch32-linux-user You know, i rethought. Actually, the question concerns only "virt" machine, because for other real machines the CPU should be the same as on real HW, and this is no quest

Re: [Qemu-devel] [Qemu-block] [RFC PATCH 0/7] Fix transactional snapshot with virtio-blk dataplane

2015-05-08 Thread Stefan Hajnoczi
On Thu, May 07, 2015 at 02:43:43PM +0100, Stefan Hajnoczi wrote: > On Wed, May 06, 2015 at 07:23:32PM +0800, Fam Zheng wrote: > > Reported by Paolo. > > > > Unlike the iohandler in main loop, iothreads currently process the event > > notifier used as virtio-blk ioeventfd in all nested aio_poll. Th

Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache

2015-05-08 Thread Alberto Garcia
On Fri 24 Apr 2015 03:04:06 PM CEST, Kevin Wolf wrote: >> >> I think it would be nice to have a way to free unused cache >> >> entries after a while. >> > >> > Do you think mmap plus a periodic timer would work? >> > >> > I'm hesitant about changes like this because they make QEMU more >> > compl

[Qemu-devel] [PULL 0/8] s390x: various patches

2015-05-08 Thread Cornelia Huck
The following changes since commit f8340b360b9bc29d48716ba8aca79df2b9544979: hw/ptimer: Do not artificially limit timers when using icount (2015-05-08 17:15:23 +1000) are available in the git repository at: git://github.com/cohuck/qemu tags/s390x-20150508 for you to fetch changes up to

[Qemu-devel] [PULL 2/8] s390-virtio: use common features

2015-05-08 Thread Cornelia Huck
We used to avoid enabling event_idx for virtio-blk devices via s390-virtio, but we now have a workaround in place for guests trying to use the device before setting DRIVER_OK. Therefore, let's add DEFINE_VIRTIO_COMMON_FEATURES to the base device so all devices get those common features - and make s

[Qemu-devel] [PULL 1/8] s390-virtio: Accommodate guests using virtqueues too early

2015-05-08 Thread Cornelia Huck
From: Christian Borntraeger Feature updates are not a synchronuous operation for the legacy s390-virtio transport. This transport syncs the guest feature bits (those from finalize) on the set_status hypercall. Before that qemu thinks that features are zero, which means QEMU will misbehave, e.g. i

[Qemu-devel] [PULL 6/8] s390x/kvm: use ioctl KVM_S390_IRQ for vcpu interrupts

2015-05-08 Thread Cornelia Huck
From: Jens Freimann KVM_S390_INT uses only two parameter fields. This is not enough to pass all required information for certain interrupts. A new ioctl KVM_S390_IRQ is available which allows us to inject all local interrupts as defined in the Principles of Operation. It takes a struct kvm_s390_

[Qemu-devel] [PULL 3/8] s390-virtio: clear {used, avail}_event_idx on reset as well

2015-05-08 Thread Cornelia Huck
From: Christian Borntraeger The old s390-virtio transport clears the vring used/avail indices in the shared area on reset. When we enabled event_idx for virtio-blk, we noticed that this is not enough: We also need to clear the published used/avail event indices, or reboot will fail. Signed-off-b

[Qemu-devel] [PULL 4/8] virtio-ccw: change realization sequence

2015-05-08 Thread Cornelia Huck
virtio-ccw has an odd sequence of realizing devices: first the device-specific relization (net, block, ...), then the generic realization. It feels less odd to have the generic realization callback trigger the device-specific realization instead (and this also matches what virtio-pci does). One th

[Qemu-devel] [PULL 8/8] s390x/kvm: migrate vcpu interrupt state

2015-05-08 Thread Cornelia Huck
From: Jens Freimann This patch adds support to migrate vcpu interrupts. We use ioctl KVM_S390_GET_IRQ_STATE and _SET_IRQ_STATE to get/set the complete interrupt state for a vcpu. Reviewed-by: David Hildenbrand Signed-off-by: Jens Freimann Signed-off-by: Cornelia Huck --- target-s390x/cpu-qom

[Qemu-devel] [PULL 5/8] virtio-ccw: implement ->device_plugged

2015-05-08 Thread Cornelia Huck
Let's move operations that are only valid after the backend has been realized to a ->device_plugged callback, just as virtio-pci does. Also reorder setting up the host feature bits to the sequence used by virtio-pci. While we're at it, also add a ->device_unplugged callback to stop ioeventfd, just

[Qemu-devel] [PATCH COLO v4 00/15] Block replication for continuous checkpoints

2015-05-08 Thread Wen Congyang
Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). Usage: Please refer to docs/block-replication.txt You can get the patch here: https://github.com/wencongyang/qemu-colo/commits/block-replication-v4 You can get the patch with the other COLO

[Qemu-devel] [PULL 7/8] s390x: move fpu regs into a subsection of the vmstate

2015-05-08 Thread Cornelia Huck
From: David Hildenbrand Let's move the floating point registers into a seperate subsection and bump up the version id. This cleans up the current vmstate and will allow for a future extension with vector registers in a compatible way. This patch is based on a patch from Eric Farman. Reviewed-by

[Qemu-devel] [PATCH COLO v4 04/15] block: Parse "backing_reference" option to reference existing BDS

2015-05-08 Thread Wen Congyang
Usage: -drive file=xxx,id=Y, \ -drive file=,id=X,backing_reference.drive_id=Y,backing_reference.hidden-disk.* It will create such backing chain: {virtio-blk dev 'Y'} {virtio-blk dev 'X'} |

[Qemu-devel] [PATCH COLO v4 01/15] docs: block replication's description

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: Yang Hongyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- docs/block-replication.txt | 179 + 1 file changed, 179 insertions(+) create mode 100644 docs/block-replication.txt diff --git a/docs/b

[Qemu-devel] [PATCH COLO v4 07/15] Add new block driver interface to connect/disconnect the remote target

2015-05-08 Thread Wen Congyang
In some cases, we want to connect/disconnect the remote target when we need, not in bdrv_open()/bdrv_close(). Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 24 include/block/block.h | 3 +++ include

[Qemu-devel] [PATCH COLO v4 03/15] Allow creating backup jobs when opening BDS

2015-05-08 Thread Wen Congyang
When opening BDS, we need to create backup jobs for image-fleecing. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Jeff Cody --- block/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/Makefile.objs b/block/Makefile.ob

[Qemu-devel] [PATCH COLO v4 09/15] Introduce a new -drive option to control whether to connect to remote target

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- blockdev.c| 8 include/block/block.h | 1 + qemu-options.hx | 4 3 files changed, 13 insertions(+) diff --git a/blockdev.c b/blockdev.c index 5eaf77e..6839c8f 100644 --- a/blockd

[Qemu-devel] [PATCH COLO v4 02/15] allow writing to the backing file

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 49d472f..8fa4f05 100644 --- a/block.c +++ b/block.c @@ -1051,6 +1051,20 @@ out:

[Qemu-devel] [PATCH COLO v4 11/15] Add new block driver interfaces to control block replication

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Luiz Capitulino Cc: Michael Roth Reviewed-by: Paolo Bonzini --- block.c | 40 include/block/block.h | 5 + include/block/block_int.h | 14 ++

[Qemu-devel] [PATCH COLO v4 06/15] Don't allow a disk use backing reference target

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block.c b/block.c index 35e1a95..15d21da 100644 --- a/block.c +++ b/block.c @@ -1204,6 +1204,14 @@ static int bdrv_open_backing_reference_fil

[Qemu-devel] [PATCH COLO v4 08/15] NBD client: implement block driver interfaces to connect/disconnect NBD server

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/nbd.c | 65 - 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 2176186..0624232 100644 --- a/block

[Qemu-devel] [PATCH COLO v4 05/15] Backup: clear all bitmap when doing block checkpoint

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei Cc: Jeff Cody --- block/backup.c | 13 + blockjob.c | 10 ++ include/block/blockjob.h | 12 3 files changed, 35 insertions(+) diff --git a/block/backup.c b/

[Qemu-devel] [PATCH COLO v4 14/15] quorum: allow ignoring child errors

2015-05-08 Thread Wen Congyang
If the child is not ready, read/write/getlength/flush will return -errno. It is not critical error, and can be ignored: 1. read/write: Just not report the error event. 2. getlength: just ignore it. If all children's getlength return -errno, and be ignored, return -EIO. 3. flush: Just ig

[Qemu-devel] [PATCH COLO v4 12/15] skip nbd_target when starting block replication

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block.c | 12 1 file changed, 12 insertions(+) diff --git a/block.c b/block.c index 54d5b29..a442b5f 100644 --- a/block.c +++ b/block.c @@ -4219,6 +4219,10 @@ void bdrv_start_replication(BlockDrive

[Qemu-devel] [PATCH COLO v4 10/15] NBD client: connect to nbd server later

2015-05-08 Thread Wen Congyang
The secondary qemu starts later than the primary qemu, so we cannot connect to nbd server in bdrv_open(). Introduce a new open flags to control it. Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/nbd.c | 10 ++ 1 file changed, 6 insertions(+),

[Qemu-devel] [PATCH COLO v4 13/15] quorum: implement block driver interfaces for block replication

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/quorum.c | 78 ++ 1 file changed, 78 insertions(+) diff --git a/block/quorum.c b/block/quorum.c index f91ef75..e3c2e46 100644 --- a/block/quorum.c +

[Qemu-devel] [PATCH COLO v4 15/15] Implement new driver for block replication

2015-05-08 Thread Wen Congyang
Signed-off-by: Wen Congyang Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/Makefile.objs | 1 + block/replication.c | 512 2 files changed, 513 insertions(+) create mode 100644 block/replication.c diff --git a/block/Makefil

Re: [Qemu-devel] [PATCH 2/6] watchdog: Add watchdog device diag288 to the sysbus

2015-05-08 Thread Cornelia Huck
On Fri, 17 Apr 2015 09:52:37 +0200 Cornelia Huck wrote: > From: Xu Wang > > A new sysbus device for diag288 watchdog, it monitors the kvm guest > status, and take corresponding actions when it detects that the guest > is not responding. > > Signed-off-by: Xu Wang > Reviewed-by: David Hildenbr

Re: [Qemu-devel] [PULL 00/16] Migration pull request (v2)

2015-05-08 Thread Stefan Hajnoczi
On Thu, May 07, 2015 at 11:40:50PM +0530, Amit Shah wrote: > On (Thu) 07 May 2015 [13:45:26], Peter Maydell wrote: > > On 7 May 2015 at 12:50, Juan Quintela wrote: > > > > > > > > > Hi again > > > > > > For v2 > > > > > > - fix 32bit compilation (as said, compiling for 64bit linux, 64bit > > > w

Re: [Qemu-devel] [PATCH] qemu-nbd: only send a limited number of errno codes on the wire

2015-05-08 Thread Markus Armbruster
Paolo Bonzini writes: > On 08/05/2015 08:45, Markus Armbruster wrote: >>> Luckily, most common error values are more or less universal: in >>> particular, of all errno values <= 34 (up to ERANGE), they are all >>> the same on supported platforms except for 11 (which is EAGAIN on >>> Windows and L

Re: [Qemu-devel] [PATCH COLO v3 01/14] docs: block replication's description

2015-05-08 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Tue, May 05, 2015 at 04:23:56PM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > On Fri, Apr 24, 2015 at 11:36:35AM +0200, Paolo Bonzini wrote: > > > > > > > > > > > > On 24/04/2015 11:38, Wen Congyan

[Qemu-devel] [PATCH] net: Change help text to list -netdev instead of -net by default

2015-05-08 Thread Thomas Huth
Looking at the output of "qemu-system-xxx -help", you easily get the impression that "-net" is the preferred way instead of "-netdev" to specify host network interface, since the "-net" option is omnipresent but the "-netdev" option is only listed as a one-liner at the end. This is ugly since "-net

Re: [Qemu-devel] [PATCH COLO v3 01/14] docs: block replication's description

2015-05-08 Thread Kevin Wolf
Am 08.05.2015 um 10:42 hat Stefan Hajnoczi geschrieben: > On Tue, May 05, 2015 at 04:23:56PM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > On Fri, Apr 24, 2015 at 11:36:35AM +0200, Paolo Bonzini wrote: > > > > > > > > > > > > On 24/04/2015 11:38, We

Re: [Qemu-devel] [PATCH] qemu-nbd: only send a limited number of errno codes on the wire

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 11:32, Markus Armbruster wrote: +/* NBD errors are based on errno numbers, so there is a 1:1 mapping, + * but only a limited set of errno values is specified in the protocol. + * Everything else is squashed to EINVAL. + */ >>> >>> Is the protocol defined anywhere

Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: do lazy allocation of the L2 cache

2015-05-08 Thread Kevin Wolf
Am 08.05.2015 um 11:00 hat Alberto Garcia geschrieben: > On Fri 24 Apr 2015 03:04:06 PM CEST, Kevin Wolf wrote: > > >> >> I think it would be nice to have a way to free unused cache > >> >> entries after a while. > >> > > >> > Do you think mmap plus a periodic timer would work? > >> > > >> > I'm

Re: [Qemu-devel] [PATCH v6 00/22] Generate ACPI v5.1 tables and expose them to guest over fw_cfg on ARM

2015-05-08 Thread Shannon Zhao
Hi Peter, On 2015/5/8 0:34, Peter Maydell wrote: > Hi. I've had a look through these patches now, and sent some mails > for a couple of specific issues. For the rest, this is what I'd > like to see for me to pull this in to target-arm: > Thanks for your review comments. > (1) acks or reviewed-b

[Qemu-devel] [PATCH v2] qemu-nbd: only send a limited number of errno codes on the wire

2015-05-08 Thread Paolo Bonzini
Right now, NBD includes potentially platform-specific error values in the wire protocol. Luckily, most common error values are more or less universal: in particular, of all errno values <= 34 (up to ERANGE), they are all the same on supported platforms except for 11 (which is EAGAIN on Windows and

[Qemu-devel] [RFC v1 PATCH 0/3] cpus: Convert cpu_index into a bitmap

2015-05-08 Thread Bharata B Rao
This patch changes the way cpu_index is handed out to newly created CPUs by tracking the allocted CPUs in a bitmap. More information and the need for this patch is described in patch 2/3 of this series. These generic changes are needed to support CPU hot plug/unplug on PowerPC. cpu_index is alloca

[Qemu-devel] [RFC v1 PATCH 1/3] cpus: Add Error argument to cpu_exec_init()

2015-05-08 Thread Bharata B Rao
Add an Error argument to cpu_exec_init() to let users collect the error. Change all callers to currently pass NULL error argument. This change is needed for the following reasons: - A subsequent commit changes the CPU enumeration logic in cpu_exec_init() resulting in cpu_exec_init() to fail if c

[Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap

2015-05-08 Thread Bharata B Rao
Currently CPUState.cpu_index is monotonically increasing and a newly created CPU always gets the next higher index. The next available index is calculated by counting the existing number of CPUs. This is fine as long as we only add CPUs, but there are architectures which are starting to support CPU

[Qemu-devel] [RFC v1 PATCH 3/3] ppc: Move cpu_exec_init() call to realize function

2015-05-08 Thread Bharata B Rao
Move cpu_exec_init() call from instance_init to realize. This allows any failures from cpu_exec_init() to be handled appropriately. Also add corresponding cpu_exec_exit() call from unrealize. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- target-ppc/translate_init.c | 9 +++-- 1

Re: [Qemu-devel] [PATCH v6 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-05-08 Thread Stefano Stabellini
On Mon, 4 May 2015, Quan Xu wrote: > This patch adds infrastructure for xen front drivers living in qemu, > so drivers don't need to implement common stuff on their own. It's > mostly xenbus management stuff: some functions to access XenStore, > setting up XenStore watches, callbacks on device dis

Re: [Qemu-devel] [PATCH v6 2/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-05-08 Thread Stefano Stabellini
On Mon, 4 May 2015, Quan Xu wrote: > @@ -97,6 +116,7 @@ extern struct XenDevOps xen_kbdmouse_ops; /* > xen_framebuffer.c */ > extern struct XenDevOps xen_framebuffer_ops; /* xen_framebuffer.c */ > extern struct XenDevOps xen_blkdev_ops; /* xen_disk.c*/ > extern struct XenDevO

Re: [Qemu-devel] [PATCH COLO v3 01/14] docs: block replication's description

2015-05-08 Thread Dr. David Alan Gilbert
* Kevin Wolf (kw...@redhat.com) wrote: > Am 08.05.2015 um 10:42 hat Stefan Hajnoczi geschrieben: > > On Tue, May 05, 2015 at 04:23:56PM +0100, Dr. David Alan Gilbert wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > On Fri, Apr 24, 2015 at 11:36:35AM +0200, Paolo Bonzini wrote: >

Re: [Qemu-devel] [PATCH] qemu-nbd: only send a limited number of errno codes on the wire

2015-05-08 Thread Markus Armbruster
Paolo Bonzini writes: > On 08/05/2015 11:32, Markus Armbruster wrote: > +/* NBD errors are based on errno numbers, so there is a 1:1 mapping, > + * but only a limited set of errno values is specified in the protocol. > + * Everything else is squashed to EINVAL. > + */ Is

Re: [Qemu-devel] [PATCH] block: return EPERM on writes or discards to read-only devices

2015-05-08 Thread Stefan Hajnoczi
On Thu, May 07, 2015 at 05:45:48PM +0200, Paolo Bonzini wrote: > This is the behavior in the operating system, for example Linux's > blkdev_write_iter has the following: > > if (bdev_read_only(I_BDEV(bd_inode))) > return -EPERM; > > This does not apply to opening a device

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols

2015-05-08 Thread Kevin Wolf
Am 07.05.2015 um 16:50 hat Paolo Bonzini geschrieben: > On 07/05/2015 16:34, Kevin Wolf wrote: > > Am 07.05.2015 um 16:16 hat Paolo Bonzini geschrieben: > >> > >> > >> On 07/05/2015 16:07, Kevin Wolf wrote: > >>> This is not right for two reasons: The first is that this is > >>> BlockBackend code >

Re: [Qemu-devel] [PATCH v2] qemu-nbd: only send a limited number of errno codes on the wire

2015-05-08 Thread Markus Armbruster
Paolo Bonzini writes: > Right now, NBD includes potentially platform-specific error values in > the wire protocol. > > Luckily, most common error values are more or less universal: in > particular, of all errno values <= 34 (up to ERANGE), they are all the > same on supported platforms except for

Re: [Qemu-devel] [PATCH] block: return EPERM on writes or discards to read-only devices

2015-05-08 Thread Stefan Hajnoczi
On Thu, May 07, 2015 at 05:45:48PM +0200, Paolo Bonzini wrote: > This is the behavior in the operating system, for example Linux's > blkdev_write_iter has the following: > > if (bdev_read_only(I_BDEV(bd_inode))) > return -EPERM; > > This does not apply to opening a device

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 12:08, Kevin Wolf wrote: > Actually, considering all the information in this thread, I'm inclined > that we should change both sides. qemu-nbd because ENOSPC might be what > clients expect by analogy with Linux block devices, even if the > behaviour for accesses beyond the device si

[Qemu-devel] [PATCH] qemu-nbd: return ENOSPC for out-of-range writes

2015-05-08 Thread Paolo Bonzini
This ensures that werror=enospc works fine for NBD-backed devices. Recovery can be done through live snapshots even if the NBD server does not support online resizing. Suggested-by: Kevin Wolf Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini --- nbd.c | 4 ++-- 1 file changed, 2 insertio

Re: [Qemu-devel] [PATCH v2 2/3] virtio-mmio: introduce set_guest_notifiers

2015-05-08 Thread Cornelia Huck
On Fri, 08 May 2015 09:45:00 +0300 Pavel Fedin wrote: > Hello! > > > Hm, weren't there some patches for irqfd on arm? > > Yes, there were. However, they had a design problem by breaking backwards > compatibility > with unmodified virtio. Their idea was to set up one more shared memory area

Re: [Qemu-devel] [PATCH] block: return EPERM on writes or discards to read-only devices

2015-05-08 Thread Stefan Hajnoczi
On Thu, May 07, 2015 at 05:45:48PM +0200, Paolo Bonzini wrote: > This is the behavior in the operating system, for example Linux's > blkdev_write_iter has the following: > > if (bdev_read_only(I_BDEV(bd_inode))) > return -EPERM; > > This does not apply to opening a device

Re: [Qemu-devel] [PATCH v2] qemu-nbd: only send a limited number of errno codes on the wire

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 12:12, Markus Armbruster wrote: >> The corresponding patch to the NBD protocol description can be found at >> http://article.gmane.org/gmane.linux.drivers.nbd.general/3154. [...] >> - EFBIG is part of the universal set of errors, but it is also changed >> to ENOSPC because it is

Re: [Qemu-devel] [PATCH v2 2/3] virtio-mmio: introduce set_guest_notifiers

2015-05-08 Thread Pavel Fedin
Hello! > Yes, I think it makes sense to just pick the low-hanging fruit for > virtio-mmio and wait for pci. Does this mean that my series can be accepted as it is? Since PCI is potentially better solution, MMIO is a low priority in my project, and i have lots of other tasks. This means i unfo

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols

2015-05-08 Thread Kevin Wolf
Am 08.05.2015 um 12:16 hat Paolo Bonzini geschrieben: > On 08/05/2015 12:08, Kevin Wolf wrote: > > If so, the commands seem to be hopelessly underspecified, especially > > with respect to error conditions. And where it says something about > > errors, it doesn't make sense: The server is forbidden

Re: [Qemu-devel] [PATCH v2] qemu-nbd: only send a limited number of errno codes on the wire

2015-05-08 Thread Richard W.M. Jones
On Fri, May 08, 2015 at 12:27:59PM +0200, Paolo Bonzini wrote: > And there are probably other NBD servers around. CCing Rich Jones so > that he can fix nbdkit. Thanks. FWIW currently nbdkit will send any arbitrary errno returned by a system call, and it doesn't do any platform-specific encoding.

[Qemu-devel] [virtio] use virtqueue async

2015-05-08 Thread Catalin Vasile
Can I use a virtqueue asynchronously between guest and backend? By that I mean that any end of the communication channel (virtqueue) can push/pop how much data he wants anytime, without worrying that it will pop a thing that it pushed on the queue, and in fact the other end should have popped it? O

Re: [Qemu-devel] [Qemu-block] [PATCH v3] block/vdi: Use bdrv_flush after metadata updates

2015-05-08 Thread Kevin Wolf
Am 07.05.2015 um 06:04 hat Zhe Qiu geschrieben: > From: phoeagon > > In reference to > b0ad5a455d7e5352d4c86ba945112011dbeadfb8~078a458e077d6b0db262c4b05fee51d01de2d1d2, > metadata writes to qcow2/cow/qcow/vpc/vmdk are all synced prior to > succeeding writes. The justification for these patch

Re: [Qemu-devel] [PATCH v2 2/3] virtio-mmio: introduce set_guest_notifiers

2015-05-08 Thread Cornelia Huck
On Fri, 08 May 2015 13:30:18 +0300 Pavel Fedin wrote: > Hello! > > > Yes, I think it makes sense to just pick the low-hanging fruit for > > virtio-mmio and wait for pci. > > Does this mean that my series can be accepted as it is? Since PCI is > potentially better > solution, MMIO is a low pr

Re: [Qemu-devel] [Qemu-block] [PATCH] vmdk: Fix next_cluster_sector for compressed write

2015-05-08 Thread Kevin Wolf
Am 06.05.2015 um 20:01 hat Max Reitz geschrieben: > On 06.05.2015 14:23, Fam Zheng wrote: > >This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster > >allocation). > > > >Sometimes, write_len could be larger than cluster size, because it > >contains both data and marker. We must a

Re: [Qemu-devel] [Qemu-block] [PATCH] vmdk: Fix overflow if l1_size is 0x20000000

2015-05-08 Thread Kevin Wolf
Am 06.05.2015 um 19:50 hat Max Reitz geschrieben: > On 05.05.2015 11:28, Fam Zheng wrote: > >Richard Jones caught this bug with afl fuzzer. > > > >In fact, that's the only possible value to overflow (extent->l1_size = > >0x2000) l1_size: > > > >l1_size = extent->l1_size * sizeof(long) => 0x8000

Re: [Qemu-devel] [PATCH] qcow2: Flush pending discards before allocating cluster

2015-05-08 Thread Kevin Wolf
Am 06.05.2015 um 13:29 hat Kevin Wolf geschrieben: > Before a freed cluster can be reused, pending discards for this cluster > must be processed. > > The original assumption was that this was not a problem because discards > are only cached during discard/write zeroes operations, which are > synch

[Qemu-devel] eventfd_signal()

2015-05-08 Thread Catalin Vasile
Is eventfd blocking? By that I mean: If I signal the guest for something, will that thread remain blocked till the guest clears the interrupt?

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 12:34, Kevin Wolf wrote: > Am 08.05.2015 um 12:16 hat Paolo Bonzini geschrieben: >> On 08/05/2015 12:08, Kevin Wolf wrote: >>> If so, the commands seem to be hopelessly underspecified, especially >>> with respect to error conditions. And where it says something about >>> errors, it

[Qemu-devel] [Bug 1349972] Re: qcow2-refcount: qemu-io crashes on 'discard' command

2015-05-08 Thread Kevin Wolf
I sent a patch that fixes the original problem that Maria reported. It's hard to say whether this is the same problem as you saw, Sam, but it's quite possible. ** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml,

Re: [Qemu-devel] eventfd_signal()

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 12:58, Catalin Vasile wrote: > Is eventfd blocking? By that I mean: If I signal the guest for > something, will that thread remain blocked till the guest clears the > interrupt? No. If you want that, write 2^64-2 to the eventfd and do a pfd.fd = ... pfd.events = POLLOUT;

Re: [Qemu-devel] eventfd_signal()

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 13:24, Paolo Bonzini wrote: > > > On 08/05/2015 12:58, Catalin Vasile wrote: >> Is eventfd blocking? By that I mean: If I signal the guest for >> something, will that thread remain blocked till the guest clears the >> interrupt? > > No. If you want that, write 2^64-2 to the even

[Qemu-devel] openbios.git mirror on git.qemu.org

2015-05-08 Thread Mark Cave-Ayland
Hi all, I noticed last week that the openbios.git mirror on git.qemu.org hadn't been updated after a commit I made to SVN trunk, and after some investigation work by Stefan it seems that the upstream remote is given as a git:// URL pointing directly to a repository at a 64.62.x.x IP address. This

Re: [Qemu-devel] [PATCH 4/4] block: Include qemu-log.o in block-obj-y

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 13:38, Dimitris Aragiorgis wrote: > Building the QEMU tools fails if we #define DEBUG_BLOCK inside > block/raw-posix.c. This happens because qemu-log.o is missing from > block-obj-y, which causes the link to fail. Fix this. > > Signed-off-by: Dimitris Aragiorgis Let's just remove

[Qemu-devel] [PATCH v3 0/2] semihosting: clean up and add --semihosting-config arg

2015-05-08 Thread Leon Alrae
Hi, This patch series adds "arg=" sub-option to --semihosting-config group. It allows building up a list of input arguments as it can appear multiple times in the command line. This is a flexible solution for creating argc/argv for the guest program (needed by UHI semihosting for example). RFC pat

[Qemu-devel] [PATCH v3 2/2] semihosting: add --semihosting-config arg sub-argument

2015-05-08 Thread Leon Alrae
Add new "arg" sub-argument to the --semihosting-config allowing to pass multiple input argument separately. It is required for example by UHI semihosting to construct argc and argv. Signed-off-by: Leon Alrae --- include/exec/semihost.h | 12 qemu-options.hx | 19

[Qemu-devel] [PATCH v3 1/2] semihosting: create SemihostingConfig structure and semihost.h

2015-05-08 Thread Leon Alrae
Remove semihosting_enabled and semihosting_target and replace them with SemihostingConfig structure containing equivalent fields. The structure is defined in vl.c where it is actually set. Also introduce separate header file include/exec/semihost.h allowing to access semihosting config related stu

Re: [Qemu-devel] [PATCH 3/4] raw-posix: Introduce hdev_is_sg()

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 13:38, Dimitris Aragiorgis wrote: > Until now, an SG device was identified only by checking if its path > started with "/dev/sg". Then, hdev_open() set bs->sg accordingly. > This is very fragile, e.g. it fails with symlinks or relative paths. > We should rely on the actual propertie

Re: [Qemu-devel] [PATCH 1/4] Fix migration in case of scsi-generic

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 13:38, Dimitris Aragiorgis wrote: > During migration, QEMU uses fsync()/fdatasync() on the open file > descriptor for read-write block devices to flush data just before > stopping the VM. > > However, fsync() on a scsi-generic device returns -EINVAL which > causes the migration to

[Qemu-devel] [PULL 19/19] uhci: controller is halted after reset

2015-05-08 Thread Gerd Hoffmann
... and the status register should say so. Fixes "usbus0: controller did not stop" error printed by freebsd. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 64a7d87..3f0ed62 100644

[Qemu-devel] [PULL 12/19] usb: usb-net QOMify

2015-05-08 Thread Gerd Hoffmann
From: Gonglei Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- hw/usb/dev-network.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 9be3a64..743c231 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-netwo

Re: [Qemu-devel] [PATCH 2/4] block: Use bdrv_is_sg() everywhere

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 13:38, Dimitris Aragiorgis wrote: > Instead of checking bs->sg use bdrv_is_sg() consistently throughout > the code. > > Signed-off-by: Dimitris Aragiorgis > --- > block.c |6 +++--- > block/iscsi.c |2 +- > block/raw-posix.c |4 ++-- > 3 files changed, 6

[Qemu-devel] [PULL 00/19] usb: qomify, bugfixes for xhci & uhci.

2015-05-08 Thread Gerd Hoffmann
to staging (2015-05-07 18:22:03 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-usb-20150508-1 for you to fetch changes up to ca5a21c40d95d7a4e26ea0a304fd2cd8ad4e6ae1: uhci: controller is halted after reset (2015-05-08 13:0

[Qemu-devel] [PULL 03/19] Revert "xhci: generate a Transfer Event for each Transfer TRB with the IOC bit set"

2015-05-08 Thread Gerd Hoffmann
This makes xhci generate multiple short packet events in case of multi-trb transfers. Which is wrong. We need to fix this in a different way. This reverts commit aa6857891df614c620e6e9fc4bc4af6e0e49cafd. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 15 +++ 1 file changed,

[Qemu-devel] [PULL 04/19] xhci: fix events for setup trb.

2015-05-08 Thread Gerd Hoffmann
When we find a IOC bit set on a setup trb and therefore queue an event, that should not stop events being generated for following data trbs. So clear the 'reported' flag. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/usb/hcd-xhc

[Qemu-devel] [PULL 02/19] xhci: set timer to retry xfers

2015-05-08 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index ba15ae0..2af3dd6 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -2224,6 +2224,8 @@ static void xhci_kick_ep(XHCIState *xhci, unsigned int

[Qemu-devel] [PULL 07/19] usb: usb-bt QOMify

2015-05-08 Thread Gerd Hoffmann
From: Gonglei Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- hw/usb/dev-bluetooth.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c index 9bf6730..b19ec76 100644 --- a/hw/usb/dev-bluetooth.c +++ b/hw/usb

[Qemu-devel] [PULL 17/19] usb: usb-redir QOMify

2015-05-08 Thread Gerd Hoffmann
From: Gonglei Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 2416de8..242a654 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redir

[Qemu-devel] [PULL 09/19] usb: usb-hub QOMify

2015-05-08 Thread Gerd Hoffmann
From: Gonglei Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hub.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 0482f58..c8c6855 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -41,6 +41,9

[Qemu-devel] [PULL 01/19] usb: fix usb-net segfault

2015-05-08 Thread Gerd Hoffmann
From: Michal Kazior The dev->config pointer isn't set until guest system initializes usb devices (via usb_desc_set_config). However qemu networking can go through some motions prior to that, e.g.: #0 is_rndis (s=0x57261970) at hw/usb/dev-network.c:653 #1 0x5585f723 in usbnet_can_

[Qemu-devel] [PULL 08/19] usb: usb-hid QOMify

2015-05-08 Thread Gerd Hoffmann
From: Gonglei Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hid.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 507c966..2e7dcd9 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/

[Qemu-devel] [PULL 05/19] uhci: QOMify

2015-05-08 Thread Gerd Hoffmann
From: Gonglei Cc: Gerd Hoffmann Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 43 +++ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 327f26d..64a7d87 100644 --- a

[Qemu-devel] [PULL 16/19] usb: usb-wacom-tablet QOMify

2015-05-08 Thread Gerd Hoffmann
From: Gonglei Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- hw/usb/dev-wacom.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 844eafa..c2450e7 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -56,6

  1   2   3   4   >