Re: [Qemu-devel] Functions to intercept Disk IO information?

2015-10-21 Thread Fam Zheng
On Thu, 10/22 14:18, QuQ Edsel wrote: > Thank you for reply! > But as I insert a printf message in dma_buf_rw, compile and boot up the VM, > there are no messages printed even when I open/create/edit a .txt or .jpeg > file ? > If dma_buf_rw is called it is supposed to print messages in the monitor.

[Qemu-devel] [PATCH] pc: allow raising low memory via max-ram-below-4g option

2015-10-21 Thread Gerd Hoffmann
This patch extends the functionality of the max-ram-below-4g option to also allow increasing lowmem. While being at it also rework the lowmem calculation logic and add a longish comment describing how it works and what the compatibility constrains are. Signed-off-by: Gerd Hoffmann --- hw/i386/p

[Qemu-devel] [PATCH v6 12/12] tests: Add test case for aio_disable_external

2015-10-21 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf --- tests/test-aio.c | 24 1 file changed, 24 insertions(+) diff --git a/tests/test-aio.c b/tests/test-aio.c index 03cd45d..1623803 100644 --- a/tests/test-aio.c +++ b/tests/test-aio.c @@ -374,6 +374,29 @@ static void tes

[Qemu-devel] [PATCH v6 11/12] qed: Implement .bdrv_drain

2015-10-21 Thread Fam Zheng
The "need_check_timer" is used to clear the "NEED_CHECK" flag in the image header after a grace period once metadata update has finished. In compliance to the bdrv_drain semantics we should make sure it remains deleted once .bdrv_drain is called. We cannot reuse qed_need_check_timer_cb because it

[Qemu-devel] [PATCH v6 09/12] block: Add "drained begin/end" for internal snapshot

2015-10-21 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. state->bs is assigned right after bdrv_drained_begin. Because it was used as the flag for deletion or not in abort, now we need a separate flag - InternalSnapshotState.created.

[Qemu-devel] [PATCH v6 06/12] block: Add "drained begin/end" for transactional external snapshot

2015-10-21 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf --- blockdev.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/blockde

Re: [Qemu-devel] [PATCH RFC V5 6/9] hw/intc: arm_gicv3_spi_its

2015-10-21 Thread Pavel Fedin
Hello! > This patch includes a placeholder code for future spi and its > implementation. Forgot to comment on this. I see that here you are building an ITS into GIC as a monolithic thing. This can be wrong because we could want to emulate platforms which have GICv3 but don't have ITS. I would

Re: [Qemu-devel] [Qemu-block] [PATCH] block/nfs: add support for setting debug level

2015-10-21 Thread Peter Lieven
Am 22.09.2015 um 08:13 schrieb Peter Lieven: Am 25.06.2015 um 15:18 schrieb Stefan Hajnoczi: On Tue, Jun 23, 2015 at 10:12:15AM +0200, Peter Lieven wrote: upcoming libnfs versions will support logging debug messages. Add support for it in qemu through an URL parameter. Signed-off-by: Peter Lie

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-21 Thread Valerio Aimale
On 10/21/15 4:54 AM, Markus Armbruster wrote: Valerio Aimale writes: On 10/19/15 1:52 AM, Markus Armbruster wrote: Valerio Aimale writes: On 10/16/15 2:15 AM, Markus Armbruster wrote: vale...@aimale.com writes: All- I've produced a patch for the current QEMU HEAD, for libvmi to introsp

[Qemu-devel] [PATCH v6 05/12] block: Introduce "drained begin/end" API

2015-10-21 Thread Fam Zheng
The semantics is that after bdrv_drained_begin(bs), bs will not get new external requests until the matching bdrv_drained_end(bs). Signed-off-by: Fam Zheng --- block/io.c| 17 + include/block/block.h | 19 +++ include/block/block_int.h | 2 ++

[Qemu-devel] [PATCH v6 03/12] dataplane: Mark host notifiers' client type as "external"

2015-10-21 Thread Fam Zheng
They will be excluded by type in the nested event loops in block layer, so that unwanted events won't be processed there. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf --- hw/block/dataplane/virtio-blk.c | 5 ++--- hw/scsi/virtio-scsi-dataplane.c | 18 -- 2 files changed, 10

[Qemu-devel] PING: [PATCH] Add mp-affinity property for ARM CPU class

2015-10-21 Thread Pavel Fedin
Hello! > Nothing wrong with this patch, but I'd rather add it as part of > the series which actually uses it. (I see you have it in one of > your GICv3 patchsets.) Just a small PING, Shlomo asked for this in http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg04884.html I told him that

[Qemu-devel] [PATCH v6 04/12] aio: introduce aio_{disable, enable}_external

2015-10-21 Thread Fam Zheng
Signed-off-by: Fam Zheng --- aio-posix.c | 3 ++- aio-win32.c | 3 ++- include/block/aio.h | 38 ++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index f0f9122..0467f23 100644 --- a/aio-posix.c +++ b

Re: [Qemu-devel] [PULL 10/10] cpu-exec: Add "nochain" debug flag

