Re: [Qemu-devel] [Bug 1392504] Re: USB Passthrough is not working anymore

2014-11-14 Thread Gonglei
On 2014/11/14 19:57, Leen Keus wrote: > Command lines generated by virsh from the libvirt xml files (let me know if > you also need the xml configuration files): > Does this below patch fix your problem? http://git.qemu.org/?p=qemu.git;a=commitdiff;h=79ae25af1569a50a0ec799901a1bb280c088f121 R

Re: [Qemu-devel] [PATCH v2 3/4] raw-posix: Fix try_seek_hole()'s handling of SEEK_DATA failure

2014-11-14 Thread Eric Blake
On 11/14/2014 06:12 AM, Markus Armbruster wrote: >> 0-length file: >> lseek(fd, 0, SEEK_HOLE) => -1 ENXIO >> lseek(fd, 0, SEEK_DATA) => -1 ENXIO >> conclusion: 0 is at EOF > > Isn't this a special case of the next one? > >> file of any size: >> lseek(fd, size_or_larger, SEEK_HOLE) => -1 ENXIO >>

Re: [Qemu-devel] [PATCH 0/3] apic: ExtINT fixes for QNX

2014-11-14 Thread Richard Bilson
I've been testing these against our entire kernel regression suite. While they definitely fix the original problems, there is one test that now hangs. I'm going to have to get to the bottom of that failure before I can sign off. ___

[Qemu-devel] [PATCH] target-ppc: Altivec's mtvscr Decodes Wrong Register

2014-11-14 Thread Tom Musta
The Move to Vector Status and Control Register (mtvscr) instruction uses VRB as the source register. Fix the code generator to correctly decode the VRB field. That is, use "rB(ctx->opcode)" instead of "rD(ctx->opcode)". Signed-off-by: Tom Musta --- target-ppc/translate.c |2 +- 1 files cha

Re: [Qemu-devel] [RFC PATCH] virtio-mmio: support for multiple irqs

2014-11-14 Thread Pawel Moll
On Thu, 2014-11-13 at 09:39 +, Shannon Zhao wrote: > When we use only virtio-mmio or vhost-net without irqfd, the device uses > qemu_set_irq(within qemu) > to inject interrupt and at the same time qemu update > "VIRTIO_MMIO_INTERRUPT_STATUS" to tell guest > driver whom this interrupt to. All

Re: [Qemu-devel] [PATCH 2.3 0/8] Linked list for tcg ops

2014-11-14 Thread Bastian Koppelmann
On 11/11/2014 04:24 PM, Richard Henderson wrote: Richard Henderson (8): tcg: Move some opcode generation functions out of line tcg: Reduce ifdefs in tcg-op.c tcg: Move emit of INDEX_op_end into gen_tb_end tcg: Introduce tcg_op_buf_count and tcg_op_buf_full tcg: Put opcodes in a li

Re: [Qemu-devel] [PATCH 2.3 2/8] tcg: Reduce ifdefs in tcg-op.c

2014-11-14 Thread Bastian Koppelmann
On 11/11/2014 04:24 PM, Richard Henderson wrote: Almost completely eliminates the ifdefs in this file, improving confidence in the lesser used 32-bit builds. Signed-off-by: Richard Henderson --- tcg/tcg-op.c | 449 +++ 1 file changed,

Re: [Qemu-devel] [PATCH 2.3 1/8] tcg: Move some opcode generation functions out of line

2014-11-14 Thread Bastian Koppelmann
On 11/11/2014 04:24 PM, Richard Henderson wrote: Some of these functions are really quite large. We have a number of things that ought to be circularly dependent, but we duplicated code to break that chain for the inlines. This saved 25% of the code size of one of the translators I examined.

Re: [Qemu-devel] State of ARM FIQ in Qemu

2014-11-14 Thread Greg Bellows
On 14 November 2014 09:34, Tim Sander wrote: > > > > 0xbfffe000? You where talking about the fact that the security > > > > extensions > > > > where not implemented. I was not aware that the different vbar's > where > > > > already part of the security stuff? > > > > > > MVBAR is part of the Secu

[Qemu-devel] [Bug 1392504] Re: USB Passthrough is not working anymore

2014-11-14 Thread Paolo Bonzini
Yes, it is valid. libvirt is disabling the automagic UHCI controller, which makes sense since he is using XHCI. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1392504 Title: USB Passthrough is not w

[Qemu-devel] [Bug 1392504] Re: USB Passthrough is not working anymore

