Re: [Qemu-devel] [Qemu-arm] [PATCH 0/4] cpu: Implement cpu_generic_new()

2017-06-27 Thread Igor Mammedov
On Mon, 26 Jun 2017 23:33:48 -0300 Eduardo Habkost wrote: > On Mon, Jun 26, 2017 at 02:28:13PM +0100, Alex Bennée wrote: > > > > Peter Maydell writes: > > > > > This patchset adds a new function cpu_generic_new() > > > which is similar to

Re: [Qemu-devel] [PATCH v4 3/3] migration: add bitmap for received page

2017-06-27 Thread Alexey
On Tue, Jun 27, 2017 at 12:03:10PM +0800, Peter Xu wrote: > On Mon, Jun 26, 2017 at 11:35:20AM +0300, Alexey Perevalov wrote: > > This patch adds ability to track down already received > > pages, it's necessary for calculation vCPU block time in > > postcopy migration feature, maybe for restore

Re: [Qemu-devel] [RFC PATCH 0/2] Enhance block status when crossing EOF

2017-06-27 Thread Fam Zheng
On Thu, 05/04 21:14, Eric Blake wrote: > Thus, this is a followup to that series, but I'm also okay if we > think it is too much maintenance compared to the potential gains, > and decide to drop it after all. The comments are good enough and I like how this makes the function interface a bit more

Re: [Qemu-devel] [PATCH v4 2/3] Add memfd based hostmem

2017-06-27 Thread Marc-André Lureau
Hi Eduardo On Fri, Jun 23, 2017 at 11:09 PM Eduardo Habkost wrote: > On Wed, Jun 21, 2017 at 04:02:18PM +0200, Marc-André Lureau wrote: > > Add a new memory backend, similar to hostmem-file, except that it > > doesn't need to create files. It also enforces memory sealing. >

Re: [Qemu-devel] [PATCH v6 8/8] vmdk: Make vmdk_get_cluster_offset() return cluster offset only

2017-06-27 Thread Fam Zheng
On Mon, 06/05 13:22, Ashijeet Acharya wrote: > vmdk_alloc_clusters() introduced earlier now handles the task of > allocating clusters and performing COW when needed. Thus we can change > vmdk_get_cluster_offset() to stick to the sole purpose of returning > cluster offset using sector number.

Re: [Qemu-devel] [PATCH v6 7/8] vmdk: Update metadata for multiple clusters

2017-06-27 Thread Fam Zheng
On Mon, 06/05 13:22, Ashijeet Acharya wrote: > Include a next pointer in VmdkMetaData struct to point to the previous > allocated L2 table. Modify vmdk_L2update to start updating metadata for > allocation of multiple clusters at once. > > Signed-off-by: Ashijeet Acharya

Re: [Qemu-devel] [RFC PATCH 0/4] travis: run all coccinelle scripts

2017-06-27 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Another item from my 'automated testing' list: use travis-ci to run coccinelle > scripts. This series is more of a PoC. The idea would be to run it once a day > only on /master. > > Patch 1 is here only to speedup travis testing. > > Patch 3 add

Re: [Qemu-devel] [RFC 1/5] vfio: introduce a new VFIO region for migration support

2017-06-27 Thread Zhang, Yulei
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, June 27, 2017 4:19 AM > To: Zhang, Yulei > Cc: qemu-devel@nongnu.org; Tian, Kevin ; > joonas.lahti...@linux.intel.com; zhen...@linux.intel.com;

Re: [Qemu-devel] [PATCH v6 7/8] vmdk: Update metadata for multiple clusters

