[Qemu-devel] [PATCH v2] ES1370: QOMify

2016-01-31 Thread Cao jin
Signed-off-by: Cao jin --- v1 missed "pci_create_simple" modification. hw/audio/es1370.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 592578b..f26fea3 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -288,6 +2

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-01-31 Thread Hailiang Zhang
On 2016/2/1 15:46, Jason Wang wrote: On 02/01/2016 02:13 PM, Hailiang Zhang wrote: On 2016/2/1 11:14, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help adding a filter object to a netdev. Besides, we add

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-31 Thread Li Zhijian
On 02/01/2016 10:57 AM, Jason Wang wrote: On 01/29/2016 09:38 AM, Li Zhijian wrote: On 01/28/2016 01:44 PM, Jason Wang wrote: On 01/27/2016 10:40 AM, Zhang Chen wrote: From: ZhangChen Traffic-mirror is a netfilter plugin. It gives qemu the ability to copy and mirror guest's net packe

[Qemu-devel] [PATCH] ES1370: QOMify

2016-01-31 Thread Cao jin
Signed-off-by: Cao jin --- hw/audio/es1370.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 592578b..089dd0e 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -288,6 +288,10 @@ struct chan_bits {

Re: [Qemu-devel] [RFC Patch v2 02/10] virtio-net rsc: Initilize & Cleanup

2016-01-31 Thread Wei Xu
On 02/01/2016 11:32 AM, Jason Wang wrote: On 02/01/2016 02:13 AM, w...@redhat.com wrote: From: Wei Xu The chain list is initialized when the device is getting realized, and the entry of the chain will be inserted dynamically according to protocol type of the network traffic. All the buffer

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 PM, Hailiang Zhang wrote: > On 2016/2/1 11:14, Jason Wang wrote: >> >> >> On 01/27/2016 04:29 PM, zhanghailiang wrote: >>> We add a new helper function netdev_add_filter(), this function >>> can help adding a filter object to a netdev. >>> Besides, we add a is_default member f

Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public

2016-01-31 Thread Hailiang Zhang
On 2016/2/1 15:27, Jason Wang wrote: On 02/01/2016 02:19 PM, Hailiang Zhang wrote: On 2016/2/1 11:05, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: Make the helper object_create() public and fix its first parameter to accept NULL value. Looks not very nice. Maybe pass a

Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public

2016-01-31 Thread Jason Wang
On 02/01/2016 02:19 PM, Hailiang Zhang wrote: > On 2016/2/1 11:05, Jason Wang wrote: >> >> >> On 01/27/2016 04:29 PM, zhanghailiang wrote: >>> Make the helper object_create() public and fix its first >>> parameter to accept NULL value. >> >> Looks not very nice. Maybe pass a new predicate func fo

Re: [Qemu-devel] [RFC Patch v2 10/10] virtio-net rsc: Add Receive Segment Coalesce statistics

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Add statistics to log what happened during the process. > > Signed-off-by: Wei Xu > --- > hw/net/virtio-net.c| 49 > +++--- > include/hw/virtio/virtio.h | 33 +

Re: [Qemu-devel] [RFC Patch v2 09/10] virtio-net rsc: Add IPv6 support

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > A few more stuffs should be included to support this > 1. Corresponding chain lookup > 2. Coalescing callback for the protocol chain > 3. Filter & Sanity Check. > > Signed-off-by: Wei Xu > --- > hw/net/virtio-net.c | 104 >

Re: [Qemu-devel] [RFC Patch v2 08/10] virtio-net rsc: Sanity check & More bypass cases check

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > More general exception cases check > 1. Incorrect version in IP header > 2. IP options & IP fragment > 3. Not a TCP packets > 4. Sanity size check to prevent buffer overflow attack. > > Signed-off-by: Wei Xu Let's squash this in

[Qemu-devel] [PATCH 2/2] Passthru CCID card: QOMify

2016-01-31 Thread Cao jin
Signed-off-by: Cao jin --- hw/usb/ccid-card-passthru.c | 10 -- hw/usb/ccid.h | 4 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 9f49c05..cbb7c80 100644 --- a/hw/usb/ccid-card-passthru.c +

[Qemu-devel] [PATCH 1/2] Emulated CCID card: QOMify

2016-01-31 Thread Cao jin
Signed-off-by: Cao jin --- hw/usb/ccid-card-emulated.c | 20 +--- hw/usb/ccid.h | 4 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 869a63c..0b05260 100644 --- a/hw/usb/ccid-card-

[Qemu-devel] [PATCH 0/2] CCID QOMify

2016-01-31 Thread Cao jin
As each commit says Cao jin (2): Emulated CCID card: QOMify Passthru CCID card: QOMify hw/usb/ccid-card-emulated.c | 20 +--- hw/usb/ccid-card-passthru.c | 10 -- hw/usb/ccid.h | 8 3 files changed, 21 insertions(+), 17 deletions(-) -- 2.1.0

Re: [Qemu-devel] [RFC Patch v2 07/10] virtio-net rsc: Checking TCP flag and drain specific connection packets

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Normally it includes 2 typical way to handle a TCP control flag, bypass > and finalize, bypass means should be sent out directly, and finalize > means the packets should also be bypassed, and this should be done > after searching

Re: [Qemu-devel] [RFC Patch v2 06/10] virtio-net rsc: IPv4 checksum

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > If a field in the IPv4 header is modified, then the checksum > have to be recalculated before sending it out. This in fact breaks bisection. I think you need either squash this into previous patch or introduce virtio_net_rsc_ipv4

Re: [Qemu-devel] [RFC Patch v2 05/10] virtio-net rsc: Create timer to drain the packets from the cache pool

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > The timer will only be triggered if the packets pool is not empty, > and it'll drain off all the cached packets, this is to reduce the > delay to upper layer protocol stack. > > Signed-off-by: Wei Xu > --- > hw/net/virtio-net.c

Re: [Qemu-devel] [RFC Patch v2 04/10] virtio-net rsc: Detailed IPv4 and General TCP data coalescing

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Since this feature also needs to support IPv6, and there are > some protocol specific differences difference for IPv4/6 in the header, > so try to make the interface to be general. > > IPv4/6 should set up both the new and old IP/

Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public

2016-01-31 Thread Hailiang Zhang
On 2016/2/1 11:05, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: Make the helper object_create() public and fix its first parameter to accept NULL value. Looks not very nice. Maybe pass a new predicate func for sanity check it better. OK, but here is it better to check if

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-01-31 Thread Hailiang Zhang
On 2016/2/1 11:14, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help adding a filter object to a netdev. Besides, we add a is_default member for struct NetFilterState to indicate whether the filter is default

Re: [Qemu-devel] [RFC Patch v2 03/10] virtio-net rsc: Chain Lookup, Packet Caching and Framework of IPv4

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Upon a packet is arriving, a corresponding chain will be selected or created, > or be bypassed if it's not an IPv4 packets. > > The callback in the chain will be invoked to call the real coalescing. > > Since the coalescing is bas

[Qemu-devel] CPU hotplug

2016-01-31 Thread David Gibson
Hi, It seems to me we're getting rather bogged down in how to proceed with an improved CPU hotplug (and hot unplug) interface, both generically and for ppc in particular. So here's a somewhat more concrete suggestion of a way forward, to see if we can get some consensus. The biggest difficulty I

Re: [Qemu-devel] [RFC Patch v2 02/10] virtio-net rsc: Initilize & Cleanup

2016-01-31 Thread Wei Xu
On 02/01/2016 02:47 AM, Michael S. Tsirkin wrote: On Mon, Feb 01, 2016 at 02:13:21AM +0800, w...@redhat.com wrote: From: Wei Xu The chain list is initialized when the device is getting realized, and the entry of the chain will be inserted dynamically according to protocol type of the network t

Re: [Qemu-devel] [RFC v2 0/10] Support Receive-Segment-Offload(RSC) for WHQL test of Window guest

2016-01-31 Thread Wei Xu
On 02/01/2016 11:23 AM, Jason Wang wrote: On 02/01/2016 02:13 AM, w...@redhat.com wrote: From: Wei Xu Patch v2 add detailed commit log. This patch is to support WHQL test for Windows guest, while this feature also benifits other guest works as a kernel 'gro' like feature with userspace impl

Re: [Qemu-devel] [RFC Patch v2 03/10] virtio-net rsc: Chain Lookup, Packet Caching and Framework of IPv4

2016-01-31 Thread Wei Xu
On 02/01/2016 02:50 AM, Michael S. Tsirkin wrote: On Mon, Feb 01, 2016 at 02:13:22AM +0800, w...@redhat.com wrote: From: Wei Xu Upon a packet is arriving, a corresponding chain will be selected or created, or be bypassed if it's not an IPv4 packets. The callback in the chain will be invoked t

Re: [Qemu-devel] [RFC Patch v2 02/10] virtio-net rsc: Initilize & Cleanup

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > The chain list is initialized when the device is getting realized, > and the entry of the chain will be inserted dynamically according > to protocol type of the network traffic. > > All the buffered packets and chain will be destr

Re: [Qemu-devel] [PATCH v7 11/13] spapr: CPU hot unplug support

2016-01-31 Thread David Gibson
On Thu, Jan 28, 2016 at 11:19:53AM +0530, Bharata B Rao wrote: > Remove the CPU core device by removing the underlying CPU thread devices. > Hot removal of CPU for sPAPR guests is supported by sending the hot unplug > notification to the guest via EPOW interrupt. Release the vCPU object > after CPU

Re: [Qemu-devel] [PATCH v7 10/13] spapr: CPU hotplug support

2016-01-31 Thread David Gibson
On Thu, Jan 28, 2016 at 11:19:52AM +0530, Bharata B Rao wrote: > Support CPU hotplug via device-add command like this: > > (qemu) device_add powerpc64-cpu-core,id=core2 > > In response to device_add, CPU core device will be created. CPU core > device creates and realizes CPU thread devices. If th

Re: [Qemu-devel] [PATCH v7 08/13] target-ppc: Introduce PowerPC specific CPU core device

2016-01-31 Thread David Gibson
On Thu, Jan 28, 2016 at 11:19:50AM +0530, Bharata B Rao wrote: > CPU core device is a container of CPU thread devices. CPU hotplug is > performed at the granularity of CPU core device. When hotplugged, CPU core > creates CPU thread devices. > > Signed-off-by: Bharata B Rao The basic logic here

Re: [Qemu-devel] [RFC v2 0/10] Support Receive-Segment-Offload(RSC) for WHQL test of Window guest

2016-01-31 Thread Jason Wang
On 02/01/2016 02:13 AM, w...@redhat.com wrote: > From: Wei Xu > > Patch v2 add detailed commit log. > > This patch is to support WHQL test for Windows guest, while this feature also > benifits other guest works as a kernel 'gro' like feature with userspace > implementation. > Feature informatio

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-01-31 Thread Jason Wang
On 01/27/2016 04:29 PM, zhanghailiang wrote: > We add a new helper function netdev_add_filter(), this function > can help adding a filter object to a netdev. > Besides, we add a is_default member for struct NetFilterState > to indicate whether the filter is default or not. > > Signed-off-by: zhan

Re: [Qemu-devel] [PATCH RFC v2 2/5] vl: Make object_create() public

2016-01-31 Thread Jason Wang
On 01/27/2016 04:29 PM, zhanghailiang wrote: > Make the helper object_create() public and fix its first > parameter to accept NULL value. Looks not very nice. Maybe pass a new predicate func for sanity check it better. > > Signed-off-by: zhanghailiang > Cc: Paolo Bonzini > --- > v2: > - New

Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror

2016-01-31 Thread Jason Wang
On 01/29/2016 09:38 AM, Li Zhijian wrote: > > > On 01/28/2016 01:44 PM, Jason Wang wrote: >> >> >> On 01/27/2016 10:40 AM, Zhang Chen wrote: >>> From: ZhangChen >>> >>> Traffic-mirror is a netfilter plugin. >>> It gives qemu the ability to copy and mirror guest's >>> net packet. we output packet

Re: [Qemu-devel] [PATCH] dimm: Correct type of MemoryHotplugState->base

2016-01-31 Thread David Gibson
On Fri, Jan 22, 2016 at 03:32:52PM +0100, Igor Mammedov wrote: > On Fri, 22 Jan 2016 15:21:05 +0100 > Paolo Bonzini wrote: > > > On 22/01/2016 11:02, Igor Mammedov wrote: > > > On Thu, 21 Jan 2016 12:37:51 +1100 > > > David Gibson wrote: > > > > > >> The 'base' field of MemoryHotplugState is

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

2016-01-31 Thread David Gibson
From: 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

[Qemu-devel] [PULL 32/40] target-ppc: Rework SLB page size lookup

2016-01-31 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 cur

[Qemu-devel] [PULL 35/40] target-ppc: Split 44x tlbiva from ppc_tlb_invalidate_one()

2016-01-31 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 instruction

[Qemu-devel] [PULL 33/40] target-ppc: Use actual page size encodings from HPTE

2016-01-31 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 the

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

2016-01-31 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 avoi

Re: [Qemu-devel] [PATCH v3] blockjob: Fix hang in block_job_finish_sync

2016-01-31 Thread Fam Zheng
On Fri, 01/29 11:31, Stefan Hajnoczi wrote: > On Fri, Jan 29, 2016 at 10:19:49AM +0800, Fam Zheng wrote: > > @@ -402,6 +407,10 @@ typedef void BlockJobDeferToMainLoopFn(BlockJob *job, > > void *opaque); > > * AioContext acquired. Block jobs must call bdrv_unref(), bdrv_close(), > > and > > *

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

2016-01-31 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 2(8000:0100) AppleMacRiscPCI: b

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

2016-01-31 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 elements according to the target

[Qemu-devel] [PULL 37/40] target-ppc: Helper to determine page size information from hpte alone

2016-01-31 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 flexibl

[Qemu-devel] [PULL 29/40] target-ppc: Remove unused kvmppc_read_segment_page_sizes() stub

2016-01-31 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 cas

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

2016-01-31 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 Kurz Signed-off-by: David

[Qemu-devel] [PULL 39/40] target-ppc: Make every FPSCR_ macro have a corresponding FP_ macro

2016-01-31 Thread David Gibson
From: James Clarke Signed-off-by: James Clarke Signed-off-by: David Gibson --- 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 0820390..f300c86 100644 --- a/target-ppc/cpu.h +++ b/ta

[Qemu-devel] [PULL 30/40] target-ppc: Convert mmu-hash{32, 64}.[ch] from CPUPPCState to PowerPCCPU

2016-01-31 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] [PULL 13/40] pseries: Clean up error handling in spapr_validate_node_memory()