2014-11-14 Thread Iggy
At first glance I see "-machine pc-1.2,accel=kvm,usb=off" and then "-device nec-usb-xhci,id=usb,bus=pci.0,addr=0x5"... I'm not sure if those should be used together. Can you look in your libvirt logs from before the upgrade to see if it was using the usb=off option before? @kraxel-redhat do you k

Re: [Qemu-devel] [RFC 0/4] qdev: Simplify property registration/walking

2014-11-14 Thread Paolo Bonzini
On 13/11/2014 19:05, Eduardo Habkost wrote: > This series is an attempt to simplify the way properties are added to classes, > and the way code walks the list of properties for a device class. > > Now instead of requiring code to manually check the parent classes, the > property lists are automa

Re: [Qemu-devel] State of ARM FIQ in Qemu

2014-11-14 Thread Tim Sander
> > > 0xbfffe000? You where talking about the fact that the security > > > extensions > > > where not implemented. I was not aware that the different vbar's where > > > already part of the security stuff? > > > > MVBAR is part of the Security extensions. HVBAR is part of the > > Virtualization ext

Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification"

2014-11-14 Thread Markus Armbruster
Paolo Bonzini writes: > On 14/11/2014 15:21, Markus Armbruster wrote: >> qdev properties can easily use object_gen_new_property_name() instead, >> as shown in PATCH 3/4. >> >> So can memory regions [PATCH 2/4], but only because we clumsily arrayify >> all of them, by appending "[*]" in memory_re

Re: [Qemu-devel] [PATCH 00/12] qcow2: Add new overlap check functions

2014-11-14 Thread Max Reitz
On 2014-11-03 at 18:04, Max Reitz wrote: As has been requested, this series adds new overlap check functions to the qcow2 code. My local branch is called "qcow2-improved-overlap-v1", but I am not so sure whether it is actually an improvement; that is left for you to decide, dear reviewers. See p

Re: [Qemu-devel] [PATCH 2.3 8/8] tcg: Remove unused opcodes

2014-11-14 Thread Richard Henderson
On 11/14/2014 04:31 PM, Bastian Koppelmann wrote: > > On 11/11/2014 04:24 PM, Richard Henderson wrote: >> diff --git a/tci.c b/tci.c >> index 4711ee4..28292b3 100644 >> --- a/tci.c >> +++ b/tci.c >> @@ -506,19 +506,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t >> *tb_ptr) >>

Re: [Qemu-devel] [PATCH 2.3 7/8] tcg: Implement insert_op_before

2014-11-14 Thread Richard Henderson
On 11/14/2014 04:25 PM, Bastian Koppelmann wrote: > > On 11/11/2014 04:24 PM, Richard Henderson wrote: >> Rather reserving space in the op stream for optimization, >> let the optimizer add ops as necessary. >> >> Signed-off-by: Richard Henderson >> --- >> tcg/optimize.c | 57 >> +++

Re: [Qemu-devel] [PATCH 2.3 8/8] tcg: Remove unused opcodes