2017-06-27 Thread Fam Zheng
On Mon, 06/05 13:22, Ashijeet Acharya wrote: > @@ -1876,6 +1942,13 @@ static int vmdk_pwritev(BlockDriverState *bs, uint64_t > offset, > offset += n_bytes; > bytes_done += n_bytes; > > +while (m_data->next != NULL) { If you do while (m_data) { > +

Re: [Qemu-devel] [PATCH v5 3/4] net/net: Convert parse_host_port() to Error

2017-06-27 Thread Markus Armbruster
Mao Zhongyi writes: > Cc: berra...@redhat.com > Cc: kra...@redhat.com > Cc: pbonz...@redhat.com > Cc: jasow...@redhat.com > Cc: arm...@redhat.com > Signed-off-by: Mao Zhongyi > --- > include/qemu/sockets.h | 3 ++- > net/net.c

Re: [Qemu-devel] [PATCH v6 6/8] vmdk: New functions to assist allocating multiple clusters

2017-06-27 Thread Fam Zheng
On Mon, 06/05 13:22, Ashijeet Acharya wrote: > +/* > + * vmdk_handle_alloc > + * > + * Allocate new clusters for an area that either is yet unallocated or needs > a > + * copy on write. If *cluster_offset is non_zero, clusters are only > allocated if > + * the new allocation can match the

Re: [Qemu-devel] [PATCH v5 2/4] net/socket: Convert error message to Error

2017-06-27 Thread Markus Armbruster
Suggest "net/socket: Convert several helper functions to Error". Mao Zhongyi writes: > Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and > net_socket_fd_init() use the function such as fprintf(), perror() to > report an error message. > > Now,

Re: [Qemu-devel] [PATCH v3 00/10] Clock framework API.

2017-06-27 Thread KONRAD Frederic
Le 06/23/2017 à 03:58 PM, Peter Maydell a écrit : On 23 June 2017 at 14:07, KONRAD Frederic wrote: Le 06/23/2017 à 02:47 PM, Peter Maydell a écrit : Each device "owns" its output clock objects, but input clocks are just pointers to the clock object owned by the

Re: [Qemu-devel] [PATCH v4 3/4] virtio-9p: break device if buffers are misconfigured

2017-06-27 Thread Greg Kurz
On Mon, 26 Jun 2017 16:22:23 -0700 (PDT) Stefano Stabellini wrote: > On Fri, 23 Jun 2017, Greg Kurz wrote: > > The 9P protocol is transport agnostic: if the guest misconfigured the > > buffers, the best we can do is to set the broken flag on the device. > > > > Since

Re: [Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-06-27 Thread Auger Eric
Hi Jean-Philippe, On 26/06/2017 18:13, Jean-Philippe Brucker wrote: > On 26/06/17 09:22, Auger Eric wrote: >> Hi Jean-Philippe, >> >> On 19/06/2017 12:15, Jean-Philippe Brucker wrote: >>> On 19/06/17 08:54, Bharat Bhushan wrote: Hi Eric, I started added replay in virtio-iommu and

[Qemu-devel] [PATCH v7 9/9] i386/kvm/pci-assign: Use errp directly rather than local_err

2017-06-27 Thread Mao Zhongyi
In assigned_device_pci_cap_init(), first, error messages are filled to a local_err variable, then through error_propagate() pass to the parameter of errp. It leads to cumbersome code. In order to avoid the extra local_err and error_propagate(), drop it and use errp instead. Cc:

[Qemu-devel] [PATCH v7 2/9] pci: Add comment for pci_add_capability2()

2017-06-27 Thread Mao Zhongyi
Comments for pci_add_capability2() to explain the return value. This may help to make a correct return value check for its callers. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum

[Qemu-devel] [PATCH v7 5/9] pci: Replace pci_add_capability2() with pci_add_capability()

2017-06-27 Thread Mao Zhongyi
After the patch 'Make errp the last parameter of pci_add_capability()', pci_add_capability() and pci_add_capability2() now do exactly the same. So drop the wrapper pci_add_capability() of pci_add_capability2(), then replace the pci_add_capability2() with pci_add_capability() everywhere. Cc:

[Qemu-devel] [PATCH v7 6/9] pci: Convert to realize

2017-06-27 Thread Mao Zhongyi
Convert i82801b11, io3130_upstream, io3130_downstream and pcie_root_port devices to realize. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum --- hw/pci-bridge/i82801b11.c

[Qemu-devel] [PATCH v7 8/9] i386/kvm/pci-assign: Fix return type of verify_irqchip_kernel()

2017-06-27 Thread Mao Zhongyi
When the function no success value to transmit, it usually make the function return void. It has turned out not to be a success, because it means that the extra local_err variable and error_propagate() will be needed. It leads to cumbersome code, therefore, transmit success/ failure in the return

[Qemu-devel] [PATCH v7 3/9] pci: Fix the wrong assertion.

2017-06-27 Thread Mao Zhongyi
pci_add_capability returns a strictly positive value on success, correct asserts. Cc: dmi...@daynix.com Cc: jasow...@redhat.com Cc: kra...@redhat.com Cc: alex.william...@redhat.com Cc: arm...@redhat.com Cc: mar...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by:

[Qemu-devel] [PATCH v7 1/9] pci: Clean up error checking in pci_add_capability()

2017-06-27 Thread Mao Zhongyi
On success, pci_add_capability2() returns a positive value. On failure, it sets an error and return a negative value. pci_add_capability() laboriously checks this behavior. No other caller does. Drop the checks from pci_add_capability(). Cc: m...@redhat.com Cc: mar...@redhat.com Signed-off-by:

[Qemu-devel] [PATCH v7 0/9] Convert to realize and cleanup

2017-06-27 Thread Mao Zhongyi
This series mainly implements the conversions of pci-bridge devices i82801b11, io3130_upstream/downstream and so on to realize(). Naturally part of error messages need to be converted to Error, then propagate to its callers via the argument errp, bonus clean related minor flaw up. In short, the

[Qemu-devel] [PATCH v7 4/9] pci: Make errp the last parameter of pci_add_capability()

2017-06-27 Thread Mao Zhongyi
Add Error argument for pci_add_capability() to leverage the errp to pass info on errors. This way is helpful for its callers to make a better error handling when moving to 'realize'. Cc: pbonz...@redhat.com Cc: r...@twiddle.net Cc: ehabk...@redhat.com Cc: m...@redhat.com Cc: jasow...@redhat.com

[Qemu-devel] [PATCH v7 7/9] pci: Convert shpc_init() to Error

2017-06-27 Thread Mao Zhongyi
In order to propagate error message better, convert shpc_init() to Error also convert the pci_bridge_dev_initfn() to realize. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum

Re: [Qemu-devel] [PATCH v9 07/26] target: [tcg, i386] Refactor init_disas_context

2017-06-27 Thread Lluís Vilanova
Richard Henderson writes: > On 06/25/2017 02:12 AM, Lluís Vilanova wrote: >> +DisasContext *dc = container_of(db, DisasContext, base); >> CPUX86State *env = cpu->env_ptr; >> -DisasContext dc1, *dc = >> -DisasContextBase *db = >> -uint32_t flags; >> -target_ulong cs_base; >>

<    1   2   3   4