Re: [Qemu-devel] [Qemu-trivial] [PATCH] apic: Fix reported DFR content

2014-08-13 Thread Jan Kiszka
On 2014-08-13 08:14, Michael Tokarev wrote: > 09.08.2014 18:05, Jan Kiszka wrote: >> From: Jan Kiszka >> >> IA-32 SDM, Figure 10-14: Bits 27:0 are reserved as 1. >> >> Fixes Jailhouse hypervisor start with in-kernel irqchips off. > > Applied to -trivial, thank you! > > Are the other similar case

[Qemu-devel] [PATCH] spapr_pci: Fix config space corruption

2014-08-13 Thread Alexey Kardashevskiy
When disabling MSI/MSIX via "ibm,change-msi" RTAS call, no check was made if MSI or MSIX is actually supported and the MSI message was reset unconditionally. If this happened on a device which does not support MSI (but does support MSIX, otherwise "ibm,change-msi" would not be called), this device

[Qemu-devel] ide: only constrain read/write requests to drive size, not other types

2014-08-13 Thread Michael Tokarev
Commit 58ac321135a introduced a check to ide dma processing which constrains all requests to drive size. However, apparently, some valid requests (like TRIM) does not fit in this constraint, and fails in 2.1. So check the range only for reads and writes. Cc: qemu-sta...@nongnu.org Signed-off-by:

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-13 Thread Stefan Hajnoczi
On Mon, Aug 11, 2014 at 09:37:01PM +0200, Paolo Bonzini wrote: > Il 10/08/2014 05:46, Ming Lei ha scritto: > @@ -4356,6 +4353,20 @@ BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, > int64_t sector_num, > { > trace_bdrv_aio_readv(bs, sector_num, nb_sectors, opaque); > > +if (bs->

Re: [Qemu-devel] The status about vhost-net on kvm-arm?

2014-08-13 Thread Nikolay Nikolaev
On Tue, Aug 12, 2014 at 6:47 PM, Nikolay Nikolaev wrote: > > Hello, > > > On Tue, Aug 12, 2014 at 5:41 AM, Li Liu wrote: > > > > Hi all, > > > > Is anyone there can tell the current status of vhost-net on kvm-arm? > > > > Half a year has passed from Isa Ansharullah asked this question: > > http:/

Re: [Qemu-devel] [PATCH] block.curl: adding 'curltimeout' option

2014-08-13 Thread Markus Armbruster
Daniel Henrique Barboza writes: > The curl hardcoded timeout (5 seconds) sometimes is not long > enough depending on the remote server configuration and network > traffic. The user should be able to set how much long he is > willing to wait for the connection. > > Adding a new option to set this

Re: [Qemu-devel] [PATCH][RESEND] pci: Use bus master address space for delivering MSI/MSI-X, messages

2014-08-13 Thread Michael S. Tsirkin
On Wed, Aug 13, 2014 at 08:14:30AM +0200, Jan Kiszka wrote: > The spec says (and real HW confirms this) that, if the bus master bit > is 0, the device will not generate any PCI accesses. MSI and MSI-X > messages fall among these, so we should use the corresponding address > space to deliver them. T

Re: [Qemu-devel] [PATCH] pc: Get rid of pci-info leftovers

2014-08-13 Thread Michael S. Tsirkin
On Tue, Aug 12, 2014 at 04:40:17PM +0200, Markus Armbruster wrote: > pc_fw_cfg_guest_info() never does anything, because has_pci_info is > always false. > > Introduced in commit f8c457b "pc: pass PCI hole ranges to Guests", > disabled in commit 9604f70 "pc: disable pci-info for 1.6", and hasn't >

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-13 Thread Kevin Wolf
Am 12.08.2014 um 21:08 hat Paolo Bonzini geschrieben: > Il 12/08/2014 10:12, Ming Lei ha scritto: > >> > The below patch is basically the minimal change to bypass coroutines. > >> > Of course > >> > the block.c part is not acceptable as is (the change to > >> > refresh_total_sectors > >> > is br

Re: [Qemu-devel] Bug#757927: [qemu-kvm] TRIM (discard=unmap) broken in 2.1

2014-08-13 Thread Kevin Wolf
Am 13.08.2014 um 08:41 hat Michael Tokarev geschrieben: > [dropping debian bugreport] > > 13.08.2014 10:05, Michael Tokarev wrote: > > [This is http://bugs.debian.org/757927 -- trim stopped working in qemu 2.1] > > > > 12.08.2014 18:46, Michael Tokarev wrote: > >> 12.08.2014 17:35, Roman Mamedov

Re: [Qemu-devel] [PATCH ] test-coroutine: test cost introduced by coroutine

2014-08-13 Thread Ming Lei
On Mon, Aug 11, 2014 at 7:59 PM, Ming Lei wrote: > This test uses getppid() syscall to simulate single operation > run inside coroutine, and compare how many operations done per > second between using coroutine and not using coroutine to > evalute cost introduced by running operation via coroutine

[Qemu-devel] [PATCH v1] test-coroutine: test cost introduced by coroutine

2014-08-13 Thread Ming Lei
This test runs dummy function with coroutine by using two enter and one yield since which is a common usage. So we can see the cost introduced by corouting for running one function, for example: Run operation 2000 iterations 4.841071 s, 4131K operations/s 242ns per coroutine

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-13 Thread Ming Lei
On Wed, Aug 13, 2014 at 3:08 AM, Paolo Bonzini wrote: > Il 12/08/2014 10:12, Ming Lei ha scritto: >>> > The below patch is basically the minimal change to bypass coroutines. Of >>> > course >>> > the block.c part is not acceptable as is (the change to >>> > refresh_total_sectors >>> > is broken

[Qemu-devel] Discrepancy representing slot IDs in query-memory-devices and query-acpi-ospm-status

2014-08-13 Thread Mohammed Gamal
Hi, QMP command 'query-memory-devices' returns DIMM slots IDs as integers, while 'query-acpi-ospm-status' returns them as strings. Why is this the case? Aren't slot IDs numeric anyway? I've looked up the ACPI specs but I can't find any specific mention of how DIMM IDs should be represented, so wh

[Qemu-devel] [PATCH v5 07/15] target-tricore: Add instructions of SRR opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SRR opcode format. Add helper for add/sub_ssov. Signed-off-by: Bastian Koppelmann --- v4 -> v5: - gen_sub_d now saves result of substraction into tcg temp to handle ret = r1 cases. - gen_mul_i32s now calculates V, SV bits in bit 31. - SSOV makro now computes V, SV

[Qemu-devel] [PATCH v5 04/15] target-tricore: Add initialization for translation and activate target

2014-08-13 Thread Bastian Koppelmann
Add tcg and cpu model initialization. Add gen_intermediate_code function. Activate target in configure and add softmmu config. Signed-off-by: Bastian Koppelmann --- v4 -> v5: - gen_intermediate_code_internal: Move calculation of next_pc after the ifs for singlestep and long tbs. configure

[Qemu-devel] [PATCH v5 13/15] target-tricore: Add instructions of SC opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SC opcode format. Add helper for begin interrupt service routine. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/helper.h| 1 + target-tricore/op_helper.c | 59 ++ target-tricore/translate

[Qemu-devel] [PATCH v5 05/15] target-tricore: Add masks and opcodes for decoding

2014-08-13 Thread Bastian Koppelmann
Add masks and opcodes for decoding TriCore instructions. Signed-off-by: Bastian Koppelmann --- target-tricore/translate.c |1 + target-tricore/tricore-opcodes.h | 1406 ++ 2 files changed, 1407 insertions(+) create mode 100644 target-tricore/tricore

[Qemu-devel] [PATCH v5 14/15] target-tricore: Add instructions of SLR, SSRO and SRO opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SLR, SSRO and SRO opcode format. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c | 121 + 1 file changed, 121 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/

[Qemu-devel] [PATCH v5 10/15] target-tricore: Add instructions of SB opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SB opcode format. Add helper call/ret. Add micro-op generator functions for branches. Add makro to generate helper functions. Signed-off-by: Bastian Koppelmann --- v4 -> v5: - Change int cond to TCGCond in functions gen_branch_cond, gen_branch_condi. - gen_intermediate

[Qemu-devel] [PATCH v5 06/15] target-tricore: Add instructions of SRC opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SRC opcode format. Add micro-op generator functions for add, conditional add/sub and shi/shai. Signed-off-by: Bastian Koppelmann --- v4 -> v5: - gen_shaci: Change case of shift_count == 32 to shift_count == -32 and add the clear of V bit. - gen_shaci: Move creation an

[Qemu-devel] [PATCH v5 01/15] target-tricore: Add target stubs and qom-cpu

2014-08-13 Thread Bastian Koppelmann
Add TriCore target stubs, and QOM cpu. Signed-off-by: Bastian Koppelmann --- v4 -> v5: - Change documentation of S, SV bits to use bit 31. - psw_read/_write now uses only bit 31 of S, SV bits. arch_init.c | 2 + cpu-exec.c| 11 +- cpus.c

[Qemu-devel] [PATCH v5 12/15] target-tricore: Add instructions of SBR opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SBR opcode format. Add gen_loop micro-op generator function. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c | 66 +- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/ta

Re: [Qemu-devel] The status about vhost-net on kvm-arm?

2014-08-13 Thread Li Liu
On 2014/8/13 17:10, Nikolay Nikolaev wrote: > On Tue, Aug 12, 2014 at 6:47 PM, Nikolay Nikolaev > wrote: >> >> Hello, >> >> >> On Tue, Aug 12, 2014 at 5:41 AM, Li Liu wrote: >>> >>> Hi all, >>> >>> Is anyone there can tell the current status of vhost-net on kvm-arm? >>> >>> Half a year has pass

[Qemu-devel] [PATCH v5 11/15] target-tricore: Add instructions of SBC and SBRN opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SBC and SBRN opcode format. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c | 36 1 file changed, 36 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/translate.c inde

[Qemu-devel] [PATCH v5 09/15] target-tricore: Add instructions of SRRS and SLRO opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SSRS and SLRO opcode format. Add micro-op generator functions for offset loads. Signed-off-by: Bastian Koppelmann --- v4 -> v5: - decode_16Bit_opc: Add if to handle ADDSC.A opcode being 6 bit instead of 7 bit long target-tricore/translate.c | 59

[Qemu-devel] [PATCH v5 08/15] target-tricore: Add instructions of SSR opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SSR opcode format. Signed-off-by: Bastian Koppelmann Reviewed-by: Richard Henderson --- target-tricore/translate.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/target-tricore/translate.c b/target-tricore/translate.c ind

[Qemu-devel] [PATCH v5 02/15] target-tricore: Add board for systemmode

2014-08-13 Thread Bastian Koppelmann
Add basic board to allow systemmode emulation Signed-off-by: Bastian Koppelmann --- hw/tricore/Makefile.objs | 1 + hw/tricore/tricore_testboard.c | 129 + include/hw/tricore/tricore.h | 54 + 3 files changed, 184 insertions(+)

[Qemu-devel] [PATCH v5 15/15] target-tricore: Add instructions of SR opcode format

2014-08-13 Thread Bastian Koppelmann
Add instructions of SR opcode format. Add micro-op generator functions for saturate. Add helper return from exception (rfe). Signed-off-by: Bastian Koppelmann --- v4 -> v5: - Switched sat_neg and arg in first movcond in function gen_saturate. - SR_NOT: Remove if checking OP2. target-tri

[Qemu-devel] [PATCH v5 03/15] target-tricore: Add softmmu support

2014-08-13 Thread Bastian Koppelmann
Add basic softmmu support for TriCore Signed-off-by: Bastian Koppelmann --- target-tricore/helper.c| 54 +- target-tricore/op_helper.c | 33 +++- 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/target-tricore

[Qemu-devel] [PATCH v5 00/15] TriCore architecture guest implementation

2014-08-13 Thread Bastian Koppelmann
Hi, my aim is to add Infineon's TriCore architecture to QEMU. This series of patches adds the target stubs, a basic testboard and a softmmu for system mode emulation. Furthermore it adds all the 16 bit long instructions of the architecture grouped by opcode format. After this series of patches

Re: [Qemu-devel] [PATCH] spapr: Make machine naming conventions closer to those for PC

2014-08-13 Thread Markus Armbruster
David Gibson writes: > As of qemu-2.1, spapr/pseries, has a set of versioned machine classes to > represent the machine type as it appeared to the guest in different qemu > versions. This allows for safe migration of guests between current and > future qemu versions. > > In PC, however, the defa

[Qemu-devel] [PATCH] mlock: fix bug when mlockall called before mbind

2014-08-13 Thread zhanghailiang
If we configure qemu with realtime-mlock-on and memory-node-bind at the same time, Qemu will fail to start, and mbind() fails with message "Input/output error". >From man page: int mbind(void *addr, unsigned long len, int mode, unsigned long *nodemask, unsigned long maxnode,

Re: [Qemu-devel] The status about vhost-net on kvm-arm?

2014-08-13 Thread Nikolay Nikolaev
On Wed, Aug 13, 2014 at 12:10 PM, Nikolay Nikolaev wrote: > On Tue, Aug 12, 2014 at 6:47 PM, Nikolay Nikolaev > wrote: >> >> Hello, >> >> >> On Tue, Aug 12, 2014 at 5:41 AM, Li Liu wrote: >> > >> > Hi all, >> > >> > Is anyone there can tell the current status of vhost-net on kvm-arm? >> > >> > H

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-13 Thread Ming Lei
Hi Paolo, On Tue, Aug 12, 2014 at 3:37 AM, Paolo Bonzini wrote: > Il 10/08/2014 05:46, Ming Lei ha scritto: >> Hi Kevin, Paolo, Stefan and all, >> >> >> On Wed, 6 Aug 2014 10:48:55 +0200 >> Kevin Wolf wrote: >> >>> Am 06.08.2014 um 07:33 hat Ming Lei geschrieben: >> >>> >>> Anyhow, the coroutine

Re: [Qemu-devel] [PATCH] mlock: fix bug when mlockall called before mbind

2014-08-13 Thread Michael S. Tsirkin
On Wed, Aug 13, 2014 at 07:21:57PM +0800, zhanghailiang wrote: > If we configure qemu with realtime-mlock-on and memory-node-bind at the same > time, > Qemu will fail to start, and mbind() fails with message "Input/output error". > > >From man page: > int mbind(void *addr, unsigned long len, int

Re: [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000

2014-08-13 Thread Paolo Bonzini
Il 12/08/2014 21:29, Eduardo Habkost ha scritto: > On Tue, Aug 12, 2014 at 09:12:00PM +0200, Paolo Bonzini wrote: >> Il 12/08/2014 20:55, Eduardo Habkost ha scritto: >>> This makes the CPUID data change under the guest's feet during >>> live-migration. >>> >>> Adding compat code to ensure older mac

Re: [Qemu-devel] [V2 PATCH 09/12] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-13 Thread Riku Voipio
On Tue, Aug 12, 2014 at 01:53:40PM -0500, Tom Musta wrote: > The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was > 2048 previously. fails to build - need to make get_ppc64_abi a properly exported function. > Signed-off-by: Tom Musta > --- > V2: Define and use TARGET_MINSIG

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-13 Thread Paolo Bonzini
Il 13/08/2014 12:19, Ming Lei ha scritto: >> > The problem is that your patches to do touch too much code and subtly >> > break too much stuff. The one I wrote does have a little breakage > Could you give a hint about which stuff are broken? Last time, you mention > virtio-scsi need to keep AIOCB

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-13 Thread Paolo Bonzini
Il 13/08/2014 13:43, Ming Lei ha scritto: >> > The below patch is basically the minimal change to bypass coroutines. Of >> > course >> > the block.c part is not acceptable as is (the change to >> > refresh_total_sectors >> > is broken, the others are just ugly), but it is a start. Please run it

Re: [Qemu-devel] [PATCH] block.curl: adding 'curltimeout' option

2014-08-13 Thread Daniel H Barboza
On 08/13/2014 06:15 AM, Markus Armbruster wrote: Daniel Henrique Barboza writes: The curl hardcoded timeout (5 seconds) sometimes is not long enough depending on the remote server configuration and network traffic. The user should be able to set how much long he is willing to wait for the con

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-13 Thread Ming Lei
On Wed, Aug 13, 2014 at 8:35 PM, Paolo Bonzini wrote: > Il 13/08/2014 13:43, Ming Lei ha scritto: >>> > The below patch is basically the minimal change to bypass coroutines. Of >>> > course >>> > the block.c part is not acceptable as is (the change to >>> > refresh_total_sectors >>> > is broken

Re: [Qemu-devel] [PATCH] spapr: Make machine naming conventions closer to those for PC

2014-08-13 Thread Andreas Färber
Hi, Am 13.08.2014 03:23, schrieb David Gibson: > As of qemu-2.1, spapr/pseries, has a set of versioned machine classes to > represent the machine type as it appeared to the guest in different qemu > versions. This allows for safe migration of guests between current and > future qemu versions. >

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-13 Thread Paolo Bonzini
Il 13/08/2014 11:54, Kevin Wolf ha scritto: > Am 12.08.2014 um 21:08 hat Paolo Bonzini geschrieben: >> Il 12/08/2014 10:12, Ming Lei ha scritto: > The below patch is basically the minimal change to bypass coroutines. Of > course > the block.c part is not acceptable as is (the change t

Re: [Qemu-devel] [PATCH] block.curl: adding 'curltimeout' option

2014-08-13 Thread Daniel H Barboza
On 08/13/2014 09:39 AM, Daniel H Barboza wrote: On 08/13/2014 06:15 AM, Markus Armbruster wrote: Daniel Henrique Barboza writes: The curl hardcoded timeout (5 seconds) sometimes is not long enough depending on the remote server configuration and network traffic. The user should be able to s

Re: [Qemu-devel] [PATCH v1 00/17] dataplane: optimization and multi virtqueue support

2014-08-13 Thread Ming Lei
On Wed, Aug 13, 2014 at 9:16 PM, Paolo Bonzini wrote: > Il 13/08/2014 11:54, Kevin Wolf ha scritto: >> Am 12.08.2014 um 21:08 hat Paolo Bonzini geschrieben: >>> Il 12/08/2014 10:12, Ming Lei ha scritto: >> The below patch is basically the minimal change to bypass coroutines. >> Of course

Re: [Qemu-devel] [V2 PATCH 09/12] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-13 Thread Tom Musta
On 8/13/2014 7:31 AM, Riku Voipio wrote: > On Tue, Aug 12, 2014 at 01:53:40PM -0500, Tom Musta wrote: >> The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was >> 2048 previously. > > fails to build - need to make get_ppc64_abi a properly exported function. > Riku: Sorry abo

Re: [Qemu-devel] Microcheckpointing: Memory-VCPU / Disk State consistency

2014-08-13 Thread Walid Nouri
Yes... Time is a problem, and it‘s currently running out... ;-) I think the first step is to reason about possible approaches and how they can be implemented in QEMU. The implementation can follow later :-) Thank you for the hint with the drive-mirror feature. I will take a look at it and sure

Re: [Qemu-devel] [PATCH] block.curl: adding 'curltimeout' option

2014-08-13 Thread Markus Armbruster
Daniel H Barboza writes: > On 08/13/2014 09:39 AM, Daniel H Barboza wrote: >> >> On 08/13/2014 06:15 AM, Markus Armbruster wrote: >>> Daniel Henrique Barboza writes: >>> The curl hardcoded timeout (5 seconds) sometimes is not long enough depending on the remote server configuration and

Re: [Qemu-devel] [PATCH] ide: Fix segfault when flushing a device that doesn't exist

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 06:29:41PM +0200, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > hw/ide/core.c| 4 +++- > tests/ide-test.c | 14 ++ > 2 files changed, 17 insertions(+), 1 deletion(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block

Re: [Qemu-devel] [PATCH] block.curl: adding 'curltimeout' option

2014-08-13 Thread Daniel H Barboza
On 08/13/2014 11:07 AM, Markus Armbruster wrote: Daniel H Barboza writes: On 08/13/2014 09:39 AM, Daniel H Barboza wrote: On 08/13/2014 06:15 AM, Markus Armbruster wrote: Daniel Henrique Barboza writes: The curl hardcoded timeout (5 seconds) sometimes is not long enough depending on the

Re: [Qemu-devel] [PATCH] ide: Add resize callback to ide/core

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 02:44:09PM -0400, John Snow wrote: > Currently, if the block device backing the IDE drive is resized, > the information about the device as cached inside of the IDEState > structure is not updated, thus when a guest OS re-queries the drive, > it is unable to see the expanded

Re: [Qemu-devel] [PATCH RFC] blkdebug: make the fault injection functionality callable from QMP

2014-08-13 Thread Eric Blake
On 08/12/2014 10:48 PM, Hitoshi Mitake wrote: > This patch makes the fault injection functionality of blkdebug > callable from QMP. Motivation of this change is for testing and > debugging distributed systems. Ordinal distributed systems must handle > hardware faults because of its reason for exist

Re: [Qemu-devel] [PATCH v1] test-coroutine: test cost introduced by coroutine

2014-08-13 Thread Benoît Canet
The Wednesday 13 Aug 2014 à 18:08:47 (+0800), Ming Lei wrote : > This test runs dummy function with coroutine by using > two enter and one yield since which is a common usage. > > So we can see the cost introduced by corouting for running > one function, for example: > > Run operation 2

Re: [Qemu-devel] [PATCH v1] test-coroutine: test cost introduced by coroutine

2014-08-13 Thread Gabriel Kerneis
On 13 août 2014 16:27:29 CEST, "Benoît Canet" wrote: > The Wednesday 13 Aug 2014 à 18:08:47 (+0800), Ming Lei wrote : > > This test runs dummy function with coroutine by using > > two enter and one yield since which is a common usage. > > > > So we can see the cost introduced by corouting for r

Re: [Qemu-devel] [PATCH RFC] blkdebug: make the fault injection functionality callable from QMP

2014-08-13 Thread Stefan Hajnoczi
On Wed, Aug 13, 2014 at 01:48:41PM +0900, Hitoshi Mitake wrote: > @@ -485,6 +493,10 @@ static BlockDriverAIOCB > *blkdebug_aio_readv(BlockDriverState *bs, > BDRVBlkdebugState *s = bs->opaque; > BlkdebugRule *rule = NULL; > > +if (s->qmp_fault_state != BLOCK_FAULT_STATE_NONE) { > +

Re: [Qemu-devel] [PATCH v2] block.curl: adding 'curltimeout' option

2014-08-13 Thread Benoît Canet
The Tuesday 12 Aug 2014 à 16:12:57 (-0300), Daniel Henrique Barboza wrote : > The curl hardcoded timeout (5 seconds) sometimes is not long > enough depending on the remote server configuration and network > traffic. The user should be able to set how much long he is > willing to wait for the connec

Re: [Qemu-devel] [PATCH v3 08/16] target-arm: Add SCR_EL3

2014-08-13 Thread Greg Bellows
Hi Edgar, I was just writing a test to verify the correct behavior of the SCR AW/FW bits and I think there is an issue. During an SCR write an initial valid mask is set from SCR_MASK which is defined to not include these bits. Then these bits are hard-coded into the write value using RES1. Last

Re: [Qemu-devel] [PATCH] ide: Add resize callback to ide/core

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 02:44:09PM -0400, John Snow wrote: > Currently, if the block device backing the IDE drive is resized, > the information about the device as cached inside of the IDEState > structure is not updated, thus when a guest OS re-queries the drive, > it is unable to see the expanded

Re: [Qemu-devel] [PATCH] ide: Add resize callback to ide/core

2014-08-13 Thread Markus Armbruster
John Snow writes: > Currently, if the block device backing the IDE drive is resized, > the information about the device as cached inside of the IDEState > structure is not updated, thus when a guest OS re-queries the drive, > it is unable to see the expanded size. > > This patch adds a resize cal

Re: [Qemu-devel] [PATCH v2] block.curl: adding 'curltimeout' option

2014-08-13 Thread Daniel H Barboza
On 08/13/2014 11:38 AM, Benoît Canet wrote: The Tuesday 12 Aug 2014 à 16:12:57 (-0300), Daniel Henrique Barboza wrote : The curl hardcoded timeout (5 seconds) sometimes is not long enough depending on the remote server configuration and network traffic. The user should be able to set how much l

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Kevin Wolf
Am 12.08.2014 um 17:30 hat Eric Blake geschrieben: > On 08/12/2014 08:14 AM, 吴兴博 wrote: > >>> However FVD seems to have been ignored by community. > >> > >> Care to give a pointer to a URL describing the FVD format? > >> > >> http://lists.nongnu.org/archive/html/qemu-devel/2011-01/msg00398.html > >

[Qemu-devel] [PATCH v3] block.curl: adding 'timeout' option

2014-08-13 Thread Daniel Henrique Barboza
The curl hardcoded timeout (5 seconds) sometimes is not long enough depending on the remote server configuration and network traffic. The user should be able to set how much long he is willing to wait for the connection. Adding a new option to set this timeout gives the user this flexibility. The

[Qemu-devel] [PATCH v3] block.curl: timeout option

2014-08-13 Thread Daniel Henrique Barboza
Changes in v3: - changed option name from 'curltimeout' to 'timeout' Changes in v2: - remove double quote from the int value in qemu-options.hx Daniel Henrique Barboza (1): block.curl: adding 'timeout' option block/curl.c| 13 - qemu-options.hx | 10 -- 2 files changed

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Kevin Wolf
Am 12.08.2014 um 01:38 hat 吴兴博 geschrieben: > Hello, > >   The introduction in the wiki page present several advantages of qcow2 [1]. > But I'm a little confused. I really appreciate if any one can give me some > help > on this :). > >  (1) Currently the raw format doesn't support COW. In other

[Qemu-devel] [PATCH] hw/intc/arm_gic: honor target mask in gic_update()

2014-08-13 Thread Sergey Fedorov
Take IRQ target mask into account when determining the highest priority pending interrupt. Signed-off-by: Sergey Fedorov --- hw/intc/arm_gic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 1532ef9..a5ad7b9 100644 --- a/hw/intc/a

Re: [Qemu-devel] [PATCH v2] target-sparc64: implement Short Floating-Point Store Instructions

2014-08-13 Thread Richard Henderson
On 08/12/2014 10:02 AM, Artyom Tarasenko wrote: > Implement Short Floating-Point Store Instructions as described > in the chapter 13.5.2 of UltraSPARC-IIi User's Manual. > > Particularly this instructions are used by NetBSD 4.0.1+ /sparc64 > > Signed-off-by: Artyom Tarasenko > Tested-by: Mark Ca

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Xingbo Wu
On Wed, Aug 13, 2014 at 11:54 AM, Kevin Wolf wrote: > Am 12.08.2014 um 01:38 hat 吴兴博 geschrieben: >> Hello, >> >> The introduction in the wiki page present several advantages of qcow2 [1]. >> But I'm a little confused. I really appreciate if any one can give me some >> help >> on this :). >> >>

Re: [Qemu-devel] [PATCH v4 03/11] libqtest: add QTEST_LOG for debugging qtest testcases

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:48PM +0200, Marc Marí wrote: > Signed-off-by: Paolo Bonzini > Signed-off-by: Marc Marí > --- > tests/libqtest.c |7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi pgpP3YN3tB85y.pgp Description: PGP signature

Re: [Qemu-devel] [PATCH v4 01/11] tests: Functions bus_foreach and device_find from libqos virtio API

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:46PM +0200, Marc Marí wrote: > Virtio header has been changed to compile and work with a real device. > Functions bus_foreach and device_find have been implemented for PCI. > Virtio-blk test case now opens a fake device. > > Signed-off-by: Marc Marí > --- > tests/Ma

Re: [Qemu-devel] [PATCH v4 02/11] tests: Add virtio device initialization

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:47PM +0200, Marc Marí wrote: > +static uint64_t qvirtio_pci_config_readq(QVirtioDevice *d, void *addr) > +{ > +QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; > +return qpci_io_readl(dev->pdev, addr) | qpci_io_readl(dev->pdev, addr+4); This is broken because it

Re: [Qemu-devel] [PATCH v4 05/11] libqos: Change free function called in malloc

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:50PM +0200, Marc Marí wrote: > Reviewed-by: John Snow > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Marc Marí > --- > tests/libqos/malloc.h |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to my block tree: https://github.com/stefanha/q

Re: [Qemu-devel] [PATCH v4 03/11] libqtest: add QTEST_LOG for debugging qtest testcases

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:48PM +0200, Marc Marí wrote: > Signed-off-by: Paolo Bonzini > Signed-off-by: Marc Marí > --- > tests/libqtest.c |7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan

Re: [Qemu-devel] [PATCH v4 06/11] virtio-blk: Correct bug in support for flexible descriptor layout

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:51PM +0200, Marc Marí wrote: > Without this correction, only a three descriptor layout is accepted, and > requests with just two descriptors are not completed and no error message is > displayed. > > Signed-off-by: Stefan Hajnoczi > Signed-off-by: Marc Marí > --- >

Re: [Qemu-devel] [PATCH v4 04/11] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:49PM +0200, Marc Marí wrote: > Reviewed-by: John Snow > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Paolo Bonzini > Signed-off-by: Marc Marí > --- > tests/libqos/malloc-pc.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to my block

[Qemu-devel] [PATCHv2 3/3] qemu-nbd: fix indentation and coding style

2014-08-13 Thread Peter Lieven
Signed-off-by: Peter Lieven --- qemu-nbd.c | 75 +++- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 6ef8b10..9bc152e 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -39,10 +39,10 @@ #include #

[Qemu-devel] [PATCHv2 2/3] qemu-nbd: add option to set detect-zeroes mode

2014-08-13 Thread Peter Lieven
Signed-off-by: Peter Lieven Reviewed-by: Eric Blake --- qemu-nbd.c | 25 + 1 file changed, 25 insertions(+) diff --git a/qemu-nbd.c b/qemu-nbd.c index 626e584..6ef8b10 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -18,11 +18,13 @@ #include "qemu-common.h" #include "b

Re: [Qemu-devel] [PATCH v4 07/11] libqos: Added basic virtqueue support to virtio implementation

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:52PM +0200, Marc Marí wrote: > +/* Check power of 2 */ > +aux = vq->size; > +while ((aux & 1) != 0) { > +aux = aux >> 1; > +} > +g_assert_cmpint(aux, !=, 1); Power of 2 can be tested like this without a while loop: g_assert_cmpint(vq->size

[Qemu-devel] [PATCHv2 1/3] rename parse_enum_option to qapi_enum_parse and make it public

2014-08-13 Thread Peter Lieven
relaxing the license to LGPLv2+ is intentional. Suggested-by: Markus Armbruster Signed-off-by: Hu Tao Signed-off-by: Peter Lieven Reviewed-by: Eric Blake --- blockdev.c | 30 ++ include/qapi/util.h | 17 + qapi/Makefile.objs |2 +-

[Qemu-devel] [PATCH v2] ide: Add resize callback to ide/core

2014-08-13 Thread John Snow
Currently, if the block device backing the IDE drive is resized, the information about the device as cached inside of the IDEState structure is not updated, thus when a guest OS re-queries the drive, it is unable to see the expanded size. This patch adds a resize callback that updates the IDENTIFY

[Qemu-devel] [PATCHv2 0/3] qemu-nbd: add option to set detect-zeroes mode

2014-08-13 Thread Peter Lieven
v1->v2: - state that relaxing the license for qapi-util.c to LGPLv2+ was intentional [Eric] - split the qemu-nbd patch into 2 pieces [Eric] Peter Lieven (3): rename parse_enum_option to qapi_enum_parse and make it public qemu-nbd: add option to set detect-zeroes mode qemu-n

Re: [Qemu-devel] [PATCH v4 09/11] libqos: Added test case for configuration changes in virtio-blk test

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:54PM +0200, Marc Marí wrote: > @@ -349,7 +359,7 @@ int main(int argc, char **argv) > g_test_init(&argc, &argv, NULL); > > g_test_add_func("/virtio/blk/pci/basic", pci_basic); > -g_test_add_func("/virtio/blk/pci/indirect", pci_indirect); > +g_test_ad

[Qemu-devel] using virtio-net multiqueues

2014-08-13 Thread William Dauchy
Hello, Using qemu2.1 I'm starting a vm with this network interface: [netdev "vifA.0"] type = "tap" vhost = "on" ifname = "vifA.0" downscript = "no" script = "no" queues = "2" [device "vifA.0"] driver = "virtio-net-pci" netdev = "vifA.0" mac = "00:16:3e:1a:4e:11" mq = "on" v

Re: [Qemu-devel] [PATCHv2 3/3] qemu-nbd: fix indentation and coding style

2014-08-13 Thread Eric Blake
On 08/13/2014 11:20 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > qemu-nbd.c | 75 > +++- > 1 file changed, 39 insertions(+), 36 deletions(-) Reviewed-by: Eric Blake Thanks for splitting the trivia from the meat in 2/3.

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Kevin Wolf
Am 13.08.2014 um 18:38 hat Xingbo Wu geschrieben: > On Wed, Aug 13, 2014 at 11:54 AM, Kevin Wolf wrote: > > Am 12.08.2014 um 01:38 hat 吴兴博 geschrieben: > >> Hello, > >> > >> The introduction in the wiki page present several advantages of qcow2 > >> [1]. > >> But I'm a little confused. I really

Re: [Qemu-devel] using virtio-net multiqueues

2014-08-13 Thread William Dauchy
On Wed, Aug 13, 2014 at 8:03 PM, William Dauchy wrote: > Using qemu2.1 I'm starting a vm with this network interface: > > [netdev "vifA.0"] > type = "tap" > vhost = "on" > ifname = "vifA.0" > downscript = "no" > script = "no" > queues = "2" > > [device "vifA.0"] > driver = "virtio-ne

Re: [Qemu-devel] [PATCH 1/1] add loopback for virtio-net

2014-08-13 Thread Michael S. Tsirkin
On Wed, Aug 13, 2014 at 09:47:40PM +0800, Hengjinxiao wrote: > Sometimes it is necessary to test whether virtio-net can send and receive > packets > normally, just as e1000 does. This patch adds loopback for virtio-net, when > the > command 'VIRTIO_NET_CTRL_LOOPBACK_SET' is sent from front-end dr

[Qemu-devel] [V3 PATCH 00/13] target-ppc: Linux-User Mode Bug Fixes for Power

2014-08-13 Thread Tom Musta
This series of patches is the result of executing the Linux Test Program (LTP) System Call bucket (https://github.com/linux-test-project/ltp) on the 64 bit big and little endian linux user mode targets for Power. Some of the changes are not technically unique to Power, but are effectively so. For

[Qemu-devel] [V3 PATCH 01/13] linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2

2014-08-13 Thread Tom Musta
The 64 bit PowerPC platforms eliminate the _unused1 and _unused2 elements of the semid_ds structure from . So eliminate these from the target_semid_ds structure. Signed-off-by: Tom Musta --- linux-user/syscall.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/linux-

[Qemu-devel] [V3 PATCH 02/13] linux-user: Dereference Pointer Argument to ipc/semctl Sys Call

2014-08-13 Thread Tom Musta
When the ipc system call is used to wrap a semctl system call, the ptr argument to ipc needs to be dereferenced prior to passing it to the semctl handler. This is because the fourth argument to semctl is a union and not a pointer to a union. Signed-off-by: Tom Musta --- V2: This is unchanged fr

[Qemu-devel] [V3 PATCH 12/13] linux-user: Support target-to-host translation of mlockall argument

2014-08-13 Thread Tom Musta
The argument to the mlockall system call is not necessarily the same on all platforms and thus may require translation prior to passing to the host. For example, PowerPC 64 bit platforms define values for MCL_CURRENT (0x2000) and MCL_FUTURE (0x4000) which are different from Intel platforms (0x1 an

[Qemu-devel] [V3 PATCH 05/13] linux-user: Conditionally Pass Attribute Pointer to mq_open()

2014-08-13 Thread Tom Musta
The mq_open system call takes an optional struct mq_attr pointer argument in the fourth position. This pointer is used when O_CREAT is specified in the flags (second) argument. It may be NULL, in which case the queue is created with implementation defined attributes. Change the code to properly

[Qemu-devel] [V3 PATCH 03/13] linux-user: Properly Handle semun Structure In Cross-Endian Situations

2014-08-13 Thread Tom Musta
The semun union used in the semctl system call contains both an int (val) and pointers. In cross-endian situations on 64 bit targets, the value passed to semctl is an 8 byte (abi_long) value and thus does not have the 4-byte val field in the correct location. In order to rectify this, the other h

[Qemu-devel] [V3 PATCH 04/13] linux-user: Make ipc syscall's third argument an abi_long

2014-08-13 Thread Tom Musta
For those target ABIs that use the ipc system call (e.g. POWER), the third argument is used in the shmat path as a pointer. It therefore must be declared as an abi_long (versus int) so that the address bits are not lost in truncation. In fact, all arguments to do_ipc should be declared as abit_lo

[Qemu-devel] [V3 PATCH 06/13] linux-user: Detect Negative Message Sizes in msgsnd System Call

2014-08-13 Thread Tom Musta
The msgsnd system call takes an argument that describes the message size (msgsz) and is of type size_t. The system call should set errno to EINVAL in the event that a negative message size is passed. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell --- linux-user/syscall.c |6 +- 1

[Qemu-devel] [V3 PATCH 07/13] linux-user: Handle NULL sched_param argument to sched_*

2014-08-13 Thread Tom Musta
The sched_getparam, sched_setparam and sched_setscheduler system calls take a pointer argument to a sched_param structure. When this pointer is null, errno should be set to EINVAL. Signed-off-by: Tom Musta --- V2: Including sched_setscheduler in the changes per Peter Maydell's review. linux-us

[Qemu-devel] [V3 PATCH 08/13] linux-user: Detect fault in sched_rr_get_interval

2014-08-13 Thread Tom Musta
Properly detect a fault when attempting to store into an invalid struct timespec pointer. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell --- V2: Peter has observed that there are other call sites that may need to be fixed. I will address that in future patch(es). linux-user/syscall.c |

[Qemu-devel] [V3 PATCH 11/13] linux-user: clock_nanosleep errno Handling on PPC

2014-08-13 Thread Tom Musta
The clock_nanosleep syscall is unusual in that it returns positive numbers in error handling situations, versus returning -1 and setting errno, or returning a negative errno value. On POWER, the kernel will set the SO bit of CR0 to indicate failure in a syscall. QEMU has generic handling to do th

[Qemu-devel] [V3 PATCH 09/13] linux-user: Move get_ppc64_abi

2014-08-13 Thread Tom Musta
The get_ppc64_abi is used to determine the ELF ABI (i.e. V1 or V2). This routine is currently implemented in the linux-user/elfload.c file but is useful in other scenarios. Move the routine to a more generally available location (linux-user/ppc/target_cpu.h). Signed-off-by: Tom Musta --- V3: new

[Qemu-devel] [V3 PATCH 13/13] linux-user: writev Partial Writes

2014-08-13 Thread Tom Musta
Although not technically not required by POSIX, the writev system call will typically write out its buffers individually. That is, if the first buffer is written successfully, but the second buffer pointer is invalid, then the first chuck will be written and its size is returned. Signed-off-by: T

  1   2   >