2014-11-14 Thread Bastian Koppelmann
On 11/11/2014 04:24 PM, Richard Henderson wrote: diff --git a/tci.c b/tci.c index 4711ee4..28292b3 100644 --- a/tci.c +++ b/tci.c @@ -506,19 +506,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) tb_ptr += 2; switch (opc) { -case INDEX_op_end: -

Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification"

2014-11-14 Thread Paolo Bonzini
On 14/11/2014 15:21, Markus Armbruster wrote: > qdev properties can easily use object_gen_new_property_name() instead, > as shown in PATCH 3/4. > > So can memory regions [PATCH 2/4], but only because we clumsily arrayify > all of them, by appending "[*]" in memory_region_init(). > > Some day, w

Re: [Qemu-devel] [PATCH 2.3 7/8] tcg: Implement insert_op_before

2014-11-14 Thread Bastian Koppelmann
On 11/11/2014 04:24 PM, Richard Henderson wrote: Rather reserving space in the op stream for optimization, let the optimizer add ops as necessary. Signed-off-by: Richard Henderson --- tcg/optimize.c | 57 +++-- tcg/tcg-op.c | 16

Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification"

2014-11-14 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/11/2014 15:34, Markus Armbruster wrote: >> -... "bla" ... >> +char *name = object_gen_new_property_name(obj, "bla"); >> +... name ... >> +g_free(name); >> >> Not quite as mechanical, in particular finding the obj to pass to >> object_gen_new_property

Re: [Qemu-devel] [PATCH 2.3 6/8] tcg: Remove opcodes instead of noping them out

2014-11-14 Thread Bastian Koppelmann
On 11/11/2014 04:24 PM, Richard Henderson wrote: With the linked list scheme we need not leave nops in the stream that we need to process later. Signed-off-by: Richard Henderson --- tcg/optimize.c | 14 +++--- tcg/tcg.c | 28 tcg/tcg.h | 1 +

Re: [Qemu-devel] [PATCH 2.3 5/8] tcg: Put opcodes in a linked list

2014-11-14 Thread Bastian Koppelmann
On 11/11/2014 04:24 PM, Richard Henderson wrote: +static void tcg_gen_op_begin(TCGContext *ctx, TCGOpcode opc, int args) +{ +int oi = ctx->gen_next_op_idx; +int ni = oi + 1; +int pi = oi - 1; + +tcg_debug_assert(oi < OPC_BUF_SIZE); +ctx->gen_last_op_idx = oi; +ctx->gen_ne

Re: [Qemu-devel] [PATCH v2 0/4] Add TriCore RCPW, RCRR, RCRW, RLC and RCR instructions

2014-11-14 Thread Richard Henderson
On 11/13/2014 06:12 PM, Bastian Koppelmann wrote: > Hi, > > this patch depends on the previous TriCore patches > (https://patchwork.ozlabs.org/patch/405459/) and will hopefully end up in 2.3 > QEMU. > Other than adding the RCPW, RCRR, RCRW, RLC and RCR instructions, it cleans > up how ISA versi

Re: [Qemu-devel] [PATCH v2 4/4] target-tricore: Add instructions of RCR opcode format

2014-11-14 Thread Richard Henderson
On 11/13/2014 06:12 PM, Bastian Koppelmann wrote: > +tcg_gen_ext_i32_i64(t3, r3); > +tcg_gen_concat_i32_i64(t2, r2_low, r2_high); > +/* extend the sign for r2 to high 64 bits */ > +tcg_gen_sari_i64(t4, t2, 63); > +tcg_gen_ext_i32_i64(t1, r1); > + > +tcg_gen_muls2_i64(t1, t3,

Re: [Qemu-devel] [PATCH v2 2/3] iotests: _filter_qmp for pretty JSON output

2014-11-14 Thread Eric Blake
On 11/14/2014 02:02 AM, Max Reitz wrote: > _filter_qmp should be able to correctly filter out the QMP version > object for pretty JSON output. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/common.filter | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tests

Re: [Qemu-devel] [PULL for-2.2 0/2] Xen tree 2014-11-14

2014-11-14 Thread Peter Maydell
On 14 November 2014 11:29, Stefano Stabellini wrote: > The following changes since commit c52e67924fbdadfa00668248f5c075542943c54c: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2014-11-13 15:44:16 +) > > are available in the git repository at: > > >

[Qemu-devel] [PATCH v2 21/21] iotests: Add test for different refcount widths

2014-11-14 Thread Max Reitz
Add a test for conversion between different refcount widths and errors specific to certain widths (i.e. snapshots with refcount_width=1). Signed-off-by: Max Reitz --- tests/qemu-iotests/112 | 252 + tests/qemu-iotests/112.out | 131

[Qemu-devel] [PATCH v2 20/21] qcow2: Point to amend function in check

2014-11-14 Thread Max Reitz
If a reference count is not representable with the current refcount order, the image check should point to qemu-img amend for increasing the refcount order. However, qemu-img amend needs write access to the image which cannot be provided if the image is marked corrupt; and the image check will not

Re: [Qemu-devel] [PATCH v2 3/4] raw-posix: Fix try_seek_hole()'s handling of SEEK_DATA failure

2014-11-14 Thread Markus Armbruster
Eric Blake writes: > On 11/13/2014 08:29 AM, Eric Blake wrote: > lseek() with SEEK_DATA starting in a hole when there is no data until EOF is actually the part that isn't documented in the man page, but ENXIO is what I'm seeing here on RHEL 7. >>> >>> Here's the (proposed) POSIX wo

[Qemu-devel] [PATCH v2 13/21] block: Add opaque value to the amend CB

2014-11-14 Thread Max Reitz
Add an opaque value which is to be passed to the bdrv_amend_options() status callback. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block.c | 4 ++-- block/qcow2-cluster.c | 14 -- block/qcow2.c | 9 + block/qcow2.h |

[Qemu-devel] [PATCH v2 16/21] qcow2: Split upgrade/downgrade paths for amend

2014-11-14 Thread Max Reitz
If the image version should be upgraded, that is the first we should do; if it should be downgraded, that is the last we should do. So split the version change block into an upgrade part at the start and a downgrade part at the end. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qco

[Qemu-devel] [PATCH v2 19/21] qcow2: Invoke refcount order amendment function

2014-11-14 Thread Max Reitz
Make use of qcow2_change_refcount_order() to support changing the refcount order with qemu-img amend. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/block/qcow2.

[Qemu-devel] [PATCH v2 09/21] qcow2: Open images with refcount order != 4

2014-11-14 Thread Max Reitz
No longer refuse to open images with a different refcount entry width than 16 bits; only reject images with a refcount width larger than 64 bits (which is prohibited by the specification). Signed-off-by: Max Reitz --- block/qcow2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) d

[Qemu-devel] [PATCH v2 18/21] qcow2: Add function for refcount order amendment

2014-11-14 Thread Max Reitz
Add a function qcow2_change_refcount_order() which allows changing the refcount order of a qcow2 image. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 457 + block/qcow2.h | 4 + 2 files changed, 461 insertions(+) diff --git a/bl

[Qemu-devel] [PATCH v2 05/21] qcow2: Refcount overflow and qcow2_alloc_bytes()

2014-11-14 Thread Max Reitz
qcow2_alloc_bytes() may reuse a cluster multiple times, in which case the refcount is increased accordingly. However, if this would lead to an overflow the function should instead just not reuse this cluster and allocate a new one. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow

[Qemu-devel] [PATCH v2 17/21] qcow2: Use intermediate helper CB for amend

2014-11-14 Thread Max Reitz
If there is more than one time-consuming operation to be performed for qcow2_amend_options(), we need an intermediate CB which coordinates the progress of the individual operations and passes the result to the original status callback. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/

[Qemu-devel] [PATCH v2 15/21] qcow2: Use abort() instead of assert(false)

2014-11-14 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index e82120c..423af48 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2718,9 +2718,9 @@ static int qcow2_amend_options(Bloc

[Qemu-devel] [PATCH v2 08/21] qcow2: More helpers for refcount modification

2014-11-14 Thread Max Reitz
Add helper functions for getting and setting refcounts in a refcount array for any possible refcount order, and choose the correct one during refcount initialization. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 146 - 1 file changed, 144

[Qemu-devel] [PATCH v2 14/21] qcow2: Use error_report() in qcow2_amend_options()

2014-11-14 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.c | 14 ++ tests/qemu-iotests/061.out | 14 +++--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index d084485..e82120c 100644 --- a/block/qcow2.c ++

[Qemu-devel] [PATCH v2 10/21] qcow2: refcount_order parameter for qcow2_create2

2014-11-14 Thread Max Reitz
Add a refcount_order parameter to qcow2_create2(), use that value for the image header and for calculating the size required for preallocation. For now, always pass 4. Signed-off-by: Max Reitz --- block/qcow2.c | 41 ++--- 1 file changed, 30 insertions(+), 11

[Qemu-devel] [PATCH v2 03/21] qcow2: Use 64 bits for refcount values

2014-11-14 Thread Max Reitz
Refcounts may have a width of up to 64 bits, so qemu should use the same width to represent refcount values internally. Since for instance qcow2_get_refcount() signals an error by returning a negative value, refcount values are generally signed to be able to represent those error values correctly.

[Qemu-devel] [PATCH v2 06/21] qcow2: Helper for refcount array reallocation

2014-11-14 Thread Max Reitz
Add a helper function for reallocating a refcount array, independently of the refcount order. The newly allocated space is zeroed and the function handles failed reallocations gracefully. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 121 +

[Qemu-devel] [PATCH v2 12/21] qcow2: Allow creation with refcount order != 4

2014-11-14 Thread Max Reitz
Add a creation option to qcow2 for setting the refcount order of images to be created, and respect that option's value. This breaks some test outputs, fix them. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2.c | 20 include/block/block_int.h | 1 + t

[Qemu-devel] [PATCH v2 00/21] qcow2: Support refcount orders != 4

2014-11-14 Thread Max Reitz
As of version 3, the qcow2 file format supports different widths for refcount entries, ranging from 1 to 64 bit (only powers of two). Currently, qemu only supports 16 bit, which is the only width supported by version 2 (compat=0.10) images. This series adds support to qemu for all other valid refc

[Qemu-devel] [PATCH v2 07/21] qcow2: Helper function for refcount modification

2014-11-14 Thread Max Reitz
Since refcounts do not always have to be a uint16_t, all refcount blocks and arrays in memory should not have a specific type (thus they become pointers to void) and for accessing them, two helper functions are used (a getter and a setter). Those functions are called indirectly through function poi

[Qemu-devel] [PATCH v2 11/21] iotests: Prepare for refcount_width option

2014-11-14 Thread Max Reitz
Some tests do not work well with certain refcount widths (i.e. you cannot create internal snapshots with refcount_width=1), so make those widths unsupported. Furthermore, add another filter to _filter_img_create in common.filter which filters out the refcount_width value. This is necessary for te

[Qemu-devel] [PATCH v2 04/21] qcow2: Respect error in qcow2_alloc_bytes()

2014-11-14 Thread Max Reitz
qcow2_update_cluster_refcount() may fail, and qcow2_alloc_bytes() should mind that case. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/block/qcow2-refcount.c b/bl

[Qemu-devel] [PATCH v2 02/21] qcow2: Add refcount_width to format-specific info

2014-11-14 Thread Max Reitz
Add the bit width of every refcount entry to the format-specific information. In contrast to lazy_refcounts and the corrupt flag, this should be always emitted, even for compat=0.10 although it does not support any refcount width other than 16 bits. This is because if a boolean is optional, one no

[Qemu-devel] [PATCH v2 01/21] qcow2: Add two new fields to BDRVQcowState

2014-11-14 Thread Max Reitz
Add two new fields regarding refcount information (the bit width of every entry and the maximum refcount value) to the BDRVQcowState. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 2 +- block/qcow2.c | 9 + block/qcow2.h | 2 ++ 3 files

[Qemu-devel] [Bug 1392504] Re: USB Passthrough is not working anymore

2014-11-14 Thread Leen Keus
Command lines generated by virsh from the libvirt xml files (let me know if you also need the xml configuration files): qemu-system-x86_64 -enable-kvm -name fsg -S -machine pc-1.2,accel=kvm,usb=off -m 2048 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 30619811-d285-944a-026a-cdd

Re: [Qemu-devel] [PULL for-2.2 00/11] Block patches

2014-11-14 Thread Peter Maydell
On 14 November 2014 11:05, Stefan Hajnoczi wrote: > The following changes since commit c52e67924fbdadfa00668248f5c075542943c54c: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2014-11-13 15:44:16 +) > > are available in the git repository at: > > git:

[Qemu-devel] [PULL for-2.2 2/2] xen_disk: fix unmapping of persistent grants

2014-11-14 Thread Stefano Stabellini
From: Roger Pau Monne This patch fixes two issues with persistent grants and the disk PV backend (Qdisk): - Keep track of memory regions where persistent grants have been mapped since we need to unmap them as a whole. It is not possible to unmap a single grant if it has been batch-mapped.

[Qemu-devel] [PULL for-2.2 1/2] pc: piix4_pm: init legacy PCI hotplug when running on Xen

2014-11-14 Thread Stefano Stabellini
From: Igor Mammedov If user starts QEMU with "-machine pc,accel=xen", then compat property in xenfv won't work and it would cause error: "Unsupported bus. Bus doesn't have property 'acpi-pcihp-bsel' set" when PCI device is added with -device on QEMU CLI. From: Igor Mammedov In case of Xen inst

[Qemu-devel] [PULL for-2.2 0/2] Xen tree 2014-11-14

2014-11-14 Thread Stefano Stabellini
The following changes since commit c52e67924fbdadfa00668248f5c075542943c54c: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2014-11-13 15:44:16 +) are available in the git repository at: git://xenbits.xen.org/people/sstabellini/qemu-dm.git xen-2014-11-14

[Qemu-devel] qemu 2.2 crash on linux hvm domU (full backtrace included)

2014-11-14 Thread Fabio Fantoni
dom0 xen-unstable from staging git with "x86/hvm: Extend HVM cpuid leaf with vcpu id" and "x86/hvm: Add per-vcpu evtchn upcalls" patches, and qemu 2.2 from spice git (spice/next commit e779fa0a715530311e6f59fc8adb0f6eca914a89): https://github.com/Fantu/Xen/commits/rebase/m2r-staging Qemu crash

[Qemu-devel] [PULL for-2.2 11/11] vmdk: Leave bdi intact if -ENOTSUP in vmdk_get_info

2014-11-14 Thread Stefan Hajnoczi
From: Fam Zheng When extent types don't match, we return -ENOTSUP. In this case, be polite to the caller and don't modify bdi. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1415938161-16217-1-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- block/vmdk.c | 20 ++

[Qemu-devel] [PULL for-2.2 10/11] block: Fix max nb_sectors in bdrv_make_zero

2014-11-14 Thread Stefan Hajnoczi
From: Fam Zheng In bdrv_rw_co we report -EINVAL for nb_sectors > INT_MAX / BDRV_SECTOR_SIZE, so a caller shouldn't exceed it. Signed-off-by: Fam Zheng Reviewed-by: Markus Armbruster Message-id: 1415603264-21497-1-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- block.c | 4 +

[Qemu-devel] [PULL for-2.2 09/11] ahci: factor out FIS decomposition from handle_cmd

2014-11-14 Thread Stefan Hajnoczi
From: John Snow In order to make handle_cmd more readable at the macro level, the details of how to decompose particular types of FIS packets are left to helper functions. In our case, the only type of FIS packet we currently expect to see is a Register H2D FIS packet, but the gory details of it

[Qemu-devel] [PULL for-2.2 07/11] ahci: Reorder error cases in handle_cmd

2014-11-14 Thread Stefan Hajnoczi
From: John Snow Error checking in ahci's handle_cmd is re-ordered so that we initialize as few things as possible before we've done our sanity checking. This simplifies returning from this call in case of an error. A check to make sure the DMA memory map succeeds with the correct size is also ad

[Qemu-devel] [PULL for-2.2 05/11] ahci: add is_ncq predicate helper

2014-11-14 Thread Stefan Hajnoczi
From: John Snow A small helper to determine which S/ATA commands are destined to be routed to the NCQ pathways. This references SATA 3.2 section 13.6, Native Command Queueing. See sections 13.6.4, 13.6.5, 13.6.6, 13.6.7 and 13.6.8 for all SATA commands considered to be part of the NCQ feature se

[Qemu-devel] [PULL for-2.2 03/11] ahci: unify sglist preparation

2014-11-14 Thread Stefan Hajnoczi
From: John Snow The intent of this patch is to further unify the creation and deletion of the sglist used for all AHCI transfers, including emulated PIO, ATAPI R/W, and native DMA R/W. By replacing ahci_start_transfer's call to ahci_populate_sglist with ahci_dma_prepare_buf, we reduce the number

[Qemu-devel] [PULL for-2.2 06/11] ahci: Fix FIS decomposition

2014-11-14 Thread Stefan Hajnoczi
From: John Snow This patch introduces a few changes to how FIS packets are deciphered in the AHCI virtual device. The summary of changes can be grouped into two pieces: [A] Changes to how we apply a preliminary sieve to FISes, [B] Changes in how we internalize a decomposed FIS. == Changes to ho

[Qemu-devel] [PULL for-2.2 08/11] ahci: Check cmd_fis[1] more explicitly

2014-11-14 Thread Stefan Hajnoczi
From: John Snow Instead of checking for a known byte, inspect the fields of this byte explicitly to produce more meaningful error messages and improve the readability of this section. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-id: 1415058979-16604-5-git-send-email-js...@redhat

[Qemu-devel] [PULL for-2.2 00/11] Block patches

2014-11-14 Thread Stefan Hajnoczi
The following changes since commit c52e67924fbdadfa00668248f5c075542943c54c: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2014-11-13 15:44:16 +) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for you

