[Qemu-devel] [PATCH qom v4 1/2] qom: object_property_add: Add automatic arrayification

2014-08-19 Thread Peter Crosthwaite
If "[*]" is given as the last part of a QOM property name, treat that as an array property. The added property is given the first available name, replacing the * with a decimal number counting from 0. First add with name "foo[*]" will be "foo[0]". Second "foo[1]" and so on. Callers may inspect th

[Qemu-devel] [PATCH qom v4 2/2] memory: remove object_property_add_child_array

2014-08-19 Thread Peter Crosthwaite
Obsoleted by automatic object_property_add arrayification. Reviewed-by: Paolo Bonzini Signed-off-by: Peter Crosthwaite --- memory.c | 30 +- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/memory.c b/memory.c index d0966c0..4053c4b 100644 --- a/memory

[Qemu-devel] [PATCH qom v4 0/2] Arrayify QOM properties.

2014-08-19 Thread Peter Crosthwaite
Resending with addition of this cover letter (for those who rely on patches tool for series review). Changed since v3: Added cover letter. Regards, Peter Peter Crosthwaite (2): qom: object_property_add: Add automatic arrayification memory: remove object_property_add_child_array memory.c

[Qemu-devel] [PATCH 3/3] ioh3420: Support ARI forwarding

2014-08-19 Thread Knut Omang
Enable the PCIe capability bit that indicates that this port is able to support and forward requests to > 8 functions for ARI capable devices. Signed-off-by: Knut Omang --- hw/pci-bridge/ioh3420.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge

[Qemu-devel] [PATCH 2/3] ioh3420: Provide a unique bus name and an interrupt mapping function

2014-08-19 Thread Knut Omang
A unique bus name is necessary to be able to refer to each instance from the command line and monitors. Signed-off-by: Knut Omang --- hw/pci-bridge/ioh3420.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c index 7cd87fc..8f6c8b0 100644 -

[Qemu-devel] [PATCH 1/3] pcie: Fix next function setting

2014-08-19 Thread Knut Omang
PCI_ARI_CAP_NFN is for reading next function not writing it Signed-off-by: Knut Omang --- hw/pci/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index a123c01..de0e967 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -630,5 +630,5

[Qemu-devel] [PATCH 0/3] q35: Minor fixes/enhancements to improve usability of root ports

2014-08-19 Thread Knut Omang
These are some minor fixes necessary to be able to operate ARI capable devices in PCIe root ports on a q35 machine, using command line options like this: -device ioh3420,slot=0 -device ioh3420,slot=1 -device ,bus=pcie_port.0 -device ,bus=pcie_port.1 Knut Omang (3): pcie: Fix next function setti

Re: [Qemu-devel] [PATCH V4] spapr: Fix stale HTAB during live migration

2014-08-19 Thread Alexey Kardashevskiy
On 08/20/2014 12:13 PM, Samuel Mendoza-Jonas wrote: > If a guest reboots during a running migration, changes to the > hash page table are not necessarily updated on the destination. > Opening a new file descriptor to the HTAB forces the migration > handler to resend the entire table. > > Signed-of

Re: [Qemu-devel] [Question] Why doesn't PCIe hotplug work for Q35 machine?

2014-08-19 Thread Knut Omang
On Wed, 2014-08-20 at 06:04 +, Gonglei (Arei) wrote: > > On Wed, 2014-08-20 at 06:39 +0200, Knut Omang wrote: > > > On Wed, 2014-08-20 at 02:16 +, Gonglei (Arei) wrote: > > > > > -Original Message- > > > > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > > > > Sent: Wednesday

Re: [Qemu-devel] [PATCH v2] pcihp: fix possible array out of bounds

2014-08-19 Thread Marcel Apfelbaum
On Wed, 2014-08-20 at 13:52 +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > Prevent out-of-bounds array access on > acpi_pcihp_pci_status. > > Signed-off-by: Gonglei > Reviewed-by: Peter Crosthwaite > --- > v2: > - change commit message. > - add 'Reviewed-by' > --- > hw/acpi/pcih

Re: [Qemu-devel] [Question] Why doesn't PCIe hotplug work for Q35 machine?

2014-08-19 Thread Gonglei (Arei)
> On Wed, 2014-08-20 at 06:39 +0200, Knut Omang wrote: > > On Wed, 2014-08-20 at 02:16 +, Gonglei (Arei) wrote: > > > > -Original Message- > > > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > > > Sent: Wednesday, August 20, 2014 5:19 AM > > > > To: Gonglei (Arei) > > > > Cc: Pa

[Qemu-devel] [PATCH v2] pcihp: fix possible array out of bounds

2014-08-19 Thread arei.gonglei
From: Gonglei Prevent out-of-bounds array access on acpi_pcihp_pci_status. Signed-off-by: Gonglei Reviewed-by: Peter Crosthwaite --- v2: - change commit message. - add 'Reviewed-by' --- hw/acpi/pcihp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/pcihp.c b/hw

Re: [Qemu-devel] [Question] Why doesn't PCIe hotplug work for Q35 machine?

2014-08-19 Thread Knut Omang
On Wed, 2014-08-20 at 06:39 +0200, Knut Omang wrote: > On Wed, 2014-08-20 at 02:16 +, Gonglei (Arei) wrote: > > > -Original Message- > > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > > Sent: Wednesday, August 20, 2014 5:19 AM > > > To: Gonglei (Arei) > > > Cc: Paolo Bonzini; M

