[Qemu-devel] [PATCH v4 0/3] bugs fix for hpet

2013-09-02 Thread Liu Ping Fan
note: I rebase it onto Stefan's net-next tree, since pc-1.7 has already been defined there. v4: use standard compat property to set hpet's interrupt compatibility v3: change hpet interrupt capablity on board's demand Liu Ping Fan (3): hpet: inverse polarity when pin above ISA_NUM_IRQS

[Qemu-devel] [PATCH v4 1/3] hpet: inverse polarity when pin above ISA_NUM_IRQS

2013-09-02 Thread Liu Ping Fan
According to hpet spec, hpet irq is high active. But according to ICH spec, there is inversion before the input of ioapic. So the OS will expect low active on this IRQ line.(And this is observed on bare metal). We fold the emulation of this inversion inside the hpet logic. Signed-off-by: Liu Ping

[Qemu-devel] [PATCH v4 2/3] hpet: entitle more irq pins for hpet

2013-09-02 Thread Liu Ping Fan
On PC, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 of ioapic can be dynamically assigned to hpet as guest chooses. (Will enable them after introducing pc 1.6 compat) Signed-off-by: Liu Ping Fan --- hw/timer/hpet.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH v4 3/3] pc-1.6: add compatibility for hpet intcap on pc-*-1.6

2013-09-02 Thread Liu Ping Fan
For guest bug compat, we limit hpet's interrupt compatibility on ioapic's IRQ2 for pc-*-1.6. As to pc-*-1.7 and newer, IRQ2, IRQ8, and IRQ16~23 are allowed. Signed-off-by: Liu Ping Fan --- hw/timer/hpet.c | 6 +- include/hw/i386/pc.h | 4 2 files changed, 5 insertions(+), 5 deletio

Re: [Qemu-devel] [PATCH v3 04/19] block: update bs->total_sectors on writes

2013-09-02 Thread Peter Lieven
On 17.08.2013 08:27, Paolo Bonzini wrote: Il 02/08/2013 09:05, Peter Lieven ha scritto: can you give an update what are to current plans/schedule to merge this series? I have a few patches in the queue that in their current version depend on this series being merged. It should go in soon, perha

[Qemu-devel] [PATCH v5 3/8] qcow2: Employ metadata overlap checks

2013-09-02 Thread Max Reitz
The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 21 + block/qcow2-snapshot.c | 22 +++

[Qemu-devel] [PATCH v5 1/8] qcow2: Add corrupt bit

2013-09-02 Thread Max Reitz
This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz --- block/qcow2.c | 47 +++

[Qemu-devel] [PATCH v5 0/8] Add metadata overlap checks

