Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-03 Thread Igor Mammedov
On Wed, 3 Oct 2012 13:54:34 -0300 Eduardo Habkost wrote: > On Wed, Oct 03, 2012 at 06:24:11PM +0200, Igor Mammedov wrote: > > On Wed, 03 Oct 2012 17:20:46 +0200 > > Paolo Bonzini wrote: > > > > > Il 03/10/2012 17:03, Eduardo Habkost ha scritto: > > > > On Tue, Oct 02, 2012 at 05:38:45PM -0300,

Re: [Qemu-devel] [RFC v1 00/22] Integrate DMA into the memory API

2012-10-03 Thread Avi Kivity
Adding missing cc's: there are minor changes to vfio and xen here, please review and test. On 10/03/2012 06:03 PM, Avi Kivity wrote: > Most of the work on the memory API focused on memory access targets - the > memory regions > and how they are composed into an address space. This patchset tackl

Re: [Qemu-devel] [RFC v1 19/22] memory: per-AddressSpace dispatch

2012-10-03 Thread Avi Kivity
On 10/03/2012 10:24 PM, Blue Swirl wrote: > > > > #else > > -void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, > > -int len, int is_write) > > + > > +void address_space_rw(AddressSpace *as, target_phys_addr_t addr, uint8_t > > *buf, > > +

Re: [Qemu-devel] [RFC v1 03/22] kvm: use separate MemoryListeners for memory and I/O

2012-10-03 Thread Avi Kivity
On 10/03/2012 10:16 PM, Blue Swirl wrote: > > +static MemoryListener kvm_io_listener = { > > const > There is a list link field in there. It's a mixed data/ops structure (perhaps we should make it a traditional ->ops-> pointer). -- I have a truly marvellous patch that fixes the bug which this s

Re: [Qemu-devel] Block Migration and xbzrle

2012-10-03 Thread Peter Lieven
Am 02.10.2012 um 12:40 schrieb Orit Wasserman: > On 10/02/2012 11:30 AM, Peter Lieven wrote: >> >> Am 02.10.2012 um 11:28 schrieb Orit Wasserman: >> >>> On 10/02/2012 10:33 AM, lieven-li...@dlh.net wrote: Orit Wasserman wrote: > On 09/16/2012 01:39 PM, Peter Lieven wrote: >> Hi, >>

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
Stefan Weil writes: > That's strange. > > The lines which cause compiler errors look like this: > > vfio_eoi(DO_UPCAST(VFIODevice, bars[bar->nr], bar)); > > There are more uses of DO_UPCAST without any compiler error: > > VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, pdev); > > Neither o

Re: [Qemu-devel] [PATCH] cadence_ttc: Fix 'clear on read' behavior

2012-10-03 Thread Peter Crosthwaite
Thanks Peter, For little patches arm-devs might be easier. Regards, Peter On Wed, Oct 3, 2012 at 11:18 PM, Peter Maydell wrote: > On 3 October 2012 14:09, Peter Crosthwaite > wrote: >> Ping! >> >> Should this go via arm-devs or create a zynq-specific queue? > > I'm happy to put it in arm-devs

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
Richard Henderson writes: >> diff --git a/osdep.h b/osdep.h >> index cb213e0..df89552 100644 >> --- a/osdep.h >> +++ b/osdep.h >> @@ -41,8 +41,9 @@ typedef signed int int_fast16_t; >> #endif >> >> /* Convert from a base type to a parent type, with compile time checking. >> */ >

Re: [Qemu-devel] [PATCH] hw: Add test device for unittests execution

2012-10-03 Thread Lucas Meneghel Rodrigues
On 10/04/2012 12:49 AM, Lucas Meneghel Rodrigues wrote: Add a test device which supports the kvmctl ioports, so one can run the KVM unittest suite [1]. Usage: qemu -device testdev 1) Removed port 0xf1, since now kvm-unit-tests use serial 2) Removed exit code port 0xf4, since that can be

[Qemu-devel] [PATCH] hw: Add test device for unittests execution

2012-10-03 Thread Lucas Meneghel Rodrigues
Add a test device which supports the kvmctl ioports, so one can run the KVM unittest suite [1]. Usage: qemu -device testdev 1) Removed port 0xf1, since now kvm-unit-tests use serial 2) Removed exit code port 0xf4, since that can be replaced by -device isa-debugexit,iobase=0xf4,access-siz

Re: [Qemu-devel] MIPS DSP for Qemu

2012-10-03 Thread Wei-Ren Chen
> I would like to still submit our patches . > > Please advise. > > Out port is complete and already tested to a level which would be > difficult for someone else to do that does not have access to our AVP > test suite. What about Jia's patch? Regards, chenwj -- Wei-Ren Chen (陳韋任) Compute

[Qemu-devel] [PATCH v2 4/4] zynq_slcr: Implement CPU reset and halting

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Implement the CPU reset and halt functions of the A9_CPU_RST_CTRL register (offset 0x244). Signed-off-by: Peter A. G. Crosthwaite --- hw/zynq_slcr.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/hw/zynq_slcr.c b/hw/zyn

