Re: [Qemu-devel] [PATCH v2] .travis.yml: migrate to container builds

2016-01-24 Thread David Gibson
On Thu, Jan 21, 2016 at 10:28:05PM +, Alex Bennée wrote: > This moves the Travis tests from the legacy VM infrastructure (which > only seems to run 5-6 jobs at once) to the new container based approach. > > The principle difference is there is no sudo in the containers so all > packages are

[Qemu-devel] [PULL 17/28] pseries: Clean up error reporting in ppc_spapr_init()

2016-01-24 Thread David Gibson
This function includes a number of explicit fprintf()s for errors. Change these to use error_report() instead. Also replace the single exit(EXIT_FAILURE) with an explicit exit(1), since the latter is the more usual idiom in qemu by a large margin. Signed-off-by: David Gibson

[Qemu-devel] [PULL 21/28] target-ppc: gdbstub: fix float registers for little-endian guests

2016-01-24 Thread David Gibson
From: Greg Kurz Let's reuse the ppc_maybe_bswap_register() helper, like we already do with the general registers. Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- target-ppc/translate_init.c | 4 1

[Qemu-devel] [PULL 18/28] pseries: Clean up error reporting in htab migration functions

2016-01-24 Thread David Gibson
The functions for migrating the hash page table on pseries machine type (htab_save_setup() and htab_load()) can report some errors with an explicit fprintf() before returning an appropriate error code. Change some of these to use error_report() instead. htab_save_setup() is omitted for now to

[Qemu-devel] [PULL 06/28] cuda: add missing fields to VMStateDescription

2016-01-24 Thread David Gibson
From: Mark Cave-Ayland Include some fields missed from the previous VMState conversion to the migration stream, as well as the new SR_INT delay timer. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson

[Qemu-devel] [PULL 20/28] target-ppc: rename and export maybe_bswap_register()

2016-01-24 Thread David Gibson
From: Greg Kurz This helper will be used to support FP, Altivec and VSX registers when the guest is little-endian. Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- target-ppc/cpu.h | 1 +

[Qemu-devel] [PULL 14/28] pseries: Clean up error handling in spapr_vga_init()

2016-01-24 Thread David Gibson
Use error_setg() to return an error rather than an explicit exit(). Previously it was an exit(0) instead of a non-zero exit code, which was simply a bug. Also improve the error message. While we're at it change the type of spapr_vga_init() to bool since that's how we're using it anyway.

Re: [Qemu-devel] [PATCH v9 2/3] quorum: implement bdrv_add_child() and bdrv_del_child()

2016-01-24 Thread Wen Congyang
On 01/23/2016 04:02 AM, Dr. David Alan Gilbert wrote: > * Alberto Garcia (be...@igalia.com) wrote: >> On Thu 21 Jan 2016 05:58:42 PM CET, Eric Blake wrote: >> In general, what do you do to make sure that the data in a new Quorum >> child is consistent with that of the

[Qemu-devel] [PULL 11/28] ppc: Clean up error handling in ppc_set_compat()

2016-01-24 Thread David Gibson
Current ppc_set_compat() returns -1 for errors, and also (unconditionally) reports an error message. The caller in h_client_architecture_support() may then report it again using an outdated fprintf(). Clean this up by using the modern error reporting mechanisms. Also add strerror(errno) to the

[Qemu-devel] [PULL 07/28] spapr: Small fixes to rtas_ibm_get_system_parameter, remove rtas_st_buffer

2016-01-24 Thread David Gibson
rtas_st_buffer() appears in spapr.h as though it were a widely used helper, but in fact it is only used for saving data in a format used by rtas_ibm_get_system_parameter(). This changes it to a local helper more specifically for that function. While we're there fix a couple of small defects in

[Qemu-devel] [PULL 15/28] pseries: Clean up error handling in spapr_rtas_register()

2016-01-24 Thread David Gibson
The errors detected in this function necessarily indicate bugs in the rest of the qemu code, rather than an external or configuration problem. So, a simple assert() is more appropriate than any more complex error reporting. Signed-off-by: David Gibson Reviewed-by:

[Qemu-devel] [PULL 12/28] pseries: Clean up error handling of spapr_cpu_init()

2016-01-24 Thread David Gibson
Currently spapr_cpu_init() is hardcoded to handle any errors as fatal. That works for now, since it's only called from initial setup where an error here means we really can't proceed. However, we'll want to handle this more flexibly for cpu hotplug in future so generalize this using the error

Re: [Qemu-devel] [PATCH RFC 0/7] Netfilter: Add each netdev a default filter