2013-09-02 Thread Max Reitz
If a qcow2 image file becomes corrupted, any write may inadvertently overwrite important metadata structures such as the L1 table. This series adds functionality for detecting, preventing and (to some extent) repairing such collisions. v5: - fixed patch 6 (forgot to update the event_names array f

[Qemu-devel] [PATCH v5 2/8] qcow2: Metadata overlap checks

2013-09-02 Thread Max Reitz
Two new functions are added; the first one checks a given range in the image file for overlaps with metadata (main header, L1 tables, L2 tables, refcount table and blocks). The second one should be used immediately before writing to the image file as it calls the first function and, upon collision

[Qemu-devel] [PATCH v5 5/8] qcow2-refcount: Repair OFLAG_COPIED errors

2013-09-02 Thread Max Reitz
Since the OFLAG_COPIED checks are now executed after the refcounts have been repaired (if repairing), it is safe to assume that they are correct but the OFLAG_COPIED flag may be not. Therefore, if its value differs from what it should be (considering the according refcount), that discrepancy can be

[Qemu-devel] [PATCH v5 4/8] qcow2-refcount: Move OFLAG_COPIED checks

2013-09-02 Thread Max Reitz
Move the OFLAG_COPIED checks out of check_refcounts_l1 and check_refcounts_l2 and after the actual refcount checks/fixes (since the refcounts might actually change there). Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 115 +++-- 1 file changed,

[Qemu-devel] [PATCH v5 8/8] qemu-iotests: Overlapping cluster allocations

2013-09-02 Thread Max Reitz
A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 111 + tests/qemu-iotests/060.out | 44 ++ tests/qemu-iotests/group | 1 + 3 files changed, 156 insertio

[Qemu-devel] [PATCH v5 7/8] qcow2_check: Mark image consistent

2013-09-02 Thread Max Reitz
If no corruptions remain after an image repair (and no errors have been encountered), clear the corrupt flag in qcow2_check. Signed-off-by: Max Reitz --- block/qcow2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3a95ff1..aeb2ebb 10

[Qemu-devel] [PATCH v5 6/8] qcow2-refcount: Repair shared refcount blocks

2013-09-02 Thread Max Reitz
If the refcount of a refcount block is greater than one, we can at least try to repair that problem by duplicating the affected block. Signed-off-by: Max Reitz --- block/blkdebug.c | 1 + block/qcow2-refcount.c | 148 - include/block/block.

Re: [Qemu-devel] [PATCH v3 2/3] qcow2: Implement bdrv_amend_options

2013-09-02 Thread Max Reitz
Am 02.09.2013 05:43, schrieb Fam Zheng: On Fri, 08/30 12:27, Max Reitz wrote: Implement bdrv_amend_options for compat, size, backing_file, backing_fmt and lazy_refcounts. Downgrading images from compat=1.1 to compat=0.10 is achieved through handling all incompatible flags accordingly, clearing

Re: [Qemu-devel] [PATCH v2 2/2] milkymist-uart: use Device::realize instead of SysBusDevice::init

2013-09-02 Thread Andreas Färber
Am 01.09.2013 20:28, schrieb Antony Pavlov: > On Sat, 31 Aug 2013 21:09:20 +0200 > Andreas Färber wrote: > >> Am 31.08.2013 19:22, schrieb Antony Pavlov: >>> Use of SysBusDevice::init is deprecated. >>> Use Device::realize instead of SysBusDevice::init. >>> Check dma/pl330.c for an example of the

Re: [Qemu-devel] [PATCH v3 2/3] qcow2: Implement bdrv_amend_options

2013-09-02 Thread Kevin Wolf
Am 02.09.2013 um 05:43 hat Fam Zheng geschrieben: > On Fri, 08/30 12:27, Max Reitz wrote: > > Implement bdrv_amend_options for compat, size, backing_file, backing_fmt > > and lazy_refcounts. > > > > Downgrading images from compat=1.1 to compat=0.10 is achieved through > > handling all incompatible

Re: [Qemu-devel] [PATCH] target-ppc: Fix include for qemu_notify_event

2013-09-02 Thread Andreas Färber
Am 01.09.2013 18:00, schrieb Richard Henderson: > Signed-off-by: Richard Henderson > --- > target-ppc/kvm_ppc.c | 1 + > 1 file changed, 1 insertion(+) > > The PowerPC target has been broken for more than a week. Déjà vu, Alex already sent a fix on ~Friday. Andreas > > > r~ > > > diff --gi

[Qemu-devel] [PULL 1/6] pci: Introduce helper to retrieve a PCI device's DMA address space

2013-09-02 Thread Michael S. Tsirkin
From: Alexey Kardashevskiy A PCI device's DMA address space (possibly an IOMMU) is returned by a method on the PCIBus. At the moment that only has one caller, so the method is simply open coded. We'll need another caller for VFIO, so this patch introduces a helper/wrapper function. If IOMMU is

[Qemu-devel] [PULL 2/6] pc: fix regression for 64 bit PCI memory

2013-09-02 Thread Michael S. Tsirkin
commit 398489018183d613306ab022653552247d93919f pc: limit 64 bit hole to 2G by default introduced a way for management to control the window allocated to the 64 bit PCI hole. This is useful, but existing management tools do not know how to set this property. As a result, e.g. specifying a lar

[Qemu-devel] [PULL 5/6] pc: reduce duplication, fix PIIX descriptions

2013-09-02 Thread Michael S. Tsirkin
We have a lot of code duplication between machine types, this increases with each new machine type and each new field. This has already introduced a minor bug: description for pc-1.3 says "Standard PC" while description for pc-1.4 is "Standard PC (i440FX + PIIX, 1996)" which makes you think 1.3 is

[Qemu-devel] [PULL 0/6] pc,pci,virtio fixes and cleanups

2013-09-02 Thread Michael S. Tsirkin
The following changes since commit 1ae2757c6c4525c9b42f408c86818f843bad7418: virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect descriptor table (2013-08-25 12:52:33 +0300) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tag

[Qemu-devel] [PULL 4/6] hw: Clean up bogus default boot order

2013-09-02 Thread Michael S. Tsirkin
From: Markus Armbruster We set default boot order "cad" in every single machine definition except "pseries" and "moxiesim", even though very few boards actually care for boot order, and "cad" makes sense for even fewer. Machines that care: * pc and its variants Accept up to three letters 'a'

[Qemu-devel] [PULL 3/6] pci: add config space access traces

2013-09-02 Thread Michael S. Tsirkin
From: Alexey Kardashevskiy This adds pci_cfg_read and pci_cfg_write traces for config spaces accesses. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael S. Tsirkin --- hw/pci/pci_host.c | 11 ++- trace-events | 4 2 files changed, 14 insertions(+), 1 deletion(-) d

[Qemu-devel] [PULL 6/6] virtio_pci: fix level interrupts with irqfd

2013-09-02 Thread Michael S. Tsirkin
commit 62c96360ae7f2c7a8b029277fbb7cb082fdef7fd virtio-pci: fix level interrupts only helps systems without irqfd: on systems with irqfd support we passed in flag requesting irqfd even when msix is disabled. As a result, for level interrupts we didn't install an fd handler so unmasking an fd h

Re: [Qemu-devel] [PATCH] target-ppc: Fix include for qemu_notify_event

2013-09-02 Thread Alexander Graf
On 02.09.2013, at 09:56, Andreas Färber wrote: > Am 01.09.2013 18:00, schrieb Richard Henderson: >> Signed-off-by: Richard Henderson >> --- >> target-ppc/kvm_ppc.c | 1 + >> 1 file changed, 1 insertion(+) >> >> The PowerPC target has been broken for more than a week. > > Déjà vu, Alex already s

[Qemu-devel] [PULL 10/18] target-ppc: fix bit extraction for FPBF and FPL

2013-09-02 Thread Alexander Graf
From: Aurelien Jarno Bit extraction for the FP BF and L field of the MTFSFI and MTFSF instructions is wrong and doesn't match the reference manual (which explain the bit number in big endian format). It has been broken in commit 7d08d85645def18eac2a9d672c1868a35e0bcf79. This patch fixes this, wh

[Qemu-devel] [PULL 16/18] PPC: KVM: Compile fix for qemu_notify_event

2013-09-02 Thread Alexander Graf
The function qemu_notify_event is defined by a header that we don't include in the PPC KVM code. Include it to get the code building again. target-ppc/kvm_ppc.c: In function 'kvmppc_timer_hack': target-ppc/kvm_ppc.c:26:5: error: implicit declaration of function 'qemu_notify_event' [-Werror=im

[Qemu-devel] [PULL 00/18] ppc patch queue 2013-09-02

2013-09-02 Thread Alexander Graf
Hi Blue / Aurelien / Anthony, This is my current patch queue for ppc. Please pull. Alex The following changes since commit 4ff78e0dbcd5c795962567fdc1b31e9e03c55b07: Merge remote-tracking branch 'luiz/queue/qmp' into staging (2013-08-30 12:26:04 -0500) are available in the git repository a

[Qemu-devel] [PULL 05/18] disas/ppc.c: Fix little endian disassembly

2013-09-02 Thread Alexander Graf
From: Anton Blanchard Use info->endian to select the endian of the instruction to be disassembled. Signed-off-by: Anton Blanchard Reviewed-by: Anthony Liguori Signed-off-by: Alexander Graf --- disas/ppc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/disas/ppc.c b/dis

[Qemu-devel] [PULL 08/18] ppc405_uc: Disable debug output

2013-09-02 Thread Alexander Graf
From: Andreas Färber Signed-off-by: Andreas Färber Signed-off-by: Alexander Graf --- hw/ppc/ppc405_uc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c index 0ef5254..6d6a7f1 100644 --- a/hw/ppc/ppc405_uc.c +++ b/hw/p

[Qemu-devel] [PULL 06/18] ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine.

2013-09-02 Thread Alexander Graf
From: Efimov Vasily QEMU has 'dtb' option for specifing the device tree file for the kernel. The patch adds support for this option to the 'virtex_ml507' machine implementation. Signed-off-by: Efimov Vasily Signed-off-by: Alexander Graf --- hw/ppc/virtex_ml507.c | 29 +++--

[Qemu-devel] [PULL 07/18] ppc405_boards: Disable debug output

2013-09-02 Thread Alexander Graf
From: Andreas Färber Also move one stray debug output into an #ifdef. Signed-off-by: Andreas Färber Signed-off-by: Alexander Graf --- hw/ppc/ppc405_boards.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c index f74e5e5..8

[Qemu-devel] [PULL 12/18] target-ppc: Use #define instead of opencoding SLB valid bit

2013-09-02 Thread Alexander Graf
From: "Aneesh Kumar K.V" Use SLB_ESID_V instead of (1 << 27) in the code Reviewed-by: Andreas Färber Signed-off-by: Aneesh Kumar K.V Signed-off-by: Alexander Graf --- target-ppc/mmu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/mmu_helper.c b/target-

[Qemu-devel] [PULL 01/18] PPC: E500: Generate device tree on reset

2013-09-02 Thread Alexander Graf
Today we generate the device tree once on machine initialization and then store the finalized blob in memory to reload it on reset. This is bad for 2 reasons. First we potentially waste a bunch of RAM for no good reason, as we have all information required to regenerate the device tree available a

[Qemu-devel] [PULL 04/18] target-ppc: POWER7 supports the MSR_LE bit

2013-09-02 Thread Alexander Graf
From: Anton Blanchard Add MSR_LE to the msr_mask for POWER7. Signed-off-by: Anton Blanchard Reviewed-by: Anthony Liguori Signed-off-by: Alexander Graf --- target-ppc/translate_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/

[Qemu-devel] [PULL 02/18] pseries: Fix stalls on hypervisor virtual console

2013-09-02 Thread Alexander Graf
From: Anton Blanchard A number of users are reporting stalls when using the pseries hypervisor virtual console. A simple test case is to paste 15 or 17 characters at a time into the console. Pasting 15 characters at a time works fine but pasting 17 characters hangs for a random amount of time. O

[Qemu-devel] [PULL 13/18] spapr-pci: rework MSI/MSIX

2013-09-02 Thread Alexander Graf
From: Alexey Kardashevskiy On the sPAPR platform a guest allocates MSI/MSIX vectors via RTAS hypercalls which return global IRQ numbers to a guest so it only operates with those and never touches MSIMessage. Therefore MSIMessage handling is completely hidden in QEMU. Previously every sPAPR PCI

[Qemu-devel] [PULL 15/18] pseries: Add H_SET_MODE hcall to change guest exception endianness

2013-09-02 Thread Alexander Graf
From: Anton Blanchard H_SET_MODE is used for controlling various partition settings. One of these settings is the endianness a guest takes its exceptions in. Signed-off-by: Anton Blanchard [agraf: fix whitespace] Signed-off-by: Alexander Graf --- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_h

[Qemu-devel] [PULL 17/18] spapr: add "stop-self" RTAS call required to support hot CPU unplug

2013-09-02 Thread Alexander Graf
From: Alexey Kardashevskiy PAPR+ requires two RTAS calls to be supported by the hypervisor in order to allow hotplugging VCPUs from the guest. The "start-cpu" RTAS call was already there but "stop-self" was not. This adds the "stop-self" RTAS call. Signed-off-by: Alexey Kardashevskiy Signed-of

[Qemu-devel] [PULL 03/18] target-ppc: USE LPCR_ILE to control exception endian on POWER7

2013-09-02 Thread Alexander Graf
From: Anton Blanchard On POWER7, LPCR_ILE is used to control what endian guests take their exceptions in so use it instead of MSR_ILE. Signed-off-by: Anton Blanchard Reviewed-by: Anthony Liguori Signed-off-by: Alexander Graf --- target-ppc/cpu.h | 2 ++ target-ppc/excp_helper.c | 10

[Qemu-devel] [PULL 09/18] ppc405_boards: Don't enforce presence of firmware for qtest

2013-09-02 Thread Alexander Graf
From: Andreas Färber Adopt error_report() while at it. Signed-off-by: Andreas Färber Signed-off-by: Alexander Graf --- hw/ppc/ppc405_boards.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards

[Qemu-devel] [PULL 14/18] xics: move registration of global state to realize()

2013-09-02 Thread Alexander Graf
From: Alexey Kardashevskiy Registration of global state belongs into realize so move it there. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Andreas Färber Signed-off-by: Alexander Graf --- hw/intc/xics.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff

[Qemu-devel] [PULL 11/18] spapr-pci: fix config space access to support bridges

2013-09-02 Thread Alexander Graf
From: Alexey Kardashevskiy spapr-pci config space accessors use find_dev() to find a PCI device. However find_dev() only searched on a primary bus and did not do recursive search through secondary buses so config space access was not possible for devices other that on a primary bus. This fixed f

[Qemu-devel] [PULL 18/18] PPC: spapr: iommu: rework traces

2013-09-02 Thread Alexander Graf
From: Alexey Kardashevskiy This converts old style fprintf to traces. Signed-off-by: Alexey Kardashevskiy [agraf: change patch subject] Signed-off-by: Alexander Graf --- hw/ppc/spapr_iommu.c | 71 ++-- trace-events | 5 2 files cha

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

2013-09-02 Thread Kevin Wolf
Am 30.08.2013 um 19:14 hat Anthony Liguori geschrieben: > This pull request breaks make check, qemu-system-i386 segvs when > running qtest. bisect blames the following commit. I confirmed this > commit introduces the breakage too. > > commit 19abade25242079f4b5582de17b2302fe185be2b > Author: Max

Re: [Qemu-devel] [PATCH] target-i386: Only provide CMOV and friends if feature bit set

2013-09-02 Thread Peter Maydell
Ping^3! thanks -- PMM On 20 August 2013 13:59, Peter Maydell wrote: > Ping^2! This has been reviewed and I've checked that the > patch still applies to master. > > thanks > -- PMM > > On 25 July 2013 17:54, Peter Maydell wrote: >> Ping! >> >> (patchwork url: http://patchwork.ozlabs.org/patch/25

Re: [Qemu-devel] [PATCH v2] pseries: Update SLOF firmware image

2013-09-02 Thread Alexander Graf
On 28.08.2013, at 09:42, Alexey Kardashevskiy wrote: > On 08/27/2013 06:33 PM, Alexander Graf wrote: >> >> On 27.08.2013, at 05:42, Alexey Kardashevskiy wrote: >> >>> This has reworked USB OHCI and adds support of USB EHCI, >>> VIRTIO-SCSI and various fixes (IBM VSCSI, VGA and more). >>> >>> T

[Qemu-devel] [PULL v2 00/26] Block patches

2013-09-02 Thread Kevin Wolf
The following changes since commit b5d54bd42158b90b239bb6ce9c13072eb3a53fd2: Merge remote-tracking branch 'qemu-kvm/uq/master' into stable-1.5 (2013-08-29 17:21:51 -0500) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony for you to fetch changes up to ca0

[Qemu-devel] [PULL v2 01/26] qcow2: Change default for new images to compat=1.1

2013-09-02 Thread Kevin Wolf
By the time that qemu 1.7 will be released, enough time will have passed since qemu 1.1, which is the first version to understand version 3 images, that changing the default shouldn't hurt many people any more and the benefits of using the new format outweigh the pain. qemu-iotests already runs wi

[Qemu-devel] [PULL v2 02/26] block: Remove redundant assertion

2013-09-02 Thread Kevin Wolf
The failing condition is checked immediately before the assertion, so keeping the assertion is kind of redundant. Signed-off-by: Kevin Wolf --- block.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block.c b/block.c index a387c1a..26639e8 100644 --- a/block.c +++ b/block.c @@ -743,7 +743,6

[Qemu-devel] [PULL v2 11/26] raw_bsd: add raw_create_options

2013-09-02 Thread Kevin Wolf
From: Laszlo Ersek On 08/05/13 15:03, Paolo Bonzini wrote: > > [...] > > 4) There is another member, .create_options, which is an array of > QEMUOptionParameter structs, terminated by an all-zero item. The only > option you need is for the virtual disk size. You will find something > to copy fr

