Re: [Qemu-devel] [PATCH v2] utils: Add pow2ceil()

2015-03-13 Thread Markus Armbruster
Richard Henderson writes: > On 02/25/2015 02:45 AM, Markus Armbruster wrote: >> return 0x8000u >> (clz64(value - 1) - 1); > > I realize this was weeks ago, but it would certainly be preferable to shift a > small constant left than a large constant right. > > Most RISC machines can't f

Re: [Qemu-devel] Dummy question for setting up a serial connection between host and guest

2015-03-13 Thread Markus Armbruster
Christopher Covington writes: > Hi Alex, > > On 03/10/2015 09:12 PM, Alex Sun wrote: >> I downloaded QEMU 2.2.0, and built a qemu-system-arm from there. >> I loaded a versatile kernel 2.6.32.5 and my own file system. >> >> #qemu-system-arm -pidfile /tmp/qemu_0_pids/0.pid -M versatilepb -option-r

[Qemu-devel] [PATCH] virtio-scsi: Fix assert in virtio_scsi_push_event

2015-03-13 Thread Fam Zheng
Hotplugging a scsi-disk may trigger the assertion in qemu_sgl_concat. qemu-system-x86_64: qemu/hw/scsi/virtio-scsi.c:115: qemu_sgl_concat: Assertion `skip == 0' failed. This is introduced by commit 55783a55 (virtio-scsi: work around bug in old BIOSes) which didn't check out_num when acces

Re: [Qemu-devel] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-13 Thread Greg Kurz
On Thu, 12 Mar 2015 17:25:15 +0100 Paolo Bonzini wrote: > > > On 12/03/2015 08:08, Michael S. Tsirkin wrote: > > But common header format is simple, it's always LE. > > It does not depend on target. > > To me this looks like a bug in memory_region_add_eventfd, > > it should do the right thing de

Re: [Qemu-devel] [PATCH] block/throttle: Use host clock type

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 07:35, Fam Zheng wrote: > Throttle timers won't make any progress when VCPU is not running, which > is prone to stall the request queue in cases like utils, qtest, > suspending, and live migration, unless carefully handled. What we do now > is crude. For example in bdrv_drain_all, r

Re: [Qemu-devel] [PATCH v2 1/4] exec: Atomic access to bounce buffer

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 02:38, Fam Zheng wrote: > There could be a race condition when two processes call > address_space_map concurrently and both want to use the bounce buffer. > > Add an in_use flag in BounceBuffer to sync it. > > Signed-off-by: Fam Zheng > --- > exec.c | 5 - > 1 file changed,

[Qemu-devel] [PATCH v5 for-2.3 2/4] hmp: Rename 'MigrationStatus' to 'HMPMigrationStatus'

2015-03-13 Thread zhanghailiang
We will use the typename 'MigrationStatus' for publicly exported typename, So here we rename the internal-only 'MigrationStatus' to 'HMPMigrationStatus'. Signed-off-by: zhanghailiang Reviewed-by: Eric Blake --- hmp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hm

[Qemu-devel] [PATCH v5 for-2.3 1/4] migration: Rename abbreviated macro MIG_STATE_* to MIGRATION_STATUS_*

2015-03-13 Thread zhanghailiang
Rename all macro MIG_STATE_* to MIGRATION_STATUS_* except "MIG_STATE_ERROR", we rename it to "MIGRATION_STATUS_FAILED" which will match the migration status string 'failed'. Signed-off-by: zhanghailiang Reviewed-by: Eric Blake --- migration/migration.c | 93 +++-

[Qemu-devel] [PATCH v5 for-2.3 0/4] Convert 'status' of MigrationInfo from open-coded 'str' to enum type

2015-03-13 Thread zhanghailiang
Hi Juan & Amit, This series has been reviewed, and could you help merging them ? Thanks, zhanghailiang This series converts open-coded 'str' type to enum type for 'status'. This conversion will be more convenient for future extensibility. Actually, I will add a MIG_STATE_COLO state for COLO, a

[Qemu-devel] [PATCH v5 for-2.3 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread zhanghailiang
'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a possible start of a new migration process while the previous one still exists. But we didn't expose this status to user, instead we returned the 'active' state. Here, we expose it to the user (such as libvirt), 'cancelling'

[Qemu-devel] [PATCH 2/2] memory: fix the eventfd data endianness according to the host

2015-03-13 Thread Greg Kurz
The data argument is a host entity. It is not related to the target endianness. Let's introduce a HOST_WORDS_BIGENDIAN based helper for that. This patch fixes ioeventfd and vhost for a ppc64le host running a ppc64le guest (only virtqueue 0 was handled, all others being byteswapped because of TARGE

[Qemu-devel] [PATCH 1/2] memory: make adjust_endianness() generic

2015-03-13 Thread Greg Kurz
This patch just moves the decision to swap up to the callers. It changes no functionnality and will allow a subsequent patch to perform host endianness based swapping. Signed-off-by: Greg Kurz --- memory.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/memory.

Re: [Qemu-devel] [PATCH v2 4/4] dma-helpers: Move reschedule_dma BH to blk's AioContext

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 02:38, Fam Zheng wrote: > That if the dbs' owner is an iothread, dma should be resumed on the right > thread. In this case it is the AioContext of the block device. > > Signed-off-by: Fam Zheng > --- > dma-helpers.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >

[Qemu-devel] [PATCH v5 for-2.3 3/4] migration: Convert 'status' of MigrationInfo to use an enum type

2015-03-13 Thread zhanghailiang
The original 'status' is an open-coded 'str' type, convert it to use an enum type. This conversion is backwards compatible, better documented and more convenient for future extensibility. In addition, Fix a typo for qapi-schema.json (just remove the typo) : s/'completed'. 'comppleted' (since 1.2)/

Re: [Qemu-devel] [PATCH v2 3/4] exec: Notify cpu_register_map_client caller if the bounce buffer is available

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 02:38, Fam Zheng wrote: > The caller's workflow is like > > if (!address_space_map()) { > ... > cpu_register_map_client(); > } > > If bounce buffer became available after address_space_map() but before > cpu_register_map_client(), the caller could miss it a

Re: [Qemu-devel] [PATCH v2 2/4] exec: Atomic access to map_client_list

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 02:38, Fam Zheng wrote: > Change map_client_list to QSLIST which supports atomic operations. > > There are two access points to map_client_list. One is > cpu_register_map_client, the other is cpu_notify_map_clients called > after releasing the global bounce buffer in address_space_

Re: [Qemu-devel] [PATCH v2 1/4] exec: Atomic access to bounce buffer

2015-03-13 Thread Fam Zheng
On Fri, 03/13 09:09, Paolo Bonzini wrote: > > > On 13/03/2015 02:38, Fam Zheng wrote: > > There could be a race condition when two processes call > > address_space_map concurrently and both want to use the bounce buffer. > > > > Add an in_use flag in BounceBuffer to sync it. > > > > Signed-off-

Re: [Qemu-devel] [PATCH v4 14/17] ahci: Migrate IDEStatus

2015-03-13 Thread Kevin Wolf
Am 13.03.2015 um 07:01 hat Amit Shah geschrieben: > On (Mon) 23 Feb 2015 [11:18:03], John Snow wrote: > > Amazingly, we weren't doing this before. > > > > Make sure we migrate the IDEState structure that belongs to > > the AHCIDevice.IDEBus structure during migrations. > > > > No version numberin

Re: [Qemu-devel] [PATCH RFC 0/2] Limit support for encrypted images to qemu-img

2015-03-13 Thread Kevin Wolf
Am 12.03.2015 um 17:58 hat Paolo Bonzini geschrieben: > > For cold plug, have a command line arg '--add-keys prompt' to > > indicate the user should be prompted on TTY to enter keys, > > This can even be the default if you have a human monitor open. > (Downside: the default human monitor, accessib

Re: [Qemu-devel] [PATCH] block/throttle: Use host clock type

2015-03-13 Thread Fam Zheng
On Fri, 03/13 09:08, Paolo Bonzini wrote: > > > On 13/03/2015 07:35, Fam Zheng wrote: > > Throttle timers won't make any progress when VCPU is not running, which > > is prone to stall the request queue in cases like utils, qtest, > > suspending, and live migration, unless carefully handled. What

Re: [Qemu-devel] [PATCH v2 1/4] exec: Atomic access to bounce buffer

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 09:16, Fam Zheng wrote: >>> > > +if (atomic_cmpxchg(&bounce.in_use, false, true)) { >> > >> > atomic_or is enough... > atomic_cmpxchg is here to take the ownership of bounce iff it is not in use, > so > I think it is necessary. It's changing false to true and true to true

Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-posix-acl: Fix out-of-bounds access

2015-03-13 Thread Aneesh Kumar K.V
Shannon Zhao writes: > It's detected by coverity. Fix out-of-bounds access of the function > mp_dacl_listxattr. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > --- > hw/9pfs/virtio-9p-posix-acl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/9pfs/

Re: [Qemu-devel] [PATCH v2 1/4] exec: Atomic access to bounce buffer

2015-03-13 Thread Fam Zheng
On Fri, 03/13 09:32, Paolo Bonzini wrote: > > > On 13/03/2015 09:16, Fam Zheng wrote: > >>> > > +if (atomic_cmpxchg(&bounce.in_use, false, true)) { > >> > > >> > atomic_or is enough... > > atomic_cmpxchg is here to take the ownership of bounce iff it is not in > > use, so > > I think it

Re: [Qemu-devel] [PATCH v2 1/4] exec: Atomic access to bounce buffer

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 09:32, Paolo Bonzini wrote: > > > On 13/03/2015 09:16, Fam Zheng wrote: >> +if (atomic_cmpxchg(&bounce.in_use, false, true)) { atomic_or is enough... >> atomic_cmpxchg is here to take the ownership of bounce iff it is not in use, >> so >> I think it is neces

Re: [Qemu-devel] [PATCH v4 14/17] ahci: Migrate IDEStatus

2015-03-13 Thread Amit Shah
On (Fri) 13 Mar 2015 [09:21:19], Kevin Wolf wrote: > Am 13.03.2015 um 07:01 hat Amit Shah geschrieben: > > On (Mon) 23 Feb 2015 [11:18:03], John Snow wrote: > > > Amazingly, we weren't doing this before. > > > > > > Make sure we migrate the IDEState structure that belongs to > > > the AHCIDevice.I

Re: [Qemu-devel] [RFC PATCH 01/14] docs: block replication's description

2015-03-13 Thread Wen Congyang
On 03/11/2015 02:49 PM, Fam Zheng wrote: > On Wed, 03/11 14:44, Wen Congyang wrote: >> On 03/03/2015 03:59 PM, Fam Zheng wrote: >>> On Tue, 03/03 15:53, Wen Congyang wrote: I test qcow2_make_empty()'s performance. The result shows that it may take about 100ms(normal sata disk). It is not

[Qemu-devel] [PATCH v4] hmp: add info iothreads command

2015-03-13 Thread Ting Wang
Make "info iothreads" available on the HMP monitor. The results are as follows: id1: thread_id=thread_id1 id2: thread_id=thread_id2 Signed-off-by: Ting Wang --- v4: use the PRId64 format specifier macro for the int64_t thread_id v3: fix comment and the trailing whitespace v2: add braces for if -

Re: [Qemu-devel] [PATCH v2 4/4] dma-helpers: Move reschedule_dma BH to blk's AioContext

2015-03-13 Thread Fam Zheng
On Fri, 03/13 09:13, Paolo Bonzini wrote: > > > On 13/03/2015 02:38, Fam Zheng wrote: > > That if the dbs' owner is an iothread, dma should be resumed on the right > > thread. In this case it is the AioContext of the block device. > > > > Signed-off-by: Fam Zheng > > --- > > dma-helpers.c | 4

Re: [Qemu-devel] [RFC PATCH 01/14] docs: block replication's description

2015-03-13 Thread Fam Zheng
On Fri, 03/13 17:01, Wen Congyang wrote: > On 03/11/2015 02:49 PM, Fam Zheng wrote: > > On Wed, 03/11 14:44, Wen Congyang wrote: > >> On 03/03/2015 03:59 PM, Fam Zheng wrote: > >>> On Tue, 03/03 15:53, Wen Congyang wrote: > I test qcow2_make_empty()'s performance. The result shows that it may

Re: [Qemu-devel] [PATCH v4] hmp: add info iothreads command

2015-03-13 Thread Fam Zheng
On Fri, 03/13 16:58, Ting Wang wrote: > Make "info iothreads" available on the HMP monitor. > > The results are as follows: > id1: thread_id=thread_id1 > id2: thread_id=thread_id2 > > Signed-off-by: Ting Wang > --- > v4: use the PRId64 format specifier macro for the int64_t thread_id > v3: fix c

Re: [Qemu-devel] [PATCH v4] hmp: add info iothreads command

2015-03-13 Thread Patchew Tool
This series failed Patchew automatic testing. Find the log fragments below (grepped lines around keywords "error" and "warning"), or open the following URL to see the full log: http://qemu.patchew.org/testing/log/<1426237119-110112-1-git-send-email-kathy.wangt...@huawei.com> --8<---

Re: [Qemu-devel] [PATCH v10 2/7] hw/vfio/platform: vfio-platform skeleton

2015-03-13 Thread Eric Auger
Hi Alex, Thank you for your review and the R-b on 5/7 & 7/7. Please apologize for the long delay in response, mostly due to my vacation :-( I took into account all the comments below Best Regards Eric On 02/17/2015 11:56 AM, Alex Bennée wrote: > > Eric Auger writes: > >> Minimal VFIO platfo

Re: [Qemu-devel] [PATCH v4] hmp: add info iothreads command

2015-03-13 Thread Fam Zheng
On Fri, 03/13 02:16, Patchew Tool wrote: > socket_accept failed: Resource temporarily unavailable > ** > ERROR:/var/tmp/patchew-test/git/tests/libqtest.c:192:qtest_init: assertion > failed: (s->fd >= 0 && s->qmp_fd >= 0) > GTester: last random seed: R02Sa6e2a5d48f79c1916f52824e1b74ecc5 > socket_ac

Re: [Qemu-devel] [PATCH v10 6/7] hw/arm/sysbus-fdt: enable vfio-calxeda-xgmac dynamic instantiation

2015-03-13 Thread Eric Auger
Alex, On 02/17/2015 12:36 PM, Alex Bennée wrote: > > Eric Auger writes: > >> vfio-calxeda-xgmac now can be instantiated using the -device option. >> The node creation function generates a very basic dt node composed >> of the compat, reg and interrupts properties >> >> Signed-off-by: Eric Auger

Re: [Qemu-devel] [PATCH v2] s390x/kvm: Guest Migration TOD clock synchronization

2015-03-13 Thread Cornelia Huck
On Mon, 9 Mar 2015 15:56:08 +0100 Jens Freimann wrote: > From: "Jason J. Herne" > > Synchronizes the guest TOD clock across a migration by sending the guest TOD > clock value to the destination system. If the guest TOD clock is not preserved > across a migration then the guest's view of time w

Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-posix-acl: Fix out-of-bounds access

2015-03-13 Thread Shannon Zhao
On 2015/3/13 16:31, Aneesh Kumar K.V wrote: > Shannon Zhao writes: > >> It's detected by coverity. Fix out-of-bounds access of the function >> mp_dacl_listxattr. >> >> Signed-off-by: Shannon Zhao >> Signed-off-by: Shannon Zhao >> --- >> hw/9pfs/virtio-9p-posix-acl.c | 2 +- >> 1 file changed,

Re: [Qemu-devel] [PATCH 1/2] virtio-ccw: assure BE accesses

2015-03-13 Thread Cornelia Huck
On Wed, 11 Mar 2015 10:57:50 +0100 Cornelia Huck wrote: > All fields in structures transmitted by ccws are big endian; assure > we handle them as such. > > Reviewed-by: Thomas Huth > Reviewed-by: David Hildenbrand > Signed-off-by: Cornelia Huck > --- > hw/s390x/virtio-ccw.c | 22

[Qemu-devel] [PATCH 0/9] add virtio-gpu with 2d support

2015-03-13 Thread Gerd Hoffmann
Hi, Next round of virtio-gpu patches. Patches 1-8 are meant to be merged, patch 9 is a hack to simplify testing with libvirt and will not be merged. Changes since the RfC submission earlier this month are a bunch of sanity checks being added (mostly pointed out by max) and the virtio-1.0 adapt

[Qemu-devel] [PATCH 5/9] virtio-vga: add '-vga virtio' support

2015-03-13 Thread Gerd Hoffmann
Some convinience fluff: Add support for '-vga virtio', also add virtio-vga to the list of vga cards so '-device virtio-vga' will turn off the default vga. Written by Dave Airlie and Gerd Hoffmann. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- hw/pci/pci.c| 2 ++ inc

[Qemu-devel] [PATCH 6/9] virtio-vga: add vgabios configuration

2015-03-13 Thread Gerd Hoffmann
Add seavgabios configuration for virtio-vga, hook up the new vgabios in the makefiles. Signed-off-by: Gerd Hoffmann --- Makefile | 2 +- roms/Makefile | 2 +- roms/config.vga-virtio | 6 ++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 roms/confi

[Qemu-devel] [PATCH 1/9] virtio-gpu/2d: add hardware spec include file

2015-03-13 Thread Gerd Hoffmann
This patch adds the header file with structs and defines for the virtio based gpu device. Covers 2d operations only. Written by Dave Airlie and Gerd Hoffmann. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtgpu_hw.h | 203 +

[Qemu-devel] [PATCH 8/9] virtio-gpu: add to display-vga test

2015-03-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- tests/Makefile | 3 +++ tests/display-vga-test.c | 18 ++ 2 files changed, 21 insertions(+) diff --git a/tests/Makefile b/tests/Makefile index 588f438..55ad89f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -133,6 +133,9 @@ check-q

[Qemu-devel] [PATCH 9/9] [hack] virtio-gpu: maskerade as -device VGA

2015-03-13 Thread Gerd Hoffmann
Newer libvirt versions start looking up VGA in the QOM tree. So tricking libvirt this way ... ... to test virtio-vga stopped working. Lets rename VGA to stdvga and virtio-vga to VGA to get things going again. A simple ... ... will give you virtio-vga when building qemu with t

[Qemu-devel] [PATCH 7/9] virtio-vga: add vgabios binary

2015-03-13 Thread Gerd Hoffmann
Add prebuilt vgabios-virtio.bin binary. Signed-off-by: Gerd Hoffmann --- pc-bios/vgabios-virtio.bin | Bin 0 -> 37376 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 pc-bios/vgabios-virtio.bin diff --git a/pc-bios/vgabios-virtio.bin b/pc-bios/vgabios-virtio.bin new fil

[Qemu-devel] [PATCH 4/9] virtio-vga: add virtio gpu device with vga compatibility

2015-03-13 Thread Gerd Hoffmann
This patch adds a virtio-vga device. It is simliar to virtio-gpu-pci, but it also adds in vga compatibility, so guests without native virtio-gpu support can drive the device in vga mode. Written by Dave Airlie and Gerd Hoffmann. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- defa

[Qemu-devel] [PATCH 2/9] virtio-gpu/2d: add virtio gpu core code

2015-03-13 Thread Gerd Hoffmann
This patch adds the core code for virtio gpu emulation, covering 2d support. Written by Dave Airlie and Gerd Hoffmann. Signed-off-by: Dave Airlie Signed-off-by: Gerd Hoffmann --- hw/display/Makefile.objs | 2 + hw/display/virtio-gpu.c| 923 ++

[Qemu-devel] [PATCH] opengl: require glx

2015-03-13 Thread Gerd Hoffmann
hw/display/milkymist-tmu2.c uses glx. That will be replaced with egl in the future, with qemu getting more opengl support. But we are not there yet, so put it back into configure to fix build failures on machines without glx (i.e. macos, possibly windows too). Signed-off-by: Gerd Hoffmann ---

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Give laptop users ability to scroll in monitor

2015-03-13 Thread Peter Maydell
On 13 March 2015 at 04:35, Programmingkid wrote: > Laptop users usually have keyboards that are missing the page up and page > down keys. This means they cannot scroll in the monitor. This patch gives > laptop users the ability to scroll in the monitor by having the user push the > Control + Up

[Qemu-devel] [PATCH 3/9] virtio-gpu-pci: add virtio pci support

2015-03-13 Thread Gerd Hoffmann
This patch adds virtio-gpu-pci, which is the pci proxy for the virtio gpu device. With this patch in place virtio-gpu is functional. You need a linux guest with a virtio-gpu driver though, and output will appear pretty late in boot, once the kernel initialized drm and fbcon. Written by Dave Airl

Re: [Qemu-devel] [PATCH 0/6] [PREVIEW] s390x/kvm: fixes and features

2015-03-13 Thread Cornelia Huck
On Thu, 12 Mar 2015 13:53:48 +0100 Jens Freimann wrote: > Conny, Alex, Christian, > > a few more s390 patches: > > Patch 1: encapsulates the HAS_DEVICE check into a generic function > Patch 2: use the function introduced in Patch 1 > Patch 3: introduces two new machine options for indicating th

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-13 Thread Ian Campbell
On Fri, 2015-03-13 at 09:39 +0800, Chen, Tiejun wrote: > > I don't think you can abort here, since a user can set > > b_info->u.hvm.gfx_passthru_kind to default. You would need to return an > > error. > > Then, looks I should do this, > > LOG(ERROR, "No supported IGD to passt

Re: [Qemu-devel] [PATCH] s390x/config: Do not include full pci.mak

2015-03-13 Thread Cornelia Huck
On Thu, 12 Mar 2015 15:19:14 +0100 Thomas Huth wrote: > pci.mak includes a lot of devices - and most of them do not make > sense on s390x, like USB controllers or audio cards. These devices > also show up when running "qemu-system-s390x -device help" and thus > could raise the hope for the users

Re: [Qemu-devel] [PULL v4 00/11] Net patches

2015-03-13 Thread Peter Maydell
On 13 March 2015 at 02:32, Fam Zheng wrote: > On Thu, 03/12 17:50, Stefan Hajnoczi wrote: >> Hi Fam, >> This pull request contains patches that fail mingw compilation and >> glib version requirements. They passed in patchew: >> http://qemu.patchew.org/testing/log/%3c1426170808-6343-1-git-send-ema

Re: [Qemu-devel] [PATCH v5 20/45] Modify savevm handlers for postcopy

2015-03-13 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: > On Wed, Feb 25, 2015 at 04:51:43PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Modify save_live_pending to return separate postcopiable and > > non-postcopiable counts. > > > > Add 'can_postcopy' to a

Re: [Qemu-devel] [PATCH] opengl: require glx

2015-03-13 Thread Gerd Hoffmann
On Fr, 2015-03-13 at 10:47 +0100, Gerd Hoffmann wrote: > hw/display/milkymist-tmu2.c uses glx. That will be replaced with egl in > the future, with qemu getting more opengl support. But we are not there > yet, so put it back into configure to fix build failures on machines > without glx (i.e. mac

Re: [Qemu-devel] [PATCH v2 3/6] hw/char: pl011 don't keep setting the IRQ if nothing changed

2015-03-13 Thread Alex Bennée
Peter Maydell writes: > On 12 March 2015 at 15:51, Peter Maydell wrote: >> On 4 March 2015 at 14:35, Alex Bennée wrote: >>> While observing KVM traces I can see additional IRQ calls on pretty much >>> every MMIO access which is just plain inefficient. Only update the QEMU >>> IRQ level if some

Re: [Qemu-devel] [PATCH v2 1/6] target-arm: kvm: save/restore mp state

2015-03-13 Thread Alex Bennée
Peter Maydell writes: > On 4 March 2015 at 14:35, Alex Bennée wrote: >> This adds the saving and restore of the current Multi-Processing state >> of the machine. While the KVM_GET/SET_MP_STATE API exposes a number of >> potential states for x86 we only use two for ARM. Either the process is >>

Re: [Qemu-devel] [PATCH v5 22/45] postcopy: OS support test

2015-03-13 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: > On Wed, Feb 25, 2015 at 04:51:45PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Provide a check to see if the OS we're running on has all the bits > > needed for postcopy. > > > > Creates postcopy-ram.

Re: [Qemu-devel] [PATCH v2 4/4] dma-helpers: Move reschedule_dma BH to blk's AioContext

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 09:58, Fam Zheng wrote: >> > >> > This looks good. However, I wonder if dma_aio_cancel should also call >> > cpu_unregister_map_client. In this case, it's much better to just use a >> > lock for the list (though you can still use atomics for the in-use flag). > The other possibil

Re: [Qemu-devel] [PATCH v4 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread Paolo Bonzini
On 09/03/2015 07:45, zhanghailiang wrote: > 'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a > possible start of a new migration process while the previous one still exists. > But we didn't expose this status to user, instead we returned the 'active' > state. > > Here,

Re: [Qemu-devel] [PATCH v4 0/7] QEMU memory hot unplug support

2015-03-13 Thread Igor Mammedov
On Fri, 13 Mar 2015 14:05:08 +0800 Zhu Guihua wrote: > ping... I can't find v4 series in my mailbox nor on list archives, perhaps it got lost somewhere, could you resend rebased version on top of current master, pls? > > On 03/04/2015 02:01 PM, Zhu Guihua wrote: > > Memory hot unplug are both

Re: [Qemu-devel] [PATCH] block/throttle: Use host clock type

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 09:27, Fam Zheng wrote: > On Fri, 03/13 09:08, Paolo Bonzini wrote: >> >> >> On 13/03/2015 07:35, Fam Zheng wrote: >>> Throttle timers won't make any progress when VCPU is not running, which >>> is prone to stall the request queue in cases like utils, qtest, >>> suspending, and live

Re: [Qemu-devel] [PATCH 2/2] memory: fix the eventfd data endianness according to the host

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 09:11, Greg Kurz wrote: > The data argument is a host entity. It is not related to the target > endianness. Let's introduce a HOST_WORDS_BIGENDIAN based helper for > that. > > This patch fixes ioeventfd and vhost for a ppc64le host running a ppc64le > guest (only virtqueue 0 was ha

[Qemu-devel] [PATCH] fsdev/virtfs-proxy-helper: Fix possible overflow

2015-03-13 Thread Shannon Zhao
It's detected by coverity. As max of sockaddr_un.sun_path is sizeof(helper.sun_path), should check the length of source and use strncpy instead of strcpy. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- fsdev/virtfs-proxy-helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

Re: [Qemu-devel] [PULL 0/2] Block patches

2015-03-13 Thread Peter Maydell
On 12 March 2015 at 19:10, Stefan Hajnoczi wrote: > The following changes since commit 2a5b58e2405e9fe42ba356b5a1b78146a4e9a659: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20150312-1' into > staging (2015-03-12 10:35:54 +) > > are available in the git repository at: > >

[Qemu-devel] [PATCH] hw/9pfs/virtio-9p-proxy: Fix possible overflow

2015-03-13 Thread Shannon Zhao
It's detected by coverity. As max of sockaddr_un.sun_path is sizeof(helper.sun_path), should check the length of source and use strncpy instead of strcpy. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/9pfs/virtio-9p-proxy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-

Re: [Qemu-devel] [PATCH] virtio-scsi: Fix assert in virtio_scsi_push_event

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 08:55, Fam Zheng wrote: > Hotplugging a scsi-disk may trigger the assertion in qemu_sgl_concat. > > qemu-system-x86_64: qemu/hw/scsi/virtio-scsi.c:115: qemu_sgl_concat: > Assertion `skip == 0' failed. > > This is introduced by commit 55783a55 (virtio-scsi: work around bug