2016-01-24 Thread Hailiang Zhang
On 2016/1/22 18:38, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 06:35:48PM +0800, Hailiang Zhang wrote: On 2016/1/22 18:07, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 04:36:44PM +0800, zhanghailiang wrote: This series is a prerequisite for COLO, here we add each netdev a default

Re: [Qemu-devel] [PATCH v7 15/15] iotests: Add "qemu-img map" test for VMDK extents

2016-01-24 Thread Fam Zheng
On Sat, 01/23 00:51, Max Reitz wrote: > On 22.01.2016 04:06, Fam Zheng wrote: > > Reviewed-by: Eric Blake > > Reviewed-by: Stefan Hajnoczi > > Signed-off-by: Fam Zheng > > --- > > tests/qemu-iotests/059 | 10 ++ > >

[Qemu-devel] [PATCH] vmdk: Fix converting to streamOptimized

2016-01-24 Thread Fam Zheng
Commit d62d9dc4b8 lifted streamOptimized images's version to 3, but we now refuse to open version 3 images read-write. We need to make streamOptimized an exception to allow converting to it. This fixes the accidentally broken iotests case 059 for the same reason. Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v8 01/15] block: Add "file" output parameter to block status query functions

2016-01-24 Thread Fam Zheng
The added parameter can be used to return the BDS pointer which the valid offset is referring to. Its value should be ignored unless BDRV_BLOCK_OFFSET_VALID in ret is set. Until block drivers fill in the right value, let's clear it explicitly right before calling .bdrv_get_block_status. The

[Qemu-devel] [PATCH v8 10/15] vpc: Assign bs->file->bs to file in vpc_co_get_block_status

2016-01-24 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/vpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/vpc.c b/block/vpc.c index a070307..f504536 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -589,6 +589,7 @@ static int64_t

[Qemu-devel] [PATCH v8 14/15] qemu-img: Make MapEntry a QAPI struct

2016-01-24 Thread Fam Zheng
The "flags" bit mask is expanded to two booleans, "data" and "zero"; "bs" is replaced with "filename" string. Refactor the merge conditions in img_map() into entry_mergeable(). Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v8 06/15] parallels: Assign bs->file->bs to file in parallels_co_get_block_status

2016-01-24 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index e2de308..645521d 100644 ---

[Qemu-devel] [PATCH v8 12/15] block: Use returned *file in bdrv_co_get_block_status

2016-01-24 Thread Fam Zheng
Now that all drivers return the right "file" pointer, we can use it. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/io.c index 0836991..d704d32 100644

Re: [Qemu-devel] [PATCH RFC 1/7] net/filter: Fix the output information for command 'info network'

2016-01-24 Thread Jason Wang
On 01/22/2016 04:36 PM, zhanghailiang wrote: > The properties of netfilter object could be changed by 'qom-set' > command, but the output of 'info network' command is not updated, > because it got the old information through nf->info_str, it will > not be updated while we change the value of

Re: [Qemu-devel] [PATCH v13 00/10] Block replication for continuous checkpoints

2016-01-24 Thread Wen Congyang
On 01/22/2016 11:14 PM, Dr. David Alan Gilbert wrote: > Hi, > I can trigger a segfault if I wire in the block replication together with > a quorum instance; it only triggers with both of them present but, > it looks like the problem is a disagreement about the number of quorum > members; I'm

[Qemu-devel] [PULL 03/28] macio: use the existing IDEDMA aiocb to hold the active DMA aiocb

2016-01-24 Thread David Gibson
From: Mark Cave-Ayland Currently the aiocb is held within MACIOIDEState, however the IDE core code assumes that the current actvie DMA aiocb is held in aiocb in a few places, e.g. ide_bus_reset() and ide_reset(). Switch over to using IDEDMA aiocb to store the

[Qemu-devel] [PULL 26/28] pseries: Allow TCG h_enter to work with hotplugged memory

2016-01-24 Thread David Gibson
The implementation of the H_ENTER hypercall for PAPR guests needs to enforce correct access attributes on the inserted HPTE. This means determining if the HPTE's real address is a regular RAM address (which requires attributes for coherent access) or an IO address (which requires attributes for

[Qemu-devel] [PULL 16/28] pseries: Clean up error handling in xics_system_init()

2016-01-24 Thread David Gibson
Use the error handling infrastructure to pass an error out from try_create_xics() instead of assuming _abort - the caller is in a better position to decide on error handling policy. Also change the error handling from an _abort to _fatal, since this occurs during the initial machine construction

[Qemu-devel] [PULL 27/28] cuda.c: return error for unknown commands

