[Qemu-devel] [PATCH 11/22] qdev: remove baked in notion of aliases (v2)

2012-02-01 Thread Anthony Liguori
support it in device_add so restrict it to that piece of code. Signed-off-by: Anthony Liguori --- v1 -> v2 - Use a table for aliases (Paolo) --- hw/ide/ich.c |2 - hw/lsi53c895a.c |2 - hw/qdev.c| 93 ++--- hw/qde

Re: [Qemu-devel] [PATCH 00/23] qom: use Type system to register all devices

2012-02-01 Thread Anthony Liguori
On 02/01/2012 01:55 PM, Peter Maydell wrote: On 30 January 2012 21:16, Anthony Liguori wrote: Patch 8/23 is an automated touch everything patch. It's kind of awkward having a patch series that is both long (number of patches) and wide (patches that require touching/conversion of every d

[Qemu-devel] [PATCH 12/22] qom: add new command to search for types

2012-02-01 Thread Anthony Liguori
ockDevice and a NetworkDevice. Signed-off-by: Anthony Liguori --- qapi-schema.json | 33 + qerror.c |2 +- qmp-commands.hx |5 + qmp.c| 27 +++ 4 files changed, 66 insertions(+), 1 deletions(-) diff --git a/qapi-sch

[Qemu-devel] [PATCH 03/22] qdev: make DeviceInfo private

2012-02-01 Thread Anthony Liguori
Introduce accessors and remove any code that directly accesses DeviceInfo members. Signed-off-by: Anthony Liguori --- hw/pci.c | 13 - hw/qdev-properties.c |4 ++-- hw/qdev.c| 30 +- hw/qdev.h| 24

[Qemu-devel] [PATCH 19/22] qdev: implement cleanup logic in finalize

2012-02-01 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/qdev.c | 57 - 1 files changed, 32 insertions(+), 25 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 8f13e49..e3b53b7 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -247,31 +247,6 @@ void

[Qemu-devel] [PATCH 07/22] qom: allow object_class_foreach to take additional parameters to refine search

2012-02-01 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- include/qemu/object.h |1 + qom/object.c | 18 -- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/include/qemu/object.h b/include/qemu/object.h index ba37850..adbcfb1 100644 --- a/include/qemu/object.h +++ b

[Qemu-devel] [PATCH 16/22] qdev: nuke qdev_init_chardev()

2012-02-01 Thread Anthony Liguori
I'm sure the intentions were good here, but there's no reason this should be in qdev. Move it to qemu-char where it belongs. Signed-off-by: Anthony Liguori --- hw/etraxfs_ser.c |2 +- hw/lm32_juart.c |2 +- hw/lm32_uart.c |2 +- hw/milkymist-uart.c |

[Qemu-devel] [PATCH 05/22] qdev: allow classes to overload qdev functions

2012-02-01 Thread Anthony Liguori
This allows us to drop per-Device registration functions by allowing the class_init functions to overload qdev methods. Signed-off-by: Anthony Liguori --- hw/qdev.c | 53 + 1 files changed, 33 insertions(+), 20 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 04/22] qdev: remove info from class

2012-02-01 Thread Anthony Liguori
Now DeviceInfo is no longer used after object construction. All of the relevant members have been moved to DeviceClass. Signed-off-by: Anthony Liguori --- hw/pci.c |4 ++- hw/qdev.c | 94 hw/qdev.h | 26 +--- 3

Re: [Qemu-devel] [PATCH 0/3] jazz-led: qdev conversion

2012-02-01 Thread Anthony Liguori
This is going to need to be rebased. I'd suggest waiting until next week when the next qom round goes in. But if you resend before Friday, I'll make sure to take it in before I push in the next round of qom. Regards, Anthony Liguori Makefile.objs

[Qemu-devel] [PATCH 06/22] qdev: refactor device creation to allow bus_info to be set only in class

2012-02-01 Thread Anthony Liguori
As we use class_init to set class members, DeviceInfo no longer holds this information. Signed-off-by: Anthony Liguori --- hw/qdev.c | 42 +++--- 1 files changed, 19 insertions(+), 23 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index c9f890c..bba84e2

[Qemu-devel] [PATCH 14/22] qdev: refactor away qdev_create_from_info

