Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Paolo Bonzini
Il 27/03/2012 23:21, Zhi Yong Wu ha scritto: >> Yes, that's correct. Everything that uses PROP_PTR needs to become a > But i didn't see that that stuff which uses PROP_PTR become a link in > current QEMU code. Yes, that's why I wrote "needs to become". In order to use links, you need two things:

[Qemu-devel] [V6 PATCH 2/4] net: model specific announcing support

2012-03-27 Thread Jason Wang
This patch introduces a function pointer in NetClientInfo which is called during self announcement. With this, each kind of card can announce the link with a specific way. The old method is still kept for cards that have not implemented this or old guest. The first user would be virtio-net. Signed

[Qemu-devel] [V6 PATCH 4/4] virtio-net: compat guest announce support.

2012-03-27 Thread Jason Wang
Disable guest announce for compat machine types. Signed-off-by: Jason Wang --- hw/pc_piix.c | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 6c5c40f..780b607 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

[Qemu-devel] [V6 PATCH 3/4] virtio-net: notify guest to annouce itself

2012-03-27 Thread Jason Wang
It's hard to track all mac addresses and their usage (vlan, bondings, ipv6) in qemu to send proper gratuitous packet. The better choice is to let guest to send them. So, this patch introduces a new rw config status bit of virtio-net, VIRTIO_NET_S_ANNOUNCE which is used to notify guest to announce

[Qemu-devel] [V6 PATCH] virtio-net: send gratuitous packets when needed

2012-03-27 Thread Jason Wang
As hypervior does not have the knowledge of guest network configuration, it's better to ask guest to send gratuitous packets when needed. Guest tests VIRTIO_NET_S_ANNOUNCE bit during config change interrupt and when it is set, a workqueue is scheduled to send gratuitous packet through NETDEV_NOTIF

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

2012-03-27 Thread Jason Wang
qemu_announce_self() were moved to vm_start(). This is because we may want to let guest to send the gratuitous packets. A global variable need_announce were introduced to record the pending announcement, and vm_start() would send gratuitous packet depends on this value. Signed-off-by: Jason Wang

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

2012-03-27 Thread Jason Wang
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 bondings, vlans or ipv6s. Current gratuitous (RARP packets for primary mac address) may not wor

[Qemu-devel] I/O in backing file

2012-03-27 Thread PANKAJ RAWAT
Hi all, I am currently using backing file.The question of my concern is regarding the I/O operation Now when we create a external snapshot in qcow2, a new file is created leaving the original file as backing file * Can any one tell,*how the I/O is performed in detail way?. Means when the new snap

Re: [Qemu-devel] [PATCH 00/12 v11] introducing a new, dedicated guest memory dump mechanism

2012-03-27 Thread Wen Congyang
Hi, Luiz, Anthony, Jan do you have any comments about this patchset? Thanks Wen Congyang At 03/26/2012 05:58 PM, Wen Congyang Wrote: > Hi, all > > 'virsh dump' can not work when host pci device is used by guest. We have > discussed this issue here: > http://lists.nongnu.org/archive/html/qemu-de

[Qemu-devel] [PATCH 4/4] Get rid of size element of pci_bus->r structure

2012-03-27 Thread Alexey Korolev
The 'size' element of pci_bus->r structure is no longer need as the information about bridge region size is already stored in pci_region_entry structure. Signed-off-by: Alexey Korolev --- src/pciinit.c | 21 + 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/

[Qemu-devel] [PATCH 3/4] Switch from array based resource allocation to list

2012-03-27 Thread Alexey Korolev
In this patch instead of array based resource allocation approach we calculate resource addresses linked lists of pci_region_entry structures. Signed-off-by: Alexey Korolev --- src/pciinit.c | 179 - 1 files changed, 50 insertions(+), 129

[Qemu-devel] [PATCH 2/4] Added a pci_region_entry structure

2012-03-27 Thread Alexey Korolev
In this patch the pci_region_entry structure is introduced. The pci_device->bars are removed. The information from pci_region_entry is used to program pci bars. Signed-off-by: Alexey Korolev --- src/pci.h |5 -- src/pciinit.c | 116 ++-

[Qemu-devel] [PATCH 1/4] Add basic linked list operations

2012-03-27 Thread Alexey Korolev
This linked list implementation is partially based on kernel code. So it should be quite stable Signed-off-by: Alexey Korolev --- src/util.h | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/util.h b/src/util.h index 70d3c4c..17df3cf 100644 --- a/s

[Qemu-devel] [PATCH 0/4] Redesign of pciinit.c (take 3)

2012-03-27 Thread Alexey Korolev
Hi, This patch series redesigns the existing pciinit.c code and introduces linked list operations. Changes are more about structures definitions rather than functionality. There are no more arrays of bases and counts in new implementation. The new implementation is based on dynamic allocation of p