[Qemu-devel] [PULL v2 07/26] add skeleton for BSD licensed "raw" BlockDriver

2013-09-02 Thread Kevin Wolf
From: Laszlo Ersek On 08/05/13 15:03, Paolo Bonzini wrote: > > > - Original Message - >> From: "Laszlo Ersek" >> To: "Paolo Bonzini" >> Sent: Monday, August 5, 2013 2:43:46 PM >> Subject: Re: [PATCH 1/2] raw: add license header >> >> On 08/02/13 00:27, Paolo Bonzini wrote: >>> On 08/01/

[Qemu-devel] [PULL v2 06/26] block/qcow2.h: Avoid "1LL << 63" (shifts into sign bit)

2013-09-02 Thread Kevin Wolf
From: Peter Maydell The expression "1LL << 63" tries to shift the 1 into the sign bit of a 'long long', which provokes a clang sanitizer warning: runtime error: left shift of 1 by 63 places cannot be represented in type 'long long' Use "1ULL << 63" as the definition of QCOW_OFLAG_COPIED instea

[Qemu-devel] [PULL v2 03/26] qapi-types.py: Split off generate_struct_fields()

2013-09-02 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- scripts/qapi-types.py | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 5ee46ea..86de980 100644 --- a/scripts/qapi-types.py +++ b/scripts/qapi-types.py

