Re: [Qemu-devel] [PATCH v3 2/2] target-i386: add migration support for Intel LMCE

2016-06-09 Thread Haozhong Zhang
On 06/08/16 13:36, Paolo Bonzini wrote: > > > On 03/06/2016 08:09, Haozhong Zhang wrote: > > LMCE is disabled by default, but a cpu option 'lmce=on/off' is provided > > to enable/disable it. Migration is only allowed between VCPUs with the > > same lmce option. > > This is not needed at all if y

Re: [Qemu-devel] [Qemu-block] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads

2016-06-09 Thread Stefan Hajnoczi
On Wed, Jun 8, 2016 at 5:03 PM, Paolo Bonzini wrote: > On 08/06/2016 17:30, Stefan Hajnoczi wrote: >> This needs to be fixed. I believe Paolo has a patch to continue using >> dataplane during savevm but that's a workaround rather than a solution >> to this problem. > > That is already in. Datapl

Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket

2016-06-09 Thread Amnon Ilan
- Original Message - > From: "Aaron Conole" > To: "Flavio Leitner" > Cc: "Amnon Ilan" , "Michal Privoznik" > , "Daniel P. Berrange" > , qemu-devel@nongnu.org, "amit shah" > , jasow...@redhat.com, "Wei Xu" > , arm...@redhat.com > Sent: Thursday, June 9, 2016 12:48:57 AM > Subject: Re:

Re: [Qemu-devel] [PATCH 2/6] disas: Remove unused macro '_'

2016-06-09 Thread Stefan Hajnoczi
On Thu, Feb 25, 2016 at 04:02:55PM +0100, Lluís Vilanova wrote: > Eliminates a future compilation error when UI code includes the tracing > headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and > GLib's i18n '_' macro. > > Signed-off-by: Lluís Vilanova > --- > disas/i386.c|

[Qemu-devel] [PATCH 08/15] stream: Add 'job-id' parameter to 'block-stream'

2016-06-09 Thread Alberto Garcia
This patch adds a new optional 'job-id' parameter to 'block-stream', allowing the user to specify the ID of the block job to be created. The HMP 'block_stream' command remains unchanged. Signed-off-by: Alberto Garcia --- block/stream.c| 12 ++-- blockdev.c|

[Qemu-devel] [PATCH 09/15] stream: Add 'job-id' parameter to 'block-commit'

2016-06-09 Thread Alberto Garcia
This patch adds a new optional 'job-id' parameter to 'block-commit', allowing the user to specify the ID of the block job to be created. Signed-off-by: Alberto Garcia --- block/commit.c| 7 --- block/mirror.c| 6 +++--- blockdev.c| 9 + incl

[Qemu-devel] [PATCH 07/15] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup'

2016-06-09 Thread Alberto Garcia
This patch adds a new optional 'job-id' parameter to 'blockdev-backup' and 'drive-backup', allowing the user to specify the ID of the block job to be created. The HMP 'drive_backup' command remains unchanged. Signed-off-by: Alberto Garcia --- block/backup.c| 8 blockdev.c

[Qemu-devel] [PATCH 01/15] stream: Fix prototype of stream_start()

2016-06-09 Thread Alberto Garcia
'stream-start' has a parameter called 'backing-file', which is the string to be written to bs->backing when the job finishes. In the stream_start() implementation it is called 'backing_file_str', but it the prototype in the header file it is called 'base_id'. This patch fixes it so the name is th

[Qemu-devel] [PATCH 05/15] blockjob: Add 'job_id' parameter to block_job_create()

2016-06-09 Thread Alberto Garcia
Job IDs are generated automatically when a new job is created. This patch adds a new 'job_id' parameter to let the caller provide one instead. In this case the ID is verified to be unique and well-formed. Signed-off-by: Alberto Garcia --- block/backup.c| 3 ++- block/commit.c

[Qemu-devel] [PATCH 13/15] blockjob: Add 'id' parameter to 'block-job-resume'

2016-06-09 Thread Alberto Garcia
This patch allows the 'block-job-resume' command to identify the job by either its ID or its device name. The latter becomes now optional since the ID alone is enough to identify the job. The HMP 'block_job_resume' command remains unchanged. Signed-off-by: Alberto Garcia --- blockdev.c

[Qemu-devel] [PATCH 06/15] mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror'

2016-06-09 Thread Alberto Garcia
This patch adds a new optional 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror', allowing the user to specify the ID of the block job to be created. The HMP 'drive_mirror' command remains unchanged. Signed-off-by: Alberto Garcia --- block/mirror.c| 14 +++--- block

[Qemu-devel] [PATCH 12/15] blockjob: Add 'id' parameter to 'block-job-pause'

2016-06-09 Thread Alberto Garcia
This patch allows the 'block-job-pause' command to identify the job by either its ID or its device name. The latter becomes now optional since the ID alone is enough to identify the job. The HMP 'block_job_pause' command remains unchanged. Signed-off-by: Alberto Garcia --- blockdev.c

[Qemu-devel] [PATCH 03/15] blockjob: Add block_job_get()

2016-06-09 Thread Alberto Garcia
Currently the way to look for a specific block job is to iterate the list manually using block_job_next(). Since we want to be able to identify a job primarily by its ID it makes sense to have a function that does just that. Signed-off-by: Alberto Garcia --- blockjob.c | 13 ++

[Qemu-devel] [PATCH 02/15] blockjob: Decouple the ID from the device name in the BlockJob struct

