Re: [Qemu-devel] [PATCH] virtio: Introduce virtio-testdev

2013-10-14 Thread Anup Patel
Hi Andrew, On Mon, Oct 14, 2013 at 9:29 PM, Andrew Jones wrote: > This is a virtio version of hw/misc/debugexit and should evolve into a > virtio version of pc-testdev. pc-testdev uses the PC's ISA bus, whereas > this testdev can be plugged into a virtio-mmio transport, which is > needed for kvm-

[Qemu-devel] [PULL v2 19/39] pcie_host: expose address format

2013-10-14 Thread Michael S. Tsirkin
Callers pass in the address so it's helpful for them to be able to decode it. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pcie_host.h | 21 + hw/pci/pcie_host.

[Qemu-devel] [PULL v2 36/39] pc: use new api to add builtin tables

2013-10-14 Thread Michael S. Tsirkin
At this point the only builtin table we have is the DSDT used for Q35. Signed-off-by: Michael S. Tsirkin --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d17d1d9..f8a3f0b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1114,7

[Qemu-devel] [PULL v2 35/39] acpi: add interface to access user-installed tables

2013-10-14 Thread Michael S. Tsirkin
Also add a new API to install builtin tables, so that we can distinguish between the two. Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/acpi.h | 4 hw/acpi/core.c | 40 2 files changed, 44 insertions(+) diff --git a/include/hw/acpi/

[Qemu-devel] [PULL v2 34/39] hpet: add API to find it

2013-10-14 Thread Michael S. Tsirkin
Add API to find HPET using QOM. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/hw/timer/hpet.h | 2 ++ hw/timer/hpet.c | 5 + 2 files changed, 7 insertions(+) diff --git a/incl

[Qemu-devel] [PULL v2 33/39] pvpanic: add API to access io port

2013-10-14 Thread Michael S. Tsirkin
Add API to find pvpanic device and get its io port. Will be used to fill in guest info structure. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 1 + hw/misc/pvpanic.c|

[Qemu-devel] [PULL v2 31/39] piix: APIs for pc guest info

2013-10-14 Thread Michael S. Tsirkin
This adds APIs that will be used to fill in guest acpi tables. Some required information is still lacking in QOM, so we fall back on lookups by type and returning explicit types. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-

[Qemu-devel] [PULL v2 29/39] i386: define pc guest info

2013-10-14 Thread Michael S. Tsirkin
This defines a structure that will be used to fill in acpi tables where relevant properties are not yet available using QOM. Reviewed-by: Laszlo Ersek Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin ---

[Qemu-devel] [PULL v2 39/39] ssdt-proc: update generated file

2013-10-14 Thread Michael S. Tsirkin
Update generated ssdt proc hex file (used for systems lacking IASL) after P_BLK length change. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- hw/i386/ssdt-proc.hex.generated | 10 +- 1 file

[Qemu-devel] [PULL v2 38/39] ssdt: fix PBLK length

2013-10-14 Thread Michael S. Tsirkin
We don't really support CPU throttling, so supply 0 PBLK length. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- hw/i386/ssdt-proc.dsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[Qemu-devel] [PULL v2 32/39] ich9: APIs for pc guest info

2013-10-14 Thread Michael S. Tsirkin
This adds APIs that will be used to fill in acpi tables, implemented using QOM, to various ich9 components. Some information is still missing in QOM, so we fall back on lookups by type instead. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammed

[Qemu-devel] [PULL v2 27/39] i386: add bios linker/loader

2013-10-14 Thread Michael S. Tsirkin
This adds a dynamic bios linker/loader. This will be used by acpi table generation code to: - load each table in the appropriate memory segment - link tables to each other - fix up checksums after said linking Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mamm

[Qemu-devel] [PULL v2 20/39] q35: use macro for MCFG property name

2013-10-14 Thread Michael S. Tsirkin
Useful to make it accessible through QOM. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pcie_host.h | 2 ++ hw/pci-host/q35.c | 2 +- 2 files changed, 3 insertions(+), 1 de

[Qemu-devel] [PULL v2 30/39] acpi/piix: add macros for acpi property names

2013-10-14 Thread Michael S. Tsirkin
Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 10 ++ hw/acpi/piix4.c | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/hw/i386

[Qemu-devel] [PULL v2 17/39] loader: support for unmapped ROM blobs

2013-10-14 Thread Michael S. Tsirkin
Support ROM blobs not mapped into guest memory: same as ROM files really but use caller's buffer. Support invoking callback on access and return memory pointer making it easier for caller to update memory if necessary. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Laszlo Erse

[Qemu-devel] [PULL v2 14/39] qom: add pointer to int property helpers

2013-10-14 Thread Michael S. Tsirkin
Make it easy to add read-only helpers for simple integer properties in memory. Reviewed-by: Paolo Bonzini Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/qom/object.h | 21 +

