Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC

2012-11-09 Thread Gerhard Wiesinger
On 10.11.2012 00:52, Peter Maydell wrote: On 10 November 2012 00:45, Marek Vasut wrote: Gerd Hoffmann wrote: Question is just whenever we'll go silently fixup stuff in console.c or use assert()s to enforce callers getting this correct. I'd tend to use assert() as vmware-vga passing bogous stu

[Qemu-devel] [PATCH] target-mips: Fix seg fault for LUI when MIPS_DEBUG_DISAS==1.

2012-11-09 Thread Eric Johnson
The call to gen_logic_imm for OPC_LUI passes -1 for rs. This causes the MIPS_DEBUG statement to seg fault due to the deference of regnames[rs]. This patch fixes that. Signed-off-by: Eric Johnson --- target-mips/translate.c | 18 +++--- 1 files changed, 11 insertions(+), 7 deletio

Re: [Qemu-devel] [RFC v1 2/3] ramlist: apply fine grain lock for ram_list

2012-11-09 Thread Paolo Bonzini
Il 09/11/2012 04:14, Liu Ping Fan ha scritto: > From: Liu Ping Fan > > Signed-off-by: Liu Ping Fan > --- > cpu-all.h |1 + > exec.c| 46 +++--- > 2 files changed, 40 insertions(+), 7 deletions(-) The problem here is that the ram_list is a prett

Re: [Qemu-devel] [RFC v1 1/3] bouce buffer has fine grain lock

2012-11-09 Thread Paolo Bonzini
Il 09/11/2012 04:14, Liu Ping Fan ha scritto: > From: Liu Ping Fan > > Signed-off-by: Liu Ping Fan > --- > exec.c | 21 + > 1 files changed, 13 insertions(+), 8 deletions(-) > > diff --git a/exec.c b/exec.c > index 73d5242..fe84718 100644 > --- a/exec.c > +++ b/exec.c > @

Re: [Qemu-devel] [PATCH] vnc: fix option misspelling ("non-adapative" -> "non-adaptive")

2012-11-09 Thread Peter Maydell
On 10 November 2012 01:01, Catalin Patulea wrote: > > Signed-off-by: Catalin Patulea > --- > D'oh, that was really stupid. Here it is with the correct length. > > ui/vnc.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/ui/vnc.c b/ui/vnc.c > index 61f120e..ba30362

Re: [Qemu-devel] [PATCH] Revert "aio: clean up now-unused functions"

2012-11-09 Thread malc
On Sat, 10 Nov 2012, Paolo Bonzini wrote: > Il 09/11/2012 21:43, malc ha scritto: > > > > Breaks (at least) SB16. Apparently doesn't do what commit message says > > it does. > > > > This reverts commit 22bfa75eafc21522afbb265091faa9cc0649e9fb. > > NACK in this shape, but reverting just the asyn

[Qemu-devel] [PATCH] vnc: fix option misspelling ("non-adapative" -> "non-adaptive")

2012-11-09 Thread Catalin Patulea
Signed-off-by: Catalin Patulea --- D'oh, that was really stupid. Here it is with the correct length. ui/vnc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 61f120e..ba30362 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2945,7 +2945,7 @@ void vnc_

Re: [Qemu-devel] [PATCH] vnc: fix option misspelling ("non-adapative" -> "non-adaptive")

2012-11-09 Thread Peter Maydell
On 10 November 2012 00:31, Catalin Patulea wrote: > > Signed-off-by: Catalin Patulea > --- > A cursory web search shows that this flag doesn't show up much other than in > QEMU mailing lists and source. I don't think this will break anything. Yeah. In particular we documented it with the correct

Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC

2012-11-09 Thread Peter Maydell
On 10 November 2012 00:45, Marek Vasut wrote: > Gerd Hoffmann wrote: >> Question is just whenever we'll go silently fixup stuff in console.c or >> use assert()s to enforce callers getting this correct. I'd tend to use >> assert() as vmware-vga passing bogous stuff there IMHO indicates there >> is

Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC

2012-11-09 Thread Marek Vasut
Dear Gerd Hoffmann, > On 11/09/12 10:50, Peter Maydell wrote: > > On 9 November 2012 10:42, Anthony Liguori wrote: > >> While the abstract discussion is fun, it never hurts to be defensive. I > >> agree the root cause is vmware-vga but checking in vnc doesn't hurt. > > > > Defensive programming

[Qemu-devel] [PATCH] vnc: fix option misspelling ("non-adapative" -> "non-adaptive")

2012-11-09 Thread Catalin Patulea
Signed-off-by: Catalin Patulea --- A cursory web search shows that this flag doesn't show up much other than in QEMU mailing lists and source. I don't think this will break anything. ui/vnc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 61f1

Re: [Qemu-devel] [PATCH] Revert "aio: clean up now-unused functions"

