Re: [Qemu-devel] [Qemu-ppc] [PATCH] MAINTAINERS: Add David Gibson as ppc maintainer

2016-05-25 Thread Mark Cave-Ayland
On 26/05/16 07:16, David Gibson wrote: > I've been de facto co-maintainer of all ppc target related code for some > time. Alex Graf isworking on other things and doesn't have a whole lot of > time for qemu ppc maintainership. So, update the MAINTAINERS file to > reflect this. > > Signed-off-by:

Re: [Qemu-devel] [for-2.7 PATCH v3 00/15] Core based CPU hotplug for PowerPC sPAPR

2016-05-25 Thread David Gibson
On Thu, May 12, 2016 at 09:18:10AM +0530, Bharata B Rao wrote: > Hi, > > This is v3 of "Core based CPU hotplug for PowerPC sPAPR". The hotplug > semantics looks like this: > > (qemu) device_add POWER8E-spapr-cpu-core,id=core2,core=16[,threads=4] > (qemu) device_add POWER8E_v2.1-spapr-cpu-core,id=

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add David Gibson as ppc maintainer

2016-05-25 Thread David Gibson
On Thu, May 26, 2016 at 08:18:26AM +0200, Alexander Graf wrote: > > > > Am 26.05.2016 um 08:16 schrieb David Gibson : > > > > I've been de facto co-maintainer of all ppc target related code for some > > time. Alex Graf isworking on other things and doesn't have a whole lot of > > time for qemu

[Qemu-devel] [PATCH 1/2] raw-posix: Fetch max sectors for host block device from sysfs

2016-05-25 Thread Fam Zheng
This is sometimes a useful value we should count in. Signed-off-by: Fam Zheng --- block/raw-posix.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index a4f5a1b..d3796ad 100644 --- a/block/raw-posix.c +++

Re: [Qemu-devel] [PATCH v6 for-2.7 00/28] Convert migration to QIOChannel & support

2016-05-25 Thread Amit Shah
On (Wed) 27 Apr 2016 [11:04:50], Daniel P. Berrange wrote: > This is an update of patches that were previously posted > > FYI: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg00829.html >v1: https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg01914.html >v2: https://lists.g