[Qemu-devel] [PATCH bugfix v1 3/3] qom: object.h: Update object_get_canon_path* doc

2014-08-19 Thread Peter Crosthwaite
With information about return value ownership. Signed-off-by: Peter Crosthwaite --- include/qom/object.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 8618e49..87de889 100644 --- a/include/qom/object.h +++ b/include/q

[Qemu-devel] [PATCH bugfix v1 2/3] qom: return const for object_get_canon_path component

2014-08-19 Thread Peter Crosthwaite
Most (if not all) calls sites of object_get_canonical_path component use it to get a read-only version for usage as an object name. Avoid the need for the callers to explicitly free the returned string and mark it const accordingly. Frees are removed from call sites accordingly. Signed-off-by: Pe

[Qemu-devel] [PATCH bugfix v1 1/3] xen: hvm: Abstract away memory region name ref

2014-08-19 Thread Peter Crosthwaite
The mr->name field is removed. This slipped through compile testing. Fix. Signed-off-by: Peter Crosthwaite --- xen-hvm.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xen-hvm.c b/xen-hvm.c index 91de2e2..9fd9d6e 100644 --- a/xen-hvm.c +++ b/xen-hvm.c @@ -291,6 +29

[Qemu-devel] [PATCH bugfix v1 0/3] Fix Memory Region Name bugs

2014-08-19 Thread Peter Crosthwaite
Hi Peter, Here is an attempt at a proper fix to the memory region naming bugs you reported. The Xen compile bug and the memory leak. Regards, Peter Peter Crosthwaite (3): xen: hvm: Abstract away memory region name ref qom: return const for object_get_canon_path component qom: object.h: Up

Re: [Qemu-devel] [PULL 19/20] memory: Use canonical path component as the name