[Qemu-devel] [PULL v2 13/26] switch raw block driver from "raw.o" to "raw_bsd.o"

2013-09-02 Thread Kevin Wolf
From: Laszlo Ersek "Incoming" function prototypes and "outgoing" function calls must match reality. Implemented using the "struct BlockDriver" definition in "include/block/block_int.h", and gcc errors & warnings. v1->v2: On 08/20/13 09:51, Kevin Wolf wrote: > Am 18.08.2013 um 16:29 hat Paolo Bo

[Qemu-devel] [PULL v2 09/26] raw_bsd: add raw_create()

2013-09-02 Thread Kevin Wolf
From: Laszlo Ersek On 08/05/13 15:03, Paolo Bonzini wrote: > > [...] > > 2) This is also a simple forwarder function: > > .bdrv_create > > but there is no BlockDriverState argument so the forwarded-to function > does not have a bs->file argument either. The forwarded-to function is > bdrv_cr

[Qemu-devel] [PULL v2 05/26] qemu-iotests: Update reference output for 051

2013-09-02 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/051.out | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index 5582ed3..86e989c 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -85,7 +85,6 @@ QEMU_PROG: -drive i

[Qemu-devel] [PULL v2 19/26] qcow2: Add corrupt bit

2013-09-02 Thread Kevin Wolf
From: Max Reitz This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/qcow2.c