Re: [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-25 Thread Fam Zheng
On Tue, 05/24 16:30, Peter Lieven wrote: > in a read-modify-write cycle a small request might cause > head and tail to fall into the same aligned block. Currently > QEMU reads the same block twice in this case which is > not necessary. > > Signed-off-by: Peter Lieven Thanks, applied to my block

[Qemu-devel] [PATCH 0/2] block: Expose host block dev I/O size limit in scsi-block/scsi-generic

2016-05-25 Thread Fam Zheng
Host devices passed through as scsi-block or scsi-generic may have a compound maximum I/O limit (out of physical hardware limit, driver quirks and file system configuration, etc) that is presented in the sysfs entry. SG_IOs we issue should respect this. However the value is currently not discoverab

[Qemu-devel] [PATCH 2/2] scsi-generic: Merge block max xfer len in INQUIRY response

2016-05-25 Thread Fam Zheng
The rationale is similar to the above mode sense response interception: this is practically the only channel to communicate restraints from elsewhere such as host and block driver. The scsi bus we attach onto can have a larger max xfer len than what is accepted by the host file system (guarding be

[Qemu-devel] [PULL 25/28] migration: define 'tls-creds' and 'tls-hostname' migration parameters

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Define two new migration parameters to be used with TLS encryption. The 'tls-creds' parameter provides the ID of an instance of the 'tls-creds' object type, or rather a subclass such as 'tls-creds-x509'. Providing these credentials will enable use of TLS on the migratio

[Qemu-devel] [PATCH] MAINTAINERS: Add David Gibson as ppc maintainer

2016-05-25 Thread David Gibson
I've been de facto co-maintainer of all ppc target related code for some time. Alex Graf isworking on other things and doesn't have a whole lot of time for qemu ppc maintainership. So, update the MAINTAINERS file to reflect this. Signed-off-by: David Gibson --- MAINTAINERS | 1 + 1 file change

[Qemu-devel] [PULL 21/28] migration: delete QEMUFile sockets implementation

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Now that the tcp, unix and fd migration backends have converted to use the QIOChannel based QEMUFile, there is no user remaining for the sockets based QEMUFile impl and it can be deleted. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Message-I

[Qemu-devel] [PULL 26/28] migration: add support for encrypting data with TLS

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" This extends the migration_set_incoming_channel and migration_set_outgoing_channel methods so that they will automatically wrap the QIOChannel in a QIOChannelTLS instance if TLS credentials are configured in the migration parameters. This allows TLS to work for tcp, un

[Qemu-devel] [PULL 28/28] migration: remove qemu_get_fd method from QEMUFile

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Now that there is a set_blocking callback in QEMUFileOps, and all users needing non-blocking support have been converted to QIOChannel, there is no longer any codepath requiring the qemu_get_fd() method for QEMUFile. Remove it to avoid further code being introduced with

[Qemu-devel] [PULL 18/28] migration: convert savevm to use QIOChannel for writing to files

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Convert the exec savevm code to use QIOChannel and QEMUFileChannel, instead of the stdio APIs. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Message-Id: <1461751518-12128-19-git-send-email-berra...@redhat.com> Signed-off-by: Amit Shah --- mi

[Qemu-devel] [PULL 22/28] migration: delete QEMUFile stdio implementation

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Now that the exec migration backend and savevm have converted to use the QIOChannel based QEMUFile, there is no user remaining for the stdio based QEMUFile impl and it can be deleted. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Message-Id: <

[Qemu-devel] [PULL 27/28] migration: remove support for non-iovec based write handlers

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" All the remaining QEMUFile implementations provide an iovec based write handler, so the put_buffer callback can be removed to simplify the code. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Message-Id: <1461751518-12128-28-git-send-email-berr

[Qemu-devel] [PULL 19/28] migration: delete QEMUFile buffer implementation

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" The qemu_bufopen() method is no longer used, so the memory buffer based QEMUFile backend can be deleted entirely. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Message-Id: <1461751518-12128-20-git-send-email-berra...@redhat.com> Signed-off-by:

[Qemu-devel] [PULL 12/28] migration: convert unix socket protocol to use QIOChannel

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Convert the unix socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built, since the socket impl of QIOChannel will report a suitable error on platforms where UNIX sockets are unavailable. Re

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add David Gibson as ppc maintainer

2016-05-25 Thread Alexander Graf
> Am 26.05.2016 um 08:16 schrieb David Gibson : > > I've been de facto co-maintainer of all ppc target related code for some > time. Alex Graf isworking on other things and doesn't have a whole lot of > time for qemu ppc maintainership. So, update the MAINTAINERS file to > reflect this. > > S

[Qemu-devel] [PULL 23/28] migration: move definition of struct QEMUFile back into qemu-file.c

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Now that the memory buffer based QEMUFile impl is gone, there is no need for any backend to be accessing internals of the QEMUFile struct, so it can be moved back into qemu-file.c Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Message-Id: <1461

[Qemu-devel] [PULL 20/28] migration: delete QEMUSizedBuffer struct

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Now that we don't have have a buffer based QemuFile implementation, the QEMUSizedBuffer code is also unused and can be deleted. A simpler buffer class also exists in util/buffer.c which other code can used as needed. Reviewed-by: Dr. David Alan Gilbert Signed-off-by:

[Qemu-devel] [PULL 08/28] migration: introduce a new QEMUFile impl based on QIOChannel

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Introduce a new QEMUFile implementation that is based on the QIOChannel objects. This impl is different from existing impls in that there is no file descriptor that can be made available, as some channels may be based on higher level protocols such as TLS. Although the

[Qemu-devel] [PULL 17/28] migration: convert RDMA to use QIOChannel interface

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" This converts the RDMA code to provide a subclass of QIOChannel that uses RDMA for the data transport. This implementation of RDMA does not correctly handle non-blocking mode. Reads might block if there was not already some pending data and writes will block until all

[Qemu-devel] [PULL 24/28] migration: don't use an array for storing migrate parameters

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" The MigrateState struct uses an array for storing migration parameters. This presumes that all future parameters will be integers too, which is not going to be the case. There is no functional reason why an array is used, if anything it makes the code less clear. The QA

[Qemu-devel] [PULL 14/28] migration: convert tcp socket protocol to use QIOChannel

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Drop the current TCP socket migration driver and extend the new generic socket driver to cope with the TCP address format Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Message-Id: <1461751518-12128-15-git-send-email-berra...@redhat.com> Signed

[Qemu-devel] [PULL 06/28] migration: introduce set_blocking function in QEMUFileOps

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Remove the assumption that every QEMUFile implementation has a file descriptor available by introducing a new function in QEMUFileOps to change the blocking state of a QEMUFile. If not set, it will fallback to the original code using the get_fd method. Reviewed-by: Dr

[Qemu-devel] [PULL 16/28] migration: convert exec socket protocol to use QIOChannel

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Convert the exec socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of the stdio popen APIs. It can be unconditionally built because the QIOChannelCommand class can report suitable error messages on platforms which can't fork processes. Rev

[Qemu-devel] [PULL 15/28] migration: convert fd socket protocol to use QIOChannel

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Convert the fd socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built because the QIOChannel APIs it uses will take care to report suitable error messages if needed. Reviewed-by: Dr. David

[Qemu-devel] [PULL 07/28] migration: force QEMUFile to blocking mode for outgoing migration

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Instead of relying on the default QEMUFile I/O blocking flag state, explicitly turn on blocking I/O for outgoing migration since it takes place in a background thread. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Reviewed-by: Juan Quintela M

[Qemu-devel] [PULL 10/28] migration: add reporting of errors for outgoing migration

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Currently if an application initiates an outgoing migration, it may or may not, get an error reported back on failure. If the error occurs synchronously to the 'migrate' command execution, the client app will see the error message. This is the case for DNS lookup failur

[Qemu-devel] [PULL 13/28] migration: rename unix.c to socket.c

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" The unix.c file will be nearly the same as the tcp.c file, only differing in the initial SocketAddress creation code. Rename unix.c to socket.c and refactor it a little to prepare for merging the TCP code. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. B

[Qemu-devel] [PULL 11/28] migration: convert post-copy to use QIOChannelBuffer

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" The post-copy code does some I/O to/from an intermediate in-memory buffer rather than direct to the underlying I/O channel. Switch this code to use QIOChannelBuffer instead of QEMUSizedBuffer. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange Mess

[Qemu-devel] [PULL 01/28] s390: use FILE instead of QEMUFile for creating text file

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" The s390 skeys monitor command needs to write out a plain text file. Currently it is using the QEMUFile class for this, but work is ongoing to refactor QEMUFile and eliminate much code related to it. The only feature qemu_fopen() gives over fopen() is support for QEMU F

[Qemu-devel] [PULL 09/28] migration: add helpers for creating QEMUFile from a QIOChannel

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Currently creating a QEMUFile instance from a QIOChannel is quite simple only requiring a single call to qemu_fopen_channel_input or qemu_fopen_channel_output depending on the end of migration connection. When QEMU gains TLS support, however, there will need to be a T

[Qemu-devel] [PULL 04/28] migration: ensure qemu_fflush() always writes full data amount

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" The QEMUFile writev_buffer / put_buffer functions are expected to write out the full set of requested data, blocking until complete. The qemu_fflush() caller does not expect to deal with partial writes. Clarify the function comments and add a sanity check to the code to

[Qemu-devel] [PULL 00/28] migration: support for TLS

2016-05-25 Thread Amit Shah
The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100) are available in the git repository at: https://git.kernel.org/pub/scm/virt/qemu/amit/migration.git ta

[Qemu-devel] [PULL 02/28] io: avoid double-free when closing QIOChannelBuffer

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" The QIOChannelBuffer's close implementation will free the internal data buffer. It failed to reset the pointer to NULL though, so when the object is later finalized it will free it a second time with predictable crash. Reviewed-by: Dr. David Alan Gilbert Signed-off-by

[Qemu-devel] [PULL 03/28] migration: remove use of qemu_bufopen from vmstate tests

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" Some of the test-vmstate.c test cases use a temporary file while others use a memory buffer. To facilitate the future removal of the qemu_bufopen() function, convert all the tests to use a temporary file. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Be

[Qemu-devel] [PULL 05/28] migration: split migration hooks out of QEMUFileOps

2016-05-25 Thread Amit Shah
From: "Daniel P. Berrange" The QEMUFileOps struct contains the I/O subsystem callbacks and the migration stage hooks. Split the hooks out into a separate QEMUFileHooks struct to make it easier to refactor the I/O side of QEMUFile without affecting the hooks. Reviewed-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH qemu v16 14/19] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2)

