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

2012-06-22 Thread Peter A. G. Crosthwaite
The block layer assumes that it is the only user of coroutines - The qemu_in_coroutine() is used to determine if a function is in one of the block layers coroutines, which is flawed. I.E. If a client (e.g. a device or a machine model) of the block layer uses couroutine itself, the block layer will

[Qemu-devel] [PATCH] ARM: hw/exynos4210_mct.c: Fix a bug which hangs Linux kernel.

2012-06-22 Thread Evgeny Voevodin
From: Stanislav Vorobiov s.vorob...@samsung.com After some long period of time Linux kernel hanged due to ptimer_get_count may return 0 before timer interrupt occurs, thus, causing FRC to jump back in time Signed-off-by: Evgeny Voevodin e.voevo...@samsung.com --- hw/exynos4210_mct.c |4

Re: [Qemu-devel] nested page table translation for non-x86 operating system

2012-06-22 Thread Wei-Ren Chen
Hi Xin Tong, O.K., after studying KVM a little bit, I just give you my 2 cents. :) On Fri, Jan 20, 2012 at 12:12:00AM -0500, Xin Tong wrote: I am wondering the possibilities of using the nested page table mechanism available on the x86 processors to do page translation for non-x86 operating

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

2012-06-22 Thread Kevin Wolf
Am 22.06.2012 08:44, schrieb Peter A. G. Crosthwaite: The block layer assumes that it is the only user of coroutines - The qemu_in_coroutine() is used to determine if a function is in one of the block layers coroutines, which is flawed. I.E. If a client (e.g. a device or a machine model) of

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

2012-06-22 Thread Jan Kiszka
On 2012-06-22 08:44, Peter A. G. Crosthwaite wrote: The block layer assumes that it is the only user of coroutines - The qemu_in_coroutine() is used to determine if a function is in one of the block layers coroutines, which is flawed. I.E. If a client (e.g. a device or a machine model) of the

Re: [Qemu-devel] [PATCH] ARM: hw/exynos4210_mct.c: Fix a bug which hangs Linux kernel.

2012-06-22 Thread Peter Crosthwaite
Hi Evgeny, Im just speculating here, but I recently ran into Linux hangs on Microblaze due to ptimer issues and I think you may be suffering the same base issue. The Microblaze timer (hw/xilinx_timer.c) has a similar implementation to the exynos (chained one-shot ptimer). Recently Peter Chubb

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

2012-06-22 Thread Peter Crosthwaite
On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-06-22 08:44, Peter A. G. Crosthwaite wrote: The block layer assumes that it is the only user of coroutines - The qemu_in_coroutine() is used to determine if a function is in one of the block layers coroutines,

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

2012-06-22 Thread Kevin Wolf
Am 22.06.2012 10:00, schrieb Peter Crosthwaite: On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-06-22 08:44, Peter A. G. Crosthwaite wrote: The block layer assumes that it is the only user of coroutines - The qemu_in_coroutine() is used to determine if a

Re: [Qemu-devel] [RFC PATCH] vfio: add fixup for broken PCI devices