2012-02-01 Thread Anthony Liguori
Note that the FIXME gets fixed in series 4/4. We need to convert BusState to QOM before we can make parent_bus a link. Signed-off-by: Anthony Liguori --- hw/qdev.c | 35 ++- hw/qdev.h |3 +++ 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a

[Qemu-devel] [PATCH 13/22] qdev: split out common init to instance_init

2012-02-01 Thread Anthony Liguori
This gets us closer to being able to object_new() a qdev type and have a functioning object verses having to call qdev_create(). Signed-off-by: Anthony Liguori --- hw/qdev.c | 41 - 1 files changed, 28 insertions(+), 13 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 08/22] qdev: kill off DeviceInfo list

2012-02-01 Thread Anthony Liguori
Teach the various bits of code that need to walk through available devices to do so via QOM. Signed-off-by: Anthony Liguori --- hw/qdev.c | 87 + hw/qdev.h |2 - hw/ssi.c |2 +- 3 files changed, 31 insertions(+), 60 deletions

[Qemu-devel] [PATCH 01/22] usb-hid: simplify class initialization a bit

2012-02-01 Thread Anthony Liguori
We can probably model USBHidDevice as a base class to get even better code sharing but for now, just use a common function to initialize the common class members. Signed-off-by: Anthony Liguori --- hw/usb-hid.c | 27 +-- 1 files changed, 13 insertions(+), 14 deletions

[Qemu-devel] [PATCH 18/22] qom: accept any compatible type when setting a link property

2012-02-01 Thread Anthony Liguori
Links had limited utility before as they only allowed a concrete type to be specified. Now we can support abstract types and interfaces which means it's now possible to have a link. Signed-off-by: Anthony Liguori --- qom/object.c |9 + 1 files changed, 5 insertions(+), 4 dele

Re: [Qemu-devel] [PATCH] main-loop: Fix SetEvent() on uninitialized handle on win32

2012-02-01 Thread Anthony Liguori
hanks. Regards, Anthony Liguori --- main-loop.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/main-loop.c b/main-loop.c index 692381c..62d95b9 100644 --- a/main-loop.c +++ b/main-loop.c @@ -164,7 +164,7 @@ static int qemu_signal_init(void) #else /* _WIN32 */ -H

Re: [Qemu-devel] [PATCH v3] optionroms: Silence intermediate file removal

2012-02-01 Thread Anthony Liguori
On 01/30/2012 04:27 AM, Jan Kiszka wrote: The build process of optionroms spits out an "rm ..." line. Moreover, it removes all .o files that can be handy for debugging purposes. So disable automatic intermediate removal. Signed-off-by: Jan Kiszka Applied. Thanks. Regards, Antho

Re: [Qemu-devel] [PATCH] exec.c: Clarify comment about tlb_flush() flush_global parameter

2012-02-01 Thread Anthony Liguori
On 01/17/2012 07:23 AM, Peter Maydell wrote: Clarify the comment about tlb_flush()'s flush_global parameter, so it is clearer what it does and why it is OK that the implementation currently ignores it. Signed-off-by: Peter Maydell Applied. Thanks. Regards, Anthony Liguori ---

Re: [Qemu-devel] [PATCH v3 resend] ./configure: request pkg-config to provide private libs when static linking

2012-02-01 Thread Anthony Liguori
On 01/31/2012 01:03 PM, Sergei Trofimovich wrote: From: Sergei Trofimovich Added wrapper around pkg-config to allow: - safe options injection via ${QEMU_PKG_CONFIG_FLAGS} - spaces in path to pkg-config Signed-off-by: Sergei Trofimovich CC: Peter Maydell Applied. Thanks. Regards, Anthony

Re: [Qemu-devel] [PATCH resend] ./configure: add link check for nss-smartcard

2012-02-01 Thread Anthony Liguori
t find -lnspr4 My system does not provide static libraries for nss, so fix autoconfiguration by link checking. Signed-off-by: Sergei Trofimovich CC: qemu-trivial Applied. Thanks. Regards, Anthony Liguori --- configure | 13 + 1 files changed, 9 insertions(+), 4 deletion

Re: [Qemu-devel] [PATCH] rtl8139: honor RxOverflow flag in can_receive method

2012-02-01 Thread Anthony Liguori
y stops working. Reported-by: Hayato Kakuta Tested-by: Hayato Kakuta Signed-off-by: Fernando Luis Vazquez Cao Applied. Thanks. Regards, Anthony Liguori --- diff -urNp qemu-kvm-orig/hw/rtl8139.c qemu-kvm/hw/rtl8139.c --- qemu-kvm-orig/hw/rtl8139.c 2012-01-12 20:55:27.0 +0900

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add a section for the host OS and a W32 maintainer