[Qemu-devel] [PULL for-2.2 01/11] ahci: Fix byte count regression for ATAPI/PIO

2014-11-14 Thread Stefan Hajnoczi
From: John Snow This patch fixes a regression caused by commit 659142ecf71a0da240ab0ff7cf929ee25c32b9bc. The problem occurs when we wish to return early from the ahci_start_transfer function, but are now updating the transferred byte count in the AHCI command header via ahci_commit_buf. This wil

[Qemu-devel] [PULL for-2.2 02/11] ide: repair PIO transfers for cases where nsector > 1

2014-11-14 Thread Stefan Hajnoczi
From: John Snow Currently, for emulated PIO transfers through the AHCI device, any attempt made to request more than a single sector's worth of data will result in the same sector being transferred over and over. For example, if we request 8 sectors via PIO READ SECTORS, the AHCI device will giv

[Qemu-devel] [PULL for-2.2 04/11] ide: Correct handling of malformed/short PRDTs

2014-11-14 Thread Stefan Hajnoczi
From: John Snow This impacts both BMDMA and AHCI HBA interfaces for IDE. Currently, we confuse the difference between a PRDT having "0 bytes" and a PRDT having "0 complete sectors." When we receive an incomplete sector, inconsistent error checking leads to an infinite loop wherein the call succe

