Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-01 Thread Paolo Bonzini
On 09/02/2011 02:08 AM, David Gibson wrote: > > >Signed-off-by: Alexey Kardashevskiy > >Signed-off-by: David Gibson > > It will most definitely break OpenBSD, but anyway: Uh, why? They use an ancient compiler because they do not want to use GPLv3. I thought it was 4.1.something but actu

[Qemu-devel] target_phys_addr_t vs ram_addr_t

2011-09-01 Thread Sinha, Ani
Hi Folks : I am trying to write a virtio driver and towards this end I am looking at the qemu code. I am a little confused about a few things. Unfortunately, the few comments in the code does not make it clear for me. So I am wondering if any kind person on this mailing list would be able to help.

Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-01 Thread Paolo Bonzini
On 09/02/2011 02:11 AM, David Gibson wrote: > >Why not limit the change to ppc then? > > Because the bug is masked by the x86 memory model, but it is still > there even there conceptually. It is not really true that x86 does > not need memory barriers, though it doesn't in this case: > >

Re: [Qemu-devel] [PATCH 0/3] linux-user: Implement setxattr/getxattr/removexattr syscalls

2011-09-01 Thread Riku Voipio
Hi, On Wed, Aug 17, 2011 at 02:30:53PM -0700, An-Cheng Huang wrote: > On Tue, Aug 09, 2011 at 12:30:52PM -0700, An-Cheng Huang wrote: > > These patches implement the setxattr, getxattr, and removexattr syscalls. > > Since libattr uses indirect syscalls for these, the fix for the indirect > > sysca

Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 06:35:51PM +0300, Michael S. Tsirkin wrote: > On Thu, Sep 01, 2011 at 03:00:54PM +1000, David Gibson wrote: [snip] > > +#define DECLARE_LDST_DMA(_lname, _sname, _bits) \ > > +uint##_bits##_t ld##_lname##_pci_dma(PCIDevice *dev, dma_addr_t addr); > > \ > > +void st##

Re: [Qemu-devel] VFIO v2 design plan

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 02:27:00PM -0600, Alex Williamson wrote: > On Thu, 2011-09-01 at 14:10 +1000, David Gibson wrote: > > On Tue, Aug 30, 2011 at 08:51:38AM -0600, Alex Williamson wrote: [snip] > > > > If you open a group, merge in a bunch of other groups, then re-open > > > > /dev/vfio/NNN for

Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 07:03:34PM +0300, Avi Kivity wrote: > On 09/01/2011 06:55 PM, Anthony Liguori wrote: > >On 09/01/2011 12:00 AM, David Gibson wrote: > >>This patch adds functions to pci.[ch] to perform PCI DMA operations. At > >>present, these are just stubs which perform directly cpu physi

Re: [Qemu-devel] [PATCH V8 00/14] Qemu Trusted Platform Module (TPM) integration

2011-09-01 Thread Stefan Berger
On 09/01/2011 02:12 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:35:51AM -0400, Stefan Berger wrote: Once TPM support is check in to the Qemu git repository, I would like to force the usage of libtpms-0.5.2. So configure will need to test that and disable the backend. Right. I am c

Re: [Qemu-devel] [PATCH V8 14/14] Allow to provide inital TPM state

2011-09-01 Thread Stefan Berger
On 09/01/2011 02:10 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:36:05AM -0400, Stefan Berger wrote: This patch adds a -tpm ...,initstate=...,... command line option to the TPM's existing options and enables the TPM to be initialized with an existing state blob. This in turn allows u

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-01 Thread Wen Congyang
At 08/22/2011 02:23 PM, Avi Kivity Write: > On 08/22/2011 06:13 AM, Wen Congyang wrote: >> At 08/19/2011 11:26 PM, Avi Kivity Write: >> > On 08/18/2011 10:12 PM, Wen Congyang wrote: >> >> >> >> >> >> The following patch can fix this problem, but I'm not sure >> whether it >> >> >> is right.