[Qemu-devel] [PULL] Update OpenBIOS images

2015-03-13 Thread Mark Cave-Ayland
Hi Peter, Here are the binaries for the outstanding OpenBIOS updates for 2.3. Please pull. ATB, Mark. The following changes since commit f9f141b7475acfed1b6a28809687109702295be3: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2015-03-13 09:54:23 +000

Re: [Qemu-devel] [PATCH v5 23/45] migrate_start_postcopy: Command to trigger transition to postcopy

2015-03-13 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: > On Wed, Feb 25, 2015 at 04:51:46PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Once postcopy is enabled (with migrate_set_capability), the migration > > will still start on precopy mode. To cause a tr

Re: [Qemu-devel] [PATCH 2/2] memory: fix the eventfd data endianness according to the host

2015-03-13 Thread Greg Kurz
On Fri, 13 Mar 2015 12:06:06 +0100 Paolo Bonzini wrote: > > > On 13/03/2015 09:11, Greg Kurz wrote: > > The data argument is a host entity. It is not related to the target > > endianness. Let's introduce a HOST_WORDS_BIGENDIAN based helper for > > that. > > > > This patch fixes ioeventfd and vh

Re: [Qemu-devel] [PATCH] block/throttle: Use host clock type

2015-03-13 Thread Fam Zheng
On Fri, 03/13 12:09, Paolo Bonzini wrote: > > > On 13/03/2015 09:27, Fam Zheng wrote: > > On Fri, 03/13 09:08, Paolo Bonzini wrote: > >> > >> > >> On 13/03/2015 07:35, Fam Zheng wrote: > >>> Throttle timers won't make any progress when VCPU is not running, which > >>> is prone to stall the reques