2012-02-01 Thread Anthony Liguori
. Signed-off-by: Stefan Weil Applied. Thanks. Regards, Anthony Liguori --- MAINTAINERS | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 73c0a10..882958e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -161,6 +161,26 @@ S

Re: [Qemu-devel] [PATCH] hw/9pfs: Update MAINTAINERS file

2012-02-01 Thread Anthony Liguori
On 01/19/2012 11:27 AM, Aneesh Kumar K.V wrote: From: "Aneesh Kumar K.V" Signed-off-by: Aneesh Kumar K.V Applied. Thanks. Regards, Anthony Liguori --- MAINTAINERS |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS inde

Re: [Qemu-devel] [PATCH 0/2] Generic tick reinjection control

2012-02-01 Thread Anthony Liguori
ation policies (see patch 1 one for details). And this new property is then applied on the RTC device. [1] http://thread.gmane.org/gmane.comp.emulators.kvm.devel/85339 Applied. Thanks. Regards, Anthony Liguori Jan Kiszka (2): qdev: Introduce lost tick policy property mc146818rtc

Re: [Qemu-devel] [PATCH] network: Added option to disable NIC option roms

2012-02-01 Thread Anthony Liguori
NE2000, PCNET) romfile=(empty) didn't work. This patch disables Option ROMs for iPXE for alls supported NICs (hotplugable and non hotplugable). And now filenames "disabled", "no" and "none" don't work. Any way to fix "romfile="? Sure. Care to su

Re: [Qemu-devel] [PATCH] nic: zap obsolote romloading bits from ne2k + pcnet

2012-02-01 Thread Anthony Liguori
s rebasing. Regards, Anthony Liguori --- hw/ne2000.c|9 + hw/pcnet-pci.c |9 + 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/hw/ne2000.c b/hw/ne2000.c index 62e082f..83328bb 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -763,14 +763,6 @@

Re: [Qemu-devel] [PATCH] Makefile: Remove linux-headers/asm symlink on distclean

2012-02-01 Thread Anthony Liguori
On 02/01/2012 12:50 PM, Peter Maydell wrote: configure creates a linux-headers/asm symlink. Remove this when doing a distclean. Signed-off-by: Peter Maydell Applied. Thanks. Regards, Anthony Liguori --- Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a

Re: [Qemu-devel] [PATCH] main-loop: For tools, initialize timers as part of qemu_init_main_loop()

2012-02-01 Thread Anthony Liguori
ch is already required to make use of those facilities, so existing users shouldn't be affected. Signed-off-by: Michael Roth Applied. Thanks. Regards, Anthony Liguori --- main-loop.c |2 +- main-loop.h | 12 qemu-tool.c |3 ++- vl.c|5 + 4 file

Re: [Qemu-devel] [PATCH 0/5] sdl: various fixes

2012-02-01 Thread Anthony Liguori
b input on end of non-absolute mouse click sdl: Limit sdl_grab_end in handle_activation to Windows hosts ui/sdl.c | 60 1 files changed, 32 insertions(+), 28 deletions(-) Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH 1/2] qemu-option: Introduce default mechanism

2012-02-01 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori --- qemu-option.c | 58 +--- qemu-option.h |2 + 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index a303f87..4626ccf 100644 --- a/qemu-option.c

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Anthony Liguori
needed with qom-upstream.14? I fixed a bug on .14 that involved child properties that was making device-del sometimes fail. If it is, what's your test case? I have a device_del test case that seems to be working right now without this patch. Regards, Anthony Liguori }

Re: [Qemu-devel] [PATCH 02/16] qom: store object with correct type in interface links