2015-10-21 Thread Edgar E. Iglesias
On Wed, Oct 21, 2015 at 11:42:59AM -1000, Richard Henderson wrote: > Respect it to avoid linking TBs together. > Reviewed-by: Edgar E. Iglesias > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > cpu-exec.c | 3 ++- > include/qemu/log.h | 1 + > qemu-log.c

Re: [Qemu-devel] [RFC] transactions: add transaction-wide property

2015-10-21 Thread Stefan Hajnoczi
Thanks for summarizing the discussion! If you are taking over Fam's series, please squash in your patches to make review easier. Maybe the names can be improved: "allow-partial" is not self-explanatory. "sync-cancel" is misleading since successful completion is affected too, not just failure/ca

[Qemu-devel] [PATCH v6 10/12] block: Introduce BlockDriver.bdrv_drain callback

2015-10-21 Thread Fam Zheng
Drivers can have internal request sources that generate IO, like the need_check_timer in QED. Since we want quiesced periods that contain nested event loops in block layer, we need to have a way to disable such event sources. Block drivers must implement the "bdrv_drain" callback if it has any int

[Qemu-devel] [PATCH v6 02/12] nbd: Mark fd handlers client type as "external"

2015-10-21 Thread Fam Zheng
So we could distinguish it from internal used fds, thus avoid handling unwanted events in nested aio polls. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf --- nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nbd.c b/nbd.c index fbc66be..dab

[Qemu-devel] [PATCH v2 0/8] i.MX: Standardize debug code

2015-10-21 Thread Jean-Christophe Dubois
We fix all i.MX driver files to use the same type of debug code. The goal is to have debug code always compiled during build. We standardize all debug output on the following format: [QOM_TYPE_NAME]reporting_function: debug message We also replace IPRINTF with qemu_log_mask(). The qemu_log_mask

[Qemu-devel] [PATCH v6 08/12] block: Add "drained begin/end" for transactional blockdev-backup

2015-10-21 Thread Fam Zheng
Similar to the previous patch, make sure that external events are not dispatched during transaction operations. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf --- blockdev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockd

[Qemu-devel] [PATCH v6 07/12] block: Add "drained begin/end" for transactional backup

2015-10-21 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. Move the assignment to state->bs up right after bdrv_drained_begin, so that we can use it in the clean callback. The abort callback will still check bs->job and state->job, so it

[Qemu-devel] [PATCH v6 01/12] aio: Add "is_external" flag for event handlers

2015-10-21 Thread Fam Zheng
All callers pass in false, and the real external ones will switch to true in coming patches. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf --- aio-posix.c | 6 - aio-win32.c | 5 async.c | 3 +

[Qemu-devel] [PATCH v6 00/12] block: Protect nested event loop with bdrv_drained_begin and bdrv_drained_end

2015-10-21 Thread Fam Zheng
v6: Add Kevin's rev-by in patches 1-3, 6-8, 10, 12. Add Jeff's rev-by in patches 1, 2, 6-8, 10. 04: Fix spelling and wording in comments. [Jeff] Add assert at decrement. [Jeff] 05: Fix bad rebase. [Jeff] 09: Let blk_is_available come first. [Jeff, Kevin] 11: Rewrite bdrv

Re: [Qemu-devel] [PATCH v9 05/17] qapi: Unbox base members