2016-05-25 Thread David Gibson
On Mon, May 16, 2016 at 02:20:33PM -0600, Alex Williamson wrote: > On Mon, 16 May 2016 11:10:05 +1000 > Alexey Kardashevskiy wrote: > > > On 05/14/2016 08:25 AM, Alex Williamson wrote: > > > On Wed, 4 May 2016 16:52:26 +1000 > > > Alexey Kardashevskiy wrote: > > > > > >> This makes use of the

[Qemu-devel] inconsistent handling of "qemu64" CPU model

2016-05-25 Thread Chris Friesen
Hi, I'm not sure where the problem lies, hence the CC to both lists. Please copy me on the reply. I'm playing with OpenStack's devstack environment on an Ubuntu 14.04 host with a Celeron 2961Y CPU. (libvirt detects it as a Nehalem with a bunch of extra features.) Qemu gives version 2.2.0

Re: [Qemu-devel] [PATCH qemu v16 09/19] spapr_iommu: Finish renaming vfio_accel to need_vfio

2016-05-25 Thread David Gibson
On Wed, May 04, 2016 at 04:52:21PM +1000, Alexey Kardashevskiy wrote: > 6a81dd17 "spapr_iommu: Rename vfio_accel parameter" renamed vfio_accel > flag everywhere but one spot was missed. > > Signed-off-by: Alexey Kardashevskiy > Reviewed-by: David Gibson Applied to ppc-for-2.7. > --- > target

