[Qemu-devel] I386 Flags after run TB

2015-05-23 Thread Davide Ferraretto
I run qemu in single step mode and user-mode. I want to know where i386 flags are stored after a run of one Translation Block.

Re: [Qemu-devel] What's the difference between "ld/st" and "qemu_ld/st" in TCG IR?

2015-05-23 Thread 浩倫 魏
Dear Richard: Now I get it, thanks for the help! :-) Richard Henderson 於 2015/5/24 (週日) 6:21 AM 寫道﹕ On 05/23/2015 05:26 AM, 浩倫 魏 wrote: > So there are some points that I hope you can help me out: > 1. Is every guest load/store instruction would be translated to qemu_ld/st IR? Yes.

Re: [Qemu-devel] What's the differences betweencld/st and qemu_ld/st in TCG IR?

2015-05-23 Thread 浩倫 魏
Dear Peter: Now I get it, thanks for the help! :-) Peter Maydell 於 2015/5/24 (週日) 5:17 AM 寫道﹕ On 23 May 2015 at 13:18, 浩倫 魏 wrote: > Hi, all: > I've been trying to understand the process of binary translation inside TCG. > If I haven't misunderstood, qemu_ld/st are the operations t

Re: [Qemu-devel] What's the difference between "ld/st" and "qemu_ld/st" in TCG IR?

2015-05-23 Thread Richard Henderson
On 05/23/2015 05:26 AM, 浩倫 魏 wrote: So there are some points that I hope you can help me out: 1. Is every guest load/store instruction would be translated to qemu_ld/st IR? Yes. 2. What about another TCG IR "ld/st"? What kind of guest instructions would cause TCG generates that IRs and for wh

[Qemu-devel] [PATCH 0/2] sh4 linux-user cpu and hwcap

2015-05-23 Thread Richard Henderson
As reported by Rich the other day. As I don't have a user-land binary that depends on this, I merely note that it still runs the linux-user-test sh4 binary. And gdb confirms that the LLSC bit does get set. Rich, can you confirm that this is good enough for your musl test? r~ Richard Henders

[Qemu-devel] [PATCH 2/2] linux-user: Add HWCAP for SH4

2015-05-23 Thread Richard Henderson
Only exposing FPU and LLSC as the only features supported by the translator. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 29 + 1 file changed, 29 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 0ba9706..b71e866 100644 ---

[Qemu-devel] [PATCH 1/2] linux-user: Default sh4 to sh7785

2015-05-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 3f32db0..7e0a439 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3929,6 +3929,8 @@ int main(int argc, char **argv, char **envp) # el

Re: [Qemu-devel] What's the differences betweencld/st and qemu_ld/st in TCG IR?

2015-05-23 Thread Peter Maydell
On 23 May 2015 at 13:18, 浩倫 魏 wrote: > Hi, all: > I've been trying to understand the process of binary translation inside TCG. > If I haven't misunderstood, qemu_ld/st are the operations that will call > helper function(ld_mmu) to let softmmu translate the GVA->GPA for the guest > load/store instr

Re: [Qemu-devel] [PATCH v2] linux-user: ioctl() command type is int

2015-05-23 Thread Peter Maydell
On 23 May 2015 at 14:17, Laurent Vivier wrote: > When executing a 64bit target chroot on 64bit host, > the ioctl() command can mismatch. > > It seems the previous commit doesn't solve the problem in > my case: > > 9c6bf9c7 linux-user: Fix ioctl cmd type mismatch on 64-bit targets > > For e

[Qemu-devel] [Bug 1458239] [NEW] Use qed instead of qcow2 for "-snapshot" functionality

2015-05-23 Thread Коренберг Марк
Public bug reported: AFAIK, qed is better in performance than qcow2, so why we still use qcow2 for internal snapshots ? patch is trivial. ** Affects: qemu Importance: Undecided Status: New ** Summary changed: - Used qed instead of qcow2 for "-snapshot" functionality + Use qed ins

Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary

2015-05-23 Thread Richard Henderson
On 05/23/2015 12:59 AM, Aurelien Jarno wrote: On 2015-05-21 14:42, Richard Henderson wrote: Hmm. Seems to be un/under-specified in the PoO. That said, There is a small sentence in the PoO, in chapter "Program Execution", section "Sequence of Storage Reference": It can normally be assumed

