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

2015-07-27 Thread Stefan Hajnoczi
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 emulated ColdFire ethernet fec > >> driver. There is prima

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

2015-07-27 Thread Stefan Hajnoczi
On Fri, Jun 26, 2015 at 03:27:12PM +1000, g...@uclinux.org wrote: > > The following set of patches fixes the emulated ColdFire ethernet fec > driver. There is primarily two problems that need to be fixed. > > 1. The emulated driver needs to support probing of an attached phy. >It is strait fo

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

2015-07-27 Thread Stefan Hajnoczi
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 .can_receive, we > > > need to flush the queue

Re: [Qemu-devel] [PATCH 1/9] netdev: Add a net filter

2015-07-27 Thread Yang Hongyang
On 07/27/2015 08:38 PM, Thomas Huth wrote: On 24/07/15 12:55, Yang Hongyang wrote: This patch add a net filter between network backend and NIC devices. All packets will pass by this filter. TODO: multiqueue support. +--+ +-+ +--+ |

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

2015-07-27 Thread Daniel P. Berrange
On Mon, Jul 27, 2015 at 03:03:26PM +0200, Markus Armbruster wrote: > Pavel Fedin writes: > > > Avoid repetitive lookup of every property in array starting from 0 by adding > > one more property which caches last used index. Every time an array is > > expanded the index is picked up from this cach

Re: [Qemu-devel] [PATCH 0/9] For QEMU 2.5: Add a net filter and a netbuffer plugin based on the filter

2015-07-27 Thread Yang Hongyang
Hi, Thank you for the comment! On 07/27/2015 06:32 PM, Daniel P. Berrange wrote: On Sun, Jul 26, 2015 at 10:13:55PM +0800, Yang Hongyang wrote: [...] Which is a little verbose for 'netdev' option. It's just the name diffrence, using netfilter will be -netfilter ... -netfilter ... using p