[Qemu-devel] [PATCH] block: bdrv_append() fixes

2012-03-27 Thread Jeff Cody
A few fixups for bdrv_append(): The new bs (bs_new) passed into bdrv_append() should be anonymous. Rather than call bdrv_make_anon() to enforce this, use an assert to catch when a caller is passing in a bs_new that is not anonymous. Also, the new top layer should have its backing_format reflect

Re: [Qemu-devel] [PATCH v5 2/4] qemu-socket: change inet_connect() to to support nonblock socket

2012-03-27 Thread Amos Kong
- Original Message - > - Original Message - > > On 03/22/2012 05:52 AM, Amos Kong wrote: > > > Change inet_connect(const char *str, int socktype) to > > > inet_connect(const char *str, bool block), > > > socktype is unused, block is used to assign if set socket > > > to block/nonblo

Re: [Qemu-devel] [PATCH V3 01/12] add MIPS DSP internal functions

2012-03-27 Thread Jia Liu
On Tue, Mar 27, 2012 at 11:33 PM, Richard Henderson wrote: > On 03/27/12 02:24, Jia Liu wrote: >> +ifeq ($(TARGET_BASE_ARCH), mips) >> +libobj-y += dsp_helper.o >> +endif > ... > >> +#include "dyngen-exec.h" >> + >> +/*** MIPS DSP internal functions begin ***/ >> +static inline void set_DSPControl

Re: [Qemu-devel] [PATCH V3 09/12] Add helper functions for MIPS DSP Compare-Pick instructions

2012-03-27 Thread Jia Liu
On Wed, Mar 28, 2012 at 1:42 AM, Richard Henderson wrote: > On 03/27/12 02:24, Jia Liu wrote: >> +    uint32_t cc3 = 0, cc2 = 0, cc1 = 0, cc0 = 0; >> +    uint32_t flag; > ... >> +    if (rs3 == rt3) >> +        cc3 = 1; > > Clearer as "cc3 = (rs3 == rt3);", etc. > I'll try to make code more clea

Re: [Qemu-devel] [PATCH V3 08/12] Add helper functions for MIPS DSP Bit/Manipulation instructions

2012-03-27 Thread Jia Liu
On Wed, Mar 28, 2012 at 12:23 AM, Richard Henderson wrote: > On 03/27/12 02:24, Jia Liu wrote: >> +uint32_t helper_bitrev(uint32_t rt) >> +{ >> +    int32_t temp; >> +    uint32_t rd; >> + >> +    temp = rt & MIPSDSP_LO; >> +    rd = temp; >> + >> +    return rd; >> +} > > Forgot to actually rever

Re: [Qemu-devel] [PATCH V3 04/12] Add MIPS DSP Load instructions Support

2012-03-27 Thread Jia Liu
On Tue, Mar 27, 2012 at 11:49 PM, Richard Henderson wrote: > On 03/27/12 02:24, Jia Liu wrote: >> +DEF_HELPER_2(lbux, tl, tl, int) >> +DEF_HELPER_2(lhx, i32, i32, int) >> +DEF_HELPER_2(lwx, i32, i32, int) > > These should not be helpers.  They are exactly the qemu_ld{8,16,32}u opcodes. > Yes, tha

Re: [Qemu-devel] [PATCH V3 05/12] Add helper functions for MIPS DSP Arithmetic instructions

