[Qemu-devel] [PATCH v2 23/27] migration: don't use an array for storing migrate parameters

2016-02-16 Thread Daniel P. Berrange
The MigrateState struct uses an array for storing migration parameters. This presumes that all future parameters will be integers too, which is not going to be the case. There is no functional reason why an array is used, if anything it makes the code less clear. The QAPI schema already defines a s

[Qemu-devel] [PATCH v2 19/27] migration: delete QEMUSizedBuffer struct

2016-02-16 Thread Daniel P. Berrange
Now that we don't have have a buffer based QemuFile implementation, the QEMUSizedBuffer code is also unused and can be deleted. A simpler buffer class also exists in util/buffer.c which other code can used as needed. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- incl

[Qemu-devel] [PATCH v2 11/27] migration: convert unix socket protocol to use QIOChannel

2016-02-16 Thread Daniel P. Berrange
Convert the unix socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built, since the socket impl of QIOChannel will report a suitable error on platforms where UNIX sockets are unavailable. Reviewed-by: Dr. David Alan Gil

Re: [Qemu-devel] [PATCH 5/8] virtio-blk: fix "disabled data plane" mode

2016-02-16 Thread Cornelia Huck
On Tue, 16 Feb 2016 16:45:24 +0100 Paolo Bonzini wrote: > On 15/02/2016 18:58, Cornelia Huck wrote: > > It seems a bit odd to me that ->started is the only state that is not > > inside the dataplane struct... this approach saves a function call for > > an accessor, though. > > Actually, I can do

[Qemu-devel] [PATCH v2 15/27] migration: convert exec socket protocol to use QIOChannel

2016-02-16 Thread Daniel P. Berrange
Convert the exec socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of the stdio popen APIs. It can be unconditionally built because the QIOChannelCommand class can report suitable error messages on platforms which can't fork processes. Reviewed-by: Dr. David Alan Gilb

[Qemu-devel] [PATCH v2 24/27] migration: define 'tls-creds' and 'tls-hostname' migration parameters

2016-02-16 Thread Daniel P. Berrange
Define two new migration parameters to be used with TLS encryption. The 'tls-creds' parameter provides the ID of an instance of the 'tls-creds' object type, or rather a subclass such as 'tls-creds-x509'. Providing these credentials will enable use of TLS on the migration data stream. If using x509

[Qemu-devel] [PATCH v2 00/27] Convert migration to QIOChannel & support TLS

2016-02-16 Thread Daniel P. Berrange
This is an update of patches that were previously posted FYI: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg00829.html v1: https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg01914.html The primary goal of this series of patches is to support TLS on the migration data channel

[Qemu-devel] [PATCH v2 09/27] migration: add reporting of errors for outgoing migration

2016-02-16 Thread Daniel P. Berrange
Currently if an app initiates an outgoing migration, it may or may not, get an error reported back on failure. If the error occurs synchronously to the 'migrate' command execution, the client app will see the error message. This is the case for DNS lookup failures. If the error occurs asynchronousl

[Qemu-devel] [PATCH v2 02/27] migration: remove use of qemu_bufopen from vmstate tests

2016-02-16 Thread Daniel P. Berrange
Some of the test-vmstate.c test cases use a temporary file while others use a memory buffer. To facilitate the future removal of the qemu_bufopen() function, convert all the tests to use a temporary file. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- tests/Makefile

[Qemu-devel] [PATCH v2 06/27] migration: force QEMUFile to blocking mode for outgoing migration

2016-02-16 Thread Daniel P. Berrange
Instead of relying on the default QEMUFile I/O blocking flag state, explicitly turn on blocking I/O for outgoing migration since it takes place in a background thread. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- migration/migration.c | 1 + 1 file changed, 1 insert

[Qemu-devel] [PATCH v2 07/27] migration: introduce a new QEMUFile impl based on QIOChannel

2016-02-16 Thread Daniel P. Berrange
Introduce a new QEMUFile implementation that is based on the QIOChannel objects. This impl is different from existing impls in that there is no file descriptor that can be made available, as some channels may be based on higher level protocols such as TLS. Although the QIOChannel based implementat

[Qemu-devel] [PATCH v2 04/27] migration: split migration hooks out of QEMUFileOps

2016-02-16 Thread Daniel P. Berrange
The QEMUFileOps struct contains the I/O subsystem callbacks and the migration stage hooks. Split the hooks out into a separate QEMUFileHooks struct to make it easier to refactor the I/O side of QEMUFile without affecting the hooks. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berr

[Qemu-devel] [PATCH v2 05/27] migration: introduce set_blocking function in QEMUFileOps

2016-02-16 Thread Daniel P. Berrange
Remove the assumption that every QEMUFile implementation has a file descriptor available by introducing a new function in QEMUFileOps to change the blocking state of a QEMUFile. If not set, it will fallback to the original code using the get_fd method. Reviewed-by: Dr. David Alan Gilbert Signed-

[Qemu-devel] [PATCH v2 01/27] s390: use FILE instead of QEMUFile for creating text file

2016-02-16 Thread Daniel P. Berrange
The s390 skeys monitor command needs to write out a plain text file. Currently it is using the QEMUFile class for this, but work is ongoing to refactor QEMUFile and eliminate much code related to it. The only feature qemu_fopen() gives over fopen() is support for QEMU FD passing, but this can be ac