2012-06-22 Thread Alexey Kardashevskiy
On 07/06/12 09:17, Alex Williamson wrote: On Fri, 2012-05-25 at 17:35 +1000, Alexey Kardashevskiy wrote: Some adapters (like NEC PCI USB controller) do not flush their config on a sioftware reset and remember DMA config, etc. If we use such an adapter with QEMU, then crash QEMU (stop it with

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

2012-06-22 Thread Peter Maydell
On 22 June 2012 09:00, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka jan.kis...@siemens.com wrote: Not sure if I understood the intention yet: Is this supposed to fix an issue with the current usage of coroutines or to extend their usage

Re: [Qemu-devel] [PATCH] ARM: hw/exynos4210_mct.c: Fix a bug which hangs Linux kernel.

2012-06-22 Thread Evgeny Voevodin
On 22.06.2012 11:56, Peter Crosthwaite wrote: Hi Evgeny, Im just speculating here, but I recently ran into Linux hangs on Microblaze due to ptimer issues and I think you may be suffering the same base issue. The Microblaze timer (hw/xilinx_timer.c) has a similar implementation to the exynos

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

2012-06-22 Thread Peter Crosthwaite
On Fri, Jun 22, 2012 at 5:49 PM, Kevin Wolf kw...@redhat.com wrote: Am 22.06.2012 08:44, schrieb Peter A. G. Crosthwaite: The block layer assumes that it is the only user of coroutines - The qemu_in_coroutine() is used to determine if a function is in one of the block layers coroutines, which

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

2012-06-22 Thread Peter Crosthwaite
On Fri, Jun 22, 2012 at 6:16 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 22 June 2012 09:00, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka jan.kis...@siemens.com wrote: Not sure if I understood the intention yet: Is this supposed

Re: [Qemu-devel] [PATCH 2/2] Creating qemu-seccomp.[ch] and adding call to vl.c

2012-06-22 Thread Stefan Hajnoczi
On Thu, Jun 21, 2012 at 11:10 PM, Eduardo Otubo ot...@linux.vnet.ibm.com wrote: I added a syscall struct using priority levels as described in the libseccomp man page. The priority numbers are based to the frequency they appear in a sample strace from a regular qemu guest run under libvirt.

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

2012-06-22 Thread Peter Maydell
On 22 June 2012 09:20, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: Its a machine model that instantiated some block devices concurrently. Theres some chicken-and-egg issues with the instantiation such that they have the happen concurrently. One device instantiates a block device

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

2012-06-22 Thread Stefan Hajnoczi
On Fri, Jun 22, 2012 at 9:16 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 22 June 2012 09:00, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka jan.kis...@siemens.com wrote: Not sure if I understood the intention yet: Is this supposed

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

2012-06-22 Thread Stefan Hajnoczi
On Fri, Jun 22, 2012 at 9:31 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 22 June 2012 09:20, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: Its a machine model that instantiated some block devices concurrently. Theres some chicken-and-egg issues with the instantiation such

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

2012-06-22 Thread Kevin Wolf
Am 22.06.2012 10:16, schrieb Peter Maydell: On 22 June 2012 09:00, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka jan.kis...@siemens.com wrote: Not sure if I understood the intention yet: Is this supposed to fix an issue with the current

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Fix typo

2012-06-22 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 10:11:06PM +0200, Stefan Weil wrote: The typo did not cause an error because open_by_handle_at was only compared to yes. Signed-off-by: Stefan Weil s...@weilnetz.de --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to the

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

2012-06-22 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes: On 22 June 2012 09:00, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka jan.kis...@siemens.com wrote: Not sure if I understood the intention yet: Is this supposed to fix an issue with the

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

2012-06-22 Thread Kevin Wolf
Am 22.06.2012 10:20, schrieb Peter Crosthwaite: On Fri, Jun 22, 2012 at 5:49 PM, Kevin Wolf kw...@redhat.com wrote: Am 22.06.2012 08:44, schrieb Peter A. G. Crosthwaite: The block layer assumes that it is the only user of coroutines - The qemu_in_coroutine() is used to determine if a function

Re: [Qemu-devel] [Qemu-trivial] [PATCH] cadence_gem: Avoid stack-writing buffer-overrun

2012-06-22 Thread Stefan Hajnoczi
On Tue, Jun 19, 2012 at 04:44:38PM +1000, Peter A. G. Crosthwaite wrote: From: Jim Meyering meyer...@redhat.com Use sizeof(rxbuf)-size (not sizeof(rxbuf-size)) as the number of bytes to clear. The latter would always clear 4 or 8 bytes, possibly writing beyond the end of that stack buffer.

Re: [Qemu-devel] [PATCH] Makefile.hw: avoid overly large 'make clean' rm command

2012-06-22 Thread Stefan Hajnoczi
On Tue, Jun 19, 2012 at 03:55:38PM +0100, Peter Maydell wrote: Avoid 'make clean' producing an 'rm' command which has a lot of duplicate 'hw//*.o' arguments, by using $(sort $(dir ..)) rather than $(dir $(sort ..)) so Make's sort function will remove the duplicates for us. We can also remove

Re: [Qemu-devel] [Qemu-trivial] [PATCH] target-i386: Use QEMU instead of Qemu

2012-06-22 Thread Stefan Hajnoczi
On Wed, Jun 20, 2012 at 06:05:51AM +0200, Stefan Weil wrote: This new 'QEmu' was recently added. Replace it by the official all upper case 'QEMU'. Signed-off-by: Stefan Weil s...@weilnetz.de --- Hopefully those 'Qemu' and 'QEmu' variants will stop as soon as my patch for checkpatch.pl

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

2012-06-22 Thread Peter Maydell
On 22 June 2012 09:48, Markus Armbruster arm...@redhat.com wrote: In my opinion, coroutines have been useful for us so far.  Whether they remain useful, or serve us just as a stepping stone towards general threads remains to be seen. From my point of view I've seen a whole pile of problems and

Re: [Qemu-devel] [Qemu-trivial] [PATCH] cadence_gem: Avoid stack-writing buffer-overrun

2012-06-22 Thread Peter Maydell
On 22 June 2012 10:03, Stefan Hajnoczi stefa...@gmail.com wrote: On Tue, Jun 19, 2012 at 04:44:38PM +1000, Peter A. G. Crosthwaite wrote: From: Jim Meyering meyer...@redhat.com Use sizeof(rxbuf)-size (not sizeof(rxbuf-size)) as the number of bytes to clear. Thanks, applied to the trivial

Re: [Qemu-devel] [PATCH] tci: Support INDEX_op_bswap64_i64

2012-06-22 Thread Stefan Hajnoczi
On Wed, Jun 20, 2012 at 06:07:24PM +0200, Stefan Weil wrote: Running the Windows 7 (64 bit) boot process needs INDEX_op_bswap64_i64. It was already implemented, but untested. Remove the TODO() statement. Signed-off-by: Stefan Weil s...@weilnetz.de --- tci.c |1 - 1 file changed, 1

Re: [Qemu-devel] [Qemu-trivial] [PATCH v1] device_tree: load_device_tree(): Allow NULL sizep

2012-06-22 Thread Stefan Hajnoczi
On Thu, Jun 21, 2012 at 02:51:24PM +1000, Peter A. G. Crosthwaite wrote: The sizep arg is populated with the size of the loaded device tree. Since this is one of those informational please populate type arguments it should be optional. Guarded writes to *sizep against NULL accordingly.

[Qemu-devel] [PATCH 09/10] add pc-1.2

2012-06-22 Thread Gerd Hoffmann
--- hw/pc_piix.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index eae258c..2ed9f1a 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -349,8 +349,8 @@ static void pc_xen_hvm_init(ram_addr_t ram_size, } #endif -static

[Qemu-devel] [PATCH 04/10] hw/qxl: ignore guest from guestbug until reset

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy al...@redhat.com soft_reset is called from any of: * QXL_IO_RESET * vga io * pci reset handler Signed-off-by: Alon Levy al...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/qxl.c | 13 - hw/qxl.h |3 +++ 2 files changed, 15 insertions(+), 1

[Qemu-devel] [PATCH 01/10] ui/spice-display.c: add missing initialization for valgrind

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy al...@redhat.com We can't initialize QXLDevSurfaceCreate field by field because it has a pa hole, and so 4 bytes remain uninitialized when building on x86-64, so just memset. Signed-off-by: Alon Levy al...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com ---

[Qemu-devel] [PULL 00/10] spice patch queue: qxl vga bits

2012-06-22 Thread Gerd Hoffmann
Hi, The spice patch queue carries a few vga bits this time, specifically it makes the vga ram size configurable. There are also a few qxl bugfixes and cleanups. please pull, Gerd Alon Levy (6): ui/spice-display.c: add missing initialization for valgrind hw/qxl:

[Qemu-devel] [PATCH 02/10] hw/qxl: s/qxl_guest_bug/qxl_set_guest_bug/

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy al...@redhat.com Signed-off-by: Alon Levy al...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/qxl.c | 49 +++-- hw/qxl.h |3 ++- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/hw/qxl.c

Re: [Qemu-devel] [Qemu-trivial] [PATCH] cadence_gem: Avoid stack-writing buffer-overrun

2012-06-22 Thread Stefan Hajnoczi
On Fri, Jun 22, 2012 at 10:09 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 22 June 2012 10:03, Stefan Hajnoczi stefa...@gmail.com wrote: On Tue, Jun 19, 2012 at 04:44:38PM +1000, Peter A. G. Crosthwaite wrote: From: Jim Meyering meyer...@redhat.com Use sizeof(rxbuf)-size (not

Re: [Qemu-devel] [PATCH] linux-user: ARM: Ignore immediate value for svc in thumb mode

2012-06-22 Thread Peter Maydell
On 29 May 2012 16:30, Alexander Graf ag...@suse.de wrote: When running in thumb mode, Linux doesn't evaluate the immediate value of the svc instruction, but instead just always assumes the syscall number to be in r7. This fixes executing go_bootstrap while building go for me. Signed-off-by:

[Qemu-devel] [PATCH 09/12] configure: Fix typo

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de The typo did not cause an error because open_by_handle_at was only compared to yes. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Qemu-devel] [PATCH 05/12] libqtest: Fix socket_accept() to pass address_len

2012-06-22 Thread Stefan Hajnoczi
From: Andreas Färber andreas.faer...@web.de accept() expects address_len to point to the length of the sockaddr on input. Initialize it accordingly. Resolves an assertion due to EFAULT on illumos. Signed-off-by: Andreas Färber andreas.faer...@web.de Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 05/10] qxl: reset current_async on qxl_soft_reset

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy al...@redhat.com Signed-off-by: Alon Levy al...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/qxl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index b5e53ce..4be9462 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@

