Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-05-02 Thread George Wilson
Anthony Liguori anth...@codemonkey.ws wrote on 05/01/2012 06:26:05 PM: Anthony Liguori anth...@codemonkey.ws 05/01/2012 06:26 PM To Paul Moore pmo...@redhat.com cc qemu-devel@nongnu.org, George Wilson/Austin/IBM@IBMUS Subject Re: [Qemu-devel] [PATCH] vnc: disable VNC password

Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-05-02 Thread George Wilson
Anthony Liguori anth...@codemonkey.ws wrote on 05/01/2012 06:45:47 PM: Anthony Liguori anth...@codemonkey.ws 05/01/2012 06:45 PM To George Wilson/Austin/IBM@IBMUS cc Paul Moore pmo...@redhat.com, qemu-devel@nongnu.org Subject Re: [Qemu-devel] [PATCH] vnc: disable VNC password

Re: [Qemu-devel] [PATCH 04/14] qdev: don't allow globals to be set by bus name

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 00:18, Anthony Liguori ha scritto: anthony@titi:~/build/qemu$ x86_64-softmmu/qemu-system-x86_64 -device rtl8139,? there is no output I don't think this is a fair comparison, or makes sense at all. The cause of the bug in master is a cut-and-paste typo: @@ -157,7 +157,7 @@ int

Re: [Qemu-devel] [PATCH 2/3] runstate: introduce suspended state