2012-02-02 Thread Anthony Liguori
t; Very good catch. Regards, Anthony Liguori } else {

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Anthony Liguori
On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: Is this still needed with qom-upstream.14? I fixed a bug on .14 that involved child properties that was making device-del sometimes fail. Not sure, I tried with .13 but, from the look of it, it

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
c interfaces to read/write properties from objects. We should use type-safe accessors provided by the types themselves. 2) If we want to get fancy, we can add property_set_int, etc. and then implement (1) via header files that just call these functions. Regards, Anthony Liguori diff --git

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
On 02/02/2012 01:24 PM, Paolo Bonzini wrote: On 02/02/2012 08:06 PM, Anthony Liguori wrote: I don't want object.h to have a dependency on QObject. We need to phase out QObject. The header doesn't. Couple things: 1) We shouldn't use generic interfaces to read/write properti

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
ain buggy & bitrot. Not disagreeing at all with the goal, just the implementation :-) We can pretty easily avoid a QObject dependency. I can throw together that patch if you'd like. Regards, Anthony Liguori Paolo

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Anthony Liguori
On 02/02/2012 01:07 PM, Alexander Graf wrote: On 02.02.2012, at 20:01, Anthony Liguori wrote: On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: Is this still needed with qom-upstream.14? I fixed a bug on .14 that involved child properties that

Re: [Qemu-devel] [PATCH 09/16] qdev: remove parse/print methods for mac properties

2012-02-02 Thread Anthony Liguori
we instead do a list of ints or something like that? Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH 10/16] qdev: make the non-legacy pci address property accept an integer

2012-02-02 Thread Anthony Liguori
x27;t this break libvirt's usage of -device addr=0.2 ? Regards, Anthony Liguori --- hw/qdev-properties.c | 25 +++-- 1 files changed, 7 insertions(+), 18 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 4fb5cf8..e4bcc6d 100644 --- a/hw/qd

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
On 02/02/2012 01:21 PM, Andreas Färber wrote: Am 02.02.2012 20:06, schrieb Anthony Liguori: On 02/02/2012 10:45 AM, Paolo Bonzini wrote: Move the creation of QmpInputVisitor and QmpOutputVisitor from qmp.c to qom/object.c, since it's the only practical way to access object properties. S

Re: [Qemu-devel] [PATCH 04/16] qom: add QObject-based property get/set wrappers

2012-02-02 Thread Anthony Liguori
On 02/02/2012 02:08 PM, Paolo Bonzini wrote: On 02/02/2012 08:36 PM, Anthony Liguori wrote: The only types that matter are int and string so the variant visitor is pretty simple. Sure, only ~150 lines of code. I also do not disagree with the goals (mine and yours), just with the priorities

Re: [Qemu-devel] [RFC] Next gen kvm api

2012-02-02 Thread Anthony Liguori
uation, but better for things like strace. Look pretty interesting overall. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH 10/16] qdev: make the non-legacy pci address property accept an integer

2012-02-03 Thread Anthony Liguori
On 02/02/2012 02:19 PM, Paolo Bonzini wrote: On 02/02/2012 09:07 PM, Anthony Liguori wrote: Signed-off-by: Paolo Bonzini Isn't this a compatibility breaker? Won't this break libvirt's usage of -device addr=0.2 ? Nope, the legacy property still keeps the dd.f format. This

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Anthony Liguori
l exist with a composed device so dropping the reference here isn't enough. Regards, Anthony Liguori --- vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index d88a18c..c63af69 100644 --- a/vl.c +++ b/vl.c @@ -1746,6 +1746,7 @@ static int de

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Anthony Liguori
On 02/02/2012 01:07 PM, Alexander Graf wrote: On 02.02.2012, at 20:01, Anthony Liguori wrote: On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: Is this still needed with qom-upstream.14? I fixed a bug on .14 that involved child properties that

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Anthony Liguori
On 02/03/2012 10:57 AM, Alexander Graf wrote: On 03.02.2012, at 17:37, Anthony Liguori wrote: On 02/02/2012 01:07 PM, Alexander Graf wrote: On 02.02.2012, at 20:01, Anthony Liguori wrote: On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: Is

[Qemu-devel] [PATCH] s390x: fix -drive in the absence of aliases

2012-02-03 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- blockdev.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/blockdev.c b/blockdev.c index 7e4c548..7d7ac31 100644 --- a/blockdev.c +++ b/blockdev.c @@ -565,7 +565,11 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi

Re: [Qemu-devel] [PATCH 00/22] qom: use Type system to register all devices (v2)

2012-02-03 Thread Anthony Liguori
On 02/01/2012 01:50 PM, Anthony Liguori wrote: This is the 3rd QOM series. All known issues have been resolved. This has been extensively tested (including for bisectability). I think this is ready to apply. The goal of this series is to make DeviceState a first class QOM base class. The