Re: [Qemu-devel] nested page table translation for non-x86 operating system

2012-06-22 Thread Xin Tong
On Fri, Jun 22, 2012 at 3:28 AM, 陳韋任 (Wei-Ren Chen) che...@iis.sinica.edu.tw wrote: Hi Xin Tong, O.K., after studying KVM a little bit, I just give you my 2 cents. :) On Fri, Jan 20, 2012 at 12:12:00AM -0500, Xin Tong wrote: I am wondering the possibilities of using the nested page table

[Qemu-devel] [PULL 00/12] Trivial patches for June 9 to 22 2012

2012-06-22 Thread Stefan Hajnoczi
The following changes since commit 47ecbdf07ed2c37bdfd2d77137d01bb319ce13da: libcacard: build fixes (2012-06-21 20:04:24 +) are available in the git repository at: git://github.com/stefanha/qemu.git trivial-patches for you to fetch changes up to

[Qemu-devel] [PATCH 12/12] tci: Support INDEX_op_bswap64_i64

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de Running the Windows 7 (64 bit) boot process needs INDEX_op_bswap64_i64. It was already implemented, but untested. Remove the TODO() statement. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- tci.c |

Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?

2012-06-22 Thread Xin Tong
It is a pity that QEMU does not outline the TLB lookup code. I do not know how much impact the inlined TLB code has due to icache misses... Another benefit one gets from outlined TLB code is that it is much easier to gather the amount of time spent in the TLB. one can just profile QEMU and count

