Re: [Qemu-devel] [PATCH v5 0/4] qapi: child add/delete support

2015-10-06 Thread Wen Congyang
Ping... On 09/22/2015 03:44 PM, Wen Congyang wrote: > If quorum's child is broken, we can use mirror job to replace it. > But sometimes, the user only need to remove the broken child, and > add it later when the problem is fixed. > > It is based on the following patch: > http://lists.nongnu.org/a

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

2015-10-06 Thread Wen Congyang
Ping... On 09/25/2015 02:17 PM, Wen Congyang wrote: > Block replication is a very important feature which is used for > continuous checkpoints(for example: COLO). > > You can the detailed information about block replication from here: > http://wiki.qemu.org/Features/BlockReplication > > Usage: >

Re: [Qemu-devel] Debugging Migration

2015-10-06 Thread Denis V. Lunev
On 10/07/2015 02:02 AM, John Snow wrote: On 10/06/2015 06:40 PM, Denis V. Lunev wrote: On 10/06/2015 09:46 PM, John Snow wrote: Is there a convenient way of "pausing" or stalling a live migration to allow methodical testing of race conditions? I'd like to instrument something along the lines

[Qemu-devel] [PATCH 8/8] migration: add output of gathered statistics

2015-10-06 Thread Denis V. Lunev
From: Igor Redko In this patch the output of the test results was added. If the test was successfully completed, it would be displayed in info migrate. Signed-off-by: Igor Redko Reviewed-by: Anna Melekhova Signed-off-by: Denis V. Lunev --- migration/migration.c | 18 ++ 1 fil

[Qemu-devel] [PATCH 7/8] migration: new migration test mode

2015-10-06 Thread Denis V. Lunev
From: Igor Redko In this patch the ability to start a migration with test-only capability was added. It allows to gather the guest VM’s memory usage statistics avoiding time and memory overheads and real data transmission. New MIGRATION_STATUS_TEST_COMPLETED was added to distinguish between test

[Qemu-devel] [PATCH 3/8] migration: add new capability test-only

2015-10-06 Thread Denis V. Lunev
From: Igor Redko This patch declares a new migration capability that allows to distinguish between true migration and the test. An alternative is using a custom URI but in this case the following problems should be solved: 1/ QEMUFile abstraction hides the real transport type 2/ We must be ensur

[Qemu-devel] [PATCH 5/8] migration: add draft of new transport

2015-10-06 Thread Denis V. Lunev
From: Igor Redko In this patch transport test is added. It can be used to estimate the possibility of live migration given downtime and bandwidth. In this patch basic functionality is implemented to meet the QEMUFile interface requirements. This transport is write-only. Moreover, it saves only t

[Qemu-devel] [PATCH 4/8] migration: add function for reseting migration bitmap

2015-10-06 Thread Denis V. Lunev
From: Igor Redko Adds function ram_migration_bitmap_reset(), which resets migration_bitmap and sends a number of dirtied bytes since the last call. During estimation of dirty bytes rate and migration downtime we must avoid any copying and transferring data, but we also need to get the number of

[Qemu-devel] [RFC 0/8] QEMUFile-way to gather VM's memory statistics

2015-10-06 Thread Denis V. Lunev
This code is not ready to be merged. It is sent in the hope that it could be useful and we could invent better architectural approach for the feature if possible. +tch set summary: - we added a feature that allows to gather VM's memory usage statistics with minimum interference with VM’s work (n

[Qemu-devel] [PATCH 2/8] qemu-file: new hook in qemu-file

2015-10-06 Thread Denis V. Lunev
From: Igor Redko This patch adds hook_ram_sync() to QEMUFile abstraction. This hook can be used for passing information about dirty memory. An alternative is using existing hook_ram_load(). But this hook is designed for incoming VM migration, so using it for outcoming VM migration may complicate

[Qemu-devel] [PATCH 6/8] migration: implementation of hook_ram_sync

2015-10-06 Thread Denis V. Lunev
From: Igor Redko The key feature of the test transport is receiving information about dirty memory. The qemu_test_sync_hook() allows to use the migration infrastructure(code) for this purpose. All calls of this hook will be from ram_save_pending(). At the first call of this hook we need to save

[Qemu-devel] [PATCH 1/8] migration: fix expected_downtime

2015-10-06 Thread Denis V. Lunev
From: Igor Redko To get this estimation we must divide pending_size by bandwidth according to description of expected-downtime ("qmp-commands.hx:3246"): "expected-downtime": only present while migration is active total amount in ms for downtime that was calculated on