Re: [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees

2011-09-01 Thread John Williams
On Fri, Aug 26, 2011 at 7:17 AM, Anthony Liguori wrote: > On 08/25/2011 03:20 PM, Edgar E. Iglesias wrote: > >> On Thu, Aug 25, 2011 at 02:54:13PM -0500, Anthony Liguori wrote: >> >>> On 08/25/2011 02:10 PM, Edgar E. Iglesias wrote: >>> This is the goal of QOM except it does this by fixing th

Re: [Qemu-devel] [PATCH V8 13/14] Add a TPM backend null driver implementation

2011-09-01 Thread Stefan Berger
On 09/01/2011 01:40 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:36:04AM -0400, Stefan Berger wrote: This patch adds a TPM null driver implementation acting as a backend for the TIS hardware emulation. The NULL driver responds to all commands with a TPM fault response. To use this n

Re: [Qemu-devel] [PATCH V8 10/14] Encrypt state blobs using AES CBC encryption

2011-09-01 Thread Stefan Berger
On 09/01/2011 03:26 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:36:01AM -0400, Stefan Berger wrote: This patch adds encryption of the individual state blobs that are written into the block storage. The 'directory' at the beginnig of the block storage is not encrypted. Does this mea

Re: [Qemu-devel] [PATCH V8 08/14] Introduce file lock for the block layer

2011-09-01 Thread Stefan Berger
On 09/01/2011 01:32 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:35:59AM -0400, Stefan Berger wrote: This patch introduces file locking via fcntl() for the block layer so that concurrent access to files shared by 2 Qemu instances, for example via NFS, can be serialized. This feature

Re: [Qemu-devel] [PATCH 09/10] usb-ohci: Use PCI DMA stub functions

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 12:10:48PM +0200, Gerd Hoffmann wrote: > On 09/01/11 07:01, David Gibson wrote: > >From: Eduard - Gabriel Munteanu > > > >This updates the usb-ohci device emulation to use the explicit PCI DMA > >functions, instead of directly calling physical memory access functions. > > I

Re: [Qemu-devel] [PATCH 10/10] intel-hda: Use PCI DMA stub functions

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 12:16:25PM +0200, Gerd Hoffmann wrote: > On 09/01/11 07:01, David Gibson wrote: > >This updates the intel-hda device emulation to use the explicit PCI DMA > >functions, instead of directly calling physical memory access functions. > > There are some calls to {st,ld}l_le_phy

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-01 Thread Anthony Liguori
On 09/01/2011 02:35 PM, Luiz Capitulino wrote: Sometimes, when having lots of VMs running on a RHEV host and the user attempts to close a SPICE window, libvirt will get corrupted json from QEMU. After some investigation, I found out that the problem is that different SPICE threads are calling mo

Re: [Qemu-devel] [PATCH] pci: add standard bridge device

2011-09-01 Thread Wen Congyang
At 08/22/2011 02:23 PM, Avi Kivity Write: > On 08/22/2011 06:13 AM, Wen Congyang wrote: >> At 08/19/2011 11:26 PM, Avi Kivity Write: >> > On 08/18/2011 10:12 PM, Wen Congyang wrote: >> >> >> >> >> >> The following patch can fix this problem, but I'm not sure >> whether it >> >> >> is right.

Re: [Qemu-devel] [PATCH V8 07/14] Implementation of the libtpms-based backend

2011-09-01 Thread Stefan Berger
On 09/01/2011 01:27 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:35:58AM -0400, Stefan Berger wrote: This patch provides the glue for the TPM TIS interface (frontend) to the libtpms that provides the actual TPM functionality. Some details: This part of the patch provides support fo

Re: [Qemu-devel] [RFC] block I/O throttling: how to enable in libvirt

2011-09-01 Thread Gui Jianfeng
On 2011-9-1 16:11, Stefan Hajnoczi wrote: > On Thu, Sep 01, 2011 at 01:05:31PM +0800, Zhi Yong Wu wrote: >> On Wed, Aug 31, 2011 at 08:18:19AM +0100, Stefan Hajnoczi wrote: >>> On Tue, Aug 30, 2011 at 2:46 PM, Adam Litke wrote: On Tue, Aug 30, 2011 at 09:53:33AM +0100, Stefan Hajnoczi wrote:

Re: [Qemu-devel] [PATCH V8 04/14] Add tpm_tis driver to build process

2011-09-01 Thread Stefan Berger
On 09/01/2011 01:23 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:35:55AM -0400, Stefan Berger wrote: The TPM interface (tpm_tis) needs to be explicitly enabled via ./configure --enable-tpm. This patch also restricts the building of the TPM support to i386 and x86_64 targets since onl

[Qemu-devel] [BUG] qemu crashed when using multifunction pci device

2011-09-01 Thread Wen Congyang
When I use upstream qemu to test multifunction pci device, qemu crashed I use libvrt to start the vm, and I remembered I can start the vm some weeks ago. Here is the log: 2011-09-02 09:07:22.354: starting up LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/local/bin/qemu-sys

Re: [Qemu-devel] [PATCH V8 03/14] Add persistent state handling to TPM TIS frontend driver

2011-09-01 Thread Stefan Berger
On 09/01/2011 01:20 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:35:54AM -0400, Stefan Berger wrote: This patch adds support for handling of persistent state to the TPM TIS frontend. The currently used buffer is determined (can only be in currently active locality and either be a re

Re: [Qemu-devel] [PATCH V8 01/14] Support for TPM command line options

2011-09-01 Thread Stefan Berger
On 09/01/2011 02:14 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:35:52AM -0400, Stefan Berger wrote: This patch adds support for TPM command line options. The command line supported here (considering the libtpms based backend) are ./qemu-... -tpm builtin,path= and ./qemu-... -tpmd

Re: [Qemu-devel] [PATCH V8 01/14] Support for TPM command line options

2011-09-01 Thread Stefan Berger
On 09/01/2011 01:14 PM, Michael S. Tsirkin wrote: On Wed, Aug 31, 2011 at 10:35:52AM -0400, Stefan Berger wrote: This patch adds support for TPM command line options. The command line supported here (considering the libtpms based backend) are ./qemu-... -tpm builtin,path= and ./qemu-... -tpmd

Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 06:35:51PM +0300, Michael S. Tsirkin wrote: > On Thu, Sep 01, 2011 at 03:00:54PM +1000, David Gibson wrote: [snip] > > +DECLARE_LDST_DMA(ub, b, 8); > > +DECLARE_LDST_DMA(uw, w, 16); > > +DECLARE_LDST_DMA(l, l, 32); > > +DECLARE_LDST_DMA(q, q, 64); > > + > > +#undef DECLARE_L

Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 06:14:34PM +0200, Paolo Bonzini wrote: > On 09/01/2011 05:30 PM, Michael S. Tsirkin wrote: > >>> The virtio code already has memory barrier wmb() macros in the code. > >>> However they are was defined as no-ops. The comment claims that real > >>> barriers are not necessa

Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 09:56:25AM +0200, Paolo Bonzini wrote: > On 09/01/2011 09:37 AM, Sasha Levin wrote: > >>> -#define wmb() __asm__ __volatile__("": : :"memory") > >>> + /* TODO: we may also need rmb()s. It hasn't bitten us yet, but.. */ > >>> + #define wmb() __sync_synchronize() > > > >Th

Re: [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 11:05:48AM -0500, Anthony Liguori wrote: > On 09/01/2011 11:03 AM, Avi Kivity wrote: > >On 09/01/2011 06:55 PM, Anthony Liguori wrote: > >>On 09/01/2011 12:00 AM, David Gibson wrote: [snip] > The challenge is what you do about something like ne2k where the > core chipset can

Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 08:47:49AM +0200, Paolo Bonzini wrote: > On 09/01/2011 08:09 AM, David Gibson wrote: > >The patch defines wmb() as __sync_synchronize(), a cross platform memory > >barrier primitive available in sufficiently recent gcc versions (gcc 4.2 > >and after?). If we care about olde

Re: [Qemu-devel] [0/10] Preliminary work for IOMMU emulation support; the easy bits

2011-09-01 Thread David Gibson
On Thu, Sep 01, 2011 at 02:33:41PM +0300, Eduard - Gabriel Munteanu wrote: > On Thu, Sep 01, 2011 at 03:00:53PM +1000, David Gibson wrote: > > A while back, Eduard - Gabriel Munteanu send a series of patches > > implementing support for emulating the AMD IOMMU in conjunction with > > qemu emulated

[Qemu-devel] [PATCH v4 09/32] target-xtensa: add special and user registers

2011-09-01 Thread Max Filippov
Special Registers hold the majority of the state added to the processor by the options. See ISA, 5.3 for details. User Registers hold state added in support of designer's TIE and in some cases of options that Tensilica provides. See ISA, 5.4 for details. Only registers mapped in sregnames or ureg

[Qemu-devel] [PATCH v4 28/32] target-xtensa: add gdb support

2011-09-01 Thread Max Filippov
Specific xtensa processor overlay for GDB contains register map in the gdb/xtensa-config.c. This description is used by the GDB to e.g. parse 'g' response packets and it may be reused in the qemu's gdbstub (only XTREG definitions for non-pseudoregisters are needed). Currently mainline GDB does not

[Qemu-devel] [PATCH v4 08/32] target-xtensa: implement JX/RET0/CALLX

2011-09-01 Thread Max Filippov
Group SNM0 (indirect jumps and calls). Signed-off-by: Max Filippov --- target-xtensa/translate.c | 43 +++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 433e1ba..26cce83 100644

[Qemu-devel] [PATCH v4 15/32] target-xtensa: implement CACHE group

2011-09-01 Thread Max Filippov
All operations in this group are no-ops, because cache ought to be transparent to applications. However cache may be abused, then we'll need to actually implement these opcodes. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 95 - 1 file

[Qemu-devel] [PATCH v4 03/32] target-xtensa: implement disas_xtensa_insn

2011-09-01 Thread Max Filippov
Set up disas_xtensa_insn switch structure, mark required options on high level groups. Implement arithmetic/bit logic/jump/call0. Implement code generation loop with single step/breakpoint checking. Signed-off-by: Max Filippov --- target-xtensa/cpu.h | 67 +++ target-xtensa/helper.c

[Qemu-devel] [PATCH v4 04/32] target-xtensa: implement narrow instructions

2011-09-01 Thread Max Filippov
Instructions with op0 >= 8 are 2 bytes long, others are 3 bytes long. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 54 + 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translat

[Qemu-devel] [PATCH v4 06/32] target-xtensa: add sample board

2011-09-01 Thread Max Filippov
Sample board and sample CPU core are used for debug and may be used for development of custom SoC emulators. This board has two fixed size memory regions for DTCM and ITCM and variable length SRAM region. Signed-off-by: Max Filippov --- Makefile.target|1 + hw/xtensa_sample.c | 105 +++

[Qemu-devel] [PATCH v4 13/32] target-xtensa: mark reserved and TBD opcodes

2011-09-01 Thread Max Filippov
Reserved opcodes must generate illegal instruction exception. Usually they signal emulation quality problems. Not implemented opcodes are good to see. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 110 - 1 files changed, 109 insertions(+

[Qemu-devel] [PATCH v4 12/32] target-xtensa: implement LSAI group

2011-09-01 Thread Max Filippov
- base + offset load/store operations for 1/2/4 byte values; - cache operations (not implemented); - multiprocessor synchronization operations. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |1 + target-xtensa/translate.c | 89 + 2 fi

[Qemu-devel] [PATCH v4 11/32] target-xtensa: implement shifts (ST1 and RST1 groups)

2011-09-01 Thread Max Filippov
- ST1: SAR (shift amount special register) manipulation, NSA(U); - RST1: shifts, 16-bit multiplication. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |4 + target-xtensa/helpers.h |2 + target-xtensa/op_helper.c | 14 +++ target-xtensa/translate.c | 242 +

[Qemu-devel] [PATCH v4 14/32] target-xtensa: implement SYNC group

2011-09-01 Thread Max Filippov
All operations in this group are no-ops, because there are no delayed side effects. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 31 ++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translat

[Qemu-devel] [PATCH v4 16/32] target-xtensa: add PS register and access control

2011-09-01 Thread Max Filippov
Signed-off-by: Max Filippov --- target-xtensa/cpu.h | 53 - target-xtensa/helper.c|1 + target-xtensa/translate.c | 29 3 files changed, 77 insertions(+), 6 deletions(-) diff --git a/target-xtensa/cpu.h b/targ

[Qemu-devel] [PATCH v4 25/32] target-xtensa: implement accurate window check

2011-09-01 Thread Max Filippov
See ISA, 4.7.1.3 for details. Window check is inserted before commands that push "used register watermark" beyond its current level. Used register watermark is reset on instructions that change WINDOW_BASE/WINDOW_START SRs. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 110 ++

[Qemu-devel] [PATCH v4 21/32] target-xtensa: implement extended L32R

2011-09-01 Thread Max Filippov
See ISA, 4.3.3 for details. TB flag XTENSA_TBFLAG_LITBASE is used to track enable bit of LITBASE SR. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |6 ++ target-xtensa/helper.c|1 + target-xtensa/translate.c | 37 + 3 files chang

[Qemu-devel] [PATCH v4 24/32] target-xtensa: implement interrupt option

2011-09-01 Thread Max Filippov
See ISA, 4.4.6 (interrupt option), 4.4.7 (high priority interrupt option) and 4.4.8 (timer interrupt option) for details. Signed-off-by: Max Filippov --- hw/xtensa_pic.c | 96 target-xtensa/cpu.h | 45 +- target-xtensa/helper.c|

Re: [Qemu-devel] [PATCH] Add support for r6040 NIC

2011-09-01 Thread Anthony Liguori
On 09/01/2011 02:39 AM, Markus Armbruster wrote: Blue Swirl writes: On Wed, Aug 31, 2011 at 4:06 PM, Anthony Liguori wrote: On 08/31/2011 09:35 AM, malc wrote: On Wed, 31 Aug 2011, Anthony Liguori wrote: Upper case field names are not okay. If you think coding style isn't clear, that's

[Qemu-devel] [PATCH v4 19/32] target-xtensa: implement windowed registers

2011-09-01 Thread Max Filippov
See ISA, 4.7.1 for details. Physical registers and currently visible window are separate fields in CPUEnv. Only current window is accessible to TCG. On operations that change window base helpers copy current window to and from physical registers. Window overflow check described in 4.7.1.3 is in s

[Qemu-devel] [PATCH v4 29/32] target-xtensa: implement memory protection options

2011-09-01 Thread Max Filippov
- TLB opcode group; - region protection option (ISA, 4.6.3); - region translation option (ISA, 4.6.4); - MMU option (ISA, 4.6.5). Cache control attribute bits are not used by this implementation. Signed-off-by: Max Filippov --- target-xtensa/cpu.h | 56 - target-xtensa/helper.c

[Qemu-devel] [PATCH v4 10/32] target-xtensa: implement RST3 group

2011-09-01 Thread Max Filippov
- access to Special Registers (wsr, rsr); - access to User Registers (wur, rur); - misc. operations option (value clamp, sign extension, min, max); - conditional moves. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 161 + 1 files changed

[Qemu-devel] [PATCH v4 26/32] target-xtensa: implement CPENABLE and PRID SRs

2011-09-01 Thread Max Filippov
Signed-off-by: Max Filippov --- hw/xtensa_sample.c|1 + target-xtensa/cpu.h |2 ++ target-xtensa/translate.c |7 +++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/xtensa_sample.c b/hw/xtensa_sample.c index 9f7733b..c2ad48a 100644 --- a/hw/xtensa_

[Qemu-devel] [PATCH v4 07/32] target-xtensa: implement conditional jumps

2011-09-01 Thread Max Filippov
- BZ (comparison to zero); - BI0 (comparison to signed immediate); - BI1 (comparison to unsigned immediate); - B (two registers comparison, bit sets comparison); - BEQZ.N/BNEZ.N (narrow comparison to zero). Signed-off-by: Max Filippov --- target-xtensa/translate.c | 164

[Qemu-devel] [PATCH v4 18/32] target-xtensa: implement RST2 group (32 bit mul/div/rem)

2011-09-01 Thread Max Filippov
Signed-off-by: Max Filippov --- target-xtensa/translate.c | 77 - 1 files changed, 76 insertions(+), 1 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 4c9db9e..de5f947 100644 --- a/target-xtensa/translate.c +++ b

[Qemu-devel] [PATCH v4 22/32] target-xtensa: implement unaligned exception option

2011-09-01 Thread Max Filippov
See ISA, 4.4.4 for details. Correct (aligned as per ISA) address for unaligned access is generated in case this option is not enabled. Signed-off-by: Max Filippov --- target-xtensa/helper.c|4 ++- target-xtensa/op_helper.c | 26 target-xtensa/translate.c | 4

[Qemu-devel] [PATCH v4 31/32] MAINTAINERS: add xtensa maintainer

2011-09-01 Thread Max Filippov
Add myself as target-xtensa and DC232B maintainer. Signed-off-by: Max Filippov --- MAINTAINERS | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 508ea1e..72b2099 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -115,6 +115,12 @@ M:

[Qemu-devel] [PATCH v4 23/32] target-xtensa: implement SIMCALL

2011-09-01 Thread Max Filippov
Tensilica iss provides support for applications running in freestanding environment through SIMCALL command. It is used by Tensilica libc to access argc/argv, for file I/O, etc. Note that simcalls that accept buffer addresses expect virtual addresses. Signed-off-by: Max Filippov --- Makefile.ta

[Qemu-devel] [PATCH v4 27/32] target-xtensa: implement relocatable vectors

2011-09-01 Thread Max Filippov
See ISA, 4.4.3 for details. Vector addresses recorded in core configuration are absolute values that correspond to default VECBASE value. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |2 ++ target-xtensa/helper.c| 18 -- target-xtensa/translate.c |1 +

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-01 Thread Jan Kiszka
On 2011-09-01 21:35, Luiz Capitulino wrote: > Sometimes, when having lots of VMs running on a RHEV host and the user > attempts to close a SPICE window, libvirt will get corrupted json from > QEMU. > > After some investigation, I found out that the problem is that different > SPICE threads are cal

Re: [Qemu-devel] [PATCH 3/8] RunState: Add additional states

2011-09-01 Thread Jan Kiszka
On 2011-09-01 20:39, Luiz Capitulino wrote: > On Thu, 01 Sep 2011 20:30:57 +0200 > Jan Kiszka wrote: > >> On 2011-09-01 20:12, Luiz Capitulino wrote: >>> Currently, only vm_start() and vm_stop() change the VM state. >>> That's, the state is only changed when starting or stopping the VM. >>> >>> T

[Qemu-devel] [PATCH v4 01/32] target-xtensa: add target stubs

2011-09-01 Thread Max Filippov
Signed-off-by: Max Filippov --- Makefile.target |2 + arch_init.c |2 + arch_init.h |1 + cpu-exec.c|2 + elf.h |2 + hw/xtensa_pic.c | 38 ++ target-xtensa/cpu.h | 95

[Qemu-devel] [PATCH v4 30/32] target-xtensa: add dc232b core and board

2011-09-01 Thread Max Filippov
This is Diamond 232L Standard Core Rev.B (LE). Signed-off-by: Max Filippov --- Makefile.target |1 + hw/xtensa_dc232b.c| 112 target-xtensa/gdb-config-dc232b.c | 261 + target-xtensa/helper.c

[Qemu-devel] [PATCH v4 20/32] target-xtensa: implement loop option

2011-09-01 Thread Max Filippov
See ISA, 4.3.2 for details. Operations that change LEND SR value invalidate TBs at the old and at the new LEND. LEND value at TB compilation time is considered constant and loop instruction is generated based on this value. Invalidation may be avoided for the TB at the old LEND address, since loo

[Qemu-devel] [PATCH v4 17/32] target-xtensa: implement exceptions

2011-09-01 Thread Max Filippov
- mark privileged opcodes with ring check; - make debug exception on exception handler entry. Signed-off-by: Max Filippov --- cpu-exec.c|6 +++ target-xtensa/cpu.h | 67 target-xtensa/helper.c| 37 +++- target-xtensa/help

[Qemu-devel] [PATCH v4 05/32] target-xtensa: implement RT0 group

2011-09-01 Thread Max Filippov
NEG and ABS are the only members of RT0 group. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 7404098..c9e2c06 100644 --- a/target-xt

[Qemu-devel] [PATCH v4 02/32] target-xtensa: add target to the configure script

2011-09-01 Thread Max Filippov
Signed-off-by: Max Filippov --- configure| 12 +++- default-configs/xtensa-softmmu.mak |1 + default-configs/xtensaeb-softmmu.mak |1 + 3 files changed, 13 insertions(+), 1 deletions(-) create mode 100644 default-configs/xtensa-softmmu.mak create

[Qemu-devel] [PATCH v4 00/32] target-xtensa: new target architecture

2011-09-01 Thread Max Filippov
This series adds support for Tensilica Xtensa target. Port status: Linux for DC232B works in the qemu. Not implemented xtensa options: MAC16, floating point coprocessor, boolean option, cache option, debug option. v3 -> v4 changes: - fix usage of type names ending with _t; - fix usage of ident

Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers

2011-09-01 Thread Paolo Bonzini
> > > Why not limit the change to ppc then? > > > > Because the bug is masked by the x86 memory model, but it is still > > there even there conceptually. It is not really true that x86 does > > not need memory barriers, though it doesn't in this case: > > > > http://bartoszmilewski.wordpress.com/20

Re: [Qemu-devel] VFIO v2 design plan

2011-09-01 Thread Alex Williamson
On Thu, 2011-09-01 at 14:10 +1000, David Gibson wrote: > On Tue, Aug 30, 2011 at 08:51:38AM -0600, Alex Williamson wrote: > > On Tue, 2011-08-30 at 17:48 +1000, David Gibson wrote: > > > On Mon, Aug 29, 2011 at 10:24:43PM -0600, Alex Williamson wrote: > > > > On Tue, 2011-08-30 at 13:04 +1000, Davi

Re: [Qemu-devel] RFC: vfio / device assignment -- layout of device fd files

2011-09-01 Thread Scott Wood
On 09/01/2011 03:00 PM, Michael S. Tsirkin wrote: > That's a very rich interface, and easy to get wrong. > AFAIK the only reason vfio uses read/write for PCI was to avoid inventing > a custom interface. But if you do, it looks like a set of ioctls would > be much easier? You can even fit the existi

Re: [Qemu-devel] [PATCH] Add support for r6040 NIC

2011-09-01 Thread bifferos
--- On Thu, 1/9/11, Avi Kivity wrote: > On 08/31/2011 04:05 AM, bifferos > wrote: > > +    pci_register_bar(&s->dev, 0, > 0x100, PCI_BASE_ADDRESS_SPACE_IO, r6040_map); > pci_register_bar() has been converted to the memory > API.  Please rebase to the latest qemu.git master and > read docs/memory.

Re: [Qemu-devel] RFC: vfio / device assignment -- layout of device fd files

2011-09-01 Thread Michael S. Tsirkin
On Mon, Aug 29, 2011 at 04:51:20PM +, Yoder Stuart-B08248 wrote: > Alex Graf, Scott Wood, and I met last week to try to flesh out > some details as to how vfio could work for non-PCI devices, > like we have in embedded systems. This most likely will > require a different kernel driver than vf

Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link

2011-09-01 Thread Michael Roth
On 09/01/2011 01:54 PM, Anthony Liguori wrote: On 08/25/2011 03:18 AM, Stefan Hajnoczi wrote: Avoid duplicate object files during the link. There are legitimate cases where a link command-line would include duplicate object files because two independent subsystems both depend on common infrastru

[Qemu-devel] [RFC PATCH 5/5] VFIO: Simple test tool

2011-09-01 Thread Alex Williamson
Signed-off-by: Alex Williamson --- tools/testing/vfio/Makefile|4 tools/testing/vfio/vfio_test.c | 406 2 files changed, 410 insertions(+), 0 deletions(-) create mode 100644 tools/testing/vfio/Makefile create mode 100644 tools/testing/vfio/vfi

[Qemu-devel] [RFC PATCH 4/5] VFIO: Add PCI device support

2011-09-01 Thread Alex Williamson
Signed-off-by: Alex Williamson --- drivers/vfio/Kconfig|7 ++ drivers/vfio/Makefile |1 drivers/vfio/vfio_main.c| 10 +++ drivers/vfio/vfio_pci.c | 124 +++ drivers/vfio/vfio_private.h |5 ++ 5 files changed, 147 inser

[Qemu-devel] [RFC PATCH 3/5] VFIO: Base framework for new VFIO driver

2011-09-01 Thread Alex Williamson
Signed-off-by: Alex Williamson --- drivers/Kconfig |2 drivers/Makefile|1 drivers/vfio/Kconfig|5 drivers/vfio/Makefile |3 drivers/vfio/vfio_device.c | 109 + drivers/vfio/vfio_iommu.c | 81 drivers/vfio/vfio_main.c|

[Qemu-devel] [RFC PATCH 2/5] intel-iommu: Implement iommu_device_group

2011-09-01 Thread Alex Williamson
We generally have BDF granularity for devices, so we just need to make sure devices aren't hidden behind PCIe-to-PCI bridges. We can then make up a group number that's simply the concatenated seg|bus|dev|fn so we don't have to track them (not that users should depend on that). Also add an option t

[Qemu-devel] [RFC PATCH 1/5] iommu: Add iommu_device_group callback and iommu_group sysfs entry

2011-09-01 Thread Alex Williamson
An IOMMU group is a set of devices for which the IOMMU cannot distinguish transactions. For PCI devices, a group often occurs when a PCI bridge is involved. Transactions from any device behind the bridge appear to be sourced from the bridge itself. We leave it to the IOMMU driver to define the gr

[Qemu-devel] [RFC PATCH 0/5] VFIO-NG group/device/iommu framework

2011-09-01 Thread Alex Williamson
Trying to move beyond talking about how VFIO should work to re-writing the code. This is pre-alpha, known broken, will probably crash your system but it illustrates some of how I see groups, devices, and iommus interacting. This is just the framework, no code to actually support user space driver

Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link

2011-09-01 Thread Lluís Vilanova
Anthony Liguori writes: > On 08/25/2011 03:18 AM, Stefan Hajnoczi wrote: >> Avoid duplicate object files during the link. There are legitimate >> cases where a link command-line would include duplicate object files >> because two independent subsystems both depend on common infrastructure. >> >>

Re: [Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-01 Thread Daniel P. Berrange
On Thu, Sep 01, 2011 at 04:35:45PM -0300, Luiz Capitulino wrote: > Sometimes, when having lots of VMs running on a RHEV host and the user > attempts to close a SPICE window, libvirt will get corrupted json from > QEMU. > > After some investigation, I found out that the problem is that different >

Re: [Qemu-devel] [PATCH] tcg/ppc/tcg-target.c: Avoid 'set but not used' gcc warnings

2011-09-01 Thread Michael S. Tsirkin
On Thu, Sep 01, 2011 at 04:45:01PM +0100, Peter Maydell wrote: > Move the declaration and initialisation of some variables in > tcg_out_qemu_ld and tcg_out_qemu_st inside CONFIG_SOFTMMU, to > avoid the "variable set but not used" warning of gcc 4.6. > > Signed-off-by: Peter Maydell > --- > tcg/p

Re: [Qemu-devel] [PATCH] Preserve current monitor CPU when issuing HMP passthrough commands

2011-09-01 Thread Anthony Liguori
On 09/01/2011 06:46 AM, Daniel P. Berrange wrote: From: "Daniel P. Berrange" Several info commands rely on the 'mon_cpu' field in the Monitor struct. This field can be updated using the 'cpu NN' command. The processing for HMP passthrough commands, however, does not use the global 'Monitor *' i

Re: [Qemu-devel] [PATCH 1/4] Probe for libcheck by default.

2011-09-01 Thread Anthony Liguori
On 09/01/2011 10:42 AM, Gerd Hoffmann wrote: Probe for libcheck and build checks (if found) by default. Can be explicitly disabled using --disable-check-utests. Signed-off-by: Gerd Hoffmann --- configure |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) I think we should convert t

[Qemu-devel] [PATCH] monitor: Protect outbuf from concurrent access

2011-09-01 Thread Luiz Capitulino
Sometimes, when having lots of VMs running on a RHEV host and the user attempts to close a SPICE window, libvirt will get corrupted json from QEMU. After some investigation, I found out that the problem is that different SPICE threads are calling monitor functions (such as monitor_protocol_event()

Re: [Qemu-devel] [PATCH v2 1/2] qxl: send interrupt after migration in case ram->int_pending != 0, RHBZ #732949

2011-09-01 Thread Michael S. Tsirkin
On Wed, Aug 31, 2011 at 03:37:33PM +0300, Yonit Halperin wrote: > if qxl_send_events was called from spice server context, and then > migration had completed before a call to pipe_read, the target > guest qxl driver didn't get the interrupt. This is a general issue with interrupt migration, and PC

Re: [Qemu-devel] [PATCH V8 10/14] Encrypt state blobs using AES CBC encryption

2011-09-01 Thread Michael S. Tsirkin
On Wed, Aug 31, 2011 at 10:36:01AM -0400, Stefan Berger wrote: > This patch adds encryption of the individual state blobs that are written > into the block storage. The 'directory' at the beginnig of the block > storage is not encrypted. Does this mean that there's a new format that we store data

[Qemu-devel] [PATCH 6/6] HMP: Print 'io-status' information

2011-09-01 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- block.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 77579b6..ac9e913 100644 --- a/block.c +++ b/block.c @@ -1840,6 +1840,10 @@ static void bdrv_print_dict(QObject *obj, void *opaque) monitor_printf

[Qemu-devel] [PATCH 7/8] QMP: query-status: Introduce 'status' key

2011-09-01 Thread Luiz Capitulino
This new key reports the current VM status to clients. Please, check the documentation being added in this commit for more details. Signed-off-by: Luiz Capitulino --- monitor.c |3 +-- qmp-commands.hx | 21 - sysemu.h|1 + vl.c| 24 ++

Re: [Qemu-devel] Single 64bit memory transaction instead of two 32bit memory transaction

2011-09-01 Thread Adnan Khaleel
I had asked this question a year ago and I managed to have a temporary work around for doing a single 64bit read/write operations but now I'm looking for a more complete solution. Is there anyway we can prevent Qemu breaking up 64,128 and 256bit XMM or YMM instructions into smaller chunks and h

Re: [Qemu-devel] [PATCH 3/8] RunState: Add additional states

2011-09-01 Thread Luiz Capitulino
On Thu, 01 Sep 2011 20:30:57 +0200 Jan Kiszka wrote: > On 2011-09-01 20:12, Luiz Capitulino wrote: > > Currently, only vm_start() and vm_stop() change the VM state. > > That's, the state is only changed when starting or stopping the VM. > > > > This commit adds the runstate_set() function, which

Re: [Qemu-devel] [PULL 00/15] Tracing patches

2011-09-01 Thread Anthony Liguori
On 09/01/2011 03:06 AM, Stefan Hajnoczi wrote: The following changes since commit f0fb8b7180fdcf536ea635a0720e1496110ecb3b: Merge branch 'omap-for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm into pm (2011-08-29 23:59:06 +0200) are available in the git repository at: ssh:

Re: [Qemu-devel] [PULL] Another fix for rom_device

2011-09-01 Thread Anthony Liguori
On 08/31/2011 11:46 AM, Avi Kivity wrote: On 08/30/2011 11:25 AM, Avi Kivity wrote: Please pull from: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/core Also available from: git://github.com/avikivity/qemu.git memory/core Pulled. Thanks. Regards, Anthony Liguori

[Qemu-devel] [PATCH 1/8] Move vm_state_notify() prototype from cpus.h to sysemu.h

2011-09-01 Thread Luiz Capitulino
It's where all the state handling functions prototypes are located. Signed-off-by: Luiz Capitulino --- cpus.h |1 - sysemu.h |1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpus.h b/cpus.h index f42b54e..5885885 100644 --- a/cpus.h +++ b/cpus.h @@ -15,7 +15,6 @@ vo

Re: [Qemu-devel] [PATCH V8 14/14] Allow to provide inital TPM state

2011-09-01 Thread Michael S. Tsirkin
On Thu, Sep 01, 2011 at 09:10:24PM +0300, Michael S. Tsirkin wrote: > Do we really have to hand-craft file reading? > How large is TPMPROP_TPM_MAX_NV_SPACE? > If not too large, we can just allocate that > and do a single fread call? > > Or, we rely on glib now - can we use > g_io_channel_read_to_

Re: [Qemu-devel] [PATCH] build: sort objects to remove duplicates for link

2011-09-01 Thread Anthony Liguori
On 08/25/2011 03:18 AM, Stefan Hajnoczi wrote: Avoid duplicate object files during the link. There are legitimate cases where a link command-line would include duplicate object files because two independent subsystems both depend on common infrastructure. Use GNU make's $(sort) function to remo

Re: [Qemu-devel] [PATCH 1/2] Add glib support to main loop

2011-09-01 Thread Anthony Liguori
On 08/22/2011 08:12 AM, Anthony Liguori wrote: This allows GSources to be used to register callback events in QEMU. This is useful as it allows us to take greater advantage of glib and also because it allows us to write code that is more easily testable outside of QEMU since we can make use of g

[Qemu-devel] [PATCH 4/6] scsi: Support I/O status

2011-09-01 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hw/scsi-disk.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 9f451bc..85b1ce0 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -193,6 +193,7 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, i

[Qemu-devel] [PATCH 3/6] ide: Support I/O status

2011-09-01 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hw/ide/core.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 41f2679..16b422f 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -527,6 +527,7 @@ static int ide_handle_rw_error(IDEState *s, int error,

[Qemu-devel] [PATCH 1/6] block: Keep track of devices' I/O status

2011-09-01 Thread Luiz Capitulino
This commit adds support to the BlockDriverState type to keep track of the devices' I/O status. There are three possible status: BDRV_IOS_OK (no error so far), BDRV_IOS_ENOSPC (no space error) and BDRV_IOS_FAILED (any other error). The distinction between no space and other errors is important bec

[Qemu-devel] [PATCH 2/6] virtio: Support I/O status

2011-09-01 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hw/virtio-blk.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 8a33720..bd81586 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -78,6 +78,7 @@ static int virtio_blk_handle_rw_error(VirtIOBl

  1   2   3   >