[Qemu-devel] [PULL v2 28/39] loader: allow adding ROMs in done callbacks

2013-10-14 Thread Michael S. Tsirkin
Don't abort if machine done callbacks add ROMs. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/hw/loader.h | 1 + hw/core/loader.c| 6 +- vl.c| 3 +++ 3 files change

[Qemu-devel] [PULL v2 26/39] loader: use file path size from fw_cfg.h

2013-10-14 Thread Michael S. Tsirkin
Avoid a bit of code duplication, make max file path constant reusable. Suggested-by: Laszlo Ersek Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/hw/nvram/fw_cfg.h | 4 +++- hw/core/loader.

[Qemu-devel] [PULL v2 15/39] pci: fix up w64 size calculation helper

2013-10-14 Thread Michael S. Tsirkin
BAR base was calculated incorrectly. Use existing pci_bar_address to get it right. Tested-by: Igor Mammedov Reviewed-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- hw/pci/pci.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/pci/pci.c b/hw/

[Qemu-devel] [PULL v2 13/39] qom: cleanup struct Error references

2013-10-14 Thread Michael S. Tsirkin
now that a typedef for struct Error is available, use it in qom/object.h to match coding style rules. Reviewed-by: Paolo Bonzini Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/qom/object.h

[Qemu-devel] [PULL v2 08/39] hw/vfio: set interrupts using pci irq wrappers

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum pci_set_irq and the other pci irq wrappers use PCI_INTERRUPT_PIN config register to compute device INTx pin to assert/deassert. save INTX pin into the config register before calling pci_set_irq Signed-off-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- hw/mi

[Qemu-devel] [PULL v2 12/39] cleanup object.h: include error.h directly

2013-10-14 Thread Michael S. Tsirkin
From: Igor Mammedov qapi/error.h is simple enough to be included in qom/object.h direcly and prepares qom/object.h to use Error typedef. Signed-off-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/qom/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PULL v2 25/39] acpi: ssdt pcihp: updat generated file

2013-10-14 Thread Michael S. Tsirkin
update generated file, not sure what changed Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- hw/i386/ssdt-pcihp.hex.generated | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --gi

[Qemu-devel] [PULL v2 10/39] hw/pcie: AER and hot-plug events must use device's interrupt

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The fields hpev_intx and aer_intx were removed because both AER and hot-plug events must use device's interrupt. Assert/deassert interrupts using pci irq wrappers instead. Signed-off-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pcie.h | 18 -

[Qemu-devel] [PULL v2 09/39] hw: set interrupts using pci irq wrappers

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum pci_set_irq and the other pci irq wrappers use PCI_INTERRUPT_PIN config register to compute device INTx pin to assert/deassert. An irq is allocated using pci_allocate_irq wrapper only if is needed by non pci devices. Removed irq related fields from state if not used anymo

[Qemu-devel] [PULL v2 07/39] hw/vmxnet3: set interrupts using pci irq wrappers

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum pci_set_irq uses PCI_INTERRUPT_PIN config register to compute device INTx pin to assert/deassert. An assert is used to ensure that intx received from the quest OS corresponds to PCI_INTERRUPT_PIN. Signed-off-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- hw

[Qemu-devel] [PULL v2 21/39] q35: expose mmcfg size as a property

2013-10-14 Thread Michael S. Tsirkin
Address is already exposed, expose size for symmetry. Reviewed-by: Gerd Hoffmann Tested-by: Gerd Hoffmann Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pcie_host.h | 1 + hw/pci-host/q35.c | 14 ++ 2 files chang

[Qemu-devel] [PULL v2 11/39] hw/pci: removed irq field from PCIDevice

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Instead of exposing the the irq field, pci wrappers to qemu_set_irq or qemu_irq_* can be used. Signed-off-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 3 --- hw/pci/pci.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/

[Qemu-devel] [PULL v2 06/39] hw/pci-bridge: set PCI_INTERRUPT_PIN register before shpc init

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The PCI_INTERRUPT_PIN will be used by shpc init, so was moved before the call to shpc_init. Signed-off-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- hw/pci-bridge/pci_bridge_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-br

[Qemu-devel] [PULL v2 04/39] hw/core: Add interface to allocate and free a single IRQ

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum qemu_allocate_irq returns a single qemu_irq. The interface allows to specify an interrupt number. qemu_free_irq frees it. Signed-off-by: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- include/hw/irq.h | 7 +++ hw/core/irq.c| 16 2 file

[Qemu-devel] [PULL v2 05/39] hw/pci: add pci wrappers for allocating and asserting irqs

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Interrupt pin is selected and saved into PCI_INTERRUPT_PIN register during device initialization. Devices should not call directly qemu_set_irq and specify the INTx pin on each call. Added pci_* wrappers to replace qemu_set_irq, qemu_irq_raise, qemu_irq_lower and qemu_irq_