[Qemu-devel] [PULL v2 04/26] Revert "block: Disable driver-specific options for 1.6"

2013-09-02 Thread Kevin Wolf
This reverts commit 8afaefb8919dc8746a57c450a758717c516c7b0a. Signed-off-by: Kevin Wolf --- blockdev.c | 143 --- tests/qemu-iotests/group | 2 +- 2 files changed, 1 insertion(+), 144 deletions(-) diff --git a/blockdev.c b/blockdev.c i

[Qemu-devel] [PULL v2 08/26] raw_bsd: emit debug events in bdrv_co_readv() and bdrv_co_writev()

2013-09-02 Thread Kevin Wolf
From: Laszlo Ersek On 08/05/13 15:03, Paolo Bonzini wrote: > > [...] > > 1) BlockDriver is a struct in which these function members are > interesting: > > .bdrv_reopen_prepare > .bdrv_co_readv > .bdrv_co_writev > .bdrv_co_is_allocated > .bdrv_co_write_zeroes > .bdrv_co_dis

[Qemu-devel] [PULL v2 10/26] raw_bsd: introduce "special members"

2013-09-02 Thread Kevin Wolf
From: Laszlo Ersek On 08/05/13 15:03, Paolo Bonzini wrote: > > [...] > > 3) These members are special > > .format_name is the string "raw" > .bdrv_open raw_open should set bs->sg to bs->file->sg and return 0 > .bdrv_closeraw_close should do nothing > .bdrv_proberaw_p