2016-01-24 Thread David Gibson
From: Alyssa Milburn This avoids MacsBug hanging at startup in the absence of ADB mouse input, by replying with an error (which is also what MOL does) when it sends an unknown command (0x1c). Signed-off-by: Alyssa Milburn Signed-off-by: David Gibson

[Qemu-devel] [PULL 08/28] spapr: Remove rtas_st_buffer_direct()

2016-01-24 Thread David Gibson
rtas_st_buffer_direct() is a not particularly useful wrapper around cpu_physical_memory_write(). All the callers are in rtas_ibm_configure_connector, where it's better handled by local helper. Signed-off-by: David Gibson Reviewed-by: Alexey Kardashevskiy

[Qemu-devel] [PATCH v8 00/15] qemu-img map: Allow driver to return file of the allocated block

2016-01-24 Thread Fam Zheng
v8: Fix patch 15. [Max] Add Max's rev-by in patch 1. v7: Rebase, update patch 1 for two new bdrv_get_block_status_above() callers in qemu-img.c. [Max] Add Max's rev-by in patch 12. Original cover letter - I stumbled upon this when looking at external bitmap

[Qemu-devel] [PATCH v8 03/15] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status

2016-01-24 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index d4ea6b4..8babecd 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1349,6 +1349,7 @@ static

[Qemu-devel] [PATCH v8 02/15] qcow: Assign bs->file->bs to file in qcow_co_get_block_status

2016-01-24 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qcow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow.c b/block/qcow.c index 4202797..251910c 100644 --- a/block/qcow.c +++

Re: [Qemu-devel] [PATCH RFC 0/7] Netfilter: Add each netdev a default filter

2016-01-24 Thread Jason Wang
On 01/22/2016 06:07 PM, Daniel P. Berrange wrote: > On Fri, Jan 22, 2016 at 04:36:44PM +0800, zhanghailiang wrote: >> This series is a prerequisite for COLO, here we add each netdev >> a default buffer filter, it is disabled by default, and has >> no side effect for delivering packets in net

Re: [Qemu-devel] [PATCH] net: walk through filters reversely if traffic is outgress

2016-01-24 Thread Jason Wang
On 01/22/2016 04:11 PM, Li Zhijian wrote: > Previously, if the netdev has more than one filters, the ingress > or outgress traffic pass the filter in the same order. this patch > is to make the outgress pass the filter in a reverse order Need a description why we need this. > > Signed-off-by:

[Qemu-devel] [PULL 09/28] spapr: Remove abuse of rtas_ld() in h_client_architecture_support

2016-01-24 Thread David Gibson
h_client_architecture_support() uses rtas_ld() for general purpose memory access, despite the fact that it's not an RTAS routine at all and rtas_ld makes things more awkward. Clean this up by replacing rtas_ld() calls with appropriate ldXX_phys() calls. Signed-off-by: David Gibson

[Qemu-devel] [PULL 00/28] ppc-for-2.6 queue 20160125

2016-01-24 Thread David Gibson
The following changes since commit 047e363b05679724d6b784c6ec6310697fe48ba0: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-softfloat-20160122' into staging (2016-01-22 15:19:21 +) are available in the git repository at: git://github.com/dgibson/qemu.git

[Qemu-devel] [PULL 01/28] target-ppc: Use sensible POWER8/POWER8E versions

2016-01-24 Thread David Gibson
From: Benjamin Herrenschmidt We never released anything older than POWER8 DD2.0 and POWER8E DD2.1, so let's use these versions, without that some firmware or Linux code might fail to use some HW features that were non functional in earlier internal only spins of the

[Qemu-devel] [PULL 10/28] spapr: Don't create ibm, dynamic-reconfiguration-memory w/o DR LMBs

2016-01-24 Thread David Gibson
From: Bharata B Rao If guest doesn't have any dynamically reconfigurable (DR) logical memory blocks (LMB), then we shouldn't create ibm,dynamic-reconfiguration-memory device tree node. Signed-off-by: Bharata B Rao Signed-off-by: David

[Qemu-devel] [PULL 19/28] target-ppc: kvm: fix floating point registers sync on little-endian hosts

2016-01-24 Thread David Gibson
From: Greg Kurz On VSX capable CPUs, the 32 FP registers are mapped to the high-bits of the 32 first VSX registers. So if you have: VSR31 = (uint128) 0x0102030405060708090a0b0c0d0e0f00 then FPR31 = (uint64) 0x0102030405060708 The kernel stores the VSX registers in

[Qemu-devel] [PULL 23/28] target-ppc: gdbstub: fix altivec registers for little-endian guests

2016-01-24 Thread David Gibson
From: Greg Kurz Altivec registers are 128-bit wide. They are stored in memory as two 64-bit values that must be byteswapped when the guest is little-endian. Let's reuse the ppc_maybe_bswap_register() helper for this. We also need to fix the ordering of the 64-bit