[Qemu-devel] [PATCH qemu] pseries: Update SLOF firmware image to qemu-slof-20150313

2015-03-13 Thread Alexey Kardashevskiy
age currently in qemu is - built from git tag qemu-slof-20141202. + built from git tag qemu-slof-20150313. - sgabios (the Serial Graphics Adapter option ROM) provides a means for legacy x86 software to communicate with an attached serial console as diff --g

Re: [Qemu-devel] [PULL v5 0/2] Net patches

2015-03-13 Thread Peter Maydell
On 12 March 2015 at 20:13, Stefan Hajnoczi wrote: > v5: > * Drop rocker due to w32 warning and glib minimum version issue [Peter] > > v4: > * Drop clang 3.5.0 fixes since they break with older clang and w32 [Peter] > > v3: > * Add clang 3.5.0 warning fixes > * Squash David Ahern's clang struct

Re: [Qemu-devel] [PATCH v5 18/45] MIG_CMD_PACKAGED: Send a packaged chunk of migration stream

2015-03-13 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: > On Wed, Feb 25, 2015 at 04:51:41PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > MIG_CMD_PACKAGED is a migration command that allows a chunk > > of migration stream to be sent in one go, and be received

[Qemu-devel] [RFC v0 PATCH] cpus: Convert cpu_index into a bitmap