Re: [Qemu-devel] rfc: vhost user enhancements for vm2vm communication

2015-10-06 Thread Michael S. Tsirkin
On Tue, Oct 06, 2015 at 02:42:34PM -0700, Nakajima, Jun wrote: > Hi Michael, > > Looks like the discussions tapered off, but do you have a plan to > implement this if people are eventually fine with it? We want to > extend this to support multiple VMs. Absolutely. We are just back from holidays,

Re: [Qemu-devel] [PATCH v2 0/5] simplified QEMU guest exec

2015-10-06 Thread Denis V. Lunev
On 10/05/2015 05:57 PM, Denis V. Lunev wrote: This patchset provides simplified guest-exec functionality. The idea is simple. We drop original guest-pipe-open etc stuff and provides simple and dumb API: - spawn process (originally with stdin/stdout/stderr as /dev/null) - later simple buffer is ad

Re: [Qemu-devel] [PATCH] qobject: Replace property list with GHashTable

2015-10-06 Thread David Gibson
On Tue, Oct 06, 2015 at 03:41:56PM +0300, Pavel Fedin wrote: > ARM GICv3 systems with large number of CPUs create lots of IRQ pins. Since > every pin is represented as a property, number of these properties becomes > very large. Every property add first makes sure there's no duplicates. > Traversin

Re: [Qemu-devel] [PATCH] qobject: Replace property list with GHashTable

2015-10-06 Thread David Gibson
On Tue, Oct 06, 2015 at 03:02:17PM +0200, Laszlo Ersek wrote: > David, > > On 10/06/15 14:41, Pavel Fedin wrote: > > ARM GICv3 systems with large number of CPUs create lots of IRQ pins. Since > > every pin is represented as a property, number of these properties becomes > > very large. Every prope

Re: [Qemu-devel] [PULL 00/10] VFIO updates for 2015-10-05

2015-10-06 Thread David Gibson
On Tue, Oct 06, 2015 at 09:35:17AM -0600, Alex Williamson wrote: > On Tue, 2015-10-06 at 15:50 +0100, Peter Maydell wrote: > > On 5 October 2015 at 21:36, Alex Williamson > > wrote: > > > The following changes since commit > > > c0b520dfb8890294a9f8879f4759172900585995: > > > > > > Merge remot

[Qemu-devel] How to build the latest Qemu on Mac OS X 10.11 (El Capitan ) ?

2015-10-06 Thread Aaron Elkins
Hi all, I am currently working on Mac OS X 10.11 (El Capitan), and I want to know if I can build Qemu on it? and how? Thanks -Aaron

Re: [Qemu-devel] [PATCH v12 00/10] Add a netfilter object and netbuffer filter

2015-10-06 Thread Yang Hongyang
On 10/07/2015 09:33 AM, Yang Hongyang wrote: On 10/01/2015 01:43 AM, Markus Armbruster wrote: Yang Hongyang writes: This patch add an netfilter abstract object, captures all network packets on associated netdev. Also implement a concrete filter buffer based on this abstract object. the "b

[Qemu-devel] [PATCH v13 10/10] tests: add test cases for netfilter object

2015-10-06 Thread Yang Hongyang
Using qtest qmp interface to implement following cases: 1) add/remove netfilter 2) add a netfilter then delete the netdev 3) add/remove more than one netfilters 4) add more than one netfilters and then delete the netdev Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- tests/.gitignore

[Qemu-devel] [PATCH v13 09/10] netfilter: add a netbuffer filter

2015-10-06 Thread Yang Hongyang
This filter is to buffer/release packets. Can be used when using MicroCheckpointing or other Remus like VM FT solutions. You can also use it to simulate network delay. Usage: -netdev tap,id=bn0 -object filter-buffer,id=f0,netdev=bn0,queue=rx,interval=1000 NOTE: Interval is in microseconds, it

[Qemu-devel] [PATCH v13 05/10] net/queue: introduce NetQueueDeliverFunc

2015-10-06 Thread Yang Hongyang
net/queue.c has logic to send/queue/flush packets but a qemu_deliver_packet_iov() call is hardcoded. Abstract this func so that we can use our own deliver function in netfilter. Signed-off-by: Yang Hongyang Cc: Stefan Hajnoczi Signed-off-by: Jason Wang --- include/net/queue.h | 13

Re: [Qemu-devel] How to get started with the source code of Qemu?

