[Qemu-devel] [PATCH 1/2] vnc: don't mess up with iohandlers in the vnc thread

2012-03-13 Thread Corentin Chary
From: Corentin Chary The threaded VNC servers messed up with QEMU fd handlers without any kind of locking, and that can cause some nasty race conditions. Using qemu_mutex_lock_iothread() won't work because vnc_dpy_cpy(), which will wait for the current job queue to finish, can be called with the

[Qemu-devel] [PATCH 2/2] vnc: Limit r/w access to size of allocated memory

2012-03-13 Thread Corentin Chary
From: Stefan Weil This fixes memory reads and writes which exceeded the upper limit of allocated memory vd->guest.ds->data and vd->server->data. Cc: Anthony Liguori Signed-off-by: Stefan Weil --- ui/vnc.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/ui/vnc.c b/ui

[Qemu-devel] [PATCH 0/2] Lost VNC patches

2012-03-13 Thread Corentin Chary
Hi Anthony, Please merge these two patchs from another age, they fix crash in the VNC server (the iohandler one is only for the threaded server). Thanks, Corentin Chary (1): vnc: don't mess up with iohandlers in the vnc thread Stefan Weil (1): vnc: Limit r/w access to size of allocated memo

[Qemu-devel] [PATCH v3] w32: Support tests (make check)

2012-03-13 Thread Stefan Weil
Adding $(EXESUF) is needed to make those tests work on w32 hosts, too. v2: Rebased, added new tests, tests sorted alphabetically. v3: Rebased, $(EXESUF) for qemu-img, qemu-io which were recently added. Cc: Anthony Liguori Cc: Kevin Wolf Cc: Andreas Färber Reviewed-by: Andreas Färber Signed-o

Re: [Qemu-devel] [RESEND PATCH] vmstate: fix varrays with uint32_t indexes

2012-03-13 Thread Hervé Poussineau
Amos Kong a écrit : VMSTATE_VARRAY_UINT32() is used in hw/ds1225y.c, and we checked VMS_VARRAY_UINT32 bit of field->flags in vmstate_load_state(), but we don't check this bit in vmstate_save_state(). Signed-off-by: Amos Kong Acked-by: Hervé Poussineau

Re: [Qemu-devel] [RFC PATCH v5 00/14] Tracing Improvements, Simpletrace v2

2012-03-13 Thread Harsh Bora
On 03/14/2012 01:41 AM, Lluís Vilanova wrote: Harsh Prateek Bora writes: This patchset introduces 2 major updates: 1) Tracetool Improvements (Conversion from shell script to python) 2) Simpletrace v2 log format (Support for variable args, strings) Existing simple trace can log upto 6 args pe

Re: [Qemu-devel] [RFC PATCH v5 10/14] trace: Provide a per-event status define for conditional compilation

2012-03-13 Thread Harsh Bora
On 03/12/2012 08:55 PM, Lluís Vilanova wrote: Harsh Prateek Bora writes: diff --git a/docs/tracing.txt b/docs/tracing.txt index 95ca16c..ab9048c 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -39,12 +39,12 @@ generate code for the trace events. Trace events are invoked directly from

Re: [Qemu-devel] about kvmclock QOM

2012-03-13 Thread Zhi Yong Wu
On Wed, Mar 14, 2012 at 12:27 PM, Gavin Shan wrote: >> > What you are looking for is the "parent" property which gets set up by >> > [...adding a child property to some object. Many devices are not yet >> > wired up as such...] >> You mean that current device object should have one "paren

[Qemu-devel] [PATCH 3/7] target-unicore32: QOM'ify CPU

2012-03-13 Thread Andreas Färber
Embed CPUUniCore32State into UniCore32CPU. Contributed under GPLv2+. Signed-off-by: Andreas Färber --- Makefile.target|1 + target-unicore32/cpu-qom.h | 72 ++ target-unicore32/cpu.c | 91 targe

[Qemu-devel] [PATCH 4/7] target-unicore32: Store cp0 c0_cachetype in UniCore32CPUClass

2012-03-13 Thread Andreas Färber
Contributed under GPLv2+. Signed-off-by: Andreas Färber --- target-unicore32/cpu-qom.h |1 + target-unicore32/cpu.c |4 target-unicore32/helper.c |1 - 3 files changed, 5 insertions(+), 1 deletions(-) diff --git a/target-unicore32/cpu-qom.h b/target-unicore32/cpu-qom.h ind

[Qemu-devel] [RFC][PATCH 14/14 v9] allow user to dump a fraction of the memory

2012-03-13 Thread Wen Congyang
This API allows the user to limit how much memory to be dumped, rather than forcing the user to dump all memory at once. Signed-off-by: Wen Congyang --- dump.c | 186 +- hmp-commands.hx | 14 +++- hmp.c| 13 - me

[Qemu-devel] [RFC][PATCH 13/14 v9] support to query dumping status

2012-03-13 Thread Wen Congyang
Add API to allow the user to query dumping status. It can only work after async dumping is supported. Signed-off-by: Wen Congyang --- dump.c | 32 hmp-commands.hx |2 ++ hmp.c| 17 + hmp.h|1 + monito

[Qemu-devel] [RFC][PATCH 12/14 v9] support to cancel the current dumping