[Qemu-devel] [PATCH v2 03/27] migration: ensure qemu_fflush() always writes full data amount

2016-02-16 Thread Daniel P. Berrange
The QEMUFile writev_buffer / put_buffer functions are expected to write out the full set of requested data, blocking until complete. The qemu_fflush() caller does not expect to deal with partial writes. Clarify the function comments and add a sanity check to the code to catch mistaken implementatio

Re: [Qemu-devel] [PATCH v10 02/13] qapi: Forbid empty unions and useless alternates

2016-02-16 Thread Markus Armbruster
Eric Blake writes: > Empty unions serve no purpose, and while we compile with gcc > which permits them, strict C99 forbids them. We could inject > a dummy member (and in fact, we do for empty structs), but while gen_variants() injects void *data. > empty structs make sense in qapi, Suggest t

Re: [Qemu-devel] QEMU GSoC 2016: MTTCG project

2016-02-16 Thread Alex Bennée
Pranith Kumar writes: > Hello, > > I am interested in working on a portion of the MTTCG project as part > of GSoC 2016. I am writing to ask for guidance in creating a formal > proposal. > > On IRC, Alex suggested a project to support proper modelling of memory > consistency between different hos

[Qemu-devel] [PATCH v6] i2c-tiny-usb: a small usb to i2c bridge

2016-02-16 Thread Tim Sander
Oh my, so many stupid little errors. Due to firewall impairment i am sending these patches manually. Last time i forgot to disable the newline breaks which made the patch v5 unusable. Sorry for this inconvenience. i2c-tiny-usb is a small usb to i2c bridge: http://www.harbaum.org/till/i2c_tiny_u

[Qemu-devel] [PATCH] qemu-options.hx: Improve documentation of chardev multiplexing mode

2016-02-16 Thread Peter Maydell
The current documentation of chardev mux=on is rather brief and opaque; expand it to hopefully be a bit more helpful. Signed-off-by: Peter Maydell --- There was some discussion on #qemu yesterday evening about multiplexing, and "make the docs a bit less confusing" was one suggestion... --- qemu-

[Qemu-devel] [PULL v1 3/3] io: convert QIOChannelBuffer to use uint8_t instead of char

2016-02-16 Thread Daniel P. Berrange
The QIOChannelBuffer struct uses a 'char *' for its data buffer. It will give simpler type compatibility with the migration APIs if it uses 'uint8_t *' instead, avoiding several casts. Signed-off-by: Daniel P. Berrange --- include/io/channel-buffer.h | 2 +- io/channel-buffer.c | 2 +- 2

[Qemu-devel] [PULL v1 1/3] io: improve docs for QIOChannelSocket async functions

2016-02-16 Thread Daniel P. Berrange
In the docs for qio_channel_socket_connect_async, qio_channel_socket_listen_async and qio_channel_socket_dgram_async, mention that the SocketAddress parameters are copied, so can be freed immediately. Reviewed-by: "Dr. David Alan Gilbert" Signed-off-by: Daniel P. Berrange --- include/io/channel

[Qemu-devel] [PATCH] qed: fix bdrv_qed_drain

2016-02-16 Thread Paolo Bonzini
The current implementation of bdrv_qed_drain can cause a double completion of a request. The problem is that bdrv_qed_drain calls qed_plug_allocating_write_reqs unconditionally, but this is not correct if an allocating write is queued. In this case, qed_unplug_allocating_write_reqs will restart t

[Qemu-devel] qemu storage windows issue

2016-02-16 Thread Benoit
Hi, -virtio-win-0.1.102.iso -host archlinux / qemu 2.4.1 / kvm -guest windows 7 pro x64 -qemu-img create -f raw en_x64_windows_7_ipc2_storage_75 75G -drive file=/srv/qemu/vm/en_x64_windows_7_ipc2_storage_75,if=virtio,cache=none,format=raw,discard=unmap My D: drive (74GB) has 2x 32GB files used

Re: [Qemu-devel] [PATCH 00/14] More #include cleanups

2016-02-16 Thread Peter Maydell
On 16 February 2016 at 13:49, Peter Maydell wrote: > On 9 February 2016 at 15:24, Peter Maydell wrote: >> This set of patches does a bunch more cleaning of includes. >> Specifically it does everything necessary to be able to >> remove osdep.h includes from header files including qemu-common.h > >

[Qemu-devel] [PULL v1 0/3] Misc I/O fixes

2016-02-16 Thread Daniel P. Berrange
The following changes since commit a5af12871fd4601c44f08d9e49131e9ca13ef102: Merge remote-tracking branch 'remotes/sstabellini/tags/xen-2016-02-12' into staging (2016-02-12 17:36:12 +) are available in the git repository at: git://github.com/berrange/qemu.git tags/pull-io-next-2016-02-1

[Qemu-devel] [PULL v1 2/3] io: introduce helper for creating channels from file descriptors

2016-02-16 Thread Daniel P. Berrange
Depending on what object a file descriptor refers to a different type of IO channel will be needed - either a QIOChannelFile or a QIOChannelSocket. Introduce a qio_channel_new_fd() method which will return the appropriate channel implementation. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Be

Re: [Qemu-devel] [PATCH 5/8] virtio-blk: fix "disabled data plane" mode