Re: [Qemu-devel] qemu -numa option and non-contiguous CPU ranges

2012-06-22 Thread Daniel P. Berrange
On Thu, Jun 21, 2012 at 11:39:46PM +0200, Andre Przywara wrote: On 06/21/2012 07:51 PM, Eduardo Habkost wrote: Hi, I just noticed libvirt tries to use the -numa option in a way that qemu never understood: if a node is configured to have a non-contiguous set of CPUs, it tries to generate a

[Qemu-devel] [PATCH 02/12] Makefile: Remove BUILD_DIR from qapi-dir

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de qapi-dir does not need an absolute path. All other build directories are relative. When BUILD_DIR is removed, the build output looks better (no long lines with absolute paths when everything else uses short lines): GEN qapi-generated/qga-qapi-types.c CC

[Qemu-devel] [PATCH 10/12] Makefile.hw: avoid overly large 'make clean' rm command

2012-06-22 Thread Stefan Hajnoczi
From: Peter Maydell peter.mayd...@linaro.org Avoid 'make clean' producing an 'rm' command which has a lot of duplicate 'hw//*.o' arguments, by using $(sort $(dir ..)) rather than $(dir $(sort ..)) so Make's sort function will remove the duplicates for us. We can also remove the double '//' safely

[Qemu-devel] [PATCH 08/12] arm_gic: Send dbg msgs to stderr not stdout

2012-06-22 Thread Stefan Hajnoczi
From: Peter A. G. Crosthwaite peter.crosthwa...@petalogix.com Signed-off-by: Peter A. G. Crosthwaite peter.crosthwa...@petalogix.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- hw/arm_gic.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm_gic.c

[Qemu-devel] [PATCH 01/12] Install 'bepo' keymap already included in Qemu source

2012-06-22 Thread Stefan Hajnoczi
From: Frédéric Boiteux fboit...@free.fr The 'bepo' layout (a french dvorak-like keyboard layout) was added about one year ago, (see commit 2a3c633c1eb8692716220195b6d3fe78b7e411d0), but I missed to declare to install it. Signed-off-by: Frédéric Boiteux fboit...@free.fr Signed-off-by: Stefan

[Qemu-devel] [PATCH 04/12] Makefile.user: Define CONFIG_USER_ONLY for libuser/

2012-06-22 Thread Stefan Hajnoczi
From: Andreas Färber afaer...@suse.de In *-*-user/ build dirs CONFIG_USER_ONLY is defined via config-target.h. In libuser/ it is not defined. Add it via QEMU_CFLAGS. Signed-off-by: Andreas Färber afaer...@suse.de Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 07/12] checkpatch: Add QEMU specific rule

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de The new rule detects two wrong variants of QEMU. It was tested with commit b5a8fe5e. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- scripts/checkpatch.pl |5 + 1 file changed, 5 insertions(+)

Re: [Qemu-devel] [Qemu-trivial] [PATCH v1] device_tree: load_device_tree(): Allow NULL sizep

2012-06-22 Thread Peter Crosthwaite
On Fri, Jun 22, 2012 at 7:15 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Thu, Jun 21, 2012 at 02:51:24PM +1000, Peter A. G. Crosthwaite wrote: The sizep arg is populated with the size of the loaded device tree. Since this is one of those informational please populate type arguments it

