Re: [Qemu-devel] [PATCH] hw/virtio-scsi: Set max_target=0 during vhost-scsi operation

2012-07-12 Thread Zhi Yong Wu
thanks, it is applied to my vhost_scsi git tree git://github.com/wuzhy/qemu.git vhost-scsi On Thu, Jul 12, 2012 at 4:55 AM, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This QEMU patch sets VirtIOSCSIConfig->max_target=0 for vhost-scsi operation > to restrict virtio-scsi LLD guest

Re: [Qemu-devel] [PATCH] SCSI: improve the lba-out-of-range tests for read/write/verify

2012-07-12 Thread Paolo Bonzini
Il 12/07/2012 08:52, Ronnie Sahlberg ha scritto: > Improve the tests for the LBA to cover more cases, the new test looks like > this > if (r->req.cmd.lba > r->req.cmd.lba + len > || r->req.cmd.lba + len > s->qdev.max_lba) { > > For the 16 byte opcodes, the lba is a uint64, so the

[Qemu-devel] [PATCH] SCSI improved LBA-out-of-range checks BUGFIX

2012-07-12 Thread Ronnie Sahlberg
Paolo, Sorry but the previous patch was bad. Use this patch instead it uses the correct check of if (r->req.cmd.lba > r->req.cmd.lba + len || r->req.cmd.lba + len > s->qdev.max_lba + 1) {

[Qemu-devel] [PATCH] SCSI Improved checking for LBA out of range

2012-07-12 Thread Ronnie Sahlberg
Improve the tests for the LBA to cover more cases, the new test looks like this if (r->req.cmd.lba > r->req.cmd.lba + len || r->req.cmd.lba + len > s->qdev.max_lba + 1) { For the 16 byte opcodes, the lba is a uint64, so the first check is to make sure that we do not wrap. For exa

Re: [Qemu-devel] [PATCH] SCSI: improve the lba-out-of-range tests for read/write/verify

2012-07-12 Thread ronnie sahlberg
Sorry, there is a bug in it. Can you change it to : || r->req.cmd.lba + len > s->qdev.max_lba + 1) { or else the last lba of the device will be flagged as out of range. On Thu, Jul 12, 2012 at 5:04 PM, Paolo Bonzini wrote: > Il 12/07/2012 08:52, Ronnie Sahlberg ha scritto: >> Improve

Re: [Qemu-devel] [PATCH] SCSI: improve the lba-out-of-range tests for read/write/verify

2012-07-12 Thread Paolo Bonzini
Il 12/07/2012 09:06, ronnie sahlberg ha scritto: > Sorry, there is a bug in it. > > Can you change it to : > || r->req.cmd.lba + len > s->qdev.max_lba + 1) { > > or else the last lba of the device will be flagged as out of range. Yes, done that already. Can you add a test for the last

Re: [Qemu-devel] [RFC PATCH v2 05/21][SeaBIOS] pciinit: Fix pcimem_start value

2012-07-12 Thread Gerd Hoffmann
On 07/11/12 18:45, Vasilis Liaskovitis wrote: > Hi, > > On Wed, Jul 11, 2012 at 01:56:19PM +0200, Gerd Hoffmann wrote: >> On 07/11/12 12:31, Vasilis Liaskovitis wrote: >>> In order to hotplug memory between RamSize and BUILD_PCIMEM_START, the pci >>> window needs to start at BUILD_PCIMEM_START (0x

Re: [Qemu-devel] [RFC PATCH 01/36] qapi: generalize documentation of streaming commands

2012-07-12 Thread Kevin Wolf
Am 11.07.2012 18:00, schrieb Paolo Bonzini: > Il 15/06/2012 18:45, Eric Blake ha scritto: >> Pre-existing, but do we have any policy on US (canceled) vs. UK >> (cancelled) spelling? Obviously, our API spelling is locked into UK >> spelling, but if the docs generally prefer US spelling, do we need

Re: [Qemu-devel] [PATCH v2] device_tree: Add support for reading device tree properties

2012-07-12 Thread Peter Maydell
On 12 July 2012 01:45, Peter Crosthwaite wrote: > On Tue, Jul 10, 2012 at 11:32 PM, Peter Maydell wrote: >> I still think that having this new function is misguided: >> * nobody's using it > > I wasn't thinking a new dead function. I was suggesting that the one > function you originally proposed

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Markus Armbruster
[Alex's illegibly long lines wrapped] Alexander Graf writes: > On 09.07.2012, at 10:50, Markus Armbruster wrote: > >> Alexander Graf writes: >> >>> We've had support for creating AHCI devices using -device for a while now, >>> but it's cumbersome to users. We really should provide an easier wa

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Alexander Graf
On 12.07.2012, at 10:17, Markus Armbruster wrote: > [Alex's illegibly long lines wrapped] > > Alexander Graf writes: > >> On 09.07.2012, at 10:50, Markus Armbruster wrote: >> >>> Alexander Graf writes: >>> We've had support for creating AHCI devices using -device for a while now,

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Gerd Hoffmann
Hi, > What I'd like to avoid is casual users setting up new guests with our > shiny new q35 board getting their IDE drives connected to some slow, old > controller just because they haven't discovered that if=ide doesn't cut > it anymore, and they need to use if=ahci now. That will not work. a

Re: [Qemu-devel] [PATCH 2/2] vfio-powerpc: added VFIO support

2012-07-12 Thread Alexey Kardashevskiy
On 12/07/12 13:11, Alex Williamson wrote: > On Wed, 2012-07-11 at 12:54 +1000, Alexey Kardashevskiy wrote: >> On 11/07/12 02:55, Alex Williamson wrote: >>> On Tue, 2012-07-10 at 15:51 +1000, Alexey Kardashevskiy wrote: The patch enables VFIO on POWER. It literally does the following:

[Qemu-devel] [PATCH] RFC: vfio-powerpc: added VFIO support (v2)

2012-07-12 Thread Alexey Kardashevskiy
It literally does the following: 1. POWERPC IOMMU support (the kernel counterpart is required) 2. The patch assumes that IOAPIC calls are going to be replaced with something generic. I have something in my local git but it's too early, we need to extend PCIINTxRoute first. 3. vfio_get_group() ma

Re: [Qemu-devel] [PATCH 0/4] Cleanups around hw/block-common.h

2012-07-12 Thread Kevin Wolf
Am 11.07.2012 15:08, schrieb Markus Armbruster: > Applies on top of "[PATCH v3 00/29] Disk geometry cleanup". > > Markus Armbruster (4): > hw/block-common: Move BlockConf & friends from block.h > hw/block-common: Factor out fall back to legacy -drive serial=... > blockdev: Don't limit DriveI

Re: [Qemu-devel] [RFC PATCH v2 05/21][SeaBIOS] pciinit: Fix pcimem_start value

2012-07-12 Thread Vasilis Liaskovitis
On Thu, Jul 12, 2012 at 09:22:14AM +0200, Gerd Hoffmann wrote: > On 07/11/12 18:45, Vasilis Liaskovitis wrote: > > Hi, > > > > On Wed, Jul 11, 2012 at 01:56:19PM +0200, Gerd Hoffmann wrote: > >> On 07/11/12 12:31, Vasilis Liaskovitis wrote: > >>> In order to hotplug memory between RamSize and BUIL

Re: [Qemu-devel] [PATCH uq/master 2/9] event_notifier: remove event_notifier_test

2012-07-12 Thread Avi Kivity
On 07/05/2012 06:16 PM, Paolo Bonzini wrote: > This is broken; since the eventfd is used in nonblocking mode there > is a race between reading and writing. > > diff --git a/event_notifier.c b/event_notifier.c > index 2b210f4..c339bfe 100644 > --- a/event_notifier.c > +++ b/event_notifier.c > @@ -

Re: [Qemu-devel] [PATCH uq/master 3/9] event_notifier: add event_notifier_init_fd

2012-07-12 Thread Avi Kivity
On 07/05/2012 06:16 PM, Paolo Bonzini wrote: > > struct EventNotifier { > - int fd; > +int fd; > }; > If you're fixing whitespace, might as well fix it correctly. -- error compiling committee.c: too many arguments to function

Re: [Qemu-devel] [PATCH v2] qemu-img: correct help message

2012-07-12 Thread Kevin Wolf
Am 12.07.2012 05:28, schrieb Dong Xu Wang: > qemu-img not only suports k/K/M/G/T/b, but also supports m/g/t/B. So correct > it in help message. > > Signed-off-by: Dong Xu Wang > CC: riegama...@gmail.com > --- > v1->v2: also correct error reporting. This is only true for some cases. For example,

Re: [Qemu-devel] [PATCH uq/master 0/9] remove event_notifier_get_fd from non-KVM code

2012-07-12 Thread Avi Kivity
On 07/05/2012 06:16 PM, Paolo Bonzini wrote: > This is part 1 of a three-part series that expands usage of EventNotifier > in QEMU (including AIO and the main loop). I started working on this when > playing with the threaded block layer; the part of that work that I hope > will be in 1.2 is genera

Re: [Qemu-devel] [PATCH uq/master 2/9] event_notifier: remove event_notifier_test

2012-07-12 Thread Paolo Bonzini
Il 12/07/2012 11:10, Avi Kivity ha scritto: > On 07/05/2012 06:16 PM, Paolo Bonzini wrote: >> This is broken; since the eventfd is used in nonblocking mode there >> is a race between reading and writing. >> > >> diff --git a/event_notifier.c b/event_notifier.c >> index 2b210f4..c339bfe 100644 >> -

Re: [Qemu-devel] [Qemu-trivial] [PATCH] megasas: mark mfi_frame_desc as 'static'

2012-07-12 Thread Stefan Hajnoczi
On Wed, Jul 04, 2012 at 12:02:07PM +0200, Hannes Reinecke wrote: > Suggested by blue swirl. Patch is on top of Paolo's > scsi-next tree. > > Signed-off-by: Hannes Reinecke > Cc: Paolo Bonzini > Cc: Blue Swirl > --- > hw/megasas.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) T

Re: [Qemu-devel] [PATCH] MAINTAINERS: mark megasas as maintained

2012-07-12 Thread Stefan Hajnoczi
On Wed, Jul 04, 2012 at 12:02:25PM +0200, Hannes Reinecke wrote: > Add maintainers entry for megasas. > Patch is on top of Paolo's scsi-next tree. > > Signed-off-by: Hannes Reinecke > Cc: Paolo Bonzini > --- > MAINTAINERS |6 ++ > 1 files changed, 6 insertions(+), 0 deletions(-) Changi

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Markus Armbruster
Gerd Hoffmann writes: > Hi, > >> What I'd like to avoid is casual users setting up new guests with our >> shiny new q35 board getting their IDE drives connected to some slow, old >> controller just because they haven't discovered that if=ide doesn't cut >> it anymore, and they need to use if=ah

Re: [Qemu-devel] [PATCH uq/master 2/9] event_notifier: remove event_notifier_test

2012-07-12 Thread Avi Kivity
On 07/12/2012 01:30 PM, Paolo Bonzini wrote: > Il 12/07/2012 11:10, Avi Kivity ha scritto: >> On 07/05/2012 06:16 PM, Paolo Bonzini wrote: >>> This is broken; since the eventfd is used in nonblocking mode there >>> is a race between reading and writing. >>> >> >>> diff --git a/event_notifier.c b/e

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Markus Armbruster
Alexander Graf writes: > On 12.07.2012, at 10:17, Markus Armbruster wrote: > >> [Alex's illegibly long lines wrapped] >> >> Alexander Graf writes: >> >>> On 09.07.2012, at 10:50, Markus Armbruster wrote: >>> Alexander Graf writes: > We've had support for creating AHCI devices

Re: [Qemu-devel] [PATCH uq/master 2/9] event_notifier: remove event_notifier_test

2012-07-12 Thread Paolo Bonzini
Il 12/07/2012 13:04, Avi Kivity ha scritto: > Right, it's useless. I'll adjust the comment (and the whitespace fix) > and apply. Ok, thanks very much! Paolo

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Alexander Graf
On 12.07.2012, at 13:09, Markus Armbruster wrote: > Alexander Graf writes: > >> On 12.07.2012, at 10:17, Markus Armbruster wrote: >> >>> [Alex's illegibly long lines wrapped] >>> >>> Alexander Graf writes: >>> On 09.07.2012, at 10:50, Markus Armbruster wrote: > Alexander Graf

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Paolo Bonzini
Il 12/07/2012 13:09, Markus Armbruster ha scritto: >> > >> > It isn't. AHCI is on the same level as IDE. They both speak ATA, but >> > the guest os interface is completely different. You can write a >> > generic IDE driver, but that won't be able to talk to an AHCI >> > controller in AHCI mode. You

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Markus Armbruster
Alexander Graf writes: > On 12.07.2012, at 13:09, Markus Armbruster wrote: > >> Alexander Graf writes: >> >>> On 12.07.2012, at 10:17, Markus Armbruster wrote: >>> [Alex's illegibly long lines wrapped] Alexander Graf writes: > On 09.07.2012, at 10:50, Markus Armbrust

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Alexander Graf
On 12.07.2012, at 10:17, Markus Armbruster wrote: > [Alex's illegibly long lines wrapped] > > Alexander Graf writes: > >> On 09.07.2012, at 10:50, Markus Armbruster wrote: >> >>> Alexander Graf writes: >>> We've had support for creating AHCI devices using -device for a while now,

[Qemu-devel] [PATCH] qemu-io: Fix memory leaks

2012-07-12 Thread Kevin Wolf
Almost all callers of create_iovec() forgot to destroy the qiov when the request has completed. Signed-off-by: Kevin Wolf --- qemu-io.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 5882067..8f3b94b 100644 --- a/qemu-io.c +++ b/qemu-io.c

[Qemu-devel] [PATCH 3/6] uhci: initialize expire_time when loading v1 vmstate

2012-07-12 Thread Gerd Hoffmann
$subject says all: when loading old (v1) vmstate which doesn't contain expire_time initialize it with a reasonable default (current time). Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/h

[Qemu-devel] [PATCH 1/6] scsi: add free_request callback

2012-07-12 Thread Gerd Hoffmann
From: Paolo Bonzini Most device models have a simple lifecycle for the hba_private field and they can free it when a request is completed or cancelled. However, in some cases it may be simpler to tie the lifetime of hba_private to that of the included SCSIRequest. This patch adds a free_request

[Qemu-devel] [PATCH 4/6] ehci: raise irq in the frame timer

2012-07-12 Thread Gerd Hoffmann
With the async schedule being kicked from other places than the frame timer (commit 0f588df8b3688b00e77aabaa32e26ece5f19bd39) it may happen that we call ehci_commit_interrupt() more than once per frame. Move the call from the async schedule handler to the frame timer to restore old irq behavior, w

[Qemu-devel] [PATCH 5/6] ehci: implement Interrupt Threshold Control support

2012-07-12 Thread Gerd Hoffmann
Also reorganize and comment the irq functions while being at it. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 83 ++-- trace-events |2 +- 2 files changed, 55 insertions(+), 30 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/us

[Qemu-devel] [PATCH 2/6] usb: add usb attached scsi emulation

2012-07-12 Thread Gerd Hoffmann
$subject says all. First cut. It's a pure UAS (usb attached scsi) emulation, without BOT (bulk-only transport) compatibility. If your guest can't handle it use usb-storage instead. The emulation works like any other scsi hba emulation (eps, lsi, virtio, megasas, ...). It provides just the HBA

[Qemu-devel] [PATCH 6/6] ehci: improve expire time calculation

2012-07-12 Thread Gerd Hoffmann
Move down the expire time calculation down in the frame timer, to the point where the timer is actually reloaded. This way we'll notice any async_stepdown changes (especially resetting to 0 due to usb activity). Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c |8 1 files changed

Re: [Qemu-devel] [PATCH 3/6] uhci: initialize expire_time when loading v1 vmstate

2012-07-12 Thread Michael Tokarev
On 12.07.2012 17:08, Gerd Hoffmann wrote: > $subject says all: when loading old (v1) vmstate which doesn't contain > expire_time initialize it with a reasonable default (current time). -stable (1.1) material? Thanks, /mjt

[Qemu-devel] [PULL 0/6] usb patch queue

2012-07-12 Thread Gerd Hoffmann
Hi, Brings UAS (usb attached scsi) support, fixes and improvements for the ehci interrupt handling and a little uhci loadvm compatibility bugfix. please pull, Gerd The following changes since commit 92336855975805d88c7979f53bc05c2d47abab04: megasas: disable due to build breakage (2012-07-

[Qemu-devel] [PATCH v2] MP initialization protocol differs between cpu families, and for P6 and onward models it is up to CPU to decide if it will be BSP using this protocol, so try to model this. How

2012-07-12 Thread Igor Mammedov
This patch: - moves decision to designate BSP from board into cpu, making cpu self-sufficient in this regard. Later it will allow to cleanup hw/pc.c and remove cpu_reset and wrappers from there. - stores flag that CPU is BSP in IA32_APIC_BASE to model behavior described in Inted SDM vol 3a part 1

Re: [Qemu-devel] [PATCH 1/2] target-i386: move cpu halted decision into x86_cpu_reset

2012-07-12 Thread Igor Mammedov
On 07/12/2012 08:38 AM, Gleb Natapov wrote: On Tue, Jul 10, 2012 at 03:15:51PM +0200, Igor Mammedov wrote: /* pc.c */ -int cpu_is_bsp(CPUX86State *env); Why remove it instead of modifying it to check BSP bit in apic base? I think it will make the patch smaller and open code the check does not

[Qemu-devel] [PATCH] net: Add interface to bridge when SIOCBRADDIF isn't available

2012-07-12 Thread Corey Bryant
The bridge helper uses the SIOCBRADDIF ioctl to add an inteface to a bridge. SIOCBRADDIF is not available on old Linux versions. This patch adds support to use the SIOCDEVPRIVATE ioctl with BRCTL_ADD_IF if SIOCBRADDIF is not available. Reported-by: Fabien Chouteau Signed-off-by: Corey Bryant -

[Qemu-devel] [PULL 0/1] vgabios: add makefile rules

2012-07-12 Thread Gerd Hoffmann
Hi, This patch adds some glue to roms/Makefile to build vgabios binaries for qemu. It covers both the lgpl'ed vgabios implementation used by qemu traditionally and the new seabios implementation. The purpose of this patch is to (a) document the vgabios build process and (b) simplify seavgabios

[Qemu-devel] [PATCH 1/1] Add vgabios build rules to roms/Makefile

2012-07-12 Thread Gerd Hoffmann
This patch adds some glue to roms/Makefile to build vgabios binaries for qemu. It covers both the lgpl'ed vgabios implementation used by qemu traditionally and the new seabios implementation. The purpose of this patch is to (a) document the vgabios build process and (b) simplify seavgabios testin

Re: [Qemu-devel] [PATCH v2] MP initialization protocol differs between cpu families, and for P6 and onward models it is up to CPU to decide if it will be BSP using this protocol, so try to model this.

2012-07-12 Thread Peter Maydell
On 12 July 2012 14:22, Igor Mammedov wrote: > This patch: > - moves decision to designate BSP from board into cpu, making cpu > self-sufficient in this regard. Later it will allow to cleanup hw/pc.c > and remove cpu_reset and wrappers from there. > - stores flag that CPU is BSP in IA32_APIC_BASE

Re: [Qemu-devel] [RFC] block: Removed coroutine ownership assumption

2012-07-12 Thread Markus Armbruster
Kevin Wolf writes: > Am 02.07.2012 11:42, schrieb Peter Crosthwaite: >> On Mon, Jul 2, 2012 at 7:04 PM, Kevin Wolf wrote: >>> Am 02.07.2012 10:57, schrieb Peter Crosthwaite: No conditional on the qemu_coroutine_create. So it will always create a new coroutine for its work which will so

Re: [Qemu-devel] [RFC PATCH 22/36] block: add mirror job

2012-07-12 Thread Paolo Bonzini
Il 15/06/2012 20:20, Eric Blake ha scritto: >> > The second phase is indicated by the progress in "info block-jobs" >> > reporting the current offset to be equal to the length of the file. >> > When the job is cancelled in the second phase, QEMU will run the >> > job until the source is clean and q

[Qemu-devel] [PATCH 13/15] target-arm: Implement long-descriptor PAR format

2012-07-12 Thread Peter Maydell
Implement the different format of the PAR when long descriptor translation tables are in use. Note that we assume that get_phys_addr() returns a long-descriptor format DFSR value on failure if long descriptors are in use; this added subtlety tips the balance and makes it worth adding a comment docu

Re: [Qemu-devel] [RFC 0/7+1] QEMU APIC ID + topology bug + CPU hotplug

2012-07-12 Thread Igor Mammedov
On 07/10/2012 10:22 PM, Eduardo Habkost wrote: The hotplug case is a bit more complex: we need to either: - have a mechanism to let the ACPI SSDT code know what's the APIC ID of hotplugged CPUs; or - make Seabios run some code in the hotplugged CPU (I am assuming that this is simply n

Re: [Qemu-devel] [RFC 0/7+1] QEMU APIC ID + topology bug + CPU hotplug

2012-07-12 Thread Gleb Natapov
On Thu, Jul 12, 2012 at 03:51:48PM +0200, Igor Mammedov wrote: > On 07/10/2012 10:22 PM, Eduardo Habkost wrote: > >The hotplug case is a bit more complex: we need to either: > > - have a mechanism to let the ACPI SSDT code know what's the APIC ID of > >hotplugged CPUs; or > > - make Seabios r

[Qemu-devel] [PATCH 06/15] ARM: Make target_phys_addr_t 64 bits and physaddrs 40 bits

2012-07-12 Thread Peter Maydell
Make target_phys_addr_t 64 bits for ARM targets, and set TARGET_PHYS_ADDR_SPACE_BITS to 40. This should have no effect for ARM boards where physical addresses really are 32 bits (except perhaps a slight performance hit on 32 bit hosts for system emulation) but allows us to implement the Large Phys

[Qemu-devel] [PATCH 08/15] target-arm: Extend feature flags to 64 bits

2012-07-12 Thread Peter Maydell
Extend feature flags to 64 bits, as we've just run out of space in the 32 bit integer we were using for them. Signed-off-by: Peter Maydell --- target-arm/cpu.c |2 +- target-arm/cpu.h |6 +++--- target-arm/machine.c |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) d

[Qemu-devel] [PATCH 01/15] target-arm: Fix CP15 based WFI

2012-07-12 Thread Peter Maydell
From: Paul Brook The coprocessor register rework broke cp15 based WFI instructions. We incorrectly fall through the normal register write case, which incorrectly adds a forced block termination. We've already done a special version of this (DISAS_WFI), so return immediately. Signed-off-by: Paul

[Qemu-devel] [PATCH 10/15] target-arm: Add 64 bit variants of DBGDRAR and DBGDSAR for LPAE

2012-07-12 Thread Peter Maydell
LPAE extends the DBGDRAR and DBGDSAR debug registers to 64 bits; we only implement these as dummy RAZ versions; provide dummies for the 64 bit accesses as well. Signed-off-by: Peter Maydell --- target-arm/helper.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/targe

[Qemu-devel] [PATCH 2/2] qemu-iotests: Valgrind support

2012-07-12 Thread Kevin Wolf
check -valgrind wraps all qemu-io calls with valgrind. This makes it a bit easier to debug problems that occur somewhere deep in a test case. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/common| 11 +++ tests/qemu-iotests/common.rc | 10 ++ 2 files changed, 21 inserti

[Qemu-devel] [PATCH 05/15] hw/imx_avic.c: Avoid format error when target_phys_addr_t is 64 bits

2012-07-12 Thread Peter Maydell
Add a missing cast to avoid gcc complaining about format string errors when printing an expression based on a target_phys_addr_t. Signed-off-by: Peter Maydell Reviewed-by: Peter Chubb --- hw/imx_avic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/imx_avic.c b/hw/

[Qemu-devel] [PATCH 0/2] qemu-iotests: valgrind support

2012-07-12 Thread Kevin Wolf
Kevin Wolf (2): coroutine-ucontext: Help valgrind understand coroutines qemu-iotests: Valgrind support configure| 18 ++ coroutine-ucontext.c | 21 + tests/qemu-iotests/common| 11 +++ tests/qemu-iotests/common.

[Qemu-devel] [PATCH 1/2] coroutine-ucontext: Help valgrind understand coroutines

2012-07-12 Thread Kevin Wolf
valgrind tends to get confused and report false positives when you switch stacks and don't tell it about it. Signed-off-by: Kevin Wolf --- configure| 18 ++ coroutine-ucontext.c | 21 + 2 files changed, 39 insertions(+), 0 deletions(-) diff --

[Qemu-devel] [PATCH 04/15] target-arm: Fix TCG temp handling in 64 bit cp writes

2012-07-12 Thread Peter Maydell
Fix errors in the TCG temp handling in the 64 bit coprocessor write path: we were reusing a 32 bit temp after it had been freed by store_reg(), and failing to free a 64 bit temp. This bug has no visible effect at this point because there aren't any non-NOP 64 bit registers yet; it needs to be fixe

[Qemu-devel] [PATCH 11/15] target-arm: Add 64 bit PAR, TTBR0, TTBR1 for LPAE

2012-07-12 Thread Peter Maydell
Under LPAE, the cp15 registers PAR, TTBR0 and TTBR1 are extended to 64 bits, with a 64 bit (MRRC/MCRR) access path to read the full width of the register. Add the state fields for the top half and the 64 bit access path. Actual use of the top half of the register will come with the addition of the

Re: [Qemu-devel] [PATCH v2] ahci: add -drive support

2012-07-12 Thread Markus Armbruster
Alexander Graf writes: > On 12.07.2012, at 10:17, Markus Armbruster wrote: > >> [Alex's illegibly long lines wrapped] >> >> Alexander Graf writes: >> >>> On 09.07.2012, at 10:50, Markus Armbruster wrote: >>> Alexander Graf writes: > We've had support for creating AHCI devices

[Qemu-devel] [PATCH 07/15] target-arm: Implement privileged-execute-never (PXN)

2012-07-12 Thread Peter Maydell
Implement the privileged-execute-never (PXN) translation table bit. It is implementation-defined whether this is implemented, so we give it its own ARM_FEATURE_ flag. LPAE requires PXN, so add also an LPAE feature flag and the implication logic, as a placeholder for actually implementing LPAE at a

[Qemu-devel] [PATCH 02/15] target-arm: Fix typo that meant TTBR1 accesses went to TTBR0

2012-07-12 Thread Peter Maydell
Fix a copy-and-paste error in the register description for TTBR1 that meant it was a duplicate of TTBR0 rather than affecting the correct bit of CPU state. Signed-off-by: Peter Maydell --- target-arm/helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-arm/he

[Qemu-devel] [PATCH 14/15] target-arm: Implement TTBCR changes for LPAE

2012-07-12 Thread Peter Maydell
Implement the changes to the TTBCR register required for LPAE: * many fewer bits should be RAZ/WI * since TTBCR changes can result in a change of ASID, we must flush the TLB on writes to it Signed-off-by: Peter Maydell --- target-arm/helper.c | 15 ++- 1 files changed, 14 inse

[Qemu-devel] [PATCH 12/15] target-arm: Use target_phys_addr_t in get_phys_addr()

2012-07-12 Thread Peter Maydell
In the implementation of get_phys_addr(), consistently use target_phys_addr_t to hold the physical address rather than uint32_t. Signed-off-by: Peter Maydell --- target-arm/helper.c | 29 +++-- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/target-arm/

[Qemu-devel] [PATCH 03/15] target-arm: Fix some copy-and-paste errors in cp register names

2012-07-12 Thread Peter Maydell
Fix a couple of cases where cp register names were copy-and-pasted. These are harmless since we don't use the name for anything (except debugging convenience) but could be confusing. Signed-off-by: Peter Maydell Reviewed-by: Igor Mitsyanko --- target-arm/helper.c |6 +++--- 1 files changed,

[Qemu-devel] [PATCH 15/15] target-arm: Add support for long format translation table walks

2012-07-12 Thread Peter Maydell
Implement the actual table walk code for LPAE's long format translation tables. Signed-off-by: Peter Maydell --- target-arm/helper.c | 182 +++ 1 files changed, 182 insertions(+), 0 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helpe

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

2012-07-12 Thread Peter Maydell
Usual target-arm pullreq. This one has a couple of bugfixes for issues in the cp15 rework, and the LPAE patch series (including switching to 64 bit physaddrs for ARM, and a trivial imx_avic patch which is needed as a prerequisite for that). thanks -- PMM The following changes since commit 9233685

[Qemu-devel] [PATCH 09/15] target-arm: Add AMAIR0, AMAIR1 LPAE cp15 registers

2012-07-12 Thread Peter Maydell
Add implementations of the AMAIR0 and AMAIR1 LPAE Auxiliary Memory Attribute Indirection Registers. These are implementation defined and we choose to implement them as RAZ/WI, matching the Cortex-A7 and Cortex-A15. Signed-off-by: Peter Maydell --- target-arm/helper.c | 16 1 f

[Qemu-devel] [PATCH] ivshmem: add 64bit option

2012-07-12 Thread Gerd Hoffmann
This patch adds a "use64" property which will make the ivshmem driver register a 64bit memory bar when set, so you have something to play with when testing 64bit pci bits. It also allows to have quite big shared memory regions, like this: [root@fedora ~]# lspci -vs1:1 01:01.0 RAM memory: Red Hat,

Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey

2012-07-12 Thread Luiz Capitulino
On Thu, 5 Jul 2012 20:48:44 +0800 Amos Kong wrote: > Convert 'sendkey' to use QAPI. do_sendkey() depends on some > variables/functions in monitor.c, so reserve qmp_sendkey() > to monitor.c > > key_defs[] in console.h is the mapping of key name to keycode, > Keys' index in the enmu and key_defs[

Re: [Qemu-devel] [PATCH 4/4] ARM: exynos4210_pmu: Add software reset support

2012-07-12 Thread Maksim Kozlov
I didn't delete comment in this file. This comment become irrelevant after apply this patch. I'll send new patch set. 06.07.2012 19:49, Maksim Kozlov пишет: Signed-off-by: Maksim Kozlov --- hw/exynos4210_pmu.c | 34 +- 1 files changed, 33 insertions(+), 1 de

Re: [Qemu-devel] [PATCH 0/2] qemu-iotests: valgrind support

2012-07-12 Thread Paolo Bonzini
Il 12/07/2012 16:27, Kevin Wolf ha scritto: > Kevin Wolf (2): > coroutine-ucontext: Help valgrind understand coroutines > qemu-iotests: Valgrind support > > configure| 18 ++ > coroutine-ucontext.c | 21 + > tests/qemu-iotest

[Qemu-devel] [PATCH] ide scsi: Mess with geometry only for hard disk devices

2012-07-12 Thread Markus Armbruster
Legacy -drive cyls=... are now ignored completely when the drive doesn't back a hard disk device. Before, they were first checked against a hard disk's limits, then ignored. Signed-off-by: Markus Armbruster --- hw/ide/qdev.c |3 ++- hw/scsi-disk.c |3 ++- 2 files changed, 4 insertions(

[Qemu-devel] [PATCH v2 0/4] ARM: exynos4210 PMU modifications

2012-07-12 Thread Maksim Kozlov
This patchset created mainly to add software reset support, but includes some other things. 1. fix formatting of the exynos4210_pmu_regs structure 2. fix PRINT_DEBUG macro set to be able to enable extend and non-extend output independently of each other 3. introduce new function to get register

[Qemu-devel] [PATCH v2 1/4] ARM: exynos4210_pmu: just formatting changes

2012-07-12 Thread Maksim Kozlov
Mainly to make 'exynos4210_pmu_regs' array more readable. Signed-off-by: Maksim Kozlov --- hw/exynos4210_pmu.c | 324 ++- 1 files changed, 164 insertions(+), 160 deletions(-) diff --git a/hw/exynos4210_pmu.c b/hw/exynos4210_pmu.c index c12d750..2

[Qemu-devel] [PATCH v2 2/4] ARM: exynos4210_pmu: changes in PRINT_DEBUG macro set.

2012-07-12 Thread Maksim Kozlov
It make possible to set DEBUG_PMU and DEBUG_PMU_EXTEND independently of each other Signed-off-by: Maksim Kozlov --- hw/exynos4210_pmu.c | 23 +-- 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/hw/exynos4210_pmu.c b/hw/exynos4210_pmu.c index 2be7e08..26a726f

[Qemu-devel] [RFC PATCH 1/4] qapi: Convert savevm

2012-07-12 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- hmp-commands.hx |2 +- hmp.c| 10 ++ hmp.h|1 + qapi-schema.json | 22 ++ qerror.c | 24 qerror.h | 18 ++ qmp-commands.hx | 26

[Qemu-devel] [RFC PATCH 2/4] qapi: Convert loadvm

2012-07-12 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- hmp-commands.hx |2 +- hmp.c| 10 ++ hmp.h|1 + monitor.c| 12 qapi-schema.json | 24 +++- qerror.c | 16 qerror.h | 12 qmp-c

[Qemu-devel] [PATCH v2 3/4] ARM: exynos4210_pmu: Introduced exynos4210_pmu_get_register_index

2012-07-12 Thread Maksim Kozlov
This patch just introduces exynos4210_pmu_get_register_index function to get index of the register's value in the array on its offset. And functions _read and _write were modified accordingly. Signed-off-by: Maksim Kozlov --- hw/exynos4210_pmu.c | 56 ---

[Qemu-devel] [RFC PATCH 0/4] qapi: Convert snapshot's commands

2012-07-12 Thread Pavel Hrdina
This patch-series converts savevm, loadvm, delvm and info snapshots from HMP into QMP as savevm, loadvm, delvm and query-snapshots. All comments are welcome. Pavel Pavel Hrdina (4): qapi: Convert savevm qapi: Convert loadvm qapi: Convert delvm qapi: Convert info snapshots hmp-commands.

[Qemu-devel] [RFC PATCH 4/4] qapi: Convert info snapshots

2012-07-12 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- hmp.c| 34 ++ hmp.h|1 + monitor.c|2 +- qapi-schema.json | 35 +++ qerror.c |4 qerror.h |3 +++ qmp-commands.hx | 31 +

Re: [Qemu-devel] [PATCH 1/2] coroutine-ucontext: Help valgrind understand coroutines

2012-07-12 Thread Stefan Weil
Great that you address this issue! I have two annotations, please see below. Am 12.07.2012 16:27, schrieb Kevin Wolf: valgrind tends to get confused and report false positives when you switch stacks and don't tell it about it. Signed-off-by: Kevin Wolf --- configure| 18 ++

Re: [Qemu-devel] [PATCH 0/2] qemu-iotests: valgrind support

2012-07-12 Thread Stefan Weil
Am 12.07.2012 18:51, schrieb Paolo Bonzini: Il 12/07/2012 16:27, Kevin Wolf ha scritto: Kevin Wolf (2): coroutine-ucontext: Help valgrind understand coroutines qemu-iotests: Valgrind support configure| 18 ++ coroutine-ucontext.c | 21 +++

Re: [Qemu-devel] [PATCH 1/2] coroutine-ucontext: Help valgrind understand coroutines

2012-07-12 Thread Peter Maydell
On 12 July 2012 15:27, Kevin Wolf wrote: > valgrind tends to get confused and report false positives when you > switch stacks and don't tell it about it. Does the sigaltstack backend need anything similar? -- PMM

[Qemu-devel] [PATCH v2 4/4] ARM: exynos4210_pmu: Add software reset support

2012-07-12 Thread Maksim Kozlov
Signed-off-by: Maksim Kozlov --- hw/exynos4210_pmu.c | 40 +--- 1 files changed, 33 insertions(+), 7 deletions(-) diff --git a/hw/exynos4210_pmu.c b/hw/exynos4210_pmu.c index 7f09c79..96588d9 100644 --- a/hw/exynos4210_pmu.c +++ b/hw/exynos4210_pmu.c @@ -18,

[Qemu-devel] [RFC PATCH 3/4] qapi: Convert delvm

2012-07-12 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- hmp-commands.hx |2 +- hmp.c| 10 ++ hmp.h|1 + qapi-schema.json | 17 + qmp-commands.hx | 24 savevm.c | 21 +++-- sysemu.h |1 - 7 file

Re: [Qemu-devel] [RFC PATCH 1/4] qapi: Convert savevm

2012-07-12 Thread Eric Blake
On 07/12/2012 10:55 AM, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > +++ b/qapi-schema.json > @@ -1868,3 +1868,25 @@ > # Since: 0.14.0 > ## > { 'command': 'netdev_del', 'data': {'id': 'str'} } > + > +## > +# @savevm: > +# > +# Create a snapshot of the whole virtual machine. If 'ta

Re: [Qemu-devel] [RFC PATCH 2/4] qapi: Convert loadvm

2012-07-12 Thread Eric Blake
On 07/12/2012 10:55 AM, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > +++ b/qapi-schema.json > @@ -1889,4 +1889,26 @@ > # > # Since: 1.2 > ## > -{ 'command': 'savevm', 'data': {'*name': 'str'} } > \ No newline at end of file > +{ 'command': 'savevm', 'data': {'*name': 'str'} } > +

Re: [Qemu-devel] [RFC PATCH 3/4] qapi: Convert delvm

2012-07-12 Thread Eric Blake
On 07/12/2012 10:55 AM, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > hmp-commands.hx |2 +- > hmp.c| 10 ++ > hmp.h|1 + > qapi-schema.json | 17 + > qmp-commands.hx | 24 > savevm.c |

Re: [Qemu-devel] [RFC PATCH 4/4] qapi: Convert info snapshots

2012-07-12 Thread Eric Blake
On 07/12/2012 10:55 AM, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > +++ b/qapi-schema.json > @@ -934,6 +934,41 @@ > { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] } > > ## > +# @SnapshotInfo: > +# > +# Snapshot list. This structure contains list of snapshots for v

[Qemu-devel] [Bug 965327] Re: virtio-pci: can't reserve io 0x0000-0x001f

2012-07-12 Thread Kenneth Salerno
The changelog for 1.1.0-1 states "Pseries handles PCI, allowing for virtio devices with -M pseries" while this bug report here still stands as an issue I'm having where SLOF detects my virtio-block device but QEMU does not create a virtio-pci device that the Linux kernel can recognize. I would at l

[Qemu-devel] invoking monitor command without Ctrl+Alt+2

2012-07-12 Thread siddharth srivastava
Hi I am working on a virtualization project for which I am using Qemu(0.13) + KVM.I am trying to get an automated switch to live migration based on certain condition. According to [1], it is possible to start migration via Qemu Monitor. Since I am trying to invoke this via C code, is it possible t

Re: [Qemu-devel] [QEMU PATCH 2/7] hw/apic.c: rename bit functions to not conflict with bitops.h

2012-07-12 Thread Blue Swirl
On Tue, Jul 10, 2012 at 8:22 PM, Eduardo Habkost wrote: > Signed-off-by: Eduardo Habkost Maybe the bitops functions should be renamed instead, for example prefixed by 'qemu_'. That may be safer if one day the kernel find their way to system headers too. > --- > hw/apic.c | 34 +++

Re: [Qemu-devel] [QEMU RFC PATCH 5/7] pc: write lapic info (apic IDs) to fw_cfg so seabios can use it

2012-07-12 Thread Blue Swirl
On Tue, Jul 10, 2012 at 8:22 PM, Eduardo Habkost wrote: > Signed-off-by: Eduardo Habkost > --- > hw/pc.c | 23 +++ > 1 file changed, 23 insertions(+) > > diff --git a/hw/pc.c b/hw/pc.c > index 3b8e469..dc95fb8 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -71,6 +71,7 @@ > #d

Re: [Qemu-devel] invoking monitor command without Ctrl+Alt+2

2012-07-12 Thread Eric Blake
On 07/12/2012 01:17 PM, siddharth srivastava wrote: > Hi > > I am working on a virtualization project for which I am using > Qemu(0.13) + KVM. That's rather old; we're now at 1.1, and there have been some migration bugs fixed in the meantime. >I am trying to get an automated switch to live > mig

Re: [Qemu-devel] [QEMU RFC PATCH 6/7] i386: topology & APIC ID utility functions

2012-07-12 Thread Blue Swirl
On Tue, Jul 10, 2012 at 8:22 PM, Eduardo Habkost wrote: > Signed-off-by: Eduardo Habkost > --- > target-i386/topology.h | 138 > > tests/.gitignore |1 + > tests/Makefile |7 ++- > tests/test-x86-cpuid.c | 108

Re: [Qemu-devel] [PATCH 4/5] Avoid unportable %m format

2012-07-12 Thread Blue Swirl
On Tue, Jul 10, 2012 at 8:53 PM, Anthony Liguori wrote: > On 07/08/2012 06:51 AM, blauwir...@gmail.com wrote: >> >> From: Blue Swirl >> >> Replace %m format with explicit call to standard strerror(). >> >> Signed-off-by: Blue Swirl > > > I would expect '%m' to be thread safe whereas strerror() isn

Re: [Qemu-devel] [RFC PATCH v2 09/21] pc: Add dimm paravirt SRAT info

2012-07-12 Thread Blue Swirl
On Wed, Jul 11, 2012 at 10:31 AM, Vasilis Liaskovitis wrote: > The numa_fw_cfg paravirt interface is extended to include SRAT information for > all hotplug-able dimms. There are 3 words for each hotplug-able memory slot, > denoting start address, size and node proximity. The new info is appended

  1   2   >