2012-11-09 Thread Paolo Bonzini
Il 09/11/2012 21:43, malc ha scritto: > > Breaks (at least) SB16. Apparently doesn't do what commit message says > it does. > > This reverts commit 22bfa75eafc21522afbb265091faa9cc0649e9fb. NACK in this shape, but reverting just the async.c parts (and making aio_bh_update_timeout static otherwis

Re: [Qemu-devel] [PATCH] MAINTAINERS: add Stefan Hajnoczi as block and virtio-blk co-maintainer

2012-11-09 Thread Paolo Bonzini
Il 09/11/2012 14:29, Stefan Hajnoczi ha scritto: > Kevin has requested co-maintainership to give him more time to write > code. We will alternate patch review duties on a weekly basis. > > Signed-off-by: Stefan Hajnoczi > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --g

[Qemu-devel] [PATCH] Revert "aio: clean up now-unused functions"

2012-11-09 Thread malc
Breaks (at least) SB16. Apparently doesn't do what commit message says it does. This reverts commit 22bfa75eafc21522afbb265091faa9cc0649e9fb. --- async.c | 23 --- oslib-posix.c | 31 +++ qemu-aio.h|1 + qemu-common.h |1 + 4

Re: [Qemu-devel] [PATCH v11] kvm: notify host when the guest is panicked

2012-11-09 Thread Sasha Levin
On Mon, Nov 5, 2012 at 8:58 PM, Hu Tao wrote: > But in the case of panic notification, more dependency means more > chances of failure of panic notification. Say, if we use a virtio device > to do panic notification, then we will fail if: virtio itself has > problems, virtio for some reason can't

Re: [Qemu-devel] Crash on Windows XP startup

2012-11-09 Thread Catalin Patulea
I can post the target code and the code generated by TCG - not sure how helpful that would be. There also seems to be a diff between what is logged by "-d out_asm" and what I see in gdb with disass, and the segv occurs in one of the diff blocks. On Fri, Nov 9, 2012 at 1:42 PM, Catalin Patulea wro

Re: [Qemu-devel] Crash on Windows XP startup

2012-11-09 Thread Catalin Patulea
SIGSEGV is in target code: (gdb) bt #0 0x402fd349 in code_gen_buffer () #1 0x0056113b in cpu_x86_exec (env=0x19489f0) at /usr/local/google/home/catalinp/src/qemu/cpu-exec.c:599 #2 0x005625f9 in tcg_cpu_exec (env=0x19489f0) at /usr/local/google/home/catalinp/src/q

Re: [Qemu-devel] slow virtio network with vhost=on and multiple cores

2012-11-09 Thread Peter Lieven
Remark: If i disable interrupts on CPU1-3 for virtio the performance is ok again. Now we need someone with deeper knowledge of the in-kernel irqchip and the virtio/vhost driver development to say if this is a regression in qemu-kvm or a problem with the old virtio drivers if they receive the inter

Re: [Qemu-devel] slow virtio network with vhost=on and multiple cores

2012-11-09 Thread Peter Lieven
it seems that with in-kernel irqchip the interrupts are distributed across all vpcus. without in-kernel irqchip all interrupts are on cpu0. maybe this is related. without inkernel irqchip CPU0 CPU1 CPU2 CPU3 0: 16 0 0 0 IO-APIC-ed

Re: [Qemu-devel] slow virtio network with vhost=on and multiple cores

2012-11-09 Thread Peter Lieven
Dietmar Maurer wrote: >> Dietmar, how is the speed if you specify --machine pc,kernel_irqchip=off >> as >> cmdline option to qemu-kvm-1.2.0? > > I get full speed if i use that flag. > > I also tried to reproduce it and can confirm your findings. Host Ubuntu 12.04 LTS (kernel 3.2) with vanilla qemu

Re: [Qemu-devel] fixing qemu-0.1X endless loop in qcow2_alloc_cluster_offset

2012-11-09 Thread Andreas Färber
Am 15.10.2012 11:13, schrieb Kevin Wolf: > What I'm suggesting (not even compile tested!) is: > > Signed-off-by: Kevin Wolf > > diff --git a/block/qcow2.c b/block/qcow2.c > index 48e1b95..d665675 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -388,10 +388,7 @@ typedef struct QCowAIOCB {

Re: [Qemu-devel] [PATCH 09/24] ui/vnc-pallete.c: include headers it needs

2012-11-09 Thread Peter Maydell
On 9 November 2012 15:56, Eduardo Habkost wrote: > Include: > - for g_malloc0() > - for memset() > > Some of those headers were probably being included by accident because > some other headers were including qemu-common.h, but those headers > should eventually stop including qemu-common.h. Ty

[Qemu-devel] [PATCH 24/24] qom: make CPU a child of DeviceState

2012-11-09 Thread Eduardo Habkost
From: Igor Mammedov Signed-off-by: Igor Mammedov [ehabkost: change CPU type declaration to hae TYPE_DEVICE as parent] Signed-off-by: Eduardo Habkost --- Yes, there is "changelog" data before the "---" mark, but I believe that in this case they are important to indicate authorship and the scope