2015-10-21 Thread Markus Armbruster
Eric Blake writes: > On 10/21/2015 07:34 AM, Markus Armbruster wrote: > > @@ -218,9 +216,11 @@ static void channel_event(int event, > SpiceChannelEventInfo *info) > } > > if (info->flags & SPICE_CHANNEL_EVENT_FLAG_ADDR_EXT) { > -add_addr_info(client->base

[Qemu-devel] [PULL 06/10] tcg/mips: Add use_mips32r6_instructions definition

2015-10-21 Thread Richard Henderson
From: James Hogan Add definition use_mips32r6_instructions to the MIPS TCG backend which is constant 1 when built for MIPS release 6. This will be used to decide between pre-R6 and R6 instruction encodings. Reviewed-by: Aurelien Jarno Signed-off-by: James Hogan Signed-off-by: Richard Henderson

Re: [Qemu-devel] [PATCH v9 06/17] qapi-visit: Remove redundant functions for flat union base

2015-10-21 Thread Markus Armbruster
Eric Blake writes: > The code for visiting the base class of a child struct created > visit_type_Base_fields() which covers all fields of Base; while > the code for visiting the base class of a flat union created > visit_type_Union_fields() covering all fields of the base > except the discriminat

Re: [Qemu-devel] [PATCH RFC V5 1/9] hw/intc: Implement GIC-500 support files

2015-10-21 Thread Shlomo Pongratz
O.K. On Wednesday, October 21, 2015, Pavel Fedin wrote: > Hello! > > > Do you mean that in virt.c::create_gic I'll take the cpu's affinity from > the cpu's property and not directly from > > ARM_CPU(qemu_get_cpu(i))->mp_affinity > > I mean that you can do it in your GIC's realize function. And

Re: [Qemu-devel] [PATCH] hw/arm/virt: Fix address in PCIe device tree node's unit name

2015-10-21 Thread Peter Maydell
On 21 October 2015 at 21:43, Alexander Gordeev wrote: > PCIe device tree unit name is pcie@1000 - which denotes > IO space base address. However, the corresponding node's > "reg" property points to PCI configuration space base address > 0x3f00. > > Set the unit name to pcie@3f00 which

[Qemu-devel] [PATCH v4 0/] Begin to disentangle libxenctrl and provide some stable libraries

2015-10-21 Thread Ian Campbell
In <1431963008.4944.80.ca...@citrix.com> I proposed stabilising some parts of the libxenctrl API/ABI by disaggregating into separate libraries. This is v4 of that set of series against: xen qemu-xen qemu-xen-traditional mini-os NB: Samuel+minios-devel will only get the mini-os sid

Re: [Qemu-devel] Functions to intercept Disk IO information?

2015-10-21 Thread QuQ Edsel
Thank you for reply! But as I insert a printf message in dma_buf_rw, compile and boot up the VM, there are no messages printed even when I open/create/edit a .txt or .jpeg file ? If dma_buf_rw is called it is supposed to print messages in the monitor... On the other hand, the dma_blk_io called in i

[Qemu-devel] [PATCH 5/5] slirp: Fix signed/unsigned comparison and variable truncation warnings

2015-10-21 Thread Mark Pizzolato
Some warnings affect potentially wrapping sequence numbers. Careful analysis of intent and consequences is necessary. - Variable type changes where appropriate - Explicit casts where appropriate Signed-off-by: Mark Pizzolato --- slirp/bootp.c | 2 +- slirp/dnssearch.c | 6 +++--- slir

[Qemu-devel] [PULL 23/38] net: add trace_vhost_user_event

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Replace error_report() and use tracing instead. It's not an error to get a connection or a disconnection, so silence this and trace it instead. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet

[Qemu-devel] [PATCH 3/5] slirp: change tftp to use stdio APIs vs open/read/close

2015-10-21 Thread Mark Pizzolato
Direct use of open/read/write/close on files produces build warnings on Windows when compiling with Visual Studio Signed-off-by: Mark Pizzolato --- slirp/tftp.c | 18 +- slirp/tftp.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/slirp/tftp.c b/slirp/t

[Qemu-devel] [RFC Patch 01/12] PCI: Add virtfn_index for struct pci_device

2015-10-21 Thread Lan Tianyu
Add "virtfn_index" member in the struct pci_device to record VF sequence of PF. This will be used in the VF sysfs node handle. Signed-off-by: Lan Tianyu --- drivers/pci/iov.c | 1 + include/linux/pci.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c

[Qemu-devel] [PATCH v1 3/5] sockets: remove use of QemuOpts from socket_connect

2015-10-21 Thread Daniel P. Berrange
The socket_connect method accepts a QAPI SocketAddress object which it then turns into QemuOpts before calling the inet_connect_opts/unix_connect_opts helper methods. By converting the latter to use QAPI SocketAddress directly, the QemuOpts conversion step can be eliminated Signed-off-by: Daniel P

Re: [Qemu-devel] [Qemu-block] [PATCH v5 01/12] aio: Add "is_external" flag for event handlers

2015-10-21 Thread Jeff Cody
On Wed, Oct 21, 2015 at 10:06:38AM +0800, Fam Zheng wrote: > All callers pass in false, and the real external ones will switch to > true in coming patches. > > Signed-off-by: Fam Zheng Just a comment, but not necessarily a request to change: We have a lot of functions that take bool true/false

[Qemu-devel] [RFC Patch 10/12] IXGBEVF: Add lock to protect tx/rx ring operation

2015-10-21 Thread Lan Tianyu
Ring shifting during restoring VF function maybe race with original ring operation(transmit/receive package). This patch is to add tx/rx lock to protect ring related data. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 2 ++ drivers/net/ethernet/intel/ixgbevf/

[Qemu-devel] [PATCH 23/40] slirp: Fix non blocking connect for w32

2015-10-21 Thread Michael Roth
From: Stefan Weil Signed-off-by: Stefan Weil (cherry picked from commit a246a01631f90230374c2b8ffce608232e2aa654) Signed-off-by: Michael Roth --- slirp/tcp_input.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c index f946db8..00

[Qemu-devel] [PULL 32/38] vhost-user-test: add live-migration test

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau This test checks that the log fd is given to the migration source, and mark dirty pages during migration. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- tests/vhost-user-test.c | 171 ++

[Qemu-devel] [PATCH 38/40] util/qemu-config: fix missing machine command line options

2015-10-21 Thread Michael Roth
From: Tony Krowiak Commit 0a7cf217 ("util/qemu-config: fix regression of qmp_query_command_line_options") aimed to restore parsing of global machine options, but missed two: "aes-key-wrap" and "dea-key-wrap" (which were present in the initial version of that patch). Let's add them to the machine_

[Qemu-devel] [RFC Patch 11/12] IXGBEVF: Migrate VF statistic data

2015-10-21 Thread Lan Tianyu
VF statistic regs are read-only and can't be migrated via writing back directly. Currently, statistic data returned to user space by the driver is not equal to value of statistic regs. VF driver records value of statistic regs as base data when net interface is up or open, calculate increased cou

[Qemu-devel] [PATCH 34/40] qdev: Protect device-list-properties against broken devices

2015-10-21 Thread Michael Roth
From: Markus Armbruster Several devices don't survive object_unref(object_new(T)): they crash or hang during cleanup, or they leave dangling pointers behind. This breaks at least device-list-properties, because qmp_device_list_properties() needs to create a device to find its properties. Broken

[Qemu-devel] [PATCH 24/40] ide: unify io_buffer_offset increments

2015-10-21 Thread Michael Roth
From: John Snow IDEState's io_buffer_offset was originally added to keep track of offsets in AHCI rather exclusively, but it was added to IDEState instead of an AHCI-specific structure. AHCI fakes all PIO transfers using DMA and a scatter-gather list. When the core or atapi layers invoke HBA-spe

[Qemu-devel] [PATCH 1/5] slirp: closesocket must be called to close sockets on windows

2015-10-21 Thread Mark Pizzolato
Signed-off-by: Mark Pizzolato --- slirp/slirp.c | 2 +- slirp/socket.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index 35f819a..d18faa8 100644 --- a/slirp/slirp.c +++ b/slirp/slirp.c @@ -846,7 +846,7 @@ int slirp_remove_hostfwd(Slirp *s

[Qemu-devel] [RFC Patch 04/12] IXGBE: Add ixgbe_ping_vf() to notify a specified VF via mailbox msg.

2015-10-21 Thread Lan Tianyu
This patch is to add ixgbe_ping_vf() to notify a specified VF. When migration status is changed, it's necessary to notify VF the change. VF driver will check the migrate status when it gets mailbox msg. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 19 +++

Re: [Qemu-devel] [PATCH v2 03/16] sockets: allow port to be NULL when listening on IP address

2015-10-21 Thread Knut Omang
On Mon, 2015-10-12 at 12:14 +0100, Daniel P. Berrange wrote: > If the port in the SocketAddress struct is NULL, it can allow > the kernel to automatically select a free port. This is useful > in particular in unit tests to avoid a race trying to find a > free port to run a test case on. This patch

[Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf"

2015-10-21 Thread Lan Tianyu
This patch is to add new sysfs interface of "notify_vf" under sysfs directory of VF PCI device for Qemu to notify VF when migration status is changed. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 30 ++ drivers/net/ethernet/intel/ixgbe/ix

[Qemu-devel] [PATCH v9 3/3] block/gluster: add support for multiple gluster servers

2015-10-21 Thread Prasanna Kumar Kalever
This patch adds a way to specify multiple volfile servers to the gluster block backend of QEMU with tcp|rdma transport types and their port numbers. Problem: Currenly VM Image on gluster volume is specified like this: file=gluster[+tcp]://host[:port]/testvol/a.img Assuming we have three hosts i

Re: [Qemu-devel] [Qemu-block] [PATCH v5 04/12] aio: introduce aio_{disable, enable}_external

2015-10-21 Thread Jeff Cody
On Thu, Oct 22, 2015 at 10:11:16AM +0800, Fam Zheng wrote: > On Wed, 10/21 11:56, Jeff Cody wrote: > > > +static inline bool aio_node_check(AioContext *ctx, bool is_external) > > > +{ > > > +return !is_external || !atomic_read(&ctx->external_disable_cnt); > > > +} > > > + > > > > It seems a li

[Qemu-devel] [PATCH v1 1/5] sockets: remove use of QemuOpts from header file

2015-10-21 Thread Daniel P. Berrange
There are no callers of the sockets methods which accept QemuOpts any more. Make all the QemuOpts related functions static to avoid new callers being added, in preparation for removal of all QemuOpts usage, in favour of QAPI SocketAddress. Signed-off-by: Daniel P. Berrange --- include/qemu/socke

[Qemu-devel] [PATCH 18/40] qcow2: Make size_to_clusters() return uint64_t

2015-10-21 Thread Michael Roth
From: Max Reitz Sadly, some images may have more clusters than what can be represented using a plain int. We should be prepared for that case (in qcow2_check_refcounts() we actually were trying to catch that case, but since size_to_clusters() truncated the returned value, that check never did any

Re: [Qemu-devel] [PATCH v2 4/5] Revert "vhost-user: Send VHOST_RESET_OWNER on vhost stop"

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 05:07:17PM +0800, Yuanhan Liu wrote: > Don't send VHOST_RESET_OWNER, for as Michael stated: > > Because we need to get the state from remote after stop. > RESET_OWNER discards that, so we can't resume the VM. > > This reverts commit 294ce717e0f212ed0763307f3eab72b4

[Qemu-devel] [PULL v2 1/9] util/qemu-config: fix missing machine command line options

2015-10-21 Thread Cornelia Huck
From: Tony Krowiak Commit 0a7cf217 ("util/qemu-config: fix regression of qmp_query_command_line_options") aimed to restore parsing of global machine options, but missed two: "aes-key-wrap" and "dea-key-wrap" (which were present in the initial version of that patch). Let's add them to the machine_

Re: [Qemu-devel] [Qemu-block] [PATCH v5 04/12] aio: introduce aio_{disable, enable}_external

2015-10-21 Thread Fam Zheng
On Wed, 10/21 11:56, Jeff Cody wrote: > > +static inline bool aio_node_check(AioContext *ctx, bool is_external) > > +{ > > +return !is_external || !atomic_read(&ctx->external_disable_cnt); > > +} > > + > > It seems a little odd to me to have this helper function take the > is_external bool fie

[Qemu-devel] [PATCH 39/40] Migration: Generate the completed event only when we complete

2015-10-21 Thread Michael Roth
From: "Dr. David Alan Gilbert" The current migration-completed event is generated a bit too early, which means that an eager libvirt that's ready to go as soon as it sees the event ends up racing with the actual end of migration. This corresponds to RH bug: https://bugzilla.redhat.com/show_bug.c

[Qemu-devel] [PATCH 04/40] block/iscsi: validate block size returned from target

2015-10-21 Thread Michael Roth
From: Peter Lieven It has been reported that at least tgtd returns a block size of 0 for LUN 0. To avoid running into divide by zero later on and protect against other problematic block sizes validate the block size right at connection time. Cc: qemu-sta...@nongnu.org Reported-by: Andrey Korolyo

[Qemu-devel] [PULL v2 6/9] s390x/ipl: we always have an ipl device

2015-10-21 Thread Cornelia Huck
From: David Hildenbrand Both s390 machines unconditionally create an ipl device, so no need to handle the missing case. Now we can also change s390_ipl_update_diag308() to return void. Reviewed-by: Cornelia Huck Acked-by: Christian Borntraeger Signed-off-by: David Hildenbrand Signed-off-by:

[Qemu-devel] [PULL 07/10] tcg/mips: Support r6 JR encoding

2015-10-21 Thread Richard Henderson
From: James Hogan MIPSr6 encodes JR as JALR with zero as the link register, and the pre-r6 JR encoding is removed. Update TCG to use the new encoding when built for r6. We still use the old encoding for pre-r6, so as not to confuse return prediction stack hardware which may detect only particula

[Qemu-devel] [PATCH 31/40] virtio-net: unbreak self announcement and guest offloads after migration

2015-10-21 Thread Michael Roth
From: Jason Wang After commit 019a3edbb25f1571e876f8af1ce4c55412939e5d ("virtio: make features 64bit wide"). Device's guest_features was actually set after vdc->load(). This breaks the assumption that device specific load() function can check guest_features. For virtio-net, self announcement and

Re: [Qemu-devel] Coding style for errors

2015-10-21 Thread Peter Maydell
On 21 October 2015 at 17:48, Markus Armbruster wrote: > Lluís Vilanova writes: > >> Hi, >> >> I was wondering what is the proper way (or ways, depending on the subsystem) >> of >> reporting and signalling errors in QEMU. The coding style file does not seem >> to >> mention it, and the code uses

[Qemu-devel] [PATCH 33/40] qmp: Fix device-list-properties not to crash for abstract device

2015-10-21 Thread Michael Roth
From: Markus Armbruster Broken in commit f4eb32b "qmp: show QOM properties in device-list-properties", v2.1. Cc: qemu-sta...@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Andreas Färber Message-Id: <144368-12182-9-git-send-email-arm...@redhat.com> (cherr

Re: [Qemu-devel] [PATCH 00/40] Patch Round-up for stable 2.4.1, freeze on 2015-10-29

2015-10-21 Thread Cole Robinson
On 10/21/2015 01:51 PM, Michael Roth wrote: > Hi everyone, > > The following new patches are queued for QEMU stable v2.4.1: > > https://github.com/mdroth/qemu/commits/stable-2.4-staging > > The release is planned for 2015-11-03: > > http://wiki.qemu.org/Planning/2.4 > > Please respond here

[Qemu-devel] [PULL 02/10] tcg/ppc: Revise goto_tb implementation

2015-10-21 Thread Richard Henderson
Restrict the size of code_gen_buffer to 2GB on ppc64, which lets us assert that everything is reachable with addis+addi from tb_ret_addr. This lets us use a max of 4 insns for goto_tb instead of 7. Emit the indirect branch portion of goto_tb up front, which means we only have to update two insns

Re: [Qemu-devel] [PATCH v2 08/16] io: add abstract QIOChannel classes

2015-10-21 Thread Eric Blake
On 10/21/2015 11:32 AM, Daniel P. Berrange wrote: > >>> +/** >>> + * qio_channel_seek: >>> + * @ioc: the channel object >>> + * @offset: the position to seek to, relative to @whence >>> + * @whence: one of the POSIX SEEK_* constants >> >> Including SEEK_HOLE/SEEK_DATA? > > Are those actually POS

[Qemu-devel] [PATCH 40/40] virtio-input: ignore events until the guest driver is ready

2015-10-21 Thread Michael Roth
From: Gerd Hoffmann Cc: qemu-sta...@nongnu.org Signed-off-by: Gerd Hoffmann (cherry picked from commit d9460a7557672af9c4d9d4f153200d1075ed5a78) Signed-off-by: Michael Roth --- hw/input/virtio-input.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/input/virtio-input.c b/hw/input/vi

[Qemu-devel] [PATCH 07/40] qemu-img: Fix crash in amend invocation

2015-10-21 Thread Michael Roth
From: Max Reitz Example: $ ./qemu-img create -f qcow2 /tmp/t.qcow2 64M $ ./qemu-img amend -f qcow2 -o backing_file=/tmp/t.qcow2, -o help \ /tmp/t.qcow2 This should not crash. This actually is tested by iotest 082, but not caught due to the segmentation fault being silent (which is something

[Qemu-devel] [RFC Patch 12/12] IXGBEVF: Track dma dirty pages

2015-10-21 Thread Lan Tianyu
Migration relies on tracking dirty page to migrate memory. Hardware can't automatically mark a page as dirty after DMA memory access. VF descriptor rings and data buffers are modified by hardware when receive and transmit data. To track such dirty memory manually, do dummy writes(read a byte and wr

Re: [Qemu-devel] [Qemu-block] [PATCH v5 11/12] qed: Implement .bdrv_drain

2015-10-21 Thread Fam Zheng
On Wed, 10/21 22:20, Jeff Cody wrote: > On Wed, Oct 21, 2015 at 10:06:48AM +0800, Fam Zheng wrote: > > The "need_check_timer" is used to clear the "NEED_CHECK" flag in the > > image header after a grace period once metadata update has finished. In > > compliance to the bdrv_drain semantics we shoul

Re: [Qemu-devel] [RFC Patch 09/12] IXGBEVF: Add live migration support for VF driver

2015-10-21 Thread Alexander Duyck
On 10/21/2015 09:37 AM, Lan Tianyu wrote: To let VF driver in the guest to know migration status, Qemu will fake PCI configure reg 0xF0 and 0xF1 to show migrate status and get ack from VF driver. When migration starts, Qemu will set reg "0xF0" to 1, notify VF driver via triggering mail box msg a

[Qemu-devel] [PATCH 36/40] misc: zynq_slcr: Fix MMIO writes

2015-10-21 Thread Michael Roth
From: Peter Crosthwaite The /4 for offset calculation in MMIO writes was happening twice giving wrong write offsets. Fix. While touching the code, change the if-else to be a short returning if and convert the debug message to a GUEST_ERROR, which is more accurate for this condition. Cc: qemu-st

Re: [Qemu-devel] [PATCH] hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 11:49:13AM +0200, Paolo Bonzini wrote: > > > On 20/10/2015 20:14, Laszlo Ersek wrote: > > Commit 4d00636e97b7 ("ich9: Add the lpc chip", Nov 14 2012) added the > > ich9_apm_ctrl_changed() ioport write callback function such that it would > > inject the SMI, in response to

Re: [Qemu-devel] [PATCH 1/3] Revert "vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE"

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 05:21:40PM +0800, Yuanhan Liu wrote: > On Wed, Oct 21, 2015 at 12:15:52PM +0300, Michael S. Tsirkin wrote: > > On Wed, Oct 21, 2015 at 04:55:16PM +0800, Yuanhan Liu wrote: > > > On Fri, Oct 16, 2015 at 10:47:49AM +0300, Michael S. Tsirkin wrote: > > > > On Fri, Oct 16, 2015

Re: [Qemu-devel] [PATCH v2 4/5] Revert "vhost-user: Send VHOST_RESET_OWNER on vhost stop"

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 05:07:17PM +0800, Yuanhan Liu wrote: > Don't send VHOST_RESET_OWNER, for as Michael stated: > > Because we need to get the state from remote after stop. > RESET_OWNER discards that, so we can't resume the VM. > > This reverts commit 294ce717e0f212ed0763307f3eab72b4

[Qemu-devel] [PATCH 08/40] mac_dbdma: always clear FLUSH bit once DBDMA channel flush is complete

2015-10-21 Thread Michael Roth
From: Mark Cave-Ayland The code to flush the DBDMA channel was effectively duplicated in dbdma_control_write(), except for the fact that the copy executed outside of a RUN bit transition was broken by not clearing the FLUSH bit once the flush was complete. Newer PPC Linux kernels would timeout w

[Qemu-devel] [PATCH] throttle: Remove throttle_group_lock/unlock()

2015-10-21 Thread Alberto Garcia
The group throttling code was always meant to handle its locking internally. However, bdrv_swap() was touching the ThrottleGroup structure directly and therefore needed an API for that. Now that bdrv_swap() no longer exists there's no need for the throttle_group_lock() API anymore. Signed-off-by:

[Qemu-devel] [PATCH 4/5] slirp: Generalized debug macros to also support simh debugging

2015-10-21 Thread Mark Pizzolato
- Debug output under qemu is unchanged and building with debug support us unchanged (-DDEBUG) - Add the ability to dynamically change the active debug flags in slirp_debug by defining a SLIRP_DEBUG environment variable which, if defined, sets the value of slirp_debug in slirp_init() - si

[Qemu-devel] [PULL 10/10] cpu-exec: Add "nochain" debug flag

2015-10-21 Thread Richard Henderson
Respect it to avoid linking TBs together. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- cpu-exec.c | 3 ++- include/qemu/log.h | 1 + qemu-log.c | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cpu-exec.c b/cpu-exec.c index 8fd56a6..7eef08

Re: [Qemu-devel] [PATCH RFC V5 6/9] hw/intc: arm_gicv3_spi_its

2015-10-21 Thread Pavel Fedin
Hello! > I just added a placeholder, I didn't add any functionality. I see. Just wanted to say, that if we accept my proposal (implementing ITS as a separate object), then the only thing we would do with this placeholder is to remove it. It should go then to something like hw/intc/arm_gicv3_i

[Qemu-devel] [RFC Patch 06/12] IXGBEVF: Add self emulation layer

2015-10-21 Thread Lan Tianyu
In order to restore VF function after migration, add self emulation layer to record regs' values during accessing regs. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbevf/Makefile| 3 ++- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- .../net/ethernet/intel/ix

Re: [Qemu-devel] [PATCH v9 05/17] qapi: Unbox base members

2015-10-21 Thread Markus Armbruster
Eric Blake writes: > On 10/20/2015 06:09 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Rather than storing a base class as a pointer to a box, just >>> store the fields of that base class in the same order, so that >>> a child struct can be safely cast to its parent. > > > >>>

[Qemu-devel] [PATCH v2 2/2] xen-platform: Replace assert() with appropriate error reporting

2015-10-21 Thread Eduardo Habkost
Commit dbb7405d8caad0814ceddd568cb49f163a847561 made it possible to trigger an assert using "-device xen-platform". Replace it with appropriate error reporting. Before: $ qemu-system-x86_64 -device xen-platform qemu-system-x86_64: hw/i386/xen/xen_platform.c:391: xen_platform_initfn: Assertio

[Qemu-devel] [PATCH v1 4/5] sockets: remove use of QemuOpts from socket_dgram

2015-10-21 Thread Daniel P. Berrange
The socket_dgram method accepts a QAPI SocketAddress object which it then turns into QemuOpts before calling the inet_dgram_opts helper method. By converting the latter to use QAPI SocketAddress directly, the QemuOpts conversion step can be eliminated. This removes the very last use of QemuOpts fr

Re: [Qemu-devel] [PATCH RFC V5 1/9] hw/intc: Implement GIC-500 support files

2015-10-21 Thread Pavel Fedin
Hello! > Do you mean that in virt.c::create_gic I'll take the cpu's affinity from the > cpu's property and not directly from > ARM_CPU(qemu_get_cpu(i))->mp_affinity I mean that you can do it in your GIC's realize function. And, even better, in arm_gicv3_common_realize(), because KVM GICv3 liv

[Qemu-devel] [PATCH 09/40] vhost-scsi: fix wrong vhost-scsi firmware path

2015-10-21 Thread Michael Roth
From: Gonglei vhost-scsi bootindex does't work because Qemu passes wrong fireware path to seabios. before: /pci@i0cf8/scsi@7channel@0/vhost-scsi@0,0 after applying the patch: /pci@i0cf8/scsi@7/channel@0/vhost-scsi@0,0 Reported-by: Subo Signed-off-by: Gonglei Message-Id: <1440553971-11108-

Re: [Qemu-devel] cpu modelling and hotplug

2015-10-21 Thread Zhu Guihua
Hi all, May I know whether the discussion is still ongoing? I checked Andreas's git tree, there was no changes about the topology. Plz let me know the schedule about this. Thanks, Zhu On 04/07/2015 08:43 PM, Christian Borntraeger wrote: We had a call and I was asked to write a summary about

Re: [Qemu-devel] Functions to intercept Disk IO information?

2015-10-21 Thread Fam Zheng
On Thu, 10/22 01:13, QuQ Edsel wrote: > Hi, > My friends and I were assigned a task to find out a point to insert a > callback function to intercept Disk IO activities such as read/write a .txt > file. Our final goal is to generate a report for target process/file 's > Disk IO activities. We have Q

Re: [Qemu-devel] [PATCH] target-alpha: fix uninitialized variable

2015-10-21 Thread Richard Henderson
On 10/19/2015 04:08 AM, Paolo Bonzini wrote: I am not sure why the compiler does not catch it. There is no semantic change since gen_excp returns EXIT_NORETURN, but the old code is wrong. Reported by Coverity. Signed-off-by: Paolo Bonzini --- target-alpha/translate.c | 2 +- 1 file changed,

[Qemu-devel] [PULL 34/38] seccomp: add memfd_create to whitelist

2015-10-21 Thread Michael S. Tsirkin
From: Eduardo Otubo This is used by memfd code. Signed-off-by: Eduardo Otubo Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- qemu-seccomp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[Qemu-devel] [RFC Patch 07/12] IXGBEVF: Add new mail box event for migration

2015-10-21 Thread Lan Tianyu
VF status in the PF driver needs to be restored after migration and reset VF hardware. This patch is to add a new event for VF driver to notify PF driver to restore status. Signed-off-by: Lan Tianyu --- drivers/net/ethernet/intel/ixgbevf/mbx.h | 3 +++ drivers/net/ethernet/intel/ixgbevf/vf.c |

Re: [Qemu-devel] [Qemu-block] [PATCH v5 02/12] nbd: Mark fd handlers client type as "external"

2015-10-21 Thread Jeff Cody
On Wed, Oct 21, 2015 at 10:06:39AM +0800, Fam Zheng wrote: > So we could distinguish it from internal used fds, thus avoid handling > unwanted events in nested aio polls. > > Signed-off-by: Fam Zheng > --- > nbd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/nbd.

Re: [Qemu-devel] [PATCH RFC V5 9/9] hw/arm: Add virt-v3 machine that uses GIC-500

2015-10-21 Thread Pavel Fedin
Hello! > I see, just how do I pass the gic version from the command line? Easy. -machine virt,gic-version=3 > GICV3 is accessed by system instructions that exists only in ARCH64. Wrong. In 32-bit mode the CPU sees them as CP15 registers. See "8.5 AArch32 System register descriptions". I wo

[Qemu-devel] [PATCH v2 5/8] i.MX: Standardize i.MX CCM debug

2015-10-21 Thread Jean-Christophe Dubois
The goal is to have debug code always compiled during build. We standardize all debug output on the following format: [QOM_TYPE_NAME]reporting_function: debug message We also replace IPRINTF with qemu_log_mask(). The qemu_log_mask() output is following the same format as the above debug. Signed

[Qemu-devel] [PATCH QEMU-XEN v4 4/9] xen: Switch uses of xc_map_foreign_range into xc_map_foreign_bulk

2015-10-21 Thread Ian Campbell
In Xen 4.7 we are refactoring parts libxenctrl into a number of separate libraries which will provide backward and forward API and ABI compatiblity. One such library will be libxenforeignmemory which provides access to privileged foreign mappings and which will provide an interface equivalent to x

[Qemu-devel] [PATCH 2/5] slirp: Changes needed to build with a pre C99 C compiler

2015-10-21 Thread Mark Pizzolato
Some windows environments will compile with other than GCC (i.e. Visual Studio). - C99 structures and array initializers had crept in over time. Changed code to use pre C99 syntax in misc.c and slirp.c - ip.h and slirp.h have packed structure definitions. Add support for non GCC packet

Re: [Qemu-devel] [PATCH v2 1/5] Revert "vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE"

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 05:07:14PM +0800, Yuanhan Liu wrote: > This reverts commit d1f8b30ec8dde0318fd1b98d24a64926feae9625. > > It turned out that it breaks stuff, so revert it: > > http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg00949.html > > CC: "Michael S. Tsirkin" > Reporte

[Qemu-devel] [PATCH 37/40] s390x/kvm: Fix vector validity bit in device machine checks

2015-10-21 Thread Michael Roth
From: Christian Borntraeger Device hotplugs trigger a crw machine check. All machine checks have validity bits for certain register types. With vector support we also have to claim that vector registers are valid. This is a band-aid suitable for stable. Long term we should create the full mcic v

[Qemu-devel] [PATCH 32/40] vmxnet3: Drop net_vmxnet3_info.can_receive

2015-10-21 Thread Michael Roth
From: Fam Zheng Commit 6e99c63 ("net/socket: Drop net_socket_can_send") changed the semantics around .can_receive for sockets to now require the device to flush queued pkts when transitioning to a .can_receive=true state. But it's OK to drop incoming packets when the link is not active. Signed-o

[Qemu-devel] [PATCH v2 2/8] i.MX: Standardize i.MX GPIO debug

2015-10-21 Thread Jean-Christophe Dubois
The goal is to have debug code always compiled during build. We standardize all debug output on the following format: [QOM_TYPE_NAME]reporting_function: debug message We also replace IPRINTF with qemu_log_mask(). The qemu_log_mask() output is following the same format as the above debug. Signed

[Qemu-devel] [PATCH v2 1/8] i.MX: Standardize i.MX serial debug.

2015-10-21 Thread Jean-Christophe Dubois
The goal is to have debug code always compiled during build. We standardize all debug output on the following format: [QOM_TYPE_NAME]reporting_function: debug message We also replace IPRINTF with qemu_log_mask(). The qemu_log_mask() output is following the same format as the above debug. Signed

[Qemu-devel] [PATCH v2 8/8] i.MX: Standardize i.MX GPT debug

2015-10-21 Thread Jean-Christophe Dubois
The goal is to have debug code always compiled during build. We standardize all debug output on the following format: [QOM_TYPE_NAME]reporting_function: debug message We also replace IPRINTF with qemu_log_mask(). The qemu_log_mask() output is following the same format as the above debug. Signed

Re: [Qemu-devel] [PATCH 0/4] mips: add Global Interrupt Controller

2015-10-21 Thread Peter Maydell
On 21 October 2015 at 17:28, Yongbok Kim wrote: > On 21/10/2015 17:01, Peter Maydell wrote: >> Should this live in hw/intc/ if it is an interrupt controller? > Actually I have considered that but I just hesitated to put the files in > the hw/intc as all other MIPS related hw component files are i

  1   2   3   4   >