Re: [Qemu-devel] [PATCH v8 0/4] -net bridge: rootless bridge support for qemu

2012-02-03 Thread Anthony Liguori
helper uses it's own ACL mechanism for access control, but future network helpers could be developed, for example, to support PolicyKit for access control. More details are included in individual patches. The helper is broken into a series of patches to improve reviewabilty. Applied. Thanks. R

Re: [Qemu-devel] [PATCH v2] keep the PID file locked for the lifetime of the process

2012-02-03 Thread Anthony Liguori
g/onlinepubs/9699919799/functions/lockf.html Applied. Thanks. Regards, Anthony Liguori Signed-off-by: Laszlo Ersek --- os-posix.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/os-posix.c b/os-posix.c index 5c437ca..e3ed497 100644 --- a/os-posix.c +++ b/os-posix.c

Re: [Qemu-devel] [PATCH] hw/vmmouse.c: Disable vmmouse after reboot

2012-02-03 Thread Anthony Liguori
tch, the vmmouse become unusable after the reboot. Also, the mouse stays in absolute mode even before X starts again. Fixed by: Disabling the vmmouse in its reset handler. Signed-off-by: Gerhard Wiesinger Applied. Thanks. Regards, Anthony Liguori --- hw/vmmouse.c | 2 ++ 1 files ch

Re: [Qemu-devel] [PATCH] Change license from GPLv2 to GPLv2+

2012-02-03 Thread Anthony Liguori
On 01/27/2012 10:40 AM, Stefan Weil wrote: This file only contains code from Red Hat, so it can use GPLv2+. Tested with `git blame -M -C net/checksum.c`. Signed-off-by: Stefan Weil Applied. Thanks. Regards, Anthony Liguori --- net/checksum.c |5 + 1 files changed, 1 insertions

Re: [Qemu-devel] [PATCH] s390x: fix -drive in the absence of aliases

2012-02-03 Thread Anthony Liguori
On 02/03/2012 11:18 AM, Anthony Liguori wrote: Signed-off-by: Anthony Liguori --- blockdev.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) *sigh* my work directory was dirty. This needs a #include "arch_init.h" too. Regards, Anthony Liguori diff --git a/bl

Re: [Qemu-devel] [RFC] Next gen kvm api

2012-02-03 Thread Anthony Liguori
? It's not a finite or privileged resource. Regards, Anthony Liguori

[Qemu-devel] [PATCH] usb-redir: convert to QOM

2012-02-03 Thread Anthony Liguori
This was missed due to the fact that it's in the top level and it uses 'struct DeviceInfo' instead of 'DeviceInfo' for some strange reason. I'm not able to test this as I don't have libusbredir installed. Signed-off-by: Anthony Liguori --- usb-redir.c | 2

Re: [Qemu-devel] buildbot failure in qemu on default_mingw32

2012-02-03 Thread Anthony Liguori
nd a patch for this? Stefan Weil may be able to help you figure out what's needed here for win32. Regards, Anthony Liguori sincerely, -The Buildbot

[Qemu-devel] [PATCH] usb-bsd: convert to QOM

2012-02-03 Thread Anthony Liguori
Untested but simple enough. Signed-off-by: Anthony Liguori --- usb-bsd.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/usb-bsd.c b/usb-bsd.c index 2c6afc8..43fd1a1 100644 --- a/usb-bsd.c +++ b/usb-bsd.c @@ -410,15 +410,16 @@ static void usb_host_class_initfn

Re: [Qemu-devel] [PATCH 10/16] qdev: make the non-legacy pci address property accept an integer