Re: [Qemu-devel] [PATCH v3 for-xen-4.5] xen_disk: fix unmapping of persistent grants

2014-11-14 Thread Stefano Stabellini
On Thu, 13 Nov 2014, Roger Pau Monne wrote: > This patch fixes two issues with persistent grants and the disk PV backend > (Qdisk): > > - Keep track of memory regions where persistent grants have been mapped >since we need to unmap them as a whole. It is not possible to unmap a >single gr

Re: [Qemu-devel] iothread object hotplug ?

2014-11-14 Thread Stefan Hajnoczi
On Fri, Nov 14, 2014 at 09:37:02AM +0100, Paolo Bonzini wrote: > On 14/11/2014 08:25, Alexandre DERUMIER wrote: > > Hi, > > > > I would like to known if it's possible to hot-add|hot-plug an iothread > > object > > on a running guest ? > > Yes, there is an object_add/object-add command (respect

Re: [Qemu-devel] [PATCH v2] libcacard: fix resource leak

2014-11-14 Thread Markus Armbruster
zhanghailiang writes: > In function connect_to_qemu(), getaddrinfo() will allocate memory > that is stored into server, it should be freed by using freeaddrinfo() > before connect_to_qemu() return. > > Signed-off-by: zhanghailiang > --- > v2: > - fix typo in title ;) > --- > libcacard/vscclient