[Qemu-devel] [PATCH v2 3/4] zynq_slcr: Fixed ResetValues enum

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite There is a gap in the reset region of the address space at offset 0x208. This throws out all these enum values by one when translating them to address offsets. Fixed by putting the corresponding gap in the enum as well. Signed-off-by: Peter A. G. Crosthwaite ---

[Qemu-devel] [PATCH v2 2/4] zynq_slcr: Add links to the CPUs

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite The SLCR needs to be able to reset the CPUs, so link the CPUs to the slcr. Signed-off-by: Peter A. G. Crosthwaite --- hw/xilinx_zynq.c | 11 +++ hw/zynq_slcr.c |9 + 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/hw/xilinx

[Qemu-devel] [PATCH v2 1/4] xilinx_zynq: added smp support

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Added linux smp support for the xilinx zynq platform (2x cpus are supported) Signed-off-by: Peter A. G. Crosthwaite --- Changed from v1: Addressed PMM review Shorted secondary bootloop using MVN instruction. Used default reset secondary instead of custom one. Rebas

[Qemu-devel] [PATCH v2 0/4] Xilinx-Zynq boot process patches

2012-10-03 Thread Peter Crosthwaite
Patch 1 is dual core smp support. Patches 2-4 Implement the SLCR reset functionality. changed from v1: Addressed PMM review (P1) Patches 2-4 are completely new. Removed previous patches 2-3 (no bootloader changes anymore) Peter A. G. Crosthwaite (4): xilinx_zynq: added smp support zynq_slcr:

[Qemu-devel] MIPS DSP for Qemu

2012-10-03 Thread reed kotler
I work for Mips in the compiler team. A year and half ago, I did a complete implementation for Mips DSP in Qemu. My port has passed all the MIPS AVPs (Architectural Verification Programs) for DSP, which is something not available to the public but is what all architectural licenses and interna

[Qemu-devel] [PATCH 1/2] configure: add --localstatedir

2012-10-03 Thread Luiz Capitulino
Next commit wants to use it. Signed-off-by: Luiz Capitulino --- configure | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 8f99b7b..dab07d6 100755 --- a/configure +++ b/configure @@ -184,6 +184,7 @@ libdir="\${prefix}/lib" libexecdir="\${pr

[Qemu-devel] [PATCH v2] qemu-ga: ga_open_pidfile(): add new line to pidfile

2012-10-03 Thread Luiz Capitulino
FHS requires that pid files should end with a new line. Also change to snprintf() while there. Signed-off-by: Luiz Capitulino --- o v2 - use snprintf() - re-word changelog qemu-ga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-ga.c b/qemu-ga.c index b747470..e402

[Qemu-devel] [PATCH 2/2] qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR

2012-10-03 Thread Luiz Capitulino
Has the side effect of changing the default directory used to save the freeze status file from /tmp to ${prefix}/var/run. This is a beneficial change for two reasons: 1. FHS states that programs must not assume that files in /tmp will still exist between invocations of the program. This de

[Qemu-devel] [PATCH v2 0/2] qemu-ga: change default state dir to /var/run

2012-10-03 Thread Luiz Capitulino
Also allow users to change the default at configure time. Please, check individual patches for more details. o v2 - drop --guest-agent-statedir in favor of --localstatedir - change default from /var/run to ${prefix}/var/run Luiz Capitulino (2): configure: add --localstatedir qemu-ga: use s

[Qemu-devel] [PATCH] qemu-barrier: Fix compiler version check for future gcc versions

2012-10-03 Thread Stefan Weil
The current check will give a wrong result for gcc-5.x with x < 4. Using QEMU_GNUC_PREREQ is simpler and fixes that issue. Signed-off-by: Stefan Weil --- With current gcc versions (gcc-4.x) there is no problem. Nevertheless, I suggest to fix this in stable versions, too. Regards Stefan Weil

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Richard Henderson
On 10/03/2012 11:04 AM, Søren Sandmann wrote: > From: Søren Sandmann Pedersen > > Apparently GCC 4.5 still warns about "value computed not used" even > with __attribute__((unused)). Fix this by only doing the compile time > check on gcc > 4.5. > > Signed-off-by: Soren Sandmann > --- > > I need

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Stefan Weil
Am 03.10.2012 21:49, schrieb Søren Sandmann: Stefan Weil writes: I don't see any warnings with gcc Debian 4.4.5-8. Could you please provide more information on your environment and the warnings which you get? Here is a macro which simplifies the version check: #if QEMU_GNUC_PREREQ(4, 6) Re

Re: [Qemu-devel] [RFC v1 00/22] Integrate DMA into the memory API

2012-10-03 Thread Blue Swirl
On Wed, Oct 3, 2012 at 4:03 PM, Avi Kivity wrote: > Most of the work on the memory API focused on memory access targets - the > memory regions > and how they are composed into an address space. This patchset tackles the > initator > side of the question - how to originate accesses. > > The Addr

Re: [Qemu-devel] [PATCH] kvm: Set default accelerator to "kvm" if the host supports it