Re: [Qemu-devel] [Bug 1458121] Re: USB2 is five times slower than native on qemu-kvm

2015-05-23 Thread Toddandmargo-n
On 05/23/2015 01:08 AM, Michael Tokarev wrote: > That version was a pre-alfa version of kvm support in qemu, is insanely > outdated, is heavily patched by redhat. I don't even think USB2 was > supported by that version. Please try on a current version of qemu and > kernel and reopen if the problem

Re: [Qemu-devel] [PATCH RFC v9 5/7] qemu-iotests: s390x: fix test 049

2015-05-23 Thread Max Reitz
On 22.05.2015 03:26, Bo Tu wrote: when creating an image qemu-img enable us specifying the size of the image using -o size=xx options. But when we specify an invalid size such as a negtive size then different platform gives different result. parse_option_size() function in util/qemu-option.c wil

Re: [Qemu-devel] [PATCH v2 4/5] gtk: add opengl support, using egl

2015-05-23 Thread Max Reitz
On 20.05.2015 17:19, Gerd Hoffmann wrote: This adds opengl rendering support to the gtk ui, using egl. It's off by default for now, use 'qemu -display gtk,gl=on' to play with this. Note that gtk got native opengl support with release 3.16. There most likely will be a separate implementation for

Re: [Qemu-devel] [PATCH v2 3/5] ui: add egl-helpers

2015-05-23 Thread Max Reitz
On 20.05.2015 17:19, Gerd Hoffmann wrote: Add helper functions to initialize OpenGL using egl. Signed-off-by: Gerd Hoffmann --- configure| 2 +- include/ui/egl-helpers.h | 16 + ui/Makefile.objs | 3 + ui/egl-helpers.c | 148

Re: [Qemu-devel] [PATCH v6 13/13] block/mirror: Block "device IO" during mirror exit

2015-05-23 Thread Max Reitz
On 21.05.2015 08:43, Fam Zheng wrote: When mirror should complete, the source and target are in sync. But we call bdrv_swap() only a while later in the main loop bh. If the guest writes something before that, target will not get the new data. Block "device IO" before bdrv_drain and unblock it a

Re: [Qemu-devel] [PATCH v6 12/13] block: Block "device IO" during bdrv_drain and bdrv_drain_all

2015-05-23 Thread Max Reitz
On 21.05.2015 08:43, Fam Zheng wrote: We don't want new requests from guest, so block the operation around the nested poll. It also avoids looping forever when iothread is submitting a lot of requests. Signed-off-by: Fam Zheng --- block/io.c | 22 -- 1 file changed, 20 i

Re: [Qemu-devel] [PATCH v6 11/13] blockdev: Block device IO during blockdev-backup transaction

2015-05-23 Thread Max Reitz
On 21.05.2015 08:43, Fam Zheng wrote: Signed-off-by: Fam Zheng --- blockdev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v6 10/13] blockdev: Block device IO during drive-backup transaction

2015-05-23 Thread Max Reitz
On 21.05.2015 08:43, Fam Zheng wrote: Signed-off-by: Fam Zheng --- blockdev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz (for a richer review-reading experience, see reply to v5)

Re: [Qemu-devel] [PATCH v6 09/13] blockdev: Block device IO during external snapshot transaction

2015-05-23 Thread Max Reitz
On 21.05.2015 08:42, Fam Zheng wrote: Signed-off-by: Fam Zheng --- blockdev.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) Unchanged from v5, so the same question: Would it suffice to block I/O only inside external_snapshot_commit()? diff --git a/blockdev.c

Re: [Qemu-devel] [PATCH v6 08/13] blockdev: Block device IO during internal snapshot transaction

2015-05-23 Thread Max Reitz
On 21.05.2015 08:42, Fam Zheng wrote: Signed-off-by: Fam Zheng --- blockdev.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 5eaf77e..7f763d9 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1262,6 +1262,7 @@ typedef struct InternalS

Re: [Qemu-devel] [PATCH v6 07/13] nbd-server: Clear "can_read" when "device io" blocker is set