2012-03-27 Thread Jia Liu
On Wed, Mar 28, 2012 at 12:03 AM, Richard Henderson wrote: > On 03/27/12 02:24, Jia Liu wrote: >> +DEF_HELPER_FLAGS_2(addq_ph, TCG_CALL_CONST | TCG_CALL_PURE, i32, i32, i32) >> +DEF_HELPER_FLAGS_2(addq_s_ph, TCG_CALL_CONST | TCG_CALL_PURE, i32, i32, i32) >> +DEF_HELPER_FLAGS_2(addq_s_w, TCG_CALL_C

Re: [Qemu-devel] [PATCH V3 06/12] Add helper functions for MIPS DSP GPR-Based Shift instructions

2012-03-27 Thread Jia Liu
On Wed, Mar 28, 2012 at 12:11 AM, Richard Henderson wrote: > On 03/27/12 02:24, Jia Liu wrote: >> +DEF_HELPER_FLAGS_2(shll_qb, TCG_CALL_CONST | TCG_CALL_PURE, i32, int, i32) > It should be DEF_HELPER_2(shll_qb, i32, int, i32). Is it? Sorry I'm not sure about it. > Likewise, some of these are not

Re: [Qemu-devel] [PATCH V3 11/12] Handle MIPS DSP instructions in target-mips/translate.c

2012-03-27 Thread Jia Liu
On Wed, Mar 28, 2012 at 1:48 AM, Richard Henderson wrote: > On 03/27/12 02:24, Jia Liu wrote: >> Handle MIPS DSP instructions in target-mips/translate.c. >> >> Signed-off-by: Jia Liu > > This patch should have been split as well, adding translations of the insns > at the same time you add the hel

Re: [Qemu-devel] [PATCH V3 03/12] Add MIPS DSP Branch instruction Support

2012-03-27 Thread Jia Liu
On Tue, Mar 27, 2012 at 11:46 PM, Richard Henderson wrote: > On 03/27/12 02:24, Jia Liu wrote: >> Add MIPS DSP Branch instruction Support. >> >> Signed-off-by: Jia Liu > > Reviewed-by: Richard Henderson > >> +        case OPC_BPOSGE32: >> +            tcg_gen_setcondi_tl(TCG_COND_GT, bcond, t0,

[Qemu-devel] [PATCH 09/14] tcg-sparc: Change AREG0 in generated code to %i0.

2012-03-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c |3 ++- tcg/sparc/tcg-target.h |9 + 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index c014ce0..ad040fb 100644 --- a/tcg/sparc/tcg-target.c +++ b/tcg/spa

[Qemu-devel] [PATCH 03/14] tcg-sparc: Assume v9 cpu always, i.e. force v8plus in 32-bit mode.

2012-03-27 Thread Richard Henderson
Current code doesn't actually work in 32-bit mode at all. Since no one really noticed, drop the complication of v7 and v8 cpus. Eliminate the --sparc_cpu configure option and standardize macro testing on TCG_TARGET_REG_BITS / HOST_LONG_BITS Signed-off-by: Richard Henderson --- configure

[Qemu-devel] [PATCH 07/14] Avoid declaring the env variable at all if CONFIG_TCG_PASS_AREG0.

2012-03-27 Thread Richard Henderson
At the same time, remove use of the global ENV from user-exec.c. Signed-off-by: Richard Henderson --- Makefile.target |5 - dyngen-exec.h |5 + user-exec.c | 17 ++--- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/Makefile.target b/Makefile.

[Qemu-devel] [PATCH 10/14] tcg-sparc: Clean up cruft stemming from attempts to use global registers.

2012-03-27 Thread Richard Henderson
Don't use -ffixed-gN. Don't link statically. Don't save/restore AREG0 around calls. Don't allocate space on the stack for AREG0 save. Signed-off-by: Richard Henderson --- configure | 12 -- tcg/sparc/tcg-target.c | 57

[Qemu-devel] [PATCH 00/14] tcg-sparc improvments, v2

2012-03-27 Thread Richard Henderson
Changes v1->v2: * Patch 3 found more __sparc_v8plus__ and __sparc_v9__ conditionals to convert. * Patch 6, user-exec.c no longer uses dyngen-exec.h at all. * Patch 7, env fallback to cpu_single_env now via macro. * Merged some of the qemu_ld/st patches. * Other random cleanups, as now

[Qemu-devel] [PATCH 05/14] tcg-sparc: Simplify qemu_ld/st direct memory paths.

2012-03-27 Thread Richard Henderson
Given that we have an opcode for all sizes, all endianness, turn the functions into a simple table lookup. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 384 +++- 1 files changed, 150 insertions(+), 234 deletions(-) diff --git a/tcg/s

Re: [Qemu-devel] [PATCH] pci: Factor out bounds checking on config space accesses

2012-03-27 Thread David Gibson
Michael, Any chance of an ack or nack on this one? On Mon, Mar 19, 2012 at 03:58:11PM +1100, David Gibson wrote: > There are several paths into the code to emulate PCI config space accesses: > one for MMIO to a plain old PCI bridge one for MMIO to a PCIe bridge and > one for the pseries machine w

[Qemu-devel] [PATCH 04/14] tcg-sparc: Fix qemu_ld/st to handle 32-bit host.

2012-03-27 Thread Richard Henderson
At the same time, split out the tlb load logic to a new function. Fixes the cases of two data registers and two address registers. Fixes the signature of, and adds missing, qemu_ld/st opcodes. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 751

[Qemu-devel] [PATCH] pseries: Implement RTAS system-reboot call

2012-03-27 Thread David Gibson
This patch adds the PAPR defined RTAS system-reboot call to the pseries machine emulation, providing the guest with a way to trigger a reboot. This exposes a bug in the pseries VIO code which means CRQs are not properly reset on a system reset. This patch also fixes that bug by adding a suitable r

[Qemu-devel] [PATCH 01/14] tcg-sparc: Hack in qemu_ld/st64 for 32-bit.

2012-03-27 Thread Richard Henderson
Not actually implemented, but at least we avoid the tcg assert at startup. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 247a278..0e71618 100644 --- a/tc

[Qemu-devel] [PATCH 11/14] tcg-sparc: Mask shift immediates to avoid illegal insns.

2012-03-27 Thread Richard Henderson
The xtensa-test image generates a sra_i32 with count 0x40. Whether this is accident of tcg constant propagation or originating directly from the instruction stream is immaterial. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 18 -- 1 files changed, 12 insertions

[Qemu-devel] [PATCH 06/14] tcg-sparc: Support GUEST_BASE.

2012-03-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- configure |2 ++ tcg/sparc/tcg-target.c | 26 +++--- tcg/sparc/tcg-target.h |2 ++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 7741ba9..a79a090 100755 --- a/configure +

[Qemu-devel] [PATCH 02/14] tcg-sparc: Fix ADDX opcode.

2012-03-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 0e71618..358a70c 100644 --- a/tcg/sparc/tcg-target.c +++ b/tcg/sparc/tcg-target.c @@ -242,7 +242,7 @@ static

[Qemu-devel] [PATCH 08/14] tcg-sparc: Do not use a global register for AREG0.

2012-03-27 Thread Richard Henderson
Use of "env" as a macro means constraining include file ordering a bit. Signed-off-by: Richard Henderson --- dyngen-exec.h| 17 +++-- target-m68k/op_helper.c |2 +- target-unicore32/op_helper.c |2 +- target-xtensa/op_helper.c|2 +- xtensa-semi.

Re: [Qemu-devel] [Qemu-ppc] [PATCH] Use DMADirection type for dma_bdrv_io

2012-03-27 Thread David Gibson
On Tue, Mar 27, 2012 at 05:17:23PM +0200, Andreas Färber wrote: > Am 27.03.2012 16:43, schrieb Kevin Wolf: > > Am 27.03.2012 16:30, schrieb Andreas Färber: > >> Am 27.03.2012 04:42, schrieb David Gibson: > >>> Currently dma_bdrv_io() takes a 'to_dev' boolean parameter to > >>> determine the directi

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/2] PPC: Fix interrupt MSR value within the PPC interrupt handler.

2012-03-27 Thread David Gibson
On Tue, Mar 27, 2012 at 12:47:32PM -0500, Scott Wood wrote: > On 03/27/2012 10:41 AM, Mark Cave-Ayland wrote: > > Commit 41557447d30eeb944e42069513df13585f5e6c7f introduced a new method of > > calculating the MSR for the interrupt context. However this doesn't quite > > agree with the PowerISA 2.06

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] PPC: Fix TLB invalidation bug within the PPC interrupt handler.