Re: [Qemu-devel] [PATCH] vmdk: Leave bdi intact if -ENOTSUP in vmdk_get_info

2014-11-14 Thread Stefan Hajnoczi
On Fri, Nov 14, 2014 at 12:09:21PM +0800, Fam Zheng wrote: > When extent types don't match, we return -ENOTSUP. In this case, be > polite to the caller and don't modify bdi. > > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 20 +--- > 1 file changed, 13 insertions(+), 7 deletio

Re: [Qemu-devel] [PATCH] mips/gdbstub: Make CP1.FIR read-only here too

2014-11-14 Thread Leon Alrae
On 03/11/2014 18:51, Maciej W. Rozycki wrote: > CP1.FIR is read-only in hardware so gdbstub must respect it. We already > respect it for CTC1 instructions, so do it here too. > > Signed-off-by: Maciej W. Rozycki > --- > Not much to say about it here. Please apply. > > Maciej > > qemu-mips-

Re: [Qemu-devel] [PATCH] mips/gdbstub: Correct the handling of register #72 on writes

2014-11-14 Thread Leon Alrae
On 03/11/2014 18:47, Maciej W. Rozycki wrote: > Fix an off-by-one error in `mips_cpu_gdb_write_register' for register > #72 that is handled further down in that function rather than here, > matching how `mips_cpu_gdb_read_register' handles it. This register > slot is a fake anyway, there's noth