[Qemu-devel] [PULL v2 01/39] memory: Change MemoryRegion priorities from unsigned to signed

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum When memory regions overlap, priority can be used to specify which of them takes priority. By making the priority values signed rather than unsigned, we make it more convenient to implement a situation where one "background" region should appear only where no other region e

[Qemu-devel] [PULL v2 02/39] docs/memory: Explictly state that MemoryRegion priority is signed

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum When memory regions overlap, priority can be used to specify which of them takes priority. By making the priority values signed rather than unsigned, we make it more convenient to implement a situation where one "background" region should appear only where no other region e

[Qemu-devel] [PULL v2 03/39] hw/pci: partially handle pci master abort

2013-10-14 Thread Michael S. Tsirkin
From: Marcel Apfelbaum A MemoryRegion with negative priority was created and it spans over all the pci address space. It "intercepts" the accesses to unassigned pci address space and will follow the pci spec: 1. returns -1 on read 2. does nothing on write Note: setting the RECEIVED MASTER ABOR

[Qemu-devel] [PULL v2 00/39] pci, pc, acpi fixes, enhancements

2013-10-14 Thread Michael S. Tsirkin
This is resend of pull request from oct 14. Changes from v1: - removed reviewed-by tags from compiled file changes. only tested-by makes sense - dropped pci bridge hotplug support for now Anthony feels it needs more review. In absense of bridge hotplug the main point of the ser

Re: [Qemu-devel] [PATCH 2/2] virtio: refresh registers at reset time

2013-10-14 Thread Rusty Russell
Greg Kurz writes: > We need to support the guest endianness as soon as a virtio device shows > up. Alex suggested this can achieved by calling cpu_synchronize_state(). > > To have it working on PowerPC, we need to add LPCR in the sync register > functions. > > Signed-off-by: Greg Kurz Excellent!

Re: [Qemu-devel] [PATCH v2] net/net: Change the default mac address of nic

2013-10-14 Thread Stefan Weil
Am 15.10.2013 07:57, schrieb mike: > On 10/15/2013 01:07 PM, Stefan Weil wrote: >> Am 15.10.2013 06:17, schrieb Mike Qiu: >>> Changelog to v1: >>> Find remainder of macaddr->a[5] by modulo 256, >>> otherwise it may be overflow by add index++. >>> >>> The default mac address is 52:54:00:12:3

Re: [Qemu-devel] [PATCH v2] net/net: Change the default mac address of nic

2013-10-14 Thread mike
On 10/15/2013 01:07 PM, Stefan Weil wrote: Am 15.10.2013 06:17, schrieb Mike Qiu: Changelog to v1: Find remainder of macaddr->a[5] by modulo 256, otherwise it may be overflow by add index++. The default mac address is 52:54:00:12:34:56 + index, this will cause problem that when

[Qemu-devel] [PATCH V4 3/6] qcow2: do not free clusters when fail in header update in qcow2_write_snapshots

2013-10-14 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- block/qcow2-snapshot.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index 4bd494b..c933b7f 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -304,6 +304,13 @@ static

[Qemu-devel] [PATCH V4 5/6] blkdebug: add debug events for snapshot

2013-10-14 Thread Wenchao Xia
Some code in qcow2-snapshot.c directly access bs->file, so in those points error can't be injected by other events. Since the code in qcow2-snapshot.c is qcow2's internal detail similar as L1 table, so add some debug events. Signed-off-by: Wenchao Xia --- block/blkdebug.c |4 bloc

[Qemu-devel] [PATCH V4 2/6] qcow2: add error message in qcow2_write_snapshots()

2013-10-14 Thread Wenchao Xia
The function still returns int since qcow2_snapshot_delete() will return the number. Signed-off-by: Wenchao Xia --- block/qcow2-snapshot.c | 48 ++-- 1 files changed, 42 insertions(+), 6 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2

[Qemu-devel] [PATCH V4 4/6] qcow2: cancel the modification on fail in qcow2_snapshot_create()

2013-10-14 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- block/qcow2-snapshot.c | 25 + 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index c933b7f..6d0ffd4 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -404,6

[Qemu-devel] [PATCH V4 6/6] qemu-iotests: add test for qcow2 snapshot

2013-10-14 Thread Wenchao Xia
This test will focus on the low level procedure of qcow2 snapshot operations, now it covers only the create operation. Overlap error paths are not checked since no good way to trigger those errors. Signed-off-by: Wenchao Xia --- tests/qemu-iotests/068 | 214 +++

[Qemu-devel] [PATCH V4 1/6] snapshot: add parameter *errp in snapshot create