2012-03-27 Thread David Gibson
On Tue, Mar 27, 2012 at 04:41:55PM +0100, Mark Cave-Ayland wrote: > Commit 41557447d30eeb944e42069513df13585f5e6c7f also introduced a subtle TLB > flush bug. By applying a mask to the interrupt MSR which cleared the IR/DR > bits at the start of the interrupt handler, the logic towards the end of th

[Qemu-devel] [PATCH 13/14] tcg-sparc: Add %g/%o registers to alloc_order

2012-03-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 9e822f3..72d65cb 100644 --- a/tcg/sparc/tcg-target.c +++ b/tcg/sparc/tcg-target.c @@ -84,12 +84,

[Qemu-devel] [PATCH 14/14] tcg-sparc: Fix and enable direct TB chaining.

2012-03-27 Thread Richard Henderson
Signed-off-by: Richard Henderson --- exec-all.h |9 ++--- tcg/sparc/tcg-target.c | 19 --- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/exec-all.h b/exec-all.h index 93a5b22..f7d4708 100644 --- a/exec-all.h +++ b/exec-all.h @@ -120,9 +120,

[Qemu-devel] [PATCH 12/14] tcg-sparc: Use defines for temporaries.

2012-03-27 Thread Richard Henderson
And change from %i4/%i5 to %g1/%o7 to remove a v8plus fixme. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 114 --- 1 files changed, 58 insertions(+), 56 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index

Re: [Qemu-devel] [Qemu-ppc] [PATCH] Use DMADirection type for dma_bdrv_io

2012-03-27 Thread David Gibson
On Tue, Mar 27, 2012 at 04:43:25PM +0200, Kevin Wolf wrote: > Am 27.03.2012 16:30, schrieb Andreas Färber: > > Am 27.03.2012 04:42, schrieb David Gibson: > >> Currently dma_bdrv_io() takes a 'to_dev' boolean parameter to > >> determine the direction of DMA it is emulating. We already have a > >> D

[Qemu-devel] [PATCH 3/4] linux-user: Add proper error messages for bad options

2012-03-27 Thread Meador Inge
This patch adds better support for diagnosing option parser errors. The previous implementation just printed the usage text and exited when a bad option or argument was found. This made it very difficult to determine why the usage was being displayed and it was doubly confusing for cases like '--

[Qemu-devel] [PATCH 1/4] linux-user: Exit 0 when -h is used