Re: [Qemu-devel] iothread object hotplug ?

2014-11-14 Thread Alexandre DERUMIER
>>Yes, there is an object_add/object-add command (respectively HMP and >>QMP), but I don't think libvirt has bindings already. Thanks Paolo ! I'm currently implementing iothread on proxmox, so no libvirt. Alexandre. - Mail original - De: "Paolo Bonzini" À: "Alexandre DERUMIER" , "qemu

[Qemu-devel] [PATCH v3 3/3] iotests: Use -qmp-pretty in 067

2014-11-14 Thread Max Reitz
067 invokes query-block, resulting in a reference output with really long lines (which may pose a problem in email patches and always poses a problem when the output changes, because it is hard to see what has actually changed). Use -qmp-pretty to mitigate this issue. Signed-off-by: Max Reitz Rev

[Qemu-devel] [PATCH v3 1/3] chardev: Add -qmp-pretty

2014-11-14 Thread Max Reitz
Add a command line option for adding a QMP monitor using pretty JSON formatting. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- qemu-options.hx | 8 vl.c| 15 ++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-optio

[Qemu-devel] [PATCH v3 2/3] iotests: _filter_qmp for pretty JSON output

2014-11-14 Thread Max Reitz
_filter_qmp should be able to correctly filter out the QMP version object for pretty JSON output. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filte

[Qemu-devel] [PATCH v3 0/3] chardev: Add -qmp-pretty

2014-11-14 Thread Max Reitz
This series does not add new functionality. Adding a QMP monitor with prettily formatted JSON output can be done as follows: $ qemu -chardev stdio,id=mon0 -mon chardev=mon0,mode=control,pretty=on However, this is rather cumbersome, so this series (its first patch) adds a shortcut in the form of t

Re: [Qemu-devel] [PATCH v2 2/3] iotests: _filter_qmp for pretty JSON output