[Qemu-devel] [PULL 28/28] uninorth.c: add support for UniNorth kMacRISCPCIAddressSelect (0x48) register

2016-01-24 Thread David Gibson
From: Programmingkid Darwin/OS X use the undocumented kMacRISCPCIAddressSelect (0x48) to configure PCI memory space size for mac99 machines. Without this register, warnings similar to below are emitted to the console during boot: AppleMacRiscPCI: bad range

Re: [Qemu-devel] [PATCH v13 00/10] Block replication for continuous checkpoints

2016-01-24 Thread Wen Congyang
On 01/22/2016 11:14 PM, Dr. David Alan Gilbert wrote: > Hi, > I can trigger a segfault if I wire in the block replication together with > a quorum instance; it only triggers with both of them present but, > it looks like the problem is a disagreement about the number of quorum > members; I'm

[Qemu-devel] [PULL 22/28] target-ppc: gdbstub: introduce avr_need_swap()

2016-01-24 Thread David Gibson
From: Greg Kurz This helper will be used to support Altivec registers in little-endian guests. This patch does not change functionnality. Note: I had to put the helper some lines away from the gdb_*_avr_reg() routines to get a more readable patch. Signed-off-by: Greg

[Qemu-devel] [PULL 24/28] target-ppc: gdbstub: fix spe registers for little-endian guests

2016-01-24 Thread David Gibson
From: Greg Kurz Let's reuse the ppc_maybe_bswap_register() helper, like we already do with the general registers. Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- target-ppc/translate_init.c | 11

[Qemu-devel] [PULL 25/28] target-ppc: gdbstub: Add VSX support

2016-01-24 Thread David Gibson
From: Anton Blanchard Add the XML and functions to get and set VSX registers. Signed-off-by: Anton Blanchard (fixed little-endian guests) Signed-off-by: Greg Kurz Signed-off-by: David Gibson ---

Re: [Qemu-devel] COLO: how to flip a secondary to a primary?

2016-01-24 Thread Li Zhijian
On 01/25/2016 09:32 AM, Wen Congyang wrote: >f) I've not thought about the colo-proxy that much yet - I guess that > existing connections need to keep their sequence number offset but Strictly speaking, after failover, we only need to keep servicing for the tcp connections which

[Qemu-devel] [PATCH v8 07/15] qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status

2016-01-24 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/qed.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/qed.c b/block/qed.c index 8f6f841..404be1e 100644 --- a/block/qed.c +++

[Qemu-devel] [PATCH v8 09/15] vdi: Assign bs->file->bs to file in vdi_co_get_block_status

2016-01-24 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/vdi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/vdi.c b/block/vdi.c index 294c438..b403243 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -551,6 +551,7 @@ static int64_t

[Qemu-devel] [PATCH v8 13/15] qemu-img: In "map", use the returned "file" from bdrv_get_block_status

2016-01-24 Thread Fam Zheng
Now all drivers should return a correct "file", we can make use of it, even with the recursion into backing chain above. Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- qemu-img.c | 2 +- 1 file

[Qemu-devel] [PULL 04/28] macio: add dma_active to VMStateDescription

2016-01-24 Thread David Gibson
From: Mark Cave-Ayland Make sure that we include the value of dma_active in the migration stream. Signed-off-by: Mark Cave-Ayland Acked-by: John Snow Signed-off-by: David Gibson ---

[Qemu-devel] [PULL 02/28] target-ppc: use cpu_write_xer() helper in cpu_post_load

2016-01-24 Thread David Gibson
From: Mark Cave-Ayland Otherwise some internal xer variables fail to get set post-migration. Signed-off-by: Mark Cave-Ayland Reviewed-by: Alexey Kardashevskiy Signed-off-by: David Gibson

[Qemu-devel] [PULL 13/28] pseries: Clean up error handling in spapr_validate_node_memory()

2016-01-24 Thread David Gibson
Use error_setg() and return an error, rather than using an explicit exit(). Also improve messages, and be more explicit about which constraint failed. Signed-off-by: David Gibson Reviewed-by: Bharata B Rao Reviewed-by: Thomas Huth

[Qemu-devel] [PULL 05/28] mac_dbdma: add DBDMA controller state to VMStateDescription

2016-01-24 Thread David Gibson
From: Mark Cave-Ayland Make sure that we include the DBDMA controller state in the migration stream. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/misc/macio/mac_dbdma.c | 40

Re: [Qemu-devel] COLO: how to flip a secondary to a primary?

