Re: [Qemu-devel] [V12 3/4] hw/i386: Introduce AMD IOMMU

2016-07-08 Thread David Kiarie
On Mon, Jul 4, 2016 at 8:41 AM, Jan Kiszka wrote: > On 2016-07-04 07:06, David Kiarie wrote: >> On Wed, Jun 22, 2016 at 11:24 PM, Jan Kiszka wrote: >>> On 2016-06-15 14:21, David Kiarie wrote: + + +/* PCI SIG constants */ +#define PCI_BUS_MAX 256 +#define PCI_SLOT_MAX 32

Re: [Qemu-devel] [V12 4/4] hw/i386: AMD IOMMU IVRS table

2016-07-08 Thread David Kiarie
On Mon, Jul 4, 2016 at 11:33 PM, Michael S. Tsirkin wrote: > On Wed, Jun 15, 2016 at 03:21:52PM +0300, David Kiarie wrote: >> Add IVRS table for AMD IOMMU. Generate IVRS or DMAR >> depending on emulated IOMMU. >> >> Signed-off-by: David Kiarie >> --- >> hw/acpi/aml-build.c | 2 +- >> hw

Re: [Qemu-devel] [PATCH v8 08/16] qapi: Implement boxed types for commands/events

2016-07-08 Thread Markus Armbruster
Eric Blake writes: > On 07/07/2016 04:52 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Turn on the ability to pass command and event arguments in >>> a single boxed parameter, which must name a non-empty type >>> (although the type can be a struct with all optional members). >>> For

Re: [Qemu-devel] [Qemu-block] [PATCH v3 04/32] blockdev: Move bochs probe into separate file

2016-07-08 Thread Markus Armbruster
Kevin Wolf writes: > Am 05.07.2016 um 22:50 hat John Snow geschrieben: >> >> >> On 07/05/2016 11:49 AM, Daniel P. Berrange wrote: >> > On Tue, Jul 05, 2016 at 11:24:04AM -0400, Colin Lord wrote: >> >> This puts the bochs probe function into its own separate file as part of >> >> the process of

Re: [Qemu-devel] [PATCH v3 0/2] qapi: change QObject visitors to QSLIST

2016-07-08 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> Rebased patches, grouped in a single series for simplicity since >> I had to resend both of them. > > Series: > Reviewed-by: Markus Armbruster > > I'll take this through qapi-next, but first Eric gets a chance to chime > in. Applied to qap

Re: [Qemu-devel] [RFC v4] virtio-crypto specification

2016-07-08 Thread Gonglei (Arei)
Ping... I'd like to know what's the process of a new virtio device can be merged? Anybody can tell me? Thanks a lot. Taking Virtio-gpu as an example, the virtio-gpu had been merged in Linux kernel And Qemu communities, but the corresponding virtio-gpu spec hadn't been merged yet. Why was that? A

Re: [Qemu-devel] [RFC PATCH v2 3/5] spapr: Set stable_cpu_id for threads of CPU cores

2016-07-08 Thread David Gibson
On Fri, Jul 08, 2016 at 12:11:12PM +0530, Bharata B Rao wrote: > On Fri, Jul 08, 2016 at 03:24:13PM +1000, David Gibson wrote: > > On Thu, Jul 07, 2016 at 08:20:23PM +0530, Bharata B Rao wrote: > > > Conditonally set stable_cpu_id for CPU threads that are created as part > > > of spapr CPU cores. T

Re: [Qemu-devel] [RFC PATCH 2/2] numa: Add node_id data in query-hotpluggable-cpus

2016-07-08 Thread Peter Krempa
On Fri, Jul 08, 2016 at 12:23:08 +1000, David Gibson wrote: > On Thu, 7 Jul 2016 17:17:14 +0200 > Peter Krempa wrote: > > > Add a helper that looks up the NUMA node for a given CPU and use it to > > fill the node_id in the PPC and X86 impls of query-hotpluggable-cpus. > > > IIUC how the query

Re: [Qemu-devel] [RFC PATCH v2 3/5] spapr: Set stable_cpu_id for threads of CPU cores

2016-07-08 Thread Greg Kurz
On Fri, 8 Jul 2016 15:25:33 +1000 David Gibson wrote: > On Thu, Jul 07, 2016 at 06:11:31PM +0200, Greg Kurz wrote: > > On Thu, 7 Jul 2016 20:20:23 +0530 > > Bharata B Rao wrote: > > > > > Conditonally set stable_cpu_id for CPU threads that are created as part > > > of spapr CPU cores. The us

Re: [Qemu-devel] [PATCH v3 0/5] Support building qemu-user powered docker test images

2016-07-08 Thread Alex Bennée
Fam Zheng writes: > On Tue, 06/28 16:42, Alex Bennée wrote: >> This is the latest iteration of my qemu-user support inside Docker. >> They apply directly on top of master. I've made the changes suggested >> in the last review and split apart another patch. I've also added a >> new update command

Re: [Qemu-devel] [RFC PATCH v2 3/5] spapr: Set stable_cpu_id for threads of CPU cores

2016-07-08 Thread David Gibson
On Fri, Jul 08, 2016 at 09:46:47AM +0200, Greg Kurz wrote: > On Fri, 8 Jul 2016 15:25:33 +1000 > David Gibson wrote: > > > On Thu, Jul 07, 2016 at 06:11:31PM +0200, Greg Kurz wrote: > > > On Thu, 7 Jul 2016 20:20:23 +0530 > > > Bharata B Rao wrote: > > > > > > > Conditonally set stable_cpu_i

Re: [Qemu-devel] [PATCH] qemu-sockets: use qapi_free_SocketAddress in cleanup