2014-11-14 Thread Max Reitz
On 2014-11-14 at 10:02, Max Reitz wrote: _filter_qmp should be able to correctly filter out the QMP version object for pretty JSON output. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/

Re: [Qemu-devel] [Bug 1392504] Re: USB Passthrough is not working anymore

2014-11-14 Thread Gonglei
On 2014/11/14 16:47, Leen Keus wrote: > Under Ubuntu 14.04 the USB devices where attached to the virtual > machines. After upgrading to Ubuntu 14.10 the USB devices are not > visible in the virtual machines anymore. Same issue appeard after > upgrading from Ubuntu 13.04 to 13.10, but I can not fin

[Qemu-devel] [PATCH v2 2/3] iotests: _filter_qmp for pretty JSON output

2014-11-14 Thread Max Reitz
_filter_qmp should be able to correctly filter out the QMP version object for pretty JSON output. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.fil

[Qemu-devel] [PATCH v2 3/3] iotests: Use -qmp-pretty in 067

2014-11-14 Thread Max Reitz
067 invokes query-block, resulting in a reference output with really long lines (which may pose a problem in email patches and always poses a problem when the output changes, because it is hard to see what has actually changed). Use -qmp-pretty to mitigate this issue. Signed-off-by: Max Reitz Rev

[Qemu-devel] [PATCH v2 0/3] chardev: Add -qmp-pretty

2014-11-14 Thread Max Reitz
This series does not add new functionality. Adding a QMP monitor with prettily formatted JSON output can be done as follows: $ qemu -chardev stdio,id=mon0 -mon chardev=mon0,mode=control,pretty=on However, this is rather cumbersome, so this series (its first patch) adds a shortcut in the form of t

[Qemu-devel] [PATCH v2 1/3] chardev: Add -qmp-pretty

2014-11-14 Thread Max Reitz
Add a command line option for adding a QMP monitor using pretty JSON formatting. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- qemu-options.hx | 8 vl.c| 15 ++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-optio

[Qemu-devel] [Bug 1392504] Re: USB Passthrough is not working anymore

2014-11-14 Thread Leen Keus
Under Ubuntu 14.04 the USB devices where attached to the virtual machines. After upgrading to Ubuntu 14.10 the USB devices are not visible in the virtual machines anymore. Same issue appeard after upgrading from Ubuntu 13.04 to 13.10, but I can not find that bug report anymore. -- You received th

Re: [Qemu-devel] [PATCH] l2tpv3: fix possible double free

2014-11-14 Thread Paolo Bonzini
On 14/11/2014 02:39, zhanghailiang wrote: > freeaddrinfo(result) does not assign result = NULL, after frees it. > There will be a double free when it goes error case. > It is reported by covertiy. > > Signed-off-by: zhanghailiang > --- > net/l2tpv3.c | 1 + > 1 file changed, 1 insertion(+) >

Re: [Qemu-devel] iothread object hotplug ?

2014-11-14 Thread Paolo Bonzini
On 14/11/2014 08:25, Alexandre DERUMIER wrote: > Hi, > > I would like to known if it's possible to hot-add|hot-plug an iothread object > on a running guest ? Yes, there is an object_add/object-add command (respectively HMP and QMP), but I don't think libvirt has bindings already. Paolo

Re: [Qemu-devel] [PATCH] vmdk: Leave bdi intact if -ENOTSUP in vmdk_get_info

2014-11-14 Thread Max Reitz
On 2014-11-14 at 05:09, Fam Zheng wrote: When extent types don't match, we return -ENOTSUP. In this case, be polite to the caller and don't modify bdi. Signed-off-by: Fam Zheng --- block/vmdk.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) Reviewed-by: Max Rei

Re: [Qemu-devel] [PATCH] gtk: fix possible memory leak about local_err

2014-11-14 Thread Gerd Hoffmann
On Fr, 2014-11-14 at 11:25 +0800, zhanghailiang wrote: > local_err in gd_vc_gfx_init() is not freed, and we don't use it, > so remove it. Added to gtk patch queue. thanks, Gerd

Re: [Qemu-devel] [PATCH v3 4/4] target-ppc: Handle ibm, nmi-register RTAS call

2014-11-14 Thread Aravinda Prasad
On Friday 14 November 2014 06:12 AM, David Gibson wrote: > On Thu, Nov 13, 2014 at 08:06:55PM +0530, Aravinda Prasad wrote: >> >> >> On Thursday 13 November 2014 06:14 PM, David Gibson wrote: >>> On Thu, Nov 13, 2014 at 05:18:16PM +0530, Aravinda Prasad wrote: On Thursday 13 November 2014 04