2013-10-14 Thread Wenchao Xia
The return value is only used for error report before this patch, so change the function protype to return void. Signed-off-by: Wenchao Xia --- block/qcow2-snapshot.c| 27 +++ block/qcow2.h |4 +++- block/rbd.c | 21 --

[Qemu-devel] [PATCH V4 0/6] qcow2: rollback the modification on fail in snapshot creation

2013-10-14 Thread Wenchao Xia
V2: 1: all fail case will goto fail section. 2: add the goto code. v3: Address Stefan's comments: 2: don't goto fail after allocation failure. 3: use sn->l1size correctly in qcow2_free_cluster(). 4-7: add test case to verify the error paths. Other: 1: new patch fix a existing bug, w

Re: [Qemu-devel] [PULL 00/43] pci, pc, acpi fixes, enhancements

2013-10-14 Thread Michael S. Tsirkin
On Mon, Oct 14, 2013 at 03:42:37PM -0700, Anthony Liguori wrote: > This is a huge series and I still am not convinced this is the right > path forward. Also, this kind of response is quite unexpected after this direction was discussed multiple times and largely agreed upon on the phone meeting, an

Re: [Qemu-devel] [PULL 00/43] pci, pc, acpi fixes, enhancements

2013-10-14 Thread Michael S. Tsirkin
On Mon, Oct 14, 2013 at 03:42:37PM -0700, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > Anthony, I know you wanted to review some of the patches, > > since you didn't respond either all's well or you > > could not find the time. > > I think we are better off merging them for 1.7 and

Re: [Qemu-devel] [PATCH v6 2/5] hpet: enable to entitle more irq pins for hpet

2013-10-14 Thread liu ping fan
On Mon, Oct 14, 2013 at 10:18 PM, Michael S. Tsirkin wrote: > On Fri, Oct 11, 2013 at 10:59:40AM +0800, liu ping fan wrote: >> On Thu, Oct 10, 2013 at 7:41 PM, Michael S. Tsirkin wrote: >> > On Thu, Oct 10, 2013 at 11:46:42AM +0200, Paolo Bonzini wrote: >> >> Il 10/10/2013 11:41, Michael S. Tsirk

Re: [Qemu-devel] [PULL 25/43] acpi: ssdt pcihp: updat generated file

2013-10-14 Thread Michael S. Tsirkin
On Mon, Oct 14, 2013 at 03:32:43PM -0700, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > update generated file, not sure what changed > > > > Reviewed-by: Gerd Hoffmann > > Tested-by: Gerd Hoffmann > > Reviewed-by: Igor Mammedov > > Tested-by: Igor Mammedov > > Signed-off-by: Mic

Re: [Qemu-devel] [PULL 41/43] pcihp: generalization of piix4 acpi

2013-10-14 Thread Michael S. Tsirkin
On Mon, Oct 14, 2013 at 03:36:13PM -0700, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > Add ACPI based PCI hotplug library with bridge hotplug > > support. > > Design > >- each bus gets assigned "bsel" property. > >- ACPI code writes this number > > to a new BNUM regist

Re: [Qemu-devel] [PATCH v2] net/net: Change the default mac address of nic

2013-10-14 Thread Stefan Weil
Am 15.10.2013 06:17, schrieb Mike Qiu: > Changelog to v1: > Find remainder of macaddr->a[5] by modulo 256, > otherwise it may be overflow by add index++. > > The default mac address is 52:54:00:12:34:56 + index, this will > cause problem that when we boot up more than one guest with all

[Qemu-devel] [PATCH v2] net/net: Change the default mac address of nic

2013-10-14 Thread Mike Qiu
Changelog to v1: Find remainder of macaddr->a[5] by modulo 256, otherwise it may be overflow by add index++. The default mac address is 52:54:00:12:34:56 + index, this will cause problem that when we boot up more than one guest with all mac addresses unset by default, assume that e

Re: [Qemu-devel] [PATCH] hmp: Add '\n' in monitor_printf()

2013-10-14 Thread mike
On 10/14/2013 10:36 PM, Markus Armbruster wrote: Mike Qiu writes: Without this, output of 'info block' scsi0-hd0: /images/f18-ppc64.qcow2 (qcow2) [not inserted] scsi0-cd2: [not inserted] Removable device: not locked, tray closed floppy0: [not inserted] Removable device: not locke

Re: [Qemu-devel] [PATCH v2] mirror: drop local_err in mirror_complete

2013-10-14 Thread Fam Zheng
On Mon, 10/14 21:05, Eric Blake wrote: > On 10/14/2013 08:23 PM, Fam Zheng wrote: > > There is errp passed in, so no need for local_err and error_propagate. > > Also drop the backing_filename which is set but unused since 34b5d2c. > > > > Signed-off-by: Fam Zheng > > > > -- > > Three dashes ins

Re: [Qemu-devel] [PATCH v2] mirror: drop local_err in mirror_complete