2012-02-03 Thread Anthony Liguori
for its purpose (which is to actually _use_ QOM), Yeah, I was just thinking out loud. My plan is to pull your series into my qom-rebase branch. The last few commits on https://github.com/aliguori/qemu/tree/qom-rebase.12 have a variant visitor and accessors that use it. Regards, Anthony L

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Anthony Liguori
On 02/03/2012 06:27 PM, Paolo Bonzini wrote: On 02/03/2012 03:27 PM, Anthony Liguori wrote: On 02/02/2012 10:45 AM, Paolo Bonzini wrote: The reference that is returned by qdev_device_add is never given back, so that device_del does not cause the refcount to go to zero (and thus does nothing

Re: [Qemu-devel] [PATCH] usb-bsd: convert to QOM

2012-02-04 Thread Anthony Liguori
On 02/04/2012 05:54 AM, Blue Swirl wrote: On Fri, Feb 3, 2012 at 23:41, Anthony Liguori wrote: Untested but simple enough. Signed-off-by: Anthony Liguori There are still some problems, though build does not fail anymore: CCusb-bsd.o /src/qemu/usb-bsd.c:417: warning: initialization

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-04 Thread Anthony Liguori
On 02/04/2012 12:51 AM, Paolo Bonzini wrote: On 02/04/2012 04:03 AM, Anthony Liguori wrote: There's no object_ref() in qdev_device_add(). The 2 references come from adding a child link to /peripheral and via object_new(). Sure, but there's when the object_new() reference becomes u

Re: [Qemu-devel] [RFC] Next gen kvm api

2012-02-05 Thread Anthony Liguori
as a mechanism (which would allow clearing the notify flag before writing to an eventfd). We could potentially just use BPF for this. Regards, Anthony Liguori

Re: [Qemu-devel] [RFC] Next gen kvm api

2012-02-06 Thread Anthony Liguori
On 02/06/2012 03:34 AM, Avi Kivity wrote: On 02/05/2012 06:36 PM, Anthony Liguori wrote: On 02/05/2012 03:51 AM, Gleb Natapov wrote: On Sun, Feb 05, 2012 at 11:44:43AM +0200, Avi Kivity wrote: On 02/05/2012 11:37 AM, Gleb Natapov wrote: On Thu, Feb 02, 2012 at 06:09:54PM +0200, Avi Kivity

Re: [Qemu-devel] [RFC] Next gen kvm api

2012-02-06 Thread Anthony Liguori
On 02/06/2012 07:54 AM, Avi Kivity wrote: On 02/06/2012 03:33 PM, Anthony Liguori wrote: Look at arch/x86/kvm/i8254.c:pit_ioport_read() for a counterexample. There are also interactions with other devices (for example the apic/ioapic interaction via the apic bus). Hrm, maybe I'm missi

Re: [Qemu-devel] [PATCH v2 01/27] qom: clean up cast macros

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- include/qemu/object.h | 22 +++--- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/qemu/object.h b/include/qemu

Re: [Qemu-devel] [PATCH v2 02/27] qom: more documentation on subclassing

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori And thank you very much for adding to the docs! Regards, Anthony Liguori --- include/qemu/object.h | 76 +++-- 1 files changed, 73

Re: [Qemu-devel] [PATCH v2 03/27] qom: clean up/optimize object_dynamic_cast

2012-02-06 Thread Anthony Liguori
ly need a unit test for this stuff. I've got one in my tree, I'll dig it out so we can start more rigorously validating these different casting cases. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH v2 04/27] qom: avoid useless conversions from string to type

2012-02-06 Thread Anthony Liguori
t's a performance problem. The type lookup is done through a hash table, at most it's going to be 2-3 integer comparisons followed by a strcmp() of a small word. It shouldn't be that slow. Regards, Anthony Liguori +static bool object_is_type(Object *obj, T

Re: [Qemu-devel] [PATCH v2 05/27] qom: do not include qdev header file

2012-02-06 Thread Anthony Liguori
"qemu/object.h" #include "qemu-common.h" #include "qapi/qapi-visit-core.h" -#include "hw/qdev.h" -// FIXME remove above Reviewed-by: Anthony Liguori Regards, Anthony Liguori #define MAX_INTERFACES 32

Re: [Qemu-devel] [PATCH v2 06/27] qom: add QObject-based property get/set wrappers

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Move the creation of QmpInputVisitor and QmpOutputVisitor from qmp.c to qom/object.c, since it's the only practical way to access object properties. Signed-off-by: Paolo Bonzini Reluctantly-Reviewed-by: Anthony Liguori As long as we keep

Re: [Qemu-devel] [PATCH v2 07/27] qom: add property get/set wrappers for C types

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Add wrappers that let you get/set properties using normal C data types. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- include/qemu/object.h | 70 + qom/object.c

Re: [Qemu-devel] [PATCH v2 08/27] qom: fix off-by-one