2012-05-02 Thread Gerd Hoffmann
diff --git a/input.c b/input.c index 6b5c2c3..47e6900 100644 --- a/input.c +++ b/input.c @@ -130,7 +130,7 @@ void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry) void kbd_put_keycode(int keycode) { -if (!runstate_is_running()) { +if (!runstate_is_running()

Re: [Qemu-devel] [PATCH 07/14] qdev: fix info qtree/qdm

2012-05-02 Thread Paolo Bonzini
Il 01/05/2012 20:18, Anthony Liguori ha scritto: Don't rely on bus_info. I took a little liberty in the last commit as it would cause info qtree/info qdm to not show any useful information. But since this is not considered a supported interface, breaking it across a single commit seems

Re: [Qemu-devel] [PATCH 10/14] qbus: move get_dev_path to DeviceState

2012-05-02 Thread Paolo Bonzini
Il 01/05/2012 20:18, Anthony Liguori ha scritto: It should have never been a bus method. If in the long term you want slots to be child properties in the bus, the method _will_ actually belong to buses. It is clear cut for print_dev, but not so much for the others. Paolo Signed-off-by:

Re: [Qemu-devel] [PATCH 11/14] qbus: move get_fw_dev_path to DeviceClass

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 00:36, Andreas Färber ha scritto: Sorry, I reviewed the patches in mail reception order. ;) I meant 08/14 (qdev: convert busses to QEMU object model) where macros for other bus types were introduced. Seemed like an oversight. A lot of these were missing, and furthermore they

Re: [Qemu-devel] [V6 PATCH 1/4] net: announce self after vm start

2012-05-02 Thread Orit Wasserman
On 03/28/2012 07:40 AM, Jason Wang wrote: qemu_announce_self() were moved to vm_start(). This is because we may want to let guest to send the gratuitous packets. A global variable need_announce were introduced to record the pending announcement, and vm_start() would send gratuitous packet

Re: [Qemu-devel] [V6 PATCH 1/4] net: announce self after vm start

2012-05-02 Thread Jason Wang
On 05/02/2012 03:49 PM, Orit Wasserman wrote: On 03/28/2012 07:40 AM, Jason Wang wrote: qemu_announce_self() were moved to vm_start(). This is because we may want to let guest to send the gratuitous packets. A global variable need_announce were introduced to record the pending announcement, and

Re: [Qemu-devel] [PATCH 1/3] raw-posix: Do not use CONFIG_COCOA macro

2012-05-02 Thread Kevin Wolf
Am 01.05.2012 00:15, schrieb Andreas Färber: From: Pavel Borzenkov pavel.borzen...@gmail.com Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac OS X host. The patch is based on Ben Leslie's patch: http://patchwork.ozlabs.org/patch/97859/ Signed-off-by: Ben Leslie

Re: [Qemu-devel] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-02 Thread Kevin Wolf
Am 01.05.2012 22:25, schrieb Anthony Liguori: Thanks for sending this out Stefan. On 05/01/2012 10:31 AM, Stefan Hajnoczi wrote: Libvirt can take advantage of SELinux to restrict the QEMU process and prevent it from opening files that it should not have access to. This improves security

Re: [Qemu-devel] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-02 Thread Stefan Hajnoczi
On Wed, May 2, 2012 at 9:20 AM, Kevin Wolf kw...@redhat.com wrote: Am 01.05.2012 22:25, schrieb Anthony Liguori: Thanks for sending this out Stefan. On 05/01/2012 10:31 AM, Stefan Hajnoczi wrote: Libvirt can take advantage of SELinux to restrict the QEMU process and prevent it from opening

Re: [Qemu-devel] [V6 PATCH 1/4] net: announce self after vm start

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 09:59, Jason Wang ha scritto: I don't like this external flag. As this is only related to migration I think we can add a new state RUN_STATE_MIG_PRELAUNCH. In vm_start call qemu_announce_self only if the state was RUN_STATE_MIG_PRELAUNCH. This will we useful if we will need to

[Qemu-devel] API for single stepping an emulated CPU

2012-05-02 Thread Wacha Gábor
Dear developers, I am designing a virtual peripheral for Qemu, for which I need to single step through the program on the emulated CPU (my peripheral will be some kind of a debugger). My question is: is there an API to execute exactly one instruction in Qemu? I've already found the *_pause and

Re: [Qemu-devel] [PATCH 14/14] qbus: initialize in standard way

2012-05-02 Thread Paolo Bonzini
Il 01/05/2012 20:18, Anthony Liguori ha scritto: if (bus-qdev_allocated) { -g_free(bus); +object_delete(OBJECT(bus)); +} else { +object_finalize(OBJECT(bus)); } Time is ripe to add a more versatile freeing mechanism along the lines you've set in the

Re: [Qemu-devel] [libvirt] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-02 Thread Daniel P. Berrange
On Wed, May 02, 2012 at 10:20:17AM +0200, Kevin Wolf wrote: Am 01.05.2012 22:25, schrieb Anthony Liguori: Thanks for sending this out Stefan. On 05/01/2012 10:31 AM, Stefan Hajnoczi wrote: Libvirt can take advantage of SELinux to restrict the QEMU process and prevent it from opening

Re: [Qemu-devel] [RFC 2/5] block: add new command line parameter that and protocol description

2012-05-02 Thread Daniel P. Berrange
On Tue, May 01, 2012 at 04:31:44PM +0100, Stefan Hajnoczi wrote: From: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- qemu-options.hx | 42 ++ 1

Re: [Qemu-devel] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-02 Thread Daniel P. Berrange
On Tue, May 01, 2012 at 04:31:42PM +0100, Stefan Hajnoczi wrote: Libvirt can take advantage of SELinux to restrict the QEMU process and prevent it from opening files that it should not have access to. This improves security because it prevents the attacker from escaping the QEMU process if

Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-05-02 Thread Daniel P. Berrange
On Tue, May 01, 2012 at 06:26:05PM -0500, Anthony Liguori wrote: On 05/01/2012 04:20 PM, Paul Moore wrote: FIPS 140-2 requires disabling certain ciphers, including DES, which is used by VNC to obscure passwords when they are sent over the network. The solution for FIPS users is to disable the

Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-05-02 Thread Daniel P. Berrange
On Tue, May 01, 2012 at 05:20:40PM -0400, Paul Moore wrote: FIPS 140-2 requires disabling certain ciphers, including DES, which is used by VNC to obscure passwords when they are sent over the network. The solution for FIPS users is to disable the use of VNC password auth when the host system

Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-05-02 Thread Daniel P. Berrange
On Tue, May 01, 2012 at 06:45:47PM -0500, Anthony Liguori wrote: On 05/01/2012 06:43 PM, George Wilson wrote: Anthony Liguorianth...@codemonkey.ws wrote on 05/01/2012 06:26:05 PM: Anthony Liguorianth...@codemonkey.ws 05/01/2012 06:26 PM To Paul Moorepmo...@redhat.com cc

Re: [Qemu-devel] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-02 Thread Kevin Wolf
Am 02.05.2012 10:27, schrieb Stefan Hajnoczi: On Wed, May 2, 2012 at 9:20 AM, Kevin Wolf kw...@redhat.com wrote: Am 01.05.2012 22:25, schrieb Anthony Liguori: Thanks for sending this out Stefan. On 05/01/2012 10:31 AM, Stefan Hajnoczi wrote: Libvirt can take advantage of SELinux to restrict

Re: [Qemu-devel] [PATCH 1/3] raw-posix: Do not use CONFIG_COCOA macro

2012-05-02 Thread Andreas Färber
Am 02.05.2012 10:02, schrieb Kevin Wolf: Am 01.05.2012 00:15, schrieb Andreas Färber: From: Pavel Borzenkov pavel.borzen...@gmail.com Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac OS X host. The patch is based on Ben Leslie's patch:

Re: [Qemu-devel] [libvirt] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-02 Thread Kevin Wolf
Am 02.05.2012 10:53, schrieb Daniel P. Berrange: On Wed, May 02, 2012 at 10:20:17AM +0200, Kevin Wolf wrote: Am 01.05.2012 22:25, schrieb Anthony Liguori: Thanks for sending this out Stefan. On 05/01/2012 10:31 AM, Stefan Hajnoczi wrote: Libvirt can take advantage of SELinux to restrict the

Re: [Qemu-devel] [RFC 2/5] block: add new command line parameter that and protocol description

2012-05-02 Thread Daniel P. Berrange
On Tue, May 01, 2012 at 04:31:44PM +0100, Stefan Hajnoczi wrote: From: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- qemu-options.hx | 42 ++ 1

Re: [Qemu-devel] [libvirt] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-02 Thread Daniel P. Berrange
On Wed, May 02, 2012 at 11:45:26AM +0200, Kevin Wolf wrote: Am 02.05.2012 10:53, schrieb Daniel P. Berrange: On Wed, May 02, 2012 at 10:20:17AM +0200, Kevin Wolf wrote: Am 01.05.2012 22:25, schrieb Anthony Liguori: Thanks for sending this out Stefan. On 05/01/2012 10:31 AM, Stefan

Re: [Qemu-devel] [PATCH] increase BlockConf.min_io_size type from uint16_t to uint32_t

2012-05-02 Thread Kevin Wolf
Am 30.04.2012 17:52, schrieb Michael Tokarev: This value is used currently for virtio-blk only. It was defined as uint16_t before, which is the same as in kernel=user interface (in virtio_blk.h, struct virtio_blk_config). But the problem is that in kernel=user interface the units are sectors

Re: [Qemu-devel] [PATCH] increase BlockConf.min_io_size type from uint16_t to uint32_t

2012-05-02 Thread Michael Tokarev
02.05.2012 13:57, Kevin Wolf пишет: Am 30.04.2012 17:52, schrieb Michael Tokarev: This value is used currently for virtio-blk only. It was defined as uint16_t before, which is the same as in kernel=user interface (in virtio_blk.h, struct virtio_blk_config). But the problem is that in

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Christian Borntraeger
+blkcfg.sectors = secs ~(blk_size / pblk_size - 1); I'm not sure here what you mean. Usually blk_size = pblk_size on non-s390 systems, so this is completely different from the previous code, which is effectively I was trying to prevent the masking of the sector number. the first

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 12:18, Christian Borntraeger ha scritto: Maybe that really points to the problem that we are trying to solve here. For a dasd device, there is usually a 4096 byte block size and on the host these 4096 arereported via getss and getpbsz. The geometry reported by the device driver

Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO

2012-05-02 Thread Christian Borntraeger
On 27/04/12 18:12, Paolo Bonzini wrote: Il 26/04/2012 15:49, Christian Borntraeger ha scritto: +#ifdef __linux__ +} else if (bdrv_ioctl(bs, HDIO_GETGEO, geo) == 0) { +*pcyls = geo.cylinders; +*pheads = geo.heads; +*psecs = geo.sectors; +

Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-05-02 Thread Christoph Hellwig
On Wed, May 02, 2012 at 12:54:21AM +0200, Andreas F??rber wrote: +fds = fopen(/proc/sys/crypto/fips_enabled, r); How standardized is this? Should we limit this to __linux__ or something? It's completelt non-standard and doesn't even exist in mainline Linux. All the FIPS bullshit is a

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Christian Borntraeger
On 02/05/12 12:25, Paolo Bonzini wrote: Il 02/05/2012 12:18, Christian Borntraeger ha scritto: Maybe that really points to the problem that we are trying to solve here. For a dasd device, there is usually a 4096 byte block size and on the host these 4096 arereported via getss and getpbsz.

Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-05-02 Thread Daniel P. Berrange
On Wed, May 02, 2012 at 12:28:02PM +0200, Christoph Hellwig wrote: On Wed, May 02, 2012 at 12:54:21AM +0200, Andreas F??rber wrote: +fds = fopen(/proc/sys/crypto/fips_enabled, r); How standardized is this? Should we limit this to __linux__ or something? It's completelt non-standard

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 12:50, Christian Borntraeger ha scritto: On 02/05/12 12:25, Paolo Bonzini wrote: Il 02/05/2012 12:18, Christian Borntraeger ha scritto: Maybe that really points to the problem that we are trying to solve here. For a dasd device, there is usually a 4096 byte block size and on the

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Alexander Graf
On 05/02/2012 12:50 PM, Christian Borntraeger wrote: On 02/05/12 12:25, Paolo Bonzini wrote: Il 02/05/2012 12:18, Christian Borntraeger ha scritto: Maybe that really points to the problem that we are trying to solve here. For a dasd device, there is usually a 4096 byte block size and on the

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 13:07, Alexander Graf ha scritto: Both can be accessed using virtio-blk-s390. The former have the same semantics on geometry as what we're used to. They use normal MBRs and essentially the geometry doesn't mean too much these days anymore ;). However, if possible, I would like to

Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO

2012-05-02 Thread Alexander Graf
On 05/02/2012 12:27 PM, Christian Borntraeger wrote: On 27/04/12 18:12, Paolo Bonzini wrote: Il 26/04/2012 15:49, Christian Borntraeger ha scritto: +#ifdef __linux__ +} else if (bdrv_ioctl(bs, HDIO_GETGEO,geo) == 0) { +*pcyls = geo.cylinders; +*pheads = geo.heads; +

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Alexander Graf
On 05/02/2012 01:09 PM, Paolo Bonzini wrote: Il 02/05/2012 13:07, Alexander Graf ha scritto: Both can be accessed using virtio-blk-s390. The former have the same semantics on geometry as what we're used to. They use normal MBRs and essentially the geometry doesn't mean too much these days

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 13:10, Alexander Graf ha scritto: For DASD disks, the geometry is important, as its disk label is usually not MBR, but something s390 specific. Can we use this to guess the geometry like we do on x86? Yes, but what do you do with a blank disk? :) Right. :) Paolo

Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO

2012-05-02 Thread Paolo Bonzini
and everyone should be happy :). I would really like to have as little #ifdef TARGET_S390 code in QEMU. And #ifdef __s390__ is even worse, as it means we won't be able to execise that code path on other architectures. True, but how do you exercise that code path with DASD geometry on

[Qemu-devel] [PATCH 01/21] qom: documentation addition

2012-05-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/object.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/include/qemu/object.h b/include/qemu/object.h index ca1649c..d315dfa 100644 --- a/include/qemu/object.h +++ b/include/qemu/object.h @@ -555,6 +555,12 @@

[Qemu-devel] [PATCH 00/21] qbus QOM conversion, rebased on top of my patches

2012-05-02 Thread Paolo Bonzini
Here is Anthony's qbus conversion, with the qdev_add_properties changes replaced by my bus property changes. I left out the removal of bus methods; I'm not sure I agree with all of them (though I may just give up :)) and anyway they can be left to 1.2. Following Andreas's remark, I moved all

[Qemu-devel] [PATCH 19/21] qdev: connect busses with their parent devices

2012-05-02 Thread Paolo Bonzini
From: Anthony Liguori aligu...@us.ibm.com This makes sysbus part of the root hierarchy and all busses children of their respective parent DeviceState. Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev.c |4 hw/sysbus.c |