2015-10-06 Thread Aaron Elkins
Hi peter, Thanks for suggestion. Computer hardware architecture, that’s an interesting thing. -Aaron On Oct 7, 2015, at 4:08 AM, Peter Crosthwaite wrote: On Tue, Oct 6, 2015 at 7:17 AM, Aaron Elkins wrote: > Hi all, > > I am new to Qemu, and I’m extremely interested in understanding how t

[Qemu-devel] [PATCH v13 07/10] netfilter: print filter info associate with the netdev

2015-10-06 Thread Yang Hongyang
From: Yang Hongyang When execute "info network", print filter info also. add a info_str member to NetFilterState, store specific filters info. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/filter.h | 1 + net/filter.c | 20 net/net.c

[Qemu-devel] [PATCH v13 06/10] netfilter: add an API to pass the packet to next filter

2015-10-06 Thread Yang Hongyang
add an API qemu_netfilter_pass_to_next() to pass the packet to next filter. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/filter.h | 7 +++ net/filter.c | 58 2 files changed, 65

Re: [Qemu-devel] How to get started with the source code of Qemu?

2015-10-06 Thread Aaron Elkins
Hi Bastian, Thanks for you suggestion, I decide to do as you said, started by picking some interesting parts. -Aaron On Oct 7, 2015, at 1:04 AM, Bastian Koppelmann wrote: Hi Aaron, On 10/06/2015 04:17 PM, Aaron Elkins wrote: > Hi all, > > I am new to Qemu, and I’m extremely interested in

[Qemu-devel] [PATCH v13 08/10] net/queue: export qemu_net_queue_append_iov

2015-10-06 Thread Yang Hongyang
This will be used by buffer filter implementation later to queue packets. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/queue.h | 7 +++ net/queue.c | 12 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a

[Qemu-devel] [PATCH v13 04/10] net: merge qemu_deliver_packet and qemu_deliver_packet_iov

2015-10-06 Thread Yang Hongyang
qemu_deliver_packet_iov already have the compat delivery, we can drop qemu_deliver_packet. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/net.h | 5 - net/net.c | 51 --- net/queue.c | 6 +- 3 files

[Qemu-devel] [PATCH v13 00/10] Add a netfilter object and netbuffer filter

2015-10-06 Thread Yang Hongyang
This patch add an netfilter abstract object, captures all network packets on associated netdev. Also implement a concrete filter buffer based on this abstract object. the "buffer" netfilter could be used by VM FT solutions like MicroCheckpointing, to buffer/release packets. Or to simulate packet de

[Qemu-devel] [PATCH v13 02/10] init/cleanup of netfilter object

2015-10-06 Thread Yang Hongyang
Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we delete the netdev, we also delete the netfilter object attached to it, because if the netdev is removed, the filter which attached to it is useless. Signed-

[Qemu-devel] [PATCH v13 03/10] netfilter: hook packets before net queue send

2015-10-06 Thread Yang Hongyang
Capture packets that will be sent. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/filter.h | 8 +++ net/filter.c | 17 ++ net/net.c| 66 3 files changed, 9

[Qemu-devel] [PATCH v13 01/10] vl.c: init delayed object after net_init_clients

2015-10-06 Thread Yang Hongyang
Init delayed object after net_init_clients, because netfilters need to be initialized after net clients initialized. Signed-off-by: Yang Hongyang --- vl.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index f2bd8d2..366f38f 100644 --- a/vl.c +++ b/

Re: [Qemu-devel] [PATCH v12 02/10] init/cleanup of netfilter object

2015-10-06 Thread Yang Hongyang
On 10/01/2015 12:59 AM, Markus Armbruster wrote: Yang Hongyang writes: Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we delete the netdev, we also delete the netfilter object attached to it, because

Re: [Qemu-devel] [PATCH v12 02/10] init/cleanup of netfilter object

2015-10-06 Thread Yang Hongyang
On 10/01/2015 12:59 AM, Markus Armbruster wrote: Yang Hongyang writes: Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we delete the netdev, we also delete the netfilter object attached to it, because

Re: [Qemu-devel] [PATCH] gluster: allocate GlusterAIOCBs on the stack

2015-10-06 Thread Jeff Cody
On Thu, Oct 01, 2015 at 01:04:38PM +0200, Paolo Bonzini wrote: > This is simpler now that the driver has been converted to coroutines. > > Signed-off-by: Paolo Bonzini > --- > block/gluster.c | 86 > ++--- > 1 file changed, 33 insertions(+), 5

Re: [Qemu-devel] [RFC PATCH v4] os-android: Add support to android platform