Re: [Qemu-devel] [Qemu-stable] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread John Snow
On 07/27/2015 08:10 AM, Stefan Priebe - Profihost AG wrote: > > Am 27.07.2015 um 14:01 schrieb John Snow: >> The following changes since commit f793d97e454a56d17e404004867985622ca1a63b: >> >> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into >> staging (2015-07-24 13:07:10

Re: [Qemu-devel] [RFC PATCH 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 08:55, Fam Zheng wrote: > On Fri, 07/24 09:35, Paolo Bonzini wrote: >>> That way, aio_context_acquire can be dropped by: >>> >>> /* @pause_owner_thread: a callback which will be called when _main >>> thread_ >>> * wants exclusively operate on the AioContext, for example wi

[Qemu-devel] [PATCH] virtio-pci: fix memory MR cleanup for modern

2015-07-27 Thread Michael S. Tsirkin
Each memory_region_add_subregion must be paired with memory_region_del_subregion. Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index db8f27c..c024161 100644 --- a/

Re: [Qemu-devel] [Qemu-stable] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread Stefan Priebe - Profihost AG
Am 27.07.2015 um 14:28 schrieb John Snow: > > > On 07/27/2015 08:10 AM, Stefan Priebe - Profihost AG wrote: >> >> Am 27.07.2015 um 14:01 schrieb John Snow: >>> The following changes since commit f793d97e454a56d17e404004867985622ca1a63b: >>> >>> Merge remote-tracking branch 'remotes/bonzini/tag

Re: [Qemu-devel] [PATCH v3] hw/arm/virt: Add high MMIO PCI region

2015-07-27 Thread Igor Mammedov
On Mon, 27 Jul 2015 14:09:28 +0300 Pavel Fedin wrote: > This large region is necessary for some devices like ivshmem and video cards > > Signed-off-by: Pavel Fedin > --- > Changes since v2: > - Region size increased to 512G > - Added ACPI description > Changes since v1: > - Region address chang

Re: [Qemu-devel] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Cornelia Huck
On Mon, 27 Jul 2015 14:22:37 +0300 "Michael S. Tsirkin" wrote: > On Mon, Jul 27, 2015 at 12:30:19PM +0200, Paolo Bonzini wrote: > > > > > > On 27/07/2015 11:49, Jason Wang wrote: > > > So this patch only clear VIRTIO_F_LAYOUT for legacy device. > > > > > > Cc: Stefan Hajnoczi > > > Cc: Kevin

Re: [Qemu-devel] [PATCH] virtio-pci: fix memory MR cleanup for modern

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 15:24, Michael S. Tsirkin wrote: > +static void virtio_pci_modern_region_unmap(VirtIOPCIProxy *proxy, > + VirtIOPCIRegion *region) > +{ > +memory_region_del_subregion(&proxy->modern_bar, > +®ion->mr); > +}

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Jan Kiszka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2015-07-27 12:13, Stefan Hajnoczi wrote: > On Tue, Jul 21, 2015 at 10:49:29AM +0100, Stefan Hajnoczi wrote: >> On Tue, Jul 21, 2015 at 08:13:42AM +0200, Jan Kiszka wrote: >>> On 2015-07-20 17:01, Stefan Hajnoczi wrote: On Mon, Jul 20, 2015 at 2

Re: [Qemu-devel] [Qemu-stable] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread Kevin Wolf
Am 27.07.2015 um 15:25 hat Stefan Priebe - Profihost AG geschrieben: > > Am 27.07.2015 um 14:28 schrieb John Snow: > > > > > > On 07/27/2015 08:10 AM, Stefan Priebe - Profihost AG wrote: > >> > >> Am 27.07.2015 um 14:01 schrieb John Snow: > >>> The following changes since commit > >>> f793d97e4

Re: [Qemu-devel] [PATCH v2 for-2.5 05/12] tcg/optimize: track const/copy status separately

2015-07-27 Thread Aurelien Jarno
On 2015-07-27 13:26, Paolo Bonzini wrote: > > > On 27/07/2015 12:56, Aurelien Jarno wrote: > > temps[dst].next_copy = temps[src].next_copy; > > temps[dst].prev_copy = src; > > temps[temps[dst].next_copy].prev_copy = dst; > > temps[src].next_copy = dst; Note th

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-27 Thread Yang Hongyang
Hi Dave, Thanks for the comments! On 07/27/2015 06:40 PM, Dr. David Alan Gilbert wrote: * Yang Hongyang (yan...@cn.fujitsu.com) wrote: Hi Jason, On 07/24/2015 10:12 AM, Jason Wang wrote: On 07/24/2015 10:04 AM, Dong, Eddie wrote: Hi Stefan: Thanks for your comments! On Mon, Ju

[Qemu-devel] [PATCH] megasas: Add write function to handle write access to PCI BAR 3

2015-07-27 Thread Salva Peiró
This patch fixes a QEMU SEGFAULT when a write operation is performed on the memory region of the PCI BAR 3 (base address space). When a writeb(0xe000) is performed the .write function is invoked to handle the write access, however, since the .write is not initialised, the call to 0, causes QEMU

Re: [Qemu-devel] [PATCH v2 for-2.5 05/12] tcg/optimize: track const/copy status separately

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 15:40, Aurelien Jarno wrote: > > temps[dst].next_copy = temps[src].next_copy; > > temps[dst].prev_copy = src; > > temps[temps[dst].next_copy].prev_copy = dst; > > temps[src].next_copy = dst; > > Note that the patch doesn't change this part, it's a

Re: [Qemu-devel] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread Peter Maydell
On 27 July 2015 at 13:01, John Snow 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: > > https://git

Re: [Qemu-devel] [Qemu-stable] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread Peter Lieven
Am 27.07.2015 um 15:38 schrieb Kevin Wolf: Am 27.07.2015 um 15:25 hat Stefan Priebe - Profihost AG geschrieben: Am 27.07.2015 um 14:28 schrieb John Snow: On 07/27/2015 08:10 AM, Stefan Priebe - Profihost AG wrote: Am 27.07.2015 um 14:01 schrieb John Snow: The following changes since commit f

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

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 15:23, Daniel P. Berrange wrote: > It feels like a poor hack to deal with fact that we've not got support > for setting non-scalar properties. Since we're representing arrays > implicitly, See http://lists.gnu.org/archive/html/qemu-devel/2014-10/msg00623.html: -- "

[Qemu-devel] [PULL for-2.4 00/16] Net patches

2015-07-27 Thread Stefan Hajnoczi
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: git://github.com/stefanha/qemu.git tags/net-pull-request for you to

[Qemu-devel] [PULL for-2.4 04/16] hw/net: fix mcf_fec driver receiver

2015-07-27 Thread Stefan Hajnoczi
From: Greg Ungerer The network mcf_fec driver emulated receive side method is returning a result of 0 causing the network layer to disable receive for this emulated device. This results in the guest only ever receiving one packet. Fix the recieve side processing to return the number of bytes tha

[Qemu-devel] [PULL for-2.4 07/16] eepro100: Drop nic_can_receive

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng nic_receive already checks the conditions and drop packets if false. Due to the new semantics since 6e99c63 ("net/socket: Drop net_socket_can_send"), having .can_receive returning 0 requires us to explicitly flush the queued packets when the conditions are becoming true, but queui

[Qemu-devel] [PULL for-2.4 03/16] hw/net: add simple phy support to mcf_fec driver

2015-07-27 Thread Stefan Hajnoczi
From: Greg Ungerer The Linux fec driver needs at least basic phy support to probe and work. The current qemu mcf_fec emulation has no support for the reading or writing of the MDIO lines to access an attached phy. This code adds a very simple set of register results for a fixed phy setup - very

[Qemu-devel] [PULL for-2.4 08/16] usbnet: Drop usbnet_can_receive

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng usbnet_receive already drops packet if rndis_state is not RNDIS_DATA_INITIALIZED, and queues packet if in buffer is not available. The only difference is s->dev.config but that is similar to rndis_state. Drop usbnet_can_receive and move these checks to usbnet_receive, so that we

[Qemu-devel] [PULL for-2.4 06/16] pcnet: Drop pcnet_can_receive

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng pcnet_receive already checks the conditions and drop packets if false. Due to the new semantics since 6e99c63 ("net/socket: Drop net_socket_can_send"), having .can_receive returning 0 requires us to explicitly flush the queued packets when the conditions are becoming true, but que

[Qemu-devel] [PULL for-2.4 13/16] mipsnet: Flush queued packets when receiving is enabled

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng Drop .can_receive and move the semantics to mipsnet_receive, by returning 0. After 0 is returned, we must flush the queue explicitly to restart it: Call qemu_flush_queued_packets when s->busy or s->rx_count is being updated. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi

Re: [Qemu-devel] [Qemu-stable] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread Kevin Wolf
Am 27.07.2015 um 15:46 hat Peter Lieven geschrieben: > Am 27.07.2015 um 15:38 schrieb Kevin Wolf: > > Am 27.07.2015 um 15:25 hat Stefan Priebe - Profihost AG geschrieben: > > Am 27.07.2015 um 14:28 schrieb John Snow: > > > On 07/27/2015 08:10 AM, Stefan Priebe - Profihos

[Qemu-devel] [PULL for-2.4 02/16] hw/net: add ANLPAR bit definitions to generic mii

2015-07-27 Thread Stefan Hajnoczi
From: Greg Ungerer Add a base set of bit definitions for the standard MII phy "Auto-Negotiation Link Partner Ability Register" (ANLPAR). The original definitions moved into mii.h from the allwinner_emac driver did not define these. Signed-off-by: Greg Ungerer Reviewed-by: Stefan Hajnoczi Mess

[Qemu-devel] [PULL for-2.4 10/16] etsec: Flush queue when rx buffer is consumed

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng The BH will be scheduled when etsec->rx_buffer_len is becoming 0, which is the condition of queuing. Signed-off-by: Fam Zheng Reviewed-by: Jason Wang Reviewed-by: Stefan Hajnoczi Message-id: 143693-22791-7-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi ---

[Qemu-devel] [PULL for-2.4 09/16] etsec: Move etsec_can_receive into etsec_receive

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng When etsec_reset returns 0, peer would queue the packet as if .can_receive returns false. Drop etsec_can_receive and let etsec_receive carry the semantics. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Jason Wang Message-id: 143693-22791-6-git-send-ema

[Qemu-devel] [PULL for-2.4 12/16] milkymist-minimac2: Flush queued packets when link comes up

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng Drop .can_receive and move the semantics into minimac2_rx, by returning 0. That is once minimac2_rx returns 0, incoming packets will be queued until the queue is explicitly flushed. We do this when s->regs[R_STATE0] or s->regs[R_STATE1] is changed in minimac2_write. Also drop th

[Qemu-devel] [PULL for-2.4 15/16] dp8393x: Flush packets when link comes up

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng .can_receive callback changes semantics that once return 0, backend will try sending again until explicitly flushed, change the device to meet that. dp8393x_can_receive checks SONIC_CR_RXEN bit in SONIC_CR register and SONIC_ISR_RBE bit in SONIC_ISR register, try flushing the que

[Qemu-devel] [PULL for-2.4 01/16] hw/net: create common collection of MII definitions

2015-07-27 Thread Stefan Hajnoczi
From: Greg Ungerer Create a common set of definitions of address and register values for ethernet MII phys. A few of the current ethernet drivers have at least a partial set of these definitions. Others just use hard coded raw constant numbers. This initial set is copied directly from the allwin

[Qemu-devel] [PULL for-2.4 05/16] xgmac: Drop packets with eth_can_rx is false.

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Reviewed-by: Jason Wang Message-id: 143693-22791-2-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- hw/net/xgmac.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/net/xgm

[Qemu-devel] [PULL for-2.4 11/16] mcf_fec: Drop mcf_fec_can_receive

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng The semantics of .can_receive requires us to flush the queue explicitly when s->rx_enabled becomes true after it returns 0, but the packet being queued is not meaningful since the guest hasn't activated the card. Let's just drop the packet in this case. Signed-off-by: Fam Zheng

[Qemu-devel] [PULL for-2.4 14/16] stellaris_enet: Flush queued packets when read done

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng If s->np reaches 31, the queue will be disabled by peer when it sees stellaris_enet_can_receive() returns false, until we explicitly flushes it which notifies the peer. Do this when guest is done reading all existing data. Move the semantics to stellaris_enet_receive, by returnin

[Qemu-devel] [PULL for-2.4 16/16] axienet: Flush queued packets when rx is done

2015-07-27 Thread Stefan Hajnoczi
From: Fam Zheng eth_can_rx checks s->rxsize and returns false if it is non-zero. Because of the .can_receive semantics change, this will make the incoming queue disabled by peer, until it is explicitly flushed. So we should flush it when s->rxsize is becoming zero. Squash eth_can_rx semantics in

Re: [Qemu-devel] [PATCH RFC v2 21/47] qapi: New QAPISchema intermediate reperesentation

2015-07-27 Thread Eric Blake
On 07/27/2015 03:23 AM, Markus Armbruster wrote: >>> >>> Create a bunch of classes to represent QAPI schemata. >>> >>> Have the QAPISchema initializer call the parser, then walk the syntax >>> tree to create the new internal representation, and finally perform >>> semantic analysis. >>> >>> +clas

Re: [Qemu-devel] [PATCH RFC v2 24/47] tests/qapi-schema: Convert test harness to QAPISchemaVisitor

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> The old code prints the result of parsing (list of expression >> dictionaries), and partial results of semantic analysis (list of enum >> dictionaries, list of struct dictionaries). >> >> The new code prints a trace of a sc

Re: [Qemu-devel] [Qemu-stable] [PULL 0/3] Cve 2015 5154 patches

2015-07-27 Thread Peter Lieven
Am 27.07.2015 um 15:54 schrieb Kevin Wolf: Am 27.07.2015 um 15:46 hat Peter Lieven geschrieben: Am 27.07.2015 um 15:38 schrieb Kevin Wolf: Am 27.07.2015 um 15:25 hat Stefan Priebe - Profihost AG geschrieben: Am 27.07.2015 um 14:28 schrieb John Snow: On 07/27/2015 0

Re: [Qemu-devel] [PATCH RFC v2 22/47] qapi: QAPISchema code generation helper methods

2015-07-27 Thread Eric Blake
On 07/27/2015 03:54 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 07/01/2015 02:22 PM, Markus Armbruster wrote: >>> New methods c_name(), c_type(), c_null(), json_type(), >>> alternate_qtype(). >>> >>> Signed-off-by: Markus Armbruster >>> --- >>> scripts/qapi.py | 72 >>> +++

Re: [Qemu-devel] [PATCH RFC v2 25/47] qapi: Make generators work on sorted schema expressions

2015-07-27 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Order of expressions doesn't matter. QAPISchema().get_exprs() returns >> expressions in the order they're parsed. >> >> I'm going to refactor this code. To check refactorings, I want to >> diff the generated code, and for

Re: [Qemu-devel] [PATCH] virtio-pci: fix memory MR cleanup for modern

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 15:30, Paolo Bonzini wrote: > > > On 27/07/2015 15:24, Michael S. Tsirkin wrote: >> +static void virtio_pci_modern_region_unmap(VirtIOPCIProxy *proxy, >> + VirtIOPCIRegion *region) >> +{ >> +memory_region_del_subregion(&proxy->modern_b

Re: [Qemu-devel] [PATCH v7 37/42] Postcopy; Handle userfault requests

2015-07-27 Thread Amit Shah
On (Tue) 16 Jun 2015 [11:26:50], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > userfaultfd is a Linux syscall that gives an fd that receives a stream > of notifications of accesses to pages registered with it and allows > the program to acknowledge those stalls and tell

[Qemu-devel] [PATCH] memory: do not add a reference to the owner of aliased regions

2015-07-27 Thread Paolo Bonzini
Very often the owner of the aliased region is the same as the owner of the alias region itself. When this happens, the reference count can never go back to 0 and the owner is leaked. This is for example breaking hot-unplug of virtio-pci devices (the device cannot be plugged back again with the s

[Qemu-devel] [PULL for-2.4 2/2] tcg: mark temps as mem_coherent = 0 for mov with a constant

2015-07-27 Thread Richard Henderson
From: Aurelien Jarno When a constant has to be loaded in a mov op, we fail to set mem_coherent = 0. This patch fixes that. Cc: Richard Henderson Signed-off-by: Aurelien Jarno Message-Id: <1437994568-7825-3-git-send-email-aurel...@aurel32.net> Signed-off-by: Richard Henderson --- tcg/tcg.c |

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

2015-07-27 Thread Richard Henderson
-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.git tags/pull-tcg-20150727 for you to fetch changes up to bbeb82395eaca0e3c38b433b2d2a5bad4a5fbd81: tcg: mark temps as mem_coherent = 0 for mov with a

[Qemu-devel] [PULL for-2.4 1/2] tcg: correctly mark dead inputs for mov with a constant

2015-07-27 Thread Richard Henderson
From: Aurelien Jarno When tcg_reg_alloc_mov propagate a constant, we failed to correctly mark a temp as dead if the liveness analysis hints so. This fixes the following assert when configure with --enable-debug-tcg: qemu-x86_64: tcg/tcg.c:1827: tcg_reg_alloc_bb_end: Assertion `ts->val_type ==

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

2015-07-27 Thread Pavel Fedin
Hello! > Do we really want '#' in property names? Elsewhere, we require names to > be id_wellformed(). I already asked this question to Andreas but got no single reply from him. My initial idea was to leave '[*]' as a suffix for this magic property. He only told that he doesn't like it. I a

Re: [Qemu-devel] [PATCH v3] hw/arm/virt: Add high MMIO PCI region

2015-07-27 Thread Pavel Fedin
Hello! > > +/* High MMIO space */ > > +mmio_alias = g_new0(MemoryRegion, 1); > > +memory_region_init_alias(mmio_alias, OBJECT(dev), "pcie-mmio-high", > > + mmio_reg, base_mmio_high, size_mmio_high); > > +memory_region_add_subregion(get_system_memory(),

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

2015-07-27 Thread Pavel Fedin
Hello! > IIUC, the performance problem with object_property_add is caused by > the fact that every time we add a property we have to do a linear > search over every existing property running strcmp to see if the > new property already exists. Yes, exactly. And this linear search gets extremely

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

2015-07-27 Thread Max Reitz
On 27.07.2015 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_handler(),

Re: [Qemu-devel] [PATCH COLO-BLOCK v7 02/17] quorum: implement block driver interfaces add/delete a BDS's child

2015-07-27 Thread Eric Blake
On 07/02/2015 09:21 AM, Alberto Garcia wrote: > >>> 3) I don't think it's necessary to set to NULL the pointers in >>> s->bs[i] when i >= num_children. There's no way to access those >>> pointers anyway. Same for the ' s->bs[s->num_children] = NULL; ' bit >>> in quorum_del_child(). I also think t

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

2015-07-27 Thread Andreas Färber
Hi, Am 27.07.2015 um 16:36 schrieb Pavel Fedin: >> Do we really want '#' in property names? Elsewhere, we require names to >> be id_wellformed(). > > I already asked this question to Andreas but got no single reply from him. > My initial idea was to leave '[*]' as a suffix for this magic prope

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

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 16:57, Andreas Färber wrote: >> > I am absolutely fine with absolutely anything. Suggest what you like and >> > i'll change it. > Paolo suggested ...-count on #qemu, but I would prefer ...-max or so, as > the number could differ when some property gets deleted. Yes, I agree -max

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

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 17:06, Paolo Bonzini wrote: > > > On 27/07/2015 16:57, Andreas Färber wrote: I am absolutely fine with absolutely anything. Suggest what you like and i'll change it. >> Paolo suggested ...-count on #qemu, but I would prefer ...-max or so, as >> the number could differ

Re: [Qemu-devel] [PATCH] memory: do not add a reference to the owner of aliased regions

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 04:31:15PM +0200, Paolo Bonzini wrote: > Very often the owner of the aliased region is the same as the owner of the > alias > region itself. When this happens, the reference count can never go back to 0 > and > the owner is leaked. This is for example breaking hot-unplug

Re: [Qemu-devel] [PULL for-2.4 00/16] Net patches

2015-07-27 Thread Peter Maydell
On 27 July 2015 at 14:51, Stefan Hajnoczi 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: > > git:/

Re: [Qemu-devel] [PATCH v3] hw/arm/virt: Add high MMIO PCI region

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 05:36:07PM +0300, Pavel Fedin wrote: > Hello! > > > > +/* High MMIO space */ > > > +mmio_alias = g_new0(MemoryRegion, 1); > > > +memory_region_init_alias(mmio_alias, OBJECT(dev), "pcie-mmio-high", > > > + mmio_reg, base_mmio_high, si

[Qemu-devel] [PULL for-2.4 1/1] 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

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

2015-07-27 Thread Jeff Cody
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: https://github.com/codyprime/qemu-kvm-jtc.git tags/jtc-for-upstrea

Re: [Qemu-devel] [PATCH] sheepdog: serialize requests to overwrapping area

2015-07-27 Thread Jeff Cody
On Sat, Jul 18, 2015 at 01:44:24AM +0900, Hitoshi Mitake wrote: > 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/

Re: [Qemu-devel] [PATCH V4 3/3] virtio-blk: only clear VIRTIO_F_ANY_LAYOUT for legacy device

2015-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2015 at 03:28:51PM +0200, Cornelia Huck wrote: > On Mon, 27 Jul 2015 14:22:37 +0300 > "Michael S. Tsirkin" wrote: > > > On Mon, Jul 27, 2015 at 12:30:19PM +0200, Paolo Bonzini wrote: > > > > > > > > > On 27/07/2015 11:49, Jason Wang wrote: > > > > So this patch only clear VIRTIO

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

2015-07-27 Thread Pavel Fedin
Hello! > I'm just asking myself whether this is really necessary. Is the > automagic [*] really needed in this case? In this particular case, perhaps, not. However, this automagic is used not only with GPIOs. It is used also with memory regions, as well as with some other places. Also, i t

[Qemu-devel] [RFC] Towards an Heterogeneous QEMU

2015-07-27 Thread Christian Pinto
Hi all, this message is to present, and get feedback, on a QEMU enhancement which we are working on. Most of the state-of-the-art SoCs use the heterogeneous paradigm, in which a Master processor is surrounded by multiple (Slave) co- processors (other CPUs, MCUs, hardware accelerators, etc) tha

Re: [Qemu-devel] [PATCH] sheepdog: serialize requests to overwrapping area

2015-07-27 Thread Vasiliy Tolstov
2015-07-27 18:23 GMT+03:00 Jeff Cody : > Thanks, applied to my block branch: > https://github.com/codyprime/qemu-kvm-jtc/tree/block Thanks! Waiting for adding to qemu rc =) -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru

Re: [Qemu-devel] [PULL v2 for-2.4 v2 5/7] AioContext: fix broken ctx->dispatching optimization

2015-07-27 Thread Stefan Hajnoczi
On Fri, Jul 24, 2015 at 7:46 AM, Cornelia Huck wrote: > On Thu, 23 Jul 2015 21:29:05 +0200 > Christian Borntraeger wrote: > >> Am 23.07.2015 um 21:25 schrieb Paolo Bonzini: >> > >> > >> > On 23/07/2015 21:19, Christian Borntraeger wrote: >> >> Am 23.07.2015 um 20:19 schrieb Paolo Bonzini: >> >>>

[Qemu-devel] [PULL 1/2] block: vpc - prevent overflow if max_table_entries >= 0x40000000

2015-07-27 Thread Kevin Wolf
From: Jeff Cody When we allocate the pagetable based on max_table_entries, we multiply the max table entry value by 4 to accomodate a table of 32-bit integers. However, max_table_entries is a uint32_t, and the VPC driver accepts ranges for that entry over 0x4000. So during this allocation:

[Qemu-devel] [PULL 0/2] Block layer patches for 2.4.0-rc3

2015-07-27 Thread Kevin Wolf
The following changes since commit 122e7dab8ac549c8c5a9e1e13aa2464190e888de: Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2015-07-27 14:53:42 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

[Qemu-devel] [PATCH v9 00/10] qcow2: Support refcount order amendment

2015-07-27 Thread Max Reitz
(v1..v7 were named "qcow2: Support refcount orders != 4") This series contains the final 10 patches of my qcow2 refcount order series, which add refcount order amendment functionality to qemu-img. v9: - Rebase on master - Patch 8: s/qerror_report_err/error_report_err/ git backport-diff against

[Qemu-devel] [PATCH v9 04/10] qcow2: Use abort() instead of assert(false)

2015-07-27 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3bcb96e..a7f50db 100644 --- a/block/qcow2.c +++ b/block/qcow2.

Re: [Qemu-devel] [PATCH v3] hw/arm/virt: Add high MMIO PCI region

2015-07-27 Thread Peter Maydell
On 27 July 2015 at 16:18, Michael S. Tsirkin wrote: > It's more a question of figuring out what does real hardware do. > It's true, PIIX has this "everything that isn't memory is PCI" > assumption. We do this for Q35 but I'm not even sure it's the > right thing to do there. > > If as you say real

[Qemu-devel] [PATCH v9 01/10] progress: Allow regressing progress

2015-07-27 Thread Max Reitz
Progress may regress; this should be displayed correctly by qemu_progress_print(). While touching that area of code, drop the redundant parentheses in the same condition. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- util/qemu-progress.c | 3 ++- 1 file cha

[Qemu-devel] [PATCH v9 10/10] iotests: Extend test 112 for qemu-img amend

2015-07-27 Thread Max Reitz
Add tests for conversion between different refcount widths. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/112 | 109 + tests/qemu-iotests/112.out | 71 + 2 files changed, 180 insertions(+) di

[Qemu-devel] [PATCH v9 08/10] qcow2: Invoke refcount order amendment function

2015-07-27 Thread Max Reitz
Make use of qcow2_change_refcount_order() to support changing the refcount order with qemu-img amend. Signed-off-by: Max Reitz --- block/qcow2.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 8

[Qemu-devel] [PATCH v9 09/10] qcow2: Point to amend function in check

2015-07-27 Thread Max Reitz
If a reference count is not representable with the current refcount order, the image check should point to qemu-img amend for increasing the refcount order. However, qemu-img amend needs write access to the image which cannot be provided if the image is marked corrupt; and the image check will not

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

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 17:19, Pavel Fedin wrote: >>> I'm just asking myself whether this is really necessary. Is the >>> automagic [*] really needed in this case? > In this particular case, perhaps, not. However, this automagic is > used not only with GPIOs. It is used also with memory regions, as > wel

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/01/2015 02:22 PM, Markus Armbruster wrote: >> Fixes flat unions to get the base's base members. Test case is from >> commit 2fc0043, in qapi-schema-test.json: >> > >> >> Flat union visitors remain broken. They'll be fixed next. > > Sadly, the generated files had a h

Re: [Qemu-devel] [PATCH v9 08/10] qcow2: Invoke refcount order amendment function

2015-07-27 Thread Eric Blake
On 07/27/2015 09:51 AM, Max Reitz wrote: > Make use of qcow2_change_refcount_order() to support changing the > refcount order with qemu-img amend. > > Signed-off-by: Max Reitz > --- > block/qcow2.c | 44 +++- > 1 file changed, 35 insertions(+), 9 deletions

Re: [Qemu-devel] [PATCH] configure: Work around broken static pkg-config info for Ubuntu gnutls

2015-07-27 Thread Peter Maydell
On 24 July 2015 at 18:35, Daniel P. Berrange wrote: > On Fri, Jul 24, 2015 at 06:28:08PM +0100, Peter Maydell wrote: >> Unfortunately Ubuntu's pkg-config information for gnutls is broken >> for the static linking case, and outputs --libs options which the >> compiler does not recognize. Work aroun

[Qemu-devel] [PATCH v9 06/10] qcow2: Use intermediate helper CB for amend

2015-07-27 Thread Max Reitz
If there is more than one time-consuming operation to be performed for qcow2_amend_options(), we need an intermediate CB which coordinates the progress of the individual operations and passes the result to the original status callback. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by

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

2015-07-27 Thread Eric Blake
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 making the diff > of the gene

[Qemu-devel] [PATCH] raw-posix.c: Make GetBSDPath() handle caching options

2015-07-27 Thread Programmingkid
Add support for caching options that can be specified from the command line. Signed-off-by: John Arbuckle --- block/raw-posix.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index cbe6574..67d1d48 100644 --- a/block

[Qemu-devel] [PATCH v9 03/10] qcow2: Use error_report() in qcow2_amend_options()

2015-07-27 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- block/qcow2.c | 14 ++ tests/qemu-iotests/061.out | 14 +++--- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 4051fdd..3bcb96e

[Qemu-devel] [PATCH for-2.4 0/2] AioContext: fix deadlock after aio_context_acquire() race

2015-07-27 Thread Stefan Hajnoczi
See Patch 2 for details on the deadlock after two aio_context_acquire() calls race. This caused dataplane to hang on startup. Patch 1 is a memory leak fix for AioContext that's needed by Patch 2. Stefan Hajnoczi (2): AioContext: avoid leaking BHs on cleanup AioContext: force event loop itera

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/01/2015 02:22 PM, Markus Armbruster wrote: >> Fixes flat unions to get the base's base members. Test case is from >> commit 2fc0043, in qapi-schema-test.json: >> > > Okay, I see a cause for part of my confusion. > >> >> +class QAPISchemaGenTypeVisitor(QAPISchemaVisi

Re: [Qemu-devel] [PATCH RFC v2 47/47] qapi-introspect: Hide type names

2015-07-27 Thread Eric Blake
On 07/23/2015 09:44 PM, Eric Blake wrote: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> To eliminate the temptation for clients to look up types by name >> (which are not ABI), replace all type names by meaningless strings. >> >> Reduces output of query-schema by 9 out of 80KiB. > > I'm no

[Qemu-devel] [PATCH v9 05/10] qcow2: Split upgrade/downgrade paths for amend

2015-07-27 Thread Max Reitz
If the image version should be upgraded, that is the first we should do; if it should be downgraded, that is the last we should do. So split the version change block into an upgrade part at the start and a downgrade part at the end. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: S

[Qemu-devel] [PATCH v9 07/10] qcow2: Add function for refcount order amendment

2015-07-27 Thread Max Reitz
Add a function qcow2_change_refcount_order() which allows changing the refcount order of a qcow2 image. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 447 + block/qcow2.h | 4 + 2 files changed, 451 inser

[Qemu-devel] [PATCH v9 02/10] block: Add opaque value to the amend CB

2015-07-27 Thread Max Reitz
Add an opaque value which is to be passed to the bdrv_amend_options() status callback. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block.c | 4 ++-- block/qcow2-cluster.c | 14 -- block/qcow2.c | 9 +

[Qemu-devel] [PULL 2/2] block: qemu-iotests - add check for multiplication overflow in vpc

2015-07-27 Thread Kevin Wolf
From: Jeff Cody This checks that VPC is able to successfully fail (without segfault) on an image file with a max_table_entries that exceeds 0x4000. This table entry is within the valid range for VPC (although too large for this sample image). Cc: qemu-sta...@nongnu.org Signed-off-by: Jeff C

[Qemu-devel] [PATCH v5] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-27 Thread Programmingkid
Mac OS X can be picky when it comes to allowing the user to use physical devices in QEMU. Most mounted volumes appear to be off limits to QEMU. If an issue is detected, a message is displayed showing the user how to unmount a volume. Signed-off-by: John Arbuckle --- Removed changes to GetBSDPath

[Qemu-devel] [PATCH] qapi: use 'type' in generated C code to match QMP union wire form

2015-07-27 Thread Eric Blake
When dealing with simple qapi unions, the code was generating a discriminator field of 'kind' even though the discriminator is sent as 'type' over QMP. Renaming things to match gets us one step closer to reusing common generator code for both simple and flat unions, without having to special case

Re: [Qemu-devel] [PATCH v7 21/42] postcopy: OS support test

2015-07-27 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Tue) 16 Jun 2015 [11:26:34], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Provide a check to see if the OS we're running on has all the bits > > needed for postcopy. > > > > Creates postcopy-ram.c which will get mo

Re: [Qemu-devel] [PATCH for-2.4 2/2] AioContext: force event loop iteration using BH

2015-07-27 Thread Paolo Bonzini
On 27/07/2015 18:33, Stefan Hajnoczi wrote: > The notify_me optimization introduced in commit eabc97797310 > ("AioContext: fix broken ctx->dispatching optimization") skips > event_notifier_set() calls when the event loop thread is not blocked in > ppoll(2). > > This optimization causes a deadloc

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

[Qemu-devel] [PATCH for-2.4 2/2] AioContext: force event loop iteration using BH

2015-07-27 Thread Stefan Hajnoczi
The notify_me optimization introduced in commit eabc97797310 ("AioContext: fix broken ctx->dispatching optimization") skips event_notifier_set() calls when the event loop thread is not blocked in ppoll(2). This optimization causes a deadlock if two aio_context_acquire() calls race. notify_me = 0

<    1   2   3   4   >