Re: [Qemu-devel] Heavy memory_region_get_dirty() -- Re: [PATCH 0/1 v2] KVM: Alleviate mmu_lock contention during dirty logging

2012-05-02 Thread Avi Kivity
On 05/02/2012 02:24 PM, Takuya Yoshikawa wrote: During checking mmu_lock contention, I noticed that QEMU's memory_region_get_dirty() was using unexpectedly much CPU time. Thanks, Takuya = perf top -t ${QEMU_TID} = 51.52%

Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO

2012-05-02 Thread Alexander Graf
On 05/02/2012 01:26 PM, Paolo Bonzini wrote: and everyone should be happy :). I would really like to have as little #ifdef TARGET_S390 code in QEMU. And #ifdef __s390__ is even worse, as it means we won't be able to execise that code path on other architectures. True, but how do you exercise

Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO

2012-05-02 Thread Paolo Bonzini
On 05/02/2012 01:26 PM, Paolo Bonzini wrote: and everyone should be happy :). I would really like to have as little #ifdef TARGET_S390 code in QEMU. And #ifdef __s390__ is even worse, as it means we won't be able to execise that code path on other architectures. True, but how do you

Re: [Qemu-devel] [PATCH 12/21] pc: add back PCI.rombar compat property

2012-05-02 Thread Michael S. Tsirkin
On Wed, May 02, 2012 at 01:31:04PM +0200, Paolo Bonzini wrote: This was erroneously dropped in d6c730086cbf24382eb8cff25551798769edfd84. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Yes I think it's a mistake, however we had: -},{ -

Re: [Qemu-devel] [PATCH 12/21] pc: add back PCI.rombar compat property

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 13:38, Michael S. Tsirkin ha scritto: On Wed, May 02, 2012 at 01:31:04PM +0200, Paolo Bonzini wrote: This was erroneously dropped in d6c730086cbf24382eb8cff25551798769edfd84. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Yes I think