2015-10-06 Thread Houcheng Lin
Hi, There are 7 sources still call basename() directly and block/vvfat.c define its own static basename() function. Please see the grep below: ➜ qemu git:(patch-v4) ✗ grep "basename(" **/*.c | grep -v get_basename fsdev/virtfs-proxy-helper.c:basename(prog)); hw/vfio/pci.c:group

Re: [Qemu-devel] [PATCH v12 09/10] netfilter: add a netbuffer filter

2015-10-06 Thread Yang Hongyang
On 10/01/2015 01:11 AM, Markus Armbruster wrote: Yang Hongyang writes: This filter is to buffer/release packets, this feature can be used when using MicroCheckpointing, or other Remus like VM FT solutions, you can also use it to simulate the network delay. Suggest to polish this slightly:

Re: [Qemu-devel] [PATCH v12 00/10] Add a netfilter object and netbuffer filter

2015-10-06 Thread Yang Hongyang
On 10/01/2015 01:43 AM, Markus Armbruster wrote: Yang Hongyang writes: This patch add an netfilter abstract object, captures all network packets on associated netdev. Also implement a concrete filter buffer based on this abstract object. the "buffer" netfilter could be used by VM FT solution

[Qemu-devel] [PATCH v6] target-tilegx: Support iret instruction and related special registers

2015-10-06 Thread Chen Gang
>From fa0950e403bbb98989117f632215ae0e698457d7 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sun, 4 Oct 2015 17:41:14 +0800 Subject: [PATCH v6] target-tilegx: Support iret instruction and related special registers EX_CONTEXT_0_0 is used for jumping address, and EX_CONTEXT_0_1 is for INTERRUPT_C

Re: [Qemu-devel] Debugging Migration

2015-10-06 Thread John Snow
On 10/06/2015 06:40 PM, Denis V. Lunev wrote: > On 10/06/2015 09:46 PM, John Snow wrote: >> Is there a convenient way of "pausing" or stalling a live migration to >> allow methodical testing of race conditions? >> >> I'd like to instrument something along the lines of: >> >> (1) Live migration be

Re: [Qemu-devel] [PATCH 06/17] qcow2-dirty-bitmap: add qcow2_dirty_bitmap_load()

2015-10-06 Thread John Snow
On 09/05/2015 12:43 PM, Vladimir Sementsov-Ogievskiy wrote: > This function loads block dirty bitmap from qcow2. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-dirty-bitmap.c | 155 > + > block/qcow2.c | 2 + > bl

[Qemu-devel] [PULL 36/48] ivshmem: add check on protocol version in QEMU

2015-10-06 Thread marcandre . lureau
From: David Marchand Send a protocol version as the first message from server, clients must close communication if they don't support this protocol version. Older QEMUs should be fine with this change in the protocol since they overrides their own vm_id on reception of an id associated to no eve

Re: [Qemu-devel] [PATCH v5] target-tilegx: Support iret instruction and related special registers

2015-10-06 Thread Chen Gang
Oh, sorry. I will send patch v6 for it. Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed > Subject: Re: [PATCH v5] target-tilegx: Support iret instruction and related > special registers > To: xili_gchen_5...@ho

Re: [Qemu-devel] Debugging Migration

2015-10-06 Thread Denis V. Lunev
On 10/06/2015 09:46 PM, John Snow wrote: Is there a convenient way of "pausing" or stalling a live migration to allow methodical testing of race conditions? I'd like to instrument something along the lines of: (1) Live migration begins. (2) migration is artificially halted or paused, but QEMU i

[Qemu-devel] [PULL 30/48] ivshmem: reset mask on device reset

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau The interrupt mask is a state value, it should be reset, like the interrupt status. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 50af4

[Qemu-devel] [PULL 13/48] ivshmem: allocate eventfds in resize_peers()

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau It simplifies a bit the code to allocate the array when setting the number of peers instead of lazily when receiving the first vector. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 11 ++- 1 file changed, 2 insertions(+),

[Qemu-devel] [PULL 16/48] ivshmem: remove max_peer field

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau max_peer isn't really useful, it tracks the maximum received VM id, but that quickly matches nb_peers, the size of the peers array. Since VM come and go, there might be sparse peers so it doesn't help much in general to have this value around. Signed-off-by: Marc-André Lu

[Qemu-devel] [PULL 10/48] ivshmem: remove last exit(1)

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Failing to create a chardev shouldn't be fatal. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 62547c0..e7224b9 100644 -

[Qemu-devel] [PULL 42/48] ivshmem: do not keep shm_fd open

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Remove shm_fd from device state, closing it as early as possible to avoid leaks. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/hw/misc/ivshmem.c

[Qemu-devel] [PULL 32/48] ivshmem-client: check the number of vectors

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Check the number of vectors received from the server, to avoid out of bound array access. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- contrib/ivshmem-client/ivshmem-client.c | 5 + 1 file changed, 5 insertions(+) diff --git a/contrib/ivshmem-

[Qemu-devel] [PULL 06/48] ivshmem: remove unnecessary dup()

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau qemu_chr_fe_get_msgfd() transfers ownership, there is no need to dup the fd. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/hw/misc/ivshmem.c

[Qemu-devel] [PULL 11/48] ivshmem: limit maximum number of peers to G_MAXUINT16

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Limit the maximum number of peers to MAXUINT16. This is more realistic and better matches the limit of the doorbell register. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[Qemu-devel] [PULL 22/48] ivshmem: use common is_power_of_2()

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau The common version correctly checks for 0 value case. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index fbb6f40..e678b

[Qemu-devel] [PULL 20/48] ivshmem: simplify a bit the code

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Use some more explicit variables to simplify the code. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivs

[Qemu-devel] [PATCH] linux-user: manage SOCK_PACKET socket type.

2015-10-06 Thread Laurent Vivier
This is obsolete, but if we want to use dhcp with some distros (like debian ppc 8.2 jessie), we need it. At the bind level, we are not able to know the socket type so we try to guess it by analyzing the name. We manage only the case "ethX", "ethX" in spk_device is similar to set htons(0x6574) in s

[Qemu-devel] [PULL 34/48] ivshmem-server: fix hugetlbfs support

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau As pointed out on the ML by Andrew Jones, glibc no longer permits creating POSIX shm on hugetlbfs directly. When given a hugetlbfs path, create a shareable file there. Signed-off-by: Marc-André Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- contrib/ivshmem-server

Re: [Qemu-devel] How to get started with the source code of Qemu?

2015-10-06 Thread Bastian Koppelmann
Hi Aaron, On 10/06/2015 04:17 PM, Aaron Elkins wrote: Hi all, I am new to Qemu, and I’m extremely interested in understanding how the source code of Qemu work. But after I downloaded the whole project, I just lost in it, the project is too large for me to get started. If anyone here can poin

Re: [Qemu-devel] rfc: vhost user enhancements for vm2vm communication

2015-10-06 Thread Nakajima, Jun
Hi Michael, Looks like the discussions tapered off, but do you have a plan to implement this if people are eventually fine with it? We want to extend this to support multiple VMs. On Mon, Aug 31, 2015 at 11:35 AM, Nakajima, Jun wrote: > On Mon, Aug 31, 2015 at 7:11 AM, Michael S. Tsirkin wrote:

[Qemu-devel] [PULL 08/48] ivshmem: remove useless doorbell field

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 7138b8d..dea4096 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -71,7 +71,6 @@ t

[Qemu-devel] [PATCH v1 1/1] sdhci.c: Limit the maximum block size

2015-10-06 Thread Alistair Francis
It is possible for the guest to set an invalid block size which is larger then the fifo_buffer[] array. This could cause a buffer overflow. To avoid this limit the maximum size of the blksize variable. Signed-off-by: Alistair Francis Suggested-by: Igor Mitsyanko Reported-by: Intel Security ATR

[Qemu-devel] [PULL 40/48] glib-compat: add 2.38/2.40/2.46 asserts

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Those are mostly useful for writing tests. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- include/glib-compat.h | 61 +++ 1 file changed, 61 insertions(+) diff --git a/include/glib-compat.h b/include/g

Re: [Qemu-devel] [PATCH 05/17] qcow2-dirty-bitmap: read dirty bitmap directory

2015-10-06 Thread John Snow
On 09/05/2015 12:43 PM, Vladimir Sementsov-Ogievskiy wrote: > Adds qcow2_read_dirty_bitmaps, reading Dirty Bitmap Directory as > specified in docs/specs/qcow2.txt > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-dirty-bitmap.c | 155 > +++

[Qemu-devel] [PULL 35/48] docs: update ivshmem device spec

2015-10-06 Thread marcandre . lureau
From: David Marchand Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand Reviewed

[Qemu-devel] [kvm-unit-tests PATCHv3] ARM PMU tests

2015-10-06 Thread Christopher Covington
Changes from v2: * Explicit test for monotonically increasing cycle count * Tests now pass or fail * Tests broken into functions * Tests/functions broken into separate patches in series * Style improvements as suggested by Wei Huang and Linux checkpatch.pl * Spelling and comment improvements

Re: [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-06 Thread Peter Lieven
Am 06.10.2015 um 19:56 schrieb John Snow: > > On 10/06/2015 01:12 PM, Peter Lieven wrote: >>> Am 06.10.2015 um 19:07 schrieb John Snow : >>> >>> >>> On 10/06/2015 05:20 AM, Peter Lieven wrote: > Am 06.10.2015 um 10:57 schrieb Kevin Wolf: > Am 05.10.2015 um 23:15 hat John Snow geschrieb

[Qemu-devel] [PULL 48/48] ivshmem: use little-endian int64_t for the protocol

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau The current ivshmem protocol uses 'long' for integers. But the sizeof(long) depends on the host and the endianess is not defined, which may cause portability troubles. Instead, switch to using little-endian int64_t. This breaks the protocol, except on x64 little-endian ho

[Qemu-devel] [RFC PATCH] qapi: split visit_end_struct() into pieces

2015-10-06 Thread Eric Blake
We want to call the various visit_end_*() functions unconditionally, so that visitors can release resources tied up since the matching visit_start_*(). But we also have a requirement for detecting when an input visitor did not consume everything, so the code allowed visit_end_*() to set an error.

[Qemu-devel] [PULL 31/48] contrib: add ivshmem client and server

2015-10-06 Thread marcandre . lureau
From: David Marchand When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz Signed-off-by: David Marchand [fix a valgrind warning, op

[Qemu-devel] [PULL 19/48] ivshmem: print error on invalid peer id

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau The server shouldn't send invalid peer id, so print an error if it's the case. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index d7a00bd..6

[Qemu-devel] [PULL 01/48] char: add qemu_chr_free()

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau If a chardev is allowed to be created outside of QMP, then it must be also possible to free it. This is useful for ivshmem that creates chardev anonymously and must be able to free them. Signed-off-by: Marc-André Lureau Acked-by: Paolo Bonzini Reviewed-by: Claudio Fonta

[Qemu-devel] [PATCH V10 2/3] sdhci: Split sdhci.h for public and internal device usage

2015-10-06 Thread Sai Pavan Boddu
Split sdhci.h into pubilc version (i.e include/hw/sd/sdhci.h) and internal version (i.e hw/sd/sdhci-interna.h) based on register declarations and object declaration. Signed-off-by: Sai Pavan Boddu Reviewed-by: Alistair Francis Reviewed-by: Peter Crosthwaite --- Changes for V10: None Changes

[Qemu-devel] [PULL 23/48] ivshmem: migrate with VMStateDescription

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau load_state_old() is used to keep compatibility with version 0. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 142 ++ 1 file changed, 89 insertions(+), 53 deletions(-) diff --gi

[Qemu-devel] [PULL 38/48] msix: implement pba write (but read-only)

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau qpci_msix_pending() writes on pba region, causing qemu to SEGV: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x77fba8c0 (LWP 25882)] 0x in ?? () (gdb) bt #0 0x in () #1 0x556556c5 in m

[Qemu-devel] [PULL 29/48] ivshmem: error on too many eventfd received

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau The number of eventfd that can be handled per peer is limited by the number of vectors. Return an error when receiving too many of them. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 8 1 file changed, 8 insertions(+) d

[Qemu-devel] [PULL 41/48] tests: add ivshmem qtest

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Adds 4 ivshmemtests: - single qemu instance and basic IO - pair of instances, check memory sharing - pair of instances with server, and MSIX - hot plug/unplug A temporary shm is created as well as a directory to place server socket, both should be clear on exit and abort.

Re: [Qemu-devel] [PATCH v3 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2015-10-06 Thread Gabriel L. Somlo
On Tue, Oct 06, 2015 at 10:54:42AM -0700, Andy Lutomirski wrote: > On Sat, Oct 3, 2015 at 4:28 PM, Gabriel L. Somlo wrote: > > From: Gabriel Somlo > > > > Make fw_cfg entries of type "file" available via sysfs. Entries > > are listed under /sys/firmware/qemu_fw_cfg/by_key, in folders > > named af

Re: [Qemu-devel] [PATCH v5] target-tilegx: Support iret instruction and related special registers

2015-10-06 Thread Chris Metcalf
Comments just on the commit message: On 10/06/2015 10:55 AM, Chen Gang wrote: From fa0950e403bbb98989117f632215ae0e698457d7 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sun, 4 Oct 2015 17:41:14 +0800 Subject: [PATCH v5] target-tilegx: Support iret instruction and related special registers

Re: [Qemu-devel] [PATCH 04/17] qcow2: Dirty Bitmaps Ext: structs and consts

2015-10-06 Thread John Snow
On 09/05/2015 12:43 PM, Vladimir Sementsov-Ogievskiy wrote: > Add data structures and constraints accordingly to docs/specs/qcow2.txt > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/Makefile.objs| 2 +- > block/qcow2-dirty-bitmap.c | 42 ++

[Qemu-devel] [PATCH v6] linux-user/syscall.c: malloc()/calloc() to g_malloc()/g_try_malloc()/g_new0()

2015-10-06 Thread Harmandeep Kaur
Convert malloc()/ calloc() calls to g_malloc()/ g_try_malloc()/ g_new0() All heap memory allocation should go through glib so that we can take advantage of a single memory allocator and its debugging/tracing features. Signed-off-by: Harmandeep Kaur --- v1->v2 convert the free() call in host_to_

[Qemu-devel] [PULL 09/48] ivshmem: more qdev conversion

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Use the latest qemu device modeling API, in particular, convert to realize to fix the error handling; right now a botched device_add ivhsmem command kills the VM. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 119

Re: [Qemu-devel] [kvm-unit-tests PATCHv3 3/3] arm: pmu: Add CPI checking

2015-10-06 Thread Andrew Jones
On Tue, Oct 06, 2015 at 01:49:26PM -0400, Christopher Covington wrote: > Check the numbers of cycles per instruction (CPI) implied by ARM PMU > cycle counter values. Check that in -icount mode these strictly > match the specified rate. > > Signed-off-by: Christopher Covington > --- > arm/pmu.c

Re: [Qemu-devel] [PATCH v18 19/21] replay: replay blockers for devices

2015-10-06 Thread Eric Blake
On 09/17/2015 10:25 AM, Pavel Dovgalyuk wrote: > Some devices are not supported by record/replay subsystem. > This patch introduces replay blocker which denies starting record/replay > if such devices are included into the configuration. > > Signed-off-by: Pavel Dovgalyuk > --- > hw/bt/hci.c

[Qemu-devel] [PATCH V10 0/3] Move sdhci.h to include/hw/sd

2015-10-06 Thread Sai Pavan Boddu
Move sdhci.h splitting it into common and internal. Create a new directory for sd in include/hw/. Correct paths of sd.h in at every instance of #include. Add sdhci to xlnx-zynqmp SOC. Sai Pavan Boddu (3): sd.h: Move sd.h to include/hw/sd/ sdhci: Split sdhci.h for public and internal device usa

Re: [Qemu-devel] [PATCH 03/17] spec: add qcow2-dirty-bitmaps specification

2015-10-06 Thread Eric Blake
On 10/06/2015 02:22 PM, John Snow wrote: >>> +Dirty Bitmap Directory Entry: >>> + >>> + >>> +24 - 27:flags >>> +Bit >>> + 0: in_use >>> + The bitmap is in use and may be inconsistent. >>> + >>> + 1:

[Qemu-devel] [PULL 47/48] ivshmem: use kvm irqfd for msi notifications

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Use irqfd for improving context switch when notifying the guest. If the host doesn't support kvm irqfd, regular msi notifications are still supported. Note: the ivshmem implementation doesn't allow switching between MSI and IO interrupts, this patch doesn't either. Signe

[Qemu-devel] [kvm-unit-tests PATCHv3 2/3] arm: pmu: Check cycle count increases

2015-10-06 Thread Christopher Covington
Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington --- arm/pmu.c | 29 + 1 file changed, 29 insertions(+) diff --git a/arm/pmu.c b/arm/pmu.c index 91a3688..589e6

Re: [Qemu-devel] [PATCH 2/4] more replay fixes

2015-10-06 Thread Eric Blake
On 10/06/2015 02:00 PM, Paolo Bonzini wrote: > 1) Compile files once > > 2) Move include file from replay/replay.h to include/sysemu/replay.h. > > 3) Fix Error usage > > 4) cleanup timerlistgroup_deadline_ns a bit and allow clock jump > notifiers to run > > 5) move replay-user.c to stubs/ > ---

Re: [Qemu-devel] [PATCH 03/17] spec: add qcow2-dirty-bitmaps specification

2015-10-06 Thread John Snow
On 09/05/2015 01:33 PM, Vladimir Sementsov-Ogievskiy wrote: > On 05.09.2015 19:43, Vladimir Sementsov-Ogievskiy wrote: >> Persistent dirty bitmaps will be saved into qcow2 files. It may be used >> as 'internal' bitmaps (for qcow2 drives) or as 'external' bitmaps for >> other drives (there may be

Re: [Qemu-devel] [PATCH 04/17] qcow2: Dirty Bitmaps Ext: structs and consts

2015-10-06 Thread John Snow
On 09/05/2015 12:43 PM, Vladimir Sementsov-Ogievskiy wrote: > Add data structures and constraints accordingly to docs/specs/qcow2.txt > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/Makefile.objs| 2 +- > block/qcow2-dirty-bitmap.c | 42 ++

[Qemu-devel] [PULL 43/48] ivshmem: use qemu_strtosz()

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Use the common qemu utility function to parse the memory size. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 36 +--- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/hw/misc/ivshmem.

Re: [Qemu-devel] How to get started with the source code of Qemu?

2015-10-06 Thread Peter Crosthwaite
On Tue, Oct 6, 2015 at 7:17 AM, Aaron Elkins wrote: > Hi all, > > I am new to Qemu, and I’m extremely interested in understanding how the > source code of Qemu work. But after > I downloaded the whole project, I just lost in it, the project is too large > for me to get started. > It does a lot,

[Qemu-devel] [PATCH 3/4] why is runstate_is_running needed?

2015-10-06 Thread Paolo Bonzini
It doesn't seem correct to call it for all checkpoints, but why is it right for timerlist_run_timers? --- qemu-timer.c | 9 +++-- stubs/replay.c | 5 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 3c6e4c3..f16e422 100644 --- a/qemu-tim

[Qemu-devel] [PATCH 4/4] events doubts

2015-10-06 Thread Paolo Bonzini
It is not clear what separates REPLAY_ASYNC_EVENT_BH from other async events. It seems to be an ordering issue, but then why do input events not have to be looked up in the queue? It would be much simpler if they are all handled the same way. --- replay/replay-events.c | 7 --- 1 file change

[Qemu-devel] [PATCH 2/4] more replay fixes

2015-10-06 Thread Paolo Bonzini
1) Compile files once 2) Move include file from replay/replay.h to include/sysemu/replay.h. 3) Fix Error usage 4) cleanup timerlistgroup_deadline_ns a bit and allow clock jump notifiers to run 5) move replay-user.c to stubs/ --- Makefile.objs | 2 ++ Makefile.target

[Qemu-devel] [PATCH 1/4] replay: generalize ptimer event to bottom halves

2015-10-06 Thread Paolo Bonzini
Make the code a bit more type safe and follow the same scheme as replay_input_event and replay_input_sync_event. Signed-off-by: Paolo Bonzini --- hw/core/ptimer.c | 6 +- replay/replay-events.c | 15 ++- replay/replay-internal.h | 2 +- replay/replay.h | 4 +

[Qemu-devel] [RFH PATCH 0/4] record/replay fixups and doubts

2015-10-06 Thread Paolo Bonzini
These are some comments I have about the record/replay code. I can integrate these in your patches myself, but I need an ack/tested-by and in some case more answers... Please take a look. Paolo Bonzini (4): replay: generalize ptimer event to bottom halves more replay fixes why is runstate_

[Qemu-devel] [PULL 0/1] NUMA queue, 2015-10-06

2015-10-06 Thread Eduardo Habkost
The following changes since commit 5fdb4671b08e0d1631447e81348b2b50a6b85bf7: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-10-06 13:42:33 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/numa-pull-request for

[Qemu-devel] [PULL 1/1] pc-dimm: Fail realization for invalid nodes in non-NUMA config

2015-10-06 Thread Eduardo Habkost
From: Bharata B Rao pc_dimm_realize() validates the NUMA node to which memory hotplug is being performed only in case of NUMA configuration. Include a check to fail for invalid nodes in case of non-NUMA configuration too. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Reviewed-by: Igor

[Qemu-devel] [PULL 44/48] ivshmem: add hostmem backend

2015-10-06 Thread marcandre . lureau
From: Marc-André Lureau Instead of handling allocation, teach ivshmem to use a memory backend. This allows to use hugetlbfs backed memory now. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c| 84 +--- test

Re: [Qemu-devel] [kvm-unit-tests PATCHv3 2/3] arm: pmu: Check cycle count increases

2015-10-06 Thread Andrew Jones
On Tue, Oct 06, 2015 at 01:49:25PM -0400, Christopher Covington wrote: > Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, > even for the smallest delta of two subsequent reads. > > Signed-off-by: Christopher Covington > --- > arm/pmu.c | 29 + > 1 fi

  1   2   3   >