2016-06-09 Thread Alberto Garcia
Block jobs are identified by the name of the BlockBackend of the BDS where the job was started. We want block jobs to have unique, arbitrary identifiers that are not tied to a block device, so this patch decouples the ID from the device name in the BlockJob structure. The ID is generated automati

[Qemu-devel] [PATCH 10/15] blockjob: Add 'id' parameter to 'block-job-set-speed'

2016-06-09 Thread Alberto Garcia
This patch allows the 'block-job-set-speed' command to identify the job by either its ID or its device name. The latter becomes now optional since the ID alone is enough to identify the job. The HMP 'block_job_set_speed' command remains unchanged. Signed-off-by: Alberto Garcia --- blockdev.c

[Qemu-devel] [PATCH 11/15] blockjob: Add 'id' parameter to 'block-job-cancel'

2016-06-09 Thread Alberto Garcia
This patch allows the 'block-job-cancel' command to identify the job by either its ID or its device name. The latter becomes now optional since the ID alone is enough to identify the job. The HMP 'block_job_cancel' command remains unchanged. Signed-off-by: Alberto Garcia --- blockdev.c

[Qemu-devel] [PATCH 14/15] blockjob: Add 'id' parameter to 'block-job-complete'

2016-06-09 Thread Alberto Garcia
This patch allows the 'block-job-complete' command to identify the job by either its ID or its device name. The latter becomes now optional since the ID alone is enough to identify the job. The HMP 'block_job_complete' command remains unchanged. Signed-off-by: Alberto Garcia --- blockdev.c

[Qemu-devel] [PATCH 15/15] blockjob: Add 'id' field to 'BlockJobInfo' and all BLOCK_JOB_* events

2016-06-09 Thread Alberto Garcia
Now that all jobs have an ID and all QMP commands that create and operate on block jobs can specify one we can finally expose the ID in all BLOCK_JOB_* events and the BlockJobInfo structure. This modifies the output of several iotests, but now we have full control of the job IDs so this patch upda

[Qemu-devel] [PATCH 00/15] Add an 'id' field to block jobs

2016-06-09 Thread Alberto Garcia
Hello all, Block jobs are currently identified by the name of the block backend of the BDS where the job was started. This series adds a new 'id' field that is specific to the block job and guaranteed to be unique and always present. The patches can be summarized as follows: - 1: Fix the protot

Re: [Qemu-devel] [PATCH v3 2/2] target-i386: add migration support for Intel LMCE

2016-06-09 Thread Paolo Bonzini
On 09/06/2016 09:16, Haozhong Zhang wrote: > On 06/08/16 13:36, Paolo Bonzini wrote: >> >> >> On 03/06/2016 08:09, Haozhong Zhang wrote: >>> LMCE is disabled by default, but a cpu option 'lmce=on/off' is provided >>> to enable/disable it. Migration is only allowed between VCPUs with the >>> same

[Qemu-devel] [PATCH 04/15] block: Simplify find_block_job() and make it accept a job ID

2016-06-09 Thread Alberto Garcia
find_block_job() looks for a block backend with a specified name, checks whether it has a block job and acquires its AioContext. This patch uses block_job_next() and iterate directly over the block jobs. In addition to that we want to identify jobs primarily by their ID, so this patch updates find

Re: [Qemu-devel] [Qemu-block] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads

2016-06-09 Thread Paolo Bonzini
On 09/06/2016 09:35, Stefan Hajnoczi wrote: > > if (s->dataplane) { > virtio_blk_data_plane_stop(s->dataplane); > } > > virtio_save(vdev, f); > } > > We reach the situation I described where BDS AioContext changes but > mirror_run() is still in the IOThread AioContext. Why

Re: [Qemu-devel] [Qemu-block] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads

2016-06-09 Thread Stefan Hajnoczi
On Thu, Jun 9, 2016 at 9:25 AM, Paolo Bonzini wrote: > On 09/06/2016 09:35, Stefan Hajnoczi wrote: >> >> if (s->dataplane) { >> virtio_blk_data_plane_stop(s->dataplane); >> } >> >> virtio_save(vdev, f); >> } >> >> We reach the situation I described where BDS AioContext changes

Re: [Qemu-devel] [Qemu-block] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads

2016-06-09 Thread Stefan Hajnoczi
On Thu, Jun 9, 2016 at 9:47 AM, Stefan Hajnoczi wrote: > On Thu, Jun 9, 2016 at 9:25 AM, Paolo Bonzini wrote: >> On 09/06/2016 09:35, Stefan Hajnoczi wrote: >>> >>> if (s->dataplane) { >>> virtio_blk_data_plane_stop(s->dataplane); >>> } >>> >>> virtio_save(vdev, f); >>> } >>>

Re: [Qemu-devel] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-09 Thread Kevin Wolf
Am 08.06.2016 um 17:39 hat Nir Soffer geschrieben: > On Wed, Jun 8, 2016 at 12:32 PM, Kevin Wolf wrote: > > Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: > >> Currently, we are trying to move the backing BDS from the source to the > >> target in bdrv_replace_in_backing_chain() which is called