2016-02-16 Thread Paolo Bonzini
On 15/02/2016 18:58, Cornelia Huck wrote: > It seems a bit odd to me that ->started is the only state that is not > inside the dataplane struct... this approach saves a function call for > an accessor, though. Actually, I can do better by moving the flag entirely within hw/block/virtio-blk.c: d

Re: [Qemu-devel] [PATCH 2/3] block/backup: avoid copying less than full target clusters

2016-02-16 Thread John Snow
On 02/14/2016 01:49 AM, Fam Zheng wrote: > On Fri, 02/12 18:06, John Snow wrote: >> During incremental backups, if the target has a cluster size that is >> larger than the backup cluster size and we are backing up to a target >> that cannot (for whichever reason) pull clusters up from a backing i

Re: [Qemu-devel] [Qemu-block] [PATCH 00/13] throttle: Allow I/O bursts for a user-defined period of time

2016-02-16 Thread Alberto Garcia
On Mon 15 Feb 2016 05:40:29 PM CET, Stefan Hajnoczi wrote: > On Fri, Feb 05, 2016 at 12:59:10PM +0200, Alberto Garcia wrote: >> - With this series we set "a maximum of X operations/second for a >>period of T seconds". If would also be possible to make it "a >>maximum of X operations/second

Re: [Qemu-devel] [PATCH v2 6/9] i.MX: Add i.MX6 System Reset Controller device.

2016-02-16 Thread Peter Maydell
On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: > This controller is also present in i.MX5X devices but they are not > yet emulated by QEMU. > > Signed-off-by: Jean-Christophe Dubois > @@ -0,0 +1,353 @@ > +/* > + * IMX6 System Reset Controller > + * > + * Copyright (c) 2015 Jean-Chri

Re: [Qemu-devel] [PATCH 5/4] vl: Clean up machine selection in main().

2016-02-16 Thread Laszlo Ersek
On 02/16/16 15:57, Markus Armbruster wrote: > We set machine_class to the default first, and update it to the real > one later. Any use of machine_class in between is almost certainly > wrong. Set it once and for all instead. > > Signed-off-by: Markus Armbruster > --- > vl.c | 11 ++- >

Re: [Qemu-devel] [PATCH v2 7/9] i.MX: Add i.MX6 SOC implementation.

2016-02-16 Thread Peter Maydell
On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: > For now we only support the following devices: > * up to 4 Cortex A9 cores > * A9 MPCORE (SCU, GIC, TWD) > * 5 i.MX UARTs > * 2 EPIT timers > * 1 GPT timer > * 3 I2C controllers > * 7 GPIO controllers > * 6 SDHC controllers > * 1 CCM de

Re: [Qemu-devel] [PATCH v2 9/9] i.MX: Add missing descriptions in devices.

2016-02-16 Thread Peter Maydell
On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: > Signed-off-by: Jean-Christophe Dubois > --- > > Changes since V1: > * Not present on V1 > > hw/arm/fsl-imx25.c | 1 + > hw/arm/fsl-imx31.c | 1 + > hw/i2c/imx_i2c.c | 1 + > hw/net/imx_fec.c | 1 + > 4 files changed, 4 insertions

Re: [Qemu-devel] [PATCH v2 8/9] i.MX: Add sabrelite i.MX6 emulation.

2016-02-16 Thread Peter Maydell
On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: > Signed-off-by: Jean-Christophe Dubois > --- > > Changes since v1: > * output a message and exit if RAM size is unsupported. > > hw/arm/Makefile.objs | 2 +- > hw/arm/sabrelite.c | 93 >

Re: [Qemu-devel] [PATCH v2 5/9] i.MX: Add i.MX6 CCM and ANALOG device.

2016-02-16 Thread Peter Maydell
On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: > Signed-off-by: Jean-Christophe Dubois > --- > > Changes since V1: > * move clk computation to uint64_t to avoid overflow > * added explanation on _SET, _CLR and _TOG registers > * move CCM and ANALOG handling in sub memory regions.

Re: [Qemu-devel] [PATCH v2 4/9] i.MX: Add the CLK_IPG_HIGH clock

2016-02-16 Thread Peter Maydell
On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: > EPIT, GPT and other i.MX timers are using "abstract" clocks among which > a CLK_IPG_HIGH clock. > > On i.MX25 and i.MX31 CLK_IPG and CLK_IPG_HIGH are mapped to the same clock > but on other SOC like i.MX6 they are mapped to distinct clo

Re: [Qemu-devel] [PATCH v2 3/9] i.MX: Remove CCM useless clock computation handling.

2016-02-16 Thread Peter Maydell
On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: > Most clocks supported by the CCM are useless to the qemu framework. > > Only clocks related to timers (EPIT, GPT, PWM, WATCHDOG, ...) are usefull > to QEMU code. > > Therefore this patch removes clock computation handling for all clocks

Re: [Qemu-devel] [PATCH v2 2/9] i.MX: Rename CCM NOCLK to CLK_NONE for naming consistency.

2016-02-16 Thread Peter Maydell
On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: > This way all CCM clock defines/enums are named CLK_XXX > > Signed-off-by: Jean-Christophe Dubois > --- > Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v2 1/9] i.MX: Allow GPT timer to rollover.

2016-02-16 Thread Peter Maydell
On 8 February 2016 at 22:08, Jean-Christophe Dubois wrote: > GPT timer need to rollover when it reaches 0x. > > It also need to reset to 0 when in "restart mode" and crossing the > compare 1 register. > > Signed-off-by: Jean-Christophe Dubois > --- > Reviewed-by: Peter Maydell thanks

Re: [Qemu-devel] [PATCH v19 3/9] pc: add a Virtual Machine Generation ID device

2016-02-16 Thread Michael S. Tsirkin
On Tue, Feb 16, 2016 at 02:36:49PM +0200, Marcel Apfelbaum wrote: > >>2. PCI devices with no driver installed are not re-mapped. This can be OK > >> from the Windows point of view because Resources Window does not show > >> the MMIO range > >> for this device. > >> > >> If the other (r

[Qemu-devel] [PATCH 5/4] vl: Clean up machine selection in main().

2016-02-16 Thread Markus Armbruster
We set machine_class to the default first, and update it to the real one later. Any use of machine_class in between is almost certainly wrong. Set it once and for all instead. Signed-off-by: Markus Armbruster --- vl.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --gi

Re: [Qemu-devel] [PATCH v19 3/9] pc: add a Virtual Machine Generation ID device

2016-02-16 Thread Michael S. Tsirkin
On Tue, Feb 16, 2016 at 02:51:25PM +0100, Igor Mammedov wrote: > On Tue, 16 Feb 2016 14:36:49 +0200 > Marcel Apfelbaum wrote: > > > On 02/16/2016 02:17 PM, Igor Mammedov wrote: > > > On Tue, 16 Feb 2016 12:05:33 +0200 > > > Marcel Apfelbaum wrote: > > > > > >> On 02/11/2016 06:30 PM, Michael S

Re: [Qemu-devel] [PATCH V2 1/2] ARM: PL061: Clear PL061 device state after reset

2016-02-16 Thread Peter Maydell
On 16 February 2016 at 14:35, Peter Maydell wrote: > On 1 February 2016 at 20:49, Wei Huang wrote: >> Current QEMU doesn't clear PL061 state after reset. This causes a >> weird issue with guest reboot via GPIO. Here is the device state >> description with two reboot requests: > > These reset val

Re: [Qemu-devel] Hello from a new comer

2016-02-16 Thread thomas
Did you implemented the support for stm32l in qemu?

Re: [Qemu-devel] [PATCH v2] usb: drop active assert when pid is invalid

2016-02-16 Thread Gerd Hoffmann
Hi, > > When clearing RS in cmd we should also set HALTED in status I think. > Actually, uhci_frame_timer() had done this work. > > if (!(s->cmd & UHCI_CMD_RS)) { > /* Full stop */ > trace_usb_uhci_schedule_stop(); > qemu_del_timer(s->frame_timer); > uhci_async_

