[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 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 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

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

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 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 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] [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 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] [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] [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] [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 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 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

[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 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

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] [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] [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] [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 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 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

[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

[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 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 +

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

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 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] [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] [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 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] [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

[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] [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

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

[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

<    1   2