[Qemu-devel] [PATCH 1/3] virtio_balloon: Remove unnecessarily persistent state

2012-04-11 Thread David Gibson
The main virtio_balloon state structure contains the fields num_pfns and array 'pfns'. Although they are stored here persistently, the lifetime of useful data in there is never more than one function - they're essentially used as though they were local variables. For the pfns buffer, used to comm

[Qemu-devel] [PATCH 3/3] virtio_balloon: Bugfixes for PAGE_SIZE != 4k

2012-04-11 Thread David Gibson
The virtio_balloon device is specced to always operate on 4k pages. The virtio_balloon driver has a feeble attempt at reconciling this with a lerge kernel page size, but it is (a) exactly wrong (it shifts the pfn in the wrong direction) and (b) insufficient (it doesn't issue multiple 4k balloon re

[Qemu-devel] [PATCH 2/3] virtio_balloon: Fix endian bug

2012-04-11 Thread David Gibson
Although virtio config space fields are usually in guest-native endian, the spec for the virtio balloon device explicitly states that both fields in its config space are little-endian. However, the current virtio_balloon driver does not have a suitable endian swap for the 'num_pages' field, althou

[Qemu-devel] [PATCH 0/3] Bugfixes for virtio balloon driver

2012-04-11 Thread David Gibson
This series contains one cleanup and two bug fixes for the virtio balloon driver.

Re: [Qemu-devel] Build broken -- linux-user: take RESERVED_VA into account for g2h_valid()

2012-04-11 Thread Stefan Weil
Am 11.04.2012 22:55, schrieb Peter Maydell: On 11 April 2012 20:23, Brad Smith wrote: The following commit broke the build.. linux-user: take RESERVED_VA into account for g2h_valid() Whoops. bsd-user is a bit unloved, I'm afraid. Can you try the following one-line fix? If it works then I'll

Re: [Qemu-devel] [PATCH v2 2/3] target-microblaze: QOM'ify CPU reset

2012-04-11 Thread Peter Crosthwaite
On Thu, Apr 12, 2012 at 11:25 AM, Andreas Färber wrote: > Hello John, > > Am 12.04.2012 03:14, schrieb John Williams: >> 2012/4/12 Andreas Färber : >>> Move code from cpu_state_reset() to QOM mb_cpu_reset(). >>> >>> Signed-off-by: Andreas Färber >>> --- >>>  target-microblaze/cpu.c       |   50

[Qemu-devel] [PATCH] target-microblaze: added PetaLogix copyright

2012-04-11 Thread Peter A. G. Crosthwaite
Microblaze cpu development has been driven and funded by PetaLogix. Added (c) PetaLogix line accordingly. Signed-off-by: Peter A. G. Crosthwaite --- target-microblaze/helper.c|1 + target-microblaze/mmu.c |1 + target-microblaze/op_helper.c |1 + target-microblaze/translate

Re: [Qemu-devel] [PATCH V9 1/1] Guest stop notification

2012-04-11 Thread Marcelo Tosatti
On Sat, Apr 07, 2012 at 06:17:47AM +0530, Raghavendra K T wrote: > From: Eric B Munson > > Often when a guest is stopped from the qemu console, it will report spurious > soft lockup warnings on resume. There are kernel patches being discussed that > will give the host the ability to tell the gue

Re: [Qemu-devel] [PATCH 2/2] hw/exynos4210.c: Use new IRQ Gate properties.

2012-04-11 Thread Evgeny Voevodin
On 11.04.2012 19:29, Peter Maydell wrote: On 11 April 2012 08:18, Evgeny Voevodin wrote: Signed-off-by: Evgeny Voevodin --- hw/exynos4210.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/exynos4210.c b/hw/exynos4210.c index f904370..088e96e 100644 --- a/hw/e

Re: [Qemu-devel] [PATCH 3/4] Switch from array based resource allocation to list

2012-04-11 Thread Alexey Korolev
On 12/04/12 15:15, Kevin O'Connor wrote: > > This was also me playing with one of Gerd's patches. It just makes > the bar read/write code 64bit aware. It doesn't actually program > them. The logic to do real 64bit allocations would require list > merging. Is this something you have looked at? R

Re: [Qemu-devel] [PATCH 1/2] hw/exynos4210_gic.c: Introduce n_in and n_out propeties.

2012-04-11 Thread Evgeny Voevodin
On 11.04.2012 19:17, Peter Maydell wrote: On 11 April 2012 08:48, Evgeny Voevodin wrote: With these properties irq gate could be tuned to mux up to QDEV_MAX_IRQ inputs and ouputs. Gate will group inputs into groups of size n_in/n_out each. Signed-off-by: Evgeny Voevodin --- hw/exynos4210_gic

Re: [Qemu-devel] [PATCH 3/4] Switch from array based resource allocation to list

2012-04-11 Thread Alexey Korolev
On 04/04/12 15:31, Kevin O'Connor wrote: > Agreed - the only thing it does is force a minimum size for memory bars as > you pointed out in a previous email. As above, I did play with > this a little more on Sunday. I also added in two patches from Gerd's series > and made alignment handling more

Re: [Qemu-devel] [PATCH 3/4] Switch from array based resource allocation to list

2012-04-11 Thread Kevin O'Connor
On Thu, Apr 12, 2012 at 02:44:54PM +1200, Alexey Korolev wrote: > On 04/04/12 15:31, Kevin O'Connor wrote: > > Agreed - the only thing it does is force a minimum size for memory bars as > > you pointed out in a previous email. As above, I did play with > > this a little more on Sunday. I also adde

[Qemu-devel] [PATCH 2/5] pseries: Remove old hcalls hook stub

2012-04-11 Thread David Gibson
Some time ago we removed all use of the 'hcalls' callback in the pseries VIO code, which was used to workaround an ordering problem which has since been solved properly. However, the function pointer for the hook remains. This patch cleans it away. Signed-off-by: David Gibson --- hw/spapr_vio.h

[Qemu-devel] [PATCH 0/5] pseries: cleanups and reset fixes

2012-04-11 Thread David Gibson
This series contains a couple of cleanups of old dead code, and several fixes for reset of pseries VIO devices. Please apply.

[Qemu-devel] [PATCH 4/5] pseries: Reset vscsi properly

2012-04-11 Thread David Gibson
Currently the PAPR vscsi implementation does not properly clear its table of request tags when the system is reset. This patch adds a reset hook to do so. Signed-off-by: David Gibson --- hw/spapr_vscsi.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/spapr_vs

[Qemu-devel] [PATCH 3/5] pseries: Correctly use the device model reset hooks

2012-04-11 Thread David Gibson
Recently we added code to properly clean away VIO CRQs on reset However, this directly uses qemu_register, rather than the existing device model reset callbacks. This patch cleans this up by adding proper use of the reset hook to the VIO bus model. The existing CRQ reset code is converted to the

[Qemu-devel] [PATCH 5/5] pseries: Fix reset of VIO network device

2012-04-11 Thread David Gibson
Currently, the PAPR VIO network device does not have a reset handler. This means that after a hard reset, H_REGISTER_LOGICAL_LAN will return an error when the new guest boot attempts to initialize the device. This patch corrects this, adding a suitable reset hook. Signed-off-by: David Gibson --

[Qemu-devel] [PATCH 1/5] pseries: Remove old debug leftovers from spapr_vscsi

2012-04-11 Thread David Gibson
The PAPR VSCSI emulation contains a few lines of code which were once used for debug but now do nothing at all. This patch removes them. Signed-off-by: David Gibson --- hw/spapr_vscsi.c |6 -- 1 file changed, 6 deletions(-) diff --git a/hw/spapr_vscsi.c b/hw/spapr_vscsi.c index de2ba68

Re: [Qemu-devel] [PATCH v2 0/3] QOM'ify MicroBlaze CPU

2012-04-11 Thread Peter Crosthwaite
On Thu, Apr 12, 2012 at 11:08 AM, Andreas Färber wrote: > Hello Edgar, > > This series splits my MicroBlaze QOM'ification patch from the > qom-cpu-others.v1 > RFC series into multiple steps. > > I tested it using the mb-s3adsp1800 test image. > Works fine with ml605 as well. Tested-by: Peter A.

[Qemu-devel] [PATCH v2 1/3] target-microblaze: QOM'ify CPU

2012-04-11 Thread Andreas Färber
Embed CPUMBState as first member of QOM MicroBlazeCPU. Signed-off-by: Andreas Färber --- Makefile.target |1 + target-microblaze/cpu-qom.h | 71 + target-microblaze/cpu.c | 59 ++ target-microbl

[Qemu-devel] [PATCH v2 3/3] target-microblaze: QOM'ify CPU init

2012-04-11 Thread Andreas Färber
Move code from cpu_mb_init() to a QOM initfn. Signed-off-by: Andreas Färber --- target-microblaze/cpu.c | 12 target-microblaze/translate.c |3 --- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c index 194

Re: [Qemu-devel] [PATCH v2 2/3] target-microblaze: QOM'ify CPU reset

2012-04-11 Thread Andreas Färber
Hello John, Am 12.04.2012 03:14, schrieb John Williams: > 2012/4/12 Andreas Färber : >> Move code from cpu_state_reset() to QOM mb_cpu_reset(). >> >> Signed-off-by: Andreas Färber >> --- >> target-microblaze/cpu.c | 50 >> +++- >> target-microblaze/tr

Re: [Qemu-devel] [PATCH v2 2/3] target-microblaze: QOM'ify CPU reset

2012-04-11 Thread John Williams
2012/4/12 Andreas Färber : > Move code from cpu_state_reset() to QOM mb_cpu_reset(). > > Signed-off-by: Andreas Färber > --- >  target-microblaze/cpu.c       |   50 +++- >  target-microblaze/translate.c |   51 +--- >  2 files

[Qemu-devel] [PATCH v2 2/3] target-microblaze: QOM'ify CPU reset

2012-04-11 Thread Andreas Färber
Move code from cpu_state_reset() to QOM mb_cpu_reset(). Signed-off-by: Andreas Färber --- target-microblaze/cpu.c | 50 +++- target-microblaze/translate.c | 51 +--- 2 files changed, 51 insertions(+), 50 deletions(

[Qemu-devel] [PATCH v2 0/3] QOM'ify MicroBlaze CPU

2012-04-11 Thread Andreas Färber
Hello Edgar, This series splits my MicroBlaze QOM'ification patch from the qom-cpu-others.v1 RFC series into multiple steps. I tested it using the mb-s3adsp1800 test image. There were no comments previously. Please review and, if satisfied, apply. Depends on LM32 QOM'ification (for which there's

[Qemu-devel] [PATCH v2 13/14] cmdline: convert -smbios and -uuid to QemuOpts

2012-04-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- arch_init.c | 37 +++--- arch_init.h |1 - hw/smbios.c | 155 +++- hw/smbios.h |4 +- qemu-config.c | 13 + vl.c | 39 --- 6 files changed, 185 insertions(+

[Qemu-devel] [PATCH v2 09/24] qdev: do not propagate properties to subclasses

2012-04-11 Thread Paolo Bonzini
As soon as we'll look up properties along the inheritance chain, we will have duplicates if class A defines some properties and its subclass B does not define any, because class_b->props will be left equal to class_a->props. The solution here is to reintroduce the class_base_init TypeInfo callback

[Qemu-devel] [PATCH v3 1/3] target-lm32: QOM'ify CPU

2012-04-11 Thread Andreas Färber
Embed CPULM32State as first member of QOM LM32CPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber Acked-by: Michael Walle --- Makefile.target |1 + target-lm32/cpu-qom.h | 71 + target-lm32/cpu.c

[Qemu-devel] [PATCH v2 10/24] qdev: move bus properties to abstract superclasses

2012-04-11 Thread Paolo Bonzini
In qdev, each bus in practice identified an abstract superclass, but this was mostly hidden. In QOM, instead, these abstract classes are explicit so we can move bus properties there. All bus property walks are removed, and all device property walks are changed to look along the class hierarchy in

[Qemu-devel] [PATCH v2 18/24] qdev: push state up to Object

2012-04-11 Thread Paolo Bonzini
qdev properties use the state member (an embryo of the "realized" property) in order to disable setting them after a device has been initialized. So, in order to push qdev properties up to Object we need to push this bit there too. Signed-off-by: Paolo Bonzini --- hw/qdev-addr.c|3 +

[Qemu-devel] [PATCH v2 14/14] QemuOpts: correctly skip escaped , id=

2012-04-11 Thread Paolo Bonzini
QemuOpts would parse incorrectly something that included ",,id=" (with an escaped comma) in a parameter value. Fix this by using get_param_value. Signed-off-by: Paolo Bonzini --- qemu-option.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/qemu-option.c b/qemu-op

[Qemu-devel] [PATCH v2 15/24] qdev: switch property accessors to fixed-width visitor interfaces

2012-04-11 Thread Paolo Bonzini
From: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Paolo Bonzini --- hw/qdev-addr.c |4 +- hw/qdev-properties.c | 140 ++ 2 files changed, 87 insertions(+), 57 deletions(-) diff --git a/hw/qdev-addr.c b/hw/qdev-addr.c index

[Qemu-devel] [PATCH v2 09/14] cmdline: convert -smp to QemuOpts

2012-04-11 Thread Paolo Bonzini
This introduces a new option group, but it is mostly trivial. Signed-off-by: Paolo Bonzini --- qemu-config.c | 31 + vl.c | 61 +--- 2 files changed, 58 insertions(+), 34 deletions(-) diff --git a/qemu-

[Qemu-devel] [PATCH v2 23/24] qdev: implement qdev_init on top of realize

2012-04-11 Thread Paolo Bonzini
Finally, switch the qdev_init function to simply set the "realized" property to true. The old contents of qdev_init become the realize and realize_children methods. Signed-off-by: Paolo Bonzini --- hw/qdev.c | 36 ++-- 1 file changed, 30 insertions(+), 6 deleti

[Qemu-devel] [PATCH v2 10/14] cmdline: reindent numa_add

2012-04-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- vl.c | 72 +- 1 files changed, 36 insertions(+), 36 deletions(-) diff --git a/vl.c b/vl.c index b592ea7..9e4cf77 100644 --- a/vl.c +++ b/vl.c @@ -943,49 +943,49 @@ static void numa_add(const char *

[Qemu-devel] [PATCH v2 04/14] cmdline: implement -bios with QemuOpts

2012-04-11 Thread Paolo Bonzini
This becomes -machine bios. Signed-off-by: Paolo Bonzini --- qemu-config.c |4 vl.c |4 +++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 3a313de..89706df 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -563,6 +563,10

[Qemu-devel] [PATCH v2 06/14] cmdline: make -M a simple alias for -machine type

2012-04-11 Thread Paolo Bonzini
machine_parse is still being called from the -M handler. Remove this, and just call machine_parse based on the "-machine type" value. Signed-off-by: Paolo Bonzini --- vl.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/vl.c b/vl.c index 7f53

[Qemu-devel] [PATCH v2 12/24] qdev: remove qdev_prop_set_defaults

2012-04-11 Thread Paolo Bonzini
Fold its functionality in qdev_property_add_static. Signed-off-by: Paolo Bonzini --- hw/qdev-properties.c | 22 -- hw/qdev.c| 26 +++--- hw/qdev.h|1 - 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/hw/qdev

[Qemu-devel] [PATCH v2 07/14] cmdline: accept NULL opts in qemu_opt_find

2012-04-11 Thread Paolo Bonzini
This simplifies the code in cases where we process the options without qemu_opts_foreach. One example is -machine, the next patch will rely on this. Signed-off-by: Paolo Bonzini --- qemu-option.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-op

[Qemu-devel] [PATCH v3 3/3] target-lm32: QOM'ify CPU reset

2012-04-11 Thread Andreas Färber
Move code from cpu_state_reset() into QOM lm32_cpu_reset(). Signed-off-by: Andreas Färber Acked-by: Michael Walle --- target-lm32/cpu.c| 10 +- target-lm32/helper.c | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/target-lm32/cpu.c b/target-lm32/

[Qemu-devel] [PATCH v3 2/3] target-lm32: QOM'ify CPU init

2012-04-11 Thread Andreas Färber
Move code from cpu_lm32_init() to an initfn; call cpu_reset() instead of cpu_state_reset(). Signed-off-by: Andreas Färber Acked-by: Michael Walle --- target-lm32/cpu.c| 13 + target-lm32/helper.c |3 --- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/targe

[Qemu-devel] [PULL] QOM CPUState for lm32

2012-04-11 Thread Andreas Färber
Hello Anthony, Blue or Edgar, Please pull the lm32 QOM CPU conversion. Cc: Anthony Liguori Cc: Blue Swirl Cc: Edgar E. Iglesias Cc: Michael Walle The following changes since commit c1958aea51a14199d05d392edce932a956e1674d: target-i386: QOM'ify CPU reset (2012-04-10 17:10:27 +0200) are a

[Qemu-devel] [PATCH v2 11/24] qdev: clean up global properties

2012-04-11 Thread Paolo Bonzini
Now that global properties do not depend on buses anymore, set them directly in the device instance_init function. Signed-off-by: Paolo Bonzini --- hw/qdev-monitor.c |1 - hw/qdev.c |2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-m

Re: [Qemu-devel] Build broken -- linux-user: take RESERVED_VA into account for g2h_valid()

2012-04-11 Thread Brad Smith
On 11/04/12 4:55 PM, Peter Maydell wrote: On 11 April 2012 20:23, Brad Smith wrote: The following commit broke the build.. linux-user: take RESERVED_VA into account for g2h_valid() Whoops. bsd-user is a bit unloved, I'm afraid. Can you try the following one-line fix? If it works then I'll su

[Qemu-devel] [PATCH v2 02/14] cmdline: implement -m with QemuOpts

2012-04-11 Thread Paolo Bonzini
This becomes -machine ram_size. Signed-off-by: Paolo Bonzini --- qemu-config.c |4 vl.c | 41 - 2 files changed, 16 insertions(+), 29 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index be84a03..6569acd 100644 --- a/qemu-conf

[Qemu-devel] [PATCH v2 14/24] qdev: use int32_t container for devfn property

2012-04-11 Thread Paolo Bonzini
From: Michael Roth Valid range for devfn is -1 to 255 (-1 for automatic assignment). We do not currently validate this due to devfn being stored as a uint32_t. This can lead to segfaults and other strange behavior. We could technically just cast it to int32_t to implement the checking, but this

[Qemu-devel] [PATCH v2 13/24] qapi: add Visitor interfaces for uint*_t and int*_t

2012-04-11 Thread Paolo Bonzini
From: Michael Roth This adds visitor interfaces for fixed-width integers types. Implementing these in visitors is optional, otherwise we fall back to visit_type_int() (int64_t) with some additional bounds checking to avoid integer overflows for cases where the value fetched exceeds the bounds of

[Qemu-devel] [PATCH v2 06/24] qdev: fix -device foo,?

2012-04-11 Thread Paolo Bonzini
Since most property types do not have a parse property now, this was broken. Fix it by looking at the setter instead. Signed-off-by: Paolo Bonzini --- hw/qdev-monitor.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 4783366

[Qemu-devel] [PATCH v2 08/14] cmdline: implement -nodefaults with qemuopts

2012-04-11 Thread Paolo Bonzini
This becomes -machine default_devices. Signed-off-by: Paolo Bonzini --- qemu-config.c |4 vl.c | 41 +++-- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 8f0923e..23d6b03 100644 --- a/qe

[Qemu-devel] [PATCH v2 11/14] cmdline: convert -numa to QemuOpts

2012-04-11 Thread Paolo Bonzini
This requires some special casing to skip the fake "node" option and to handle the automatic "-numa node" syntax. Besides this, the option parsing maps easily to QemuOpts. Signed-off-by: Paolo Bonzini --- qemu-config.c | 22 ++ vl.c | 50

[Qemu-devel] [PATCH v2 1/3] target-cris: QOM'ify CPU

2012-04-11 Thread Andreas Färber
Embed CPUCRISState as first member of QOM CRISCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber --- Makefile.target |1 + target-cris/cpu-qom.h | 71 +++ target-cris/cpu.c | 60 +++

[Qemu-devel] [PATCH v2 3/3] target-cris: Start QOM'ifying CPU init

2012-04-11 Thread Andreas Färber
Move VR-independent code from cpu_cris_init() into an initfn. Signed-off-by: Andreas Färber --- target-cris/cpu.c |9 + target-cris/translate.c |2 +- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/target-cris/cpu.c b/target-cris/cpu.c index 1355044..44bf45

[Qemu-devel] [PATCH v2 2/3] target-cris: QOM'ify CPU reset

2012-04-11 Thread Andreas Färber
Move code from cpu_state_reset() into QOM cris_cpu_reset(). Let CPU init call cpu_reset(). Signed-off-by: Andreas Färber --- target-cris/cpu.c | 23 ++- target-cris/translate.c | 22 ++ 2 files changed, 24 insertions(+), 21 deletions(-) diff --g

[Qemu-devel] [PATCH v2 0/3] QOM'ify CRIS CPU

2012-04-11 Thread Andreas Färber
Hello Edgar, This series strips down my CRIS QOM'ification patch from the qom-cpu-others.v1 RFC series and splits it into multiple steps. I still think the code is calling for subclasses for crisv8 etc. but, given the timing, my priority is establishing a self-contained QOM CPUState for all target

[Qemu-devel] [PATCH v2 07/24] qdev: use object_property_print in info qtree

2012-04-11 Thread Paolo Bonzini
Otherwise, non-string properties without a legacy counterpart are missed. Also fix error propagation in object_property_print itself. Signed-off-by: Paolo Bonzini --- hw/qdev-monitor.c |2 +- qom/object.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-

[Qemu-devel] [PATCH v2 19/24] qdev: generalize properties to Objects

2012-04-11 Thread Paolo Bonzini
The property machinery uses DeviceState arguments in a few places. Replace this with Object so that we can push properties up. Signed-off-by: Paolo Bonzini --- hw/qdev-addr.c | 19 +++--- hw/qdev-properties.c | 173 +- hw/qdev.c

[Qemu-devel] [PATCH v2 17/24] qdev: remove qdev_prop_exists

2012-04-11 Thread Paolo Bonzini
Can be replaced everywhere with object_property_find. Signed-off-by: Paolo Bonzini --- hw/qdev-properties.c |5 - hw/qdev.c |2 +- hw/qdev.h |1 - hw/scsi-bus.c |2 +- include/qemu/object.h |9 + qom/object.c |2 +- 6

[Qemu-devel] [PATCH v2 03/24] qom: add class_base_init

2012-04-11 Thread Paolo Bonzini
The class_base_init TypeInfo callback was present in one of the early QOM versions but removed (on my request...) before committing. We will need it soon, add it. Signed-off-by: Paolo Bonzini --- include/qemu/object.h | 10 -- qom/object.c |9 + 2 files changed, 1

Re: [Qemu-devel] [PATCH v2 0/3] QOM'ify Xtensa CPU

2012-04-11 Thread Max Filippov
Hello Max, This series strips down my Xtensa QOM'ification patch from the qom-cpu-others.v1 RFC series, avoiding the XtensaConfig vs. subclass problem and taking care not to introduce "klass", including in the header file. I've tested this with the dc232b semihosting test image. Please review a

[Qemu-devel] [PATCH v2 03/14] cmdline: implement -S with QemuOpts

2012-04-11 Thread Paolo Bonzini
This becomes -machine autostart. Signed-off-by: Paolo Bonzini --- qemu-config.c |4 vl.c |3 ++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 6569acd..3a313de 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -559,6 +559

[Qemu-devel] [PATCH v2 08/24] qdev: move bus properties to a separate global

2012-04-11 Thread Paolo Bonzini
Simple code movement in order to simplify future refactoring. Signed-off-by: Paolo Bonzini --- hw/i2c.c | 10 ++ hw/ide/qdev.c | 10 ++ hw/intel-hda.c| 10 ++ hw/pci.c | 22 -

[Qemu-devel] [PATCH v2 05/14] cmdline: implement -localtime with QemuOpts

2012-04-11 Thread Paolo Bonzini
The -localtime option already has a QemuOpts equivalent. Setting the merge_lists option on the -rtc list makes it simple to use it. This includes a small change in behavior for -rtc. For example, "-rtc base=localtime -rtc driftfix=slew" will actually combine the option rather than override them.

[Qemu-devel] [PATCH v2 01/14] QemuOpts: use strtosz

2012-04-11 Thread Paolo Bonzini
This will simplify conversion of -numa node,mem=... and -m to QemuOpts. Signed-off-by: Paolo Bonzini --- qemu-option.c | 41 ++--- 1 files changed, 10 insertions(+), 31 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 35cd609..55cbee8 100644 --

[Qemu-devel] [PATCH v2 22/24] qom: add realized property

2012-04-11 Thread Paolo Bonzini
Since we had to move the state field from DeviceState to Object, we cannot delay the implementation of the "realized" property. The property is a trigger for two actions that propagate through the composition tree. "Realize" is called when the property becomes true, and propagates in pre-order; re

[Qemu-devel] [PATCH v2 16/24] qdev: remove PropertyInfo range checking

2012-04-11 Thread Paolo Bonzini
Range checking in PropertyInfo is now used only for pci_devfn properties. Move it there, and remove all code that implements it in the various property types. Signed-off-by: Paolo Bonzini --- hw/qdev-properties.c | 102 -- hw/qdev.h|

[Qemu-devel] [PATCH v2 05/24] qdev: push "type" property up to Object

2012-04-11 Thread Paolo Bonzini
Now that Object is a type, add an instance_init function and push the "type" property from qdev to there. Signed-off-by: Paolo Bonzini --- hw/qdev.c|6 -- qom/object.c | 11 +++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 0d3c

Re: [Qemu-devel] [PATCH v2 0/3] QOM'ify Xtensa CPU

2012-04-11 Thread Max Filippov
>> This series strips down my Xtensa QOM'ification patch from the >> qom-cpu-others.v1 >> RFC series, avoiding the XtensaConfig vs. subclass problem and taking care >> not to introduce "klass", including in the header file. >> >> I've tested this with the dc232b semihosting test image. > > BTW, is

Re: [Qemu-devel] [PATCH 2/2] Xen: Add xen-apic support and hook it up.

2012-04-11 Thread Paolo Bonzini
Il 11/04/2012 18:17, Stefano Stabellini ha scritto: >> > Really 2-only, not 2-or-later ? > I am not a great fun of the 2-or-later clause and it doesn't look like a > requirement from the QEMU project POV. However if it is, I'll change it > to 2-or-later. OT fun fact: did you know that MPL comes wi

Re: [Qemu-devel] [PATCH v2 0/3] QOM'ify LM32 CPU

2012-04-11 Thread Michael Walle
> Andreas Färber (3): > target-lm32: QOM'ify CPU > target-lm32: QOM'ify CPU init > target-lm32: QOM'ify CPU reset Acked-by: Michael Walle -- michael

[Qemu-devel] [PATCH v2 12/14] cmdline: convert -acpitable to QemuOpts

2012-04-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- arch_init.c | 11 ++ arch_init.h |1 - hw/acpi.c | 96 +++-- hw/pc.h |2 +- qemu-config.c | 54 vl.c |9 +- 6 files changed, 106 i

[Qemu-devel] [PATCH v2 00/14] convert many options to QemuOpts

2012-04-11 Thread Paolo Bonzini
This series convert most commonly-used legacy command-line options to be simple wrappers for the QemuOpts equivalents. This ensures that they are printed out by -writeconfig, thus actually making -writeconfig useful... This converts a lot of commonly-used options to QemuOpts. Most of them get in

[Qemu-devel] [PATCH v2 24/24] qdev: split part of device_finalize to device_unrealize

2012-04-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/qdev.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 8641d29..d4b20f7 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -601,27 +601,31 @@ static void device_initfn(Object *obj)

[Qemu-devel] [PATCH v2 20/24] qdev: move bulk of qdev-properties.c to qom/object.c

2012-04-11 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/qdev-properties.c | 476 - hw/qdev.c | 47 + hw/qdev.h | 87 - include/qemu/object.h | 98 ++ qom/object.c | 459 ++

[Qemu-devel] [PATCH v2 04/24] qom: make Object a type

2012-04-11 Thread Paolo Bonzini
Right now the base Object class has a special NULL type. Change this so that we will be able to add class_init and class_base_init callbacks. To do this, remove some special casing of ObjectClass that is not really necessary. Signed-off-by: Paolo Bonzini --- include/qemu/object.h |2 +- qom

[Qemu-devel] [PATCH v2 02/24] qom: add object_child_foreach

2012-04-11 Thread Paolo Bonzini
A utility function that will be used to implement hierarchical realization. Signed-off-by: Paolo Bonzini --- include/qemu/object.h | 14 +- qom/object.c | 17 + 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/include/qemu/object.h b/include

[Qemu-devel] [PATCH v2 01/24] qom: add object_class_get_parent

2012-04-11 Thread Paolo Bonzini
This simple bit of functionality was missing and we'll need it soon, so add it. Signed-off-by: Paolo Bonzini --- include/qemu/object.h | 14 ++ qom/object.c | 13 + 2 files changed, 27 insertions(+) diff --git a/include/qemu/object.h b/include/qemu/object.h

[Qemu-devel] [PATCH 00/24] qdev properties final installment: push, push!

2012-04-11 Thread Paolo Bonzini
This is the final installment of the qdev property cleanup. It includes the following parts: * various bits of state are moved from DeviceState to Object: state (aka realized), reset, static properties, and the simple "type" property * bus properties are replaced with superclass properties

Re: [Qemu-devel] Question about the block linking limitation

2012-04-11 Thread Max Filippov
On Thu, Apr 12, 2012 at 1:04 AM, Peter Maydell wrote: > On 11 April 2012 22:00, Max Filippov wrote: >> 陳韋任 : >>>  Doesn't a tb spanning guest pages have above problem? I mean what if the >>> guest page 2 is changed? In this case, the execution flow jump from tb.a to >>> tb.b. It seems it may have

Re: [Qemu-devel] Ignoring errno makes QMP errors suck

2012-04-11 Thread Paolo Bonzini
Il 26/03/2012 18:01, Anthony Liguori ha scritto: > On 03/26/2012 10:59 AM, Kevin Wolf wrote: >> Am 26.03.2012 17:38, schrieb Anthony Liguori: >>> You can add parameters to Errors in a fully compatible fashion, so >>> just add an >>> filename parameter to PermissionDenied. Problem solved. >> >> So

Re: [Qemu-devel] Question about the block linking limitation

2012-04-11 Thread Peter Maydell
On 11 April 2012 22:00, Max Filippov wrote: > 陳韋任 : >>  Doesn't a tb spanning guest pages have above problem? I mean what if the >> guest page 2 is changed? In this case, the execution flow jump from tb.a to >> tb.b. It seems it may have the same problem as above to me. > > I agree. I see that onl

Re: [Qemu-devel] Question about the block linking limitation

2012-04-11 Thread Max Filippov
>> s->pc is updated each time a byte of code is fetched, when an instruction >> is fully decoded s->pc points to the first byte of the next instruction. I >> see >> that it only makes difference when a branching instruction ends exactly at >> a page boundary. In this case (s->pc - 1) prevents from

Re: [Qemu-devel] Build broken -- linux-user: take RESERVED_VA into account for g2h_valid()

2012-04-11 Thread Peter Maydell
On 11 April 2012 20:23, Brad Smith wrote: > The following commit broke the build.. > > linux-user: take RESERVED_VA into account for g2h_valid() Whoops. bsd-user is a bit unloved, I'm afraid. Can you try the following one-line fix? If it works then I'll submit it to the mailing list as a proper p

Re: [Qemu-devel] [PATCH v3 1/2] realview: break out the i2c controller code

2012-04-11 Thread Paul Brook
> +++ b/hw/versatile_i2c.c > @@ -0,0 +1,102 @@ > +/* > + * Versatile I2C controller I'd go for "ARM Versatile I2C controller". I wish companies wouldn't pick generic terms as product names :-( That's not your fault though! > + * > + * Copyright (C) 2012 Oskar Andero AFAICS You've copy/pasted

Re: [Qemu-devel] [PATCH v3] use an uint64_t for the max_sz parameter in load_image_targphys

2012-04-11 Thread Mark Langsdorf
On 03/12/2012 11:47 AM, Andreas Färber wrote: > Am 12.03.2012 17:33, schrieb Mark Langsdorf: >> Allow load_image_targphys to load files on systems with more than 2G of >> emulated memory by changing the max_sz parameter from an int to an >> uint64_t. >> >> Signed-off-by: Mark Langsdorf > > A very

Re: [Qemu-devel] [PATCH 7/7 v5] VMXNET3 paravirtualized device implementation Interface type "vmxnet3" added.

2012-04-11 Thread Paolo Bonzini
Il 11/04/2012 21:10, Anthony Liguori ha scritto: > On 04/11/2012 02:08 PM, Paolo Bonzini wrote: >> Il 11/04/2012 19:25, Anthony Liguori ha scritto: Off the top of my head: issues with v5: polluting global namespace, must scope names appropriately with vmxnet_ VMXNET_ unless they

[Qemu-devel] USB CD/DVD Drives on QEMU

2012-04-11 Thread Erik Rull
Hi all, I still have troubles using USB CD or DVD drives in QEMU. They get detected and work very often on Linux Guests, but Windows XP Guests seem not to be able to detect the drive completely. Now my question to all: Do you have a USB CD or DVD drive already attached to a Windows XP QEMU gu

Re: [Qemu-devel] [PATCH 03/36] vmstate: unicore32 don't support cpu migration

2012-04-11 Thread Michael Roth
On Wed, Apr 11, 2012 at 12:09:57PM +0200, Juan Quintela wrote: > Michael Roth wrote: > > On Mon, Mar 19, 2012 at 11:57:31PM +0100, Juan Quintela wrote: > >> Signed-off-by: Juan Quintela > >> --- > >> target-unicore32/cpu.h |2 -- > >> 1 files changed, 0 insertions(+), 2 deletions(-) > >> >

Re: [Qemu-devel] [PATCH 3/3] pseries: Add DPRINTF macros to spapr pci code

2012-04-11 Thread Blue Swirl
On Thu, Apr 5, 2012 at 12:24, Andreas Färber wrote: > Am 04.04.2012 22:54, schrieb Peter Maydell: >> On 4 April 2012 21:34, Blue Swirl wrote: >>> On Wed, Apr 4, 2012 at 20:11, Peter Maydell >>> wrote: I'd much rather enable a #define to turn on debugging than faff about with tracing.

[Qemu-devel] [PATCH v9 10/10] Add XBZRLE statistics

2012-04-11 Thread Orit Wasserman
Signed-off-by: Orit Wasserman Signed-off-by: Benoit Hudzia Signed-off-by: Petter Svard Signed-off-by: Aidan Shribman --- arch_init.c | 68 ++ hmp.c| 13 ++ migration.c | 12 + migration.h |

[Qemu-devel] [PATCH v9 06/10] Add XBZRLE to ram_save_block and ram_save_live

2012-04-11 Thread Orit Wasserman
Add migration state to store XBRLE params (enablement and cache size). In the outgoing migration check to see if the page is cached and changed than send compressed page by using save_xbrle_page function. In the incoming migration check to see if RAM_SAVE_FLAG_XBRLE is set and decompress the page (

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/3] pseries: Add DPRINTF macros to spapr pci code

2012-04-11 Thread Blue Swirl
On Wed, Apr 11, 2012 at 02:02, David Gibson wrote: > On Wed, Apr 04, 2012 at 08:34:52PM +, Blue Swirl wrote: >> On Wed, Apr 4, 2012 at 20:11, Peter Maydell wrote: >> > On 4 April 2012 20:18, Blue Swirl wrote: >> >> On Mon, Apr 2, 2012 at 04:17, David Gibson >> >> wrote: >> >>> From: Alexey

[Qemu-devel] [PATCH v9 03/10] Add save_block_hdr function

2012-04-11 Thread Orit Wasserman
Signed-off-by: Orit Wasserman Signed-off-by: Benoit Hudzia Signed-off-by: Petter Svard Signed-off-by: Aidan Shribman --- arch_init.c | 26 ++ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/arch_init.c b/arch_init.c index 2e534f1..47b9fef 100644 --- a

Re: [Qemu-devel] [PATCH] Always set LC_ALL=C for makeinfo

2012-04-11 Thread Stefan Weil
Am 27.03.2012 19:15, schrieb Stefan Weil: Otherwise the generated file qemu-doc.html will contain "Anhang" instead of "Appendix" with a German locale (de_DE.UTF-8). Signed-off-by: Stefan Weil --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Mak

[Qemu-devel] Build broken -- linux-user: take RESERVED_VA into account for g2h_valid()

2012-04-11 Thread Brad Smith
The following commit broke the build.. linux-user: take RESERVED_VA into account for g2h_valid() When running with -R (RESERVED_VA > 0) all guest virtual addresses are within the [0..RESERVED_VA] range. Reflect this with g2h_valid() too so we can safely check for boundaries of our guest address

[Qemu-devel] [PATCH v9 04/10] Add host_from_stream_offset_versioned function

2012-04-11 Thread Orit Wasserman
Signed-off-by: Orit Wasserman Signed-off-by: Benoit Hudzia Signed-off-by: Petter Svard Signed-off-by: Aidan Shribman --- arch_init.c | 26 +++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index 47b9fef..f1690cf 100644 --- a/

[Qemu-devel] [PATCH v9 09/10] Add set_cachesize command

2012-04-11 Thread Orit Wasserman
Change XBZRLE cache size in bytes (the size should be a power of 2). If XBZRLE cache size is too small there will be many cache miss. Signed-off-by: Orit Wasserman Signed-off-by: Benoit Hudzia Signed-off-by: Petter Svard Signed-off-by: Aidan Shribman --- arch_init.c |5 + hmp-com

[Qemu-devel] [PATCH v9 08/10] Add migration capabilites

2012-04-11 Thread Orit Wasserman
Add migration capabiltes that can be queried by the management. The managment can query to source and the destination in order to verify both support some maigration capability (currently only XBZRLE). Signed-off-by: Orit Wasserman --- hmp.c| 18 ++ hmp.h

Re: [Qemu-devel] [PATCH 7/7 v5] VMXNET3 paravirtualized device implementation Interface type "vmxnet3" added.

2012-04-11 Thread Anthony Liguori
On 04/11/2012 02:08 PM, Paolo Bonzini wrote: Il 11/04/2012 19:25, Anthony Liguori ha scritto: Off the top of my head: issues with v5: polluting global namespace, must scope names appropriately with vmxnet_ VMXNET_ unless they have file scope. Don't use names with _ followed by an upper case let

Re: [Qemu-devel] [PATCH 7/7 v5] VMXNET3 paravirtualized device implementation Interface type "vmxnet3" added.

2012-04-11 Thread Paolo Bonzini
Il 11/04/2012 19:25, Anthony Liguori ha scritto: >> >> Off the top of my head: issues with v5: >> polluting global namespace, must scope names >> appropriately with vmxnet_ VMXNET_ unless they have file scope. >> Don't use names with _ followed by an upper case letter >> or that star with two under

  1   2   >