2012-03-27 Thread Meador Inge
Signed-off-by: Meador Inge --- linux-user/main.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 962677e..aabce83 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -51,7 +51,7 @@ int have_guest_base;

Re: [Qemu-devel] [PATCH v5 3/4] sockets: pass back errors in inet_listen()

2012-03-27 Thread Michael Roth
On Thu, Mar 22, 2012 at 11:52:54AM +0800, Amos Kong wrote: > Use set_socket_error() to restore real erron, > set errno to EINVAL for parse error. > > Signed-off-by: Amos Kong > --- > qemu-sockets.c | 21 - > 1 files changed, 16 insertions(+), 5 deletions(-) > > diff --git

[Qemu-devel] [PATCH 4/4] linux-user: Treat --foo options the same as -foo

2012-03-27 Thread Meador Inge
The system mode binaries provide a similiar alias and it makes common options like --version and --help work as expected. Signed-off-by: Meador Inge --- linux-user/main.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 9616d

[Qemu-devel] [PATCH 2/4] linux-user: Add -help

2012-03-27 Thread Meador Inge
This option is already available on the system mode binaries. It would be better if long options were supported (i.e. --help), but this is okay for now. Signed-off-by: Meador Inge --- linux-user/main.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/linux-user/main.c b

[Qemu-devel] [PATCH 0/4] linux-user: Option parser cleanup

2012-03-27 Thread Meador Inge
This series is focused at cleaning up a few issues in the GNU/Linux usermode driver's option parsing. -h has been fixed to exit with 0, a -help option has been added, proper error messages have been added for unknown options and bad arguments, and --foo is now excepted in addition to -foo. Meador

Re: [Qemu-devel] [PATCH 1/2] qemu kvm: Set up gsi bitmap correctly

2012-03-27 Thread Jan Kiszka
On 2012-03-28 00:25, Alex Williamson wrote: > On Wed, 2012-03-28 at 00:01 +0200, Jan Kiszka wrote: >> On 2012-03-27 23:31, Alex Williamson wrote: >>> On Tue, 2012-03-27 at 17:00 -0400, Jason Baron wrote: The current 'kvm_init_irq_routing()' doesn't set up the gsi bitmap correctly, and as

Re: [Qemu-devel] [PATCH 1/2] qemu kvm: Set up gsi bitmap correctly

2012-03-27 Thread Alex Williamson
On Wed, 2012-03-28 at 00:01 +0200, Jan Kiszka wrote: > On 2012-03-27 23:31, Alex Williamson wrote: > > On Tue, 2012-03-27 at 17:00 -0400, Jason Baron wrote: > >> The current 'kvm_init_irq_routing()' doesn't set up the gsi bitmap > >> correctly, and as a consequence pins max_gsi to 32 when it really

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

2012-03-27 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 1/2] qemu kvm: Set up gsi bitmap correctly

2012-03-27 Thread Jan Kiszka
On 2012-03-27 23:31, Alex Williamson wrote: > On Tue, 2012-03-27 at 17:00 -0400, Jason Baron wrote: >> The current 'kvm_init_irq_routing()' doesn't set up the gsi bitmap >> correctly, and as a consequence pins max_gsi to 32 when it really >> should be 1024. I ran into this limitation while testing

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

2012-03-27 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 6395f06..e6d198a 100755 --- a/configure +++ b/configure @@ -196,6 +196,7 @@ guest_a

Re: [Qemu-devel] [PATCH 1/2] qemu kvm: Set up gsi bitmap correctly

2012-03-27 Thread Jan Kiszka
On 2012-03-27 23:00, Jason Baron wrote: > The current 'kvm_init_irq_routing()' doesn't set up the gsi bitmap > correctly, and as a consequence pins max_gsi to 32 when it really > should be 1024. I ran into this limitation while testing pci > passthrough, where I consistently would get -ENOSPACE ret

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

2012-03-27 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 V15 1/7] Support for TPM command line options

2012-03-27 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 V15 4/7] Build the TPM frontend code

2012-03-27 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 44b2e83..7cb4588 100644 --- a/Makefile.t

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

2012-03-27 Thread Anthony Liguori
On 03/27/2012 03:24 PM, Stefan Berger wrote: 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 emu

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

2012-03-27 Thread Anthony Liguori
On 03/27/2012 03:24 PM, Stefan Berger wrote: 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

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

2012-03-27 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

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

2012-03-27 Thread Anthony Liguori
On 03/27/2012 03:24 PM, 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 1/2] qemu kvm: Set up gsi bitmap correctly

2012-03-27 Thread Alex Williamson
On Tue, 2012-03-27 at 17:00 -0400, Jason Baron wrote: > The current 'kvm_init_irq_routing()' doesn't set up the gsi bitmap > correctly, and as a consequence pins max_gsi to 32 when it really > should be 1024. I ran into this limitation while testing pci > passthrough, where I consistently would get

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