2013-10-14 Thread Eric Blake
On 10/14/2013 08:23 PM, Fam Zheng wrote: > There is errp passed in, so no need for local_err and error_propagate. > Also drop the backing_filename which is set but unused since 34b5d2c. > > Signed-off-by: Fam Zheng > > -- Three dashes instead of two before 'git am' will notice that the rest of

[Qemu-devel] [PATCH] .gitignore: ignore qmp-commands.txt

2013-10-14 Thread Fam Zheng
This file is moved out from QMP/ to BUILD dir, change the ignore file too. Signed-off-by: Fam Zheng --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8e1b73f..5584b5f 100644 --- a/.gitignore +++ b/.gitignore @@ -44,7 +44,7 @@ qemu-ga

[Qemu-devel] [PATCH] qemu-iotests: fix 030 for faster machines

2013-10-14 Thread Fam Zheng
If the block job completes too fast, the test can fail. Change the numbers so the qmp events are more stably captured by the script. A sleep is removed for the same reason. Signed-off-by: Fam Zheng --- tests/qemu-iotests/030 | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) dif

[Qemu-devel] [PATCH v2] mirror: drop local_err in mirror_complete

2013-10-14 Thread Fam Zheng
There is errp passed in, so no need for local_err and error_propagate. Also drop the backing_filename which is set but unused since 34b5d2c. Signed-off-by: Fam Zheng -- v2: fix typo in subject line. drop backing_filename. (Thanks Eric) Signed-off-by: Fam Zheng --- block/mirror.c | 7 +

Re: [Qemu-devel] [PATCH] mirror: drop local_err in mirror_compelte

2013-10-14 Thread Fam Zheng
On Mon, 10/14 07:52, Eric Blake wrote: > On 10/12/2013 12:33 AM, Fam Zheng wrote: > > There is errp passed in, so no need for local_err and error_propagate. > > s/compelte/complete/ in the subject > > > > > Signed-off-by: Fam Zheng > > --- > > block/mirror.c | 4 +--- > > 1 file changed, 1 ins

[Qemu-devel] [PATCH] blockdev: fix cdrom read_only flag

2013-10-14 Thread Fam Zheng
Since 0ebd24e0, cdrom doesn't have read-only on by default, which will error out when using an read only image. Fix it by setting the default value when parsing opts. Reported-by: Edivaldo de Araujo Pereira Signed-off-by: Fam Zheng --- blockdev.c | 7 --- 1 file changed, 4 insertions(+), 3

Re: [Qemu-devel] [PATCH] rdma: fix multiple VMs parallel migration

2013-10-14 Thread Michael R. Hines
On 10/10/2013 09:06 PM, Zhanghaoyu (A) wrote: When several VMs migrate with RDMA at the same time, the increased pressure cause packet loss probabilistically and make source and destination wait for each other. There might be some of VMs blocked during the migration. Fix the bug by using two co

Re: [Qemu-devel] blockdev.c - bug

2013-10-14 Thread Fam Zheng
On Mon, 10/14 17:28, Edivaldo de Araujo Pereira wrote: > Dear qemu developers, > > > I've noticed about 3 days ago a bug, apparently introduced by the last > massive modifications in blockdev.c, that prevents the use of a cdrom ISO > without write permission, like in "qemu-system-i386 -cdrom /s

[Qemu-devel] blockdev.c - bug

2013-10-14 Thread Edivaldo de Araujo Pereira
Dear qemu developers, I've noticed about 3 days ago a bug, apparently introduced by the last massive modifications in blockdev.c, that prevents the use of a cdrom ISO without write permission, like in "qemu-system-i386 -cdrom /some.iso ...", giving the message "could not open disk image /bpd/b

[Qemu-devel] [PATCH v2] target-lm32: move model features to LM32CPU

2013-10-14 Thread Michael Walle
This allows us to completely remove CPULM32State from DisasContext. Instead, copy the fields we need to DisasContext. Cc: Andreas Färber Signed-off-by: Michael Walle --- changes since v1: - instead of storing a pointer to the cpu definitions, register individual cpu types and store features

Re: [Qemu-devel] [PULL 00/43] pci, pc, acpi fixes, enhancements

2013-10-14 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > Anthony, I know you wanted to review some of the patches, > since you didn't respond either all's well or you > could not find the time. > I think we are better off merging them for 1.7 and then - worst case, > if major issues surface - disabling the functionality a

Re: [Qemu-devel] [PULL 41/43] pcihp: generalization of piix4 acpi

2013-10-14 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > Add ACPI based PCI hotplug library with bridge hotplug > support. > Design >- each bus gets assigned "bsel" property. >- ACPI code writes this number > to a new BNUM register, then uses existing > UP/DOWN registers to probe slot status; > to e

Re: [Qemu-devel] [PULL 25/43] acpi: ssdt pcihp: updat generated file