Re: [Qemu-devel] [PATCH 12/21] pc: add back PCI.rombar compat property

2012-05-02 Thread Michael S. Tsirkin
On Wed, May 02, 2012 at 01:41:30PM +0200, Paolo Bonzini wrote: Il 02/05/2012 13:38, Michael S. Tsirkin ha scritto: On Wed, May 02, 2012 at 01:31:04PM +0200, Paolo Bonzini wrote: This was erroneously dropped in d6c730086cbf24382eb8cff25551798769edfd84. Cc: Michael S. Tsirkin

[Qemu-devel] [PATCH 09/21] qdev: move bus properties to a separate global

2012-05-02 Thread Paolo Bonzini
Simple code movement in order to simplify future refactoring. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/i2c.c | 10 ++ hw/ide/qdev.c | 10 ++ hw/intel-hda.c| 10 ++ hw/pci.c |

Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO

2012-05-02 Thread Christian Borntraeger
As hinted in my other mail, I think the way to go would be to give a hint to the geometry code that we're running on a DASD disk.. Just as an idea if we are going that path, we might use the BIODASDINFO2 or DASDAPIVER ioctls in qemu to detect if that is a dasd. Christian

[Qemu-devel] [PATCH 14/21] qdev: remove qdev_prop_set_defaults

2012-05-02 Thread Paolo Bonzini
Instead, qdev_property_add_static can set the default. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev-properties.c | 22 -- hw/qdev.c| 26 +++--- hw/qdev.h|1 - 3 files changed, 23 insertions(+), 26

Re: [Qemu-devel] [PATCH 01/21] qom: documentation addition

2012-05-02 Thread Andreas Färber
Am 02.05.2012 13:30, schrieb Paolo Bonzini: Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/object.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/include/qemu/object.h b/include/qemu/object.h index ca1649c..d315dfa 100644 --- a/include/qemu/object.h +++

[Qemu-devel] [PATCH 11/21] qdev: move bus properties to abstract superclasses

2012-05-02 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

[Qemu-devel] [PATCH 15/21] qdev: fix adding of ptr properties

2012-05-02 Thread Paolo Bonzini
From: Anthony Liguori aligu...@us.ibm.com ptr properties have neither a get/set or a print/parse which means that when they're added they aren't treated as static or legacy properties. Just assume properties like this are legacy properties and treat them as such. Signed-off-by: Anthony Liguori

[Qemu-devel] [PATCH 16/21] qdev: use wrapper for qdev_get_path

2012-05-02 Thread Paolo Bonzini
From: Anthony Liguori aligu...@us.ibm.com This makes it easier to remove it from BusInfo. Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Anthony's patch used BUS_CLASS so it broke bisectability; fixed here. exec.c|4

Re: [Qemu-devel] [PATCH 02/21] qom: add object_class_get_parent

2012-05-02 Thread Andreas Färber
Am 02.05.2012 13:30, schrieb Paolo Bonzini: This simple bit of functionality was missing and we'll need it soon, so add it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/object.h |8 qom/object.c | 13 + 2 files changed, 21

Re: [Qemu-devel] [PATCH 11/21] qdev: move bus properties to abstract superclasses

2012-05-02 Thread Anthony Liguori
On 05/02/2012 06:31 AM, Paolo Bonzini wrote: 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

Re: [Qemu-devel] [PATCH 14/21] qdev: remove qdev_prop_set_defaults

2012-05-02 Thread Anthony Liguori
On 05/02/2012 06:31 AM, Paolo Bonzini wrote: Instead, qdev_property_add_static can set the default. Signed-off-by: Paolo Bonzinipbonz...@redhat.com Great idea! Reviewed-by: Anthony Liguori aligu...@us.ibm.com Regards, Anthony Liguori --- hw/qdev-properties.c | 22

[Qemu-devel] [PATCH 02/21] qom: add object_class_get_parent

2012-05-02 Thread Paolo Bonzini
This simple bit of functionality was missing and we'll need it soon, so add it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/object.h |8 qom/object.c | 13 + 2 files changed, 21 insertions(+) diff --git a/include/qemu/object.h

[Qemu-devel] [PATCH 10/21] qdev: do not propagate properties to subclasses

2012-05-02 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,

Re: [Qemu-devel] [PATCH 05/21] qom: assert that public types have a non-NULL parent field

2012-05-02 Thread Andreas Färber
Am 02.05.2012 13:30, schrieb Paolo Bonzini: This protects against unwanted effects of changing TYPE_OBJECT from NULL to a string. Suggested by Andreas Faerber. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/object.h |1 - qom/object.c | 14 ++