Re: [Qemu-devel] [PATCH qemu v16 07/19] spapr_iommu: Move table allocation to helpers

2016-05-25 Thread David Gibson
On Wed, May 04, 2016 at 04:52:19PM +1000, Alexey Kardashevskiy wrote: > At the moment presence of vfio-pci devices on a bus affect the way > the guest view table is allocated. If there is no vfio-pci on a PHB > and the host kernel supports KVM acceleration of H_PUT_TCE, a table > is allocated in KV

Re: [Qemu-devel] [PATCH qemu v16 08/19] spapr_iommu: Introduce "enabled" state for TCE table

2016-05-25 Thread David Gibson
On Wed, May 04, 2016 at 04:52:20PM +1000, Alexey Kardashevskiy wrote: > Currently TCE tables are created once at start and their sizes never > change. We are going to change that by introducing a Dynamic DMA windows > support where DMA configuration may change during the guest execution. > > This

Re: [Qemu-devel] [PATCH qemu v16 06/19] spapr_pci: Use correct DMA LIOBN when composing the device tree

2016-05-25 Thread David Gibson
On Wed, May 04, 2016 at 04:52:18PM +1000, Alexey Kardashevskiy wrote: > The user could have picked LIOBN via the CLI but the device tree > rendering code would still use the value derived from the PHB index > (which is the default fallback if LIOBN is not set in the CLI). > > This replaces SPAPR_P

Re: [Qemu-devel] [PATCH qemu v16 10/19] spapr_iommu: Migrate full state

2016-05-25 Thread David Gibson
On Wed, May 04, 2016 at 04:52:22PM +1000, Alexey Kardashevskiy wrote: > The source guest could have reallocated the default TCE table and > migrate bigger/smaller table. This adds reallocation in post_load() > if the default table size is different on source and destination. > > This adds @bus_off

[Qemu-devel] [PATCH v3 0/5] qcow2_co_write_zeroes and related improvements

2016-05-25 Thread Eric Blake
This series improves write_zeroes for qcow2 Since the work conflicts with my proposed patches to switch write_zeroes to a byte-base interface, I figured I'd fix the bugs and get this part nailed first, then rebase my other work on top, rather than making Denis have to do the dirty work. Changes f

[Qemu-devel] [PATCH v3 3/5] qcow2: add tracepoints for qcow2_co_write_zeroes

2016-05-25 Thread Eric Blake
From: "Denis V. Lunev" This patch follows guidelines of all other tracepoints in qcow2, like ones in qcow2_co_writev. I think that they should dump values in the same quantities or be changed all together. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Kevin Wolf Message-Id: <1463476543-308

[Qemu-devel] [PATCH v3 5/5] qcow2: Catch more unaligned write_zero into zero cluster