2016-07-08 Thread Shannon Zhao
On 2016/7/7 0:42, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Commit 74b6ce43e3 uses the wrong free API for a SocketAddress, that > may leak some linked data. > > Signed-off-by: Marc-André Lureau I'm planing to send a patch, then I find this :) Reviewed-by: Shannon Zhao

[Qemu-devel] [V13 0/4] AMD IOMMU

2016-07-08 Thread David Kiarie
Hi all, This patchset adds basic AMD IOMMU emulation support to Qemu. Changes since v12 -Coding style fixes [Jan, Michael] -Error logging fix to avoid using a macro[Jan] -moved some PCI macros to PCI header[Jan] -Use a lookup table for MMIO register names when tracing[Jan] Changes s

[Qemu-devel] [V13 1/4] hw/pci: Prepare for AMD IOMMU

2016-07-08 Thread David Kiarie
Introduce PCI macros from for use by AMD IOMMU Signed-off-by: David Kiarie --- include/hw/pci/pci.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 9ed1624..959d05b 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pc

Re: [Qemu-devel] [RFC PATCH V5 1/4] colo-compare: introduce colo compare initialization

2016-07-08 Thread Zhang Chen
On 07/08/2016 11:40 AM, Jason Wang wrote: On 2016年06月23日 19:34, Zhang Chen wrote: Packets coming from the primary char indev will be sent to outdev Packets coming from the secondary char dev will be dropped usage: primary: -netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc

[Qemu-devel] [V13 3/4] hw/i386: Introduce AMD IOMMU

2016-07-08 Thread David Kiarie
Add AMD IOMMU emulaton to Qemu in addition to Intel IOMMU. The IOMMU does basic translation, error checking and has a minimal IOTLB implementation. This IOMMU bypassed the need for target aborts by responding with IOMMU_NONE access rights and exempts the region 0xfee0-0xfeef from translatio

[Qemu-devel] [V13 2/4] hw/i386/trace-events: Add AMD IOMMU trace events

2016-07-08 Thread David Kiarie
Signed-off-by: David Kiarie --- hw/i386/trace-events | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/i386/trace-events b/hw/i386/trace-events index ea77bc2..a2f529e 100644 --- a/hw/i386/trace-events +++ b/hw/i386/trace-events @@ -10,3 +10,32 @@ xen_pv_mmio_wr

Re: [Qemu-devel] [PATCH 3/3] tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump()