Re: [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread

2012-06-22 Thread liu ping fan
On Thu, Jun 21, 2012 at 11:23 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-06-21 16:49, Liu Ping Fan wrote: Nowadays, we use qemu_mutex_lock_iothread()/qemu_mutex_unlock_iothread() to protect the race to access the emulated dev launched by vcpu threads iothread. But this lock is

Re: [Qemu-devel] [PATCH 2/2] kvm: use per-cpu lock to free vcpu thread out of the big lock

2012-06-22 Thread liu ping fan
On Fri, Jun 22, 2012 at 10:29 AM, 陳韋任 (Wei-Ren Chen) che...@iis.sinica.edu.tw wrote: Hi Liu, On Thu, Jun 21, 2012 at 11:06:58PM +0800, Liu Ping Fan wrote: In order to break the big lock, using per-cpu_lock in kvm_cpu_exec() to protect the race from other cpu's access to env-apic_state

[Qemu-devel] [PATCH v6 3/6] fdc: rewrite seek and DSKCHG bit handling

2012-06-22 Thread Pavel Hrdina
This bit is cleared on every successful seek to a different track (cylinder). The seek is also called on revalidate or on read/write/format commands which also clear the DSKCHG bit. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- hw/fdc.c | 79

[Qemu-devel] [PATCH v6 1/6] fdc: fix implied seek while there is no media in drive

2012-06-22 Thread Pavel Hrdina
The Windows uses 'READ' command at the start of an instalation without checking the 'dir' register. We have to abort the transfer with an abnormal termination if there is no media in the drive. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- hw/fdc.c |4 1 files changed, 4

[Qemu-devel] [PATCH v6 0/6] fdc: fix/rewrite seek, media_changed and interrupt handling

2012-06-22 Thread Pavel Hrdina
The fd_seek will return 'track is invalid' if there is no media in drive. Implied seek should have the same behavior as normal seek. We will use the fd_seek function instead of a direct modification of head, track and sector values. The result value is used only while read/write commands were

[Qemu-devel] [PATCH v6 2/6] fdc-test: introduced qtest read_without_media

2012-06-22 Thread Pavel Hrdina
If you try to read from a floppy drive without a media, you should get an abnormal termination error. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- tests/fdc-test.c | 66 ++ 1 files changed, 66 insertions(+), 0 deletions(-) diff --git

Re: [Qemu-devel] [RFC] use little granularity lock to substitue qemu_mutex_lock_iothread

2012-06-22 Thread Jan Kiszka
On 2012-06-22 12:24, liu ping fan wrote: On Thu, Jun 21, 2012 at 11:23 PM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-06-21 16:49, Liu Ping Fan wrote: Nowadays, we use qemu_mutex_lock_iothread()/qemu_mutex_unlock_iothread() to protect the race to access the emulated dev launched by vcpu

[Qemu-devel] [PATCH 06/12] qemu-config: Use QEMU instead of Qemu

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de This new 'Qemu' was recently added. Replace it by the official all upper case 'QEMU'. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- qemu-config.h |2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PATCH 03/10] qxl: stop dirty loging when not in vga mode

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy al...@redhat.com Tested with linux guest. Not sure how to check actual performance affect of this. Checked with the previously send traceevent that the kvm ioctl to start/stop dirty logging is being called. (KVM_SET_USER_MEMORY_REGION). Signed-off-by: Alon Levy al...@redhat.com

[Qemu-devel] [PATCH 03/12] Makefile: Remove macro qapi-dir

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de As qapi-dir was now a constant, it can be replaced by its value. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- Makefile | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-)

[Qemu-devel] [PATCH v6 5/6] fdc_test: update media_change test

2012-06-22 Thread Pavel Hrdina
After rewrite DSKCHG bit handling the test has to be updated. Now is needed to seek to different track to clear DSKCHG bit. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- tests/fdc-test.c | 29 + 1 files changed, 21 insertions(+), 8 deletions(-) diff --git

[Qemu-devel] [PATCH 11/12] target-i386: Use QEMU instead of Qemu

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil s...@weilnetz.de This new 'QEmu' was recently added. Replace it by the official all upper case 'QEMU'. Signed-off-by: Stefan Weil s...@weilnetz.de Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- target-i386/cpu.c |2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PATCH 07/10] vga: make vram size configurable

2012-06-22 Thread Gerd Hoffmann
Zap the global VGA_RAM_SIZE #define, make the vga ram size configurable for standard vga and vmware vga. cirrus and qxl are left with a fixed size (and private VGA_RAM_SIZE #define) for now. qxl needs some non-trivial adjustments in the mode list handling deal with a runtime-configurable size,