2012-03-13 Thread Wen Congyang
Add API to allow the user to cancel the current dumping. It can only work after async dumping is supported. Signed-off-by: Wen Congyang --- dump.c | 12 hmp-commands.hx | 14 ++ hmp.c|5 + hmp.h|1 + qapi-schema.json |

[Qemu-devel] [RFC][PATCH 11/14 v9] introduce a new monitor command 'dump' to dump guest's memory

2012-03-13 Thread Wen Congyang
The command's usage: dump [-p] file file should be start with "file:"(the file's path) or "fd:"(the fd's name). Note: 1. If you want to use gdb to analyse the core, please specify -p option. 2. This command doesn't support the fd that is is associated with a pipe, socket, or FIFO(lseek

[Qemu-devel] [RFC][PATCH 10/14 v9] make gdb_id() generally avialable

2012-03-13 Thread Wen Congyang
The following patch also needs this API, so make it generally avialable Signed-off-by: Wen Congyang --- gdbstub.c |9 - gdbstub.h |9 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index ef95ac2..7522b42 100644 --- a/gdbstub.c +++ b

Re: [Qemu-devel] virtio balloon PCI class code

2012-03-13 Thread Rusty Russell
On Tue, 13 Mar 2012 14:30:26 +1100, David Gibson wrote: > Currently the virtio-pci driver advertises the virtio balloon device > as having the PCI class code PCI_CLASS_MEMORY_RAM. Although the > balloon device is vaguely related to RAM management, it doesn't > operate anything like a PCI memory

[Qemu-devel] [RFC][PATCH 09/14 v9] target-i386: add API to get dump info

2012-03-13 Thread Wen Congyang
Dump info contains: endian, class and architecture. The next patch will use these information to create vmcore. Note: on x86 box, the class is ELFCLASS64 if the memory is larger than 4G. Signed-off-by: Wen Congyang --- cpu-all.h |7 +++ dump.h | 23 +

[Qemu-devel] [RFC][PATCH 08/14 v9] target-i386: Add API to write cpu status to core file

2012-03-13 Thread Wen Congyang
The core file has register's value. But it does not include all registers value. Store the cpu status into QEMU note, and the user can get more information from vmcore. If you change QEMUCPUState, please count up QEMUCPUSTATE_VERSION. Signed-off-by: Wen Congyang --- cpu-all.h | 2

Re: [Qemu-devel] about kvmclock QOM

2012-03-13 Thread Zhi Yong Wu
On Wed, Mar 14, 2012 at 12:28 AM, Andreas Färber wrote: > Am 13.03.2012 16:21, schrieb Zhi Yong Wu: >> On Tue, Mar 13, 2012 at 11:10 PM, Andreas Färber wrote: >>> Am 13.03.2012 15:52, schrieb Zhi Yong Wu: On Tue, Mar 13, 2012 at 10:36 PM, Andreas Färber wrote: > What you are looking for

[Qemu-devel] [RFC][PATCH 07/14 v9] target-i386: Add API to write elf notes to core file

2012-03-13 Thread Wen Congyang
The core file contains register's value. These APIs write registers to core file, and them will be called in the following patch. Signed-off-by: Wen Congyang --- Makefile.target |1 + configure |4 + cpu-all.h | 23 + target-i386/arch_dump.c | 2

[Qemu-devel] [RFC][PATCH 06/14 v9] Add API to get memory mapping without do paging

2012-03-13 Thread Wen Congyang
crash does not need the virtual address and physical address mapping, and the mapping does not include the memory that is not referenced by the page table. crash does not use the virtual address, so we can create the mapping for all physical memory(virtual address is always 0). This patch provides

[Qemu-devel] [RFC][PATCH 05/14 v9] Add API to get memory mapping

2012-03-13 Thread Wen Congyang
Add API to get all virtual address and physical address mapping. If the guest doesn't use paging, the virtual address is equal to the phyical address. The virtual address and physical address mapping is for gdb's user, and it does not include the memory that is not referenced by the page table. So

[Qemu-devel] [RFC][PATCH 04/14 v9] Add API to check whether paging mode is enabled

2012-03-13 Thread Wen Congyang
This API will be used in the following patch. Signed-off-by: Wen Congyang --- cpu-all.h |6 ++ target-i386/arch_memory_mapping.c |7 ++- 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index 786dbea..4fe7174 100644 ---

[Qemu-devel] [RFC][PATCH 03/14 v9] implement cpu_get_memory_mapping()

2012-03-13 Thread Wen Congyang
Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. If the guest does not use paging, it will do nothing. Note: the I/O memory will be skipped. Signed-off-by: Wen Congyang --- Makefile.target |

[Qemu-devel] [RFC][PATCH 02/14 v9] Add API to check whether a physical address is I/O address

2012-03-13 Thread Wen Congyang
This API will be used in the following patch. Signed-off-by: Wen Congyang --- cpu-common.h |2 ++ exec.c |9 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index dca5175..fcd50dc 100644 --- a/cpu-common.h +++ b/cpu-common.h @@

[Qemu-devel] [RFC][PATCH 01/14 v9] Add API to create memory mapping list

2012-03-13 Thread Wen Congyang
The memory mapping list stores virtual address and physical address mapping. The virtual address and physical address are contiguous in the mapping. The folloing patch will use this information to create PT_LOAD in the vmcore. Signed-off-by: Wen Congyang --- Makefile.target |1 + memory_map

[Qemu-devel] [RFC][PATCH 00/14 v9] introducing a new, dedicated memory dump mechanism

2012-03-13 Thread Wen Congyang
Hi, all 'virsh dump' can not work when host pci device is used by guest. We have discussed this issue here: http://lists.nongnu.org/archive/html/qemu-devel/2011-10/msg00736.html The last version is here: http://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg00235.html We have determined to

[Qemu-devel] [PATCH 2/7] target-unicore32: Relicense to GPLv2+

2012-03-13 Thread Andreas Färber
Adopt the license text suggested by Guan Xue-tao for all files except helper.c, to which Anthony Liguori (IBM) contributed a g_malloc() call. Signed-off-by: Andreas Färber Signed-off-by: Guan Xuetao Signed-off-by: Stefan Weil Signed-off-by: Blue Swirl Signed-off-by: Dor Laor --- target-unico

[Qemu-devel] [PATCH 7/7] target-unicore32: Store ucf64 fpscr in UniCore32CPUClass

2012-03-13 Thread Andreas Färber
This removes the remaining CPUID dependency. Contributed under GPLv2+. Signed-off-by: Andreas Färber --- target-unicore32/cpu-qom.h |4 target-unicore32/cpu.c |4 target-unicore32/cpu.h |4 target-unicore32/helper.c | 12 4 files changed, 8 ins

[Qemu-devel] [PATCH 1/7] MAINTAINERS: Add entry for UniCore32

2012-03-13 Thread Andreas Färber
Consider it Odd Fixes for now. Signed-off-by: Andreas Färber Cc: Guan Xuetao --- MAINTAINERS |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f83d07c2..44ff923 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -112,6 +112,11 @@ M: Blue Swi

[Qemu-devel] [PATCH 5/7] target-unicore32: Store cp0 c1_sys in UniCore32CPUClass

2012-03-13 Thread Andreas Färber
Contributed under GPLv2+. Signed-off-by: Andreas Färber --- target-unicore32/cpu-qom.h |1 + target-unicore32/cpu.c |4 target-unicore32/helper.c |1 - 3 files changed, 5 insertions(+), 1 deletions(-) diff --git a/target-unicore32/cpu-qom.h b/target-unicore32/cpu-qom.h ind

[Qemu-devel] [PATCH 6/7] target-unicore32: Store feature flags in UniCore32CPUClass

2012-03-13 Thread Andreas Färber
Contributed under GPLv2+. Signed-off-by: Andreas Färber --- target-unicore32/cpu-qom.h |3 +++ target-unicore32/cpu.c |9 + target-unicore32/helper.c |9 - 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/target-unicore32/cpu-qom.h b/target-unicore

[Qemu-devel] [PATCH 0/7] QOM'ify UniCore32 CPU

2012-03-13 Thread Andreas Färber
Hello, Based on qom-cpu v4 and object_class_get_list() v2, this series converts the UniCore32 CPU to QOM. Code-wise, target-unicore32 is pretty close to target-arm and faces a similar issue of CPU-dependent init code, so let's tackle it next. Patch 1 adds a UniCore32 CPU guest core (TCG) section

Re: [Qemu-devel] [PATCH 2/6] Redesign of pciinit.c (take 2)

2012-03-13 Thread Kevin O'Connor
On Tue, Mar 13, 2012 at 05:45:19PM +1300, Alexey Korolev wrote: > Added pci_region_entry structure and list operations to pciinit.c > List is filled with entries during pci_check_devices. > List is used just for printing space allocation if we were using lists. > Next step will resource allocation

Re: [Qemu-devel] [PATCH 0/2] virtio-pci: fix abort when fail to allocate ioeventfd

2012-03-13 Thread Amos Kong
- Original Message - > On Tue, Mar 13, 2012 at 2:47 PM, Amos Kong wrote: ... Hi, Stefan > > diff --git a/kvm-all.c b/kvm-all.c > > index 77eadf6..7157e78 100644 > > --- a/kvm-all.c > > +++ b/kvm-all.c > > @@ -771,6 +771,8 @@ static void > > kvm_io_ioeventfd_add(MemoryRegionSection *sect

Re: [Qemu-devel] [PATCH v4 10/10] Add the drive-reopen command

2012-03-13 Thread Federico Simoncelli
- Original Message - > From: "Eric Blake" > To: "Paolo Bonzini" > Cc: kw...@redhat.com, fsimo...@redhat.com, qemu-devel@nongnu.org, > stefa...@linux.vnet.ibm.com, lcapitul...@redhat.com > Sent: Tuesday, March 13, 2012 9:48:10 PM > Subject: Re: [Qemu-devel] [PATCH v4 10/10] Add the drive-

Re: [Qemu-devel] [libvirt] Modern CPU models cannot be used with libvirt

2012-03-13 Thread Ayal Baron
- Original Message - > On 03/12/2012 10:19 PM, Ayal Baron wrote: > > > > > > - Original Message - > >> On 03/12/2012 02:12 PM, Itamar Heim wrote: > >>> On 03/12/2012 09:01 PM, Anthony Liguori wrote: > > It's a trade off. From a RAS perspective, it's helpful to have > >>>

Re: [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC

2012-03-13 Thread Zhang, Yang Z
Is there any comments with the version 3? best regards yang > -Original Message- > From: Zhang, Yang Z > Sent: Friday, March 02, 2012 2:59 PM > To: qemu-devel@nongnu.org > Cc: Jan Kiszka; k...@vger.kernel.org; k...@vger.kernel.org; > aligu...@us.ibm.com; > Paolo Bonzini; Marcelo Tosatti

Re: [Qemu-devel] [PATCH] kvm: add flightrecorder script

2012-03-13 Thread Marcelo Tosatti
On Fri, Mar 09, 2012 at 02:13:40PM +, Stefan Hajnoczi wrote: > The kvm kernel module includes a number of trace events which can be > useful when debugging system behavior. Even on production systems these > trace events can be used to observe guest behavior and identify the > source of proble

[Qemu-devel] Recovering the original instruction address

2012-03-13 Thread João Corrêa
Hi Guys, Simple question. Considering that I am running code translated into tcg using the interpreter (tci), is it possible for me to, based on the instruction's address on the code, recover the original address of the translated instruction on the target binary? Is there any data structure or fu

[Qemu-devel] [PATCH] PPC: KVM: Synchronize regs on CPU dump

2012-03-13 Thread Alexander Graf
When we dump the CPU registers, there's a certain chance they haven't been synchronized with KVM yet, so we have to manually trigger that. This aligns the code with x86 and fixes a bug where the register state was bogus on invalid/unknown kvm exit reasons. Reported-by: Benjamin Herrenschmidt Sig

[Qemu-devel] [PATCH 10/12] trace: [tracetool] Automatically establish available backends and formats

2012-03-13 Thread Lluís Vilanova
Adds decorators to establish which backend and/or format each routine is meant to process. With this, tables enumerating format and backend routines can be eliminated and part of the usage message can be computed in a more generic way. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek B

[Qemu-devel] [PATCH 11/12] trace: Provide a per-event status define for conditional compilation

2012-03-13 Thread Lluís Vilanova
Revives the functionality introduced by commit b7d66a76, which was temporarily removed on the tracetool conversion performed during this series. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py |7 +++ 1 files changed, 7 insertions(+), 0 deletions

[Qemu-devel] [PATCH 03/12] trace: [tracetool] Do not rebuild event list in backend code

2012-03-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 26a4c43..71ef16c 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.p

[Qemu-devel] [PATCH 04/12] trace: [tracetool] Simplify event line parsing

2012-03-13 Thread Lluís Vilanova
Using regular expressions yields more compact and error-proof code when breaking the lines into pieces. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 43 +++ 1 files changed, 15 insertions(+), 28 deletions(-)

[Qemu-devel] [PATCH 06/12] trace: [tracetool] Add support for event properties

2012-03-13 Thread Lluís Vilanova
Using regular expressions yields more compact and error-proof code when breaking the event properties into pieces. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scrip

[Qemu-devel] [PATCH 09/12] trace: [tracetool] Make format-specific code optional and with access to events

2012-03-13 Thread Lluís Vilanova
First, routines for format-specific code are not mandatory. Second, all format-specific routines get the list of events as an argument. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 32 ++-- 1 files changed, 10 insertio

[Qemu-devel] [RFC PATCH 2/2] -readconfig: accept fd= option

2012-03-13 Thread Eduardo Habkost
Cc: Ronnie Sahlberg Signed-off-by: Eduardo Habkost --- qemu-config.c | 35 +-- qemu-options.hx |6 +++--- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 6b7b28b..0a7f42c 100644 --- a/qemu-config.c +++ b/

[Qemu-devel] [RFC PATCH 0/2] -readconfig: accept fd= option

2012-03-13 Thread Eduardo Habkost
This changes -readconfig to use the QemuOpts syntax and accept 'fd=' as argument, too. I'm not sure yet if it's OK to break compatibility of -readconfig for filenames containing "=" or ",". On the one hand I wouldn't like to break it, on the other hand, I wouldn't like to add Yet Another command-l

[Qemu-devel] [RFC PATCH 1/2] -readconfig: use QemuOpts option format

2012-03-13 Thread Eduardo Habkost
This changes -readconfig to use the name=value[,name=value] option format. It keeps "-readconfig filename" working by using the implied "path" option name, but it changes the existing syntax a little, meaning that files with "=" and "," in the filename have to be escaped. I chose to break compati

Re: [Qemu-devel] [PATCH v4 10/10] Add the drive-reopen command

2012-03-13 Thread Eric Blake
On 03/06/2012 10:56 AM, Paolo Bonzini wrote: > From: Federico Simoncelli > > Signed-off-by: Federico Simoncelli > Signed-off-by: Paolo Bonzini > ## > +# @drive-reopen > +# > +# Assigns a new image file to a device. > +# > +# @device: the name of the device for which we are changing the image

[Qemu-devel] [PATCH 08/12] trace: [tracetool] Rewrite event argument parsing

2012-03-13 Thread Lluís Vilanova
Adds an 'Arguments' class to describe event arguments. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 113 -- 1 files changed, 54 insertions(+), 59 deletions(-) diff --git a/scripts/tracetool.py b/scri

[Qemu-devel] [PATCH 05/12] trace: [tracetool] Do not precompute the event number

2012-03-13 Thread Lluís Vilanova
An event number is implicit in its position on the list of events. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 21 + 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py i

[Qemu-devel] [PATCH 12/12] trace: [tracetool] Add error-reporting functions

2012-03-13 Thread Lluís Vilanova
Unifies the print+exit sequence into a single 'error' call. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 27 +++ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py i

[Qemu-devel] [PATCH 01/12] Converting tracetool.sh to tracetool.py

2012-03-13 Thread Lluís Vilanova
Signed-off-by: Harsh Prateek Bora Signed-off-by: Lluís Vilanova --- Makefile.objs|6 Makefile.target | 10 - configure|7 - scripts/tracetool| 648 -- scripts/tracetool.py | 534

Re: [Qemu-devel] [RFC PATCH v5 00/14] Tracing Improvements, Simpletrace v2

2012-03-13 Thread Lluís Vilanova
Harsh Prateek Bora writes: > This patchset introduces 2 major updates: > 1) Tracetool Improvements (Conversion from shell script to python) > 2) Simpletrace v2 log format (Support for variable args, strings) > Existing simple trace can log upto 6 args per trace event and does not > support string

[Qemu-devel] [PATCH 07/12] trace: [tracetool] Process the "disable" event property

2012-03-13 Thread Lluís Vilanova
Use different converters (depending on the 'disabled' property) regardless of the output format. Signed-off-by: Lluís Vilanova Signed-off-by: Harsh Prateek Bora --- scripts/tracetool.py | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/tracetoo

[Qemu-devel] [PATCH 00/12] Rewrite tracetool using python

2012-03-13 Thread Lluís Vilanova
The first patch in the series (by Harsh Prateek) is a rewrite of the tracetool shell script in python, which is easier to handle given the current complexity of the script. The following patches (by Lluís Vilanova) add a series of random code cleanups and generalizations. Signed-off-by: Lluís Vil

[Qemu-devel] [PATCH 02/12] trace: [tracetool] Remove unused 'sizestr' attribute in 'Event'

2012-03-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py | 18 -- 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 079ec7a..26a4c43 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -89,23 +89,6 @@ def

Re: [Qemu-devel] [PULL] slirp: Final requeuing fix, small cleanups

2012-03-13 Thread Anthony Liguori
On 03/13/2012 10:18 AM, Jan Kiszka wrote: The following changes since commit cb72b75824c0362e5cb32eb8796930f29fa36d17: Merge remote-tracking branch 'mdroth/qga-pull-3-12-2012' into staging (2012-03-12 20:52:34 -0500) are available in the git repository at: git://git.kiszka.org/qemu.git

Re: [Qemu-devel] [PULL 00/14] usb patch queue

2012-03-13 Thread Anthony Liguori
On 03/13/2012 07:19 AM, Gerd Hoffmann wrote: Hi, This pull brings in the bug usb rename, i.e. move all usb emulation source code into hw/usb/. Also UHCI got some love, featuring some cleanups, some small fixes and full tracing support. Beside that it brings the usual bunch of little fixes h

Re: [Qemu-devel] [PATCH v4 0/3] Prepare QOM support for machines and CPU

2012-03-13 Thread Anthony Liguori
On 03/04/2012 02:32 PM, Andreas Färber wrote: Hello Anthony, This series prepares for QOM'ification of CPUs and machines by rearranging constructor calls and Makefile dependency rules. I've separated it out due to complaints about patch series length for conversion of all targets. Patch 1 is a

Re: [Qemu-devel] [PATCH v3 9/9] net: support to include ipv6 address by brackets

2012-03-13 Thread Michael Roth
On Wed, Mar 07, 2012 at 06:48:57AM +0800, Amos Kong wrote: > That method of representing an IPv6 address with a port is I'm not sure what "that" is referencing. I assumed the previous patch but the representation seems to be the same? > discouraged because of its ambiguity. Referencing to RFC5952

Re: [Qemu-devel] [PATCHv3 8/9] cleanup qemu_co_sendv(), qemu_co_recvv() and friends

2012-03-13 Thread Michael Tokarev
On 13.03.2012 22:01, Paolo Bonzini wrote: >>> ssize_t qemu_sendv_recvv(int sockfd, struct iovec *iov, >>> size_t offset, size_t bytes, bool do_sendv); > Hmm, since you are at it however, perhaps you could add an argument to > these functions and qemu_sendv_recvv for the

Re: [Qemu-devel] [PATCH v3 8/9] net: split hostname and service by last colon

2012-03-13 Thread Michael Roth
On Wed, Mar 07, 2012 at 06:48:48AM +0800, Amos Kong wrote: > IPv6 address contains colons, parse will be wrong. > > [2312::8274]:5200 > > Signed-off-by: Amos Kong > --- > net.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/net.c b/net.c > index 2518e5f..d6c

Re: [Qemu-devel] [RESEND PATCH] vmstate: fix varrays with uint32_t indexes

2012-03-13 Thread Juan Quintela
Andreas Färber wrote: > Am 13.03.2012 07:05, schrieb Amos Kong: >> VMSTATE_VARRAY_UINT32() is used in hw/ds1225y.c, and we checked >> VMS_VARRAY_UINT32 bit of field->flags in vmstate_load_state(), >> but we don't check this bit in vmstate_save_state(). > > So what were the symptoms? Does this need

Re: [Qemu-devel] [PATCH RESEND v5 2/6] Introduce "save_devices"

2012-03-13 Thread Luiz Capitulino
On Tue, 13 Mar 2012 11:51:56 + Stefano Stabellini wrote: > > Should be QAPI commands and documented a great deal more (see other > > examples in > > qapi-schema.json). Please CC Luiz too when adding new QMP commands. > > OK, I'll do. I reviewed the RunState patch but missed that one... B

Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations

2012-03-13 Thread Richard Laager
On Mon, 2012-03-12 at 10:34 +0100, Paolo Bonzini wrote: > To be completely correct, I suggest the following behavior: > > 1. Add a discard boolean option to the disk layer. > > 2. If discard is not specified: > > * For files, detect a true/false value by comparing > >

Re: [Qemu-devel] [PATCH 2/2] qdev: fix NULL deference

2012-03-13 Thread Andreas Färber
Am 13.03.2012 19:32, schrieb Mark Langsdorf: > From: Joshua Housh > > Make sure a BusInfo exists before trying to dereference it. What's the use case that breaks? Andreas > > Signed-off-by: Joshua Housh > Signed-off-by: Mark Langsdorf > --- > hw/qdev.c |9 ++--- > 1 files changed,

Re: [Qemu-devel] [PATCH 1/2] cleanup obsolete typedef

2012-03-13 Thread Peter Maydell
On 13 March 2012 18:28, Mark Langsdorf wrote: > From: Joshua Housh > > There are no users of i2c_slave. > > Signed-off-by: Joshua Housh > Signed-off-by: Mark Langsdorf Reviewed-by: Peter Maydell Looks like we missed this typedef in commit 9e07bdf8 which renamed i2c_slave to I2CSlave. (The ne

Re: [Qemu-devel] [PATCH v3 3/9] net: introduce tcp_client_start()

2012-03-13 Thread Michael Roth
On Wed, Mar 07, 2012 at 06:48:03AM +0800, Amos Kong wrote: > Introduce tcp_client_start() by moving original code in > tcp_start_outgoing_migration(). > > Signed-off-by: Amos Kong > --- > net.c | 41 + > qemu_socket.h |1 + > 2 files changed,

[Qemu-devel] [PATCH 2/2] qdev: fix NULL deference

2012-03-13 Thread Mark Langsdorf
From: Joshua Housh Make sure a BusInfo exists before trying to dereference it. Signed-off-by: Joshua Housh Signed-off-by: Mark Langsdorf --- hw/qdev.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index ee21d90..6c3d02f 100644 --- a/hw/

[Qemu-devel] [PATCH 1/2] cleanup obsolete typedef

2012-03-13 Thread Mark Langsdorf
From: Joshua Housh There are no users of i2c_slave. Signed-off-by: Joshua Housh Signed-off-by: Mark Langsdorf --- qemu-common.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/qemu-common.h b/qemu-common.h index b0fdf5c..c9e96a8 100644 --- a/qemu-common.h +++ b/qemu-c

Re: [Qemu-devel] [PATCHv3 1/9] refresh iov_* functions

2012-03-13 Thread Michael Tokarev
On 13.03.2012 21:44, Paolo Bonzini wrote: > Il 12/03/2012 20:14, Michael Tokarev ha scritto: >> +for (i = 0, done = 0; done < bytes && i < iov_cnt; i++) { >> +if (offset < iov[i].iov_len) { >> +size_t len = MIN(iov[i].iov_len - offset, bytes - done); >> +memcpy(i

[Qemu-devel] [PATCH v2 1/2] qxl: switch qxl.c to trace-events

2012-03-13 Thread Alon Levy
dprint is still used for qxl_init_common one time prints. also switched parts of spice-display.c over, mainly all the callbacks to spice server. All qxl device trace events start with the qxl device id. Signed-off-by: Alon Levy --- hw/qxl.c | 156 +---

Re: [Qemu-devel] [PATCH RFC v4 09/44] hw/mc146818: Drop unneeded #includes

2012-03-13 Thread Anthony Liguori
On 03/09/2012 08:27 PM, Andreas Färber wrote: pc.h and apic.h are not needed; apic.h would drag in x86 CPUState and is now included directly for TARGET_I386. isa.h is already #included from mc146818rtc.h. Reviewed-by: Anthony Liguori Regards, Anthony Liguori Signed-off-by: Andreas Färber

Re: [Qemu-devel] [PATCH RFC v4 44/44] qom: Introduce CPU class

2012-03-13 Thread Anthony Liguori
On 03/13/2012 07:20 AM, Paolo Bonzini wrote: Il 13/03/2012 13:13, Andreas Färber ha scritto: It will be easier to generalize later qdev code and not make special case when adding cpus. I never heard anyone wanting to generalize reset so far. I don't think it belongs into Object at least. Maybe

Re: [Qemu-devel] We need more reviewers/maintainers!!

2012-03-13 Thread Stefan Weil
Am 13.03.2012 17:31, schrieb Andreas Färber: Am 13.03.2012 11:41, schrieb Stefan Hajnoczi: On Mon, Mar 12, 2012 at 8:12 PM, Stefan Weil wrote: Am 12.03.2012 18:06, schrieb Stefano Stabellini: Maybe every maintainer can maintain a short summary of what he maintains, how (s)he does it (repositor

Re: [Qemu-devel] [PATCH RFC v4 02/20] target-arm: Introduce QOM ARMCPUClass

2012-03-13 Thread Peter Maydell
On 13 March 2012 17:58, Andreas Färber wrote: > Have you thought about how to QOM'ify your boards? Mid-term I'd like to > see an "exynos4210" object with the CPUs on it - maybe "cpu[0]" and > "cpu[1]" child properties? Or "core[x]"? I had played with the sh7750 a > bit on my branch but like the ar

Re: [Qemu-devel] [PATCH RFC v4 43/44] Rename CPUState -> CPUArchState

2012-03-13 Thread Anthony Liguori
On 03/13/2012 01:06 PM, Andreas Färber wrote: Am 10.03.2012 03:28, schrieb Andreas Färber: Signed-off-by: Andreas Färber --- FWIW this commit message is missing the sed command used for automatic conversion. It's in the cover letter, and I'll add it for v5/PULL if there is consensus to go ahea

Re: [Qemu-devel] [PATCH RFC v4 13/44] target-alpha: Don't overuse CPUState

2012-03-13 Thread Anthony Liguori
On 03/09/2012 08:27 PM, Andreas Färber wrote: Scripted conversion: sed -i "s/CPUState/CPUAlphaState/g" target-alpha/*.[hc] sed -i "s/#define CPUAlphaState/#define CPUState/" target-alpha/cpu.h Acked-by: Anthony Liguori For 13-42. I reviewed the target-i386 changes pretty closely and I'

Re: [Qemu-devel] [PATCH v2 4/5] console: pass Monitor to vga_hw_screen_dump/hw_vga_dump

2012-03-13 Thread Luiz Capitulino
On Tue, 13 Mar 2012 19:35:24 +0200 Alon Levy wrote: > On Tue, Mar 13, 2012 at 12:59:17PM -0300, Luiz Capitulino wrote: > > On Tue, 13 Mar 2012 16:46:12 +0200 > > Alon Levy wrote: > > > > > On Tue, Mar 13, 2012 at 10:35:55AM -0300, Luiz Capitulino wrote: > > > > On Sun, 11 Mar 2012 21:26:43 +020

[Qemu-devel] Man page: Add -global description

2012-03-13 Thread Miroslav Rezanina
There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example. Signed-off-by: Miroslav Rezanina Patch: -- diff --git a/qemu-options.hx b/qemu-options.hx index daefce3..56d8c78 100644 --- a/qemu-options.hx +++ b/qemu-options.hx

Re: [Qemu-devel] [PATCH RFC v4 02/20] target-arm: Introduce QOM ARMCPUClass

2012-03-13 Thread Eric Blake
On 03/13/2012 12:04 PM, Eric Blake wrote: > On 03/13/2012 11:58 AM, Andreas Färber wrote: > +static void cpu_register(const ARMCPUInfo *info) +{ +TypeInfo type = { +.name = info->name, > >>> >>> Are non-initialized members guaranteed to be zero here? >> >> I though

Re: [Qemu-devel] [PATCH RFC v4 10/44] linux-user: Don't overuse CPUState

2012-03-13 Thread Anthony Liguori
On 03/09/2012 08:27 PM, Andreas Färber wrote: In target-specific code use CPU*State. While at it, fix indentation on those lines. Signed-off-by: Andreas Färber Looks good, but make sure Riku agrees. Regards, Anthony Liguori --- linux-user/elfload.c | 24 +++--- linux-user/m68k/s

[Qemu-devel] [PATCH v2 2/2] qxl/qxl_render.c: add trace events

2012-03-13 Thread Alon Levy
Signed-off-by: Alon Levy --- hw/qxl-render.c | 13 - trace-events|6 ++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/qxl-render.c b/hw/qxl-render.c index 25857f6..74e7ea3 100644 --- a/hw/qxl-render.c +++ b/hw/qxl-render.c @@ -31,11 +31,10 @@ static

[Qemu-devel] [PATCH v2 0/2] qxl trace events

2012-03-13 Thread Alon Levy
This is split from the previous screendump change patchset, hence the v2. This is by no way complete but I think it is a good start, and frankly I'd like to stop here right now. Changes from v1: add qid prefix to all tracepoints (except vga update which makes no sense) rename to ring where sugg

Re: [Qemu-devel] [PATCH RFC v4 43/44] Rename CPUState -> CPUArchState

2012-03-13 Thread Andreas Färber
Am 10.03.2012 03:28, schrieb Andreas Färber: > Signed-off-by: Andreas Färber > --- FWIW this commit message is missing the sed command used for automatic conversion. It's in the cover letter, and I'll add it for v5/PULL if there is consensus to go ahead with "CPUState". Andreas -- SUSE LINUX P

Re: [Qemu-devel] [PATCH RFC v4 02/20] target-arm: Introduce QOM ARMCPUClass

2012-03-13 Thread Paolo Bonzini
Il 13/03/2012 18:58, Andreas Färber ha scritto: >> > Are non-initialized members guaranteed to be zero here? > I thought so for the C99-style struct initialization... Yes. > I never ran into > crashes while testing. Do we need static to be safe? No, I don't think so. It would raise other questi

Re: [Qemu-devel] [PATCH RFC v4 08/44] target-unicore32: Rename to CPUUniCore32State

2012-03-13 Thread Anthony Liguori
On 03/09/2012 08:27 PM, Andreas Färber wrote: This aids in refactoring CPUState by adopting the common naming scheme. Signed-off-by: Andreas Färber Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- target-unicore32/cpu.h |8 1 files changed, 4 insertions(+), 4 dele

Re: [Qemu-devel] [PATCH RFC v4 02/20] target-arm: Introduce QOM ARMCPUClass

2012-03-13 Thread Eric Blake
On 03/13/2012 11:58 AM, Andreas Färber wrote: >>> +static void cpu_register(const ARMCPUInfo *info) >>> +{ >>> +TypeInfo type = { >>> +.name = info->name, >> >> Are non-initialized members guaranteed to be zero here? > > I thought so for the C99-style struct initialization... I never

Re: [Qemu-devel] [PATCH RFC v4 05/44] target-lm32: Typedef struct CPULM32State

2012-03-13 Thread Anthony Liguori
On 03/09/2012 08:27 PM, Andreas Färber wrote: Signed-off-by: Andreas Färber Reviewed-by: Anthony Liguori For 5, 6, 7. I'd suggest folding this into a single patch. Regards, Anthony Liguori --- target-lm32/cpu.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/t

Re: [Qemu-devel] [PATCH RFC v4 04/44] monitor: Avoid CPUState in read/write functions

2012-03-13 Thread Anthony Liguori
On 03/09/2012 08:27 PM, Andreas Färber wrote: Signed-off-by: Andreas Färber Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- gdbstub.c | 56 1 files changed, 28 insertions(+), 28 deletions(-) diff --git a/gdbstub.c b/g

Re: [Qemu-devel] [PATCHv3 5/9] change qemu_iovec_to_buf() to match other to, from_buf functions

2012-03-13 Thread Paolo Bonzini
Il 12/03/2012 20:14, Michael Tokarev ha scritto: > It now allows specifying offset within qiov to start from and > amount of bytes to copy. Actual implementation is just a call > to iov_to_buf(). > > Signed-off-by: Michael Tokarev > --- > block.c |2 +- > block/iscsi.c |2 +- > bl

Re: [Qemu-devel] [PATCH RFC v4 03/44] monitor: Don't access registers through CPUState

2012-03-13 Thread Anthony Liguori
On 03/09/2012 08:27 PM, Andreas Färber wrote: Use CPUX86State etc. instead (hand-converted). Signed-off-by: Andreas Färber Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- monitor.c | 488 ++-- 1 files changed, 244 inser

Re: [Qemu-devel] [PATCH v4 02/44] Rename cpu_reset() to cpu_state_reset()

2012-03-13 Thread Anthony Liguori
On 03/09/2012 08:27 PM, Andreas Färber wrote: Frees the identifier cpu_reset for QOM CPUs (manual rename). Don't hide the parameter type behind explicit casts, use static functions with strongly typed argument to indirect. Signed-off-by: Andreas Färber Reviewed-by: Anthony Liguori Regards,

Re: [Qemu-devel] [PATCHv3 4/9] consolidate qemu_iovec_copy() and qemu_iovec_concat() and make them consistent

2012-03-13 Thread Paolo Bonzini
Il 12/03/2012 20:14, Michael Tokarev ha scritto: > qemu_iovec_concat() is currently a wrapper for > qemu_iovec_copy(), use the former (with extra > "0" arg) in a few places where it is used. > > Change skip argument of qemu_iovec_copy() from > uint64_t to size_t, since size of qiov itself > is siz

Re: [Qemu-devel] [PATCHv3 8/9] cleanup qemu_co_sendv(), qemu_co_recvv() and friends

2012-03-13 Thread Paolo Bonzini
Il 13/03/2012 18:52, Paolo Bonzini ha scritto: > Il 12/03/2012 20:14, Michael Tokarev ha scritto: >> The same as for non-coroutine versions in previous >> patches: rename arguments to be more obvious, change >> type of arguments from int to size_t where appropriate, >> and use common code for send

Re: [Qemu-devel] [PATCH RFC v4 02/20] target-arm: Introduce QOM ARMCPUClass

2012-03-13 Thread Andreas Färber
Am 13.03.2012 13:31, schrieb Igor Mitsyanko: > On 03/10/2012 08:53 PM, Andreas Färber wrote: >> diff --git a/target-arm/cpu.c b/target-arm/cpu.c >> new file mode 100644 >> index 000..dabc094 >> --- /dev/null >> +++ b/target-arm/cpu.c [...] >> +static void cpu_register(const ARMCPUInfo *info) >>

Re: [Qemu-devel] [PATCHv3 8/9] cleanup qemu_co_sendv(), qemu_co_recvv() and friends

2012-03-13 Thread Paolo Bonzini
Il 12/03/2012 20:14, Michael Tokarev ha scritto: > The same as for non-coroutine versions in previous > patches: rename arguments to be more obvious, change > type of arguments from int to size_t where appropriate, > and use common code for send and receive paths (with > one extra argument) since t

  1   2   3   4   >