2013-10-14 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > update generated file, not sure what changed > > Reviewed-by: Gerd Hoffmann > Tested-by: Gerd Hoffmann > Reviewed-by: Igor Mammedov > Tested-by: Igor Mammedov > Signed-off-by: Michael S. Tsirkin How in the world did this get reviewed by's Regards, Anthon

Re: [Qemu-devel] [RFC PATCH] drive-backup 'stream' mode

2013-10-14 Thread Eric Blake
On 10/14/2013 02:10 PM, Wolfgang Richter wrote: >> >> Add the designation '(since 1.7)' to make it obvious when this mode was >> introduced. > > Done. Is it better to place the updated patch in this thread or start > a new one? http://wiki.qemu.org/Contribute/SubmitAPatch suggests submitting a

Re: [Qemu-devel] [RFC PATCH] drive-backup 'stream' mode

2013-10-14 Thread Wolfgang Richter
On Sat, Oct 12, 2013 at 1:47 AM, Fam Zheng wrote: > While mirroring write is a good idea, doing it with drive-backup is probably > not. The function of this command is to 'backup' the image with existing data, > instead of new data. With your 'stream' mode, this semantic is changed. I'm not so su

Re: [Qemu-devel] [RFC PATCH] drive-backup 'stream' mode

2013-10-14 Thread Wolfgang Richter
On Fri, Oct 11, 2013 at 11:38 AM, Eric Blake wrote: > On 10/11/2013 09:18 AM, Wolfgang Richter wrote: >> Idea: Introduce a mode for drive-backup that duplicates writes to >> another target, not CoW. It is useful for introspecting (my use >> case), and for keeping a remote block device in sync wit

[Qemu-devel] [RFC PATCH v3 3/5] Adapt Makefiles to the new LTTng ust interface.

2013-10-14 Thread Mohamad Gebai
Add generation of new files for LTTng ust. Signed-off-by: Mohamad Gebai --- Makefile|5 + trace/Makefile.objs | 29 +++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 60fb87e..0c797c5 100644 --- a/Makefile

[Qemu-devel] [RFC PATCH v3 2/5] Modified the tracetool framework for LTTng 2.x.

2013-10-14 Thread Mohamad Gebai
* A new format is required to generate definitions for ust tracepoints. Files ust_events_h.py and ust_events_c.py define common macros, while new function ust_events_h in events.py does the actual definition of each tracepoint. * ust.py generates the new interface for calling userspace tracep

[Qemu-devel] [RFC PATCH v3 5/5] Add ust generated files to .gitignore

2013-10-14 Thread Mohamad Gebai
Signed-off-by: Mohamad Gebai --- .gitignore |2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 8e1b73f..e024a76 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ trace/generated-tracers-dtrace.h trace/generated-tracers.dtrace trace/generated-events.h

[Qemu-devel] [RFC PATCH v3 0/5] Fix UST backend for LTTng 2.x

2013-10-14 Thread Mohamad Gebai
Version 3 * Change component name to avoid potential namespace collision with another project. * Update ust documentation in docs/tracing.txt. * Add ust generated files to .gitignore. Mohamad Gebai (5): Fix configure script for LTTng 2.x Modified the tracetool framework for LTTng 2.x. Ada

[Qemu-devel] [RFC PATCH v3 1/5] Fix configure script for LTTng 2.x

2013-10-14 Thread Mohamad Gebai
Signed-off-by: Mohamad Gebai --- configure |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 23dbaaf..627054c 100755 --- a/configure +++ b/configure @@ -3287,15 +3287,14 @@ fi # For 'ust' backend, test if ust headers are present if test

[Qemu-devel] [RFC PATCH v3 4/5] Update documentation for LTTng ust tracing

2013-10-14 Thread Mohamad Gebai
Signed-off-by: Mohamad Gebai --- docs/tracing.txt | 31 +++ 1 file changed, 31 insertions(+) diff --git a/docs/tracing.txt b/docs/tracing.txt index bfc261b..64683db 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -214,6 +214,37 @@ The "ust" backend uses the

Re: [Qemu-devel] [PATCH qom-cpu 00/21 v9] target-i386: convert CPU features into properties

2013-10-14 Thread Andreas Färber
Am 14.10.2013 14:09, schrieb Igor Mammedov: > On Tue, 16 Jul 2013 00:25:53 +0200 > Igor Mammedov wrote: > >> It's reordered and rebased v8 plus CPUID feature bits conversion to >> properties >> and cleanups that are removing unused anymore *_feature_name arrays. >> >> dynamic => static propertie

Re: [Qemu-devel] [PULL v2 06/11] target-lm32: kill cpu_abort() calls