[Qemu-devel] [PULL v2 24/26] qcow2-refcount: Repair shared refcount blocks

2013-09-02 Thread Kevin Wolf
From: Max Reitz If the refcount of a refcount block is greater than one, we can at least try to repair that problem by duplicating the affected block. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/blkdebug.c | 1 + block/qcow2-refcount.c | 148 ++

[Qemu-devel] [PULL v2 14/26] block: Remove old raw driver

2013-09-02 Thread Kevin Wolf
This is unused code now. Signed-off-by: Kevin Wolf --- block/raw.c | 192 1 file changed, 192 deletions(-) delete mode 100644 block/raw.c diff --git a/block/raw.c b/block/raw.c deleted file mode 100644 index 4751825..000 --- a/bl

[Qemu-devel] [PULL v2 12/26] raw_bsd: register bdrv_raw

2013-09-02 Thread Kevin Wolf
From: Laszlo Ersek On 08/05/13 15:03, Paolo Bonzini wrote: > > [...] > > 5) Formats are registered with bdrv_register (takes a BlockDriver*). You > also need to pass the caller of bdrv_register to block_init. Fill in the BlockDriver structure with the raw_*() functions that have been added to "b

[Qemu-devel] [PULL v2 18/26] qemu-iotests: Snapshotting zero clusters

2013-09-02 Thread Kevin Wolf
From: Max Reitz This test creates an image with unallocated zero clusters, then creates a snapshot. Afterwards, there should be neither any errors nor leaks. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/062 | 64 ++

[Qemu-devel] [PULL v2 16/26] option: Add assigned flag to QEMUOptionParameter

2013-09-02 Thread Kevin Wolf
From: Max Reitz Adds an "assigned" flag to QEMUOptionParameter which is cleared at the beginning of parse_option_parameters and set on (successful) set_option_parameter and set_option_parameter_int. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- include/qemu/option.h | 1 + util/qemu-

[Qemu-devel] [PULL v2 21/26] qcow2: Employ metadata overlap checks

2013-09-02 Thread Kevin Wolf
From: Max Reitz The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 21 +

[Qemu-devel] [PULL v2 22/26] qcow2-refcount: Move OFLAG_COPIED checks

2013-09-02 Thread Kevin Wolf
From: Max Reitz Move the OFLAG_COPIED checks out of check_refcounts_l1 and check_refcounts_l2 and after the actual refcount checks/fixes (since the refcounts might actually change there). Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 115 +

[Qemu-devel] [PULL v2 26/26] qemu-iotests: Overlapping cluster allocations

2013-09-02 Thread Kevin Wolf
From: Max Reitz A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/060 | 111 + tests/qemu-iotests/060.out | 44 ++ tests/qemu-iotests/g

[Qemu-devel] [PULL v2 23/26] qcow2-refcount: Repair OFLAG_COPIED errors

2013-09-02 Thread Kevin Wolf
From: Max Reitz Since the OFLAG_COPIED checks are now executed after the refcounts have been repaired (if repairing), it is safe to assume that they are correct but the OFLAG_COPIED flag may be not. Therefore, if its value differs from what it should be (considering the according refcount), that

[Qemu-devel] [PULL v2 15/26] gluster: Abort on AIO completion failure

2013-09-02 Thread Kevin Wolf
From: Bharata B Rao Currently if gluster AIO callback thread fails to notify the QEMU thread about AIO completion, we try graceful recovery by marking the disk drive as inaccessible. This error recovery code is race-prone as found by Asias and Stefan. However as found out by Paolo, this kind of e

[Qemu-devel] [PULL v2 17/26] qcow2-refcount: Snapshot update for zero clusters

2013-09-02 Thread Kevin Wolf
From: Max Reitz Account for all cluster types in qcow2_update_snapshot_refcounts; this prevents this function from updating the refcount of unallocated zero clusters which effectively led to wrong adjustments of the refcount of cluster 0 (the main qcow2 header). This in turn resulted in images wi

[Qemu-devel] [PULL v2 20/26] qcow2: Metadata overlap checks

2013-09-02 Thread Kevin Wolf
From: Max Reitz Two new functions are added; the first one checks a given range in the image file for overlaps with metadata (main header, L1 tables, L2 tables, refcount table and blocks). The second one should be used immediately before writing to the image file as it calls the first function a

[Qemu-devel] [PATCH 1/4] monitor: introduce monitor_read_console

2013-09-02 Thread Lei Li
This patch introduces monitor_read_console(), which will drop into interactive mode with chardev ringbuf backend, and install a readline handler. When the handler is invoked, the given data will be written to ringbuf backend. Signed-off-by: Lei Li --- include/monitor/monitor.h |3 +++ monito

[Qemu-devel] [PATCH 0/4 RFC] Introduce console for ringbuf backend