2016-01-24 Thread Wen Congyang
On 01/23/2016 03:35 AM, Dr. David Alan Gilbert wrote: > Hi, > I've been looking at what's needed to add a new secondary after > a primary failed; from the block side it doesn't look as hard > as I'd expected, perhaps you can tell me if I'm missing something! > > The normal primary setup is: >

[Qemu-devel] [PATCH v8 11/15] vmdk: Return extent's file in bdrv_get_block_status

2016-01-24 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/vmdk.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index e1d3e27..f8f7fcf 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1274,6 +1274,7

[Qemu-devel] [PATCH v8 15/15] iotests: Add "qemu-img map" test for VMDK extents

2016-01-24 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/059 | 10 ++ tests/qemu-iotests/059.out | 26 ++ 2 files changed, 36 insertions(+) diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 index 0ded0c3..0332bbb 100755 ---

[Qemu-devel] [PATCH v8 05/15] iscsi: Assign bs to file in iscsi_co_get_block_status

2016-01-24 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/iscsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index e182557..9fe76f4 100644 --- a/block/iscsi.c +++

[Qemu-devel] [PATCH v8 08/15] sheepdog: Assign bs to file in sd_co_get_block_status

2016-01-24 Thread Fam Zheng
Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/sheepdog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/sheepdog.c b/block/sheepdog.c index 2ea05a6..a0098c1 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2739,6

[Qemu-devel] [PATCH v8 04/15] raw: Assign bs to file in raw_co_get_block_status

2016-01-24 Thread Fam Zheng
Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/raw-posix.c | 1 + block/raw_bsd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index

Re: [Qemu-devel] [PATCH RFC 2/7] net/filter: Add a 'status' property for filter object

2016-01-24 Thread Jason Wang
On 01/22/2016 04:36 PM, zhanghailiang wrote: > With this property, users can control if this filter is 'enable' > or 'disable'. The default behavior for filter is enabled. > > Signed-off-by: zhanghailiang Let's squash patch 3 into this for a complete

Re: [Qemu-devel] [PATCH v14 0/8] Block replication for continuous checkpoints

2016-01-24 Thread Wen Congyang
Stefan:ping Do you have time to review this series patchset? Thanks Wen Congyang At 2016/1/13 17:18, Changlong Xie wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication

Re: [Qemu-devel] [PATCH] target-mips: silence NaNs for cvt.s.d and cvt.d.s

2016-01-24 Thread Peter Maydell
On 24 January 2016 at 03:42, Maciej W. Rozycki wrote: > > FYI, I posted a more general fix to this a while ago, however the review > regrettably went nowhere. See the archive of discussion starting at: >

[Qemu-devel] [PATCH 02/10] target-ppc: Convert mmu-hash{32, 64}.[ch] from CPUPPCState to PowerPCCPU

2016-01-24 Thread David Gibson
Like a lot of places these files include a mixture of functions taking both the older CPUPPCState *env and newer PowerPCCPU *cpu. Move a step closer to cleaning this up by standardizing on PowerPCCPU, except for the helper_* functions which are called with the CPUPPCState * from tcg. Callers and

[Qemu-devel] [PATCH 05/10] target-ppc: Use actual page size encodings from HPTE

2016-01-24 Thread David Gibson
At present the 64-bit hash MMU code uses information from the SLB to determine the page size of a translation. We do need that information to correctly look up the hash table. However the MMU also allows a possibly larger page size to be encoded into the HPTE itself, which is used to populate

[Qemu-devel] [PATCH 06/10] target-ppc: Remove unused mmu models from ppc_tlb_invalidate_one

2016-01-24 Thread David Gibson
ppc_tlb_invalidate_one() has a big switch handling many different MMU types. However, most of those branches can never be reached: It is called from 3 places: from remove_hpte() and h_protect() in spapr_hcall.c (which always has a 64-bit hash MMU type), and from helper_tlbie() in mmu_helper.c.

[Qemu-devel] [PATCH 08/10] target-ppc: Add new TLB invalidate by HPTE call for hash64 MMUs

2016-01-24 Thread David Gibson
When HPTEs are removed or modified by hypercalls on spapr, we need to invalidate the relevant pages in the qemu TLB. Currently we do that by doing some complicated calculations to work out the right encoding for the tlbie instruction, then passing that to ppc_tlb_invalidate_one()... which totally

[Qemu-devel] [PATCH 07/10] target-ppc: Split 44x tlbiva from ppc_tlb_invalidate_one()

2016-01-24 Thread David Gibson
Currently both the tlbiva instruction (used on 44x chips) and the tlbie instruction (used on hash MMU chips) are both handled via ppc_tlb_invalidate_one(). This is silly, because they're invoked from different places, and do different things. Clean this up by separating out the tlbiva