2013-10-14 Thread Andreas Färber
Am 14.10.2013 18:29, schrieb Michael Walle: > Instead of killing QEMU, translate instructions which are not available on > the CPU model as a noop and issue a log message at translation time. > > On the real hardware CPU unknown opcodes results in undefined behaviour. > > These changes prepare th

Re: [Qemu-devel] [PULL v2 05/11] milkymist-vgafb: swap pixel data in source buffer

2013-10-14 Thread Michael Walle
Am Montag, 14. Oktober 2013, 19:05:25 schrieb Richard Henderson: > On 10/14/2013 09:29 AM, Michael Walle wrote: > > +#ifndef HOST_WORDS_BIGENDIAN > > +rgb565 = bswap16(rgb565); > > +#endif > > be16_to_cpu, no ifdef needed. > > > r~ Thanks. I'll update the patch. -- michael

Re: [Qemu-devel] [PULL v2 00/11] target-lm32 updates

2013-10-14 Thread Michael Walle
Am Montag, 14. Oktober 2013, 18:29:24 schrieb Michael Walle: > This is a pull for various updates and fixes for the LatticeMico32 target. > > Please pull. > > changes since v1: > - rebased > - dropped patch "target-lm32: register helper functions". This is >no longer needed. > - added pat

Re: [Qemu-devel] [PULL v2 07/11] target-lm32: move model features to LM32CPU

2013-10-14 Thread Andreas Färber
Hi, Am 14.10.2013 18:29, schrieb Michael Walle: > This allows us to completely remove CPULM32State from DisasContext. > Instead, copy the fields we need to DisasContext. > > Cc: Andreas Färber > Signed-off-by: Michael Walle Sorry for not getting to review this earlier. The subject makes it so

Re: [Qemu-devel] [PULL v2 05/11] milkymist-vgafb: swap pixel data in source buffer

2013-10-14 Thread Richard Henderson
On 10/14/2013 09:29 AM, Michael Walle wrote: > +#ifndef HOST_WORDS_BIGENDIAN > +rgb565 = bswap16(rgb565); > +#endif be16_to_cpu, no ifdef needed. r~

Re: [Qemu-devel] [RFC PATCH v2 0/3] Fix UST backend for LTTng 2.x

2013-10-14 Thread Mohamad Gebai
Sorry for the delay, just submitted the updated documentation. Thanks, Mohamad On 13-10-07 08:36 AM, Alex Bennée wrote: mohamad.ge...@gmail.com writes: Version 2 * Fix tracepoint generation error in first version. * Avoid warnings and errors specific to LTTng ust 2.0. * If using LTTng ust 2.

[Qemu-devel] [RFC PATCH] Update documentation for LTTng ust tracing

2013-10-14 Thread Mohamad Gebai
Signed-off-by: Mohamad Gebai --- docs/tracing.txt | 31 +++ 1 file changed, 31 insertions(+) diff --git a/docs/tracing.txt b/docs/tracing.txt index bfc261b..cbb3aaf 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -214,6 +214,37 @@ The "ust" backend uses the

[Qemu-devel] [PATCH 4/5] vmstate: Use version_id when saving

2013-10-14 Thread Eduardo Habkost
This will allow fields to have version_id > vmsd->version_id, to allow us to support loading data with higher version_id. This patch alone is not useful by itself, but it will be useful when introducing the max_version_id field to VMStateDescription. Signed-off-by: Eduardo Habkost --- savevm.c

[Qemu-devel] [PATCH 2/5] vmstate: Replace while (...) with for (...)

2013-10-14 Thread Eduardo Habkost
This will make it easier to add code that skips some fields, by simply using "continue". Signed-off-by: Eduardo Habkost --- savevm.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/savevm.c b/savevm.c index 208e7c2..9562669 100644 --- a/savevm.c +++ b/savevm.c @@ -

[Qemu-devel] [PATCH 3/5] vmstate: Simplify field-skipping load/save logic

2013-10-14 Thread Eduardo Habkost
This makes the code more readable, making each condition that makes a field be skipped much more visible, and reduces one level of indentation in the code. Signed-off-by: Eduardo Habkost --- savevm.c | 156 --- 1 file changed, 80 insert

[Qemu-devel] [PATCH 5/5] vmstate: Add max_version_id field to VMStateDescription

2013-10-14 Thread Eduardo Habkost
This will allow us to load data that has a high version_id, while using a lower version_id when saving. Useful in case we need to revert vmstate changes but keep compatibility with QEMU versions that had a higher version_id. Signed-off-by: Eduardo Habkost --- include/migration/vmstate.h | 1 +

[Qemu-devel] [PATCH 0/5] vmstate: Add max_version_id field

2013-10-14 Thread Eduardo Habkost
This series cleans up the vmstate save/load code a little, and adds a max_version_id field to VMStateDescription. This will be useful in case we need to revert vmstate changes but keep compatibility with QEMU versions that had a higher version_id. No existing behavior will be changed by code that