2013-09-02 Thread Lei Li
This patch series aims at adding HMP console feature for ringbuf backend. It behaves like a serial console, which drops user into an interactive mode with ringbuf backend and takes user back to the monitor by the 'ctrl-]' escape sequence. It would suspend the monitor, output the data that backed

[Qemu-devel] [PULL v2 25/26] qcow2_check: Mark image consistent

2013-09-02 Thread Kevin Wolf
From: Max Reitz If no corruptions remain after an image repair (and no errors have been encountered), clear the corrupt flag in qcow2_check. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/qcow2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/qcow

[Qemu-devel] [PATCH 3/4] qemu-char: export ringbuf_count

2013-09-02 Thread Lei Li
Signed-off-by: Lei Li --- include/sysemu/char.h |2 ++ qemu-char.c |2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 8053130..ed20fe3 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -288,6

[Qemu-devel] [PATCH 2/4] hmp: factor out ringbuf_print_help()

2013-09-02 Thread Lei Li
Factor out ringbuf_print_help(), which will be called in hmp_read_ringbuf_cb() reading data that can be written with monitor_printf() to the console from ringbuf backend. Signed-off-by: Lei Li --- hmp.c | 31 +++ 1 files changed, 19 insertions(+), 12 deletions(-) d

[Qemu-devel] [PATCH 4/4] hmp: add console support for ringbuf backend

2013-09-02 Thread Lei Li
This patch add console command which would suspend the monitor, output the data that backed in the ringbuf backend to console first, and install a new readline handler to get input back to the ringbuf backend. Take back to the monitor once escape sequence 'Ctrl-]' is detected. Signed-off-by: Lei L

Re: [Qemu-devel] [PATCH] seccomp: adding a second whitelist

2013-09-02 Thread Stefan Hajnoczi
On Fri, Aug 30, 2013 at 11:42:34AM -0400, Paul Moore wrote: > On Friday, August 30, 2013 05:23:45 PM Stefan Hajnoczi wrote: > > On Fri, Aug 30, 2013 at 4:21 PM, Eduardo Otubo > wrote: > > > On 08/29/2013 05:34 AM, Stefan Hajnoczi wrote: > > >> On Wed, Aug 28, 2013 at 10:04:32PM -0300, Eduardo Otu

Re: [Qemu-devel] About coroutine inside qemu

2013-09-02 Thread Stefan Hajnoczi
On Fri, Aug 30, 2013 at 08:59:37PM +, Yaodong Yang wrote: > When a new work thread, which is not inside coroutine,  enter a > coroutine(named as A), what happened to the work thread? Is it true > that the work thread also become a coroutine, or it just stop? Later > if the coroutine A call yiel

Re: [Qemu-devel] Capture SIGSEGV to track pc.ram page access

2013-09-02 Thread Stefan Hajnoczi
On Sun, Sep 01, 2013 at 11:38:34AM +0200, Thomas Knauth wrote: > My question is where do I have to touch qemu to call my code for > handling SIGSEGVs? Is this possible at all? Can anyone suggest > alternative ways of tracking which pages of pc.ram are accessed? Maybe you can use the dirty page tra

[Qemu-devel] [PATCH V3 0/3] qemu-iotests: add test for fd passing via SCM rights

2013-09-02 Thread Wenchao Xia
This series add test case for fd passing with unix socket at runtime. Since getfd and closefd interface will interact with monitor's data, so it will help to do regression test for monitor patches. Since python2 do not support sendmsg(), so a C helper program is added to do the job. v2: 1: add m

[Qemu-devel] [PATCH V3 1/3] qemu-iotests: add unix socket help program

2013-09-02 Thread Wenchao Xia
This program can do a sendmsg call to transfer fd with unix socket, which is not supported in python2. The built binary will not be deleted in clean, but it is a existing issue in ./tests, which should be solved in another patch. Signed-off-by: Wenchao Xia --- configure

[Qemu-devel] [PATCH V3 2/3] qemu-iotests: add infrastructure of fd passing via SCM

2013-09-02 Thread Wenchao Xia
This patch make use of the compiled scm helper program to transfer fd via unix socket at runtime. Signed-off-by: Wenchao Xia --- QMP/qmp.py|6 ++ tests/qemu-iotests/check |1 + tests/qemu-iotests/iotests.py | 23 +++ 3 files changed, 30

[Qemu-devel] [PATCH V3 3/3] qemu-iotests: add tests for runtime fd passing via SCM rights

2013-09-02 Thread Wenchao Xia
This case will test whether the monitor can receive fd at runtime. To verify better, additional monitor is created to see if qemu can handler two monitor instances correctly. Signed-off-by: Wenchao Xia --- tests/qemu-iotests/045 | 36 +++- tests/qemu-iotests

Re: [Qemu-devel] [PATCH 0/6][RFC] AArch64 support for Versatile Express using KVM