2012-03-27 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 --- hw/tpm_passthrough.c | 61 ++--- qemu-config.c|5 qemu-options.hx | 11

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

2012-03-27 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

Re: [Qemu-devel] [RFC 1/9] hostdev: introduce the infrastructure for host device model

2012-03-27 Thread Zhi Yong Wu
On Tue, Mar 27, 2012 at 10:50 PM, Paolo Bonzini wrote: > Il 27/03/2012 16:18, Zhi Yong Wu ha scritto: >> On Tue, Mar 27, 2012 at 9:58 PM, Paolo Bonzini wrote: >>> Il 27/03/2012 13:59, Zhi Yong Wu ha scritto: On Tue, Mar 27, 2012 at 6:15 PM, Paolo Bonzini wrote: > Il 27/03/2012 11:06, Zh

Re: [Qemu-devel] [PATCH 3/4] qdev: give all devices a canonical path

2012-03-27 Thread Anthony Liguori
On 03/27/2012 11:38 AM, Paolo Bonzini wrote: A strong limitation of QOM right now is that unconverted ports (e.g. all...) do not give a canonical path to devices that are part of the board. This in turn makes it impossible to replace PROP_PTR with a QOM link for example. Signed-off-by: Paolo Bo

Re: [Qemu-devel] [PATCH 4/4] qdev: put all devices under /machine

2012-03-27 Thread Anthony Liguori
On 03/27/2012 11:38 AM, Paolo Bonzini wrote: Avoid cluttering too much the QOM root. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- hw/piix_pci.c |2 +- hw/ppc_prep.c |2 +- hw/qdev-monitor.c |4 ++-- hw/qdev.c |

Re: [Qemu-devel] [PATCH 2/4] qdev: add children before qdev_init

2012-03-27 Thread Anthony Liguori
On 03/27/2012 11:38 AM, Paolo Bonzini wrote: We want the composition tree to to be in order by the time we call qdev_init, so that a single set of the toplevel realize property can propagate all the way down the composition tree. This is not the case so far. Unfortunately, this is incompatible

Re: [Qemu-devel] [PATCH 1/4] qom: add container_get

2012-03-27 Thread Anthony Liguori
On 03/27/2012 11:38 AM, Paolo Bonzini wrote: This is QOM "mkdir -p". It is useful when referring to container objects such as "/machine". That's a very interesting analogy... Reviewed-by: Anthony Liguori With the big caveat of let's not abuse how easy this makes it to add depth to the hier

[Qemu-devel] [PATCH 2/2] qemu kvm: add better error reporting when kvm_get_irq_route_gsi() fails

2012-03-27 Thread Jason Baron
When kvm_get_irq_route_gsi() fails in assigned_dev_update_msix_mmio, it would be nice to have a better error message. Signed-off-by: Jason Baron --- hw/device-assignment.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c

[Qemu-devel] [PATCH 0/2] qemu kvm: correct gsi bitmap

2012-03-27 Thread Jason Baron
Hi, While testing pci passthrough, I ran out of gsi bits, b/c the bitmap is not initialized correctly. Fix the initialization of the bitmap, and add extra error reporting for this condition. Thanks, -Jason Jason Baron (2): qemu kvm: Set up gsi bitmap correctly qemu kvm: add better error re

[Qemu-devel] [PATCH 1/2] qemu kvm: Set up gsi bitmap correctly

2012-03-27 Thread Jason Baron
The current 'kvm_init_irq_routing()' doesn't set up the gsi bitmap correctly, and as a consequence pins max_gsi to 32 when it really should be 1024. I ran into this limitation while testing pci passthrough, where I consistently would get -ENOSPACE return from kvm_get_irq_route_gsi() in assigned_dev

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: Fix call syntax for qemu-img

2012-03-27 Thread Stefan Weil
Am 14.03.2012 21:48, schrieb Stefan Weil: Am 14.03.2012 20:08, schrieb Eric Blake: On 03/14/2012 12:57 PM, Stefan Weil wrote: qemu-img requires first options, then file name, then size. GNU getopt also allows options at the end, but POSIX getopt doesn't. Try "export POSIXLY_CORRECT=y" to get t

[Qemu-devel] [Bug 966471] [NEW] qemu-i386-user fails on powerpc host (bash: fork: Invalid argument)

2012-03-27 Thread Vladimir Berezenko
Public bug reported: I'm using Debian testing powerpc on PowerMac G5. I've tried to install i386 target and after a boostsrap it tries to chroot there and continue installing. But it fails with fork: Invalid argument. Manual chroot there fails on ls the same. ** Affects: qemu Importance: Und

Re: [Qemu-devel] [PATCH 3/4] Enable qemu-timer dynticks for Solaris