[Qemu-devel] [PATCH 08/10] qxl: add vgamem_size_mb and vgamem_size

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy al...@redhat.com In preperation for supporting a larger framebuffer for multiple monitors on a single card, add a property to qxl vgamem_size_mb, and corresponding byte sized vgamem_size, and use instead of VGA_RAM_SIZE. [ kraxel: simplify property handling, add sanity checks ] [

[Qemu-devel] [PATCH v6 6/6] fdc_test: introduce test_sense_interrupt

2012-06-22 Thread Pavel Hrdina
Calling sense interrupt status while there is no interrupt should return invalid command (0x80). Read command should always returns in st0 seek_end bit set to 1. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- tests/fdc-test.c | 25 - 1 files changed, 24

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

2012-06-22 Thread Peter Crosthwaite
On Fri, Jun 22, 2012 at 6:53 PM, Kevin Wolf kw...@redhat.com wrote: Am 22.06.2012 10:20, schrieb Peter Crosthwaite: On Fri, Jun 22, 2012 at 5:49 PM, Kevin Wolf kw...@redhat.com wrote: Am 22.06.2012 08:44, schrieb Peter A. G. Crosthwaite: The block layer assumes that it is the only user of

[Qemu-devel] [PATCH 10/10] vga: raise default vgamem size

2012-06-22 Thread Gerd Hoffmann
Old size: 8 MB (traditional upstream qemu value). New size: 16 MB (traditional qemu-kvm value). Also adds compat properties so old machine types keep the old default values. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/pc_piix.c| 24 hw/qxl.c|

[Qemu-devel] [PATCH 06/10] vga: raise xres+yres limits

2012-06-22 Thread Gerd Hoffmann
The vgabios will check whenever any given video mode will fit into the given video memory before adding it to the list of available modes, so there is no need to keep xmax * ymax * 32bpp lower than VGA_RAM_SIZE. Lets raise the limits a bit. Should be good for a few years, display sizes are not

[Qemu-devel] [PATCH v6 4/6] fdc: fix interrupt handling

2012-06-22 Thread Pavel Hrdina
If you call the SENSE INTERRUPT STATUS command while there is no interrupt waiting you get as result unknown command. Fixed status0 register handling for read/write/format commands. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- hw/fdc.c | 34 +- 1 files

Re: [Qemu-devel] [PATCH v3 1/1] virtio-rng: hardware random number generator device

2012-06-22 Thread Amit Shah
On (Wed) 20 Jun 2012 [16:29:22], Anthony Liguori wrote: On 06/20/2012 01:59 AM, Amit Shah wrote: The Linux kernel already has a virtio-rng driver, this is the device implementation. When the guest asks for entropy from the virtio hwrng, it puts a buffer in the vq. We then put entropy into

Re: [Qemu-devel] [PATCH 2/3] qom: reimplement Interfaces

2012-06-22 Thread Peter Crosthwaite
Hi Anthony, With the latest qom-next merge, this fails to rebase with non-trivial conflicts. Do you have a rebased version of this floating around in one of your trees somewhere? We are trying to get our machine models as QOMified as we can, especially the axi-stream stuff. I will also be able to

[Qemu-devel] [PATCH 2/2] cpu-common.h: Remove a pointless ifndef CONFIG_USER_ONLY

2012-06-22 Thread Peter Maydell
Remove an ifndef CONFIG_USER_ONLY guard that was pointless because it is already inside an if !defined(CONFIG_USER_ONLY). Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- cpu-common.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/cpu-common.h b/cpu-common.h

[Qemu-devel] [PATCH 1/2] cpu-common.h: Remove unnecessary guard on including targphys.h

2012-06-22 Thread Peter Maydell
There's no need to make the include of targphys.h conditional on whether TARGET_PHYS_ADDR_BITS is defined, because targphys.h itself checks that and does nothing if it isn't. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- cpu-common.h |2 -- 1 files changed, 0 insertions(+), 2

[Qemu-devel] [PATCH 0/2] cpu-common.h: remove pointless ifdef guards

2012-06-22 Thread Peter Maydell
These patches remove a couple of pointless ifdef guards in cpu-common.h that I happened to notice. Peter Maydell (2): cpu-common.h: Remove unnecessary guard on including targphys.h cpu-common.h: Remove a pointless ifndef CONFIG_USER_ONLY cpu-common.h |4 1 files changed, 0

Re: [Qemu-devel] [PATCH 2/2] cpu-common.h: Remove a pointless ifndef CONFIG_USER_ONLY

2012-06-22 Thread Andreas Färber
Am 22.06.2012 13:30, schrieb Peter Maydell: Remove an ifndef CONFIG_USER_ONLY guard that was pointless because it is already inside an if !defined(CONFIG_USER_ONLY). Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- cpu-common.h |2 -- 1 files changed, 0 insertions(+), 2

Re: [Qemu-devel] [PATCH 1/2] cpu-common.h: Remove unnecessary guard on including targphys.h

2012-06-22 Thread Andreas Färber
Am 22.06.2012 13:30, schrieb Peter Maydell: There's no need to make the include of targphys.h conditional on whether TARGET_PHYS_ADDR_BITS is defined, because targphys.h itself checks that and does nothing if it isn't. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by:

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

2012-06-22 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes: On 22 June 2012 09:48, Markus Armbruster arm...@redhat.com wrote: In my opinion, coroutines have been useful for us so far.  Whether they remain useful, or serve us just as a stepping stone towards general threads remains to be seen. From my

Re: [Qemu-devel] [PATCH v3 1/1] virtio-rng: hardware random number generator device

2012-06-22 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: On 06/20/2012 01:59 AM, Amit Shah wrote: The Linux kernel already has a virtio-rng driver, this is the device implementation. When the guest asks for entropy from the virtio hwrng, it puts a buffer in the vq. We then put entropy into that

Re: [Qemu-devel] [PATCH 0/2] Sandboxing Qemu guests with Libseccomp

2012-06-22 Thread Eduardo Otubo
My apologies, I forgot to add the v3 into the PATCH tag. On Thu, Jun 21, 2012 at 07:10:36PM -0300, Eduardo Otubo wrote: Hello all, This is the third effort to sandbox Qemu guests using Libseccomp[0]. The patches that follows are pretty simple and straightforward. I added the correct

Re: [Qemu-devel] [PATCH v3 1/1] virtio-rng: hardware random number generator device

2012-06-22 Thread Anthony Liguori
On 06/22/2012 07:12 AM, Markus Armbruster wrote: Anthony Liguorianth...@codemonkey.ws writes: Nack. Use a protocol. This is not what QMP events are designed for! No human is going to launch nc to a unix domain socket to launch QEMU. That's a silly use-case to design for. To be honest, I'm

Re: [Qemu-devel] [Qemu-trivial] [PATCH v1] device_tree: load_device_tree(): Allow NULL sizep

2012-06-22 Thread Stefan Hajnoczi
On Fri, Jun 22, 2012 at 11:24 AM, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: On Fri, Jun 22, 2012 at 7:15 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Thu, Jun 21, 2012 at 02:51:24PM +1000, Peter A. G. Crosthwaite wrote: The sizep arg is populated with the size of the loaded

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

2012-06-22 Thread Peter Maydell
On 22 June 2012 13:04, Markus Armbruster arm...@redhat.com wrote: Peter Maydell peter.mayd...@linaro.org writes: On 22 June 2012 09:48, Markus Armbruster arm...@redhat.com wrote: In my opinion, coroutines have been useful for us so far.  Whether they remain useful, or serve us just as a

Re: [Qemu-devel] [PATCH v3 1/1] virtio-rng: hardware random number generator device

2012-06-22 Thread Daniel P. Berrange
On Fri, Jun 22, 2012 at 07:22:51AM -0500, Anthony Liguori wrote: On 06/22/2012 07:12 AM, Markus Armbruster wrote: Anthony Liguorianth...@codemonkey.ws writes: Nack. Use a protocol. This is not what QMP events are designed for! No human is going to launch nc to a unix domain socket to

Re: [Qemu-devel] [PATCH 1/2] CPUArchState: introduce per-cpu lock

2012-06-22 Thread Stefan Hajnoczi
On Thu, Jun 21, 2012 at 4:06 PM, Liu Ping Fan qemul...@gmail.com wrote: diff --git a/cpu-defs.h b/cpu-defs.h index f49e950..7305822 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@ -30,6 +30,7 @@  #include osdep.h  #include qemu-queue.h  #include targphys.h +#include qemu-thread-posix.h This

Re: [Qemu-devel] [PATCH 6/7] Exit loop if we have been there too long

2012-06-22 Thread Juan Quintela
(Wei-Ren Chen) che...@iis.sinica.edu.tw wrote: +if ((i 63) == 0) { +uint64_t t1 = (qemu_get_clock_ns(rt_clock) - bwidth) / 100; +if (t1 50) { /* 50ms, half buffered_file limit */ can't we use a constant ? 50 is a constant already, no? Or what do

Re: [Qemu-devel] [PATCH 1/2] CPUArchState: introduce per-cpu lock

2012-06-22 Thread Andreas Färber
Am 21.06.2012 17:06, schrieb Liu Ping Fan: introduce a lock for per-cpu to protect agaist accesing from other vcpu thread. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- cpu-defs.h |2 ++ cpus.c | 17 + main-loop.h |3 +++ 3 files changed, 22

Re: [Qemu-devel] [PATCH v3 1/1] virtio-rng: hardware random number generator device

2012-06-22 Thread Anthony Liguori
On 06/22/2012 07:31 AM, Daniel P. Berrange wrote: On Fri, Jun 22, 2012 at 07:22:51AM -0500, Anthony Liguori wrote: On 06/22/2012 07:12 AM, Markus Armbruster wrote: Anthony Liguorianth...@codemonkey.ws writes: Nack. Use a protocol. This is not what QMP events are designed for! No human is

Re: [Qemu-devel] [PATCH v1] device_tree: load_device_tree(): Allow NULL sizep

2012-06-22 Thread Peter Crosthwaite
CC device-tree.c original contributors. (Jerome Young and Hollis Blanchard). I cant find a maintainer for device-tree, and Stefan wants a review. This patch seem ok? On Thu, Jun 21, 2012 at 2:51 PM, Peter A. G. Crosthwaite peter.crosthwa...@petalogix.com wrote: The sizep arg is populated with

Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given

2012-06-22 Thread Peter Crosthwaite
Ping! Any thoughts Peter? Regards, Peter On Wed, Jun 20, 2012 at 11:45 AM, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: It matches my flow in the real hardware. Heres the scenario where we need this (FYI applies to both microblaze and arm): User creates a Linux elf that

Re: [Qemu-devel] [PATCH v3 1/1] virtio-rng: hardware random number generator device

2012-06-22 Thread Daniel P. Berrange
On Fri, Jun 22, 2012 at 07:58:53AM -0500, Anthony Liguori wrote: On 06/22/2012 07:31 AM, Daniel P. Berrange wrote: On Fri, Jun 22, 2012 at 07:22:51AM -0500, Anthony Liguori wrote: On 06/22/2012 07:12 AM, Markus Armbruster wrote: Anthony Liguorianth...@codemonkey.ws writes: Nack. Use a

Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given

2012-06-22 Thread Peter Maydell
On 22 June 2012 14:27, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: Ping! Any thoughts Peter? Still sounds too specific to your odd use case and hardware to me. I'd accept some reasonable way of saying this ELF file is a Linux kernel, but magically doing it if you also said -dtb

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

2012-06-22 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes: On 22 June 2012 13:04, Markus Armbruster arm...@redhat.com wrote: Peter Maydell peter.mayd...@linaro.org writes: On 22 June 2012 09:48, Markus Armbruster arm...@redhat.com wrote: In my opinion, coroutines have been useful for us so far.  Whether

Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given

2012-06-22 Thread Peter Crosthwaite
On Fri, Jun 22, 2012 at 11:36 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 22 June 2012 14:27, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: Ping! Any thoughts Peter? Still sounds too specific to your odd use case and hardware to me. I'd accept some reasonable way of

Re: [Qemu-devel] [PATCH v3 1/1] virtio-rng: hardware random number generator device

2012-06-22 Thread Anthony Liguori
On 06/22/2012 08:34 AM, Daniel P. Berrange wrote: On Fri, Jun 22, 2012 at 07:58:53AM -0500, Anthony Liguori wrote: On 06/22/2012 07:31 AM, Daniel P. Berrange wrote: On Fri, Jun 22, 2012 at 07:22:51AM -0500, Anthony Liguori wrote: On 06/22/2012 07:12 AM, Markus Armbruster wrote: Anthony

[Qemu-devel] [PATCH 2/8] Add tracepoints for savevm section start/end

2012-06-22 Thread Juan Quintela
This allows to know how long each section takes to save. An awk script like this tells us sections that takes more that 10ms $1 ~ /savevm_state_iterate_end/ { /* Print savevm_section_end line when 10ms duration */ if ($2 1) { printf(%s times_missing=%u\n,

[Qemu-devel] [PATCH 5/8] Only calculate expected_time for stage 2

2012-06-22 Thread Juan Quintela
ram_save_remaining() is an expensive operation when there is a lot of memory. So we only call the function when we need it. Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch_init.c b/arch_init.c

[Qemu-devel] [PATCH 8/8] Maintain the number of dirty pages

2012-06-22 Thread Juan Quintela
Calculate the number of dirty pages takes a lot on hosts with lots of memory. Just maintain how many pages are dirty. Signed-off-by: Juan Quintela quint...@redhat.com --- arch_init.c | 15 +-- cpu-all.h |1 + exec-obsolete.h | 10 ++ 3 files changed, 12

Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given

2012-06-22 Thread Peter Crosthwaite
On Fri, Jun 22, 2012 at 11:36 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 22 June 2012 14:27, Peter Crosthwaite peter.crosthwa...@petalogix.com wrote: Ping! Any thoughts Peter? Still sounds too specific to your odd use case and hardware to me. I'd accept some reasonable way of

[Qemu-devel] [PATCH 7/8] dirty bitmap: abstract its use

2012-06-22 Thread Juan Quintela
Always use accessors to read/set the dirty bitmap. Signed-off-by: Juan Quintela quint...@redhat.com --- exec-obsolete.h | 40 exec.c |3 +-- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/exec-obsolete.h b/exec-obsolete.h

[Qemu-devel] [RFC] migration next tree

2012-06-22 Thread Juan Quintela
Hi As discussed on this week kvm call, here are the migration tree with XBRLE + huge memory fixes integrated. There were a bug on huge memory (corrected on the v3 version just sent) and another on XZBRLE patches. Orit is going to resend patches addressing comments, but here the fix is

  1   2   >