Re: [Qemu-devel] [PATCH V2 2/2] ARM: PL061: Cleaning field of PL061 device state

2016-02-16 Thread Peter Maydell
On 1 February 2016 at 20:49, Wei Huang wrote: > This patch removes the float_high field of PL061State, which doesn't > seem to be used anywhere. Because this changes the device state, the > version ID is also bumped up for the reason of compatiblity. > > Signed-off-by: Wei Huang > --- > hw/gpio/

Re: [Qemu-devel] [PATCH V2 1/2] ARM: PL061: Clear PL061 device state after reset

2016-02-16 Thread Peter Maydell
On 1 February 2016 at 20:49, Wei Huang wrote: > Current QEMU doesn't clear PL061 state after reset. This causes a > weird issue with guest reboot via GPIO. Here is the device state > description with two reboot requests: > > (PL061State fields) data old_in_data istate > VM boot

Re: [Qemu-devel] [PATCH] usb: check RNDIS buffer offsets & length

2016-02-16 Thread Gerd Hoffmann
> diff --git a/hw/usb/core.c b/hw/usb/core.c > index d0025db..9d90ec7 100644 > --- a/hw/usb/core.c > +++ b/hw/usb/core.c > @@ -128,9 +128,16 @@ static void do_token_setup(USBDevice *s, USBPacket *p) > } > > usb_packet_copy(p, s->setup_buf, p->iov.size); > +s->setup_index = 0; >

Re: [Qemu-devel] [PATCH v2] usb: drop active assert when pid is invalid