2012-03-27 Thread Peter Portante
There exists a simple patch that changes the wait loop timer to use CLOCK_MONOTONIC. See https://github.com/portante/qemu/commit/35c92daa9784882153c6d8b0e15e8c8f181d6e8a . -peter On Tue, Mar 27, 2012 at 12:00 PM, Jan Kiszka wrote: > On 2012-03-27 17:52, Paolo Bonzini wrote: > > Il 27/03/2012 17

[Qemu-devel] [Bug 966316] [NEW] Can't load Android VBOX image or even linux test image as well

2012-03-27 Thread seongnam
Public bug reported: Can't load Android X86 ICS 4.0 VBOX image. It worked with previous version before adding /qemu/hw/pc_sysfw.c file ( tested with version 1.0 ). x86_64-softmmu# ./qemu-system-x86_64 ~/kvm-test-image/x86-linux-0.2.img qemu: PC system firmware (pflash) must be a multiple of 0x1

[Qemu-devel] Adding size to snapshot

2012-03-27 Thread Frediano Ziglio
Hi, did you add disk size to snapshot in order to support resizing of snapshot? I remember we discussed about some months ago. Regards Frediano

Re: [Qemu-devel] [PATCH] Small change to remove short 250us timeouts every other time through the wait loop.

2012-03-27 Thread Peter Portante
Should I resubmit the patch? Thanks, -peter On Mar 27, 2012, at 8:34 AM, Avi Kivity wrote: > On 03/22/2012 04:59 PM, Peter Portante wrote: >> Basically, the main wait loop calls qemu_run_all_timers() unconditionally. >> The >> first thing this routine used to do is to see if a timer had been s

[Qemu-devel] [RFC PATCH v3 8/8] tracetool: Add MAINTAINERS info

2012-03-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- MAINTAINERS |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f83d07c2..0e66dd8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -548,6 +548,8 @@ Tracing M: Stefan Hajnoczi S: Maintained F: trace/ +F: scrip

[Qemu-devel] [RFC PATCH v3 3/8] tracetool: Add module for the 'h' format

2012-03-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/format/h.py | 45 + 1 files changed, 45 insertions(+), 0 deletions(-) create mode 100644 scripts/tracetool/format/h.py diff --git a/scripts/tracetool/format/h.py b/scripts/tracetool/format/h.py new fil

Re: [Qemu-devel] [PATCH v1 1/1] syscall: #ifdef newer RLIMIT_* codes