2015-05-23 Thread Max Reitz
On 21.05.2015 08:42, Fam Zheng wrote: So that NBD export cannot submit IO during bdrv_drain_all(). Signed-off-by: Fam Zheng --- nbd.c | 24 1 file changed, 24 insertions(+) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v6 06/13] virtio-scsi-dataplane: Add "device IO" op blocker listener

2015-05-23 Thread Max Reitz
On 21.05.2015 08:42, Fam Zheng wrote: When a disk is attached to scsi-bus, virtio_scsi_hotplug will take care of protecting the block device with op blockers. Currently we haven't enabled block jobs (like what's done in virtio_blk_data_plane_create), but it is necessary to honor "device IO" op bl

Re: [Qemu-devel] [PATCH v6 05/13] virtio-blk: Don't handle output when there is "device IO" op blocker

2015-05-23 Thread Max Reitz
On 21.05.2015 08:42, Fam Zheng wrote: virtio-blk now listens to op blocker change of the associated block backend. Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO: non-dataplane: 1) Set VirtIOBlock.paused 2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused datapl

Re: [Qemu-devel] [PATCH v6 01/13] block: Add op blocker type "device IO"

2015-05-23 Thread Max Reitz
On 22.05.2015 06:54, Fam Zheng wrote: On Thu, 05/21 15:32, Fam Zheng wrote: On Thu, 05/21 15:06, Wen Congyang wrote: On 05/21/2015 02:42 PM, Fam Zheng wrote: It blocks device IO. All bdrv_op_block_all/blk_op_block_all callers are taken care of: - virtio_blk_data_plane_create - virtio_scsi_ho

Re: [Qemu-devel] [PATCH v5 10/13] blockdev: Block device IO during drive-backup transaction

2015-05-23 Thread Max Reitz
On 20.05.2015 08:16, Fam Zheng wrote: Signed-off-by: Fam Zheng --- blockdev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 923fc90..ae52d27 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1575,6 +1575,7 @@ typedef struct DriveBackupSta

Re: [Qemu-devel] [PATCH v5 09/13] blockdev: Block device IO during external snapshot transaction

2015-05-23 Thread Max Reitz
On 20.05.2015 08:16, Fam Zheng wrote: Signed-off-by: Fam Zheng --- blockdev.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) Can this be pulled into external_snapshot_commit()? Or might that pose problems with other operations in the same transaction? diff --g

Re: [Qemu-devel] [PATCH v5 08/13] blockdev: Block device IO during internal snapshot transaction

2015-05-23 Thread Max Reitz
On 20.05.2015 08:16, Fam Zheng wrote: Signed-off-by: Fam Zheng --- blockdev.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 5eaf77e..7f763d9 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1262,6 +1262,7 @@ typedef struct InternalS

Re: [Qemu-devel] [PATCH v5 07/13] nbd-server: Clear "can_read" when "device io" blocker is set

2015-05-23 Thread Max Reitz
On 20.05.2015 08:16, Fam Zheng wrote: So that NBD export cannot submit IO during bdrv_drain_all(). Signed-off-by: Fam Zheng --- nbd.c | 24 1 file changed, 24 insertions(+) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v5 06/13] virtio-scsi-dataplane: Add "device IO" op blocker listener

2015-05-23 Thread Max Reitz
On 20.05.2015 08:16, Fam Zheng wrote: When a disk is attached to scsi-bus, virtio_scsi_hotplug will take care of protecting the block device with op blockers. Currently we haven't enabled block jobs (like what's done in virtio_blk_data_plane_create), but it is necessary to honor "device IO" op bl

Re: [Qemu-devel] [PATCH v5 05/13] virtio-blk: Don't handle output when there is "device IO" op blocker

2015-05-23 Thread Max Reitz
On 20.05.2015 08:16, Fam Zheng wrote: virtio-blk now listens to op blocker change of the associated block backend. Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO: non-dataplane: 1) Set VirtIOBlock.paused 2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused datapl

Re: [Qemu-devel] [PATCH v5 01/13] block: Add op blocker type "device IO"

2015-05-23 Thread Max Reitz
On 20.05.2015 08:16, Fam Zheng wrote: It blocks device IO. All bdrv_op_block_all/blk_op_block_all callers are taken care of: - virtio_blk_data_plane_create - virtio_scsi_hotplug Device creation, unblock it. - bdrv_set_backing_hd Backing hd is not used by device, so blocking is OK. - b

