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

2012-05-01 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,? > 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 qdev_device_help(

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

2012-05-01 Thread George Wilson
Anthony Liguori wrote on 05/01/2012 06:45:47 PM: > Anthony Liguori > 05/01/2012 06:45 PM > > To > > George Wilson/Austin/IBM@IBMUS > > cc > > Paul Moore , qemu-devel@nongnu.org > > Subject > > Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication > (security type 2) when in FIPS mode

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

2012-05-01 Thread George Wilson
Anthony Liguori wrote on 05/01/2012 06:26:05 PM: > Anthony Liguori > 05/01/2012 06:26 PM > > To > > Paul Moore > > cc > > qemu-devel@nongnu.org, George Wilson/Austin/IBM@IBMUS > > Subject > > Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication > (security type 2) when in FIPS mod

Re: [Qemu-devel] [V6 PATCH 0/4] Send gratuitous packets by guest

2012-05-01 Thread Jason Wang
Hi Anthony: Any more comments on the series? Thanks - Original Message - > This an update of series that let guest and qemu to be co-operated to > send gratuitous packets when needed (e.g after migration). > > As it's hard for qemu to track the network configuration in guest > such > as

[Qemu-devel] [PATCH V17 6/7] Introduce --enable-tpm-passthrough configure option

2012-05-01 Thread Stefan Berger
Introduce --enable-tpm-passthrough configure option. Signed-off-by: Stefan Berger --- configure | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 1b31811..c05d018 100755 --- a/configure +++ b/configure @@ -195,6 +195,7 @@ guest_a

[Qemu-devel] [PATCH V17 2/7] Add TPM (frontend) hardware interface (TPM TIS) to Qemu

2012-05-01 Thread Stefan Berger
This patch adds the main code of the TPM frontend driver, the TPM TIS interface, to Qemu. The code is largely based on the previous implementation for Xen but has been significantly extended to meet the standard's requirements, such as the support for changing of localities and all the functionalit

[Qemu-devel] [PATCH V17 1/7] Support for TPM command line options

2012-05-01 Thread Stefan Berger
This patch adds support for TPM command line options. The command line options supported here are ./qemu-... -tpmdev passthrough,path=,id= -device tpm-tis,tpmdev= and ./qemu-... -tpmdev ? where the latter works similar to -soundhw ? and shows a list of available TPM backends (for exa

[Qemu-devel] [PATCH V17 5/7] Add a TPM Passthrough backend driver implementation

2012-05-01 Thread Stefan Berger
>From Andreas Niederl's original posting with adaptations where necessary: This patch is based of off version 9 of Stefan Berger's patch series "Qemu Trusted Platform Module (TPM) integration" and adds a new backend driver for it. This patch adds a passthrough backend driver for passing command

[Qemu-devel] [PATCH V17 7/7] Add fd parameter for TPM passthrough driver

2012-05-01 Thread Stefan Berger
Enable the passing of a file descriptor via fd=<..> to access the host's TPM device using the TPM passthrough driver. Signed-off-by: Stefan Berger --- hmp.c|7 +- hw/tpm_passthrough.c | 57 +++-- qapi-schema.json |4 ++

[Qemu-devel] [PATCH V17 0/7] Qemu Trusted Platform Module (TPM) integration

2012-05-01 Thread Stefan Berger
The following series of patches adds TPM (Trusted Platform Module) support to Qemu. An emulator for the TIS (TPM Interface Spec) interface is added that provides the basis for accessing a 'backend' implementing the actual TPM functionality. The TIS emulator serves as a 'frontend' enabling for examp

[Qemu-devel] [PATCH V17 4/7] Build the TPM frontend code

2012-05-01 Thread Stefan Berger
Build the TPM frontend code that has been added so far. Signed-off-by: Stefan Berger --- Makefile.target |2 ++ configure | 11 +++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/Makefile.target b/Makefile.target index 1582904..cdf108a 100644 --- a/Makefile.t

[Qemu-devel] [PATCH V17 3/7] Add a debug register

2012-05-01 Thread Stefan Berger
This patch uses the possibility to add a vendor-specific register and adds a debug register useful for dumping the TIS's internal state. This register is only active in a debug build (#define DEBUG_TIS). Signed-off-by: Stefan Berger --- hw/tpm_tis.c | 70 +++

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

2012-05-01 Thread Anthony Liguori
On 05/01/2012 06:43 PM, George Wilson wrote: Anthony Liguori wrote on 05/01/2012 06:26:05 PM: Anthony Liguori 05/01/2012 06:26 PM To Paul Moore cc qemu-devel@nongnu.org, George Wilson/Austin/IBM@IBMUS Subject Re: [Qemu-devel] [PATCH] vnc: disable VNC password authentication (security ty

Re: [Qemu-devel] [PATCH V16 1/7] Support for TPM command line options

2012-05-01 Thread Anthony Liguori
On 04/30/2012 07:16 AM, Stefan Berger wrote: This patch adds support for TPM command line options. The command line options supported here are ./qemu-... -tpmdev passthrough,path=,id= -device tpm-tis,tpmdev= and ./qemu-... -tpmdev ? where the latter works similar to -soundhw ? and

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

2012-05-01 Thread Anthony Liguori
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 use of VNC password auth when the host system is operating in FIPS

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

2012-05-01 Thread Andreas Färber
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 use of VNC password auth when the > host system is operating in

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

2012-05-01 Thread Andreas Färber
Am 02.05.2012 00:24, schrieb Anthony Liguori: > On 05/01/2012 02:34 PM, Andreas Färber wrote: >> Am 01.05.2012 20:18, schrieb Anthony Liguori: >>> +#define IDE_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS) >> >> Move macro to preceding patch? > > Do you mean an independent patch? Sorry, I re

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

2012-05-01 Thread Anthony Liguori
On 05/01/2012 02:34 PM, Andreas Färber wrote: Am 01.05.2012 20:18, schrieb Anthony Liguori: It should have never been a bus method. Signed-off-by: Anthony Liguori --- [...] diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 4a468f8..5044018 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -25,

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

2012-05-01 Thread Anthony Liguori
On 05/01/2012 05:18 PM, Andreas Färber wrote: Am 01.05.2012 23:47, schrieb Paolo Bonzini: I think it's too late for this series to go into 1.1. In that case this is calling for a qom-next branch... I really prefer to do this for 1.1. We've got a large enough testing window and these patche

Re: [Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties

2012-05-01 Thread Anthony Liguori
On 05/01/2012 05:12 PM, Paolo Bonzini wrote: Il 02/05/2012 00:01, Anthony Liguori ha scritto: There's magic in the qdev layer now to decide whether a Property in the array of properties becomes a legacy or static property (it's only ever exposed as one type). I don't think this is true: a leg

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

2012-05-01 Thread Anthony Liguori
On 05/01/2012 05:15 PM, Eric Blake wrote: On 05/01/2012 03:53 PM, Anthony Liguori wrote: I think (correct me if I'm wrong) libvirt should be aware of any file that qemu asks it to open. So from a security point of view, libvirt can prevent opening a file if it isn't affiliated with the guest.

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

2012-05-01 Thread Anthony Liguori
On 05/01/2012 04:47 PM, Paolo Bonzini wrote: Il 01/05/2012 22:46, Anthony Liguori ha scritto: So I think we can safely break it :-) Does this work with compat properties set on a bus? No :-( This is pretty easy to fix though. The attached should do the trick, I'll update and send out.

[Qemu-devel] [PATCH 2/2] Declare state directory in smb.conf

2012-05-01 Thread Jan Kiszka
From: Nikolaus Rath The smb.conf generated by the userspace networking does not include a state directory directive. Samba therefore falls back to the default value. Since the user generally does not have write access to this path, smbd immediately crashes. The "state directory" option was add

[Qemu-devel] [PATCH 1/2] slirp: don't use "smb ports = 0" option

2012-05-01 Thread Jan Kiszka
From: Nikolaus Rath The "smb ports = 0" option causes recent samba versions to crash. It was introduced in commit 15ef3e with log message "Samba 3 support". However, a value of 0 has never been officially supported by smb and is also not necessary: if stdin is a socket, smb does not try to li

[Qemu-devel] [PATCH 0/2] [PULL] slirp: Fixes for latest smbd versions

2012-05-01 Thread Jan Kiszka
The following changes since commit 65074706b9353bae7307fcfcbbf63a36f6896aa7: linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts (2012-05-01 23:44:43 +0400) are available in the git repository at: git://git.kiszka.org/qemu.git queues/slirp CC: Nikolaus Rath Nikolaus Rath (2): slirp:

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

2012-05-01 Thread Andreas Färber
Am 01.05.2012 23:47, schrieb Paolo Bonzini: > I think it's too late for this series to go into 1.1. In that case this is calling for a qom-next branch... Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nü

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

2012-05-01 Thread Eric Blake
On 05/01/2012 03:53 PM, Anthony Liguori wrote: >> I think (correct me if I'm wrong) libvirt should be aware of any file >> that qemu >> asks it to open. So from a security point of view, libvirt can prevent >> opening a >> file if it isn't affiliated with the guest. > > Right, libvirt can maintai

Re: [Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties

2012-05-01 Thread Paolo Bonzini
Il 02/05/2012 00:01, Anthony Liguori ha scritto: > > There's magic in the qdev layer now to decide whether a Property in the > array of properties becomes a legacy or static property (it's only ever > exposed as one type). I don't think this is true: a legacy property always has a static counterp

[Qemu-devel] [PATCH RESEND for-1.1] linux-user: Clean up interim solution for exit syscall

2012-05-01 Thread Andreas Färber
After all target CPUs have been QOM'ified, we no longer need an #ifdef to switch between object_delete() and g_free() in NPTL thread exit. Signed-off-by: Andreas Färber --- linux-user/syscall.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b/lin

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

2012-05-01 Thread 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 use of VNC password auth when the host system is operating in FIPS mode. This patch causes qemu to emits a sys

Re: [Qemu-devel] [PATCH v2 0/2] QEMU copyright update

2012-05-01 Thread Andreas Färber
Am 27.04.2012 12:08, schrieb Andreas Färber: > Hello, > > For 1.0 I had brought up the issue that the copyright statement reads 2008. Ping for 1.1-rc0. /-F > Mentor Graphics have solved this for their Sourcery CodeBench fork by > printing: > Copyright (c) 2003-2008 Fabrice Bellard, 2008-2011 M

Re: [Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties

2012-05-01 Thread Anthony Liguori
On 05/01/2012 03:57 PM, Peter Maydell wrote: On 1 May 2012 21:48, Anthony Liguori wrote: Legacy properties != static properties. qdev_add_properties adds both legacy and static properties. I'm happy to put static properties into object but not legacy properties. So, er, how are you defining

Re: [Qemu-devel] [PATCH v5 0/7] add fixed-width visitors and serialization tests/fixes

2012-05-01 Thread Andreas Färber
Am 27.04.2012 22:21, schrieb Michael Roth: > These patches apply on top of qemu.git master, and can also be obtained from: > git://github.com/mdroth/qemu.git visitor-fixed-width-v5 I've tested that branch by running some random guests without noticeable problems and by testing X86CPU level/xlevel

Re: [Qemu-devel] [PATCH 7/7] qdev: switch property accessors to fixed-width visitor interfaces

2012-05-01 Thread Andreas Färber
Am 27.04.2012 22:21, schrieb Michael Roth: > Signed-off-by: Michael Roth Reviewed-by: Andreas Färber /-F -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

2012-05-01 Thread Anthony Liguori
On 05/01/2012 04:45 PM, Corey Bryant wrote: On 05/01/2012 04:25 PM, Anthony Liguori wrote: 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 no

Re: [Qemu-devel] [PATCH 6/7] qdev: use int32_t container for devfn property

2012-05-01 Thread Andreas Färber
Am 27.04.2012 22:21, schrieb 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 i

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

2012-05-01 Thread Anthony Liguori
On 05/01/2012 03:56 PM, Eric Blake wrote: On 05/01/2012 02:25 PM, Anthony Liguori wrote: Thanks for sending this out Stefan. Indeed. This series adds the -open-hook-fd command-line option. Whenever QEMU needs to open an image file it sends a request over the given UNIX domain socket. The

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

2012-05-01 Thread Paolo Bonzini
Il 01/05/2012 22:46, Anthony Liguori ha scritto: >>> >>> >>> So I think we can safely break it :-) >> >> Does this work with compat properties set on a bus? > > No :-( > > This is pretty easy to fix though. The attached should do the trick, > I'll update and send out. > > Even if it does, >>

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

2012-05-01 Thread Corey Bryant
On 05/01/2012 04:25 PM, Anthony Liguori wrote: 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 beca

Re: [Qemu-devel] [PATCH v6 4/7] qapi: String visitor, use %f representation for floats

2012-05-01 Thread Andreas Färber
Am 30.04.2012 16:33, schrieb Michael Roth: > Currently string-output-visitor formats floats as %g, which is nice in > that trailing 0's are automatically truncated, but otherwise this causes > some issues: > > - it uses 6 significant figures instead of 6 decimal places, which >means something

Re: [Qemu-devel] [PATCH 1/7] qapi: add Visitor interfaces for uint*_t and int*_t

2012-05-01 Thread Andreas Färber
Am 27.04.2012 22:21, schrieb 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

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

2012-05-01 Thread Andreas Färber
Am 01.05.2012 20:50, schrieb Mark Cave-Ayland: > On 01/05/12 08:10, Blue Swirl wrote: >> The signal dma_enabled should be eventually replaced by a Pin. > > And this is a sysbus concept, yes? No, it'll be a general DeviceState concept. SysBus is supposed to die out gradually. Andreas -- SUSE LI

Re: [Qemu-devel] [PATCH 3/8] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts

2012-05-01 Thread Andreas Färber
Am 01.05.2012 22:51, schrieb Stefan Weil: > Am 01.05.2012 21:50, schrieb Alexander Graf: >> On my PPC host, HOST_LONG_SIZE is not defined even after >> running configure. Use the normal C way of determining the >> long size instead. >> >> Signed-off-by: Alexander Graf >> --- >> thunk.h | 2 +- >> 1

Re: [Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties

2012-05-01 Thread Andreas Färber
Am 01.05.2012 22:37, schrieb Anthony Liguori: > On 05/01/2012 02:05 PM, Andreas Färber wrote: >> Am 01.05.2012 20:18, schrieb Anthony Liguori: >>> This allows a base class to easily add properties. >>> >>> Signed-off-by: Anthony Liguori >> >> Implementation looks okay but /me not so happy with it:

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

2012-05-01 Thread Eric Blake
On 05/01/2012 02:25 PM, Anthony Liguori wrote: > Thanks for sending this out Stefan. Indeed. >> This series adds the -open-hook-fd command-line option. Whenever QEMU >> needs to >> open an image file it sends a request over the given UNIX domain >> socket. The >> response includes the file des

Re: [Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties

2012-05-01 Thread Peter Maydell
On 1 May 2012 21:48, Anthony Liguori wrote: > Legacy properties != static properties. > > qdev_add_properties adds both legacy and static properties.  I'm happy to > put static properties into object but not legacy properties. So, er, how are you defining legacy and static properties? I would hav

Re: [Qemu-devel] [PATCH 3/8] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts

2012-05-01 Thread Stefan Weil
Am 01.05.2012 21:50, schrieb Alexander Graf: On my PPC host, HOST_LONG_SIZE is not defined even after running configure. Use the normal C way of determining the long size instead. Signed-off-by: Alexander Graf --- thunk.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/thu

Re: [Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties

2012-05-01 Thread Anthony Liguori
On 05/01/2012 03:43 PM, Andreas Färber wrote: Am 01.05.2012 22:37, schrieb Anthony Liguori: On 05/01/2012 02:05 PM, Andreas Färber wrote: Am 01.05.2012 20:18, schrieb Anthony Liguori: This allows a base class to easily add properties. Signed-off-by: Anthony Liguori Implementation looks okay

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

2012-05-01 Thread Anthony Liguori
On 05/01/2012 03:37 PM, Paolo Bonzini wrote: Il 01/05/2012 20:18, Anthony Liguori ha scritto: This is technically a compatibility breaker. However: 1) libvirt does not rely on this (it always uses the driver name) 2) This behavior isn't actually documented anywhere (the docs just say driver).

[Qemu-devel] [PULL 0/8] ppc patch queue 2012-05-01

2012-05-01 Thread Alexander Graf
Hi Anthony, This is my current patch queue for ppc. Please pull. Alex The following changes since commit 42fe1c245f0239ebcdc084740a1777ac3699d071: Stefan Weil (1): main-loop: Fix build for w32 and w64 are available in the git repository at: git://repo.or.cz/qemu/agraf.git ppc-for-

[Qemu-devel] [PATCH 7/8] ppce500_spin: Replace assert by hw_error (fixes compiler warning)

2012-05-01 Thread Alexander Graf
From: Stefan Weil The default case in function spin_read should never be reached, therefore the old code used assert(0) to abort QEMU. This does not work when QEMU is compiled with macro NDEBUG defined. In this case (and also when the compiler does not know that assert never returns), there is a

Re: [Qemu-devel] [PATCH 08/14] qdev: convert busses to QEMU Object Model

2012-05-01 Thread Anthony Liguori
On 05/01/2012 02:31 PM, Andreas Färber wrote: Am 01.05.2012 20:18, schrieb Anthony Liguori: This is far less interesting than it sounds. We simply add an Object to each BusInfo and then register the types appropriately. Most of the interesting refactoring will follow in the next patches. Sinc

Re: [Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties

2012-05-01 Thread Anthony Liguori
On 05/01/2012 02:05 PM, Andreas Färber wrote: Am 01.05.2012 20:18, schrieb Anthony Liguori: This allows a base class to easily add properties. Signed-off-by: Anthony Liguori Implementation looks okay but /me not so happy with it: This conflicts with the move of the qdev static property infras

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

2012-05-01 Thread Paolo Bonzini
Il 01/05/2012 20:18, Anthony Liguori ha scritto: > This is technically a compatibility breaker. However: > > 1) libvirt does not rely on this (it always uses the driver name) > > 2) This behavior isn't actually documented anywhere (the docs just say > driver). > > 3) I suspect there are less t

[Qemu-devel] [PATCH 5/8] pseries: Use the same interrupt swizzling for host bridges as p2p bridges

2012-05-01 Thread Alexander Graf
From: David Gibson Currently the pseries PCI code uses a somewhat strange scheme of PCI irq allocation - one per slot up to a maximum that's greater than the usual 4. This scheme more or less worked, because we were able to tell the guest the irq mapping in the device tree, however it's a bit odd

[Qemu-devel] [PATCH 8/8] target-ppc: Some support for dumping TLB_EMB TLBs

2012-05-01 Thread Alexander Graf
From: François Revol Add mmubooke_dump_mmu(). TODO: Add printing of individual flags. Signed-off-by: François Revol [agraf: fix coding style] Signed-off-by: Alexander Graf --- target-ppc/helper.c | 50 ++ 1 files changed, 50 insertions(+), 0

[Qemu-devel] [PULL 0/5] Tracing patches for 1.1

2012-05-01 Thread Stefan Hajnoczi
This pull request is for QEMU 1.1 and fixes tracetool Python compatibility issues. This makes it possible to run all the way back to Python 2.4. These patches are required so that QEMU can be built with tracing on older systems. The following changes since commit b754e4fc1e8e68af975c545c38ebc3b0

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

2012-05-01 Thread 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 because it prevents the attacker from escaping the QE

[Qemu-devel] [PATCH 1/8] booke:Use MMU API for creating initial mapping for secondary cpus

2012-05-01 Thread Alexander Graf
From: Bharat Bhushan Initial Mapping creation for secondary CPU in SMP was missing new MMU API. Signed-off-by: Bharat Bhushan Signed-off-by: Alexander Graf --- hw/ppce500_spin.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/ppce500_spin.c b/hw/ppce500_spin.c inde

[Qemu-devel] [PATCH 3/8] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts

2012-05-01 Thread Alexander Graf
On my PPC host, HOST_LONG_SIZE is not defined even after running configure. Use the normal C way of determining the long size instead. Signed-off-by: Alexander Graf --- thunk.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/thunk.h b/thunk.h index 5be8f91..87025c3 1006

[Qemu-devel] [PATCH 2/5] tracetool: use Python 2.4-compatible __import__() arguments

2012-05-01 Thread Stefan Hajnoczi
In Python 2.5 keyword arguments were added to __import__(). Avoid using them to achieve Python 2.4 compatibility. Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova --- scripts/tracetool/__init__.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tracetoo

[Qemu-devel] [PATCH 3/5] tracetool: avoid str.rpartition() Python 2.5 function

2012-05-01 Thread Stefan Hajnoczi
The str.rpartition() function is related to str.split() and is used for splitting strings. It was introduced in Python 2.5 and therefore cannot be used in tracetool as Python 2.4 compatibility is required. Replace the code using str.rsplit(). Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vi

[Qemu-devel] [PATCH 2/8] PPC: Fix up e500 cache size setting

2012-05-01 Thread Alexander Graf
When initializing the e500 code, we need to expose its cache line size for user and system mode, while the mmu details are only interesting for system emulation. Split the 2 switch statements apart, allowing us to #ifdef out the mmu parts for user mode emulation while keeping all cache information

[Qemu-devel] [PATCH 6/8] pseries: Fix use of global CPU state

2012-05-01 Thread Alexander Graf
From: Peter Portante Commit ed120055c7f9b26b5707d3ceabbe5a3f06aaf937 (Implement PAPR VPA functions for pSeries shared processor partitions) introduced the deregister_dtl() function and typo "emv" as name of its argument. This went unnoticed because the code in that function can access the global

[Qemu-devel] [PATCH 4/5] tracetool: avoid pkgutil.iter_modules() Python 2.7 function

2012-05-01 Thread Stefan Hajnoczi
The pkgutil.iter_modules() function provides a way to enumerate child modules. Unfortunately it's missing in Python <2.7 so we must implement similar behavior ourselves. Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova --- scripts/tracetool/backend/__init__.py |8 ++-- script

[Qemu-devel] [PATCH 5/5] configure: check for supported Python 2.x versions

2012-05-01 Thread Stefan Hajnoczi
The tracetool code requires Python 2.4, which was released in 2004. Check for a supported Python version so we can give a clear error message. Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova --- configure |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/c

[Qemu-devel] [PATCH 4/8] pseries: Implement automatic PAPR VIO address allocation

2012-05-01 Thread Alexander Graf
From: David Gibson PAPR virtual IO (VIO) devices require a unique, but otherwise arbitrary, "address" used as a token to the hypercalls which manipulate them. Currently the pseries machine code does an ok job of allocating these addresses when the legacy -net nic / -serial and so forth options a

Re: [Qemu-devel] [PATCH 3/8] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts

2012-05-01 Thread Alexander Graf
On 01.05.2012, at 21:11, Peter Maydell wrote: > On 1 May 2012 19:54, Alexander Graf wrote: >> >> On 01.05.2012, at 20:32, Andreas Färber wrote: >> >>> Am 01.05.2012 10:58, schrieb Alexander Graf: On my PPC host, HOST_LONG_SIZE is not defined even after running configure. Use the norm

Re: [Qemu-devel] [PATCH 09/14] qdev: connect some links and move type to object (v2)

2012-05-01 Thread Andreas Färber
Am 01.05.2012 20:18, schrieb Anthony Liguori: > This makes sysbus part of the root hierarchy and all busses children of their > respective parent DeviceState. > > Signed-off-by: Anthony Liguori This conflicts with Paolo's patch set but since this one is less intrusive (hardcoding the base init r

Re: [Qemu-devel] [PATCH 12/14] qbus: move print_dev to DeviceClass

2012-05-01 Thread Andreas Färber
Am 01.05.2012 20:18, schrieb Anthony Liguori: > It should have never been a bus method. > > Signed-off-by: Anthony Liguori Looks good, Reviewed-by: Andreas Färber /-F -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16

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

2012-05-01 Thread Andreas Färber
Am 01.05.2012 20:18, schrieb Anthony Liguori: > It should have never been a bus method. > > Signed-off-by: Anthony Liguori > --- [...] > diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c > index 4a468f8..5044018 100644 > --- a/hw/ide/qdev.c > +++ b/hw/ide/qdev.c > @@ -25,22 +25,13 @@ > > /* -

Re: [Qemu-devel] [PATCH 08/14] qdev: convert busses to QEMU Object Model

2012-05-01 Thread Andreas Färber
Am 01.05.2012 20:18, schrieb Anthony Liguori: > This is far less interesting than it sounds. We simply add an Object to each > BusInfo and then register the types appropriately. Most of the interesting > refactoring will follow in the next patches. > > Since we're changing fundamental type names

[Qemu-devel] [PATCH 1/5] tracetool: use Python 2.4-compatible exception handling syntax

2012-05-01 Thread Stefan Hajnoczi
The newer "except as :" syntax is not supported by Python 2.4, we need to use "except , :". Tested all trace backends with Python 2.4. Reported-by: Andreas Färber Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova --- scripts/tracetool.py |4 ++-- 1 file changed, 2 insertions(+),

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

2012-05-01 Thread Mark Cave-Ayland
On 01/05/12 08:10, Blue Swirl wrote: In your view, would a suitable fix be to change dma_memory_read, dma_memory_write, dma_opaque, it_shift and dma_enabled to be qdev properties and modify esp_init() to return the qdev reference so they can be set by the caller? There's an ongoing work to int

Re: [Qemu-devel] [PATCH 3/8] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts

2012-05-01 Thread Peter Maydell
On 1 May 2012 19:54, Alexander Graf wrote: > > On 01.05.2012, at 20:32, Andreas Färber wrote: > >> Am 01.05.2012 10:58, schrieb Alexander Graf: >>> On my PPC host, HOST_LONG_SIZE is not defined even after >>> running configure. Use the normal C way of determining the >>> long size instead. >>> >>>

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

2012-05-01 Thread Anthony Liguori
It should have never been a bus method. Signed-off-by: Anthony Liguori --- hw/pci.c | 75 - hw/qdev.c | 11 ++-- hw/qdev.h |2 +- hw/scsi-bus.c | 10 hw/usb/bus.c | 41 +++

Re: [Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties

2012-05-01 Thread Andreas Färber
Am 01.05.2012 20:18, schrieb Anthony Liguori: > This allows a base class to easily add properties. > > Signed-off-by: Anthony Liguori Implementation looks okay but /me not so happy with it: This conflicts with the move of the qdev static property infrastructure from DeviceState to Object. Consi

[Qemu-devel] [PATCH 03/14] qdev: add qdev_add_properties

2012-05-01 Thread Anthony Liguori
This allows a base class to easily add properties. Signed-off-by: Anthony Liguori --- hw/qdev.c | 25 - hw/qdev.h |2 ++ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 6a8f6bd..e17a9ab 100644 --- a/hw/qdev.c +++ b/hw/qde

[Qemu-devel] [PATCH 09/14] qdev: connect some links and move type to object (v2)

2012-05-01 Thread Anthony Liguori
This makes sysbus part of the root hierarchy and all busses children of their respective parent DeviceState. Signed-off-by: Anthony Liguori --- v1 -> v2 - move sysbus to /machine/unattached (Andreas) --- hw/qdev.c| 12 ++-- qom/object.c | 12 2 files changed, 18 ins

[Qemu-devel] [PULL 0/7] s390 patch queue 2012-05-01

2012-05-01 Thread Alexander Graf
Hi Anthony, This is my current patch queue for s390. Please pull. Alex The following changes since commit b754e4fc1e8e68af975c545c38ebc3b001ebc98f: malc (1): Remove stray HOST_LONG_SIZE are available in the git repository at: git://repo.or.cz/qemu/agraf.git s390-for-upstream Chri

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

2012-05-01 Thread Peter Maydell
On 1 May 2012 19:57, Mark Cave-Ayland wrote: > On 01/05/12 16:20, Peter Maydell wrote: > >>> Correctness is more important to me than brevity. >>> >>> And really, we should focus on killing things like i8259_init(). >> >> >> Functions like i8259_init() exist precisely because >> QOM/qdev don't pro

Re: [Qemu-devel] [PATCH 02/14] object: add object_property_foreach

2012-05-01 Thread Andreas Färber
Am 01.05.2012 20:18, schrieb Anthony Liguori: > Provide a mechanism to walk through each property for an object. > > Signed-off-by: Anthony Liguori Reviewed-by: Andreas Färber /-F -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendör

[Qemu-devel] [PATCH 02/14] object: add object_property_foreach

2012-05-01 Thread Anthony Liguori
Provide a mechanism to walk through each property for an object. Signed-off-by: Anthony Liguori --- include/qemu/object.h | 26 ++ qom/object.c | 10 ++ 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/include/qemu/object.h b/include/qe

Re: [Qemu-devel] [PATCH] tests: add gcov target

2012-05-01 Thread Blue Swirl
On Tue, May 1, 2012 at 18:49, Blue Swirl wrote: > Add support for compiling for GCOV test coverage, enabled > with '--enable-gcov' during configure. > > After tests, test coverage can be reported with 'make gcov'. This is how it looks like: File '/src/qemu/qjson.c' Lines executed:86.52% of 141 F

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

2012-05-01 Thread Mark Cave-Ayland
On 01/05/12 16:20, Peter Maydell wrote: Correctness is more important to me than brevity. And really, we should focus on killing things like i8259_init(). Functions like i8259_init() exist precisely because QOM/qdev don't provide brevity and people trying to use these devices do in fact value

Re: [Qemu-devel] [PATCH 3/8] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts

2012-05-01 Thread Alexander Graf
On 01.05.2012, at 20:32, Andreas Färber wrote: > Am 01.05.2012 10:58, schrieb Alexander Graf: >> On my PPC host, HOST_LONG_SIZE is not defined even after >> running configure. Use the normal C way of determining the >> long size instead. >> >> Signed-off-by: Alexander Graf >> --- >> thunk.h |

[Qemu-devel] [PATCH 08/14] qdev: convert busses to QEMU Object Model

2012-05-01 Thread Anthony Liguori
This is far less interesting than it sounds. We simply add an Object to each BusInfo 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 -> BusClass), it all needs to convert at once.

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

2012-05-01 Thread Anthony Liguori
It should have never been a bus method. Signed-off-by: Anthony Liguori --- hw/ide/qdev.c | 33 + hw/isa-bus.c | 31 +++ hw/pci.c | 31 +++ hw/qdev.c | 10 +- hw/qdev.h |2 +-

[Qemu-devel] [PATCH 06/14] qdev: move properties from businfo to base class instance init

2012-05-01 Thread Anthony Liguori
This removes knowledge of specific DeviceState subclasses from BusInfos. Signed-off-by: Anthony Liguori --- hw/i2c.c | 15 +++ hw/ide/qdev.c | 15 +++ hw/intel-hda.c| 15 +++ hw/pci.c

[Qemu-devel] [PATCH] tests: add gcov target

2012-05-01 Thread Blue Swirl
Add support for compiling for GCOV test coverage, enabled with '--enable-gcov' during configure. After tests, test coverage can be reported with 'make gcov'. Add LDFLAGS (which may include GCOV flags) to libcacard Makefile to avoid a build breakage. Signed-off-by: Blue Swirl --- configure

[Qemu-devel] [PATCH 01/14] qdev: fix adding of ptr properties

2012-05-01 Thread Anthony Liguori
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 --- hw/qdev.c |5 - 1 files change

[Qemu-devel] [PATCH 0/14] qom: convert busses to QOM (v2)

2012-05-01 Thread Anthony Liguori
This is the last of the core QOM series. This series converts busses to QOM using a model where busses are proper objects that inherit from Object directly. Devices have a has-a relationship with any bus they implement. This series also creates link associated with the device/bus relationships.

Re: [Qemu-devel] Poking a sun4v machine

2012-05-01 Thread Alexander Graf
On 30.04.2012, at 19:15, Andreas Färber wrote: > Am 30.04.2012 18:39, schrieb Artyom Tarasenko: >> Tried to boot QEMU Niagara machine with the firmware from the >> OpenSPARC T1 emulator ( www.opensparc.net/opensparc-t1/download.html ) >> , and it dies very early. >> The reason: in translate.c >>

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

2012-05-01 Thread Mark Cave-Ayland
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 different MemoryRegion parent, even if I can get a refe

[Qemu-devel] [PATCH 13/14] qbus: make child devices links

2012-05-01 Thread Anthony Liguori
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 Liguori --- hw/acpi_piix4.c | 10

[Qemu-devel] [PATCH 12/14] qbus: move print_dev to DeviceClass

2012-05-01 Thread Anthony Liguori
It should have never been a bus method. Signed-off-by: Anthony Liguori --- hw/isa-bus.c | 37 -- hw/pci.c | 79 +++ hw/qdev-monitor.c | 10 +++--- hw/qdev.h |3 +- hw/sysbus.c

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

2012-05-01 Thread Anthony Liguori
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 okay. This commit makes info qtree/qdm work again. Signed

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

2012-05-01 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/qdev.c | 84 + 1 files changed, 51 insertions(+), 33 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 166c599..f637351 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -434,40 +434,35 @@ DeviceState

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

2012-05-01 Thread Anthony Liguori
This makes it easier to remove it from BusInfo. Signed-off-by: Anthony Liguori --- exec.c|4 ++-- hw/qdev.c | 16 hw/qdev.h |2 ++ hw/usb/desc.c |7 +-- savevm.c | 12 ++-- 5 files changed, 31 insertions(+), 10 deletions(-) diff

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

2012-05-01 Thread Anthony Liguori
This is technically a compatibility breaker. However: 1) libvirt does not rely on this (it always uses the driver name) 2) This behavior isn't actually documented anywhere (the docs just say driver). 3) I suspect there are less than three people on earth that even know this is possible (minu

  1   2   >