2012-02-06 Thread Anthony Liguori
ble here and do a NULL check. My eyes can't handle dereferencing strchr() directly even if I understand why it's safe to do :-) Regards, Anthony Liguori if (object_dynamic_cast(target, target_type)) { object_ref(target);

Re: [Qemu-devel] [PATCH v2 09/27] qom: add object_resolve_path_type

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- include/qemu/object.h | 25 +++-- qom/object.c | 26 ++ 2 files changed, 41 insertions(+), 10

Re: [Qemu-devel] [PATCH v2 10/27] qom: use object_resolve_path_type for links

2012-02-06 Thread Anthony Liguori
lo Bonzini Reviewed-by: Anthony Liguori I'm really happy with how this turned out. Regards, Anthony Liguori --- qerror.c |4 qerror.h |3 +++ qom/object.c | 32 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/qerr

Re: [Qemu-devel] [PATCH v2 11/27] qom: fix canonical paths vs. interfaces

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- qom/object.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/qom/object.c b/qom/object.c index 75be582..e8418bc 100644

Re: [Qemu-devel] [PATCH v2 12/27] qom: add property get/set wrappers for links

2012-02-06 Thread Anthony Liguori
a the property opaque, but I guess that might let us get lazy about filling in the composition tree. Regards, Anthony Liguori + +Object *object_property_get_link(Object *obj, const char *name, + Error **errp) +{ +char *str = object_property_get_str(obj, name,

Re: [Qemu-devel] [PATCH v2 13/27] qdev: remove direct calls to print/parse

2012-02-06 Thread Anthony Liguori
way. Add an appropriate fallback to prepare for this. Signed-off-by: Paolo Bonzini Nice cleanup. Reviewed-by: Anthony Liguori I wonder how far we are from moving most of qdev-monitor.c to hmp.c and qmp.c respectively. I think that given this patch, we can actually implement info qtree/qdm

Re: [Qemu-devel] [PATCH v2 14/27] qdev: allow reusing get/set for legacy property

2012-02-06 Thread Anthony Liguori
property at all. The previous patch ensures that the right fallback will be used. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw/qdev.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c

Re: [Qemu-devel] [PATCH v2 15/27] qdev: remove parse method for string properties

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: We need the print method to put double quotes, but parsing is not special. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw/qdev-properties.c | 11 --- 1 files changed, 0 insertions(+), 11

Re: [Qemu-devel] [PATCH v2 16/27] qdev: remove print/parse methods from LostTickPolicy properties

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Also generalize the code so that we can have more enum properties in the future. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw/qdev-properties.c | 62

Re: [Qemu-devel] [PATCH v2 17/27] qdev: remove parse/print methods for mac properties

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori --- hw/qdev-properties.c | 61 ++--- 1 files changed, 42 insertions(+), 19 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev

Re: [Qemu-devel] [PATCH v2 18/27] qdev: make the non-legacy pci address property accept an integer

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: PCI addresses are set with qdev_prop_uint32. Thus we make the QOM property accept a device and function encoded in an 8-bit integer, instead of the magic dd.f hex string. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards

Re: [Qemu-devel] [PATCH v2 19/27] qdev: remove parse/print methods for pointer properties

2012-02-06 Thread Anthony Liguori
Liguori Regards, Anthony Liguori --- hw/qdev-properties.c | 128 -- 1 files changed, 72 insertions(+), 56 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 9a67cc5..67995a3 100644 --- a/hw/qdev-properties.c +++ b/hw

Re: [Qemu-devel] [PATCH v2 20/27] qdev: let QOM free properties

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Drop the special free callback. Instead, register a "regular" release method in the non-legacy property. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw/qdev-propertie

Re: [Qemu-devel] [PATCH v2 21/27] qdev: fix off-by-one

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Integer properties did not work. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw/qdev-properties.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/qdev-properties.c

Re: [Qemu-devel] [PATCH v2 22/27] qdev: access properties via QOM

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Do not poke anymore in the struct when accessing qdev properties. Instead, ask the object to set the right value. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw/qdev-addr.c |5 ++- hw

Re: [Qemu-devel] [PATCH v2 23/27] qdev: inline qdev_prop_set into qdev_prop_set_ptr

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: qdev_prop_set is not needed anymore except for hacks, simplify it and inline it. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw/qdev-properties.c | 26 +++--- 1 files changed

Re: [Qemu-devel] [PATCH v2 24/27] qdev: initialize properties via QOM

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Similarly, use the object properties also to set the default values of the qdev properties. This requires reordering registration and initialization. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw

Re: [Qemu-devel] [PATCH v2 25/27] qdev: remove unused fields from PropertyInfo

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw/qdev-addr.c |2 -- hw/qdev-properties.c | 38 +- hw/qdev.h| 21

Re: [Qemu-devel] [PATCH v2 26/27] omap_clk: convert to QOM

2012-02-06 Thread Anthony Liguori
spi_fclk[3] = { { .name = "spi1_fclk", .flags= CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, @@ -894,7 +915,7 @@ static struct clk spi_fclk[3] = { }, }; -static struct clk dss_clk[2] = { +static struct ClkInfo dss_clk[2] = { { .na

Re: [Qemu-devel] [PATCH v2 27/27] omap: remove PROP_PTR properties

2012-02-06 Thread Anthony Liguori
On 02/04/2012 02:02 AM, Paolo Bonzini wrote: Everything is already in place to turn the clock properties into links. w00t! Reviewed-by: Anthony Liguori Regards, Anthony Liguori Cc: Peter Maydell Signed-off-by: Paolo Bonzini --- hw/omap_clk.c |2 +- hw/omap_gpio.c | 46

[Qemu-devel] [PATCH] s390x: fix qom-ification fall-out

2012-02-06 Thread Anthony Liguori
Tested-by: Andreas Faerber Signed-off-by: Anthony Liguori --- hw/s390-virtio-bus.c |1 + vl.c |6 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c index b66ef68..49140f8 100644 --- a/hw/s390-virtio-bus.c

Re: [Qemu-devel] [RFC] Next gen kvm api

2012-02-06 Thread Anthony Liguori
evice model stuff in the kernel. ioeventfd to userspace is almost certainly worse for performance. And Avi mentioned, you can emulate this behavior yourself in userspace if so inclined. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH v3 01/21] qom: Register QOM infrastructure early

2012-02-06 Thread Anthony Liguori
CPUs. device_init() is left for legacy types. New ones should use type_init(). There are no legacy device_init users. Everything can (and should) be converted to type_init() and MODULE_INIT_QOM can be invoked very early. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH RFC v3 02/21] qom: Add QOM support to user emulators

2012-02-06 Thread Anthony Liguori
On 02/02/2012 08:59 PM, Andreas Färber wrote: Link the Object base class and the module infrastructure for class registration. Call QOM module init. Signed-off-by: Andreas Färber Cc: Anthony Liguori If we're going to go down this road, then I have a hard requirement. We need to buil

Re: [Qemu-devel] [PATCH RFC v3 03/21] qom: Introduce CPU class

2012-02-06 Thread Anthony Liguori
On 02/02/2012 08:59 PM, Andreas Färber wrote: It's abstract and derived directly from TYPE_OBJECT. Prepare a virtual reset method. Signed-off-by: Andreas Färber Cc: Anthony Liguori Cc: Peter Maydell --- include/qemu/cpu.h | 73

Re: [Qemu-devel] [PATCH RFC v3 03/21] qom: Introduce CPU class

2012-02-06 Thread Anthony Liguori
On 02/06/2012 02:14 PM, Andreas Färber wrote: Am 06.02.2012 20:24, schrieb Anthony Liguori: On 02/02/2012 08:59 PM, Andreas Färber wrote: +/** + * cpu_common_reset: + * @cpu: The CPU whose common state is to be reset. + * + * To be used by derived classes. + */ +void cpu_common_reset(CPU *cpu

Re: [Qemu-devel] [PATCH RFC v3 05/21] target-arm: Embed CPUARMState in QOM ARMCPU

2012-02-06 Thread Anthony Liguori
set() call cpu_do_reset() and move most of its code to arm_cpu_reset(). Signed-off-by: Andreas Färber Cc: Anthony Liguori Cc: Paul Brook Cc: Peter Maydell Cc: Richard Henderson --- target-arm/cpu-core.h | 11 +++ target-arm/cpu.c | 78 +

Re: [Qemu-devel] [PATCH RFC v3 06/21] target-arm: Prepare model-specific class_init function

2012-02-06 Thread Anthony Liguori
aving something like: .class_data = (SpecialInfo[]){ .id = 0x23423423 }, Regards, Anthony Liguori static const ARMCPUInfo arm_cpus[] = { @@ -230,6 +231,10 @@ static void arm_cpu_class_init(ObjectClass *klass, void *data) cpu_class->reset = arm_cpu_reset; k->cp15.c0_cpuid =

<    1   2   3   4   5   6   7   8   9   10   >