2016-07-08 Thread Paolo Bonzini
> diff --git a/cpu-exec.c b/cpu-exec.c > index dd0bd5007701..54c935039592 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -295,7 +295,8 @@ static TranslationBlock *tb_find_slow(CPUState *cpu, > > /* mmap_lock is needed by tb_gen_code, and mmap_lock must be > * taken outside

Re: [Qemu-devel] [RFC PATCH V2] qemu-char: Fix context for g_source_attach()

2016-07-08 Thread Daniel P. Berrange
On Fri, Jul 08, 2016 at 09:48:23AM +0800, Fam Zheng wrote: > On Wed, 06/22 18:49, Zhang Chen wrote: > > We want to poll and handle chardev in another thread > > other than main loop. But qemu_chr_add_handlers() can only > > work for global default context other than thread default context. > > So w

Re: [Qemu-devel] [PATCH] vnc: fix incorrect checking condition when updating client

2016-07-08 Thread Daniel P. Berrange
On Fri, Jul 08, 2016 at 11:37:36AM +0800, Gonglei wrote: > vs->disconnecting is set to TRUE and vs->ioc is closed, but > vs->ioc isn't set to NULL, so that the vnc_disconnect_finish() > isn't invoked when you update client in vnc_update_client() > after vnc_disconnect_start invoked. Let's using cha

Re: [Qemu-devel] [RFC PATCH V5 4/4] colo-compare: add TCP, UDP, ICMP packet comparison

2016-07-08 Thread Jason Wang
On 2016年06月23日 19:34, Zhang Chen wrote: Signed-off-by: Zhang Chen Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang --- net/colo-compare.c | 171 +++-- trace-events | 6 ++ 2 files changed, 173 insertions(+), 4 deletions(-) Co

Re: [Qemu-devel] [RFC PATCH V5 1/4] colo-compare: introduce colo compare initialization

2016-07-08 Thread Jason Wang
On 2016年07月08日 16:21, Zhang Chen wrote: On 07/08/2016 11:40 AM, Jason Wang wrote: On 2016年06月23日 19:34, Zhang Chen wrote: Packets coming from the primary char indev will be sent to outdev Packets coming from the secondary char dev will be dropped usage: primary: -netdev tap,id=hn0,vhos

Re: [Qemu-devel] [PATCH v3 0/5] Support building qemu-user powered docker test images

2016-07-08 Thread Fam Zheng
On Fri, 07/08 08:53, Alex Bennée wrote: > > Fam Zheng writes: > > > On Tue, 06/28 16:42, Alex Bennée wrote: > >> This is the latest iteration of my qemu-user support inside Docker. > >> They apply directly on top of master. I've made the changes suggested > >> in the last review and split apart

Re: [Qemu-devel] [PATCH v3 04/32] blockdev: Move bochs probe into separate file

2016-07-08 Thread Kevin Wolf
Am 07.07.2016 um 18:01 hat Paolo Bonzini geschrieben: > On 06/07/2016 18:09, John Snow wrote: > > Recently the include files in hw/ide/ were moved to include/ without > > anybody mentioning it to me, including internal.h. > > > > Why? > > Because hw/ide/internal.h is not so internal. In particul

Re: [Qemu-devel] [Qemu-block] [PATCH v3 04/32] blockdev: Move bochs probe into separate file

2016-07-08 Thread Kevin Wolf
Am 07.07.2016 um 22:32 hat Colin Lord geschrieben: > On 07/06/2016 04:24 AM, Kevin Wolf wrote: > > Am 05.07.2016 um 22:50 hat John Snow geschrieben: > >> So, something like: > >> > >> block/drivers/bochs/ > > > > block/bochs/ if anything. We don't have to nest deeply just because we > > can. I don

Re: [Qemu-devel] [PATCH v2 2/6] tcg: set up tb->page_addr before insertion

2016-07-08 Thread Sergey Fedorov
On 07/07/16 17:08, Sergey Fedorov wrote: > On 05/07/16 19:18, Alex Bennée wrote: >> This ensures that if we find the TB on the slow path that tb->page_addr >> is correctly set before being tested. >> >> Signed-off-by: Alex Bennée > Reveiwed-by: Sergey Fedorov However, we may need to use smp_wmb(

Re: [Qemu-devel] [Qemu-block] [PATCH v6 03/22] blockdev: Add and parse "lock-mode" option for image locking

2016-07-08 Thread Kevin Wolf
Am 08.07.2016 um 04:56 hat Fam Zheng geschrieben: > On Tue, 07/05 15:37, Kevin Wolf wrote: > > Am 17.06.2016 um 11:23 hat Kevin Wolf geschrieben: > > > Am 03.06.2016 um 10:48 hat Fam Zheng geschrieben: > > > > Respect the locking mode from CLI or QMP, and set the open flags > > > > accordingly. > >

Re: [Qemu-devel] [V12 3/4] hw/i386: Introduce AMD IOMMU

2016-07-08 Thread Jan Kiszka
Yes, this is what i meant. Am 8. Juli 2016 09:01:59 MESZ, schrieb David Kiarie : >On Mon, Jul 4, 2016 at 8:41 AM, Jan Kiszka wrote: >> On 2016-07-04 07:06, David Kiarie wrote: >>> On Wed, Jun 22, 2016 at 11:24 PM, Jan Kiszka >wrote: On 2016-06-15 14:21, David Kiarie wrote: > + > +

Re: [Qemu-devel] [RFC PATCH V5 2/4] colo-compare: track connection and enqueue packet

2016-07-08 Thread Zhang Chen
On 07/08/2016 12:07 PM, Jason Wang wrote: On 2016年06月23日 19:34, Zhang Chen wrote: In this patch we use kernel jhash table to track connection, and then enqueue net packet like this: + CompareState ++ | | +---+ +---+ +---+ |conn lis

Re: [Qemu-devel] [PATCH v3 17/32] blockdev: Separate bochs probe from its driver

2016-07-08 Thread Kevin Wolf
Am 07.07.2016 um 16:56 hat Colin Lord geschrieben: > On 07/06/2016 11:59 AM, Max Reitz wrote: > > On 05.07.2016 17:24, Colin Lord wrote: > >> Modifies the bochs probe to return the format name as well as the > >> score as the final step of separating the probe function from the > >> driver. This ke

Re: [Qemu-devel] [PATCH v3 01/11] block: Accept node-name for block-stream

2016-07-08 Thread Kevin Wolf
Am 08.07.2016 um 00:45 hat Eric Blake geschrieben: > On 07/07/2016 06:11 AM, Kevin Wolf wrote: > > In order to remove the necessity to use BlockBackend names in the > > external API, we want to allow node-names everywhere. This converts > > block-stream to accept a node-name without lifting the res

Re: [Qemu-devel] [PATCH v3 0/5] Support building qemu-user powered docker test images

2016-07-08 Thread Alex Bennée
Fam Zheng writes: > On Fri, 07/08 08:53, Alex Bennée wrote: >> >> Fam Zheng writes: >> >> > On Tue, 06/28 16:42, Alex Bennée wrote: >> >> This is the latest iteration of my qemu-user support inside Docker. >> >> They apply directly on top of master. I've made the changes suggested >> >> in the

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/2] block: Add qemu_dup in osdep.c and use it

2016-07-08 Thread Kevin Wolf
Am 07.07.2016 um 23:14 hat John Snow geschrieben: > On 06/22/2016 08:53 AM, Fam Zheng wrote: > > v2: Fix patch 1 #else branch, and "r" => "ret". [Kevin] > > Add Kevin's r-b line in patch 2. > > > > This is an independent tiny change extracted from the image locking series, > > which can be pro

Re: [Qemu-devel] [QEMU PATCH v4 0/6] migration: ensure hotplug and migration work together

2016-07-08 Thread Amit Shah
Hi, I'm going to go through this series soon, and I know Dave is too. Please give us some time to go through it. Thanks, On (Mon) 27 Jun 2016 [09:59:58], Jianjun Duan wrote: > Hi all, >The previous patches seem to get buried deep somewhere. I am resending them > without RFC tag. Comments ar

Re: [Qemu-devel] [PATCH] scsi: esp: fix migration

2016-07-08 Thread Amit Shah
On (Wed) 29 Jun 2016 [14:00:17], Juan Quintela wrote: > Paolo Bonzini wrote: > > On 27/06/2016 09:20, Amit Shah wrote: > >> On (Mon) 20 Jun 2016 [16:33:26], Paolo Bonzini wrote: > >>> Commit 926cde5 ("scsi: esp: make cmdbuf big enough for maximum CDB size", > >>> 2016-06-16) changed the size of a

Re: [Qemu-devel] [PATCH 3/3] tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump()

2016-07-08 Thread Sergey Fedorov
On 08/07/16 11:40, Paolo Bonzini wrote: > Even better: add a "bool *tb_locked" argument to tb_find_slow, and > don't move the mmap_lock release. Then tb_find_fast knows directly > whether tb_lock is taken, and you don't need any of tb_lock_reset > or mmap_lock_reset. I think we can do even better

[Qemu-devel] [PATCH] timer/cpus: fix some typos and update some comments

2016-07-08 Thread Cao jin
Signed-off-by: Cao jin --- cpus.c | 6 +++--- include/qemu/timer.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index 84c3520..d4afd93 100644 --- a/cpus.c +++ b/cpus.c @@ -229,7 +229,7 @@ static int64_t cpu_get_clock_locked(void) return

Re: [Qemu-devel] [PATCH] scsi: esp: fix migration

2016-07-08 Thread Amit Shah
On (Mon) 27 Jun 2016 [09:54:24], Paolo Bonzini wrote: > > > On 27/06/2016 09:20, Amit Shah wrote: > > On (Mon) 20 Jun 2016 [16:33:26], Paolo Bonzini wrote: > >> Commit 926cde5 ("scsi: esp: make cmdbuf big enough for maximum CDB size", > >> 2016-06-16) changed the size of a migrated field. Split

Re: [Qemu-devel] [PATCH 1/1] OpenBIOS: Switch over to official OpenBIOS git repo

2016-07-08 Thread Stefan Hajnoczi
On Thu, Jul 07, 2016 at 05:22:42PM -0400, Jeff Cody wrote: > This update should preserve git history, and switches over to the official > openbios git repo, rather than pulling from the svn mirror. All prior history > from the svn repository should still be preserved (i.e., commit hashes are the >

Re: [Qemu-devel] [PATCH 1/1] OpenBIOS: Switch over to official OpenBIOS git repo

2016-07-08 Thread Andreas Färber
Am 07.07.2016 um 23:22 schrieb Jeff Cody: > This update should preserve git history, and switches over to the official > openbios git repo, rather than pulling from the svn mirror. All prior history > from the svn repository should still be preserved (i.e., commit hashes are the > same for histori

Re: [Qemu-devel] [PATCH 1/5] block: Fragment reads to max transfer length

2016-07-08 Thread Kevin Wolf
Am 21.06.2016 um 01:39 hat Eric Blake geschrieben: > Drivers should be able to rely on the block layer honoring the > max transfer length, rather than needing to return -EINVAL > (iscsi) or manually fragment things (nbd). This patch adds > the fragmentation in the block layer, after requests have

Re: [Qemu-devel] [PATCH] scsi: esp: fix migration

2016-07-08 Thread Paolo Bonzini
> > > -VMSTATE_BUFFER(cmdbuf, ESPState), > > > +VMSTATE_PARTIAL_BUFFER(cmdbuf, ESPState, 16), > > > +VMSTATE_BUFFER_START_MIDDLE_V(cmdbuf, ESPState, 16, 4), > > > > Amit, would it help the checker if we do something like: > > > > -VMSTATE_BUFFER(cmdbuf, ESPState),

Re: [Qemu-devel] [RFC PATCH v2 3/5] spapr: Set stable_cpu_id for threads of CPU cores

2016-07-08 Thread Igor Mammedov
On Fri, 8 Jul 2016 17:39:52 +1000 David Gibson wrote: > On Fri, Jul 08, 2016 at 12:11:12PM +0530, Bharata B Rao wrote: > > On Fri, Jul 08, 2016 at 03:24:13PM +1000, David Gibson wrote: > > > On Thu, Jul 07, 2016 at 08:20:23PM +0530, Bharata B Rao wrote: > > > > Conditonally set stable_cpu_id

Re: [Qemu-devel] [PATCH 3/3] tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump()

2016-07-08 Thread Paolo Bonzini
> On 08/07/16 11:40, Paolo Bonzini wrote: > > Even better: add a "bool *tb_locked" argument to tb_find_slow, and > > don't move the mmap_lock release. Then tb_find_fast knows directly > > whether tb_lock is taken, and you don't need any of tb_lock_reset > > or mmap_lock_reset. > > I think we can

Re: [Qemu-devel] [PATCH 3/5] raw_bsd: Don't advertise flags not supported by protocol layer

2016-07-08 Thread Kevin Wolf
Am 21.06.2016 um 01:39 hat Eric Blake geschrieben: > The raw format layer supports all flags via passthrough - but > it only makes sense to pass through flags that the lower layer > actually supports. > > Thanks to the previous patch, the raw format layer now attempts > to fragment writes at the m

Re: [Qemu-devel] [RFC PATCH v2 2/5] cpu: Introduce CPUState::stable_cpu_id

2016-07-08 Thread Igor Mammedov
On Fri, 8 Jul 2016 15:19:58 +1000 David Gibson wrote: > On Thu, Jul 07, 2016 at 08:20:22PM +0530, Bharata B Rao wrote: > > Add CPUState::stable_cpu_id and use that as instance_id in > > vmstate_register() call. > > > > Introduce has-stable_cpu_id property that allows target machines to > > optio

Re: [Qemu-devel] [PATCH 5/5] nbd: Drop unused offset parameter

2016-07-08 Thread Kevin Wolf
Am 21.06.2016 um 01:39 hat Eric Blake geschrieben: > Now that NBD relies on the block layer to fragment things, we no > longer need to track an offset argument for which fragment of > a request we are actually servicing. > > While at it, use true and false instead of 0 and 1 for a bool > parameter

Re: [Qemu-devel] [PATCH 0/5] Auto-fragment large transactions at the block layer

2016-07-08 Thread Kevin Wolf
Am 06.07.2016 um 04:04 hat Eric Blake geschrieben: > On 06/21/2016 11:54 PM, Fam Zheng wrote: > > On Mon, 06/20 17:39, Eric Blake wrote: > >> We have max_transfer documented in BlockLimits, but while we > >> honor it during pwrite_zeroes, we were blindly ignoring it > >> during pwritev and preadv,

[Qemu-devel] [PATCH v2] curl: Operate on zero-length file

2016-07-08 Thread Tomáš Golembiovský
Another attempt to fix the bug 1596870. When creating new disk backed by remote file accessed via HTTPS and the backing file has zero length, qemu-img terminates with uniformative error message: qemu-img: disk.qcow2: CURL: Error opening file: While it may not make much sense to operate on em

Re: [Qemu-devel] [PATCH] timer/cpus: fix some typos and update some comments

2016-07-08 Thread Cao jin
cc to Paolo On 07/08/2016 06:31 PM, Cao jin wrote: Signed-off-by: Cao jin --- cpus.c | 6 +++--- include/qemu/timer.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index 84c3520..d4afd93 100644 --- a/cpus.c +++ b/cpus.c @@ -229,7 +229,7

Re: [Qemu-devel] [RFC PATCH 1/2] qapi: Add vcpu id to query-hotpluggable-cpus output

2016-07-08 Thread Igor Mammedov
On Fri, 8 Jul 2016 12:18:55 +1000 David Gibson wrote: > On Thu, 7 Jul 2016 17:17:13 +0200 > Peter Krempa wrote: > > > Add 'vcpu index' to the output of query hotpluggable cpus. This output > > is identical to the linear cpu index taken by the 'cpus' attribute > > passed to -numa. > > > The

Re: [Qemu-devel] [RFC PATCH 2/2] numa: Add node_id data in query-hotpluggable-cpus

2016-07-08 Thread Igor Mammedov
On Thu, 7 Jul 2016 17:17:14 +0200 Peter Krempa wrote: > Add a helper that looks up the NUMA node for a given CPU and use it to > fill the node_id in the PPC and X86 impls of query-hotpluggable-cpus. > > Signed-off-by: Peter Krempa > --- > hw/i386/pc.c | 7 +++ > hw/ppc/spapr.c

Re: [Qemu-devel] [RFC PATCH 2/2] numa: Add node_id data in query-hotpluggable-cpus

2016-07-08 Thread Peter Krempa
On Fri, Jul 08, 2016 at 13:54:58 +0200, Igor Mammedov wrote: > On Thu, 7 Jul 2016 17:17:14 +0200 > Peter Krempa wrote: > > > Add a helper that looks up the NUMA node for a given CPU and use it to > > fill the node_id in the PPC and X86 impls of query-hotpluggable-cpus. > > > > Signed-off-by: Pe

Re: [Qemu-devel] [RFC PATCH 2/2] numa: Add node_id data in query-hotpluggable-cpus

2016-07-08 Thread Igor Mammedov
On Fri, 8 Jul 2016 09:46:00 +0200 Peter Krempa wrote: [...] > Note: For libvirt it's a no-go to start a throwaway qemu process just to > query the information and thus it's desired to have a way to configure > all this without the need to query with a specific machine > type/topology. Is it no-go

Re: [Qemu-devel] [RFC PATCH 2/2] numa: Add node_id data in query-hotpluggable-cpus

2016-07-08 Thread Igor Mammedov
On Fri, 8 Jul 2016 14:04:23 +0200 Peter Krempa wrote: > On Fri, Jul 08, 2016 at 13:54:58 +0200, Igor Mammedov wrote: > > On Thu, 7 Jul 2016 17:17:14 +0200 > > Peter Krempa wrote: > > > > > Add a helper that looks up the NUMA node for a given CPU and use it to > > > fill the node_id in the PP

Re: [Qemu-devel] [1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-08 Thread Michael Ellerman
On Wed, 2016-06-07 at 06:05:54 UTC, Sam bobroff wrote: > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > index 02416fe..06d79bc 100644 > --- a/arch/powerpc/kvm/powerpc.c > +++ b/arch/powerpc/kvm/powerpc.c > @@ -588,6 +588,10 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm

[Qemu-devel] [Bug 1600112] [NEW] Qemu GTK interface showing question marks instead of correct strings

2016-07-08 Thread Jeff Bai
Public bug reported: Qemu version: 2.6.0 When running Qemu system emulation (configured with GTK interface), all interface strings shows up as question marks instead of the correct translated strings. Tested on locale zh_CN.UTF-8. I have attached a screenshot below for better understanding. **

Re: [Qemu-devel] [RFC PATCH 2/2] numa: Add node_id data in query-hotpluggable-cpus

2016-07-08 Thread Peter Krempa
On Fri, Jul 08, 2016 at 14:06:31 +0200, Igor Mammedov wrote: > On Fri, 8 Jul 2016 09:46:00 +0200 > Peter Krempa wrote: > > [...] > > Note: For libvirt it's a no-go to start a throwaway qemu process just to > > query the information and thus it's desired to have a way to configure > > all this wit

Re: [Qemu-devel] [PATCH 3/3] tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump()

2016-07-08 Thread Sergey Fedorov
On 08/07/16 14:02, Paolo Bonzini wrote: >> On 08/07/16 11:40, Paolo Bonzini wrote: >>> Even better: add a "bool *tb_locked" argument to tb_find_slow, and >>> don't move the mmap_lock release. Then tb_find_fast knows directly >>> whether tb_lock is taken, and you don't need any of tb_lock_reset >>>

Re: [Qemu-devel] [RFC PATCH 2/2] numa: Add node_id data in query-hotpluggable-cpus

2016-07-08 Thread Peter Krempa
On Fri, Jul 08, 2016 at 14:10:59 +0200, Igor Mammedov wrote: > On Fri, 8 Jul 2016 14:04:23 +0200 > Peter Krempa wrote: > > > On Fri, Jul 08, 2016 at 13:54:58 +0200, Igor Mammedov wrote: > > > On Thu, 7 Jul 2016 17:17:14 +0200 > > > Peter Krempa wrote: [...] > > > it's along the way start QEMU

Re: [Qemu-devel] [Qemu-block] [PATCH v6 03/22] blockdev: Add and parse "lock-mode" option for image locking

2016-07-08 Thread Max Reitz
On 08.07.2016 11:50, Kevin Wolf wrote: > Am 08.07.2016 um 04:56 hat Fam Zheng geschrieben: >> On Tue, 07/05 15:37, Kevin Wolf wrote: >>> Am 17.06.2016 um 11:23 hat Kevin Wolf geschrieben: Am 03.06.2016 um 10:48 hat Fam Zheng geschrieben: > Respect the locking mode from CLI or QMP, and set

[Qemu-devel] [PATCH] spapr: fix core unplug crash

2016-07-08 Thread Greg Kurz
If the host has 8 threads/core and the guest is started with: -smp cores=1,threads=4,maxcpus=12 It is possible to crash QEMU by doing: (qemu) device_add host-spapr-cpu-core,core-id=16,id=foo (qemu) device_del foo Segmentation fault This is caused because spapr_core_unplug() assumes cpu_dt_id ==

Re: [Qemu-devel] [PATCH v2] vmdk: fix metadata write regression

2016-07-08 Thread Max Reitz
On 07.07.2016 10:42, Reda Sallahi wrote: > Commit "cdeaf1f vmdk: add bdrv_co_write_zeroes" causes a regression on > writes. It writes metadata after every write instead of doing it only once > for each cluster. > > vmdk_pwritev() writes metadata whenever m_data is set as valid so this patch > sets

[Qemu-devel] [PATCH] Revert "hw/ptimer: Perform counter wrap around if timer already expired"

2016-07-08 Thread Dmitry Osipenko
Software should see timer counter wraparound only after IRQ being triggered. This fixes regression introduced by the commit 5a50307 ("hw/ptimer: Perform counter wrap around if timer already expired"), resulting in monotonic timer jumping backwards on SPARC emulated machine running NetBSD guest OS,

[Qemu-devel] [Bug 1297218] Re: guest hangs after live migration due to tsc jump

2016-07-08 Thread Kai Storbeck
Hello Chris, Steps taken to test the proposed package: 1) enabled trusty-proposed 2) installed qemu-system-arm qemu-system-common qemu-system-misc qemu-system-x86 qemu-user version 2.0.0+dfsg-2ubuntu1.25 3) again on a second trusty14.04 server 4) migrate 41 running VM's (uptimes vary between 1 a

[Qemu-devel] [Bug 1297218] Re: guest hangs after live migration due to tsc jump

2016-07-08 Thread Serge Hallyn
Awesome- thanks for verifying ** Tags removed: verification-needed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1297218 Title: guest hangs after live migration due to tsc jump Status in QEMU:

Re: [Qemu-devel] [PATCH 2/2 V5] hmp: show all of snapshot info on every block dev in output of 'info snapshots'

2016-07-08 Thread Max Reitz
On 07.07.2016 07:26, Lin Ma wrote: > Currently, the output of 'info snapshots' shows fully available snapshots. > It's opaque, hides some snapshot information to users. It's not convenient > if users want to know more about all of snapshot information on every block > device via monitor. > > Follo

[Qemu-devel] [PATCH 0/2] Fix regression with the default naming of throttling groups

2016-07-08 Thread Alberto Garcia
Hi, Stefan reported this, this is a regression caused by commit efaa7c4eeb7490c6f37f3. QEMU v2.6.0 is affected but the patch cannot be backported as-is, I'll send a separate version to qemu-stable. Berto Alberto Garcia (2): blockdev: Fix regression with the default naming of throttling groups

[Qemu-devel] [PATCH 1/2] blockdev: Fix regression with the default naming of throttling groups

2016-07-08 Thread Alberto Garcia
When I/O limits are set for a block device, the name of the throttling group is taken from the BlockBackend if the user doesn't specify one. Commit efaa7c4eeb7490c6f37f3 moved the naming of the BlockBackend in blockdev_init() to the end of the function, after I/O limits are set. The consequence is

[Qemu-devel] [PATCH for-2.6 0/2] Fix regression with the default naming of throttling groups

2016-07-08 Thread Alberto Garcia
Hi, Stefan reported this, this is a regression caused by commit efaa7c4eeb7490c6f37f3. I sent a separate series for the git master, this is the backport for QEMU v2.6.0. Berto Alberto Garcia (2): blockdev: Fix regression with the default naming of throttling groups qemu-iotests: Test naming

Re: [Qemu-devel] [PATCH 3/3] tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump()

2016-07-08 Thread Paolo Bonzini
On 08/07/2016 14:32, Sergey Fedorov wrote: >>> >> I think we can do even better. One option is using a separate tiny lock >>> >> to protect direct jump set/reset instead of tb_lock. >> > If you have to use a separate tiny lock, you don't gain anything compared >> > to the two critical sections, d

[Qemu-devel] [PATCH 2/2] qemu-iotests: Test naming of throttling groups

2016-07-08 Thread Alberto Garcia
Throttling groups are named using the 'group' parameter of the block_set_io_throttle command and the throttling.group command-line option. If that parameter is unspecified the groups get the name of the block device. This patch adds a new test to check the naming of throttling groups. Signed-off-

Re: [Qemu-devel] [PATCH] qemu-sockets: use qapi_free_SocketAddress in cleanup

2016-07-08 Thread Paolo Bonzini
On 06/07/2016 18:42, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Commit 74b6ce43e3 uses the wrong free API for a SocketAddress, that > may leak some linked data. > > Signed-off-by: Marc-André Lureau > --- > util/qemu-sockets.c | 2 +- > 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PATCH for-2.6 1/2] blockdev: Fix regression with the default naming of throttling groups

2016-07-08 Thread Alberto Garcia
When I/O limits are set for a block device, the name of the throttling group is taken from the BlockBackend if the user doesn't specify one. Commit efaa7c4eeb7490c6f37f3 moved the naming of the BlockBackend in blockdev_init() to the end of the function, after I/O limits are set. The consequence is

[Qemu-devel] [PATCH for-2.6 2/2] qemu-iotests: Test naming of throttling groups

2016-07-08 Thread Alberto Garcia
Throttling groups are named using the 'group' parameter of the block_set_io_throttle command and the throttling.group command-line option. If that parameter is unspecified the groups get the name of the block device. This patch adds a new test to check the naming of throttling groups. Signed-off-

Re: [Qemu-devel] [PATCH 1/2] blockdev: Fix regression with the default naming of throttling groups

2016-07-08 Thread Max Reitz
On 08.07.2016 16:03, Alberto Garcia wrote: > When I/O limits are set for a block device, the name of the throttling > group is taken from the BlockBackend if the user doesn't specify one. > > Commit efaa7c4eeb7490c6f37f3 moved the naming of the BlockBackend in > blockdev_init() to the end of the f

Re: [Qemu-devel] [PATCH 1/2] blockdev: Fix regression with the default naming of throttling groups

2016-07-08 Thread Alberto Garcia
On Fri 08 Jul 2016 04:23:03 PM CEST, Max Reitz wrote: >> +blk_id = qemu_opts_id(opts); >> + > > Side note: The "id" variable is supposed to contain the exact same > value, but the string it points to is invalidated by the > qdict_del(bs_opts, "id") call. > > So indeed we need to obtain the ID a

Re: [Qemu-devel] [RFC PATCH V2] qemu-char: Fix context for g_source_attach()

2016-07-08 Thread Paolo Bonzini
On 08/07/2016 10:54, Daniel P. Berrange wrote: > On Fri, Jul 08, 2016 at 09:48:23AM +0800, Fam Zheng wrote: >> On Wed, 06/22 18:49, Zhang Chen wrote: >>> We want to poll and handle chardev in another thread >>> other than main loop. But qemu_chr_add_handlers() can only >>> work for global default

Re: [Qemu-devel] [PATCH 2/2] qemu-iotests: Test naming of throttling groups

2016-07-08 Thread Max Reitz
On 08.07.2016 16:03, Alberto Garcia wrote: > Throttling groups are named using the 'group' parameter of the > block_set_io_throttle command and the throttling.group command-line > option. If that parameter is unspecified the groups get the name of > the block device. > > This patch adds a new test

Re: [Qemu-devel] [PATCH v3 01/11] block: Accept node-name for block-stream

2016-07-08 Thread Eric Blake
On 07/08/2016 04:01 AM, Kevin Wolf wrote: > Am 08.07.2016 um 00:45 hat Eric Blake geschrieben: >> On 07/07/2016 06:11 AM, Kevin Wolf wrote: >>> In order to remove the necessity to use BlockBackend names in the >>> external API, we want to allow node-names everywhere. This converts >>> block-stream

Re: [Qemu-devel] [PATCH 3/5] raw_bsd: Don't advertise flags not supported by protocol layer

2016-07-08 Thread Eric Blake
On 07/08/2016 05:05 AM, Kevin Wolf wrote: > Am 21.06.2016 um 01:39 hat Eric Blake geschrieben: >> The raw format layer supports all flags via passthrough - but >> it only makes sense to pass through flags that the lower layer >> actually supports. >> >> Thanks to the previous patch, the raw format

Re: [Qemu-devel] [PATCH for-2.6 2/2] qemu-iotests: Test naming of throttling groups

2016-07-08 Thread Max Reitz
On 08.07.2016 16:05, Alberto Garcia wrote: > Throttling groups are named using the 'group' parameter of the > block_set_io_throttle command and the throttling.group command-line > option. If that parameter is unspecified the groups get the name of > the block device. > > This patch adds a new test

Re: [Qemu-devel] [PATCH 0/2] Fix regression with the default naming of throttling groups

2016-07-08 Thread Max Reitz
On 08.07.2016 16:02, Alberto Garcia wrote: > Hi, > > Stefan reported this, this is a regression caused by commit > efaa7c4eeb7490c6f37f3. > > QEMU v2.6.0 is affected but the patch cannot be backported as-is, I'll > send a separate version to qemu-stable. > > Berto > > Alberto Garcia (2): > bl

Re: [Qemu-devel] [PATCH for-2.6 1/2] blockdev: Fix regression with the default naming of throttling groups

2016-07-08 Thread Max Reitz
On 08.07.2016 16:05, Alberto Garcia wrote: > When I/O limits are set for a block device, the name of the throttling > group is taken from the BlockBackend if the user doesn't specify one. > > Commit efaa7c4eeb7490c6f37f3 moved the naming of the BlockBackend in > blockdev_init() to the end of the f

Re: [Qemu-devel] [PATCH 1/5] block: Fragment reads to max transfer length

2016-07-08 Thread Eric Blake
On 07/08/2016 04:56 AM, Kevin Wolf wrote: > Am 21.06.2016 um 01:39 hat Eric Blake geschrieben: >> Drivers should be able to rely on the block layer honoring the >> max transfer length, rather than needing to return -EINVAL >> (iscsi) or manually fragment things (nbd). This patch adds >> the fragme

Re: [Qemu-devel] [PATCH v2 1/6] tcg: Ensure safe tb_jmp_cache lookup out of 'tb_lock'

2016-07-08 Thread Sergey Fedorov
On 05/07/16 19:18, Alex Bennée wrote: > From: Sergey Fedorov > > First, ensure atomicity of CPU's 'tb_jmp_cache' access by: > * using atomic_read() to look up a TB when not holding 'tb_lock'; > * using atomic_write() to remove a TB from each CPU's local cache on >TB invalidation. > > Second,

Re: [Qemu-devel] [PATCH 0/2 V5] Show all of snapshot info on every block dev

2016-07-08 Thread Max Reitz
On 07.07.2016 07:26, Lin Ma wrote: > V5: Minor changes. > > V4: Use QTAILQ_FOREACH_SAFE instead of QTAILQ_FOREACH while freeing snapshot > lists. > > V3: Fix leaking the entries in image_list and the entries in their > ImageEntry.snapshots lists > > V2: Split it to 2 patches. > > Lin Ma (2

[Qemu-devel] [PATCH v4 1/5] x86: Provide TCG_PHYS_ADDR_BITS

2016-07-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Provide a constant for the number of address bits supported under TCG. Signed-off-by: Dr. David Alan Gilbert Suggested-by: Eduardo Habkost --- target-i386/cpu.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target-i386/cpu.h b/target-

[Qemu-devel] [PATCH v4 0/5] x86: Physical address limit patches

2016-07-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" QEMU sets the guests physical address bits to 40; this is wrong on most hardware, and can be detected by the guest. It also stops you using really huge multi-TB VMs. Red Hat has had a patch, that Andrea wrote, downstream for a couple of years that reads the hosts v

[Qemu-devel] [PATCH v4 2/5] x86: Allow physical address bits to be set

2016-07-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Currently QEMU sets the x86 number of physical address bits to the magic number 40. This is only correct on some small AMD systems; Intel systems tend to have 36, 39, 46 bits, and large AMD systems tend to have 48. Having the value different from your actual hardw

[Qemu-devel] [PATCH v4 3/5] x86: Mask mtrr mask based on CPU physical address limits

2016-07-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The CPU GPs if we try and set a bit in a variable MTRR mask above the limit of physical address bits on the host. We hit this when loading a migration from a host with a larger physical address limit than our destination (e.g. a Xeon->i7 of same generation) but pre

[Qemu-devel] [PATCH v4 4/5] x86: fill high bits of mtrr mask

2016-07-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fill the bits between 51..number-of-physical-address-bits in the MTRR_PHYSMASKn variable range mtrr masks so that they're consistent in the migration stream irrespective of the physical address space of the source VM in a migration. Signed-off-by: Dr. David Alan Gi

[Qemu-devel] [PATCH v4 5/5] x86: Set physical address bits based on host

2016-07-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the host-phys-bits boolean property, if true, take phys-bits from the hosts physical bits value, overriding either the default or the user specified value. We can also use the value we read from the host to check the users explicitly set value and warn them if

Re: [Qemu-devel] [PATCH v3 1/6] block/qdev: Allow node name for drive properties

2016-07-08 Thread Max Reitz
On 06.07.2016 16:45, Kevin Wolf wrote: > If a node name instead of a BlockBackend name is specified as the driver > for a guest device, an anonymous BlockBackend is created now. > > usb-storage uses a hack where it forwards its BlockBackend as a property > to another device that it internally crea

Re: [Qemu-devel] [PATCH v3 2/6] block/qdev: Allow configuring WCE with qdev properties

2016-07-08 Thread Max Reitz
On 06.07.2016 16:45, Kevin Wolf wrote: > As cache.writeback is a BlockBackend property and as such more related > to the guest device than the BlockDriverState, we already removed it > from the blockdev-add interface. This patch adds the new way to set it, > as a qdev property of the corresponding

Re: [Qemu-devel] [PATCH v3 5/6] qemu-iotests: Test setting WCE with qdev

2016-07-08 Thread Max Reitz
On 06.07.2016 16:45, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/157 | 88 > ++ > tests/qemu-iotests/157.out | 22 > tests/qemu-iotests/group | 1 + > 3 files changed, 111 insertions(+) > create mode 10

Re: [Qemu-devel] [PATCH v3 6/6] block: Remove BB options from blockdev-add

2016-07-08 Thread Max Reitz
On 06.07.2016 16:45, Kevin Wolf wrote: > werror/rerror are now available as qdev options. The stats-* options are > removed without an existing replacement; they should probably be > configurable with a separate QMP command like I/O throttling settings. > > Removing id is left for another day beca

Re: [Qemu-devel] [RFC PATCH v2 3/5] spapr: Set stable_cpu_id for threads of CPU cores

2016-07-08 Thread Greg Kurz
On Fri, 8 Jul 2016 17:59:07 +1000 David Gibson wrote: > On Fri, Jul 08, 2016 at 09:46:47AM +0200, Greg Kurz wrote: > > On Fri, 8 Jul 2016 15:25:33 +1000 > > David Gibson wrote: > > > > > On Thu, Jul 07, 2016 at 06:11:31PM +0200, Greg Kurz wrote: > > > > On Thu, 7 Jul 2016 20:20:23 +0530 >

[Qemu-devel] [PATCH] net: cleanup before character devices

2016-07-08 Thread Paolo Bonzini
Otherwise, vhost-user causes a use-after-free. Signed-off-by: Paolo Bonzini --- vl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index d0b9ff9..005162d 100644 --- a/vl.c +++ b/vl.c @@ -4327,9 +4327,6 @@ int main(int argc, char **argv, char **envp)

Re: [Qemu-devel] [PATCH] net: cleanup before character devices

2016-07-08 Thread Marc-André Lureau
Hi On Fri, Jul 8, 2016 at 5:27 PM, Paolo Bonzini wrote: > Otherwise, vhost-user causes a use-after-free. > > Signed-off-by: Paolo Bonzini Sorry I didn't see the criticals in make check after my patch... Thanks for fixing it this quickly > --- > vl.c | 6 +++--- > 1 file changed, 3 insertions(

  1   2   3   >