2012-10-03 Thread Peter Maydell
On 3 October 2012 21:01, Blue Swirl wrote: > On Mon, Oct 1, 2012 at 4:20 PM, Anthony Liguori wrote: >> Jan Kiszka writes: >>> +/* The default accelerator depends on the availability of KVM. */ >>> +p = kvm_configured ? "kvm" : "tcg"; >>> } >> Blue/Aurelien, any objections?

Re: [Qemu-devel] [PATCH] qemu-ga: ga_open_pidfile(): add new line to pidfile

2012-10-03 Thread Blue Swirl
On Wed, Oct 3, 2012 at 5:25 PM, Luiz Capitulino wrote: > FHS dictates that pid files should end with a new line. > > Signed-off-by: Luiz Capitulino > --- > qemu-ga.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-ga.c b/qemu-ga.c > index b747470..afd685e 100644 > -

Re: [Qemu-devel] [RFC v1 19/22] memory: per-AddressSpace dispatch

2012-10-03 Thread Blue Swirl
On Wed, Oct 3, 2012 at 4:04 PM, Avi Kivity wrote: > Currently we use a global radix tree to dispatch memory access. This only > works with a single address space; to support multiple address spaces we > make the radix tree a member of AddressSpace (via an intermediate structure > AddressSpaceDisp

Re: [Qemu-devel] [PATCH] tcg: remove obsolete jmp op

2012-10-03 Thread Stefan Weil
Am 01.10.2012 21:00, schrieb Aurelien Jarno: The TCG jmp operation doesn't really make sense in the QEMU context, it is unused, it is not implemented by some targets, and it is wrongly implemented by some others. This patch simply removes it. Cc: Andrzej Zaborowski Cc: Richard Henderson Cc: Vas

Re: [Qemu-devel] [PATCH 18/22] target-i386: parse cpu_model string into set of stringified properties

2012-10-03 Thread Igor Mammedov
On Wed, 3 Oct 2012 20:09:52 + Blue Swirl wrote: > On Tue, Oct 2, 2012 at 11:28 AM, Eric Blake wrote: > > On 09/30/2012 06:16 AM, Blue Swirl wrote: > >> On Wed, Sep 26, 2012 at 8:32 PM, Igor Mammedov wrote: > >>> cpu_model string does represent features in following format: > >>> ([+-]feat)

Re: [Qemu-devel] [RFC v1 17/22] memory: use AddressSpace for MemoryListener filtering

2012-10-03 Thread Blue Swirl
On Wed, Oct 3, 2012 at 4:04 PM, Avi Kivity wrote: > Using the AddressSpace type reduces confusion, as you can't accidentally > supply the MemoryRegion you're interested in. > > Signed-off-by: Avi Kivity > --- > exec-memory.h | 3 +++ > exec.c| 10 +- > hw/vfio_pci.c | 3 +-- >

Re: [Qemu-devel] [RFC v1 03/22] kvm: use separate MemoryListeners for memory and I/O

2012-10-03 Thread Blue Swirl
On Wed, Oct 3, 2012 at 4:03 PM, Avi Kivity wrote: > The construct > >if (address_space == get_system_memory()) { >// memory thing >} else { >// io thing >} > > fails if we have more than two address spaces. Use a separate listener > for memory and I/O, and utilize Memo

Re: [Qemu-devel] [RFC 17/18] target-i386: topology & APIC ID utility functions (v2)

2012-10-03 Thread Blue Swirl
On Wed, Oct 3, 2012 at 1:29 PM, Eduardo Habkost wrote: > Changes v2 -> v3: > - Add documentation pointers to the code > - Rename bits_for_count() to bitwidth_for_count() > - Remove unused apicid_*_id() functions > > Changes v1 -> v2: > - Support 32-bit APIC IDs (in case x2APIC is going to be u

Re: [Qemu-devel] [PATCH 18/22] target-i386: parse cpu_model string into set of stringified properties

2012-10-03 Thread Blue Swirl
On Tue, Oct 2, 2012 at 11:28 AM, Eric Blake wrote: > On 09/30/2012 06:16 AM, Blue Swirl wrote: >> On Wed, Sep 26, 2012 at 8:32 PM, Igor Mammedov wrote: >>> cpu_model string does represent features in following format: >>> ([+-]feat)|(feat=foo)|(feat) >>> which makes it impossible directly use pr

Re: [Qemu-devel] [PATCH 1/5] s390: use sync regs for register transfer

2012-10-03 Thread Blue Swirl
On Tue, Oct 2, 2012 at 7:33 AM, Jens Freimann wrote: > From: Christian Borntraeger > > Newer kernels provide the guest registers in kvm_run. Lets use > those if available (i.e. the capability is set). This avoids > ioctls on cpu_synchronize_state making intercepts faster. > > In addition, we have

Re: [Qemu-devel] [PATCH] tcg: remove obsolete jmp op

2012-10-03 Thread Blue Swirl
On Mon, Oct 1, 2012 at 7:00 PM, Aurelien Jarno wrote: > The TCG jmp operation doesn't really make sense in the QEMU context, it > is unused, it is not implemented by some targets, and it is wrongly > implemented by some others. > > This patch simply removes it. > > Cc: Andrzej Zaborowski > Cc: Ri

Re: [Qemu-devel] [PATCH] kvm: Set default accelerator to "kvm" if the host supports it

2012-10-03 Thread Blue Swirl
On Mon, Oct 1, 2012 at 4:20 PM, Anthony Liguori wrote: > Jan Kiszka writes: > >> If we built a target for a host that supports KVM in principle, set the >> default accelerator to KVM as well. This also means the start of QEMU >> will fail to start if KVM support turns out to be unavailable at >>

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
Stefan Weil writes: > I don't see any warnings with gcc Debian 4.4.5-8. > > Could you please provide more information on your environment > and the warnings which you get? > > Here is a macro which simplifies the version check: > > #if QEMU_GNUC_PREREQ(4, 6) > > Regards > > Stefan Weil With this

Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir

2012-10-03 Thread Luiz Capitulino
On Wed, 03 Oct 2012 20:56:31 +0200 Paolo Bonzini wrote: > Il 03/10/2012 20:53, Luiz Capitulino ha scritto: > > On Wed, 03 Oct 2012 20:32:21 +0200 > > Paolo Bonzini wrote: > > > >> Il 03/10/2012 19:24, Luiz Capitulino ha scritto: > >>> Defaults to /var/run. > >> > >> Please add instead --localst

Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 20:53, Luiz Capitulino ha scritto: > On Wed, 03 Oct 2012 20:32:21 +0200 > Paolo Bonzini wrote: > >> Il 03/10/2012 19:24, Luiz Capitulino ha scritto: >>> Defaults to /var/run. >> >> Please add instead --localstatedir (defaulting to ${prefix}/var), and >> make the guest agent's direct

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Aurelien Jarno
On Wed, Oct 03, 2012 at 07:52:57AM -0300, Marcelo Tosatti wrote: > Commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd4a3d from qemu-kvm.git. > > From: Jan Kiszka > > Upstream is moving towards this mechanism, so start using it in qemu-kvm > already to configure the specific defaults: kvm enabled on

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Marcelo Tosatti
On Wed, Oct 03, 2012 at 07:24:48PM +0200, Jan Kiszka wrote: > On 2012-10-03 19:16, Anthony Liguori wrote: > > Jan Kiszka writes: > > > >> On 2012-10-03 17:03, Marcelo Tosatti wrote: > >>> On Wed, Oct 03, 2012 at 09:40:17AM -0500, Anthony Liguori wrote: > Marcelo Tosatti writes: > > >>>

Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir

2012-10-03 Thread Luiz Capitulino
On Wed, 03 Oct 2012 20:32:21 +0200 Paolo Bonzini wrote: > Il 03/10/2012 19:24, Luiz Capitulino ha scritto: > > Defaults to /var/run. > > Please add instead --localstatedir (defaulting to ${prefix}/var), and > make the guest agent's directory /run inside that one. Packagers > already know to ove

Re: [Qemu-devel] [PATCH V19 7/7] Add fd parameter for TPM passthrough driver

2012-10-03 Thread Corey Bryant
On 06/04/2012 03:37 PM, Stefan Berger wrote: 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 | 53 ++

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

2012-10-03 Thread Corey Bryant
I'm adding a few more comments spread throughout this series that I forgot to mention previously.. On 06/04/2012 03:37 PM, Stefan Berger wrote: 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

Re: [Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 19:24, Luiz Capitulino ha scritto: > Also allow users to change the default at configure time. Please, check > individual patches for more details. > > Luiz Capitulino (3): > configure: guest_agent -> qemuga > configure: add --guest-agent-statedir > qemu-ga: use state dir from

Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 19:24, Luiz Capitulino ha scritto: > Defaults to /var/run. Please add instead --localstatedir (defaulting to ${prefix}/var), and make the guest agent's directory /run inside that one. Packagers already know to override --localstatedir=/var, in some cases macros even do it automatica

[Qemu-devel] [Bug 1060928] [NEW] Error in launch virtual server port

2012-10-03 Thread javier navarro altimira
Public bug reported: .- configure .- uname -a .- script bash launcher .- Error .- output serial.c in statusRUN --- .- configure ./configure --target-list=i386-softmmu,x86_64-softmmu,\ i386-linux-user,x86_64-linux-user --enable-vde --disable-vnc --enable-sdl \ --a

Re: [Qemu-devel] O_DIRECT on glusterfs (was Re: [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend)

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 20:17, Anand Avati ha scritto: > On 10/03/2012 11:17 AM, Paolo Bonzini wrote: >> Il 03/10/2012 19:58, Anand Avati ha scritto: I think these 3 lines should be removed. We're bypassing the host buffer cache just by virtue of using a userspace driver, and that's what

Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir

2012-10-03 Thread Michael Roth
On Wed, Oct 03, 2012 at 02:24:18PM -0300, Luiz Capitulino wrote: > Defaults to /var/run. > > Signed-off-by: Luiz Capitulino Since this has the effect of changing both the default directory for state and well as the pid file, maybe we should s@state@state/pidfile@ the human-readable descriptions?

Re: [Qemu-devel] O_DIRECT on glusterfs (was Re: [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend)

2012-10-03 Thread Anand Avati
On 10/03/2012 11:17 AM, Paolo Bonzini wrote: Il 03/10/2012 19:58, Anand Avati ha scritto: I think these 3 lines should be removed. We're bypassing the host buffer cache just by virtue of using a userspace driver, and that's what cache=none cares about. O_DIRECT also has an effect on the beha

Re: [Qemu-devel] [PATCH 3/3] qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR

2012-10-03 Thread Michael Roth
On Wed, Oct 03, 2012 at 02:24:19PM -0300, Luiz Capitulino wrote: > Has the side effect of changing the default directory used to > save the freeze status file from /tmp to /var/run. > > This is a beneficial change for two reasons: > > 1. FHS states that programs must not assume that files in /tm

Re: [Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Stefan Weil
Am 03.10.2012 20:04, schrieb Søren Sandmann: From: Søren Sandmann Pedersen Apparently GCC 4.5 still warns about "value computed not used" even with __attribute__((unused)). Fix this by only doing the compile time check on gcc> 4.5. Signed-off-by: Soren Sandmann --- I need this patch to get qe

Re: [Qemu-devel] O_DIRECT on glusterfs (was Re: [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend)

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 19:58, Anand Avati ha scritto: >> >> I think these 3 lines should be removed. We're bypassing the host >> buffer cache just by virtue of using a userspace driver, and that's what >> cache=none cares about. > > O_DIRECT also has an effect on the behavior of the "client side" (the > p

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Anthony Liguori
Jan Kiszka writes: > On 2012-10-03 19:16, Anthony Liguori wrote: >> Jan Kiszka writes: >> >>> On 2012-10-03 17:03, Marcelo Tosatti wrote: On Wed, Oct 03, 2012 at 09:40:17AM -0500, Anthony Liguori wrote: > Marcelo Tosatti writes: > >> Commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd

[Qemu-devel] [PATCH] hw/qxl: exit on failure to register qxl interface

2012-10-03 Thread Alon Levy
This prevents a segfault later on when the device reset handler tries to access a NULL ssd.worker since interface_attach_worker has not been called. Signed-off-by: Alon Levy --- hw/qxl.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/qxl.c b/hw/qxl.c index 58c4643..4

Re: [Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir

2012-10-03 Thread Michael Roth
On Wed, Oct 03, 2012 at 02:24:18PM -0300, Luiz Capitulino wrote: > Defaults to /var/run. > > Signed-off-by: Luiz Capitulino > --- > configure | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/configure b/configure > index 4cfcdc6..4f3d2ed 100755 > --- a/configure > +++ b/configure

Re: [Qemu-devel] [PATCH 1/3] configure: guest_agent -> qemuga

2012-10-03 Thread Michael Roth
On Wed, Oct 03, 2012 at 02:24:17PM -0300, Luiz Capitulino wrote: > Next commit will add a new qemu-ga variable in configure, having > guest_agent as a prefix is too long, let's use qemuga instead. > > Signed-off-by: Luiz Capitulino Acked-by: Michael Roth > --- > configure | 10 +- > 1

Re: [Qemu-devel] O_DIRECT on glusterfs (was Re: [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend)

2012-10-03 Thread Anand Avati
On 10/03/2012 08:50 AM, Paolo Bonzini wrote: Il 24/09/2012 11:13, Bharata B Rao ha scritto: + +if ((bdrv_flags& BDRV_O_NOCACHE)) { +open_flags |= O_DIRECT; +} + If I understand correctly what I was told, this prevents the brick server from using its own buffer cache. This is

[Qemu-devel] [PATCH] Fix compilation on GCC 4.5

2012-10-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen Apparently GCC 4.5 still warns about "value computed not used" even with __attribute__((unused)). Fix this by only doing the compile time check on gcc > 4.5. Signed-off-by: Soren Sandmann --- I need this patch to get qemu to compile with GCC 4.5, but I'm not sure

[Qemu-devel] [PATCH] qxl: Default to PCI revision 4 when spice-server is new enough

2012-10-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen When spice-server is newer than 0.12.0, the default revision should be QXL_REVISION_STABLE_V12. Signed-off-by: Soren Sandmann --- hw/qxl.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/qxl.h b/hw/qxl.h index 5553824..4460bb2 100644

[Qemu-devel] [PATCH 1/6] qdev: split up header so it can be used in cpu.h

2012-10-03 Thread Eduardo Habkost
From: Anthony Liguori Header file dependency is a frickin' nightmare right now. cpu.h tends to get included in our 'include everything' header files but qdev also needs to include those headers mainly for qdev-properties since it knows about CharDriverState and friends. We can solve this for no

[Qemu-devel] [PATCH 3/6] qdev: separate core from the code used only by qemu-system-*

2012-10-03 Thread Eduardo Habkost
This change should help on two things: - Allowing DeviceState to be used by *-user; - Writing qdev unit tests without pulling too many dependencies. Note that there are two parts that depend on code compiled only on qemu-system-*, but are still inside qdev.c: - vmstate handling - reset functio

[Qemu-devel] [PATCH 4/6] tests: unit tests for qdev global-properties handling

2012-10-03 Thread Eduardo Habkost
This tests the qdev global-properties handling code. A fake-qdev.c module was added with some stub functions, to keep dependencies under control. Signed-off-by: Eduardo Habkost --- tests/Makefile| 6 +++ tests/fake-qdev.c | 52 tests/test-qdev

[Qemu-devel] [PATCH 0/6] qdev: handle global properties after all instance_init calls

2012-10-03 Thread Eduardo Habkost
Summary: - Object properties are registered by the classes' instance_init() functions - qdev_prop_set_globals() needs all properties to be registered before being called. - Hence, qdev_prop_set_globals() can't be called from device_initfn(). Reference: http://article.gmane.org/gmane.com

[Qemu-devel] [PATCH 6/6] qdev: set globals on post_init() function

2012-10-03 Thread Eduardo Habkost
This way, properties registerd in the instance_init() function of children classes will be handled properly by qdev_prop_set_globals(), too. Includes a new unit test for the new functionality. Signed-off-by: Eduardo Habkost --- hw/qdev.c | 9 ++- tests/Makefile

[Qemu-devel] [PATCH 2/6] qapi-types.h doesn't really need to include qemu-common.h

2012-10-03 Thread Eduardo Habkost
From: Igor Mammedov needed to prevent build breakage when CPU becomes a child of DeviceState [ehabkost: include too] Signed-off-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- scripts/qapi-types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qapi-types

[Qemu-devel] [PATCH 5/6] qom: introduce post_init() function

2012-10-03 Thread Eduardo Habkost
This will allow classes to specify a function to be called after all instance_init() functions were called. This will be used by DeviceState to call qdev_prop_set_globals() at the right moment. Signed-off-by: Eduardo Habkost --- include/qemu/object.h | 3 +++ qom/object.c | 14 +++

[Qemu-devel] [RFC v1 06/22] memory: export AddressSpace

2012-10-03 Thread Avi Kivity
The DMA API will use an AddressSpace to differentiate among different initiators. Signed-off-by: Avi Kivity --- memory.c | 11 +-- memory.h | 21 + 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/memory.c b/memory.c index 7e9e373..431a867 100644 --- a

[Qemu-devel] [RFC v1 15/22] memory: move address_space_memory and address_space_io out of memory core

2012-10-03 Thread Avi Kivity
With this change, memory.c no longer knows anything about special address spaces, so it is prepared for AddressSpace based DMA. Signed-off-by: Avi Kivity --- exec-memory.h | 6 -- exec.c| 9 +++-- memory.c | 16 3 files changed, 7 insertions(+), 24 deletio

[Qemu-devel] [RFC v1 11/22] xen_pt: use new MEMORY_LISTENER_DEFAULT_OPS

2012-10-03 Thread Avi Kivity
Removes quite a bit of useless code. Signed-off-by: Avi Kivity --- hw/xen_pt.c | 47 ++- 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/hw/xen_pt.c b/hw/xen_pt.c index 438ad54..4dcf46a 100644 --- a/hw/xen_pt.c +++ b/hw/xen_pt.c @@ -598,

[Qemu-devel] [RFC v1 05/22] memory: prepare AddressSpace for exporting

2012-10-03 Thread Avi Kivity
AddressSpace contains a member, current_map, of type FlatView. Since we want to limit the leakage of internal types to public headers, switch to a pointer to a FlatView. There is no performance impact as this isn't used during lookups, only address space reconfigurations. Signed-off-by: Avi Kivi

[Qemu-devel] [RFC v1 22/22] pci: honor PCI_COMMAND_MASTER

2012-10-03 Thread Avi Kivity
Currently we ignore PCI_COMMAND_MASTER completely: DMA succeeds even when the bit is clear. Honor PCI_COMMAND_MASTER by inserting a memory region into the device's bus master address space, and tying its enable status to PCI_COMMAND_MASTER. Tested using setpci -s 03 COMMAND=3 while a ping was

[Qemu-devel] [RFC v1 19/22] memory: per-AddressSpace dispatch

2012-10-03 Thread Avi Kivity
Currently we use a global radix tree to dispatch memory access. This only works with a single address space; to support multiple address spaces we make the radix tree a member of AddressSpace (via an intermediate structure AddressSpaceDispatch to avoid exposing too many internals). A side effect

[Qemu-devel] [PATCH] qemu-ga: ga_open_pidfile(): add new line to pidfile

2012-10-03 Thread Luiz Capitulino
FHS dictates that pid files should end with a new line. Signed-off-by: Luiz Capitulino --- qemu-ga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-ga.c b/qemu-ga.c index b747470..afd685e 100644 --- a/qemu-ga.c +++ b/qemu-ga.c @@ -255,7 +255,7 @@ static bool ga_open_pid

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Jan Kiszka
On 2012-10-03 19:16, Anthony Liguori wrote: > Jan Kiszka writes: > >> On 2012-10-03 17:03, Marcelo Tosatti wrote: >>> On Wed, Oct 03, 2012 at 09:40:17AM -0500, Anthony Liguori wrote: Marcelo Tosatti writes: > Commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd4a3d from qemu-kvm.git. >

[Qemu-devel] [PATCH 1/3] configure: guest_agent -> qemuga

2012-10-03 Thread Luiz Capitulino
Next commit will add a new qemu-ga variable in configure, having guest_agent as a prefix is too long, let's use qemuga instead. Signed-off-by: Luiz Capitulino --- configure | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 8f99b7b..4cfcdc6

[Qemu-devel] [PATCH 3/3] qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR

2012-10-03 Thread Luiz Capitulino
Has the side effect of changing the default directory used to save the freeze status file from /tmp to /var/run. This is a beneficial change for two reasons: 1. FHS states that programs must not assume that files in /tmp will still exist between invocations of the program. This defeats

[Qemu-devel] [PATCH 2/3] configure: add --guest-agent-statedir

2012-10-03 Thread Luiz Capitulino
Defaults to /var/run. Signed-off-by: Luiz Capitulino --- configure | 6 ++ 1 file changed, 6 insertions(+) diff --git a/configure b/configure index 4cfcdc6..4f3d2ed 100755 --- a/configure +++ b/configure @@ -215,6 +215,7 @@ usb_redir="" opengl="" zlib="yes" qemuga="yes" +qemuga_statedir=

[Qemu-devel] [PATCH 0/3] qemu-ga: change default state dir to /var/run

2012-10-03 Thread Luiz Capitulino
Also allow users to change the default at configure time. Please, check individual patches for more details. Luiz Capitulino (3): configure: guest_agent -> qemuga configure: add --guest-agent-statedir qemu-ga: use state dir from CONFIG_QEMUGA_STATEDIR configure | 16 +++- qemu-

[Qemu-devel] [RFC v1 10/22] vfio: use new MEMORY_LISTENER_DEFAULT_OPS

2012-10-03 Thread Avi Kivity
Removes quite a bit of useless code. Signed-off-by: Avi Kivity --- hw/vfio_pci.c | 30 +- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index a1eeced..8e49535 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -803,25 +803,

[Qemu-devel] [RFC v1 18/22] s390: avoid reaching into memory core internals

2012-10-03 Thread Avi Kivity
use cpu_physical_memory_is_io() instead. Signed-off-by: Avi Kivity --- target-s390x/misc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index e9b3cae..2da4c90 100644 --- a/target-s390x/misc_helper.c +++ b/targe

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Anthony Liguori
Jan Kiszka writes: > On 2012-10-03 17:03, Marcelo Tosatti wrote: >> On Wed, Oct 03, 2012 at 09:40:17AM -0500, Anthony Liguori wrote: >>> Marcelo Tosatti writes: >>> Commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd4a3d from qemu-kvm.git. From: Jan Kiszka Upstream is movi

[Qemu-devel] [RFC v1 14/22] memory: manage coalesced mmio via a MemoryListener

2012-10-03 Thread Avi Kivity
Instead of calling a global function on coalesced mmio changes, which routes the call to kvm if enabled, add coalesced mmio hooks to MemoryListener and make kvm use that instead. The motivation is support for multiple address spaces (which means we we need to filter the call on the right address s

[Qemu-devel] [RFC v1 16/22] memory: move tcg flush into a tcg memory listener

2012-10-03 Thread Avi Kivity
We plan to make the core listener listen to all address spaces; this will cause many more flushes than necessary. Prepare for that by moving the flush into a tcg-specific listener. Later we can avoid registering the listener if tcg is disabled. Signed-off-by: Avi Kivity --- exec.c | 9 +++-

[Qemu-devel] [RFC v1 08/22] memory: provide defaults for MemoryListener operations

2012-10-03 Thread Avi Kivity
Many listeners don't need to respond to all MemoryListener callbacks; provide suitable defaults instead. Signed-off-by: Avi Kivity --- memory.c | 15 +++ memory.h | 21 + 2 files changed, 36 insertions(+) diff --git a/memory.c b/memory.c index b58b97c..efefcb8 10

[Qemu-devel] [RFC v1 12/22] kvm: use new MEMORY_LISTENER_DEFAULT_OPS

2012-10-03 Thread Avi Kivity
Removes quite a bit of useless code. Signed-off-by: Avi Kivity --- kvm-all.c | 32 ++-- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index c69e012..5e9215d 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -703,14 +703,6 @@ static void

[Qemu-devel] [RFC v1 21/22] pci: give each device its own address space

2012-10-03 Thread Avi Kivity
Accesses from different devices can resolve differently (depending on bridge settings, iommus, and PCI_COMMAND_MASTER), so set up an address space for each device. Currently iommus are expressed outside the memory API, so this doesn't work if an iommu is present. FIXME: address space destruction.

Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-03 Thread Eduardo Habkost
On Wed, Oct 03, 2012 at 06:24:11PM +0200, Igor Mammedov wrote: > On Wed, 03 Oct 2012 17:20:46 +0200 > Paolo Bonzini wrote: > > > Il 03/10/2012 17:03, Eduardo Habkost ha scritto: > > > On Tue, Oct 02, 2012 at 05:38:45PM -0300, Eduardo Habkost wrote: > > >> (Now replying on the right thread, to kee

[Qemu-devel] [RFC v1 02/22] vhost: use MemoryListener filtering to only monitor RAM address space

2012-10-03 Thread Avi Kivity
Instead of checking manually, let the listener filter for us. This prepares us for DMA address spaces. Signed-off-by: Avi Kivity --- hw/vhost.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/vhost.c b/hw/vhost.c index d0ce5aa..100f765 100644 --- a/hw/vhost.c +++ b/h

[Qemu-devel] [RFC v1 13/22] xen: use new MEMORY_LISTENER_DEFAULT_OPS

2012-10-03 Thread Avi Kivity
Removes quite a bit of useless code. Signed-off-by: Avi Kivity --- xen-all.c | 43 +-- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/xen-all.c b/xen-all.c index f76b051..823e043 100644 --- a/xen-all.c +++ b/xen-all.c @@ -452,14 +452,6 @@ st

[Qemu-devel] [RFC v1 09/22] memory: use new MEMORY_LISTENER_DEFAULT_OPS

2012-10-03 Thread Avi Kivity
Removes quite a bit of useless code. Signed-off-by: Avi Kivity --- exec.c | 98 ++ 1 file changed, 2 insertions(+), 96 deletions(-) diff --git a/exec.c b/exec.c index 5c703b9..1fd6a10 100644 --- a/exec.c +++ b/exec.c @@ -3202,32 +3

[Qemu-devel] [RFC v1 07/22] memory: maintain a list of address spaces

2012-10-03 Thread Avi Kivity
Instead of embedding knowledge of the memory and I/O address spaces in the memory core, maintain a list of all address spaces. This list will later be extended dynamically for other but masters. Signed-off-by: Avi Kivity --- memory.c | 75 +++-

Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-03 Thread Igor Mammedov
On Wed, 03 Oct 2012 17:20:46 +0200 Paolo Bonzini wrote: > Il 03/10/2012 17:03, Eduardo Habkost ha scritto: > > On Tue, Oct 02, 2012 at 05:38:45PM -0300, Eduardo Habkost wrote: > >> (Now replying on the right thread, to keep the discussion in the right > >> place. I don't know how I ended up reply

[Qemu-devel] [RFC v1 17/22] memory: use AddressSpace for MemoryListener filtering

2012-10-03 Thread Avi Kivity
Using the AddressSpace type reduces confusion, as you can't accidentally supply the MemoryRegion you're interested in. Signed-off-by: Avi Kivity --- exec-memory.h | 3 +++ exec.c| 10 +- hw/vfio_pci.c | 3 +-- hw/vhost.c| 2 +- hw/xen_pt.c | 4 ++-- kvm-all.c | 4 +

[Qemu-devel] [RFC v1 04/22] xen_pt: use separate MemoryListeners for memory and I/O

2012-10-03 Thread Avi Kivity
Using an unfiltered memory listener will cause regions to be reported fails multiple times if we have more than two address spaces. Use a separate listener for memory and I/O, and utilize MemoryListener's address space filtering to fix this. Signed-off-by: Avi Kivity --- hw/xen_pt.c | 38 ++

[Qemu-devel] [RFC v1 20/22] dma: make dma access its own address space

2012-10-03 Thread Avi Kivity
Instead of accessing the cpu address space, use an address space configured by the caller. Eventually all dma functionality will be folded into AddressSpace, but we have to start from something. Signed-off-by: Avi Kivity --- dma-helpers.c| 25 - dma.h| 17

[Qemu-devel] [RFC v1 03/22] kvm: use separate MemoryListeners for memory and I/O

2012-10-03 Thread Avi Kivity
The construct if (address_space == get_system_memory()) { // memory thing } else { // io thing } fails if we have more than two address spaces. Use a separate listener for memory and I/O, and utilize MemoryListener's address space filtering to fix this. Signed-off-by: Avi

[Qemu-devel] [RFC v1 01/22] memory: rename 'exec-obsolete.h'

2012-10-03 Thread Avi Kivity
exec-obsolete.h used to hold pre-memory-API functions that were used from device code prior to the transition to the memory API. Now that the transition is complete, the name no longer describes the file. The functions still need to be merged better into the memory core, but there's no danger of

[Qemu-devel] [RFC v1 00/22] Integrate DMA into the memory API

2012-10-03 Thread Avi Kivity
Most of the work on the memory API focused on memory access targets - the memory regions and how they are composed into an address space. This patchset tackles the initator side of the question - how to originate accesses. The AddressSpace object, is exported to users and becomes the representa

  1   2   3   >