Re: [Qemu-devel] [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket

2016-06-09 Thread Daniel P. Berrange
On Wed, Jun 08, 2016 at 05:48:57PM -0400, Aaron Conole wrote: > Flavio Leitner writes: > > > Adding Aaron who is fixing exactly that on the OVS side. > > > > Aaron, please see the last question in the bottom of this email. > > > > On Wed, Jun 08, 2016 at 06:07:29AM -0400, Amnon Ilan wrote: > >>

[Qemu-devel] [PATCH V3] net: fix qemu_announce_self not emitting packets

2016-06-09 Thread Peter Lieven
commit fefe2a78 accidently dropped the code path for injecting raw packets. This feature is needed for sending gratuitous ARPs after an incoming migration has completed. The result is increased network downtime for vservers where the network card is not virtio-net with the VIRTIO_NET_F_GUEST_ANNOUN

[Qemu-devel] [PATCH 0/3] mips: support configurable exception vector base

2016-06-09 Thread Leon Alrae
This series implements the last piece of the minimal support required to boot MIPSr6 SMP Linux on multiple Virtual Processors. Essentially it adds RESET_BASE register to CM GCR which can be used by the guest to specify the reset exception base address for each VP. It applies on top of GIC patches:

[Qemu-devel] [PATCH 2/3] hw/mips_cpc: make VP correctly start from the reset vector

2016-06-09 Thread Leon Alrae
When VP enters the Run state it starts execution from the reset vector. Currently used CPU_INTERRUPT_WAKE does not do that if reset exception base has been modified. Therefore fix that by simply resetting given VP. Drop the usage of CPU_INTERRUPT_WAKE also in VP_STOP and instead raise the CPU_INTE

[Qemu-devel] [PATCH 1/3] target-mips: add exception base to MIPS CPU

2016-06-09 Thread Leon Alrae
Replace hardcoded 0xbfc0 with exception_base which is initialized with this default address so there is no functional change here. However, it is now exposed and consequently it will be possible to modify it from outside of the CPU. Signed-off-by: Leon Alrae --- target-mips/cpu.h | 2 +

[Qemu-devel] [PATCH 3/3] hw/mips_cmgcr: implement RESET_BASE register in CM GCR

2016-06-09 Thread Leon Alrae
Implement RESET_BASE register which is local to each VP and a write to it changes VP's reset exception base. Also, add OTHER register to allow a software running on one VP to access other VP's local registers. Guest can use this mechanism to specify custom address from which a VP will start execut

Re: [Qemu-devel] [PATCH 02/10] tests/vhost-user-bridge: add client mode

2016-06-09 Thread Victor Kaplansky
On Mon, Jun 06, 2016 at 06:45:00PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > If -c is specified, vubr will try to connect to the socket instead of > listening for connections. > > Signed-off-by: Marc-André Lureau > Tested-by: Yuanhan Liu > Reviewed-by: Yuanhan Liu

Re: [Qemu-devel] [Qemu-block] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads

2016-06-09 Thread Paolo Bonzini
> BTW this doesn't mean that the blockjobs AioContext following problem > is solved. AioContexts can still change if the guest resets the > virtio device, for example. > > I suspect we'll still hit undefined behavior when that happens. I agree... :/ Paolo

Re: [Qemu-devel] [PATCH 03/10] tests/vhost-user-bridge: workaround stale vring base

2016-06-09 Thread Victor Kaplansky
On Mon, Jun 06, 2016 at 06:45:01PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > This patch is a similar solution to what Yuanhan Liu/Huawei Xie have > suggested for DPDK. When vubr quits (killed or crashed), a restart of > vubr would get stale vring base from QEMU. That

Re: [Qemu-devel] [PATCH 02/10] tests/vhost-user-bridge: add client mode

2016-06-09 Thread Marc-André Lureau
Hi On Thu, Jun 9, 2016 at 11:53 AM, Victor Kaplansky wrote: > On Mon, Jun 06, 2016 at 06:45:00PM +0200, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> If -c is specified, vubr will try to connect to the socket instead of >> listening for connections. >> >> Signed-off-by: Mar

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-06-09 Thread Zhou Jie
TO Alex TO Michael In your solution you add a emulate PCI bridge to act as a bridge between direct assigned devices and the host bridge. Do you mean put all direct assigned devices to one emulate PCI bridge? If yes, this maybe bring some problems. We are writing a patchset to s

Re: [Qemu-devel] [PATCH 03/10] tests/vhost-user-bridge: workaround stale vring base

2016-06-09 Thread Marc-André Lureau
Hi On Thu, Jun 9, 2016 at 12:07 PM, Victor Kaplansky wrote: > What if set_vring_base is called after set_vring_addr? > Maybe it is worth to add the fixup to the set_vring_base as well? It would need to handle conditions like set_vring_base() being called while set_vring_addr() is not yet, and th

Re: [Qemu-devel] [PATCH 2/6] disas: Remove unused macro '_'

2016-06-09 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Feb 25, 2016 at 04:02:55PM +0100, Lluís Vilanova wrote: >> Eliminates a future compilation error when UI code includes the tracing >> headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and >> GLib's i18n '_' macro. >> >> Signed-off-by: Lluís Vilanova

Re: [Qemu-devel] [PATCH v3 2/4] target-tricore: Added MADD.F and MSUB.F instructions

2016-06-09 Thread Bastian Koppelmann
On 06/07/2016 05:49 PM, peer.ad...@c-lab.de wrote: > From: Peer Adelt > > Multiplies D[a] and D[b] and adds/subtracts the result to/from D[d]. > The result is put in D[c]. All operands are floating-point numbers. > > Signed-off-by: Peer Adelt > --- > target-tricore/fpu_helper.c | 80 > +++

Re: [Qemu-devel] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-09 Thread Nir Soffer
On Thu, Jun 9, 2016 at 11:58 AM, Kevin Wolf wrote: > Am 08.06.2016 um 17:39 hat Nir Soffer geschrieben: >> On Wed, Jun 8, 2016 at 12:32 PM, Kevin Wolf wrote: >> > Am 06.06.2016 um 16:42 hat Max Reitz geschrieben: >> >> Currently, we are trying to move the backing BDS from the source to the >> >>

Re: [Qemu-devel] Adding throttling to virtio-9p

2016-06-09 Thread Pradeep Kiruvale
On 7 June 2016 at 15:48, Greg Kurz wrote: > On Tue, 7 Jun 2016 10:20:51 +0200 > Pradeep Kiruvale wrote: > > Hi All, > > > > I am trying to add the throttle to the virtio-9p devices using the > throttle > > APIs that are already exists in the qemu. > > > > I need help to understand the device mod

Re: [Qemu-devel] [RFC v8 00/14] Slow-path for atomic instruction translation

2016-06-09 Thread Sergey Fedorov
Hi, On 19/04/16 16:39, Alvise Rigo wrote: > This patch series provides an infrastructure for atomic instruction > implementation in QEMU, thus offering a 'legacy' solution for > translating guest atomic instructions. Moreover, it can be considered as > a first step toward a multi-thread TCG. > > T

Re: [Qemu-devel] [PATCH 10/10] pc: parse cpu features only once

2016-06-09 Thread Igor Mammedov
On Wed, 8 Jun 2016 14:03:15 -0300 Eduardo Habkost wrote: > On Mon, Jun 06, 2016 at 05:16:52PM +0200, Igor Mammedov wrote: > > considering that features are converted to > > global properties and global properties are > > automatically applied to every new instance > > of created CPU (at object_ne

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-09 Thread Stefan Hajnoczi
On Thu, Feb 25, 2016 at 04:03:06PM +0100, Lluís Vilanova wrote: @@ -332,6 +334,16 @@ struct CPUState { > struct KVMState *kvm_state; > struct kvm_run *kvm_run; > > +#define TRACE_VCPU_DSTATE_TYPE uint32_t > +TRACE_VCPU_DSTATE_TYPE trace_dstate; Please use typedef instead of #defin

Re: [Qemu-devel] [PATCH 5/6] trace: Conditionally trace events based on their per-vCPU state

2016-06-09 Thread Stefan Hajnoczi
On Thu, Feb 25, 2016 at 04:03:12PM +0100, Lluís Vilanova wrote: > Events with the 'vcpu' property are conditionally emitted according to > their per-vCPU state. Other events are emitted normally based on their > global tracing state. > > Note that the per-vCPU condition check applies to all tracin

Re: [Qemu-devel] [PATCH 3/6] [trivial] trace: Cosmetic changes on fast-path tracing

2016-06-09 Thread Stefan Hajnoczi
On Thu, Feb 25, 2016 at 04:03:00PM +0100, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > trace/control-internal.h |8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-devel] [PATCH 1/6] trace: Identify events with the 'vcpu' property

2016-06-09 Thread Stefan Hajnoczi
On Thu, Feb 25, 2016 at 04:02:49PM +0100, Lluís Vilanova wrote: > A new event attribute 'cpu_id' is added to have a separate ID > space ('TRACE_VCPU_*') for all events with the 'vcpu' property. > > These are later used to identify which events are enabled on each vCPU. > > Signed-off-by: Lluís Vi

Re: [Qemu-devel] [PATCH 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-09 Thread Stefan Hajnoczi
On Thu, Feb 25, 2016 at 04:03:18PM +0100, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > monitor.c |4 +- > qapi/trace.json | 20 ++-- > qmp-commands.hx | 18 ++- > trace/qmp.c | 143 > --- > 4 files ch

Re: [Qemu-devel] [PATCH] Modify net/socket.c to use socket_* functions from include/qemu/sockets.h

2016-06-09 Thread Stefan Hajnoczi
On Tue, May 31, 2016 at 03:27:42PM +0530, Ashi wrote: Thanks! Please submit new revisions as separate email threads. Please include the rationale you posted in this message in the commit description so it will be part of the git log. Please check the guidelines on how to submit patches if you ha

Re: [Qemu-devel] [RFC v8 00/14] Slow-path for atomic instruction translation

2016-06-09 Thread alvise rigo
Hi Sergey, Thank you for this precise summary. On Thu, Jun 9, 2016 at 1:42 PM, Sergey Fedorov wrote: > Hi, > > On 19/04/16 16:39, Alvise Rigo wrote: >> This patch series provides an infrastructure for atomic instruction >> implementation in QEMU, thus offering a 'legacy' solution for >> translat

Re: [Qemu-devel] [PATCH 08/10] cpu: use CPUClass->parse_features() as convertor to global properties

2016-06-09 Thread Igor Mammedov
On Wed, 8 Jun 2016 13:47:46 -0300 Eduardo Habkost wrote: > On Mon, Jun 06, 2016 at 05:16:50PM +0200, Igor Mammedov wrote: > > Currently CPUClass->parse_features() is used to parse > > -cpu features string and set properties on created CPU > > instances. > > > > But considering that features spec

Re: [Qemu-devel] [RFC v8 00/14] Slow-path for atomic instruction translation

2016-06-09 Thread Sergey Fedorov
On 09/06/16 15:35, alvise rigo wrote: > On Thu, Jun 9, 2016 at 1:42 PM, Sergey Fedorov wrote: >> On 19/04/16 16:39, Alvise Rigo wrote: >>> The implementation heavily uses the software TLB together with a new >>> bitmap that has been added to the ram_list structure which flags, on a >>> per-CPU bas

Re: [Qemu-devel] [virtio-net] migration

2016-06-09 Thread Stefan Hajnoczi
On Fri, May 27, 2016 at 12:59:51PM +, Catalin Vasile wrote: > What is the workflow for virtio-net devices when migrating the VM it belongs > to? > From what I understand so far the stop() primitives in qemu are called for > virtio_net and vhost_net which makes the virtqueue reset such that it

Re: [Qemu-devel] [PATCH v4 0/2] trace: Add event for vCPU memory accesses

2016-06-09 Thread Stefan Hajnoczi
On Fri, May 27, 2016 at 06:00:53PM +0200, Lluís Vilanova wrote: Hi Richard, I noticed you reviewed the last revision but weren't CCed on this. Please review and then I'll merge it. Stefan > This series adds an event to track information related to memory accesses > performed by the guest CPUs ("

Re: [Qemu-devel] [PATCH v6 03/13] register: Add Memory API glue

2016-06-09 Thread KONRAD Frederic
Hi Alistair, Le 13/05/2016 à 00:45, Alistair Francis a écrit : Add memory io handlers that glue the register API to the memory API. Just translation functions at this stage. Although it does allow for devices to be created without all-in-one mmio r/w handlers. This patch also adds the RegisterI

Re: [Qemu-devel] [PATCH v2 17/19] linux-user: Use both si_code and si_signo when converting siginfo_t

2016-06-09 Thread Peter Maydell
On 8 June 2016 at 07:30, Riku Voipio wrote: > At least on Debian jessie, this blows up a selection of architectures: > > /home/voipio/linaro/qemu/linux-user/signal.c: In function > ‘host_to_target_siginfo’: > /home/voipio/linaro/qemu/linux-user/signal.c:387:10: error: > ‘tgt_tmp._sifields._sigch

Re: [Qemu-devel] [PATCH v5 01/11] qdict: implement a qdict_crumple method for un-flattening a dict

2016-06-09 Thread Markus Armbruster
I apologize for the lateness of this review. "Daniel P. Berrange" writes: > The qdict_flatten() method will take a dict whose elements are > further nested dicts/lists and flatten them by concatenating > keys. > > The qdict_crumple() method aims to do the reverse, taking a flat > qdict, and turn

Re: [Qemu-devel] [RFC] Allow AMD IOMMU to have both SysBusDevice and PCIDevice properties.

2016-06-09 Thread Marcel Apfelbaum
On 06/07/2016 10:12 PM, Eduardo Habkost wrote: Hi, [...] [...] diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 04aae89..431eaed 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -281,6 +281,7 @@ static void pc_q35_machine_options(MachineClass *m) m->default_machine_opts =

Re: [Qemu-devel] [PATCH 08/10] cpu: use CPUClass->parse_features() as convertor to global properties

2016-06-09 Thread Eduardo Habkost
On Thu, Jun 09, 2016 at 02:38:49PM +0200, Igor Mammedov wrote: > On Wed, 8 Jun 2016 13:47:46 -0300 > Eduardo Habkost wrote: > > > On Mon, Jun 06, 2016 at 05:16:50PM +0200, Igor Mammedov wrote: > > > Currently CPUClass->parse_features() is used to parse > > > -cpu features string and set propertie

Re: [Qemu-devel] [PATCH 10/10] pc: parse cpu features only once

2016-06-09 Thread Eduardo Habkost
On Thu, Jun 09, 2016 at 02:07:35PM +0200, Igor Mammedov wrote: > On Wed, 8 Jun 2016 14:03:15 -0300 > Eduardo Habkost wrote: [...] > > > -cpu = pc_new_cpu(machine->cpu_model, apic_id, &local_err); > > > +assert(pcms->possible_cpus->cpus[0].cpu); /* BSP is always > > > present */ > > > +

Re: [Qemu-devel] [PATCH v5 01/11] qdict: implement a qdict_crumple method for un-flattening a dict

2016-06-09 Thread Daniel P. Berrange
On Thu, Jun 09, 2016 at 03:20:47PM +0200, Markus Armbruster wrote: > I apologize for the lateness of this review. > > "Daniel P. Berrange" writes: > > > The qdict_flatten() method will take a dict whose elements are > > further nested dicts/lists and flatten them by concatenating > > keys. > > >

Re: [Qemu-devel] [PATCH v2 0/5] qcow2: Implement .bdrv_co_preadv/pwritev

2016-06-09 Thread Kevin Wolf
Am 06.06.2016 um 16:59 hat Kevin Wolf geschrieben: > This series converts qcow2 to the byte-based I/O interfaces. This simplifies > the code by removing many unit conversions, and in the unlikely case of actual > unaligned requests, it even makes the driver work more efficiently by avoiding > read-

Re: [Qemu-devel] [PATCH v2] blockdev: clarify error on attempt to open locked tray

2016-06-09 Thread Kevin Wolf
Am 08.06.2016 um 19:56 hat Colin Lord geschrieben: > When opening a device with a locked tray, gives an error explaining the > device tray is locked and that the user should wait and try again. This > is less confusing than the previous error, which simply stated that the > tray was locked. > > Si

Re: [Qemu-devel] [PATCH 08/10] cpu: use CPUClass->parse_features() as convertor to global properties

2016-06-09 Thread Igor Mammedov
On Thu, 9 Jun 2016 10:23:57 -0300 Eduardo Habkost wrote: > On Thu, Jun 09, 2016 at 02:38:49PM +0200, Igor Mammedov wrote: > > On Wed, 8 Jun 2016 13:47:46 -0300 > > Eduardo Habkost wrote: > > > > > On Mon, Jun 06, 2016 at 05:16:50PM +0200, Igor Mammedov wrote: > > > > Currently CPUClass->parse_f

Re: [Qemu-devel] [PATCH v2 4/6] qmp: Add runnability information to query-cpu-definitions

2016-06-09 Thread Jiri Denemark
On Mon, Jun 06, 2016 at 17:05:41 -0300, Eduardo Habkost wrote: > Extend query-cpu-definitions schema to allow it to return two new > optional fields: "runnable" and "unavailable-features". > "runnable" will tell if the CPU model can be run in the current > host. "unavailable-features" will contain

Re: [Qemu-devel] [PATCH v2 4/6] qmp: Add runnability information to query-cpu-definitions

2016-06-09 Thread Eduardo Habkost
On Thu, Jun 09, 2016 at 03:54:01PM +0200, Jiri Denemark wrote: > On Mon, Jun 06, 2016 at 17:05:41 -0300, Eduardo Habkost wrote: > > Extend query-cpu-definitions schema to allow it to return two new > > optional fields: "runnable" and "unavailable-features". > > "runnable" will tell if the CPU model

Re: [Qemu-devel] [PATCH v5 02/11] qapi: allow QmpInputVisitor to auto-cast types

2016-06-09 Thread Markus Armbruster
"Daniel P. Berrange" writes: > Currently the QmpInputVisitor assumes that all scalar > values are directly represented as their final types. > ie it assumes an 'int' is using QInt, and a 'bool' is > using QBool. > > This extends it so that QString is optionally permitted > for any of the non-stri

[Qemu-devel] [PATCH v2 3/3] linux-user: Use safe_syscall wrapper for fcntl

2016-06-09 Thread Peter Maydell
Use the safe_syscall wrapper for fcntl. This is straightforward now that we always use 'struct fcntl64' on the host, as we don't need to select whether to call the host's fcntl64 or fcntl syscall (a detail that the libc previously hid for us). Signed-off-by: Peter Maydell --- linux-user/syscall.

[Qemu-devel] [PATCH v2 1/3] linux-user: Avoid possible misalignment in host_to_target_siginfo()

2016-06-09 Thread Peter Maydell
host_to_target_siginfo() is implemented by a combination of host_to_target_siginfo_noswap() followed by tswap_siginfo(). The first of these two functions assumes that the target_siginfo_t it is writing to is correctly aligned, but the pointer passed into host_to_target_siginfo() is directly from th

[Qemu-devel] [PATCH v2 0/3] Use safe_syscall wrapper for fcntl()

2016-06-09 Thread Peter Maydell
This is a fixed respin of the three patches which didn't make it through review from my last set of linux-user patches. Changes v1->v2: * add a memset() to host_to_target_siginfo_noswap() to suppress bogus gcc warnings about struct fields being maybe used while uninitialized * pass the err

[Qemu-devel] [PATCH v2 2/3] linux-user: Use __get_user() and __put_user() to handle structs in do_fcntl()

2016-06-09 Thread Peter Maydell
Use the __get_user() and __put_user() to handle reading and writing the guest structures in do_ioctl(). This has two benefits: * avoids possible errors due to misaligned guest pointers * correctly sign extends signed fields (like l_start in struct flock) which might be different sizes between

Re: [Qemu-devel] [PATCH 00/10] vhost-user: simple reconnection support

2016-06-09 Thread Victor Kaplansky
Hi MST, I've reviewed the patches and they are fine. >From my perspective we can pull them into upstream. On Mon, Jun 06, 2016 at 06:44:58PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > In a previous series "RFCv2: vhost-user: shutdown and reconnection", I >

Re: [Qemu-devel] QEMU 2.7 release schedule?

2016-06-09 Thread Peter Maydell
On 7 June 2016 at 20:15, Michael Roth wrote: > Quoting Peter Maydell (2016-06-07 13:45:06) >> But I think the real problem with a schedule which expects a >> release at the tail end of August is that we then only have >> three and a half months left til mid-December which is in >> practice the lat

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-09 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Feb 25, 2016 at 04:03:06PM +0100, Lluís Vilanova wrote: > @@ -332,6 +334,16 @@ struct CPUState { >> struct KVMState *kvm_state; >> struct kvm_run *kvm_run; >> >> +#define TRACE_VCPU_DSTATE_TYPE uint32_t >> +TRACE_VCPU_DSTATE_TYPE trace_dstate; > Please use

[Qemu-devel] NOTE: QEMU 2.7 softfreeze 28th June, hardfreeze 19 July

2016-06-09 Thread Peter Maydell
Following discussion we seem to have settled on the following schedule for QEMU 2.7: * 2016-06-28 Soft feature freeze. All features should have patches on the list by this date; major features should have initial code committed. * 2016-07-19 Hard feature freeze. Tag -rc0, only bug fixes

Re: [Qemu-devel] [PATCH] MAINTAINERS: add Artyom Tarasenko as SPARC maintainer

2016-06-09 Thread Markus Armbruster
Laurent Vivier writes: > On 08/06/2016 17:02, Artyom Tarasenko wrote: >> On Wed, Jun 8, 2016 at 4:46 PM, Markus Armbruster wrote: >>> Mark Cave-Ayland writes: >>> Artyom has been working on QEMU's SPARC emulation for several years, providing initial support for Solaris under qem

Re: [Qemu-devel] [PATCH v5 03/11] qom: support arbitrary non-scalar properties with -object

2016-06-09 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The current -object command line syntax only allows for > creation of objects with scalar properties, or a list > with a fixed scalar element type. Objects which have > properties that are represented as structs in the QAPI > schema cannot be created using -object.

Re: [Qemu-devel] [PATCH v2 10/22] hw/intc/arm_gicv3: Implement functions to identify next pending irq

2016-06-09 Thread Peter Maydell
On 8 June 2016 at 02:57, Shannon Zhao wrote: > > > On 2016/5/26 22:55, Peter Maydell wrote: >> Implement the GICv3 logic to recalculate the highest priority pending >> interrupt for each CPU after some part of the GIC state has changed. >> We avoid unnecessary full recalculation where possible. >>

Re: [Qemu-devel] [PATCH v2 0/6] user-exec: cpu_resume_from_signal() cleanups

2016-06-09 Thread Peter Maydell
On 7 June 2016 at 08:59, Riku Voipio wrote: > On Mon, Jun 06, 2016 at 05:57:35PM +0100, Peter Maydell wrote: >> On 6 June 2016 at 15:55, Peter Maydell wrote: >> > Ping! >> >> Thanks for the review, Sergey. Unless anybody else wants to review >> or wants to take it through their tree (Riku?), I pr

Re: [Qemu-devel] [PATCH v7 11/15] msi_init: change return value to 0 on success

2016-06-09 Thread Markus Armbruster
Cao jin writes: > No caller use its return value as msi capability offset, in order > to make its return behaviour consistent with msix_init(). > > cc: Michael S. Tsirkin > cc: Paolo Bonzini > cc: Hannes Reinecke > cc: Markus Armbruster > cc: Marcel Apfelbaum > > Signed-off-by: Cao jin > -

Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking

2016-06-09 Thread Alexander Duyck
On Thu, Jun 9, 2016 at 3:14 AM, Zhou Jie wrote: > TO Alex > TO Michael > >In your solution you add a emulate PCI bridge to act as >a bridge between direct assigned devices and the host bridge. >Do you mean put all direct assigned devices to >one emulate PCI bridge? >If yes, thi

Re: [Qemu-devel] [PATCH v7 15/15] vmw_pvscsi: remove unnecessary internal msi state flag

2016-06-09 Thread Markus Armbruster
Cao jin writes: > Internal flag msi_used is uncesessary, msi_uninit() could be called > directly, msi_enabled() is enough to check device msi state. > > cc: Paolo Bonzini > cc: Dmitry Fleytman > cc: Markus Armbruster > cc: Marcel Apfelbaum > cc: Michael S. Tsirkin > > Signed-off-by: Cao jin

Re: [Qemu-devel] [PATCH v7 12/15] pci: Convert msi_init() to Error and fix callers to check it

2016-06-09 Thread Markus Armbruster
Cao jin writes: > msi_init() reports errors with error_report(), which is wrong > when it's used in realize(). > > Fix by converting it to Error. > > Fix its callers to handle failure instead of ignoring it. > > For those callers who don't handle the failure, it might happen: > when user want msi

Re: [Qemu-devel] [PATCH v7 12/15] pci: Convert msi_init() to Error and fix callers to check it

2016-06-09 Thread Markus Armbruster
Cao jin writes: > msi_init() reports errors with error_report(), which is wrong > when it's used in realize(). > > Fix by converting it to Error. > > Fix its callers to handle failure instead of ignoring it. > > For those callers who don't handle the failure, it might happen: > when user want msi

[Qemu-devel] [PATCH] exec: Fix qemu_ram_block_from_host for Xen

2016-06-09 Thread Anthony PERARD
Since f615f39 (exec: remove ram_addr argument from qemu_ram_block_from_host), migration under Xen is likely to fail, with a SEGV of QEMU. But the commit only reveal a bug with the calculation of the offset value in qemu_ram_block_from_host(). This patch calculates the offset from the ram_addr as q

Re: [Qemu-devel] [PATCH v7 00/15] Add param Error ** for msi_init()

2016-06-09 Thread Markus Armbruster
I had only minor stylistic remarks this time. However, the series needs a rebase already. If the conflict resolution is trivial, you may add my Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH] target-arm: Fix reset and migration of TTBCR(S)

2016-06-09 Thread Peter Maydell
Commit 6459b94c26dd666badb3 broke reset and migration of the AArch32 TTBCR(S) register if the guest used non-LPAE page tables. This is because the AArch32 TTBCR register definition is marked as ARM_CP_ALIAS, meaning that the AArch64 variant has to handle migration and reset. Although AArch64 TCR_EL

Re: [Qemu-devel] [PATCH v4 17/28] qapi: Factor out JSON number formatting

2016-06-09 Thread Eric Blake
On 06/03/2016 03:02 AM, Markus Armbruster wrote: >>> Suggest: >>> >>> * Return 0 if the number is finite, as required by RFC 7159, else -1. >>> >>> The return value makes some sense only for symmetry with >>> qstring_append_json_string(). Without that, I'd ask you to keep this >>> function simpl

Re: [Qemu-devel] [PATCH 5/5] hw/arm/virt: create the 2.7 machine type

2016-06-09 Thread Alex Bennée
Andrew Jones writes: > Signed-off-by: Andrew Jones I'm confused. These steps have introduced a bunch of boiler plate to set the default virt machine type so we can introduce 2.7 which is an alias of the existing 2.6? Wouldn't this be better of waiting until there is a concrete difference or h

Re: [Qemu-devel] [PATCH] target-arm: Fix reset and migration of TTBCR(S)

2016-06-09 Thread Sergey Fedorov
On 09/06/16 19:03, Peter Maydell wrote: > Commit 6459b94c26dd666badb3 broke reset and migration of the AArch32 > TTBCR(S) register if the guest used non-LPAE page tables. This is > because the AArch32 TTBCR register definition is marked as ARM_CP_ALIAS, > meaning that the AArch64 variant has to han

Re: [Qemu-devel] [PATCH v4 00/28] Add qapi-to-JSON and clone visitors

2016-06-09 Thread Eric Blake
On 06/03/2016 06:09 AM, Markus Armbruster wrote: > Most patches are ready as is or with minor touch-ups. > > I'd probably drop PATCH 01. The file name collision no longer exists, > and moving files just to improve their names a bit doesn't seem worth > the bother. It's a bit more churn to the re

Re: [Qemu-devel] [PATCH 5/5] hw/arm/virt: create the 2.7 machine type

2016-06-09 Thread Andrew Jones
On Thu, Jun 09, 2016 at 05:06:43PM +0100, Alex Bennée wrote: > > Andrew Jones writes: > > > Signed-off-by: Andrew Jones > > > I'm confused. These steps have introduced a bunch of boiler plate to set > the default virt machine type so we can introduce 2.7 which is an alias > of the existing 2.

[Qemu-devel] Introduces a regression (was: target-arm: Avoid unnecessary TLB flush on TCR_EL2, TCR_EL3 writes)

2016-06-09 Thread Pranith Kumar
Hi Peter, On Tue, May 10, 2016 at 6:11 AM, Peter Maydell wrote: > The TCR_EL2 and TCR_EL3 regdefs wer incorrectly using the > vmsa_tcr_el1_write function for writes. Since these registers don't > have the A1 bit that TCR_EL1 does, we don't need to do a tlb_flush() > when they are written. Remove

[Qemu-devel] [Bug 1547012] Re: qemu instances crashes with certain spice clients

2016-06-09 Thread xens
** Information type changed from Private Security to Public Security -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1547012 Title: qemu instances crashes with certain spice clients Status in QEMU:

Re: [Qemu-devel] [PATCH v2 1/2] pxa2xx: Unconditionally enable USB controller

2016-06-09 Thread Peter Maydell
On 8 June 2016 at 21:50, Eduardo Habkost wrote: > Simplify initialization logic by removing the usb_enabled() > check. The USB controller is part of the SoC, so it doesn't make > sense to create a system where it is not present. > > Cc: Peter Maydell > Cc: Andrzej Zaborowski > Cc: qemu-...@nongn

[Qemu-devel] [PATCH] mirror: follow AioContext change gracefully

2016-06-09 Thread Stefan Hajnoczi
When dataplane is enabled or disabled the drive switches to a new AioContext. The mirror block job must also move to the new AioContext so that drive accesses are always made within its AioContext. This work-in-progress patch partially achieves that by draining s->target of in-flight write reques

[Qemu-devel] [Bug 1590796] [NEW] 2.6.0 Windows 7 install hangs on splash screen, works ok with 2.5.1

2016-06-09 Thread hagar-dunor
Public bug reported: Hi maintainers, I have tried to install Windows 7 SP1 from the ISO. The install process hangs on the windows 4 color logo with qemu 2.6.0, it works and installs fine with 2.5.1. This is the script I used with 2.5.1 and it works perfectly fine: #!/bin/sh exec qemu-system-x86

Re: [Qemu-devel] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads

2016-06-09 Thread Stefan Hajnoczi
On Mon, May 23, 2016 at 7:54 PM, Jason J. Herne wrote: > Libvirt migration command: > virsh migrate --live --persistent --copy-storage-all --migrate-disks vdb > kvm1 qemu+ssh://dev1/system I guess that this is the same scenario as a manual drive_mirror + migrate test I have been doing. I also ge

Re: [Qemu-devel] [PATCH v4 21/28] qstring: Add qstring_wrap_str()

2016-06-09 Thread Eric Blake
On 06/02/2016 09:21 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Several spots in the code malloc a string, then wrap it in a >> QString, which has to duplicate the input. Adding a new >> constructor with transfer semantics makes this pattern more >> efficient, comparable to the just-a

Re: [Qemu-devel] [PATCH] mirror: follow AioContext change gracefully

2016-06-09 Thread Stefan Hajnoczi
On Thu, Jun 9, 2016 at 5:25 PM, Stefan Hajnoczi wrote: > This work-in-progress patch partially achieves that by draining > s->target of in-flight write requests to reach a quiescent point. I forgot the [RFC] tag on this patch. Just wanted to confirm that I'm not proposing this patch for merge.

  1   2   3   >