2013-09-02 Thread Andreas Färber
Alex, Am 28.06.2013 15:04, schrieb Andreas Färber: > Am 28.06.2013 14:44, schrieb Peter Maydell: >> On 28 June 2013 13:20, Mian M. Hamayun >> wrote: >>> This patch series implements KVM support in QEMU for the ARMv8 Cortex >>> A57 CPU. >>> It depends on the previously submitted AArch64 Preparati

[Qemu-devel] [PATCH] spice-core: Use g_strdup_printf instead of snprintf

2013-09-02 Thread Christophe Fergeau
Several places in spice-core.c were using either g_malloc+snprintf or snprintf+g_strdup to achieve the same result as g_strdup_printf. Signed-off-by: Christophe Fergeau --- ui/spice-core.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/ui/spice-core.c

Re: [Qemu-devel] [PATCH 0/6][RFC] AArch64 support for Versatile Express using KVM

2013-09-02 Thread Peter Maydell
On 2 September 2013 10:46, Andreas Färber wrote: > Am 28.06.2013 15:04, schrieb Andreas Färber: >> Is there a 32-bit aarch64 register in ARMv8 to be accessed by TCG? If >> not, the field should be in ARMCPU and a bool rather than uint32_t. > > Care to comment on the latter? I don't suppose the us

[Qemu-devel] [PATCH v4 1/5] block: Image file option amendment

2013-09-02 Thread Max Reitz
This patch adds the "amend" option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the image format specific function. Signed-off-by: Max Reitz --- block.c | 8 + in

[Qemu-devel] [PATCH v4 2/5] qcow2-cluster: Expand zero clusters

2013-09-02 Thread Max Reitz
Add functionality for expanding zero clusters. This is necessary for downgrading the image version to one without zero cluster support. For non-backed images, this function may also just discard zero clusters instead of truly expanding them. Signed-off-by: Max Reitz --- block/qcow2-cluster.c |

[Qemu-devel] [PATCH v4 0/5] block/qcow2: Image file option amendment

2013-09-02 Thread Max Reitz
This series adds support to qemu-img, block and qcow2 for amending image options on existing image files. Depends on: - option: Add assigned flag to QEMUOptionParameter - qcow2-refcount: Snapshot update for zero clusters (series, v3) - Add metadata overlap checks (series, v5) v4: - rebased on

[Qemu-devel] [PATCH v4 3/5] qcow2: Save refcount order in BDRVQcowState

2013-09-02 Thread Max Reitz
Save the image refcount order in BDRVQcowState. This will be relevant for future code supporting different refcount orders than four and also for code that needs to verify a certain refcount order for an opened image. Signed-off-by: Max Reitz --- block/qcow2.c | 3 ++- block/qcow2.h | 1 + 2 fil

[Qemu-devel] [PATCH v4 5/5] qemu-iotest: qcow2 image option amendment

2013-09-02 Thread Max Reitz
Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- tests/qemu-iotests/061 | 178 +++ tests/qemu-iotests/061.out | 349 + tests/qemu-iotests/group | 1 + 3 files changed, 528 insertions(+) create

[Qemu-devel] [PATCH v4 4/5] qcow2: Implement bdrv_amend_options

2013-09-02 Thread Max Reitz
Implement bdrv_amend_options for compat, size, backing_file, backing_fmt and lazy_refcounts. Downgrading images from compat=1.1 to compat=0.10 is achieved through handling all incompatible flags accordingly, clearing all compatible and autoclear flags and expanding all zero clusters. Signed-off-b

Re: [Qemu-devel] [PATCH V11 1/5] throttle: Add a new throttling API implementing continuous leaky bucket.

2013-09-02 Thread Benoît Canet
> If op_size is non-zero, iops limits are merely a fixed proportion of bps > limits, which means the lower set of the two is applied and the higher > skipped. > I understand the amazon uses op_size like accounting for big IO requests, but > we don't do it condionally on io size or anything here, s

Re: [Qemu-devel] [PATCH V11 3/5] block: Enable the new throttling code in the block layer.

2013-09-02 Thread Benoît Canet
> > +/* this function drain all the throttled IOs */ > > +static bool bdrv_start_throttled_reqs(BlockDriverState *bs) > > This function is to drain the throttled reqs, but named start_throttled_reqs, > why? I took the name Stefan gave me. Best regards Benoît

[Qemu-devel] [PATCH 11/11] usb/dev-hid: Modified usb-tablet category from Misc to Input

2013-09-02 Thread Gerd Hoffmann
From: Marcel Apfelbaum usb-tablet device was wrongly assigned to Misc category Reported-by: Markus Armbruster Cc: qemu-sta...@nongnu.org Signed-off-by: Marcel Apfelbaum Reviewed-by: Andreas Färber Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[Qemu-devel] [PATCH 10/11] Revert "usb-hub: report status changes only once"

2013-09-02 Thread Gerd Hoffmann
This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3. This isn't in line with the usb specification and adds regressions, win7 fails to drive the usb hub for example. Was added because it "solved" the issue of hubs interacting badly with the xhci host controller. Now with the root cause

  1   2   3   4   >