Re: [Qemu-devel] [PATCH 05/14] qdev: use wrapper for qdev_get_path

2012-05-02 Thread Gerd Hoffmann
On 05/01/12 20:36, Anthony Liguori wrote: Hi Gerd, Could you carefully review the USB changes here? I'm not really sure what our contract is with the guest in terms of ABI compatibility. I think it's good but it could use a second set of eyes. incremental fix attached. cheers, Gerd

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

2012-05-02 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 pbonz...@redhat.com ---

[Qemu-devel] [PATCH 07/21] qdev: fix -device foo,?

2012-05-02 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 pbonz...@redhat.com --- hw/qdev-monitor.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-monitor.c

[Qemu-devel] [PATCH 21/21] qbus: initialize in standard way

2012-05-02 Thread Paolo Bonzini
From: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev.c | 84 + 1 file changed, 51 insertions(+), 33 deletions(-) diff --git

[Qemu-devel] [PATCH 20/21] qbus: make child devices links

2012-05-02 Thread Paolo Bonzini
From: Anthony Liguori aligu...@us.ibm.com Make qbus children show up as link properties. There is no stable addressing for qbus children so we use an unstable naming convention. This is okay in QOM though because the composition name is expected to be what's stable. Signed-off-by: Anthony

[Qemu-devel] [PATCH 18/21] qdev: convert busses to QEMU Object Model

2012-05-02 Thread Paolo Bonzini
From: Anthony Liguori aligu...@us.ibm.com This is far less interesting than it sounds. We simply add an Object to each BusState and then register the types appropriately. Most of the interesting refactoring will follow in the next patches. Since we're changing fundamental type names (BusInfo -

[Qemu-devel] [PATCH 12/21] pc: add back PCI.rombar compat property

2012-05-02 Thread Paolo Bonzini
This was erroneously dropped in d6c730086cbf24382eb8cff25551798769edfd84. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/pc_piix.c |4 1 file changed, 4 insertions(+) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index ef6afb1..15a62ef 100644

[Qemu-devel] [PATCH 08/21] qdev: use object_property_print in info qtree

2012-05-02 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 pbonz...@redhat.com --- hw/qdev-monitor.c |2 +- qom/object.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH 13/21] qdev: clean up global properties

2012-05-02 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 pbonz...@redhat.com --- hw/qdev-monitor.c |1 - hw/qdev.c |2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO

2012-05-02 Thread Alexander Graf
On 05/02/2012 01:38 PM, Paolo Bonzini wrote: On 05/02/2012 01:26 PM, Paolo Bonzini wrote: and everyone should be happy :). I would really like to have as little #ifdef TARGET_S390 code in QEMU. And #ifdef __s390__ is even worse, as it means we won't be able to execise that code path on other

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

2012-05-02 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 pbonz...@redhat.com --- include/qemu/object.h | 10 -- qom/object.c |9 +

[Qemu-devel] [PATCH 17/21] qdev: move sysbus initialization to sysbus.c

2012-05-02 Thread Paolo Bonzini
TYPE_SYSTEM_BUS will be local to hw/sysbus.c, so move existing references to main_system_bus and system_bus_info there. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev.c | 26 ++ hw/sysbus.c | 21 + 2 files changed, 23 insertions(+),

Re: [Qemu-devel] [Qemu-ppc] [PATCH 20/22] ppc: move load and store helpers, switch to AREG0 free mode

2012-05-02 Thread Alexander Graf
On 04/30/2012 05:34 PM, malc wrote: On Mon, 30 Apr 2012, Alexander Graf wrote: On 30.04.2012, at 12:45, Alexander Graf wrote: On 22.04.2012, at 15:26, Blue Swirl wrote: Add an explicit CPUPPCState parameter instead of relying on AREG0 and rename op_helper.c (which only contains load and

[Qemu-devel] [PATCH 06/21] qdev: push type property up to Object

2012-05-02 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 pbonz...@redhat.com --- hw/qdev.c|6 -- qom/object.c | 11 +++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/qdev.c

[Qemu-devel] [PATCH 05/21] qom: assert that public types have a non-NULL parent field

2012-05-02 Thread Paolo Bonzini
This protects against unwanted effects of changing TYPE_OBJECT from NULL to a string. Suggested by Andreas Faerber. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/object.h |1 - qom/object.c | 14 ++ 2 files changed, 10 insertions(+), 5 deletions(-)

Re: [Qemu-devel] [PATCH 11/21] qdev: move bus properties to abstract superclasses

2012-05-02 Thread Paolo Bonzini
This little bit of magic is a bit too magical for my taste. Polymorphism relies on the idea that a subclass overloads base class members/methods. From the base classes perspective, it's unaware if a subclass has overloaded something (that's allowed to be overloaded). This code doesn't