2015-03-13 Thread Bharata B Rao
From: Bharata B Rao Currently CPUState.cpu_index is monotonically increasing and a newly created CPU always gets the next higher index. The next available index is calculated by counting the existing number of CPUs. This is fine as long as we only add CPUs, but there are architectures which are s

Re: [Qemu-devel] [PATCH] block/throttle: Use host clock type

2015-03-13 Thread Alberto Garcia
On Fri, Mar 13, 2015 at 02:35:29PM +0800, Fam Zheng wrote: > Throttle timers won't make any progress when VCPU is not running, > which is prone to stall the request queue in cases like utils, > qtest, suspending, and live migration, unless carefully handled. Yes, this can be easily reproduced by

Re: [Qemu-devel] [PATCH v4 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread Eric Blake
On 03/13/2015 04:49 AM, Paolo Bonzini wrote: > > > On 09/03/2015 07:45, zhanghailiang wrote: >> 'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a >> possible start of a new migration process while the previous one still >> exists. >> But we didn't expose this status to us

Re: [Qemu-devel] [PATCH v5 25/45] qemu_savevm_state_complete: Postcopy changes

2015-03-13 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: > On Wed, Feb 25, 2015 at 04:51:48PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > When postcopy calls qemu_savevm_state_complete it's not really > > the end of migration, so skip: > > Given that, maybe t

Re: [Qemu-devel] [PATCH] block/throttle: Use host clock type

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 13:23, Alberto Garcia wrote: > On Fri, Mar 13, 2015 at 02:35:29PM +0800, Fam Zheng wrote: > >> Throttle timers won't make any progress when VCPU is not running, >> which is prone to stall the request queue in cases like utils, >> qtest, suspending, and live migration, unless carefu

Re: [Qemu-devel] [PATCH v4 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 03/13/2015 04:49 AM, Paolo Bonzini wrote: > > > > > > On 09/03/2015 07:45, zhanghailiang wrote: > >> 'cancelling' status was introduced by commit 51cf4c1a, mainly to avoid a > >> possible start of a new migration process while the previous one still

Re: [Qemu-devel] [PATCH v2 4/4] dma-helpers: Move reschedule_dma BH to blk's AioContext

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 11:48, Paolo Bonzini wrote: > > The other possibility is grab a reference for the cpu_register_map_client > > call, > > and release it in reschedule_dma. This way the atomics can keep, but we'll > > need > > a "finished" flag in DMAAIOCB to avoid double completion. > Considering t

Re: [Qemu-devel] [PATCH] hw/9pfs/virtio-9p-proxy: Fix possible overflow

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 12:09, Shannon Zhao wrote: > +g_assert(strlen(path) < sizeof(helper.sun_path)); Ok. > sockfd = socket(AF_UNIX, SOCK_STREAM, 0); > if (sockfd < 0) { > fprintf(stderr, "failed to create socket: %s\n", strerror(errno)); > return -1; > } > -str

Re: [Qemu-devel] [PATCH] fsdev/virtfs-proxy-helper: Fix possible overflow

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 12:09, Shannon Zhao wrote: > +g_assert(strlen(path) < sizeof(proxy.sun_path)); > sock = socket(AF_UNIX, SOCK_STREAM, 0); > if (sock < 0) { > do_perror("socket"); > @@ -748,7 +749,7 @@ static int proxy_socket(const char *path, uid_t uid, > gid_t gid) > um

Re: [Qemu-devel] [PATCH] hw/net/e1000: fix integer endianness

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 06:21, Shannon Zhao wrote: > It's detected by coverity.In is_vlan_packet s->mac_reg[VET] is > unsigned int but is dereferenced as a narrower unsigned short. > This may lead to unexpected results depending on machine > endianness. Sounds good. CCing Stefan, net/ maintainer. > Sign

Re: [Qemu-devel] [PATCH] vl: fix resource leak with monitor_fdset_add_fd

2015-03-13 Thread Paolo Bonzini
On 13/03/2015 06:17, Shannon Zhao wrote: >> > -monitor_fdset_add_fd(dupfd, true, fdset_id, fd_opaque ? true : false, >> > - fd_opaque, NULL); >> > +fdinfo = monitor_fdset_add_fd(dupfd, true, fdset_id, fd_opaque ? true >> > : false, >> > +

[Qemu-devel] [PATCH] vl: fix resource leak with monitor_fdset_add_fd

2015-03-13 Thread Paolo Bonzini
monitor_fdset_add_fd returns an AddfdInfo struct (used by the QMP command add_fd). Free it. Signed-off-by: Paolo Bonzini --- v1->v2: line length [Fam], pass &error_abort [Shannon] --- vl.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index eba5d

[Qemu-devel] [PULL v3 1/5] sdl: Refresh debug statements

2015-03-13 Thread Gerd Hoffmann
From: Benjamin Herrenschmidt Put them under a #define similar to the VGA model and make them actually compile. Add a couple too. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Gerd Hoffmann --- ui/sdl.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) dif

[Qemu-devel] [PULL v3 0/5] sdl patch queue.

2015-03-13 Thread Gerd Hoffmann
Hi, Misc stuff in the basket: sdl bugfixes, some preparing patches for the upcoming opengl support in sdl2, x11 build improvement. v2 fixes the clang build failure. v3 (hopefully) fixes the osx build failure too. please pull, Gerd The following changes since commit ee74801035b0b5f1fdfd4e31d

[Qemu-devel] [PULL v3 4/5] Allow the use of X11 from a non standard location.

2015-03-13 Thread Gerd Hoffmann
From: Jeremy White Signed-off-by: Jeremy White [ kraxel: solve opengl patch conflicts ] Signed-off-by: Gerd Hoffmann Reviewed-by: Max Reitz --- configure| 24 +++- hw/display/Makefile.objs | 1 + 2 files changed, 20 insertions(+), 5 deletions(-) diff --

[Qemu-devel] [PULL v3 5/5] pixman: add a bunch of PIXMAN_BE_* defines for 32bpp

2015-03-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Max Reitz --- include/ui/qemu-pixman.h | 16 1 file changed, 16 insertions(+) diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h index 3dee576..5d7a9ac 100644 --- a/include/ui/qemu-pixman.h +++ b/include/ui/qemu-pixman.h @

Re: [Qemu-devel] [PATCH v5 16/45] Add migration-capability boolean for postcopy-ram.

2015-03-13 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: > On Wed, Feb 25, 2015 at 04:51:39PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > This absolutely needs a commit message. I shouldn't have to look at > the code to find out what the presence of this capabili

[Qemu-devel] [PULL v3 2/5] sdl: Fix crash when calling sdl_switch() with NULL surface

2015-03-13 Thread Gerd Hoffmann
From: Benjamin Herrenschmidt This happens for example when doing ctrl-alt-u and segfaults Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Gerd Hoffmann --- ui/sdl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/sdl.c b/ui/sdl.c index b89182a..8bdbf52 100644 ---

[Qemu-devel] [PULL v3 3/5] configure: opengl overhaul

2015-03-13 Thread Gerd Hoffmann
Rename config option from "glx" to "opengl", glx will not be the only option for opengl in near future. Also switch over to pkg-config for opengl support detection. Signed-off-by: Gerd Hoffmann Reviewed-by: Max Reitz --- configure| 39 +--

Re: [Qemu-devel] [PATCH v5 01/45] Start documenting how postcopy works.

2015-03-13 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: > On Thu, Mar 05, 2015 at 09:21:39AM +, Dr. David Alan Gilbert wrote: > > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > > On Wed, Feb 25, 2015 at 04:51:24PM +, Dr. David Alan Gilbert > > (git) wrote: > [snip] > > > > +=== Enablin

[Qemu-devel] several security backports to the qemu-xen stable trees

2015-03-13 Thread Stefano Stabellini
Hi all, I am writing to let you know that have pushed a long series of backports to qemu-xen 4.2, 4.3, 4.4 and 4.5 stable staging trees. See below. All the backports are security fixes of outstanding CVEs affecting QEMU. As QEMU only provides backports to very recent stable releases, I had to com

Re: [Qemu-devel] [PATCH v4 4/4] migration: Expose 'cancelling' status to user

2015-03-13 Thread Eric Blake
On 03/13/2015 06:28 AM, Dr. David Alan Gilbert wrote: >> >> It simplifies qemu's job of reporting migration status information (qemu >> is no longer maintaining one set of states internally and a different >> set of states externally), and I already have the libvirt counterpart >> patch ready to g

Re: [Qemu-devel] [PATCH v5 07/45] Return path: Open a return path on QEMUFile for sockets

2015-03-13 Thread Dr. David Alan Gilbert
* David Gibson (da...@gibson.dropbear.id.au) wrote: > On Wed, Feb 25, 2015 at 04:51:30PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Postcopy needs a method to send messages from the destination back to > > the source, this is the 'return path'. > > > >

Re: [Qemu-devel] [Xen-devel] several security backports to the qemu-xen stable trees

2015-03-13 Thread Jan Beulich
>>> On 13.03.15 at 14:06, wrote: > I am writing to let you know that have pushed a long series of backports > to qemu-xen 4.2, 4.3, 4.4 and 4.5 stable staging trees. See below. And just for clarification - considering how late in the 4.4.2 and 4.3.4 release process it is, none of those fixes will

Re: [Qemu-devel] [Bug 1428657] Re: qemu-system-arm does not ignore the lowest bit of pc when returning from interrrupt

2015-03-13 Thread Anders Esbensen
I've tested the patch against the FreeRTOS example. An the patch seems to make the example run. The FreeRTOS sample now crash for other reasons. But I consider the issue resolved. /Anders On 03/12/2015 02:45 PM, Peter Maydell wrote: > Proposed patch: http://patchwork.ozlabs.org/patch/449400/ wh

[Qemu-devel] UMEQ: an alternative to QEMU user-mode

2015-03-13 Thread Rémi Duraffort
Hello, during the last Linaro Connect in Hong Kong I presented (see [1] and [2]) a project called UMEQ, for User Mode Emulation Quest. The goal of this project is to run AArch64 binaries on a x86_64 host in user mode. Exactly like QEMU user-mode. But, as I presented, QEMU user-mode is often c

  1   2   3   >