2016-01-31 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 Reviewed-by: Alexey Kardashevskiy Reviewed-by: Markus Armbrust

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

2016-01-31 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 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/target-ppc/tra

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

2016-01-31 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 e

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

2016-01-31 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 --- configure | 6 +++--- gdb-xml/power-vsx.xml | 44 +++

[Qemu-devel] [PULL 38/40] target-ppc: Allow more page sizes for POWER7 & POWER8 in TCG

2016-01-31 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 Acked-by: Benjamin Herrenschmidt

[Qemu-devel] [PULL 36/40] target-ppc: Add new TLB invalidate by HPTE call for hash64 MMUs

2016-01-31 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] [PULL 20/40] target-ppc: rename and export maybe_bswap_register()

2016-01-31 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 + target-ppc/gdbstub.c | 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff

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

2016-01-31 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 file changed, 4 insertions(+) diff --git a/target-ppc/translate_init.c b/target-p

[Qemu-devel] [PULL 34/40] target-ppc: Remove unused mmu models from ppc_tlb_invalidate_one

2016-01-31 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. C

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

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

[Qemu-devel] [PULL 31/40] target-ppc: Rework ppc_store_slb

2016-01-31 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

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

2016-01-31 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: Thomas Huth Reviewed-by: Alexe

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

