Re: [Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance improvement

2015-07-27 Thread Pavel Fedin
> > Also, i thought that there could be > > some hard to notice problems, when, for example, we first add > > unnamed-gpio-in[0...1023], then add another 1024 pins, where count > > again goes from 0 to 1023. And we would get collision and failure, > > unless we know, that we already have 1024 objec

Re: [Qemu-devel] [PATCH RFC v2 27/47] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Fixes flat unions to visit the base's base members (the previous >> commit merely added them to the struct). Same test case. >> >> Patch's effect on visit_type_UserDefFlatUnion(): >> >> static void visit_type_UserDef

Re: [Qemu-devel] [PATCH RFC v2 27/47] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/27/2015 11:53 AM, Markus Armbruster wrote: > >>> Oh, and that means our generator has a collision bug that none of my >>> added tests have exposed yet: you cannot have a base class and >>> simultaneously add a member named 'base': >>> >>> { 'struct': 'Base', 'data': { '

Re: [Qemu-devel] [PATCH v7 00/42] Postcopy implementation

2015-07-27 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:13], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > This is the 7th cut of my version of postcopy; it is designed for use with > the Linux kernel additions posted by Andrea Arcangeli here: > > git clone --reference linux -b userfault21 > gi

Re: [Qemu-devel] [PATCH v7 42/42] Inhibit ballooning during postcopy

2015-07-27 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:55], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Postcopy detects accesses to pages that haven't been transferred yet > using userfaultfd, and it causes exceptions on pages that are 'not > present'. > Ballooning also causes pages to be mark

Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/27/2015 10:09 AM, Markus Armbruster wrote: > >> >>> I'm sure there are further things that could be done, but at this point, >>> I hope you get my picture, and I'll quit focusing on this particular patch. >> >> We need to decide how much code churn to accept just for

Re: [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/24/2015 06:01 AM, Markus Armbruster wrote: > >>> It might be worth tweaking the generator to output a C comment either >>> here (at the start of the larger struct)... >>> char *string; EnumOne enum1; >>> >>> ...or here (at the end of the base s

Re: [Qemu-devel] [PATCH v7 41/42] Disable mlock around incoming postcopy

2015-07-27 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:54], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Userfault doesn't work with mlock; mlock is designed to nail down pages > so they don't move, userfault is designed to tell you when they're not > there. > > munlock the pages we userfault p

[Qemu-devel] [ARM SMBIOS V1 PATCH 4/6] smbios: move smbios code into a common folder

2015-07-27 Thread Wei Huang
To share smbios among different architectures, this patch moves SMBIOS code (smbios.c and smbios.h) from x86 specific folders into new hw/smbios directories. As a result, CONFIG_SMBIOS=y is defined in x86 default config files. Signed-off-by: Wei Huang --- arch_init.c | 2

[Qemu-devel] [ARM SMBIOS V1 PATCH 3/6] smbios: pass ram size as a parameter to build smbios tables

2015-07-27 Thread Wei Huang
This patch adds a new parameter, mem_size, to smbios_get_tables() function. This step is required to make smbios code architecture independent. Signed-off-by: Wei Huang --- hw/i386/pc.c | 2 +- hw/i386/smbios.c | 8 include/hw/i386/smbios.h | 2 ++ 3 files changed, 7

[Qemu-devel] [ARM SMBIOS V1 PATCH 6/6] smbios: implement smbios support for mach-virt

2015-07-27 Thread Wei Huang
This patch generates smbios tables for ARM mach-virt. Also add CONFIG_SMBIOS=y for ARM default config. Signed-off-by: Wei Huang --- default-configs/arm-softmmu.mak | 1 + hw/arm/virt.c| 24 include/hw/arm/virt-acpi-build.h | 1 + 3 files changed, 2

Re: [Qemu-devel] [PATCH v7 41/42] Disable mlock around incoming postcopy

2015-07-27 Thread Amit Shah
On (Tue) 14 Jul 2015 [17:22:13], Juan Quintela wrote: > "Dr. David Alan Gilbert (git)" wrote: > > +if (enable_mlock) { > > +if (os_mlock() < 0) { > > +error_report("mlock: %s", strerror(errno)); > > +/* > > + * It doesn't feel right to fail at this

[Qemu-devel] [ARM SMBIOS V1 PATCH 2/6] smbios: remove dependency on x86 e820 tables

2015-07-27 Thread Wei Huang
Current smbios builds type 19 table from e820, which is x86 specific. This patch removes smbios' dependency on e820 by passing an array of memory area to smbios_get_tables(). Signed-off-by: Wei Huang --- hw/i386/pc.c | 18 +- hw/i386/smbios.c | 14 +++-

[Qemu-devel] [ARM SMBIOS V1 PATCH 1/6] smbios: extract x86 smbios building code into a function

2015-07-27 Thread Wei Huang
This patch extracts out the procedure of buidling x86 SMBIOS tables into a dedicated function. Signed-off-by: Wei Huang --- hw/i386/pc.c | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 7661ea9..00e45f3

[Qemu-devel] [ARM SMBIOS V1 PATCH 5/6] smbios: add smbios 3.0 support

2015-07-27 Thread Wei Huang
This patch adds support for SMBIOS 3.0 entry point. When caller invokes smbios_set_defaults(), it can specify entry point as 2.1 or 3.0. Then smbios_get_tables() will return the entry point table in right format. Signed-off-by: Wei Huang --- hw/i386/pc_piix.c | 3 +- hw/i386/pc_q35.c

[Qemu-devel] [ARM SMBIOS V1 PATCH 0/6] SMBIOS Support for ARM

2015-07-27 Thread Wei Huang
SMBIOS tables present userful system hardware info to management applications, such as DMI tools. Even though SMBIOS was originally developed for Intel x86, it has been extended to both Itanium and ARM (32bit & 64bit). More and more ARM server releases, such as RHEL Server for ARM, start to integ

Re: [Qemu-devel] [PATCH v7 40/42] End of migration for postcopy

2015-07-27 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:53], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Tweak the end of migration cleanup; we don't want to close stuff down > at the end of the main stream, since the postcopy is still sending pages > on the other thread. > > Signed-off-by: Dr.

Re: [Qemu-devel] [PATCH v7 39/42] postcopy: Wire up loadvm_postcopy_handle_ commands

2015-07-27 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:52], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Wire up more of the handlers for the commands on the destination side, > in particular loadvm_postcopy_handle_run now has enough to start the > guest running. > > Signed-off-by: Dr. David Al

Re: [Qemu-devel] [RFC PATCH v0] spapr: Abort when hash table size requirement isn't met

2015-07-27 Thread Bharata B Rao
Any views on this ? On Thu, Jul 16, 2015 at 12:25:01PM +0530, Bharata B Rao wrote: > On Wed, Jul 15, 2015 at 03:27:13PM +0530, Bharata B Rao wrote: > > [This patch addresses an issue which is not prominently seen in mainline, > > but seen frequently only in David's spapr-next branch. Though it is

Re: [Qemu-devel] [PATCH RFC 4/6] vhost: alloc shareable log

2015-07-27 Thread Jason Wang
On 07/23/2015 09:36 AM, Marc-André Lureau wrote: > If the backend is of type VHOST_BACKEND_TYPE_USER, allocate > shareable memory. > > Note: vhost_log_get() can use a global "vhost_log" that can be shared by > several vhost devices. We may want instead a common shareable log and a > common non-sh

[Qemu-devel] [PULL for-2.4 1/2] sheepdog: serialize requests to overwrapping area

2015-07-27 Thread Jeff Cody
From: Hitoshi Mitake Current sheepdog driver only serializes create requests in oid unit. This mechanism isn't enough for handling requests to overwrapping area spanning multiple oids, so it can result bugs like below: https://bugs.launchpad.net/sheepdog-project/+bug/1456421 This patch adds a ne

Re: [Qemu-devel] [PATCH v3] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-27 Thread Jeff Cody
On Wed, Jul 22, 2015 at 02:27:46PM +0100, Richard W.M. Jones wrote: > v3: > Same as v2 but set the return value to -EIO. > Thanks, applied to my block tree: https://github.com/codyprime/qemu-kvm-jtc/tree/block Thanks, Jeff

[Qemu-devel] [PULL for-2.4 2/2] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-27 Thread Jeff Cody
From: "Richard W.M. Jones" On some (but not all) systems: $ qemu-img create -f qcow2 overlay -b ssh://xen/ Segmentation fault It turns out this happens when inet_connect returns -1 in the following code, but errno == 0. s->sock = inet_connect(s->hostport, errp); if (s->sock < 0) {

[Qemu-devel] [PULL for-2.4 0/2] block patches for 2.4-rc3

2015-07-27 Thread Jeff Cody
The following changes since commit f8787f8723eaca1be99e3b1873e54de163fffa93: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20150727' into staging (2015-07-27 19:37:09 +0100) are available in the git repository at: g...@github.com:codyprime/qemu-kvm-jtc.git tags/jtc-fo

Re: [Qemu-devel] [PULL for-2.4 0/1] block patches for 2.4-rc3

2015-07-27 Thread Jeff Cody
On Mon, Jul 27, 2015 at 11:21:42AM -0400, Jeff Cody wrote: > The following changes since commit f793d97e454a56d17e404004867985622ca1a63b: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2015-07-24 13:07:10 +0100) > > are available in the git repository at:

Re: [Qemu-devel] [PATCH] qemu-nbd: remove unnecessary qemu_notify_event()

2015-07-27 Thread Fam Zheng
On Mon, 07/27 13:54, Paolo Bonzini wrote: > This was needed when qemu-nbd was using qemu_set_fd_handler2. It is > not needed anymore now that nbd_update_server_fd_handler is called > whenever nbd_can_accept() can change from false to true. > nbd_update_server_fd_handler will call qemu_set_fd_handl

Re: [Qemu-devel] [PATCH COLO-BLOCK v8 00/18] Block replication for continuous checkpoints

2015-07-27 Thread Wen Congyang
Ping... Does anyone have time to review this patchset? The block replication is not only for COLO. All other HA/FT can reuse it(for example, microcheckpoint). Thanks Wen Congyang On 07/07/2015 04:42 PM, Wen Congyang wrote: > Block replication is a very important feature which is used for > cont

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-27 Thread Yang Hongyang
On 07/28/2015 11:28 AM, Jason Wang wrote: On 07/27/2015 06:03 PM, Yang Hongyang wrote: On 07/27/2015 05:16 PM, Jason Wang wrote: [...] I think this won't work for the buffer case? If we want the buffer case to work under this, we should modify the generic netdev layer code, to check the return

Re: [Qemu-devel] [PATCH] RFC/net: Add a net filter

2015-07-27 Thread Jason Wang
On 07/27/2015 06:03 PM, Yang Hongyang wrote: > On 07/27/2015 05:16 PM, Jason Wang wrote: > [...] >>> I think this won't work for the buffer case? If we want the buffer >>> case >>> to work under this, we should modify the generic netdev layer >>> code, to >>> check the return

[Qemu-devel] How to enable the realtime features of qemu?

2015-07-27 Thread cauchy-love
Hi, I have noticed that the recent qemu provide realtime features as the qemu help outputs something like "run qemu with realtime features". But there is little information about that area. I would be much appreciated if someone can provide the detailed information (i.e., system configuration

[Qemu-devel] How to enable the realtime features of qemu?

2015-07-27 Thread cauchy-love
Hi, I have noticed that the recent qemu provide realtime features as the qemu help outputs something like "run qemu with realtime features". But there is little information about that area. I would be much appreciated if someone can provide the detailed information (i.e., system configuration

[Qemu-devel] How to enable the realtime features of qemu?

2015-07-27 Thread cauchy-love
Hi, I have noticed that the recent qemu provide realtime features as the qemu help outputs something like "run qemu with realtime features". But there is little information about that area. I would be much appreciated if someone can provide the detailed information (i.e., system configuration

Re: [Qemu-devel] [PATCH V4 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set

2015-07-27 Thread Jason Wang
On 07/27/2015 07:26 PM, Michael S. Tsirkin wrote: > On Mon, Jul 27, 2015 at 12:28:23PM +0200, Paolo Bonzini wrote: >> >> On 27/07/2015 11:49, Jason Wang wrote: >>> +if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) { >> No double underscores in userspace code. Longstanding so it can be

[Qemu-devel] [PATCH v2 for-2.5] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()

2015-07-27 Thread Wen Congyang
If rcu_(un)register_thread() is called together with synchronize_rcu(), it will wait for the synchronize_rcu() to finish. But when synchronize_rcu() waits for some events, we can modify the list registry. We also use the lock rcu_gp_lock to assume that synchronize_rcu() isn't executed in more than

[Qemu-devel] [PATCH] hw/net: handle flow control in mcf_fec driver receiver

2015-07-27 Thread Greg Ungerer
The network mcf_fec driver emulated receive side method is not dealing with network queue flow control properly. Modify the receive side to check if we have enough space in the descriptors to store the current packet. If not we process none of it and return 0. When the guest frees up some buffers

[Qemu-devel] [PATCH v2 41/45] ivshmem: rename ivshmem_get_size/parse_mem_size

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Use a more explicit and reusable function name. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index b85fcd4..ecf31f9 100644 --- a/hw/misc/ivshme

[Qemu-devel] [PATCH v2 44/45] ivshmem: rename MSI eventfd_table

2015-07-27 Thread Marc-André Lureau
The array is used to have vector specific data, so use a more descriptive name. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 83ebeb8..08d7ff5 100644 --- a/

[Qemu-devel] [PATCH v2 39/45] tests: add ivshmem qtest

2015-07-27 Thread Marc-André 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.

[Qemu-devel] [PATCH v2 45/45] ivshmem: use kvm irqfd for msi notifications

2015-07-27 Thread Marc-André Lureau
Use irqfd for improving context switch whwn 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. Signed-off-by: Marc-André Lurea

[Qemu-devel] [PATCH v2 43/45] ivshmem: remove EventfdEntry.vector

2015-07-27 Thread Marc-André Lureau
No need to store an extra int for which vector number it is when it can be computed by looking at the array position. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index a15

[Qemu-devel] [PATCH v2 42/45] ivshmem: add hostmem backend

2015-07-27 Thread Marc-André 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 --- hw/misc/ivshmem.c| 85 tests/ivshmem-test.c | 12

[Qemu-devel] [PATCH v2 38/45] qtest: add qtest_add_abrt_handler()

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Allow a test to add abort handlers, use GHook for all handlers. There is currently no way to remove a handler, but it could be later added if needed. Signed-off-by: Marc-André Lureau --- tests/libqtest.c | 37 - tests/libqtest.h | 2

[Qemu-devel] [PATCH v2 28/45] ivshmem: error on too many eventfd received

2015-07-27 Thread Marc-André 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 --- hw/misc/ivshmem.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/misc/ivshmem.c b

[Qemu-devel] [PATCH v2 33/45] ivshmem-server: fix hugetlbfs support

2015-07-27 Thread Marc-André 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 --- contrib/ivshmem-server/ivshmem-server.c | 47

[Qemu-devel] [PATCH v2 37/45] msix: implement pba write (but read-only)

2015-07-27 Thread Marc-André 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] [PATCH v2 26/45] ivshmem: fix pci_ivshmem_exit()

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Free all objects owned by the device, making sure the device is free, fixing hot-unplug. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/hw/misc/ivshmem.c

[Qemu-devel] [PATCH v2 31/45] ivshmem-client: check the number of vectors

2015-07-27 Thread Marc-André 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 --- contrib/ivshmem-client/ivshmem-client.c | 4 1 file changed, 4 insertions(+) diff --git a/contrib/ivshmem-client/ivshmem-client.c b/cont

[Qemu-devel] [PATCH v2 35/45] ivshmem: add check on protocol version in QEMU

2015-07-27 Thread Marc-André 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

[Qemu-devel] [PATCH v2 23/45] ivshmem: shmfd can be 0

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau 0 is a valid fd value, so change conditions and set -1 value early Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 199086d..9085f7c 100644 --- a/

[Qemu-devel] [PATCH v2 24/45] ivshmem: check shm isn't already initialized

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The server should not be allowed to change the shm, this isn't handled by qemu (perhaps it could be though). Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 9085

[Qemu-devel] [PATCH v2 34/45] docs: update ivshmem device spec

2015-07-27 Thread Marc-André 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] [PATCH v2 21/45] ivshmem: use common is_power_of_2()

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The common version correctly checks for 0 value case. Signed-off-by: Marc-André Lureau --- 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 8fcdd60..34da11a 100644 --- a/hw/misc/ivshme

[Qemu-devel] [PATCH v2 22/45] ivshmem: migrate with VMStateDescription

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau If necessary, load_state_old() could be used to keep compatibility with verison 0. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 107 +++--- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/hw/mis

[Qemu-devel] [PATCH v2 40/45] ivshmem: do not keep shm_fd open

2015-07-27 Thread Marc-André 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 --- hw/misc/ivshmem.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 3dabcdd

[Qemu-devel] [PATCH v2 32/45] ivshmem-server: use a uint16 for client ID

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau In practice, the number of VM is limited to MAXUINT16 in ivshmem, so use the same limit on the server. Signed-off-by: Marc-André Lureau --- contrib/ivshmem-server/ivshmem-server.c | 11 ++- contrib/ivshmem-server/ivshmem-server.h | 2 +- 2 files changed, 11 ins

[Qemu-devel] [PATCH v2 18/45] ivshmem: add a warning if eventfd value is 0

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau This should not happen according to eventfd(2). Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 17dc122..6f3d2fe 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c

[Qemu-devel] [PATCH v2 17/45] ivshmem: print error on invalid peer id

2015-07-27 Thread Marc-André 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 --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index ab13f70..17dc122 100644 --- a/hw/misc/iv

[Qemu-devel] [PATCH v2 36/45] contrib: remove unnecessary strdup()

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau getopt() optarg points to argv memory, no need to dup those values, fixes small leaks detected by clang-analyzer. Signed-off-by: Marc-André Lureau --- contrib/ivshmem-client/main.c | 2 +- contrib/ivshmem-server/main.c | 6 +++--- 2 files changed, 4 insertions(+), 4 del

[Qemu-devel] [PATCH v2 29/45] ivshmem: reset mask on device reset

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The interrupt mask is a state value, it should be reset, like the value. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index ade7456..47a65a2 100644 --- a/hw/misc/ivshmem.

[Qemu-devel] [PATCH v2 16/45] ivshmem: improve error

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The test whether the chardev is an AF_UNIX socket rejects "-chardev socket,id=chr0,path=/tmp/foo,server,nowait -device ivshmem,chardev=chr0", but fails to explain why. Use an explicit error on why a chardev may be rejected. Signed-off-by: Marc-André Lureau --- hw/misc/

[Qemu-devel] [PATCH v2 15/45] ivshmem: improve debug messages

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Some misc improvements to ivshmem debug. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 4958307..0cc5682 100644 --- a/hw/misc/ivshmem.c +++

[Qemu-devel] [PATCH v2 27/45] ivshmem: replace 'guest' for 'peer' appropriately

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau The terms 'guest' and 'peer' are used sometime interchangeably which may be confusing. Instead, use 'peer' for the remote instances of ivshmem clients, and 'guest' for the local VM. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 28 ++--

[Qemu-devel] [PATCH v2 30/45] contrib: add ivshmem client and server

2015-07-27 Thread Marc-André 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] [PATCH v2 14/45] ivshmem: remove max_peer field

2015-07-27 Thread Marc-André 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] [PATCH v2 13/45] ivshmem: initialize max_peer to -1

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau There is no peer when device is initialized, do not accept doorbell for peer 0. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 9776e4e..2c78dee 10

[Qemu-devel] [PATCH v2 20/45] ivshmem: use common return

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Both if branches return, move this out to common end. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 84d8ff1..8fcdd60 100644 --- a/hw/misc/ivshmem.c

[Qemu-devel] [PATCH v2 25/45] ivshmem: add device description

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index b8167d9..2e9320b 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -889,6 +889,7 @@ static void ivshmem_class_in

[Qemu-devel] [PATCH v2 10/45] ivshmem: remove last exit(1)

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Failing to create a chardev shouldn't be fatal. Signed-off-by: Marc-André Lureau --- 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 3af73a5..7ba93c0 100644 --- a/hw/misc/ivshmem.c +++ b/h

[Qemu-devel] [PATCH v2 11/45] ivshmem: increase_dynamic_storage() improvements

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau - rename the function resize_peers() to better reflect the content - limit the maximum number of peers to IVSHMEM_MAX_PEERS as MAXUINT16, which is more realistic and also better reflects the limit of the doorbell register. - change the argument to be the size, not the 0-

[Qemu-devel] [PATCH v2 08/45] ivshmem: remove useless doorbell field

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 5e4b2cc..1b8204e 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -71,7 +71,6 @@ typedef struct IVShmemState {

[Qemu-devel] [PATCH v2 19/45] ivshmem: beautify a bit the code

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Use more explicit variables. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 6f3d2fe..84d8ff1 100644 --- a/hw/misc/ivshmem

[Qemu-devel] [PATCH v2 04/45] ivshmem: fix number of bytes to push to fifo

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau If the fifo has 0 bytes, and the read is of size 1, the call to fifo8_push_all() will copy out of bounds data. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.

[Qemu-devel] [PATCH v2 06/45] ivshmem: remove unnecessary dup()

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau qemu_chr_fe_get_msgfd() transfer ownership, there is no need to dup the fd. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index dd15

[Qemu-devel] [PATCH v2 12/45] ivshmem: remove useless ivshmem_update_irq() val argument

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau val isn't used in ivshmem_update_irq() function. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 66f9c0b..9776e4e 100644 --- a/hw/misc/ivshmem.

[Qemu-devel] [PATCH v2 07/45] ivshmem: remove superflous ivshmem_attr field

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index fbeb731..5e4b2cc 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -85,7 +85,6

[Qemu-devel] [PATCH v2 03/45] ivhsmem: read do not accept more than sizeof(long)

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau ivshmem_read() only reads sizeof(long) from the input buffer. Accepting more could lead to fifo8 abort() on x86 if it's not empty. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem

[Qemu-devel] [PATCH v2 01/45] char: add qemu_chr_free()

2015-07-27 Thread Marc-André 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 --- include/sysemu/char.h | 10 +- qemu-ch

[Qemu-devel] [PATCH v2 09/45] ivshmem: more qdev conversion

2015-07-27 Thread Marc-André 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 --- hw/misc/ivshmem.c | 119 +++---

[Qemu-devel] [PATCH v2 05/45] ivshmem: factor out the incoming fifo handling

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau Make a new function fifo_update_and_get() that can be reused by other part of the functions. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 59 --- 1 file changed, 39 insertions(+), 20 deletions(-) diff --gi

[Qemu-devel] [PATCH v2 02/45] msix: add VMSTATE_MSIX_TEST

2015-07-27 Thread Marc-André Lureau
From: Marc-André Lureau ivshmem is going to use MSIX state conditionally. Signed-off-by: Marc-André Lureau --- include/hw/pci/msix.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h index 954d82b..72e5f93 100644

[Qemu-devel] [PATCH v2 00/45] ivshmem improvements (for 2.5)

2015-07-27 Thread Marc-André Lureau
Hi, This series is mostly about adding the client/server code from David Marchand, code cleanups, and little improvements for ivshmem. Finally there is some ivshmem tests (they work fine without kvm). The first series didn't get much feedback. As suggested by Andrew Jones, this second version add

Re: [Qemu-devel] [PATCH 0/4] hw/net: fix m68/ColdFire ethernet fec support

2015-07-27 Thread Greg Ungerer
Hi Stefan, On 27/07/15 23:11, Stefan Hajnoczi wrote: > On Tue, Jun 30, 2015 at 03:38:11PM +1000, Greg Ungerer wrote: >> Hi Stefan, >> >> On 26/06/15 20:12, Stefan Hajnoczi wrote: >>> On Fri, Jun 26, 2015 at 03:27:12PM +1000, g...@uclinux.org wrote: The following set of patches fixes the

Re: [Qemu-devel] [PATCH 3/5] qapi: add qapi2texi script

2015-07-27 Thread Marc-André Lureau
Hi - Original Message - > On 07/03/2015 03:51 AM, Marc-André Lureau wrote: > > From: Marc-André Lureau > > > > As the name suggests, the qapi2texi script converts JSON QAPI > > description into a standalone texi file suitable for different target > > formats. > > > > As the documentatio

Re: [Qemu-devel] [PATCH 5/5] build-sys: generate QAPI doc based on json

2015-07-27 Thread Eric Blake
On 07/03/2015 03:51 AM, Marc-André Lureau wrote: > Learn to generate info/html/pdf/man documentation for QEMU and agent QMP > APIs. > > This allows to provide missing agent documentation, and should help s/allows to provide/provides/ > getting rid of the duplicate documentation in qmp-commands.h

Re: [Qemu-devel] [PATCH 3/5] qapi: add qapi2texi script

2015-07-27 Thread Eric Blake
On 07/03/2015 03:51 AM, Marc-André Lureau wrote: > From: Marc-André Lureau > > As the name suggests, the qapi2texi script converts JSON QAPI > description into a standalone texi file suitable for different target > formats. > > As the documentation format doesn't seem to be specified, it parses

Re: [Qemu-devel] [PATCH] xen: Drop net_rx_ok

2015-07-27 Thread Chen Gang
On 7/27/15 21:16, Stefan Hajnoczi wrote: > On Mon, Jul 20, 2015 at 06:12:09PM +0100, Stefan Hajnoczi wrote: >> On Thu, Jul 02, 2015 at 01:39:16PM +0100, Stefan Hajnoczi wrote: >>> On Tue, Jun 30, 2015 at 10:42:37AM +0800, Fam Zheng wrote: This is necessary because once we return false from .ca

Re: [Qemu-devel] [PATCH 1/5] qapi: add comment block before ChardevDummy

2015-07-27 Thread Eric Blake
On 07/03/2015 03:51 AM, Marc-André Lureau wrote: > This is mainly to please the doc generation that requires comment block > before the declaration. > > Signed-off-by: Marc-André Lureau > --- > qapi-schema.json | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/qapi-

Re: [Qemu-devel] [PULL 18/19] macio: move unaligned DMA write code into separate pmac_dma_write() function

2015-07-27 Thread Aurelien Jarno
On 2015-05-22 15:59, John Snow wrote: > From: Mark Cave-Ayland > > Similarly switch the macio IDE routines over to use the new function and > tidy-up the remaining code as required. > > [Maintainer edit: printf format codes adjusted for 32/64bit. --js] > > Signed-off-by: Mark Cave-Ayland > Ack

Re: [Qemu-devel] [PATCH] qmp-shell: add documentation

2015-07-27 Thread Eric Blake
On 07/26/2015 09:30 PM, John Snow wrote: > > It's a giant circle of people just barely out of the loop. During the > 2.4 window I augmented the QMP shell tool to be able to issue > transactional commands, and improved the json/python parsing for the > key=value pairs. > > It was primarily motiva

Re: [Qemu-devel] [PATCH RFC v2 27/47] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs

2015-07-27 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > Fixes flat unions to visit the base's base members (the previous > commit merely added them to the struct). Same test case. > > Patch's effect on visit_type_UserDefFlatUnion(): > > static void visit_type_UserDefFlatUnion_fields(Visitor *m,

Re: [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions

2015-07-27 Thread Eric Blake
On 07/24/2015 06:01 AM, Markus Armbruster wrote: >> It might be worth tweaking the generator to output a C comment either >> here (at the start of the larger struct)... >> >>> char *string; >>> EnumOne enum1; >> >> ...or here (at the end of the base struct) mentioning that >> UserD

[Qemu-devel] [RFC PATCH 1/2] vnc: hoist allocation of VncBasicInfo to callers

2015-07-27 Thread Eric Blake
A future qapi patch will rework generated structs with a base class to be unboxed. In preparation for that, change the code that allocates then populates an info struct to instead merely populate the fields of an info field passed in as a parameter. Add rudimentary Error handling for cases where t

[Qemu-devel] [RFC PATCH 2/2] qapi: unbox base members

2015-07-27 Thread Eric Blake
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. This gives less malloc overhead, less pointer dereferencing, and even less generated code. Signed-off-by: Eric Blake --- N

[Qemu-devel] [RFC PATCH 0/2] qapi: unbox base classes

2015-07-27 Thread Eric Blake
Depends on Markus' "[PATCH RFC v2 00/47] qapi: QMP introspection", in particular, based on an idea in 7/47 of that series. Note that if we do this, we must fix patch 27/47 of that series to never omit members of a struct when visiting that struct's fields (that is, the base class of a flat union m

Re: [Qemu-devel] [PULL for-2.4 0/2] tcg fixes

2015-07-27 Thread Peter Maydell
d391419c0039fe274c74df32a6ca1a28: > > Merge remote-tracking branch > 'remotes/jnsnow/tags/cve-2015-5154-pull-request' into staging (2015-07-27 > 13:10:00 +0100) > > are available in the git repository at: > > git://github.com/rth7680/

[Qemu-devel] [PATCH] virtio: minor cleanup

2015-07-27 Thread Michael S. Tsirkin
There's no need for blk to set ANY_LAYOUT, it's done by virtio core as necessary. Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 44f9b8e..1556c9c 100644 --- a/hw/block/virtio-blk.c

Re: [Qemu-devel] [PULL 01/10] hw/acpi/ich9: clear smi_en on reset

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 11:50:08PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 27, 2015 at 10:54:04PM +0300, Michael Tokarev wrote: > > From: Laszlo Ersek > > > > Otherwise on reboot firmware might think (due to APMC_EN remaining set > > from the previous boot) that SMI support is absent. > >

Re: [Qemu-devel] [PULL 01/10] hw/acpi/ich9: clear smi_en on reset

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 10:54:04PM +0300, Michael Tokarev wrote: > From: Laszlo Ersek > > Otherwise on reboot firmware might think (due to APMC_EN remaining set > from the previous boot) that SMI support is absent. > > Cc: "Michael S. Tsirkin" > Cc: Igor Mammedov > Cc: Gerd Hoffmann > Cc: Pao

Re: [Qemu-devel] [Bug 1478360] Re: Cant compile on ubuntu 14.04 x64

2015-07-27 Thread Peter Maydell
On 27 July 2015 at 21:09, Vido <1478...@bugs.launchpad.net> wrote: > Tnx Peter, just one quick question how should I configure qemu to > disable threding I cant find any option with ./configure --help I'm not sure why you think that's related to this bug. There's no option to disable threading bec

[Qemu-devel] [Bug 1478360] Re: Cant compile on ubuntu 14.04 x64

2015-07-27 Thread Vido
Tnx Peter, just one quick question how should I configure qemu to disable threding I cant find any option with ./configure --help -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1478360 Title: Cant c

  1   2   3   4   >