2014-08-19 Thread Peter Crosthwaite
On Wed, Aug 20, 2014 at 5:01 AM, Peter Maydell wrote: > On 19 August 2014 11:43, Paolo Bonzini wrote: >> From: Peter Crosthwaite >> >> Rather than having the name as separate state. This prepares support >> for creating a MemoryRegion dynamically (i.e. without >> memory_region_init() and friends

Re: [Qemu-devel] [PULL 19/20] memory: Use canonical path component as the name

2014-08-19 Thread Peter Crosthwaite
On Wed, Aug 20, 2014 at 4:51 AM, Peter Maydell wrote: > On 19 August 2014 11:43, Paolo Bonzini wrote: >> From: Peter Crosthwaite >> >> Rather than having the name as separate state. This prepares support >> for creating a MemoryRegion dynamically (i.e. without >> memory_region_init() and friends

Re: [Qemu-devel] [Question] Why doesn't PCIe hotplug work for Q35 machine?

2014-08-19 Thread Knut Omang
On Wed, 2014-08-20 at 02:16 +, Gonglei (Arei) wrote: > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Wednesday, August 20, 2014 5:19 AM > > To: Gonglei (Arei) > > Cc: Paolo Bonzini; Marcel Apfelbaum; qemu-devel@nongnu.org; > > imamm...@redhat.com;

Re: [Qemu-devel] [PATCH 2/2] pci: add check for pcie root ports and downstream ports

2014-08-19 Thread Gonglei (Arei)
Hi, > > Right now, ARI Forwarding dose not support in QEMU. > I would replace the above sentence with "ARI Forwarding is not supported". > OK. > By the way, there is some support for ARI, I don't know if > is enabled yet. I'll have a look. > MST had pointed out the pcie_ari_init(), but not comp

Re: [Qemu-devel] [PATCH] net: Forbid dealing with packets when VM is not running

2014-08-19 Thread Jason Wang
On 08/19/2014 08:29 PM, Stefan Hajnoczi wrote: > On Mon, Aug 18, 2014 at 04:32:42PM +0800, zhanghailiang wrote: >> On 2014/8/18 14:55, Jason Wang wrote: >>> On 08/18/2014 12:46 PM, zhanghailiang wrote: diff --git a/net/net.c b/net/net.c index 6d930ea..21f0d48 100644 --- a/net/net.c >

Re: [Qemu-devel] [PATCH 2/2] pci: add check for pcie root ports and downstream ports

2014-08-19 Thread Gonglei (Arei)
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Tuesday, August 19, 2014 11:09 PM > To: Marcel Apfelbaum; Gonglei (Arei) > Cc: qemu-devel@nongnu.org; m...@redhat.com; Huangweidong (C); > afaer...@suse.de; imamm...@redhat.com; peter.crosthwa...@xilinx.com; > H

Re: [Qemu-devel] [PATCH 0/2] add check for PCIe root ports and downstream ports

2014-08-19 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > On Tue, Aug 19, 2014 at 09:08:25PM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > Root ports and downstream ports of switches are the hot > > pluggable ports in a PCI Express hierarchy. > > PCI

Re: [Qemu-devel] [PATCH 3/3] pcie: using error_setg instead of impolite assert

2014-08-19 Thread Gonglei (Arei)
> -Original Message- > From: peter.crosthwa...@petalogix.com > [mailto:peter.crosthwa...@petalogix.com] On Behalf Of Peter Crosthwaite > Sent: Tuesday, August 19, 2014 9:51 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org Developers; Huangweidong (C); Michael S. Tsirkin; > Huangpeng (Pet

Re: [Qemu-devel] [PATCH 3/3] pcie: using error_setg instead of impolite assert

2014-08-19 Thread Gonglei (Arei)
> > --- > > hw/pci/pcie.c | 6 +- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c > > index a123c01..7b46140 100644 > > --- a/hw/pci/pcie.c > > +++ b/hw/pci/pcie.c > > @@ -254,7 +254,11 @@ void pcie_cap_slot_hotplug_cb(HotplugHandler > *hot

Re: [Qemu-devel] [PATCH 1/3] qdev: add missing error check

2014-08-19 Thread Gonglei (Arei)
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Tuesday, August 19, 2014 10:03 PM > To: Peter Crosthwaite; Gonglei (Arei) > Cc: qemu-devel@nongnu.org Developers; Huangweidong (C); Michael S. Tsirkin; > Huangpeng (Peter); Igor Mammedov; Andreas Färber > Subjec

Re: [Qemu-devel] [PATCH 2/3] qdev: Refactor device_set_realized to avoid resource leak

2014-08-19 Thread Gonglei (Arei)
> -Original Message- > From: peter.crosthwa...@petalogix.com > On Tue, Aug 19, 2014 at 7:41 PM, wrote: > > From: Gonglei > > > > At present, the local variable local_err is reused at multi-places, > > Which will cause resource leak in some scenarios. > > > > The problem isn't really the

Re: [Qemu-devel] [PATCH 1/3] qdev: add missing error check

2014-08-19 Thread Gonglei (Arei)
> > If local_err is not null, the next code logic is useless. > > > > Signed-off-by: Gonglei > > --- > > hw/core/qdev.c | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/hw/core/qdev.c b/hw/core/qdev.c > > index da1ba48..3e7085e 100644 > > --- a/hw/core/qdev.c > > +++ b/hw/core/

Re: [Qemu-devel] [PATCH] pcihp: fix possible array out of bounds

2014-08-19 Thread Gonglei (Arei)
> -Original Message- > From: peter.crosthwa...@petalogix.com > [mailto:peter.crosthwa...@petalogix.com] On Behalf Of Peter Crosthwaite > Sent: Tuesday, August 19, 2014 11:12 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org Developers; Huangweidong (C); Michael S. Tsirkin > Subject: Re: [

Re: [Qemu-devel] [PATCH] pcihp: fix possible array out of bounds

2014-08-19 Thread Gonglei (Arei)
> -Original Message- > From: Marcel Apfelbaum [mailto:marcel.apfelb...@gmail.com] > Sent: Tuesday, August 19, 2014 11:00 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; Huangweidong (C); m...@redhat.com > Subject: Re: [Qemu-devel] [PATCH] pcihp: fix possible array out of bounds > > On

[Qemu-devel] [PATCH V4] spapr: Fix stale HTAB during live migration

2014-08-19 Thread Samuel Mendoza-Jonas
If a guest reboots during a running migration, changes to the hash page table are not necessarily updated on the destination. Opening a new file descriptor to the HTAB forces the migration handler to resend the entire table. Signed-off-by: Samuel Mendoza-Jonas --- Changes in v4: Readability: need

Re: [Qemu-devel] [Question] Why doesn't PCIe hotplug work for Q35 machine?

2014-08-19 Thread Gonglei (Arei)
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Wednesday, August 20, 2014 5:19 AM > To: Gonglei (Arei) > Cc: Paolo Bonzini; Marcel Apfelbaum; qemu-devel@nongnu.org; > imamm...@redhat.com; arm...@redhat.com; Huangweidong (C) > Subject: Re: [Question] Why doe

Re: [Qemu-devel] [PATCH] net: Forbid dealing with packets when VM is not running

2014-08-19 Thread zhanghailiang
On 2014/8/19 20:29, Stefan Hajnoczi wrote: On Mon, Aug 18, 2014 at 04:32:42PM +0800, zhanghailiang wrote: On 2014/8/18 14:55, Jason Wang wrote: On 08/18/2014 12:46 PM, zhanghailiang wrote: diff --git a/net/net.c b/net/net.c index 6d930ea..21f0d48 100644 --- a/net/net.c +++ b/net/net.c @@ -242,

Re: [Qemu-devel] [PATCH] net: Forbid dealing with packets when VM is not running

2014-08-19 Thread zhanghailiang
On 2014/8/18 17:14, Jason Wang wrote: On 08/18/2014 04:32 PM, zhanghailiang wrote: On 2014/8/18 14:55, Jason Wang wrote: On 08/18/2014 12:46 PM, zhanghailiang wrote: For all NICs(except virtio-net) emulated by qemu, Such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets whe

Re: [Qemu-devel] [PATCH 0/2] block: support drive_del with dataplane

2014-08-19 Thread Fam Zheng
On Mon, 08/18 16:07, Stefan Hajnoczi wrote: > This series makes hot unplug work with virtio-blk dataplane devices. It > should > also work with Fam's virtio-scsi dataplane patches. > > Up until now dataplane installed an op blocker that prevented drive_del. > Thanks to the op blocker and AioCont

Re: [Qemu-devel] How to create PCH to support those existing driver

2014-08-19 Thread Chen, Tiejun
On 2014/8/20 5:51, Michael S. Tsirkin wrote: On Tue, Aug 19, 2014 at 09:24:03PM +, Kay, Allen M wrote: Allen, Could you reply this? Let me summarized what we have discussed and learned so far: 1) Future Windows/Linux IGD drivers will be modified to restrain from accessing MCH/PCH device

Re: [Qemu-devel] [PATCH] ide: Add wwn support to IDE-ATAPI drive

2014-08-19 Thread Fam Zheng
On Tue, 08/19 14:57, John Snow wrote: > Although it is possible to specify the wwn > property for cdrom devices on the command line, > the underlying driver fails to relay this information > to the guest operating system via IDENTIFY. > > This is a simple patch to correct that. > > See ATA8-ACS,

Re: [Qemu-devel] [PATCH] virt/kvm/assigned-dev.c: Set 'dev->irq_source_id' to '-1' after free it

2014-08-19 Thread Chen Gang
By the way, at present, I use Qemu as user mode program, is there common test with both Qemu and KVM/Xen? And is a PC enough for the common test? Thanks. On 08/20/2014 07:58 AM, Chen Gang wrote: > On 08/19/2014 11:49 PM, Paolo Bonzini wrote: >> Il 19/08/2014 17:44, Chen Gang ha scritto: Hel

Re: [Qemu-devel] Using cache=writeback safely on qemu 1.4.0 and later

2014-08-19 Thread Andrew Martin
- Original Message - > From: "Stefan Hajnoczi" > To: "Andrew Martin" > Cc: qemu-devel@nongnu.org > Sent: Tuesday, August 19, 2014 9:59:25 AM > Subject: Re: [Qemu-devel] Using cache=writeback safely on qemu 1.4.0 and later > > If you strace -f the QEMU process on the host, you will see fd

Re: [Qemu-devel] [PATCH] aarch64: raise max_cpus to 8

2014-08-19 Thread Peter Maydell
On 19 August 2014 22:33, Joel Schopp wrote: > I'm running on a system with 8 cpus and it would be nice to have qemu > support all of them. The attached patch does that and has been tested. > > That said, I'm not sure if 8 is enough or if we want to bump this even higher > now before systems with

Re: [Qemu-devel] How to create PCH to support those existing driver

2014-08-19 Thread Kay, Allen M
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, August 19, 2014 2:51 PM > To: Kay, Allen M > Cc: Chen, Tiejun; Paolo Bonzini; Wang, Yong Y; Don Dutile; Jesse Barnes; > Konrad Rzeszutek Wilk; qemu-devel@nongnu.org; xen- > de...@lists.xensource.com;

Re: [Qemu-devel] How to create PCH to support those existing driver

2014-08-19 Thread Michael S. Tsirkin
On Tue, Aug 19, 2014 at 09:24:03PM +, Kay, Allen M wrote: > > Allen, > > > > Could you reply this? > > Let me summarized what we have discussed and learned so far: > > 1) Future Windows/Linux IGD drivers will be modified to restrain from > accessing MCH/PCH devices. We are prototyping this

[Qemu-devel] [PATCH] aarch64: raise max_cpus to 8

2014-08-19 Thread Joel Schopp
I'm running on a system with 8 cpus and it would be nice to have qemu support all of them. The attached patch does that and has been tested. That said, I'm not sure if 8 is enough or if we want to bump this even higher now before systems with many more cpus come along. 255 anyone? Cc: Peter Mayd

Re: [Qemu-devel] [PATCH 3/3] pcie: using error_setg instead of impolite assert

2014-08-19 Thread Michael S. Tsirkin
On Tue, Aug 19, 2014 at 05:41:45PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > It's enough of reporting an error. Assert() is not acceptable > because the error is not a fatal error. > > Signed-off-by: Gonglei > --- > hw/pci/pcie.c | 6 +- > 1 file changed, 5 insertions(+), 1

Re: [Qemu-devel] How to create PCH to support those existing driver

2014-08-19 Thread Kay, Allen M
> Allen, > > Could you reply this? Let me summarized what we have discussed and learned so far: 1) Future Windows/Linux IGD drivers will be modified to restrain from accessing MCH/PCH devices. We are prototyping this in Windows driver right now and will pass the same methodology to Linux driv

Re: [Qemu-devel] [PATCH 0/2] add check for PCIe root ports and downstream ports

2014-08-19 Thread Michael S. Tsirkin
On Tue, Aug 19, 2014 at 09:08:25PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > Root ports and downstream ports of switches are the hot > pluggable ports in a PCI Express hierarchy. > PCI Express supports chip-to-chip interconnect, a PCIe link can > only connect one pci device/Swit

Re: [Qemu-devel] [Question] Why doesn't PCIe hotplug work for Q35 machine?

2014-08-19 Thread Michael S. Tsirkin
On Tue, Aug 19, 2014 at 06:25:56AM +, Gonglei (Arei) wrote: > > >> Subject: Re: [Question] Why doesn't PCIe hotplug work for Q35 machine? > > >> > > >> On Sun, 2014-08-17 at 13:00 +0200, Michael S. Tsirkin wrote: > > >>> On Fri, Aug 15, 2014 at 07:33:29AM +, Gonglei (Arei) wrote: > > H

Re: [Qemu-devel] [PATCH] trace: [qmp] Add QAPI/QMP commands to query and control event tracing state

2014-08-19 Thread Lluís Vilanova
Lluís Vilanova writes: > Also removes old "trace-event", "trace-file" and "info trace-events" HMP > commands. Please ignore, there's a silly bug. > Signed-off-by: Lluís Vilanova > --- > hmp-commands.hx | 35 --- > monitor.c | 61 --

[Qemu-devel] qemu-iotests failures for qcow and vpc

2014-08-19 Thread Peter Wu
Hi, I just ran the qemu-iotests suite and found five failures in the vpc and qcow block types. The following command was executed with sources and objects in tmpfs: for i in qcow2 qed qcow generic vmdk raw vpc vhdx vdi \ cow parallels cloop bochs; do ./check -c writeback

[Qemu-devel] [PATCH] trace: [qmp] Add QAPI/QMP commands to query and control event tracing state

2014-08-19 Thread Lluís Vilanova
Also removes old "trace-event", "trace-file" and "info trace-events" HMP commands. Signed-off-by: Lluís Vilanova --- hmp-commands.hx | 35 --- monitor.c | 61 qapi-schema.json|3 ++ qmp-commands.hx | 27

Re: [Qemu-devel] [PATCH v3] ide: Add resize callback to ide/core

2014-08-19 Thread John Snow
On 08/18/2014 09:12 AM, Stefan Hajnoczi wrote: On Thu, Aug 14, 2014 at 05:03:06PM -0400, John Snow wrote: @@ -162,10 +173,10 @@ static void ide_identify(IDEState *s) } put_le16(p + 88, 0x3f | (1 << 13)); /* udma5 set and supported */ put_le16(p + 93, 1 | (1 << 14) | 0x2000);

Re: [Qemu-devel] [PULL 19/20] memory: Use canonical path component as the name

2014-08-19 Thread Peter Maydell
On 19 August 2014 11:43, Paolo Bonzini wrote: > From: Peter Crosthwaite > > Rather than having the name as separate state. This prepares support > for creating a MemoryRegion dynamically (i.e. without > memory_region_init() and friends) and the MemoryRegion still getting > a usable name. > @@ -13

Re: [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-19 Thread John Snow
On 08/19/2014 02:08 PM, Markus Armbruster wrote: John Snow writes: On 08/19/2014 04:05 AM, Markus Armbruster wrote: John Snow writes: Currently, the drive definitions created by drive_new() when using the -drive file=...[,if=ide] or -cdrom or -hd[abcd] options are not picked up by the Q35

[Qemu-devel] [PATCH] ide: Add wwn support to IDE-ATAPI drive

2014-08-19 Thread John Snow
Although it is possible to specify the wwn property for cdrom devices on the command line, the underlying driver fails to relay this information to the guest operating system via IDENTIFY. This is a simple patch to correct that. See ATA8-ACS, Table 22 parts 5, 6, and 9. Signed-off-by: John Snow

Re: [Qemu-devel] [PULL 19/20] memory: Use canonical path component as the name

2014-08-19 Thread Peter Maydell
On 19 August 2014 11:43, Paolo Bonzini wrote: > From: Peter Crosthwaite > > Rather than having the name as separate state. This prepares support > for creating a MemoryRegion dynamically (i.e. without > memory_region_init() and friends) and the MemoryRegion still getting > a usable name. > > Sign

Re: [Qemu-devel] [PATCH] target-arm: Fix resetting issues on ARMv7-M CPUs

2014-08-19 Thread Martin Galvan
On Tue, Aug 19, 2014 at 11:16 AM, Peter Maydell wrote: > On 19 August 2014 14:25, Martin Galvan > wrote: >> On Tue, Aug 19, 2014 at 10:06 AM, Peter Maydell >> wrote: >>> I'm afraid this looks like the wrong fix for the problem you're seeing. >>> The bug you need to fix is that the ROM contents g

[Qemu-devel] [PULL 02/19] target-arm: Collect up the debug cp register definitions

2014-08-19 Thread Peter Maydell
At the moment we have a mixed set of mostly dummy register definitions for various debug related registers which have been added piecemeal in order to get Linux kernels to boot. In preparation for actually implementing debug support, bring them all together into one place. This commit doesn't chan

[Qemu-devel] [PULL 01/19] target-arm: Fix return address for A64 BRK instructions

2014-08-19 Thread Peter Maydell
When we take an exception resulting from a BRK instruction, the architecture requires that the "preferred return address" reported to the exception handler is the address of the BRK itself, not the following instruction (like undefined insns, and in contrast with SVC, HVC and SMC). Follow this, rat

[Qemu-devel] [PULL 03/19] target-arm: Allow STATE_BOTH reginfo descriptions for more than cp14

2014-08-19 Thread Peter Maydell
Currently the STATE_BOTH shorthand for allowing a single reginfo struct to define handling for both AArch32 and AArch64 views of a register only permits this where the AArch32 view is in cp15. It turns out that the debug registers in cp14 also have neatly lined up encodings; allow these also to sha

[Qemu-devel] [PULL 05/19] target-arm: Adjust debug ID registers per-CPU

2014-08-19 Thread Peter Maydell
Allow each CPU type to specify the value for the debug ID registers, by putting them in the ARMCPU struct, and use the resulting information to only expose the correct number of watchpoint and breakpoint registers for the CPU. Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias --- targ

[Qemu-devel] [PULL 07/19] target-arm: Correctly handle PSTATE.SS when taking exception to AArch32

2014-08-19 Thread Peter Maydell
When an exception is taken to AArch32, we must clear the PSTATE.SS bit for the exception handler, and must also ensure that the SS bit is not set in the value saved to SPSR_. Achieve both of these aims by clearing the bit in uncached_cpsr before saving it to the SPSR. Signed-off-by: Peter Maydell

[Qemu-devel] [PULL 04/19] target-arm: Provide both 32 and 64 bit versions of debug registers

2014-08-19 Thread Peter Maydell
Bring the 32 bit and 64 bit views of the debug registers into line by providing the same set of registers in both cases. (This still isn't a complete set, but it is consistent.) Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias --- target-arm/helper.c | 34

[Qemu-devel] [PULL 06/19] target-arm: Don't allow AArch32 to access RES0 CPSR bits

2014-08-19 Thread Peter Maydell
The CPSR has a new-in-v8 execution state bit (IL), and also some state which has effects in AArch32 but appears only in the SPSR format (SS) but is RES0 in the CPSR. Add the IL bit to CPSR_EXEC, and enforce that guest direct reads and writes to CPSR can't read or write the RES0 bits, so the guest

[Qemu-devel] [PULL 14/19] arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2

2014-08-19 Thread Peter Maydell
From: Christoffer Dall The current code supplies the PSCI v0.1 function IDs in the DT even when KVM uses PSCI v0.2. This will break guest kernels that only support PSCI v0.1 as they will use the IDs provided in the DT. Guest kernels with PSCI v0.2 support are not affected by this patch, because

[Qemu-devel] [PULL 19/19] arm: stellaris: Remove misleading address_space_mem var

2014-08-19 Thread Peter Maydell
From: Peter Crosthwaite It's a MemoryRegion and not an AddressSpace. But since it's single use, just inline the get_system_memory() call to the only usage to remove it. Signed-off-by: Peter Crosthwaite Message-id: d6914047e10b956514cfaa5f391ef56c7d851b34.1408347860.git.peter.crosthwa...@xilinx

[Qemu-devel] [PULL 09/19] target-arm: A64: Avoid duplicate exit_tb(0) in non-linked goto_tb

2014-08-19 Thread Peter Maydell
If gen_goto_tb() decides not to link the two TBs, then the fallback path generates unnecessary code: * if singlestep is enabled then we generate unreachable code after the gen_exception_internal(EXCP_DEBUG) * if singlestep is disabled then we will generate exit_tb(0) twice, once in gen_goto

[Qemu-devel] [PULL 10/19] target-arm: Implement ARMv8 single-step handling for A64 code

2014-08-19 Thread Peter Maydell
Implement ARMv8 software single-step handling for A64 code: correctly update the single-step state machine and generate debug exceptions when stepping A64 code. This patch has no behavioural change since MDSCR_EL1.SS can't be set by the guest yet. Signed-off-by: Peter Maydell Reviewed-by: Edgar

[Qemu-devel] [PULL 17/19] aarch64: Allow -kernel option to take a gzip-compressed kernel.

2014-08-19 Thread Peter Maydell
From: "Richard W.M. Jones" On aarch64 it is the bootloader's job to uncompress the kernel. UEFI and u-boot bootloaders do this automatically when the kernel is gzip-compressed. However the qemu -kernel option does not do this. The following command does not work: qemu-system-aarch64 [...] -

[Qemu-devel] [PULL 11/19] target-arm: Implement ARMv8 single-stepping for AArch32 code

2014-08-19 Thread Peter Maydell
ARMv8 single-stepping requires the exception level that controls the single-stepping to be in AArch64 execution state, but the code being stepped may be in AArch64 or AArch32. Implement the necessary support code for single-stepping AArch32 code. Signed-off-by: Peter Maydell Reviewed-by: Edgar E.

[Qemu-devel] [PULL 08/19] target-arm: Set PSTATE.SS correctly on exception return from AArch64

2014-08-19 Thread Peter Maydell
Set the PSTATE.SS bit correctly on exception returns from AArch64, as required by the debug single-step functionality. Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias --- target-arm/cpu.h | 61 ++ target-arm/op_helper.c | 20

[Qemu-devel] [PULL 13/19] target-arm: Rename QEMU PSCI v0.1 definitions

2014-08-19 Thread Peter Maydell
From: Christoffer Dall The function IDs for PSCI v0.1 are exported by KVM and defined as KVM_PSCI_FN_. To build using these defines in non-KVM code, QEMU defines these IDs locally and check their correctness against the KVM headers when those are available. However, the naming scheme used for Q

[Qemu-devel] [PULL 18/19] arm: armv7m: Rename address_space_mem -> system_memory

2014-08-19 Thread Peter Maydell
From: Peter Crosthwaite This argument is a MemoryRegion and not an AddressSpace. "Address space" means something quite different to "memory region" in QEMU parlance so rename the variable to reduce confusion. Signed-off-by: Peter Crosthwaite Message-id: f666cf7f2318d9b461b1e320a45bf0d82da9b7d

[Qemu-devel] [PULL 12/19] target-arm: Implement MDSCR_EL1 as having state

2014-08-19 Thread Peter Maydell
Now that all the new code to support single-stepping is in place, wire up the guest-visible MDSCR_EL1, so the guest can enable single-stepping. Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias --- target-arm/helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --gi

[Qemu-devel] [PULL 00/19] target-arm queue

2014-08-19 Thread Peter Maydell
to staging (2014-08-19 13:00:57 +0100) are available in the git repository at: git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20140819 for you to fetch changes up to 14a906f755f77b325666d67e071c572478d06067: arm: stellaris: Remove misleading address_space_mem var (201

[Qemu-devel] [PULL 16/19] loader: Add load_image_gzipped function.

2014-08-19 Thread Peter Maydell
From: "Richard W.M. Jones" As the name suggests this lets you load a ROM/disk image that is gzipped. It is uncompressed before storing it in guest memory. Signed-off-by: Richard W.M. Jones Reviewed-by: Alex Bennée Reviewed-by: Peter Crosthwaite Reviewed-by: Alex Bennée Message-id: 140783125

[Qemu-devel] [PULL 15/19] arm: cortex-a9: Fix cache-line size and associativity

2014-08-19 Thread Peter Maydell
From: Peter Crosthwaite For A9, The cache associativity is 4 and the lines size is 32B. Self identify in CCSIDR accordingly. Cache size remains at 16k. QEMU doesn't emulate caches, but we should still report the correct cache-line size to the guest. Some guests (like u-boot) complain if the cach

Re: [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-19 Thread Markus Armbruster
John Snow writes: > On 08/19/2014 04:05 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> Currently, the drive definitions created by drive_new() when using >>> the -drive file=...[,if=ide] or -cdrom or -hd[abcd] options are not >>> picked up by the Q35 initialization routine. >>> >>> To

Re: [Qemu-devel] [PATCH] qemu-iotests: Fix 028 reference output for qed

2014-08-19 Thread Peter Wu
On Tuesday 19 August 2014 19:33:55 Kevin Wolf wrote: > We need to filter out driver-specific options in the "Formatting..." > string printed by qemu when creating the backup image. > > Reported-by: Peter Wu > Signed-off-by: Kevin Wolf Tested-by: Peter Wu It works (./check -qed 028), thanks! -

[Qemu-devel] [PATCH] qemu-iotests: Fix 028 reference output for qed

2014-08-19 Thread Kevin Wolf
We need to filter out driver-specific options in the "Formatting..." string printed by qemu when creating the backup image. Reported-by: Peter Wu Signed-off-by: Kevin Wolf --- tests/qemu-iotests/028 | 1 + tests/qemu-iotests/028.out | 3 ++- tests/qemu-iotests/common.filter |

Re: [Qemu-devel] [libvirt] [PATCHv2 libvirt] qemu: Issue rtc-reset-reinjection command after guest-set-time

2014-08-19 Thread Marcelo Tosatti
On Tue, Aug 19, 2014 at 11:00:26AM -0600, Eric Blake wrote: > On 08/19/2014 10:57 AM, Marcelo Tosatti wrote: > > > > rtc-reset-reinjection has been introduced because certain Windows > > versions will advance the guest system time (via rtc interrupt > > reinjection). > > > > So if libvirt adjusts

Re: [Qemu-devel] [libvirt] [PATCHv2 libvirt] qemu: Issue rtc-reset-reinjection command after guest-set-time

2014-08-19 Thread Eric Blake
On 08/19/2014 10:57 AM, Marcelo Tosatti wrote: > > rtc-reset-reinjection has been introduced because certain Windows > versions will advance the guest system time (via rtc interrupt > reinjection). > > So if libvirt adjusts the guest system time via guest-set-time, > allowing rtc interrupt reinj

Re: [Qemu-devel] [libvirt] [PATCHv2 libvirt] qemu: Issue rtc-reset-reinjection command after guest-set-time

2014-08-19 Thread Marcelo Tosatti
On Mon, Aug 18, 2014 at 06:29:42PM +0200, Michal Privoznik wrote: > On 18.08.2014 17:28, Eric Blake wrote: > >On 08/14/2014 02:24 AM, Michal Privoznik wrote: > >>https://bugzilla.redhat.com/show_bug.cgi?id=1103245 > >> > >>An advice appeared there on the qemu-devel list [1]. When a domain is > >>su

Re: [Qemu-devel] [RFC v1 2/2] arm: boot: Add EL jump-down code for Linux

2014-08-19 Thread Christopher Covington
Hi Peter, On 08/18/2014 08:54 PM, Peter Crosthwaite wrote: > Linux should boot in EL2 or EL1. If in EL3, jump down before handing > off to Linux. > > Signed-off-by: Peter Crosthwaite > --- > > hw/arm/boot.c | 21 + > 1 file changed, 21 insertions(+) > > diff --git a/hw/arm

[Qemu-devel] [Bug 1358619] Re: keep savevm/loadvm and migration cause snapshot crash

2014-08-19 Thread icbruce
I execute incoming migration command and wait there. Then I do loadvm. After finishing loadvm, type migration command on source host to start migration. In fact, This action is useless for vm status before migration. I just modify some codes and then found this bug. -- You received this bug noti

Re: [Qemu-devel] [PATCH v3 0/4] libqos: add a simple first-fit memory allocator

2014-08-19 Thread John Snow
On 08/05/2014 05:46 AM, Stefan Hajnoczi wrote: On Fri, Aug 01, 2014 at 11:38:55AM -0400, John Snow wrote: This set collects two patches by Marc Marí already on the mailing list, but goes further by adding a simple memory allocator that allows us to track and debug freed memory, and optionally

Re: [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-19 Thread John Snow
On 08/19/2014 12:12 PM, Dr. David Alan Gilbert wrote: * John Snow (js...@redhat.com) wrote: The changes appear to work well, but where I'd like some feedback is what should happen if people do something like: qemu -M q35 -drive if=ide,file=fedora.qcow2 The code as presented here is not go

Re: [Qemu-devel] [PATCH 1/2] virtio-serial: create a linked list of all active devices

2014-08-19 Thread Andreas Färber
Am 19.08.2014 17:45, schrieb Markus Armbruster: > Andreas Färber writes: > >> Am 04.08.2014 13:45, schrieb Amit Shah: >>> On (Mon) 04 Aug 2014 [13:33:56], Markus Armbruster wrote: Amit Shah writes: > To ensure two virtserialports don't get added to the system with the > same 'n

Re: [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-19 Thread Dr. David Alan Gilbert
* John Snow (js...@redhat.com) wrote: > The changes appear to work well, but where I'd like some feedback > is what should happen if people do something like: > > qemu -M q35 -drive if=ide,file=fedora.qcow2 > > The code as presented here is not going to look for or attempt to > connect IDE dev

Re: [Qemu-devel] [PATCH] image-fuzzer: Trivial readability and formatting improvements

2014-08-19 Thread M.Kustova
On Tue, Aug 19, 2014 at 2:57 PM, Markus Armbruster wrote: > "M.Kustova" writes: > >> On Tue, Aug 19, 2014 at 1:44 PM, Fam Zheng wrote: >>> On Tue, 08/19 02:00, Maria Kustova wrote: > [...] diff --git a/tests/image-fuzzer/runner.py b/tests/image-fuzzer/runner.py index fd97c40..b142577 1

Re: [Qemu-devel] [RFC 0/4] Adding -cdrom, -hd[abcd] and -drive file=... to Q35

2014-08-19 Thread John Snow
On 08/19/2014 04:05 AM, Markus Armbruster wrote: John Snow writes: Currently, the drive definitions created by drive_new() when using the -drive file=...[,if=ide] or -cdrom or -hd[abcd] options are not picked up by the Q35 initialization routine. To fix this, we have to add hooks to search f

Re: [Qemu-devel] [PATCH 1/2] virtio-serial: create a linked list of all active devices

2014-08-19 Thread Markus Armbruster
Andreas Färber writes: > Am 04.08.2014 13:45, schrieb Amit Shah: >> On (Mon) 04 Aug 2014 [13:33:56], Markus Armbruster wrote: >>> Amit Shah writes: >>> To ensure two virtserialports don't get added to the system with the same 'name' parameter, we need to access all the ports on all the

Re: [Qemu-devel] [PATCH v5 02/10] target-arm: Add SCR_EL3

2014-08-19 Thread Peter Maydell
On 18 August 2014 10:40, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- > target-arm/cpu.h| 17 - > target-arm/helper.c | 35 +-- > 2 files changed, 49 insertions(+), 3 deletions(-) > > diff --g

Re: [Qemu-devel] [PATCH] pcihp: fix possible array out of bounds

2014-08-19 Thread Peter Crosthwaite
On Tue, Aug 19, 2014 at 5:18 PM, wrote: > From: Gonglei > > When 'bsel == ACPI_PCIHP_MAX_HOTPLUG_BUS', the > s->acpi_pcihp_pci_status[bsel] array will out of bounds. > > Add check for this. > > Signed-off-by: Gonglei Reviewed-by: Peter Crosthwaite > --- > hw/acpi/pcihp.c | 2 +- > 1 file ch

Re: [Qemu-devel] [PATCH 2/2] pci: add check for pcie root ports and downstream ports

2014-08-19 Thread Paolo Bonzini
Il 19/08/2014 16:37, Marcel Apfelbaum ha scritto: >> > +static int pci_check_pcie_port(PCIBus *bus, PCIDevice *dev) >> > +{ >> > +Object *obj = OBJECT(bus); >> > + >> > +if (!strcmp(object_get_typename(obj), TYPE_PCIE_BUS)) { > Maybe there is another way to check that this is a PCIe bus? >

Re: [Qemu-devel] [PATCH] pcihp: fix possible array out of bounds

2014-08-19 Thread Marcel Apfelbaum
On Tue, 2014-08-19 at 15:18 +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > When 'bsel == ACPI_PCIHP_MAX_HOTPLUG_BUS', the > s->acpi_pcihp_pci_status[bsel] array will out of bounds. I would change the commit message to something like "Prevent out-of-bounds array access on acpi_pcihp_pci

Re: [Qemu-devel] Using cache=writeback safely on qemu 1.4.0 and later

2014-08-19 Thread Stefan Hajnoczi
On Fri, Aug 15, 2014 at 03:18:15PM -0500, Andrew Martin wrote: > Hello, > > I am running several qemu-kvm VM servers on Ubuntu 12.04 with qemu-kvm 1.4.0. > Most of the guests are also running Ubuntu 12.04. I am using qcow2 disk images > with the virtio driver in almost all cases, and am storing th

Re: [Qemu-devel] [PATCH v5 01/10] target-arm: Add HCR_EL2

2014-08-19 Thread Peter Maydell
On 18 August 2014 10:40, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias > --- Reviewed-by: Peter Maydell -- PMM

[Qemu-devel] Singlestepping on ARM

2014-08-19 Thread Emmanuel Blot
Hi, I'm trying to trace the execution of an ARM (32 bit) guest, with qemu-system-arm. v2.1.0 I've enabled the -singlestep and -d exec options. It seems that some guest instructions are not traced once they have been traced on the first call, as if the translation blocks were preventing from traci

Re: [Qemu-devel] [PATCH target-arm v1 1/1] arm: translate-a64: Add CPU number to Debug info

2014-08-19 Thread Peter Maydell
On 19 August 2014 01:48, Peter Crosthwaite wrote: > It's very useful when debugging SMP to know who disassembly or a CPU > state dump is being done on behalf of. > > Signed-off-by: Peter Crosthwaite > --- > > target-arm/translate-a64.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-)

  1   2   3   >