[Qemu-devel] [PATCH 1/2] target-ppc: Make every FPSCR_ macro have a corresponding FP_ macro

2016-01-24 Thread James Clarke
Signed-off-by: James Clarke --- target-ppc/cpu.h | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 9706000..3a967b7 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -686,24

[Qemu-devel] [PATCH 0/2] PPC handles mcrfs incorrectly

2016-01-24 Thread James Clarke
Here is the description of the mcrfs instruction from the PowerPC Architecture Book, Version 2.02, Book I: PowerPC User Instruction Set Architecture (http://www.ibm.com/developerworks/systems/library/es-archguide-v2.html), found on page 120: The contents of FPSCR field BFA are copied to

[Qemu-devel] [PATCH 1/1] usbredir: fixes a block when redirecting a usb 3.0 device to xhci

2016-01-24 Thread ??????
Hi, I am using qemu 2.1.2 and the qemu process blocked when redirecting a usb 3.0 device to xhci. QEMU parameters are as follows: #!/bin/sh gdb /root/sqx/qemu-root/bin/qemu-system-x86_64 --args /root/sqx/qemu-root/bin/qemu-system-x86_64 \ -name win7_sqx_qemu \ -machine

Re: [Qemu-devel] [PATCH RFC 7/7] net/filter: prevent the default filter to be deleted

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:25, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: Signed-off-by: zhanghailiang --- net/filter.c | 8 1 file changed, 8 insertions(+) diff --git a/net/filter.c b/net/filter.c index a126a3b..4aafff0 100644 ---

Re: [Qemu-devel] [PATCH RFC 4/7] net/filter: Introduce a helper to add a filter to the netdev

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:20, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: Signed-off-by: zhanghailiang Commit log please. I will add it in next version, thanks. --- include/net/filter.h | 5 + net/filter.c | 63

Re: [Qemu-devel] [PATCH RFC 5/7] filter-buffer: Accept zero interval

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:19, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We may want to accept zero interval when VM FT solutions like MC or COLO use this filter to release packets on demand. Signed-off-by: zhanghailiang Reviewed-by: Yang Hongyang

[Qemu-devel] [PATCH 00/10] Clean up page size handling for ppc 64-bit hash MMUs with TCG

2016-01-24 Thread David Gibson
Encoding of page sizes on 64-bit hash MMUs for Power is rather arcane, involving control bits in both the SLB and HPTE. At present we support a few of the options, but far fewer than real hardware. We're able to get away with that in practice, because guests use a device tree property to

Re: [Qemu-devel] [PATCH RFC 5/7] filter-buffer: Accept zero interval

2016-01-24 Thread Jason Wang
On 01/22/2016 04:36 PM, zhanghailiang wrote: > We may want to accept zero interval when VM FT solutions like MC > or COLO use this filter to release packets on demand. > > Signed-off-by: zhanghailiang > Reviewed-by: Yang Hongyang >

Re: [Qemu-devel] [PATCH RFC 4/7] net/filter: Introduce a helper to add a filter to the netdev

2016-01-24 Thread Jason Wang
On 01/22/2016 04:36 PM, zhanghailiang wrote: > Signed-off-by: zhanghailiang Commit log please. > --- > include/net/filter.h | 5 + > net/filter.c | 63 > > 2 files changed, 68 insertions(+) > >

Re: [Qemu-devel] [PATCH RFC 0/7] Netfilter: Add each netdev a default filter

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 9:59, Hailiang Zhang wrote: On 2016/1/22 18:38, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 06:35:48PM +0800, Hailiang Zhang wrote: On 2016/1/22 18:07, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 04:36:44PM +0800, zhanghailiang wrote: This series is a prerequisite

Re: [Qemu-devel] [PATCH RFC 0/7] Netfilter: Add each netdev a default filter

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 11:32, Jason Wang wrote: On 01/22/2016 06:07 PM, Daniel P. Berrange wrote: On Fri, Jan 22, 2016 at 04:36:44PM +0800, zhanghailiang wrote: This series is a prerequisite for COLO, here we add each netdev a default buffer filter, it is disabled by default, and has no side effect

Re: [Qemu-devel] [PATCH] net: walk through filters reversely if traffic is outgress

2016-01-24 Thread Li Zhijian
On 01/25/2016 12:58 PM, Jason Wang wrote: On 01/22/2016 04:11 PM, Li Zhijian wrote: Previously, if the netdev has more than one filters, the ingress or outgress traffic pass the filter in the same order. this patch is to make the outgress pass the filter in a reverse order Need a

[Qemu-devel] [Questions] Several questions about incremental backup

2016-01-24 Thread Rudy Zhang
I am reading and testing the function: incremental backup in qemu-2.5. But I have serveral questions about it. 1. If I want to start image backup, at first I need to start full mode backup and then, add a bitmap to trace io, next start incremental backup via the bitmap before we added. But

Re: [Qemu-devel] [PATCH RFC 3/7] net/filter: Skip the disabled filter when delivering packets

2016-01-24 Thread Jason Wang
On 01/22/2016 05:32 PM, Wen Congyang wrote: > On 01/22/2016 04:36 PM, zhanghailiang wrote: >> If the filter is disabled, don't go through it. >> >> Signed-off-by: zhanghailiang >> --- >> include/net/filter.h | 5 + >> net/net.c| 4 >> 2

[Qemu-devel] [PATCH 01/10] target-ppc: Remove unused kvmppc_read_segment_page_sizes() stub

2016-01-24 Thread David Gibson
This stub function is in the !KVM ifdef in target-ppc/kvm_ppc.h. However no such function exists on the KVM side, or is ever used. I think this originally referenced a function which read host page size information from /proc, for we we now use the KVM GET_SMMU_INFO extension instead. In any

[Qemu-devel] [PATCH 04/10] target-ppc: Rework SLB page size lookup

2016-01-24 Thread David Gibson
Currently, the ppc_hash64_page_shift() function looks up a page size based on information in an SLB entry. It open codes the bit translation for existing CPUs, however different CPU models can have different SLB encodings. We already store those in the 'sps' table in CPUPPCState, but we don't

[Qemu-devel] [PATCH 09/10] target-ppc: Helper to determine page size information from hpte alone

2016-01-24 Thread David Gibson
h_enter() in the spapr code needs to know the page size of the HPTE it's about to insert. Unlike other paths that do this, it doesn't have access to the SLB, so at the moment it determines this with some open-coded tests which assume POWER7 or POWER8 page size encodings. To make this more

[Qemu-devel] [PATCH 03/10] target-ppc: Rework ppc_store_slb

2016-01-24 Thread David Gibson
ppc_store_slb updates the SLB for PPC cpus with 64-bit hash MMUs. Currently it takes two parameters, which contain values encoded as the register arguments to the slbmte instruction, one register contains the ESID portion of the SLBE and also the slot number, the other contains the VSID portion of

Re: [Qemu-devel] [PATCH RFC 7/7] net/filter: prevent the default filter to be deleted

2016-01-24 Thread Jason Wang
On 01/22/2016 04:36 PM, zhanghailiang wrote: > Signed-off-by: zhanghailiang > --- > net/filter.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/net/filter.c b/net/filter.c > index a126a3b..4aafff0 100644 > --- a/net/filter.c > +++

[Qemu-devel] Migrating decrementer (was: Re: [PATCH 4/4] target-ppc: ensure we include the decrementer value during migration)

2016-01-24 Thread Mark Cave-Ayland
On 18/01/16 04:51, David Gibson wrote: > On Fri, Jan 15, 2016 at 05:46:10PM +, Mark Cave-Ayland wrote: >> On 12/01/16 02:44, David Gibson wrote: >> > In other words, isn't this just skipping the decrementer interrupts at > the qemu level rather than the guest level? > > It

Re: [Qemu-devel] [PATCH RFC 3/7] net/filter: Skip the disabled filter when delivering packets

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:04, Jason Wang wrote: On 01/22/2016 05:32 PM, Wen Congyang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: If the filter is disabled, don't go through it. Signed-off-by: zhanghailiang --- include/net/filter.h | 5 + net/net.c

Re: [Qemu-devel] [PATCH RFC 1/7] net/filter: Fix the output information for command 'info network'

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:01, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: The properties of netfilter object could be changed by 'qom-set' command, but the output of 'info network' command is not updated, because it got the old information through nf->info_str, it will not be updated

[Qemu-devel] [PATCH 2/2] target-ppc: mcrfs should always update FEX/VX and only clear exception bits

2016-01-24 Thread James Clarke
Signed-off-by: James Clarke --- target-ppc/cpu.h | 6 ++ target-ppc/translate.c | 15 +++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 3a967b7..d811bc9 100644 --- a/target-ppc/cpu.h +++

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-24 Thread Jason Wang
On 01/22/2016 04:36 PM, zhanghailiang wrote: > We add each netdev a default buffer filter, which the name is > 'nop', and the default buffer filter is disabled, so it has > no side effect for packets delivering in qemu net layer. > > The default buffer filter can be used by COLO or

[Qemu-devel] [PATCH 10/10] target-ppc: Allow more page sizes for POWER7 & POWER8 in TCG

2016-01-24 Thread David Gibson
Now that the TCG and spapr code has been extended to allow (semi-) arbitrary page encodings in the CPU's 'sps' table, we can add the many page sizes supported by real POWER7 and POWER8 hardware that we previously didn't support in TCG. Signed-off-by: David Gibson ---

Re: [Qemu-devel] [PATCH RFC 2/7] net/filter: Add a 'status' property for filter object

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:05, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: With this property, users can control if this filter is 'enable' or 'disable'. The default behavior for filter is enabled. Signed-off-by: zhanghailiang Let's squash patch 3

Re: [Qemu-devel] [PATCH RFC 6/7] net/filter: Add a default filter to each netdev

2016-01-24 Thread Hailiang Zhang
On 2016/1/25 13:18, Jason Wang wrote: On 01/22/2016 04:36 PM, zhanghailiang wrote: We add each netdev a default buffer filter, which the name is 'nop', and the default buffer filter is disabled, so it has no side effect for packets delivering in qemu net layer. The default buffer filter can

[Qemu-devel] Windows Update Virtio Drivers

2016-01-24 Thread James Watson
Hi, Over the last few months there have been various windows updates available that cater for the virtio drivers required to run a virtualized windows guest on Linux host, such as the fedora (latest branch) and suse virtio drivers. This is been a hit and miss in terms of what works and in

Re: [Qemu-devel] [vfio-users] [PATCH v2 1/3] input: add qemu_input_qcode_to_linux + qemu_input_linux_to_qcode

2016-01-24 Thread Jonathan Scruggs
Hi Gerd, A couple of options I have been wondering about. 1) Is it possible to have an option that would enable running a program on the host on switching, IE when both CRTL keys are pressed. It would run on the host regardless if it was on the guest machine when the keys pressed. An option like