2012-03-27 Thread Meador Inge
On 03/27/2012 12:15 PM, Riku Voipio wrote: > Hi, > > Do we really need this? 2.6.12 came out in 2005, even oldest supported > RHEL (5) is minimum 2.6.18 these days. The development environment I am working with uses a RHEL 3 compatible sysroot (RHEL 3 is currently marked with "extended life cycl

[Qemu-devel] [RFC PATCH v3 6/8] tracetool: Add support for the 'ust' backend

2012-03-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/ust.py | 102 ++ 1 files changed, 102 insertions(+), 0 deletions(-) create mode 100644 scripts/tracetool/backend/ust.py diff --git a/scripts/tracetool/backend/ust.py b/scripts/tracetool/backend/ust.

[Qemu-devel] [RFC PATCH v3 5/8] tracetool: Add support for the 'simple' backend

2012-03-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/simple.py | 60 +++ 1 files changed, 60 insertions(+), 0 deletions(-) create mode 100644 scripts/tracetool/backend/simple.py diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backen

[Qemu-devel] [RFC PATCH v3 4/8] tracetool: Add support for the 'stderr' backend

2012-03-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/backend/stderr.py | 61 +++ 1 files changed, 61 insertions(+), 0 deletions(-) create mode 100644 scripts/tracetool/backend/stderr.py diff --git a/scripts/tracetool/backend/stderr.py b/scripts/tracetool/backen

Re: [Qemu-devel] [PATCH v2 0/6] ARM: AREG0 conversion

2012-03-27 Thread Artyom Tarasenko
On Tue, Mar 27, 2012 at 7:01 PM, Laurent Desnogues wrote: > On Tue, Mar 27, 2012 at 6:48 PM, Blue Swirl wrote: >> On Tue, Mar 27, 2012 at 13:40, Laurent Desnogues >> wrote: >>> On Mon, Mar 26, 2012 at 7:02 PM, Blue Swirl wrote: >>> [...] At least stack protector is protecting more code tha

Re: [Qemu-devel] [PATCH] sparc: pass page aligned addresses to tlb_set_page

2012-03-27 Thread Blue Swirl
On Tue, Mar 27, 2012 at 19:42, Artyom Tarasenko wrote: > Since Mark and Avi are keeping silence, > > Tested-by: Artyom Tarasenko Thanks for reminding me, applied. > On Sun, Mar 18, 2012 at 12:57 PM, Blue Swirl wrote: >> Mask incoming page address early so that resolved addresses >> are page al

[Qemu-devel] [RFC PATCH v3 7/8] tracetool: Add support for the 'dtrace' backend

2012-03-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool.py| 31 ++ scripts/tracetool/__init__.py |8 +++ scripts/tracetool/backend/dtrace.py | 104 +++ scripts/tracetool/format/d.py | 20 +++ scripts/tracetool/format/sta

[Qemu-devel] [RFC PATCH v3 1/8] tracetool: Rewrite infrastructure as python modules

2012-03-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- Makefile.objs |6 Makefile.target | 13 - configure |4 scripts/tracetool | 648 - scripts/tracetool.py |

[Qemu-devel] [RFC PATCH v3 2/8] tracetool: Add module for the 'c' format

2012-03-27 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- scripts/tracetool/format/c.py | 20 1 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 scripts/tracetool/format/c.py diff --git a/scripts/tracetool/format/c.py b/scripts/tracetool/format/c.py new file mode 100644 index 0

[Qemu-devel] [RFC PATCH v3 0/8] Rewrite tracetool using python modules

2012-03-27 Thread Lluís Vilanova
A full rewrite of the tracetool script using per-format and per-backend modules, so that it's easier to read and extend it in the future. Signed-off-by: Lluís Vilanova --- NOTE: This series applies in current master, ignoring the "Rewrite tracetool using python" series. Changes in v3: * S

Re: [Qemu-devel] [PATCH] sparc: pass page aligned addresses to tlb_set_page

2012-03-27 Thread Artyom Tarasenko
Since Mark and Avi are keeping silence, Tested-by: Artyom Tarasenko On Sun, Mar 18, 2012 at 12:57 PM, Blue Swirl wrote: > Mask incoming page address early so that resolved addresses > are page aligned. Remove further address masking. > > Signed-off-by: Blue Swirl > --- >  target-sparc/mmu_help

Re: [Qemu-devel] [PATCH 1/2] Isolation groups

2012-03-27 Thread Alex Williamson
On Tue, 2012-03-27 at 16:14 +1100, David Gibson wrote: > On Wed, Mar 21, 2012 at 03:12:58PM -0600, Alex Williamson wrote: > > On Sat, 2012-03-17 at 15:57 +1100, David Gibson wrote: > > > On Fri, Mar 16, 2012 at 01:31:18PM -0600, Alex Williamson wrote: > > > > On Fri, 2012-03-16 at 14:45 +1100, Davi

Re: [Qemu-devel] [PATCH 3/3] sparc64: implement PCI and ISA irqs

2012-03-27 Thread Blue Swirl
On Tue, Mar 27, 2012 at 18:19, Artyom Tarasenko wrote: > On Sun, Mar 11, 2012 at 12:02 PM, Blue Swirl wrote: >> Generate correct trap for external interrupts. Map PCI and ISA IRQs to >> RIC/UltraSPARC-IIi interrupt vectors. >> >> Signed-off-by: Blue Swirl >> --- >>  hw/apb_pci.c               |

Re: [Qemu-devel] [PATCH RFC 0/3] qom: Generalize qdev init to "realize"

2012-03-27 Thread Anthony Liguori
On 03/27/2012 11:46 AM, Paolo Bonzini wrote: Il 27/03/2012 18:33, Peter Maydell ha scritto: Yes, I haven't reviewed this series yet, but my expectation would be that realize propagates and that the default implementation of DeviceClass::realize() would explicitly *not* propagate and instead just

Re: [Qemu-devel] [PATCH 3/3] sparc64: implement PCI and ISA irqs

2012-03-27 Thread Artyom Tarasenko
On Sun, Mar 11, 2012 at 12:02 PM, Blue Swirl wrote: > Generate correct trap for external interrupts. Map PCI and ISA IRQs to > RIC/UltraSPARC-IIi interrupt vectors. > > Signed-off-by: Blue Swirl > --- >  hw/apb_pci.c               |   48 +++-- >  hw/apb_pci.h      

Re: [Qemu-devel] [PATCH] tracetool.py: always pass --binary, --target-arch, --target-type

2012-03-27 Thread Lluís Vilanova
Alon Levy writes: > Signed-off-by: Alon Levy > --- > Makefile.objs | 25 ++--- > 1 file changed, 22 insertions(+), 3 deletions(-) > diff --git a/Makefile.objs b/Makefile.objs > index 8e56f48..0e33f4b 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -373,12 +373,25 @

[Qemu-devel] [PATCH RFC] piix: fix up/down races

2012-03-27 Thread Michael S. Tsirkin
piix acpi interface suffers from the following 2 issues: 1. - delete device a - quickly add device b in another slot if we do this before guest reads the down register, the down event is discarded and device will never be deleted. 2. - delete device a - quickly reset before guest can respond in

  1   2   3   >