Re: [Qemu-devel] [PATCH] slirp: Untangle TCPOLEN_* from TCPOPT_*

2012-05-02 Thread Paolo Bonzini
But that would leave Illumos broken. I'd rather apply this one. Please do. The right solution for 1.2 is to understand the places in which slirp cannot use netinet/tcp.h constants (the MSS for example), and otherwise use that header. Paolo

Re: [Qemu-devel] [PATCH] slirp: Untangle TCPOLEN_* from TCPOPT_*

2012-05-02 Thread Andreas Färber
Am 02.05.2012 15:24, schrieb Paolo Bonzini: But that would leave Illumos broken. For the record, reverting would leave whatever Paolo was fixing broken but would restore Illumos. I'd rather apply this one. Please do. The right solution for 1.2 is to understand the places in which slirp

Re: [Qemu-devel] [SeaBIOS] [PATCH 11/12] Migrate 64bit entries to 64bit pci regions

2012-05-02 Thread Gerd Hoffmann
Hi, Is this just a matter of removing the if (pci_bdf_to_bus(pci-bdf) != 0) break from pci_bios_init_devices()? Seems to do the trick, at least the disks connected appear in the boot menu now and the seabios log file looks sane. The guest kernel has no virtio-scsi drivers though, need to

Re: [Qemu-devel] [PATCH] slirp: Untangle TCPOLEN_* from TCPOPT_*

2012-05-02 Thread Jan Kiszka
On 2012-05-02 10:40, Andreas Färber wrote: Am 02.05.2012 15:24, schrieb Paolo Bonzini: But that would leave Illumos broken. For the record, reverting would leave whatever Paolo was fixing broken but would restore Illumos. I'd rather apply this one. Please do. The right solution for 1.2

Re: [Qemu-devel] [PATCH qemu v2 0/6] -no-user-config option, move CPU models to /usr/share

2012-05-02 Thread Eduardo Habkost
Anthony, isn't this going to get in for 1.1? I was expecting it to be applied before the freeze. On Tue, Apr 24, 2012 at 05:32:55PM -0300, Eduardo Habkost wrote: Changes v1 - v2: - Move qemu_read_default_config_files() prototype to qemu-config.h - Make defconfig and userconfig variable

Re: [Qemu-devel] [PATCH qemu v2 0/6] -no-user-config option, move CPU models to /usr/share

2012-05-02 Thread Andreas Färber
Am 02.05.2012 15:50, schrieb Eduardo Habkost: Anthony, isn't this going to get in for 1.1? I was expecting it to be applied before the freeze. You wrote you would respin it with s/int/bool/. :) Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,

[Qemu-devel] [PATCH 0/2] pci: 64bit bits

2012-05-02 Thread Gerd Hoffmann
Hi, seabios (master branch) just got 64bit pci support. When running out of address space in the pci memory window below 4G (0xe000+) seabios will map 64bit pci bars above 4G to make room below 4G. This patch series carries two little patches for qemu to adapt it to the seabios changes.

[Qemu-devel] [PATCH 1/2] pc: add pci64 memory hole

2012-05-02 Thread Gerd Hoffmann
This patch adds a address space hole for 64bit PCI ressources. It starts at 0x80 (512 GB) and ends at 0x100 (1 TB), thus has 512 GB in size. This matches what the seabios is doing (latest master branch). Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/pc.c | 17

[Qemu-devel] [PATCH 2/2] ivshmem: add 64bit option

2012-05-02 Thread Gerd Hoffmann
This patch adds a use64 property which will make the ivshmem driver register a 64bit memory bar when set, so you have something to play with when testing 64bit pci bits. It also allows to have quite big shared memory regions, like this: [root@fedora ~]# lspci -vs1:1 01:01.0 RAM memory: Red Hat,

Re: [Qemu-devel] [PATCH qemu v2 0/6] -no-user-config option, move CPU models to /usr/share

2012-05-02 Thread Eduardo Habkost
On Wed, May 02, 2012 at 04:01:55PM +0200, Andreas Färber wrote: Am 02.05.2012 15:50, schrieb Eduardo Habkost: Anthony, isn't this going to get in for 1.1? I was expecting it to be applied before the freeze. You wrote you would respin it with s/int/bool/. :) I sent an additional patch

Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO

2012-05-02 Thread Christian Borntraeger
On 02/05/12 14:54, Alexander Graf wrote: On 05/02/2012 01:38 PM, Paolo Bonzini wrote: On 05/02/2012 01:26 PM, Paolo Bonzini wrote: and everyone should be happy :). I would really like to have as little #ifdef TARGET_S390 code in QEMU. And #ifdef __s390__ is even worse, as it means we won't