[Qemu-devel] [PATCH 07/24] qemu-fsdev-dummy.c: include module.h

2012-11-09 Thread Eduardo Habkost
module.h is where machine_init() is defined, but qemu-fsdev-dummy.c doesn't include it. The header is probably being included by accident because some other headers are including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost ---

[Qemu-devel] [PATCH 15/24] qlist.h: do not include qemu-common.h

2012-11-09 Thread Eduardo Habkost
I don't know why it was including it, as I don't see any code that depends on anything from qemu-common.h. Signed-off-by: Eduardo Habkost --- qlist.h | 1 - 1 file changed, 1 deletion(-) diff --git a/qlist.h b/qlist.h index ae776f9..7408947 100644 --- a/qlist.h +++ b/qlist.h @@ -15,7 +15,6 @@

[Qemu-devel] [PATCH 14/24] sysemu.h: include qemu-types.h instead of qemu-common.h

2012-11-09 Thread Eduardo Habkost
It just needs the Monitor and DeviceState typedefs, so it doesn't need all of qemu-common.h. Signed-off-by: Eduardo Habkost --- sysemu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysemu.h b/sysemu.h index f5ac664..ab1ef8b 100644 --- a/sysemu.h +++ b/sysemu.h @@ -2,7 +2,

[Qemu-devel] [PATCH 00/24] CPU DeviceState v7

2012-11-09 Thread Eduardo Habkost
Changes on v7: - Use the new QEMU_WEAK_ALIAS mechanism instead of the (now extinct) GCC_WEAK attribute (patches 20 and 21) v6: - Simple rebase against latest qemu.git master - Patch 13: some new typedefs were added and others were removed - Patch 19: trivial rebase v5: - Tons of header cle

[Qemu-devel] [PATCH 01/24] user: move *-user/qemu-types.h to main directory

2012-11-09 Thread Eduardo Habkost
The bsd-user/qemu-types.h and linux-user/qemu-types.h files are almost the same, but linux-user have the additional definitions of tswapal(). This moves the linux-user file to the main directory, so the same file can be used by linux-user and bsd-user. Signed-off-by: Eduardo Habkost --- Cc: Blue

Re: [Qemu-devel] VHDX support

2012-11-09 Thread Mario Premke
Is anyone currently working on VHDX (as opposed to VHD) support, as used by the most recent version of Hyper-V? If not, would you be interested in patches? I'm not aware of anyone working on it yet. Patches are welcome, of course. Kevin VHDX conversion seems to work already with qemu-img 1.1.

Re: [Qemu-devel] [PATCH 16/37] target-i386: set kvm CPUID default feature values using static properties

2012-11-09 Thread Eduardo Habkost
On 22/10/2012, at 17:03, Igor Mammedov wrote: > Replace setting default supported kvm features in cpu_x86_find_by_name() > by default values in corresponding static properties. > > - Compile in kvm CPUID features only if CONFIG_KVM is defined. > - Make "f-kvm_steal_tm" and "f-kvmclock_stable" C

[Qemu-devel] [PATCH 10/24] qemu-config.h: include headers it needs

2012-11-09 Thread Eduardo Habkost
Include: - for FILE - qemu-option.h for QemuOptsList Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost --- qemu-config.h | 2 ++

Re: [Qemu-devel] [PATCH 15/37] target-i386: set default value of "hypervisor" feature using static property

2012-11-09 Thread Eduardo Habkost
On 22/10/2012, at 17:03, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > target-i386/cpu.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 3131945..dc4fcdf 100644 > --- a/target-i386/cpu.c > +++ b/target

[Qemu-devel] [PATCH 16/24] qapi-types.h: don't include qemu-common.h

2012-11-09 Thread Eduardo Habkost
From: Igor Mammedov needed to prevent build breakage when CPU becomes a child of DeviceState Signed-off-by: Igor Mammedov [ehabkost: include too] Signed-off-by: Eduardo Habkost --- Yes, there is "changelog" data before the "---" mark, but I believe that in this case they are important to indi

[Qemu-devel] [PATCH 12/24] qga/channel-posix.c: include headers it needs

2012-11-09 Thread Eduardo Habkost
Include: - for errno - & for fcntl() - "qemu-stdio.h" for qemu_open() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost ---

[Qemu-devel] [PATCH 11/24] qapi/qmp-registry.c: include headers it needs

2012-11-09 Thread Eduardo Habkost
Include: - for g_malloc0() - for strcmp() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost --- qapi/qmp-registry.c | 2 ++ 1

[Qemu-devel] [PATCH 20/24] qdev: add weak aliases for vmstate handling on qdev.c

