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

2012-06-22 Thread Evgeny Voevodin
From: Stanislav Vorobiov 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 --- hw/exynos4210_mct.c |4 1 file changed, 4 deletions(-) diff --git

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 operati

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 t

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 put

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 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, which is flawed. I

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 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

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

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

2012-06-22 Thread Peter Maydell
On 22 June 2012 09:00, Peter Crosthwaite wrote: > On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka 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 >> beyond that? In the latter case, please don't do

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 (ch

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 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 is flawed.

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 wrote: > On 22 June 2012 09:00, Peter Crosthwaite > wrote: >> On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka 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 t

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 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. > > Libseccomp generate

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

2012-06-22 Thread Peter Maydell
On 22 June 2012 09:20, Peter Crosthwaite 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 (pflash_cfi_01) from coroutin

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 wrote: > On 22 June 2012 09:00, Peter Crosthwaite > wrote: >> On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka 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 t

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 wrote: > On 22 June 2012 09:20, Peter Crosthwaite > 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 devi

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 > wrote: >> On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka 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] [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 > --- > configure |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to the trivial patch

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

2012-06-22 Thread Markus Armbruster
Peter Maydell writes: > On 22 June 2012 09:00, Peter Crosthwaite > wrote: >> On Fri, Jun 22, 2012 at 5:50 PM, Jan Kiszka 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 >>> beyond that? In

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 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 on

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 > > 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. > Alternatively

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 remov

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 > --- > > Hopefully those 'Qemu' and 'QEmu' variants will stop > as soon as my patch for checkpatch.pl was applied

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

2012-06-22 Thread Peter Maydell
On 22 June 2012 09:48, Markus Armbruster 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 not really an

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 wrote: > On Tue, Jun 19, 2012 at 04:44:38PM +1000, Peter A. G. Crosthwaite wrote: >> From: Jim Meyering >> >> Use sizeof(rxbuf)-size (not sizeof(rxbuf-size)) as the number >> of bytes to clear. > Thanks, applied to the trivial patches tree: > https://github

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 > --- > tci.c |1 - > 1 file changed, 1 deletion(-)

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 QEMUMachin

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

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

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

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy 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 Signed-off-by: Gerd Hoffmann --- ui/spice-display.c |2 ++ 1 files changed, 2 insertions(+

[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: s/qxl_guest_bug/qxl_set_g

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

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy Signed-off-by: Alon Levy Signed-off-by: Gerd Hoffmann --- hw/qxl.c | 49 +++-- hw/qxl.h |3 ++- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 3da3399..8777ba9 100644 --- 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 wrote: > On 22 June 2012 10:03, Stefan Hajnoczi wrote: >> On Tue, Jun 19, 2012 at 04:44:38PM +1000, Peter A. G. Crosthwaite wrote: >>> From: Jim Meyering >>> >>> Use sizeof(rxbuf)-size (not sizeof(rxbuf-size)) as the number >>> of bytes to clear. >

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 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: Alexan

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

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil The typo did not cause an error because open_by_handle_at was only compared to "yes". Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index b68c0ca..1446f52 1

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

2012-06-22 Thread Stefan Hajnoczi
From: Andreas Färber 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 Signed-off-by: Stefan Hajnoczi --- tests/libqtest.c |1 + 1 file changed, 1 insertio

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

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy Signed-off-by: Alon Levy Signed-off-by: Gerd Hoffmann --- 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 @@ -986,6 +986,7 @@ static void qxl_soft_reset(PCIQXLDevic

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) 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 >> mechanism availab

[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 6a69226f22011673dbce99d5e32cfeaad5bff426:

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

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil 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 Signed-off-by: Stefan Hajnoczi --- tci.c |1 - 1 file changed, 1 deletion(-) diff --git a/tci.c b/tc

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 u

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 ge

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

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil 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 CCqapi-generated/

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

2012-06-22 Thread Stefan Hajnoczi
From: Peter Maydell 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 because $(dir ..) is gua

[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" Signed-off-by: Peter A. G. Crosthwaite Signed-off-by: Stefan Hajnoczi --- hw/arm_gic.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm_gic.c b/hw/arm_gic.c index 72298b4..c78d58e 100644 --- a/hw/arm_gic.c +++ b/hw/arm_gic.c @@ -35,7

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

2012-06-22 Thread Stefan Hajnoczi
From: Frédéric Boiteux 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 Signed-off-by: Stefan Hajnoczi --- Makefile |3 ++- 1

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

2012-06-22 Thread Stefan Hajnoczi
From: Andreas Färber 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 Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- Makefile.user |1 + 1 file changed, 1 insertio

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

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil The new rule detects two wrong variants of QEMU. It was tested with commit b5a8fe5e. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- scripts/checkpatch.pl |5 + 1 file changed, 5 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl

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 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 should be >>

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 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 too big. We c

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) 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 & related >> field in en

[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 --- hw/fdc.c | 79 - 1 f

[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 --- hw/fdc.c |4 1 files changed, 4 insertions(+), 0 deletions(-)

[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 iss

[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 --- tests/fdc-test.c | 66 ++ 1 files changed, 66 insertions(+), 0 deletions(-) diff --git a/tests/fdc-test.c b

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 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 & >>>

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

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil This new 'Qemu' was recently added. Replace it by the official all upper case 'QEMU'. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- qemu-config.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-config.h b/qemu-config.h index e9f2ef

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

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy 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 Signed-off-by: Gerd Hoffmann ---

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

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil As qapi-dir was now a constant, it can be replaced by its value. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- Makefile | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index d0847c5..26ffa51 10

[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 --- tests/fdc-test.c | 29 + 1 files changed, 21 insertions(+), 8 deletions(-) diff --git a/tests/fdc-test.c b/te

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

2012-06-22 Thread Stefan Hajnoczi
From: Stefan Weil This new 'QEmu' was recently added. Replace it by the official all upper case 'QEMU'. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- target-i386/cpu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c

[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, wh

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

2012-06-22 Thread Gerd Hoffmann
From: Alon Levy 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 ] [ kraxel: fix mode

[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 --- tests/fdc-test.c | 25 - 1 files changed, 24 insertions(+), 1 deletions(-)

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 wrote: > Am 22.06.2012 10:20, schrieb Peter Crosthwaite: >> On Fri, Jun 22, 2012 at 5:49 PM, Kevin Wolf 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_

[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 --- hw/pc_piix.c| 24 hw/qxl.c|2 +- hw/vga-pci.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 gr

[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 --- hw/fdc.c | 34 +- 1 files changed, 21 insertion

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 ent

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 --- cpu-common.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index 321037f..85548de 100

[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 --- cpu-common.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/c

[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 insertion

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 > --- > cpu-common.h |2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) > > diff

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 Reviewed-by: Andreas Färber /-F --

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

2012-06-22 Thread Markus Armbruster
Peter Maydell writes: > On 22 June 2012 09:48, Markus Armbruster 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 pil

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

2012-06-22 Thread Markus Armbruster
Anthony Liguori 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 buffer, and push

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 Liguori 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 a bit surprised to se

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 wrote: > On Fri, Jun 22, 2012 at 7:15 PM, Stefan Hajnoczi 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 th

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

2012-06-22 Thread Peter Maydell
On 22 June 2012 13:04, Markus Armbruster wrote: > Peter Maydell writes: > >> On 22 June 2012 09:48, Markus Armbruster 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

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 Liguori 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

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 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 br

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

2012-06-22 Thread Juan Quintela
"(Wei-Ren Chen)" 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

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 > --- > cpu-defs.h |2 ++ > cpus.c | 17 + > main-loop.h |3 +++ > 3 files changed, 22 insertions(+), 0 d

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 Liguori writes: Nack. Use a protocol. This is not what QMP events are designed for! No human is going to launch nc to

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 wrote: > The sizep arg is populated with the size of the loaded device tr

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 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 includes a built in dtb. Slave

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 Liguori 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 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 isn't it. I also care about

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

2012-06-22 Thread Markus Armbruster
Peter Maydell writes: > On 22 June 2012 13:04, Markus Armbruster wrote: >> Peter Maydell writes: >> >>> On 22 June 2012 09:48, Markus Armbruster 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

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 wrote: > On 22 June 2012 14:27, Peter Crosthwaite > 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", > bu

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 Liguor

[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 --- arch_init.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch_init.c b/arch_init.c index a9e8b74..424ef

[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 --- arch_init.c | 15 +-- cpu-all.h |1 + exec-obsolete.h | 10 ++ 3 files changed, 12 insertions(+), 14 delet

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 wrote: > On 22 June 2012 14:27, Peter Crosthwaite > 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", > bu

[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 --- exec-obsolete.h | 40 exec.c |3 +-- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/exec-obsolete.h b/exec-obsolete.h index 792c831..f8ffc

[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 integrated

Re: [Qemu-devel] [PATCH 1/9] alpha-linux-user: Fix signal handling

2012-06-22 Thread Peter Maydell
On 7 June 2012 23:24, Richard Henderson wrote: > Proper signal numbers were not defined, and EXCP_INTERRUPT > was unhandled, leading to all sorts of subtle confusion. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell -- PMM

  1   2   >