Re: [Qemu-devel] [PATCH v11 6/7] hw/ptimer: Legalize running with delta = load = 0 and abort on period = 0

2016-01-24 Thread Dmitry Osipenko
24.01.2016 07:28, Peter Crosthwaite пишет: [snip] /* Set counter frequency in Hz. */ void ptimer_set_freq(ptimer_state *s, uint32_t freq) { +g_assert(freq != 0); s->delta = ptimer_get_count(s); s->period = 10ll / freq; s->period_frac = (10ll << 32)

Re: [Qemu-devel] [PATCH v11 7/7] arm_mptimer: Convert to use ptimer

2016-01-24 Thread Dmitry Osipenko
Hello Peter, 24.01.2016 08:25, Peter Crosthwaite пишет: [snip] +timerblock_run(tb->timer, control, (value != 0) && (control & 1)); break; case 8: /* Control. */ -old = tb->control; -tb->control = value; -if (value & 1) { -if ((old &

Re: [Qemu-devel] [PATCH 04/13] cuda: port SET_AUTO_RATE command to new framework

2016-01-24 Thread Hervé Poussineau
Le 23/01/2016 21:40, Hervé Poussineau a écrit : Take requested autopoll rate into account Signed-off-by: Hervé Poussineau --- hw/misc/macio/cuda.c | 31 +++ hw/ppc/mac.h | 1 + 2 files changed, 28 insertions(+), 4 deletions(-)

Re: [Qemu-devel] [Qemu-ppc] [PATCH 05/13] cuda: port SET_DEVICE_LIST command to new framework

2016-01-24 Thread Programmingkid
On Jan 23, 2016, at 3:41 PM, qemu-ppc-requ...@nongnu.org wrote: > Message: 6 > Date: Sat, 23 Jan 2016 21:40:02 +0100 > From: Herv? Poussineau > To: qemu-devel@nongnu.org > Cc: Alyssa Milburn , Herv? Poussineau > ,

Re: [Qemu-devel] [PATCH 11/13] cuda: port SET_TIME command to new framework

2016-01-24 Thread David Gibson
On Sat, Jan 23, 2016 at 09:40:08PM +0100, Hervé Poussineau wrote: > Signed-off-by: Hervé Poussineau Reviewed-by: David Gibson > --- > hw/misc/macio/cuda.c | 24 ++-- > 1 file changed, 18 insertions(+), 6 deletions(-) > >

Re: [Qemu-devel] [PATCH 04/13] cuda: port SET_AUTO_RATE command to new framework

2016-01-24 Thread David Gibson
On Sat, Jan 23, 2016 at 09:40:01PM +0100, Hervé Poussineau wrote: > Take requested autopoll rate into account Commit message needs some work - as far as I can tell this is not just moving this to the new framework, but implementing it - previously the command was silently ignored. > >

  1   2   >