2012-11-09 Thread Eduardo Habkost
Add weak alias to vmstate stub functions on qdev.c, so that qdev.o can be used without savevm.o when vmstate support is not necessary (i.e. by *-user). Signed-off-by: Eduardo Habkost --- Originally submitted as: Subject: qdev-core: isolate vmstate handling into separate functions Changes v1 ->

[Qemu-devel] [PATCH 19/24] qdev: move reset handler list from vl.c to qdev.c

2012-11-09 Thread Eduardo Habkost
The core qdev code uses the reset handler list from vl.c, so move qemu_register_reset(), qemu_unregister_reset() and qemu_devices_reset() to qdev.c. The function declarations were moved to a new qdev-reset.h file, that is included by hw.h to keep compatibility, so we don't need to change all files

[Qemu-devel] [PATCH 09/24] ui/vnc-pallete.c: include headers it needs

2012-11-09 Thread Eduardo Habkost
Include: - for g_malloc0() - for memset() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost --- ui/vnc-palette.c | 2 ++ 1 f

[Qemu-devel] [PATCH 17/24] qdev-properties.c: add copyright/license information

2012-11-09 Thread Eduardo Habkost
Add copyright and license information, based on git log, and discussion at: http://article.gmane.org/gmane.comp.emulators.qemu/176405 Message-ID: <20121017201414.ga5...@otherpad.lan.raisama.net> The list of Copyright owners is huge, but I didn't think I really could leave any of the authors out

[Qemu-devel] [PATCH 23/24] include qdev code into *-user, too