2016-01-31 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 --- hw/misc/macio/cuda.c | 5 + 1 file

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

2016-01-31 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 the fp_state struct followin

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

2016-01-31 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 ca

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

2016-01-31 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 repo

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

2016-01-31 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 rt

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

2016-01-31 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 Reviewed-by: A

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

2016-01-31 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 Gibson --- hw/ppc/spapr.c | 9 - 1 file changed, 8

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

2016-01-31 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 Reviewed-by: Alexey

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

2016-01-31 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. Signed-o

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

2016-01-31 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 --- hw/misc/macio/cuda.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions

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

2016-01-31 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 aiocb for the current active DMA req

[Qemu-devel] [PULL 00/40] ppc-for-2.6 queue 20160201

2016-01-31 Thread David Gibson
The following changes since commit 0430891ce162b986c6e02a7729a942ecd2a32ca4: hw: Clean up includes (2016-01-29 15:07:25 +) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.6-20160201 for you to fetch changes up to d1277156b5d3df6d75d138a7eec6ff809

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

2016-01-31 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 1 file changed, 36 insertions(+), 4 deletions(-) diff

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

2016-01-31 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 --- hw/ide/macio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ide/macio.c b/hw/ide/m

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

2016-01-31 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 --- target-ppc/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/m

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