Re: [Qemu-devel] [PATCH v5 01/13] block: Add op blocker type "device IO"

2015-05-23 Thread Max Reitz
On 20.05.2015 08:16, Fam Zheng wrote: It blocks device IO. All bdrv_op_block_all/blk_op_block_all callers are taken care of: - virtio_blk_data_plane_create - virtio_scsi_hotplug Device creation, unblock it. - bdrv_set_backing_hd Backing hd is not used by device, so blocking is OK. - b

[Qemu-devel] What's the differences betweencld/st and qemu_ld/st in TCG IR?

2015-05-23 Thread 浩倫 魏
Hi, all: I've been trying to understand the process of binary translation inside TCG.If I haven't misunderstood, qemu_ld/st are the operations that will call helper function(ld_mmu) to let softmmu translate the GVA->GPA for the guest load/store instructions. So there are some points that I hope

[Qemu-devel] What's the difference between "ld/st" and "qemu_ld/st" in TCG IR?

2015-05-23 Thread 浩倫 魏
Hi, all: I've been trying to understand the process of binary translation inside TCG.If I haven't misunderstood, qemu_ld/st are the operations that will call helper function(ld_mmu) to let softmmu translate the GVA->GPA for the guest load/store instructions. So there are some points that I hope

[Qemu-devel] [PATCH v2] linux-user: ioctl() command type is int

2015-05-23 Thread Laurent Vivier
When executing a 64bit target chroot on 64bit host, the ioctl() command can mismatch. It seems the previous commit doesn't solve the problem in my case: 9c6bf9c7 linux-user: Fix ioctl cmd type mismatch on 64-bit targets For example, a ppc64 chroot on an x86_64 host: bash-4.3# ls Unsuppo

Re: [Qemu-devel] [PATCH RFC V2 2/4] Implment GIC-500

2015-05-23 Thread Shlomo Pongratz
Hi Pavel, No problem. Best regards, S.P. On Friday, May 22, 2015, Pavel Fedin wrote: > Hello! > > > Please find some more comments inline. > > Since there are notes about code style, i would add one more thing. > structures of v3 > implementation keep old names (like GICState), and i would

Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary

2015-05-23 Thread Peter Maydell
On 23 May 2015 at 09:22, Aurelien Jarno wrote: > On 2015-05-22 00:00, Alexander Graf wrote: >> Looks like you're finding lots of fun corner case bugs in the >> emulation. Have you or Richard considered to implement s390x >> support in Risu yet? Aarch64 emulation accuracy is remarkable >> since its

Re: [Qemu-devel] [PATCH RFC V2 1/4] Use Aff1 with mpidr

2015-05-23 Thread Shlomo Pongratz
On Friday, May 22, 2015, Pavel Fedin wrote: > Hello! > > > The GIC-500 provides registers for managing interrupt sources, interrupt > behavior, and interrupt > > routing to one or more cores. It supports: > > • Multiprocessor environments with up to 128 cores. > > • Up to 32 affinity-level 1 clu

Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary

2015-05-23 Thread Aurelien Jarno
On 2015-05-22 00:00, Alexander Graf wrote: > Looks like you're finding lots of fun corner case bugs in the emulation. Have > you or Richard considered to implement s390x support in Risu yet? Aarch64 > emulation accuracy is remarkable since its introduction. I have just learned about Risu, so no

[Qemu-devel] [Bug 1458121] Re: USB2 is five times slower than native on qemu-kvm

2015-05-23 Thread Michael Tokarev
That version was a pre-alfa version of kvm support in qemu, is insanely outdated, is heavily patched by redhat. I don't even think USB2 was supported by that version. Please try on a current version of qemu and kernel and reopen if the problem persist there. ** Changed in: qemu Status: New

Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary

2015-05-23 Thread Aurelien Jarno
On 2015-05-21 14:42, Richard Henderson wrote: > On 05/21/2015 02:32 PM, Aurelien Jarno wrote: > > When consecutive memory locations are on page boundary a page fault > > might occur when using the LOAD MULTIPLE instruction. In that case real > > hardware doesn't load any register. > > > > This is