Re: [Qemu-devel] [PATCH] increase BlockConf.min_io_size type from uint16_t to uint32_t

2012-05-02 Thread Kevin Wolf
Am 02.05.2012 12:08, schrieb Michael Tokarev: 02.05.2012 13:57, Kevin Wolf пишет: Am 30.04.2012 17:52, schrieb Michael Tokarev: This value is used currently for virtio-blk only. It was defined as uint16_t before, which is the same as in kernel=user interface (in virtio_blk.h, struct

Re: [Qemu-devel] Poking a sun4v machine

2012-05-02 Thread Artyom Tarasenko
On Tue, May 1, 2012 at 4:06 PM, Blue Swirl blauwir...@gmail.com wrote: On Tue, May 1, 2012 at 13:54, Artyom Tarasenko atar4q...@gmail.com wrote: On Tue, May 1, 2012 at 11:25 AM, Blue Swirl blauwir...@gmail.com wrote: On Mon, Apr 30, 2012 at 17:38, Artyom Tarasenko atar4q...@gmail.com wrote: On

Re: [Qemu-devel] Poking a sun4v machine

2012-05-02 Thread Artyom Tarasenko
On Tue, May 1, 2012 at 3:54 PM, Blue Swirl blauwir...@gmail.com wrote: On Tue, May 1, 2012 at 13:33, Artyom Tarasenko atar4q...@gmail.com wrote: On Tue, May 1, 2012 at 11:19 AM, Blue Swirl blauwir...@gmail.com wrote: On Mon, Apr 30, 2012 at 16:39, Artyom Tarasenko atar4q...@gmail.com wrote:

Re: [Qemu-devel] [PATCH 2/3] geometry detection: use HDIO_GETGEO

2012-05-02 Thread Alexander Graf
On 02.05.2012, at 16:27, Christian Borntraeger borntrae...@de.ibm.com wrote: On 02/05/12 14:54, Alexander Graf wrote: On 05/02/2012 01:38 PM, Paolo Bonzini wrote: On 05/02/2012 01:26 PM, Paolo Bonzini wrote: and everyone should be happy :). I would really like to have as little #ifdef

Re: [Qemu-devel] Memory API: handling unassigned physical memory

2012-05-02 Thread Bob Breuer
On 5/1/2012 1:48 PM, Mark Cave-Ayland wrote: On 01/05/12 07:57, Blue Swirl wrote: Therefore I can't change it to my (modified) sbus_mmio_map() function because it would break other non-SPARC platforms, and AIUI there is nothing in the memory API that allows me to move a subregion to a

Re: [Qemu-devel] [PATCH 2/2] ivshmem: add 64bit option

2012-05-02 Thread Avi Kivity
On 05/02/2012 05:02 PM, Gerd Hoffmann wrote: This patch adds a use64 property which will make the ivshmem driver register a 64bit memory bar when set, so you have something to play with when testing 64bit pci bits. It also allows to have quite big shared memory regions, like this:

Re: [Qemu-devel] [PATCH 0/2] pci: 64bit bits

2012-05-02 Thread Avi Kivity
On 05/02/2012 05:02 PM, Gerd Hoffmann wrote: Hi, seabios (master branch) just got 64bit pci support. When running out of address space in the pci memory window below 4G (0xe000+) seabios will map 64bit pci bars above 4G to make room below 4G. This patch series carries two little

Re: [Qemu-devel] [PATCH] increase BlockConf.min_io_size type from uint16_t to uint32_t

2012-05-02 Thread Michael Tokarev
On 02.05.2012 18:35, Kevin Wolf wrote: [] As I already mentioned, the virtio protocol has the same defect (but there it is less serious due to usage of larger units). And that's where the additional overflow needs to be ELIMINATED, not just checked. Ie, the protocol should be changed somehow

Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-05-02 Thread Paul Moore
On Wednesday, May 02, 2012 12:54:21 AM Andreas Färber wrote: Am 01.05.2012 23:20, schrieb Paul Moore: FIPS 140-2 requires disabling certain ciphers, including DES, which is used by VNC to obscure passwords when they are sent over the network. The solution for FIPS users is to disable the

Re: [Qemu-devel] [PATCH 1/2] pc: add pci64 memory hole

2012-05-02 Thread Gerd Hoffmann
On 05/02/12 17:31, Avi Kivity wrote: On 05/02/2012 05:02 PM, Gerd Hoffmann wrote: This patch adds a address space hole for 64bit PCI ressources. It starts at 0x80 (512 GB) and ends at 0x100 (1 TB), thus has 512 GB in size. This matches what the seabios is doing (latest master

  1   2   >