2016-01-31 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 --- hw/ppc/spapr_rtas.c| 17 +++

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

2016-01-31 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 chip. Signed-off-by: Benjamin

Re: [Qemu-devel] Migrating decrementer

2016-01-31 Thread David Gibson
On Tue, Jan 26, 2016 at 10:31:19PM +, Mark Cave-Ayland wrote: > On 25/01/16 11:10, David Gibson wrote: > > > Um.. so the migration duration is a complete red herring, regardless > > of the units. > > > > Remember, we only ever compute the guest timebase value at the moment > > the guest reque

Re: [Qemu-devel] [PATCH 3/3] ppc: include timebase in migration stream for g3beige/mac99 machines

2016-01-31 Thread David Gibson
On Sun, Jan 31, 2016 at 08:10:08PM +, Mark Cave-Ayland wrote: > On 31/01/16 19:58, Peter Maydell wrote: > > > On 31 January 2016 at 19:19, Mark Cave-Ayland > > wrote: > >> Signed-off-by: Mark Cave-Ayland > >> --- > >> hw/ppc/mac_newworld.c |4 > >> hw/ppc/mac_oldworld.c |4

Re: [Qemu-devel] [PATCH 2/3] ppc: add support for timebase migration on non-PPC hosts

2016-01-31 Thread David Gibson
On Sun, Jan 31, 2016 at 07:19:35PM +, Mark Cave-Ayland wrote: > This patch provides support for migration of the PPC guest timebase on non-PPC > host architectures (i.e those using QEMU's virtual emulated timebase). > > Signed-off-by: Mark Cave-Ayland We shouldn't need an explicit test for a

Re: [Qemu-devel] [PATCH 1/3] ppc: fix timebase adjustment during migration

2016-01-31 Thread David Gibson
On Sun, Jan 31, 2016 at 07:19:34PM +, Mark Cave-Ayland wrote: > ns_diff is already clamped to a minimum of 0 to prevent the timebase going > backwards during migration due to misaligned clocks. Following on from this > migration_duration_tb is also subject to the same constraint; hence the > ex

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

2016-01-31 Thread Wen Congyang
On 01/29/2016 06:47 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> On 01/29/2016 06:07 PM, Dr. David Alan Gilbert wrote: >>> * Wen Congyang (we...@cn.fujitsu.com) wrote: On 01/27/2016 07:03 PM, Dr. David Alan Gilbert wrote: > Hi, > I've got a bloc

Re: [Qemu-devel] [PATCH v14 7/8] Implement new driver for block replication

2016-01-31 Thread Wen Congyang
On 01/29/2016 11:46 PM, Stefan Hajnoczi wrote: > On Fri, Jan 29, 2016 at 11:13:42AM +0800, Changlong Xie wrote: >> On 01/28/2016 11:15 PM, Stefan Hajnoczi wrote: >>> On Thu, Jan 28, 2016 at 09:13:24AM +0800, Wen Congyang wrote: On 01/27/2016 10:46 PM, Stefan Hajnoczi wrote: > On Wed, Jan 1

Re: [Qemu-devel] [PATCH v2 0/3] qemu-nbd.texi formatting, grammar and completeness fixes

2016-01-31 Thread Paolo Bonzini
On 31/01/2016 14:25, Sitsofe Wheeler wrote: >> > Thanks, queued. Will send a pull request some time next week. > Just checking - did this one get lost? Nothing's popped up in the QEMU > git repos yet... Hmm, yes. Thanks for telling me. Paolo

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

2016-01-31 Thread James Clarke
> On 31 Jan 2016, at 23:50, David Gibson wrote: > On Fri, Jan 29, 2016 at 06:40:21PM +, James Clarke wrote: >> 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/deve

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

2016-01-31 Thread David Gibson
On Fri, Jan 29, 2016 at 06:40:21PM +, James Clarke wrote: > 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

Re: [Qemu-devel] [PULL 00/39] ppc-for-2.6 queue 20160129

2016-01-31 Thread David Gibson
On Sat, Jan 30, 2016 at 11:29:43PM +1100, David Gibson wrote: > On Fri, Jan 29, 2016 at 02:48:23PM +, Peter Maydell wrote: > > On 29 January 2016 at 05:06, David Gibson > > wrote: > > > The following changes since commit > > > 357e81c7e880f868833edf9f53cce1f3b09ea8ec: > > > > > > Merge rem

Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc

2016-01-31 Thread Paolo Bonzini
On 31/01/2016 18:54, Peter Maydell wrote: > On 31 January 2016 at 17:19, Paolo Bonzini wrote: >> On 31/01/2016 16:54, Mark Cave-Ayland wrote: >>> I also notice that with the above commit I lose cycling through history >>> in the GTK monitor - even with the multiple echo, instead of the up/down >

Re: [Qemu-devel] [PATCH 3/3] ppc: include timebase in migration stream for g3beige/mac99 machines

2016-01-31 Thread Mark Cave-Ayland
On 31/01/16 19:58, Peter Maydell wrote: > On 31 January 2016 at 19:19, Mark Cave-Ayland > wrote: >> Signed-off-by: Mark Cave-Ayland >> --- >> hw/ppc/mac_newworld.c |4 >> hw/ppc/mac_oldworld.c |4 >> 2 files changed, 8 insertions(+) >> >> diff --git a/hw/ppc/mac_newworld.c b/h

Re: [Qemu-devel] [PATCH 3/3] ppc: include timebase in migration stream for g3beige/mac99 machines

2016-01-31 Thread Peter Maydell
On 31 January 2016 at 19:19, Mark Cave-Ayland wrote: > Signed-off-by: Mark Cave-Ayland > --- > hw/ppc/mac_newworld.c |4 > hw/ppc/mac_oldworld.c |4 > 2 files changed, 8 insertions(+) > > diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c > index f95086b..3283f1d 100644

[Qemu-devel] [PATCH 1/3] ppc: fix timebase adjustment during migration

2016-01-31 Thread Mark Cave-Ayland
ns_diff is already clamped to a minimum of 0 to prevent the timebase going backwards during migration due to misaligned clocks. Following on from this migration_duration_tb is also subject to the same constraint; hence the expression MIN(0, migration_duration_tb) always evaluates to 0 and so no tim

[Qemu-devel] [PATCH 3/3] ppc: include timebase in migration stream for g3beige/mac99 machines

2016-01-31 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/ppc/mac_newworld.c |4 hw/ppc/mac_oldworld.c |4 2 files changed, 8 insertions(+) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index f95086b..3283f1d 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -179,6 +1

[Qemu-devel] [PATCH 0/3] ppc: add timebase migration support to Mac machines

2016-01-31 Thread Mark Cave-Ayland
This patchset allows migration of the PPC timebase for g3beige/mac99 machines under TCG on non-PPC hosts. The majority of the work is in patch 2: here the existing migration code is split into PPC and non-PPC host codepaths (where the previous behaviour is preserved). In effect, non-PPC hosts use

[Qemu-devel] [PATCH 2/3] ppc: add support for timebase migration on non-PPC hosts

2016-01-31 Thread Mark Cave-Ayland
This patch provides support for migration of the PPC guest timebase on non-PPC host architectures (i.e those using QEMU's virtual emulated timebase). Signed-off-by: Mark Cave-Ayland --- hw/ppc/ppc.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff

Re: [Qemu-devel] [RFC v2 0/10] Support Receive-Segment-Offload(RSC) for WHQL test of Window guest

2016-01-31 Thread Michael S. Tsirkin
On Mon, Feb 01, 2016 at 02:13:19AM +0800, w...@redhat.com wrote: > From: Wei Xu > > Patch v2 add detailed commit log. > > This patch is to support WHQL test for Windows guest, while this feature also > benifits other guest works as a kernel 'gro' like feature with userspace > implementation. >

Re: [Qemu-devel] [RFC Patch v2 03/10] virtio-net rsc: Chain Lookup, Packet Caching and Framework of IPv4

2016-01-31 Thread Michael S. Tsirkin
On Mon, Feb 01, 2016 at 02:13:22AM +0800, w...@redhat.com wrote: > From: Wei Xu > > Upon a packet is arriving, a corresponding chain will be selected or created, > or be bypassed if it's not an IPv4 packets. > > The callback in the chain will be invoked to call the real coalescing. > > Since th

Re: [Qemu-devel] [RFC Patch v2 02/10] virtio-net rsc: Initilize & Cleanup

2016-01-31 Thread Michael S. Tsirkin
On Mon, Feb 01, 2016 at 02:13:21AM +0800, w...@redhat.com wrote: > From: Wei Xu > > The chain list is initialized when the device is getting realized, > and the entry of the chain will be inserted dynamically according > to protocol type of the network traffic. > > All the buffered packets and c

[Qemu-devel] [RFC Patch v2 10/10] virtio-net rsc: Add Receive Segment Coalesce statistics

2016-01-31 Thread wexu
From: Wei Xu Add statistics to log what happened during the process. Signed-off-by: Wei Xu --- hw/net/virtio-net.c| 49 +++--- include/hw/virtio/virtio.h | 33 +++ 2 files changed, 79 insertions(+), 3 deletions(-) dif

[Qemu-devel] [RFC Patch v2 08/10] virtio-net rsc: Sanity check & More bypass cases check

2016-01-31 Thread wexu
From: Wei Xu More general exception cases check 1. Incorrect version in IP header 2. IP options & IP fragment 3. Not a TCP packets 4. Sanity size check to prevent buffer overflow attack. Signed-off-by: Wei Xu --- hw/net/virtio-net.c | 44 1 file cha

[Qemu-devel] [RFC Patch v2 07/10] virtio-net rsc: Checking TCP flag and drain specific connection packets

2016-01-31 Thread wexu
From: Wei Xu Normally it includes 2 typical way to handle a TCP control flag, bypass and finalize, bypass means should be sent out directly, and finalize means the packets should also be bypassed, and this should be done after searching for the same connection packets in the pool and sending all

[Qemu-devel] [RFC Patch v2 05/10] virtio-net rsc: Create timer to drain the packets from the cache pool

2016-01-31 Thread wexu
From: Wei Xu The timer will only be triggered if the packets pool is not empty, and it'll drain off all the cached packets, this is to reduce the delay to upper layer protocol stack. Signed-off-by: Wei Xu --- hw/net/virtio-net.c | 38 ++ 1 file changed, 38 i

  1   2   >