[Qemu-devel] [PATCH 1/5] savevm: Coding style line length fix

2013-10-14 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- savevm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/savevm.c b/savevm.c index 2f631d4..208e7c2 100644 --- a/savevm.c +++ b/savevm.c @@ -1729,7 +1729,8 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,

Re: [Qemu-devel] [PATCH v13 5/8] module: implement module loading

2013-10-14 Thread Paolo Bonzini
Il 11/10/2013 03:16, Fam Zheng ha scritto: > This patch adds loading, stamp checking and initialization of modules. > > The init function of dynamic module is no longer directly called as > __attribute__((constructor)) in static linked version, it is called > only after passed the checking of pres

[Qemu-devel] [PULL v2 09/11] lm32_sys: print test result on stderr

2013-10-14 Thread Michael Walle
Do not use qemu_log(). Signed-off-by: Michael Walle --- hw/misc/lm32_sys.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/lm32_sys.c b/hw/misc/lm32_sys.c index 8176cdb..6af0cca 100644 --- a/hw/misc/lm32_sys.c +++ b/hw/misc/lm32_sys.c @@ -80,7 +80,7 @@ static void

[Qemu-devel] [PULL v2 08/11] target-lm32: add breakpoint/watchpoint support

2013-10-14 Thread Michael Walle
This patch adds in-target breakpoint and watchpoint support. Signed-off-by: Michael Walle --- target-lm32/TODO|2 -- target-lm32/cpu.c |1 + target-lm32/cpu.h | 27 -- target-lm32/helper.c| 89 +++ target

Re: [Qemu-devel] [PATCH v2] map 64-bit PCI BARs at location provided by emulator

2013-10-14 Thread Michael S. Tsirkin
On Mon, Oct 14, 2013 at 06:15:25PM +0200, Igor Mammedov wrote: > On Mon, 14 Oct 2013 17:00:47 +0300 > "Michael S. Tsirkin" wrote: > > > On Mon, Oct 14, 2013 at 03:04:45PM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > > > > > > > To me it makes more sense to just go the direct route and

[Qemu-devel] [PULL v2 05/11] milkymist-vgafb: swap pixel data in source buffer

2013-10-14 Thread Michael Walle
In commit fc97bb5ba3e7239c0b6d24095df6784868dfebbf the lduw_raw() call was eliminated. But we are reading from the target buffer a 16-bit value, which is in big-endian format. Therefore, swap the bytes if we are building for a little-endian host. Cc: Paolo Bonzini Signed-off-by: Michael Walle --

Re: [Qemu-devel] [RFC PATCH v2 3/6] hw: arm_gic: Keep track of SGI sources

2013-10-14 Thread Peter Maydell
On 14 October 2013 16:36, Peter Maydell wrote: > Are you sure the logic in this function is right? (ie that we > should only clear the sgi_source[][] bit for this source, and > not completely? If nothing else, I think the interrupt should > stay pending if some other source cpu still wants it to b

[Qemu-devel] [PULL v2 02/11] tests: lm32: new rule for single test cases

2013-10-14 Thread Michael Walle
Introduce new target "check_%" to run indiviudal test caes, eg. make check_mmu Signed-off-by: Michael Walle --- tests/tcg/lm32/Makefile |3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/tcg/lm32/Makefile b/tests/tcg/lm32/Makefile index 9a00ef7..19e0664 100644 --- a/tests/tcg/lm32

[Qemu-devel] [PULL v2 10/11] lm32_sys: dump cpu state if test case fails

2013-10-14 Thread Michael Walle
This will ease debugging the test cases. Signed-off-by: Michael Walle --- hw/misc/lm32_sys.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/misc/lm32_sys.c b/hw/misc/lm32_sys.c index 6af0cca..1fd69ff 100644 --- a/hw/misc/lm32_sys.c +++ b/hw/misc/lm32_sys.c @@ -81,6 +81,9 @@ static

[Qemu-devel] [PULL v2 11/11] target-lm32: stop VM on illegal or unknown instruction

2013-10-14 Thread Michael Walle
Instead of translating the instruction to a no-op, pause the VM and display a message to the user. As a side effect, this also works for instructions where the operands are only known at runtime. Signed-off-by: Michael Walle --- target-lm32/helper.h|1 + target-lm32/op_helper.c | 17 +

[Qemu-devel] [PULL v2 07/11] target-lm32: move model features to LM32CPU

2013-10-14 Thread Michael Walle
This allows us to completely remove CPULM32State from DisasContext. Instead, copy the fields we need to DisasContext. Cc: Andreas Färber Signed-off-by: Michael Walle --- target-lm32/cpu-qom.h |1 + target-lm32/cpu.h | 12 +--- target-lm32/helper.c| 15 ++-

  1   2   3   >