2016-02-16 Thread Gonglei (Arei)
> > Hi, > > > diff --git a/hw/usb/core.c b/hw/usb/core.c > > index bea5e1e..6fbcf00 100644 > > --- a/hw/usb/core.c > > +++ b/hw/usb/core.c > > @@ -716,7 +716,6 @@ struct USBEndpoint *usb_ep_get(USBDevice *dev, > int pid, int ep) > > if (ep == 0) { > > return &dev->ep_ctl; > >

Re: [Qemu-devel] [PATCH 08/13] throttle: Add support for burst periods

2016-02-16 Thread Alberto Garcia
On Tue 16 Feb 2016 11:45:32 AM CET, Kevin Wolf wrote: >> +/* If the bucket is not full yet we have to make sure that we >> + * fulfill the goal of bkt->max units per second. */ >> +if (bkt->burst_length > 1) { >> +/* We use 1/10 of the max value to smooth the throttling. >> +

Re: [Qemu-devel] [PATCH] usb: ohci avoid multiple eof timers

2016-02-16 Thread Gerd Hoffmann
On Di, 2016-02-16 at 15:34 +0530, P J P wrote: > When transitioning an OHCI controller to the OHCI_USB_OPERATIONAL > state, it creates an eof timer object in 'ohci_bus_start'. > It does not check if one already exists. This results in memory > leakage and null dereference issue. Add a check to avoi

[Qemu-devel] Incremental backup call

2016-02-16 Thread Stefan Hajnoczi
Hi, There are several ongoing efforts to implement incremental backup-related features. Let's have a voice/video conference to get everyone on the same page, avoid duplicated work, and get patches merged faster. Agenda: * External incremental backup API. Summarize requirements common to third-

Re: [Qemu-devel] [PATCH v2 1/1] vhost-user interrupt management fixes

2016-02-16 Thread Michael S. Tsirkin
On Tue, Feb 16, 2016 at 03:28:06PM +0200, Victor Kaplansky wrote: > From: Didier Pallard > > Since guest_mask_notifier can not be used in vhost-user mode due > to buffering implied by unix control socket, force > use_mask_notifier on virtio devices of vhost-user interfaces, and > send correct cal

Re: [Qemu-devel] [PATCH v2 1/5] target-arm: Add the pmceid0 and pmceid1 registers

2016-02-16 Thread Peter Maydell
On 10 February 2016 at 13:52, Aaron Lindsay wrote: > On Feb 09 15:11, Alistair Francis wrote: >> On Tue, Feb 9, 2016 at 9:19 AM, Peter Maydell >> wrote: >> > On 6 February 2016 at 00:55, Alistair Francis >> > wrote: >> >> diff --git a/target-arm/cpu.c b/target-arm/cpu.c >> >> index 7ddbf3d..937

Re: [Qemu-devel] [PATCH v2] usb: drop active assert when pid is invalid

2016-02-16 Thread Gerd Hoffmann
Hi, > diff --git a/hw/usb/core.c b/hw/usb/core.c > index bea5e1e..6fbcf00 100644 > --- a/hw/usb/core.c > +++ b/hw/usb/core.c > @@ -716,7 +716,6 @@ struct USBEndpoint *usb_ep_get(USBDevice *dev, int pid, > int ep) > if (ep == 0) { > return &dev->ep_ctl; > } > -assert(pid =

Re: [Qemu-devel] [PATCH v19 3/9] pc: add a Virtual Machine Generation ID device

2016-02-16 Thread Igor Mammedov
On Tue, 16 Feb 2016 14:36:49 +0200 Marcel Apfelbaum wrote: > On 02/16/2016 02:17 PM, Igor Mammedov wrote: > > On Tue, 16 Feb 2016 12:05:33 +0200 > > Marcel Apfelbaum wrote: > > > >> On 02/11/2016 06:30 PM, Michael S. Tsirkin wrote: > >>> On Thu, Feb 11, 2016 at 04:16:05PM +0100, Igor Mammedo

Re: [Qemu-devel] [PATCH 00/14] More #include cleanups

2016-02-16 Thread Peter Maydell
On 9 February 2016 at 15:24, Peter Maydell wrote: > This set of patches does a bunch more cleaning of includes. > Specifically it does everything necessary to be able to > remove osdep.h includes from header files including qemu-common.h > Eric Blake (1): > qapi: Clean up includes in generated

Re: [Qemu-devel] [PATCH RESEND v5] i2c-tiny-usb is a small usb to i2c bridge

2016-02-16 Thread Gerd Hoffmann
On Do, 2016-02-11 at 16:09 +0100, Tim Sander wrote: > Probably due to my less then stellar patch to mail handling i think > this > patch got forgotten. I think its ok to resend. Yes, it is ok to avoid it being lost just because the maintainer (/me) was a bit busy. I'd strongly suggest to configur

Re: [Qemu-devel] [PATCH 1/3] block/backup: make backup cluster size configurable

2016-02-16 Thread John Snow
On 02/14/2016 01:46 AM, Fam Zheng wrote: > On Fri, 02/12 18:06, John Snow wrote: >> typedef struct CowRequest { >> @@ -46,6 +43,8 @@ typedef struct BackupBlockJob { >> CoRwlock flush_rwlock; >> uint64_t sectors_read; >> HBitmap *bitmap; >> +int64_t cluster_size; >> +int64_

Re: [Qemu-devel] [PATCH] usb: check USB configuration descriptor object

2016-02-16 Thread Gerd Hoffmann
On Do, 2016-02-11 at 16:31 +0530, P J P wrote: > When processing remote NDIS control message packets, the USB Net > device emulator checks to see if the USB configuration descriptor > object is of RNDIS type(2). But it does not check if it is null, > which leads to a null dereference error. Add che

Re: [Qemu-devel] [PATCH] gtk: fix uninitialized temporary VirtualConsole

2016-02-16 Thread Gerd Hoffmann
On Di, 2016-02-09 at 11:59 +0100, Paolo Bonzini wrote: > Only the echo field is used in the temporary VirtualConsole, so the > damage was limited. But still, if echo was incorrectly set to true, > the result would be some puzzling output in VTE monitor and serial > consoles. > Added to ui queue.

Re: [Qemu-devel] [PATCH v2] cirrus_vga: fix off-by-one in blit_region_is_unsafe

2016-02-16 Thread Gerd Hoffmann
On Mi, 2016-02-10 at 17:17 +0100, Paolo Bonzini wrote: > The "max" value is being compared with >=, but addr + width points to > the first byte that will _not_ be copied. Laszlo suggested using a > "greater than" comparison, instead of subtracting one like it is > already done above for the height

[Qemu-devel] [PATCH v2 0/1] vhost-user interrupt management fixes

2016-02-16 Thread Victor Kaplansky
Hi, this patch is a cosmetic rework of two patches originally sent by Didier Pallard "[PATCH 2/3] virtio-pci: add an option to bypass guest_notifier_mask" and "[PATCH 3/3] vhost-net: force guest_notifier_mask bypass in vhost-user case". The problem the patch solves is described in original posting

[Qemu-devel] [PATCH v2 1/1] vhost-user interrupt management fixes

2016-02-16 Thread Victor Kaplansky
From: Didier Pallard Since guest_mask_notifier can not be used in vhost-user mode due to buffering implied by unix control socket, force use_mask_notifier on virtio devices of vhost-user interfaces, and send correct callfd to the guest at vhost start. Using guest_notifier_mask function in vhost-

Re: [Qemu-devel] [PATCH] build: Don't redefine 'inline'

2016-02-16 Thread Peter Maydell
On 9 February 2016 at 18:49, Eric Blake wrote: > Actively redefining 'inline' is wrong for C++, where gcc has an > extension 'inline namespace' which fails to compile if the > keyword 'inline' is replaced by a macro expansion. This will > matter once we start to include "qemu/osdep.h" first from

[Qemu-devel] [PATCH v2 2/3] hw/intc: Add (new) ASPEED AST2400 AVIC device model

2016-02-16 Thread Andrew Jeffery
Implement a minimal ASPEED AVIC device model, enough to boot a Linux kernel configured with aspeed_defconfig. The VIC implements the 'new' register set and expects this to be reflected in the device tree. The implementation is a little awkward as the hardware uses 32bit registers to manage 51 IRQs

[Qemu-devel] [PATCH v2 1/3] hw/timer: Add ASPEED AST2400 timer device model

2016-02-16 Thread Andrew Jeffery
Implement basic AST2400 timer functionality: Timers can be configured, enabled, reset and disabled. A number of hardware features are not implemented: * Timer Overflow interrupts * Clock value matching * Pulse generation The implementation is enough to boot the Linux kernel configured with aspee

[Qemu-devel] [PATCH v2 0/3] Add ASPEED AST2400 machine model

2016-02-16 Thread Andrew Jeffery
Hi all, This is the first time I've implemented QEMU device models so no doubt the patches contain misunderstandings and/or oversights - happy to hear any feedback! This patch series implements enough of the ASPEED AST2400 (ARMv5 SoC) machine model to boot an aspeed_defconfig Linux kernel[1]. Th

[Qemu-devel] [PATCH v2 3/3] hw/arm: Add ASPEED AST2400 machine type

2016-02-16 Thread Andrew Jeffery
Adds the AST2400 machine type with ASPEED AVIC and timer models. The new machine type is functional enough to boot Linux to userspace. Signed-off-by: Andrew Jeffery --- hw/arm/Makefile.objs | 1 + hw/arm/ast2400.c | 139 +++ trace-events

Re: [Qemu-devel] [libvirt] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
On Tue, 2016-02-16 at 12:38 +, Daniel P. Berrange wrote: > > > Regardless of the way it is exposed in libvirt API, when libvirt probes > > > for capabilities it will *always* use '-m none'. > >  > > Domain capabilities are currently derived almost entirely from data > > taken from virQEMUCaps,

Re: [Qemu-devel] [PATCH v7 03/11] dump-guest-memory: using static DumpState, add DumpStatus

2016-02-16 Thread Peter Xu
On Tue, Feb 16, 2016 at 01:32:00PM +0100, Andrew Jones wrote: > On Tue, Feb 16, 2016 at 03:50:53PM +0800, Peter Xu wrote: > > Instead of malloc/free each time for DumpState, make it > > static. Added DumpStatus to show status for dump. > > I see that the motivation for making DumpState static is f

Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus

2016-02-16 Thread Markus Armbruster
Andreas Färber writes: > Am 16.02.2016 um 13:35 schrieb Markus Armbruster: >> Igor Mammedov writes: >> >>> On Mon, 15 Feb 2016 20:43:41 +0100 >>> Markus Armbruster wrote: >>> Igor Mammedov writes: > it will allow mgmt to query present and possible to hotplug CPUs > it is req

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-16 Thread Kevin Wolf
Am 16.02.2016 um 12:20 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Am 16.02.2016 um 07:25 hat Pavel Dovgalyuk geschrieben: > > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > Am 15.02.2016 um 15:24 hat Pavel Dovgalyuk geschrieben: > > > > > > From: Kev

Re: [Qemu-devel] [PATCH v2 1/4] vl.c: Fix regression in machine error message

2016-02-16 Thread Markus Armbruster
Markus Armbruster writes: > Marcel Apfelbaum writes: > >> On 02/15/2016 12:20 PM, Markus Armbruster wrote: >>> Eduardo Habkost writes: >>> From: Marcel Apfelbaum Commit e1ce0c3cb (vl.c: fix regression when reading machine type from config file) fixed the error message when

[Qemu-devel] [PATCH v2 15/15] tests/docker/Makefile.include: snapshot the src for docker

2016-02-16 Thread Fam Zheng
From: Alex Bennée Instead of providing a live version of the source tree to the docker container we snapshot it with git-archive. This ensure the tree is in a pristine state for whatever operations the container is going to run on them. Uncommitted changes known to files known by the git index w

Re: [Qemu-devel] [PATCH] migration: fix incorrect memory_global_dirty_log_start outside BQL

2016-02-16 Thread Stefan Hajnoczi
On Mon, Feb 15, 2016 at 08:00:23PM +0100, Paolo Bonzini wrote: > This can cause various segmentation faults or aborts in qemu-iotests > test 091. > > Fixes: 5b82b703b69acc67b78b98a5efc897a3912719eb > Cc: Dave Gilbert > Cc: Stefan Hajnoczi > Signed-off-by: Paolo Bonzini > --- > migration/ram.c

[Qemu-devel] [PATCH v2 14/15] docker: Support interactive shell for debugging

2016-02-16 Thread Fam Zheng
Specify "PAUSE=1" when invoking make docker-%, and a shell prompt will show up before the test runs. Signed-off-by: Fam Zheng --- tests/docker/Makefile.include | 5 - tests/docker/run | 8 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/docker/Makef

[Qemu-devel] [PATCH v2 13/15] MAINTAINERS: Add tests/docker

2016-02-16 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Alex Bennée --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 02710f8..15b8b93 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1584,3 +1584,10 @@ Build system architecture M: Daniel P. Berrange S: Od

[Qemu-devel] [PATCH v2 08/15] docker: Add clang test

2016-02-16 Thread Fam Zheng
The configure options are suggested by John Snow . Signed-off-by: Fam Zheng --- tests/docker/test-clang | 28 1 file changed, 28 insertions(+) create mode 100755 tests/docker/test-clang diff --git a/tests/docker/test-clang b/tests/docker/test-clang new file mode 10

[Qemu-devel] [PATCH v2 12/15] .gitignore: Ignore temporary dockerfile

2016-02-16 Thread Fam Zheng
Docker build requires a "context" directory and we use the $QEMU_SRC/tests/docker/ directory, and the temoprary dockerfile has to be in the context. docker_build normally cleans up this file but let's add an entry here just in case it fails to. Signed-off-by: Fam Zheng --- .gitignore | 1 + 1 f

[Qemu-devel] [PATCH v2 07/15] docker: Add full test

2016-02-16 Thread Fam Zheng
This builds all available targets. Signed-off-by: Fam Zheng --- tests/docker/test-full | 21 + 1 file changed, 21 insertions(+) create mode 100755 tests/docker/test-full diff --git a/tests/docker/test-full b/tests/docker/test-full new file mode 100755 index 000..5708d0b

[Qemu-devel] [PATCH v2 11/15] docs: Add text for tests/docker in build-system.txt

2016-02-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- docs/build-system.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/build-system.txt b/docs/build-system.txt index 5ea..2af1e66 100644 --- a/docs/build-system.txt +++ b/docs/build-system.txt @@ -438,6 +438,11 @@ top level Makefile, so anything defi

[Qemu-devel] [PATCH v2 06/15] docker: Add quick test

2016-02-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/docker/test-quick | 23 +++ 1 file changed, 23 insertions(+) create mode 100755 tests/docker/test-quick diff --git a/tests/docker/test-quick b/tests/docker/test-quick new file mode 100755 index 000..ce3cc99 --- /dev/null +++ b/tests/doc

[Qemu-devel] [PATCH v2 10/15] docker: Add travis tool

2016-02-16 Thread Fam Zheng
The script is not named test-travis.sh so it won't run with "make docker-run", because it can take too long. Run it with "make docker-run-travis.sh@ubuntu". Signed-off-by: Fam Zheng --- tests/docker/travis| 23 +++ tests/docker/travis.py | 48

[Qemu-devel] [PATCH v2 03/15] docker: Add images

2016-02-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/centos6.docker | 5 + tests/docker/dockerfiles/fedora.docker | 7 +++ tests/docker/dockerfiles/ubuntu.docker | 9 + 3 files changed, 21 insertions(+) create mode 100644 tests/docker/dockerfiles/centos6.docker create mode 10

Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus

2016-02-16 Thread Andreas Färber
Am 16.02.2016 um 13:35 schrieb Markus Armbruster: > Igor Mammedov writes: > >> On Mon, 15 Feb 2016 20:43:41 +0100 >> Markus Armbruster wrote: >> >>> Igor Mammedov writes: >>> it will allow mgmt to query present and possible to hotplug CPUs it is required from a target platform that wi

[Qemu-devel] [PATCH v2 09/15] docker: Add mingw test

2016-02-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/docker/test-mingw | 36 1 file changed, 36 insertions(+) create mode 100755 tests/docker/test-mingw diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw new file mode 100755 index 000..25afa64 --- /dev/null ++

[Qemu-devel] [PATCH v2 01/15] tests: Add utilities for docker testing

2016-02-16 Thread Fam Zheng
docker_run: A wrapper for "docker run" (or "sudo -n docker run" if necessary), which takes care of killing and removing the running container at SIGINT. docker_clean: A tool to tear down all the containers including inactive ones that are started by docker_run. docker_build: A tool to compare an

[Qemu-devel] [PATCH v2 04/15] docker: Add test runner

2016-02-16 Thread Fam Zheng
It's better to have a launcher for all tests, to make it easier to initialize and manage the environment. Signed-off-by: Fam Zheng --- tests/docker/run | 26 ++ 1 file changed, 26 insertions(+) create mode 100755 tests/docker/run diff --git a/tests/docker/run b/tests/do

[Qemu-devel] [PATCH v2 05/15] docker: Add common.rc

2016-02-16 Thread Fam Zheng
"requires" checks the "FEATURE" environment for specified prerequisits, and skip the execution of test if not found. Signed-off-by: Fam Zheng --- tests/docker/common.rc | 29 + 1 file changed, 29 insertions(+) create mode 100755 tests/docker/common.rc diff --git a/t

[Qemu-devel] [PATCH v2 02/15] Makefile: Rules for docker testing

2016-02-16 Thread Fam Zheng
This adds a group of make targets to run docker tests, all are available in source tree without running ./configure. The usage is shown by "make docker". Besides the fixed ones, dynamic targets for building each image and running each test in each image are generated automatically by make, scanni

[Qemu-devel] [PATCH v2 00/15] tests: Introducing docker tests

2016-02-16 Thread Fam Zheng
v2: - Fix a few coding style warnings of shellcheck and pylint. [Marc-André Lureau] - Rename make targets: docker-run => docker-test docker-build => docker-image docker-run-$TEST.sh@$IMAGE => docker-$TEST@$IMAGE - In help, document the magic makefile vars which are

Re: [Qemu-devel] [PATCH v7 08/11] DumpState: adding total_size and written_size fields

2016-02-16 Thread Andrew Jones
On Tue, Feb 16, 2016 at 03:50:58PM +0800, Peter Xu wrote: > Here, total_size is the size in bytes to be dumped (raw data, which > means before compression), while written_size are bytes handled (raw > size too). > > Signed-off-by: Peter Xu > Reviewed-by: Fam Zheng > --- > dump.c

Re: [Qemu-devel] [libvirt] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Daniel P. Berrange
On Tue, Feb 16, 2016 at 01:27:55PM +0100, Andrea Bolognani wrote: > On Tue, 2016-02-16 at 12:15 +, Daniel P. Berrange wrote: > > On Tue, Feb 16, 2016 at 01:05:45PM +0100, Andrea Bolognani wrote: > > > On Tue, 2016-02-16 at 10:15 +, Daniel P. Berrange wrote: > > > > > Back to GIV.  Recognize

Re: [Qemu-devel] [PATCH v19 3/9] pc: add a Virtual Machine Generation ID device

2016-02-16 Thread Marcel Apfelbaum
On 02/16/2016 02:17 PM, Igor Mammedov wrote: On Tue, 16 Feb 2016 12:05:33 +0200 Marcel Apfelbaum wrote: On 02/11/2016 06:30 PM, Michael S. Tsirkin wrote: On Thu, Feb 11, 2016 at 04:16:05PM +0100, Igor Mammedov wrote: On Tue, 9 Feb 2016 14:17:44 +0200 "Michael S. Tsirkin" wrote: On Tue, Fe

Re: [Qemu-devel] [RFC] QMP: add query-hotpluggable-cpus

2016-02-16 Thread Markus Armbruster
Igor Mammedov writes: > On Mon, 15 Feb 2016 20:43:41 +0100 > Markus Armbruster wrote: > >> Igor Mammedov writes: >> >> > it will allow mgmt to query present and possible to hotplug CPUs >> > it is required from a target platform that wish to support >> > command to set board specific MachineCl

Re: [Qemu-devel] [PATCH v7 03/11] dump-guest-memory: using static DumpState, add DumpStatus

2016-02-16 Thread Andrew Jones
On Tue, Feb 16, 2016 at 03:50:53PM +0800, Peter Xu wrote: > Instead of malloc/free each time for DumpState, make it > static. Added DumpStatus to show status for dump. I see that the motivation for making DumpState static is for dump_in_progress(). DumpState isn't massive, but it isn't tiny either

Re: [Qemu-devel] [PATCHv7 3/9] slirp: Adding IPv6 UDP support

2016-02-16 Thread Thomas Huth
On 14.02.2016 18:47, Samuel Thibault wrote: > From: Guillaume Subiron > > This adds the sin6 case in the fhost and lhost unions and related macros. > It adds udp6_input() and udp6_output(). > It adds the IPv6 case in sorecvfrom(). > Finally, udp_input() is called by ip6_input(). > > Signed-off-b

Re: [Qemu-devel] [libvirt] [RFC PATCH 0/2] ARM: add QMP command to query GIC version

2016-02-16 Thread Andrea Bolognani
On Tue, 2016-02-16 at 12:15 +, Daniel P. Berrange wrote: > On Tue, Feb 16, 2016 at 01:05:45PM +0100, Andrea Bolognani wrote: > > On Tue, 2016-02-16 at 10:15 +, Daniel P. Berrange wrote: > > > > Back to GIV.  Recognized values of gic-version are fixed at compile > > > > time: 2, 3, host.  On

Re: [Qemu-devel] [PATCHv7 2/9] slirp: Adding ICMPv6 error sending

2016-02-16 Thread Thomas Huth
On 14.02.2016 18:47, Samuel Thibault wrote: > From: Yann Bordenave > > Disambiguation : icmp_error is renamed into icmp_send_error, since it > doesn't manage errors, but only sends ICMP Error messages. > > Adding icmp6_send_error to send ICMPv6 Error messages. This function is > simpler than the

<    1   2   3   4   >