2012-11-09 Thread Eduardo Habkost
The code depends on some functions from qemu-option.o, so add qemu-option.o to universal-obj-y to make sure it's included. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Keep files on the hw/ directory (it's simply easier to keep them there, as qdev.o depends on irq.o) - Add a $(hw-c

[Qemu-devel] [PATCH 08/24] vnc-palette.h: include

2012-11-09 Thread Eduardo Habkost
is needed for the 'bool' type, used in the header. The header is probably being included by accident because some other headers are including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost --- ui/vnc-palette.h | 1 + 1 file chang

[Qemu-devel] BUG: virtio-scsi-pci device causes SIGABRT on master 2592c59

2012-11-09 Thread Don Slutz
Commit d22b096ef6e0b20810193b68a1d472f3fb8a4f9e is what I bisected to. Using: gdb --args ./x86_64-softmmu/qemu-system-x86_64 -machine pc,accel=kvm -name "test1" -serial pty -chardev stdio,id=seabio\ s -device isa-debugcon,iobase=0x402,chardev=seabios -m 1024 -monitor pty -monitor vc -device vi

[Qemu-devel] [PATCH 21/24] qdev: add weak alias to sysbus_get_default() on qdev.c

2012-11-09 Thread Eduardo Habkost
This version will be used on cases where sysbus.c is not compiled in (e.g. *-user). Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Use the new QEMU_WEAK_ALIAS mechanism, instead of GCC_WEAK --- hw/qdev-core.h | 5 - hw/qdev.c | 13 + 2 files changed, 17 insertions(

[Qemu-devel] [PATCH 05/24] qdev: split up header so it can be used in cpu.h

2012-11-09 Thread Eduardo Habkost
From: Anthony Liguori Header file dependency is a frickin' nightmare right now. cpu.h tends to get included in our 'include everything' header files but qdev also needs to include those headers mainly for qdev-properties since it knows about CharDriverState and friends. We can solve this for no

[Qemu-devel] [PATCH 18/24] qdev: qdev_create(): use error_report() instead of hw_error()

2012-11-09 Thread Eduardo Habkost
hw_error() is specific for fatal hardware emulation errors, not for internal errors related to the qdev object/class abstraction or object initialization. Replace it with an error_report() call, followed by abort(). This will also help reduce dependencies of the qdev code (as hw_error() is from c

[Qemu-devel] [PATCH 22/24] qdev-properties.c: separate core from the code used only by qemu-system-*

2012-11-09 Thread Eduardo Habkost
This separates the qdev properties code in two parts: - qdev-properties.c, that contains most of the qdev properties code; - qdev-properties-system.c for code specific for qemu-system-*, containing: - Property types: drive, chr, netdev, vlan, that depend on code that won't be included

[Qemu-devel] [PATCH 06/24] move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h)

2012-11-09 Thread Eduardo Habkost
This will help reduce the qemu-common.h dependency hell. Signed-off-by: Eduardo Habkost -- Changes v1 -> v2: - move qemu_open() & qemu_close() to qemu-stdio.h, too --- qemu-common.h | 59 ++ qemu-stdio.h | 76 +

[Qemu-devel] [PATCH 03/24] qemu-common.h: comment about usage rules

2012-11-09 Thread Eduardo Habkost
Every time we make a tiny change on a header file, we often find circular header dependency problems. To avoid this nightmare, we need to stop including qemu-common.h on other headers, and we should gradually move the declarations from the catchall qemu-common.h header to their specific headers. T

[Qemu-devel] [PATCH 04/24] move qemu_irq typedef out of cpu-common.h

2012-11-09 Thread Eduardo Habkost
From: Igor Mammedov it's necessary for making CPU child of DEVICE without causing circular header deps. Signed-off-by: Igor Mammedov [ehabkost: re-added the typedef to hw/irq.h after rebasing] Signed-off-by: Eduardo Habkost --- Changes v1 (from Igor) -> v2 (sent by Eduardo): - Chunk adding ty

[Qemu-devel] [PATCH 13/24] create qemu-types.h for struct typedefs

2012-11-09 Thread Eduardo Habkost
Instead of keeping all those struct typedefs on qemu-common.h, move it to a header that can be safely included by other headers, containing only the struct typedefs and not pulling other dependencies. Also, move some of the qdev-core.h typedefs to the new file, too, so other headers don't need to

[Qemu-devel] [PATCH 02/24] user: rename qemu-types.h to qemu-user-types.h

2012-11-09 Thread Eduardo Habkost
The header file is specific for *-user, but I plan to introduce a more generic qemu-types.h file, so I'm renaming it. Signed-off-by: Eduardo Habkost --- Cc: Blue Swirl Cc: Riku Voipio --- bsd-user/qemu.h | 2 +- cpu-all.h | 2 +- linux-user/qemu.h

Re: [Qemu-devel] [PATCH 20/24] qdev: add stub vmstate handling to qdev.c

2012-11-09 Thread Eduardo Habkost
On Fri, Nov 09, 2012 at 11:08:35AM -0200, Eduardo Habkost wrote: > Add GCC_WEAK vmstate symbols to qdev.c, so that qdev.o can be used > without savevm.o (i.e. by *-user). > > Signed-off-by: Eduardo Habkost So, this is now broken as GCC_WEAK is gone and now I have to use QEMU_WEAK_ALIAS instead.

[Qemu-devel] [PATCH 03/24] qemu-common.h: comment about usage rules

2012-11-09 Thread Eduardo Habkost
Every time we make a tiny change on a header file, we often find circular header dependency problems. To avoid this nightmare, we need to stop including qemu-common.h on other headers, and we should gradually move the declarations from the catchall qemu-common.h header to their specific headers. T

[Qemu-devel] [PATCH 06/24] move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h)

2012-11-09 Thread Eduardo Habkost
This will help reduce the qemu-common.h dependency hell. Signed-off-by: Eduardo Habkost -- Changes v1 -> v2: - move qemu_open() & qemu_close() to qemu-stdio.h, too --- qemu-common.h | 59 ++ qemu-stdio.h | 76 +

[Qemu-devel] [PATCH 10/24] qemu-config.h: include headers it needs

2012-11-09 Thread Eduardo Habkost
Include: - for FILE - qemu-option.h for QemuOptsList Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost --- qemu-config.h | 2 ++

[Qemu-devel] [PATCH 07/24] qemu-fsdev-dummy.c: include module.h

2012-11-09 Thread Eduardo Habkost
module.h is where machine_init() is defined, but qemu-fsdev-dummy.c doesn't include it. The header is probably being included by accident because some other headers are including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost ---

[Qemu-devel] [PATCH 04/24] move qemu_irq typedef out of cpu-common.h

2012-11-09 Thread Eduardo Habkost
From: Igor Mammedov it's necessary for making CPU child of DEVICE without causing circular header deps. Signed-off-by: Igor Mammedov [ehabkost: re-added the typedef to hw/irq.h after rebasing] Signed-off-by: Eduardo Habkost --- Changes v1 (from Igor) -> v2 (sent by Eduardo): - Chunk adding ty

Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC

2012-11-09 Thread Gerd Hoffmann
On 11/09/12 10:50, Peter Maydell wrote: > On 9 November 2012 10:42, Anthony Liguori wrote: >> While the abstract discussion is fun, it never hurts to be defensive. I >> agree the root cause is vmware-vga but checking in vnc doesn't hurt. > > Defensive programming would suggest doing the clipping

[Qemu-devel] [PATCH 15/24] qlist.h: do not include qemu-common.h

2012-11-09 Thread Eduardo Habkost
I don't know why it was including it, as I don't see any code that depends on anything from qemu-common.h. Signed-off-by: Eduardo Habkost --- qlist.h | 1 - 1 file changed, 1 deletion(-) diff --git a/qlist.h b/qlist.h index ae776f9..7408947 100644 --- a/qlist.h +++ b/qlist.h @@ -15,7 +15,6 @@

[Qemu-devel] [PATCH 24/24] qom: make CPU a child of DeviceState

2012-11-09 Thread Eduardo Habkost
From: Igor Mammedov Signed-off-by: Igor Mammedov [ehabkost: change CPU type declaration to hae TYPE_DEVICE as parent] Signed-off-by: Eduardo Habkost --- Yes, there is "changelog" data before the "---" mark, but I believe that in this case they are important to indicate authorship and the scope

[Qemu-devel] [PATCH 20/24] qdev: add stub vmstate handling to qdev.c

2012-11-09 Thread Eduardo Habkost
Add GCC_WEAK vmstate symbols to qdev.c, so that qdev.o can be used without savevm.o (i.e. by *-user). Signed-off-by: Eduardo Habkost --- Originally submitted as: Subject: qdev-core: isolate vmstate handling into separate functions Changes v1 -> v2: - Add GCC_WEAK_DECL to function declarations

[Qemu-devel] [PATCH 08/24] vnc-palette.h: include

2012-11-09 Thread Eduardo Habkost
is needed for the 'bool' type, used in the header. The header is probably being included by accident because some other headers are including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost --- ui/vnc-palette.h | 1 + 1 file chang

[Qemu-devel] [PATCH 19/24] qdev: move reset handler list from vl.c to qdev.c

2012-11-09 Thread Eduardo Habkost
The core qdev code uses the reset handler list from vl.c, so move qemu_register_reset(), qemu_unregister_reset() and qemu_devices_reset() to qdev.c. The function declarations were moved to a new qdev-reset.h file, that is included by hw.h to keep compatibility, so we don't need to change all files

[Qemu-devel] [PATCH 23/24] include qdev code into *-user, too

2012-11-09 Thread Eduardo Habkost
The code depends on some functions from qemu-option.o, so add qemu-option.o to universal-obj-y to make sure it's included. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Keep files on the hw/ directory (it's simply easier to keep them there, as qdev.o depends on irq.o) - Add a $(hw-c

[Qemu-devel] [PATCH 01/24] user: move *-user/qemu-types.h to main directory

2012-11-09 Thread Eduardo Habkost
The bsd-user/qemu-types.h and linux-user/qemu-types.h files are almost the same, but linux-user have the additional definitions of tswapal(). This moves the linux-user file to the main directory, so the same file can be used by linux-user and bsd-user. Signed-off-by: Eduardo Habkost --- Cc: Blue

[Qemu-devel] [PATCH] MAINTAINERS: add Stefan Hajnoczi as block and virtio-blk co-maintainer

2012-11-09 Thread Stefan Hajnoczi
Kevin has requested co-maintainership to give him more time to write code. We will alternate patch review duties on a weekly basis. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8f5681f..2ede20d 100644 --- a/

[Qemu-devel] [PATCH 2/3] virtio-rng: remove extra request for entropy

2012-11-09 Thread Amit Shah
If we just got a few bytes from the backends, but the guest is ready to accept more, don't poke the backends once more for more bytes; it already knows (from the request in handle_input()). Signed-off-by: Amit Shah --- hw/virtio-rng.c | 10 -- 1 files changed, 0 insertions(+), 10 delet

[Qemu-devel] [PATCH 1/3] virtio-rng: use virtqueue_get_avail_bytes, fix migration

2012-11-09 Thread Amit Shah
Popping an elem from the vq just to find out its length causes problems with save/load later on. Use the new virtqueue_get_avail_bytes() function instead, saves us the complexity in the migration code. Signed-off-by: Amit Shah --- hw/virtio-rng.c | 69 +++--

[Qemu-devel] [PATCH 0/3] Fixes for virtio-rng

2012-11-09 Thread Amit Shah
Hey Anthony, Here are the fixes for the virtio-rng code -- ideally these should be folded in the series before you merge, but if the original series is ready to apply, these can go in as follow-on patches. Amit Shah (3): virtio-rng: use virtqueue_get_avail_bytes, fix migration virtio-rng: re

[Qemu-devel] [PATCH 3/3] virtio-rng: fix typos, comments

2012-11-09 Thread Amit Shah
Fix typos and update comments to match current implementation. Signed-off-by: Amit Shah --- hw/virtio-rng.c|1 - include/qemu/rng.h |6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/virtio-rng.c b/hw/virtio-rng.c index bb19cfa..290b2b6 100644 --- a/hw/virti

[Qemu-devel] [PATCH 14/24] sysemu.h: include qemu-types.h instead of qemu-common.h

2012-11-09 Thread Eduardo Habkost
It just needs the Monitor and DeviceState typedefs, so it doesn't need all of qemu-common.h. Signed-off-by: Eduardo Habkost --- sysemu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysemu.h b/sysemu.h index f5ac664..ab1ef8b 100644 --- a/sysemu.h +++ b/sysemu.h @@ -2,7 +2,

[Qemu-devel] [PATCH 13/24] create qemu-types.h for struct typedefs

2012-11-09 Thread Eduardo Habkost
Instead of keeping all those struct typedefs on qemu-common.h, move it to a header that can be safely included by other headers, containing only the struct typedefs and not pulling other dependencies. Also, move some of the qdev-core.h typedefs to the new file, too, so other headers don't need to

[Qemu-devel] [PATCH 17/24] qdev-properties.c: add copyright/license information

2012-11-09 Thread Eduardo Habkost
Add copyright and license information, based on git log, and discussion at: http://article.gmane.org/gmane.comp.emulators.qemu/176405 Message-ID: <20121017201414.ga5...@otherpad.lan.raisama.net> The list of Copyright owners is huge, but I didn't think I really could leave any of the authors out

[Qemu-devel] [PATCH 22/24] qdev-properties.c: separate core from the code used only by qemu-system-*

2012-11-09 Thread Eduardo Habkost
This separates the qdev properties code in two parts: - qdev-properties.c, that contains most of the qdev properties code; - qdev-properties-system.c for code specific for qemu-system-*, containing: - Property types: drive, chr, netdev, vlan, that depend on code that won't be included

[Qemu-devel] [PATCH 00/24] CPU DeviceState v6

2012-11-09 Thread Eduardo Habkost
Changes on v6: - Simple rebase against latest qemu.git master - Patch 13: some new typedefs were added and others were removed - Patch 19: trivial rebase v5: - Tons of header cleanups just to eliminate qlist.h <-> cpu-common.h circular dependency (patches 1-17) - Add copyright/license info

[Qemu-devel] [PATCH 16/24] qapi-types.h: don't include qemu-common.h

2012-11-09 Thread Eduardo Habkost
From: Igor Mammedov needed to prevent build breakage when CPU becomes a child of DeviceState Signed-off-by: Igor Mammedov [ehabkost: include too] Signed-off-by: Eduardo Habkost --- Yes, there is "changelog" data before the "---" mark, but I believe that in this case they are important to indi

[Qemu-devel] [PATCH 12/24] qga/channel-posix.c: include headers it needs

2012-11-09 Thread Eduardo Habkost
Include: - for errno - & for fcntl() - "qemu-stdio.h" for qemu_open() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost ---

[Qemu-devel] [PATCH 05/24] qdev: split up header so it can be used in cpu.h

2012-11-09 Thread Eduardo Habkost
From: Anthony Liguori Header file dependency is a frickin' nightmare right now. cpu.h tends to get included in our 'include everything' header files but qdev also needs to include those headers mainly for qdev-properties since it knows about CharDriverState and friends. We can solve this for no

[Qemu-devel] [PATCH 02/24] user: rename qemu-types.h to qemu-user-types.h

2012-11-09 Thread Eduardo Habkost
The header file is specific for *-user, but I plan to introduce a more generic qemu-types.h file, so I'm renaming it. Signed-off-by: Eduardo Habkost --- Cc: Blue Swirl Cc: Riku Voipio --- bsd-user/qemu.h | 2 +- cpu-all.h | 2 +- linux-user/qemu.h

[Qemu-devel] [PATCH 09/24] ui/vnc-pallete.c: include headers it needs

2012-11-09 Thread Eduardo Habkost
Include: - for g_malloc0() - for memset() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost --- ui/vnc-palette.c | 2 ++ 1 f

[Qemu-devel] [PATCH 11/24] qapi/qmp-registry.c: include headers it needs

2012-11-09 Thread Eduardo Habkost
Include: - for g_malloc0() - for strcmp() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost --- qapi/qmp-registry.c | 2 ++ 1

[Qemu-devel] [PATCH 18/24] qdev: qdev_create(): use error_report() instead of hw_error()

2012-11-09 Thread Eduardo Habkost
hw_error() is specific for fatal hardware emulation errors, not for internal errors related to the qdev object/class abstraction or object initialization. Replace it with an error_report() call, followed by abort(). This will also help reduce dependencies of the qdev code (as hw_error() is from c

[Qemu-devel] [PATCH 21/24] qdev: add sysbus_get_default() GCC_WEAK stub

2012-11-09 Thread Eduardo Habkost
This version will be used on cases where sysbus.c is not compiled in (e.g. *-user). Signed-off-by: Eduardo Habkost --- hw/qdev-core.h | 2 +- hw/qdev.c | 12 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/qdev-core.h b/hw/qdev-core.h index 494b687..19d9e03 1

[Qemu-devel] [PATCH V2] qemu-sockets: Fix parsing of the inet option 'to'.

2012-11-09 Thread Anthony PERARD
Having a qemu command line argument like "-vnc 127.0.0.1:0,to=99" is broken. This have been break with commit 879e45c72da1569e07fbbc6a1aa2a708ea796044. Signed-off-by: Anthony PERARD --- qemu-sockets.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu-sockets.c b/qemu

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix parsing of the inet option 'to'.

2012-11-09 Thread Anthony PERARD

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix parsing of the inet option 'to'.

2012-11-09 Thread Markus Armbruster
Anthony PERARD writes: > Having a qemu command line argument like "-vnc 127.0.0.1:0,to=99" is broken. > This have been break with commit 879e45c72da1569e07fbbc6a1aa2a708ea796044. > > Signed-off-by: Anthony PERARD > > --- > qemu-sockets.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions

Re: [Qemu-devel] [QEMU PATCH] microblaze: translate.c: Fix swaph decoding

2012-11-09 Thread Edgar E. Iglesias
On Thu, Nov 08, 2012 at 02:01:19PM +1000, Peter Crosthwaite wrote: > The swaph instruction was not decoding correctly. s/1e1/1e2 on the > 9 LSBs on the instruction decode. > > Reported-by: David Holsgrove > Signed-off-by: Peter Crosthwaite > --- > target-microblaze/translate.c |2 +- > 1 fi

Re: [Qemu-devel] Qemu Monitor

2012-11-09 Thread Markus Armbruster
You dropped cc: qemu-devel. Please don't do that unless you're very confident your question is of no interest whatsoever for anybody else. I added it back. Muhammad Nouman writes: > My target is MIPS ! then what should i do to see the tlb ? Simply not implemented for MIPS, as far as I can see.

Re: [Qemu-devel] QEMU 1.2.0 -hda option not working

2012-11-09 Thread Vipin Gahlaut
Hi Dunrong, Thanks for the link. This is great. I have now hdd recognized. I had everything else included apart from "Enable SYM53C8XX Version 2 SCSI Support". Once I included it, /dev/sda is available. Thanks again Dunrong and FAM for your help. Just for the others who may stumble upon this thr

Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC

2012-11-09 Thread Peter Maydell
On 9 November 2012 10:42, Anthony Liguori wrote: > While the abstract discussion is fun, it never hurts to be defensive. I > agree the root cause is vmware-vga but checking in vnc doesn't hurt. Defensive programming would suggest doing the clipping in the console.c layer. That sounds a reasonabl

[Qemu-devel] [PATCH 2/8] usb-redir: Allow packets to have both data and an error-status

2012-11-09 Thread Gerd Hoffmann
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 56 ++-- 1 files changed, 20 insertions(+), 36 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index cd4388e..be9a232 100644

[Qemu-devel] [PATCH 4/8] ehci: Add support for packets with both data and an error status

2012-11-09 Thread Gerd Hoffmann
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 161 +--- hw/usb/hcd-ehci.h |1 - 2 files changed, 77 insertions(+), 85 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c in

Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC

2012-11-09 Thread Michael Tokarev
On 09.11.2012 13:00, Michael Tokarev wrote: > On 09.11.2012 03:55, BALATON Zoltan wrote: >> On Thu, 8 Nov 2012, Gerd Hoffmann wrote: I think this is fixing this at the wrong level. Either we should require that drivers (in this case vmware_vga.c) must not call dpy_gfx_update() with o

Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC

2012-11-09 Thread Anthony Liguori
Peter Maydell writes: > On 9 November 2012 08:13, Gerhard Wiesinger wrote: >> (think of situations where bits might not be accurate due to CPU bugs or >> even QEMU/KVM in aerospace where >> bits fall to other states due to high energy cosmic ray). > > If any aeroplane manufacturer is using QEMU

[Qemu-devel] [PATCH 8/8] ehci: fix migration

2012-11-09 Thread Gerd Hoffmann
Commit 5010d4dc618b6b8e7c21129c487c06f6493f71fc reorganized vmstate to split core + pci, but got two little details wrong. Fix them. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci-pci.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/h

[Qemu-devel] [PATCH 6/8] usb/combined-packet: Move freeing of combined to usb_combined_packet_remove()

2012-11-09 Thread Gerd Hoffmann
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/combined-packet.c | 33 +++-- 1 files changed, 15 insertions(+), 18 deletions(-) diff --git a/hw/usb/combined-packet.c b/hw/usb/combined-packet.c index e722198..4a0c299 10064

[Qemu-devel] [PATCH v2] Fix piix4_pm savevm buffer overflow.

2012-11-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/acpi_piix4.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 15275cf..1fd6def 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -235,7 +235,7 @@ static int vmstate_acpi_post_load(void *opaq

[Qemu-devel] [PATCH 5/8] xhci: Add support for packets with both data and an error status

2012-11-09 Thread Gerd Hoffmann
From: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index d4a2e0c..a181d45 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@

[Qemu-devel] [PATCH 7/8] xhci: Fix some DMA host endian bugs

2012-11-09 Thread Gerd Hoffmann
From: David Gibson The xhci device does correct endian switches on the results of some DMAs but not all. In particular, there are many DMAs of what are essentially arrays of 32-bit integers which never get byteswapped. This causes them to be interpreted incorrectly on big-endian hosts, since (a

[Qemu-devel] [PATCH 3/8] ehci: Get rid of the magical PROC_ERR status

2012-11-09 Thread Gerd Hoffmann
From: Hans de Goede Instead make ehci_execute and ehci_fill_queue return the again value. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 55 +++- 1 files changed, 24 insertions(+), 31 deletions(-) diff --git

  1   2   >