2016-05-25 Thread Eric Blake
is_zero_cluster() and is_zero_cluster_top_locked() are used only by qcow2_co_write_zeroes(). The former is too broad (we don't care if the sectors we are about to overwrite are non-zero, only that all other sectors in the cluster are zero), so it needs to be called up to twice but with smaller lim

[Qemu-devel] [PATCH v3 1/5] block: split write_zeroes always

2016-05-25 Thread Eric Blake
From: "Denis V. Lunev" We should split requests even if they are less than write_zeroes_alignment. For example we can have the following request: offset 62k size 4k write_zeroes_alignment 64k The original code sent 1 request covering 2 qcow2 clusters, and resulted in both clusters being a

[Qemu-devel] [PATCH v3 4/5] qemu-iotests: Test one more spot for optimizing write_zeroes

2016-05-25 Thread Eric Blake
Add another test to 154, showing that we currently allocate a data cluster in the top layer if any sector of the backing file was allocated. The next patch will optimize this case. Signed-off-by: Eric Blake --- tests/qemu-iotests/154 | 40 tests/qemu

[Qemu-devel] [PATCH v3 2/5] qcow2: simplify logic in qcow2_co_write_zeroes

2016-05-25 Thread Eric Blake
From: "Denis V. Lunev" Unaligned requests will occupy only one cluster. This is true since the previous commit. Simplify the code taking this consideration into account. In other words, the caller is now buggy if it ever passes us an unaligned request that crosses cluster boundaries (the only re

[Qemu-devel] [PULL V3 20/20] net/net: Add SocketReadState for reuse codes

2016-05-25 Thread Jason Wang
From: Zhang Chen This function is from net/socket.c, move it to net.c and net.h. Add SocketReadState to make others reuse net_fill_rstate(). suggestion from jason. v4: - move 'rs->finalize = finalize' to rs_init() v3: - remove SocketReadState init callback - put finalize callback to net_fill

[Qemu-devel] [PULL V3 16/20] e1000: Move out code that will be reused in e1000e

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Code that will be shared moved to a separate files. Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- MAINTAINERS| 5 + hw/net/Makefile.objs | 2 +- hw/net/e1000.c | 411 ++

[Qemu-devel] [PULL V3 15/20] e1000_regs: Add definitions for Intel 82574-specific bits

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- hw/net/e1000_regs.h | 345 +++- 1 file changed, 342 insertions(+), 3 deletions(-) diff --git a/hw/ne

[Qemu-devel] [PULL V3 14/20] vmxnet3: Use pci_dma_* API instead of cpu_physical_memory_*

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman To make this device and network packets abstractions ready for IOMMU. Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- hw/net/net_tx_pkt.c | 16 +++- hw/net/net_tx_pkt.h | 5 +++-- hw/

[Qemu-devel] [PULL V3 13/20] net_pkt: Extend packet abstraction as required by e1000e functionality

2016-05-25 Thread Jason Wang
This patch extends the TX/RX packet abstractions with features that will be used by the e1000e device implementation. Changes are: 1. Support iovec lists for RX buffers 2. Deeper RX packets parsing 3. Loopback option for TX packets 4. Extended VLAN headers handling 5. RSS processing for

[Qemu-devel] [PULL V3 18/20] e1000e: Introduce qtest for e1000e device

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- tests/Makefile | 3 + tests/e1000e-test.c | 480 2 files changed, 483 insertions(+) crea

[Qemu-devel] [PULL V3 19/20] net: vl: Move default_net to vl.c

2016-05-25 Thread Jason Wang
From: Eduardo Habkost All handling of defaults (default_* variables) is inside vl.c, move default_net there too, so we can more easily refactor that code later. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost Signed-off-by: Jason Wang --- include/net/net.h | 1 - net/net.c

[Qemu-devel] [PULL V3 10/20] vmxnet3: Use common MAC address tracing macros

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 8 hw/net/vmxnet_debug.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/net/vmxnet3.c b/

[Qemu-devel] [PULL V3 11/20] net_pkt: Name vmxnet3 packet abstractions more generic

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman This patch drops "vmx" prefix from packet abstractions names to emphasize the fact they are generic and not tied to any specific network device. These abstractions will be reused by e1000e emulation implementation introduced by following patches so their names need generali

[Qemu-devel] [PULL V3 09/20] net: Add macros for MAC address tracing

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman These macros will be used by future commits introducing e1000e device emulation and by vmxnet3 tracing code. Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- include/net/net.h | 5 + 1 file cha

[Qemu-devel] [PULL V3 08/20] net: Introduce Toeplitz hash calculator

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- include/net/checksum.h | 45 + 1 file changed, 45 insertions(+) diff --git a/include/net/checksum.h b/in

[Qemu-devel] [PULL V3 05/20] pcie: Add support for PCIe CAP v1

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Added support for PCIe CAP v1, while reusing some of the existing v2 infrastructure. Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- hw/pci/pcie.c | 84 +++

[Qemu-devel] [PULL V3 07/20] vmxnet3: Use generic function for DSN capability definition

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 20f26b7..

[Qemu-devel] [PULL V3 06/20] pcie: Introduce function for DSN capability creation

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- hw/pci/pcie.c | 10 ++ include/hw/pci/pcie.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c in

[Qemu-devel] [PULL V3 03/20] msix: make msix_clr_pending() visible for clients

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman This function will be used by e1000e device code. Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- hw/pci/msix.c | 2 +- include/hw/pci/msix.h | 1 + 2 files changed, 2 insertions(+), 1 del

[Qemu-devel] [PULL V3 12/20] rtl8139: Move more TCP definitions to common header

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- hw/net/rtl8139.c | 5 - include/net/eth.h | 8 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net

[Qemu-devel] [PULL V3 04/20] pci: Introduce define for PM capability version 1.1

2016-05-25 Thread Jason Wang
From: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- include/hw/pci/pci_regs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/pci/pci_regs.h b/include/hw/pci/pci_regs.h index ba8cbe9..

[Qemu-devel] [PULL V3 01/20] net/tap: Allocating Large sized arrays to heap

2016-05-25 Thread Jason Wang
From: Zhou Jie net_init_tap has a huge stack usage of 8192 bytes approx. Moving large arrays to heap to reduce stack usage. Signed-off-by: Zhou Jie Signed-off-by: Jason Wang --- net/tap.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/tap.c b/net/tap.c index 740

[Qemu-devel] [PULL V3 00/20] Net patches

2016-05-25 Thread Jason Wang
The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for

[Qemu-devel] [PULL V3 02/20] net: mipsnet: check packet length against buffer

2016-05-25 Thread Jason Wang
From: Prasad J Pandit When receiving packets over MIPSnet network device, it uses receive buffer of size 1514 bytes. In case the controller accepts large(MTU) packets, it could lead to memory corruption. Add check to avoid it. Reported by: Oleksandr Bazhaniuk Signed-off-by: Prasad J Pandit Sig

Re: [Qemu-devel] [PATCH qemu v16 05/19] vfio: Check that IOMMU MR translates to system address space

2016-05-25 Thread David Gibson
On Wed, May 04, 2016 at 04:52:17PM +1000, Alexey Kardashevskiy wrote: > At the moment IOMMU MR only translate to the system memory. > However if some new code changes this, we will need clear indication why > it is not working so here is the check. > > Signed-off-by: Alexey Kardashevskiy > Review

Re: [Qemu-devel] [PATCH qemu v16 03/19] memory: Fix IOMMU replay base address

2016-05-25 Thread David Gibson
On Wed, May 04, 2016 at 04:52:15PM +1000, Alexey Kardashevskiy wrote: > Since a788f227 "memory: Allow replay of IOMMU mapping notifications" > when new VFIO listener is added, all existing IOMMU mappings are > replayed. However there is a problem that the base address of > an IOMMU memory region (I

Re: [Qemu-devel] [PATCH qemu v16 02/19] memory: Call region_del() callbacks on memory listener unregistering

2016-05-25 Thread David Gibson
On Thu, May 05, 2016 at 04:45:04PM -0600, Alex Williamson wrote: > On Wed, 4 May 2016 16:52:14 +1000 > Alexey Kardashevskiy wrote: > > > When a new memory listener is registered, listener_add_address_space() > > is called and which in turn calls region_add() callbacks of memory regions. > > Howe

Re: [Qemu-devel] [PATCH qemu v16 01/19] vfio: Delay DMA address space listener release

2016-05-25 Thread David Gibson
On Wed, May 25, 2016 at 07:59:26AM -0600, Alex Williamson wrote: > On Wed, 25 May 2016 16:34:37 +1000 > David Gibson wrote: > > > On Fri, May 13, 2016 at 04:24:53PM -0600, Alex Williamson wrote: > > > On Fri, 13 May 2016 17:16:48 +1000 > > > Alexey Kardashevskiy wrote: > > > > > > > On 05/06/

Re: [Qemu-devel] [PATCH v4 00/15] Dirty bitmap changes for migration/persistence work

2016-05-25 Thread Fam Zheng
On Wed, 05/25 17:45, Vladimir Sementsov-Ogievskiy wrote: > Hi! > > Are you going to update the series in the near future? Yes, probably in a couple days. Fam > > On 08.03.2016 07:44, Fam Zheng wrote: > > v4: Rebase. > > Add rev-by from John in patches 1-5, 7, 8. > > Remove BdrvDirtyB

Re: [Qemu-devel] [RFC PATCH v4 1/3] Mediated device Core driver

2016-05-25 Thread Alex Williamson
On Wed, 25 May 2016 01:28:15 +0530 Kirti Wankhede wrote: > Design for Mediated Device Driver: > Main purpose of this driver is to provide a common interface for mediated > device management that can be used by differnt drivers of different > devices. > > This module provides a generic interface

[Qemu-devel] [PULL 0/1] QOM devices patch queue 2016-05-25

2016-05-25 Thread Andreas Färber
Hello Peter, This is my QOM (devices) patch queue. Please pull. I've needed to build-fix it twice by now, so if I fixed the #includes wrongly please pick it up as patch and tweak it or apply a cleanup on top. Thanks, Andreas P.S. I don't seem to have a MAINTAINERS patch to go with it yet, but p

[Qemu-devel] [PULL 1/1] qdev: Start disentangling bus from device

2016-05-25 Thread Andreas Färber
Move bus type and related APIs to a separate file bus.c. This is a first step in breaking up qdev.c into more manageable chunks. Reviewed-by: Peter Maydell [AF: Rebased onto osdep.h] Signed-off-by: Andreas Färber --- hw/core/Makefile.objs | 1 + hw/core/bus.c | 251 +++

[Qemu-devel] [PATCH v1 1/1] zynqmp: Add the ZCU102 board

2016-05-25 Thread Alistair Francis
Most Zynq UltraScale+ users will be targetting and using the ZCU102 board instead of the development focused EP108. To make our QEMU machine names clearer add a ZCU102 machine model. Signed-off-by: Alistair Francis --- There are differences between the two boards, but at the moment we don't suppo

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Jianjun Duan
On 05/25/2016 12:22 PM, Paolo Bonzini wrote: >> 1 QTAILQ should only be accessed using the interfaces defined in >> queue.h. Its structs should not be directly used. So I created >> interfaces in queue.h to query about its layout. If the implementation >> is changed, these interfaces should be ch

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Pranith Kumar
Hi Richard, Thank you for the helpful comments. On Wed, May 25, 2016 at 1:35 PM, Richard Henderson wrote: > On 05/24/2016 10:18 AM, Pranith Kumar wrote: >> diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h >> index 92be341..93ea42e 100644 >> --- a/tcg/i386/tcg-target.h >> +++ b/tcg/i386

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Sergey Fedorov
On 25/05/16 22:59, Pranith Kumar wrote: > On Wed, May 25, 2016 at 3:43 PM, Sergey Fedorov wrote: >> I think it would better not to defer native support for the operation. >> It should be relatively simple instruction. Otherwise we could wind up >> deferring this indefinitely. >> > Agreed. I will g

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Pranith Kumar
On Wed, May 25, 2016 at 3:43 PM, Sergey Fedorov wrote: > > I think it would better not to defer native support for the operation. > It should be relatively simple instruction. Otherwise we could wind up > deferring this indefinitely. > Agreed. I will go with the native generation for now. Thanks

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Pranith Kumar
On Wed, May 25, 2016 at 3:25 PM, Alex Bennée wrote: > Should we make the emitting of the function call/TCGop conditional on > MTTCG being enabled? If we are running in round-robin mode there is no > need to issue any fence operations. > Also, we should check if SMP(> 1 processors) is enabled sinc

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Richard Henderson
On 05/25/2016 12:25 PM, Alex Bennée wrote: That would solves the problem of converting the various backends piecemeal - although obviously we should move to all backends having "native" support ASAP. However by introducing expensive substitute functions we will slow down the translations as each

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Sergey Fedorov
On 25/05/16 22:25, Alex Bennée wrote: > Richard Henderson writes: >> On 05/24/2016 10:18 AM, Pranith Kumar wrote: >>> Signed-off-by: Pranith Kumar >>> --- >>> tcg/i386/tcg-target.h | 1 + >>> tcg/i386/tcg-target.inc.c | 9 + >>> tcg/tcg-opc.h | 2 +- >>> tcg/tcg.c

Re: [Qemu-devel] [RFC PATCH 2/3] tcg: Add support for fence generation in x86 backend

2016-05-25 Thread Alex Bennée
Richard Henderson writes: > On 05/24/2016 10:18 AM, Pranith Kumar wrote: >> Signed-off-by: Pranith Kumar >> --- >> tcg/i386/tcg-target.h | 1 + >> tcg/i386/tcg-target.inc.c | 9 + >> tcg/tcg-opc.h | 2 +- >> tcg/tcg.c | 1 + >> 4 files changed, 12 insert

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Paolo Bonzini
> 1 QTAILQ should only be accessed using the interfaces defined in > queue.h. Its structs should not be directly used. So I created > interfaces in queue.h to query about its layout. If the implementation > is changed, these interfaces should be changed accordingly. Code using > these interfaces sh

[Qemu-devel] [PATCH v7 2/3] generic-loader: Add a generic loader

2016-05-25 Thread Alistair Francis
Add a generic loader to QEMU which can be used to load images or set memory values. Signed-off-by: Alistair Francis --- V7: - Rebase V6: - Add error checking V5: - Rebase V4: - Allow the loader to work with every architecture - Move the file to hw/core - Increase the maximum number of CPUs

[Qemu-devel] [PATCH v7 0/3] Add a generic loader

2016-05-25 Thread Alistair Francis
This work is based on the original work by Li Guang with extra features added by Peter C and myself. The idea of this loader is to allow the user to load multiple images or values into QEMU at startup. Memory values can be loaded like this: -device loader,addr=0xfd1a0104,data=0x800e,data-len

[Qemu-devel] [PATCH v7 3/3] docs: Add a generic loader explanation document

2016-05-25 Thread Alistair Francis
Signed-off-by: Alistair Francis --- V6: - Fixup documentation V4: - Re-write to be more comprehensive docs/generic-loader.txt | 54 + 1 file changed, 54 insertions(+) create mode 100644 docs/generic-loader.txt diff --git a/docs/generic-loader.t

[Qemu-devel] [PATCH v7 1/3] loader: Allow ELF loader to auto-detect the ELF arch

2016-05-25 Thread Alistair Francis
If the caller didn't specify an architecture for the ELF machine the load_elf() function will auto detect it based on the ELF file. Signed-off-by: Alistair Francis --- V7: - Fix typo hw/core/loader.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/core/loader.c b/hw/core/loa

Re: [Qemu-devel] [PATCH 1/5] block: split write_zeroes always

2016-05-25 Thread Eric Blake
On 05/17/2016 10:34 AM, Kevin Wolf wrote: > Am 17.05.2016 um 11:15 hat Denis V. Lunev geschrieben: >> We should split requests even if they are less than write_zeroes_alignment. >> For example we can have the following request: >> offset 62k >> size 4k >> write_zeroes_alignment 64k >> The o

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Jianjun Duan
I will try to explain my design rationale in details here. 1 QTAILQ should only be accessed using the interfaces defined in queue.h. Its structs should not be directly used. So I created interfaces in queue.h to query about its layout. If the implementation is changed, these interfaces should be

Re: [Qemu-devel] [RFC v2 03/11] docs: new design document multi-thread-tcg.txt (DRAFTING)

2016-05-25 Thread Sergey Fedorov
On 25/05/16 21:03, Paolo Bonzini wrote: >> The page table seems to be protected by 'mmap_lock' in user mode >> emulation but by 'tb_lock' in system mode emulation. It may turn to be >> possible to read it safely even with no lock held. > Yes, it is possible to at least follow the radix tree safely

Re: [Qemu-devel] [RFC v2 03/11] docs: new design document multi-thread-tcg.txt (DRAFTING)

2016-05-25 Thread Paolo Bonzini
> The page table seems to be protected by 'mmap_lock' in user mode > emulation but by 'tb_lock' in system mode emulation. It may turn to be > possible to read it safely even with no lock held. Yes, it is possible to at least follow the radix tree safely with no lock held. The fields in the leaves

Re: [Qemu-devel] [QEMU RFC PATCH v2 4/6] Migration: migrate QTAILQ

2016-05-25 Thread Paolo Bonzini
> >> +/* > >> + * Following 3 fields are for VMStateField which needs customized > >> handling, > >> + * such as QTAILQ in qemu/queue.h, lists, and tree. > >> + */ > >> +const void *meta_data; > >> +int (*extend_get)(QEMUFile *f, const void *metadata, void *opaque); > >> +

Re: [Qemu-devel] [PATCH v6 1/3] loader: Allow ELF loader to auto-detect the ELF arch

2016-05-25 Thread Alistair Francis
On Tue, May 24, 2016 at 3:08 PM, Cleber Rosa wrote: > > On 05/13/2016 05:37 PM, Alistair Francis wrote: >> >> >> +if (elf_machine < 1) { >> +/* The caller didn't specify and ARCH, we can figure it out */ > > > Spotted a comment typo: s/and/an/ Thanks, sending a version 7 with it fixed

  1   2   3   4   >