Re: [Qemu-devel] [PATCH 20/20] block: Remove bdrv_(set_)enable_write_cache()

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > The only remaining users were block jobs (mirror and backup) which > unconditionally enabled WCE on the BlockBackend of the target image. As > these block jobs don't go through BlockBackend for their I/O requests, > they aren't affected by this setting

Re: [Qemu-devel] [PATCH 19/20] block: Remove BDRV_O_CACHE_WB

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > The previous patches have successively made blk->enable_write_cache the > true source for the information whether a writethrough mode must be > implemented. The corresponding BDRV_O_CACHE_WB is only useless baggage > we're carrying around, so now's the time

Re: [Qemu-devel] [PATCH 18/20] block: Remove bdrv_parse_cache_flags()

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > All users are converted to bdrv_parse_cache_mode() now. > > Signed-off-by: Kevin Wolf > --- > block.c | 29 +++-- > include/block/block.h | 1 - > 2 files changed, 7 insertions(+), 23 deletions(-)

Re: [Qemu-devel] [PATCH 17/20] qemu-io: Use bdrv_parse_cache_mode() in reopen_f()

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > We must forbid changing the WCE flag in bdrv_reopen() in the same patch, > as otherwise the behaviour would change so that the flag takes > precedence over the explicitly specified option. > > The correct value of the WCE flag depends on the BlockBackend

Re: [Qemu-devel] [PATCH 16/20] block: Use bdrv_parse_cache_mode() in drive_init()

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > blockdev.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 15/20] raw: Support BDRV_REQ_FUA

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > Pass through the FUA flag to the lower layer so that the separate flush > can be saved in practically relevant cases where a (raw) format driver > sits on top of the protocol driver. > > Signed-off-by: Kevin Wolf > --- > block/raw_bsd.c

Re: [Qemu-devel] [PATCH 14/20] nbd: Support BDRV_REQ_FUA

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > The NBD server already used to send a FUA flag when the writethrough > mode was set. This code was a remnant from the times where protocol > drivers actually had to implement writethrough modes. Since nowadays the > block layer sends flushes in writethrough

Re: [Qemu-devel] [PATCH 13/20] iscsi: Support BDRV_REQ_FUA

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > This replaces the existing hack in the iscsi driver that sent the FUA > bit in writethrough mode and ignored the following flush in order to > optimise the number of roundtrips (see commit 73b5394e). > > Signed-off-by: Kevin Wolf > --- >

Re: [Qemu-devel] [PATCH 13/20] iscsi: Support BDRV_REQ_FUA

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > This replaces the existing hack in the iscsi driver that sent the FUA > bit in writethrough mode and ignored the following flush in order to > optimise the number of roundtrips (see commit 73b5394e). > > Signed-off-by: Kevin Wolf > --- >

Re: [Qemu-devel] [PATCH 12/20] block: Introduce bdrv_co_writev_flags()

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > This function will allow drivers to implement BDRV_REQ_FUA natively > instead of sending a separate flush after the write. > > Signed-off-by: Kevin Wolf > --- > block/io.c| 9 - > include/block/block_int.h | 5

Re: [Qemu-devel] [PATCH 11/20] block/qapi: Use blk_enable_write_cache()

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > Now that WCE is handled on the BlockBackend level, the flag is > meaningless for BDSes. As the schema requires us to fill the field, > we return an enabled write cache for them. > > Note that this means that querying the BlockBackend name may return >

Re: [Qemu-devel] [PATCH 10/20] block: Move enable_write_cache to BB level

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > Whether a write cache is used or not is a decision that concerns the > user (e.g. the guest device) rather than the backend. It was already > logically part of the BB level as bdrv_move_feature_fields() always kept > it on top of the BDS tree; with this

[Qemu-devel] [PATCH v5 1/2] QMP: add query-hotpluggable-cpus

2016-03-26 Thread Igor Mammedov
it will allow mgmt to query present and hotpluggable CPU objects, it is required from a target platform that wish to support command to implement and set MachineClass.query_hotpluggable_cpus callback, which will return a list of possible CPU objects with options that would be needed for

Re: [Qemu-devel] [PATCH 09/20] block: Handle flush error in bdrv_pwrite_sync()

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > We don't want to silently ignore a flush error. > > Also, there is little point in avoiding the flush for writethrough modes > and once WCE is moved to the BB layer, we definitely need the flush here > because bdrv_pwrite() won't involve one any more. > >

Re: [Qemu-devel] [PATCH 08/20] block: Always set writeback mode in blk_new_open()

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > All callers of blk_new_open() either don't rely on the WCE bit set after > blk_new_open() because they explicitly set it anyway, or they pass > BDRV_O_CACHE_WB unconditionally. > > This patch changes blk_new_open() so that it always enables writeback >

Re: [Qemu-devel] [PATCH 07/20] block: blockdev_init(): Call blk_set_enable_write_cache() explicitly

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > blockdev.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 06/20] xen_disk: Call blk_set_enable_write_cache() explicitly

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > hw/block/xen_disk.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 05/20] qemu-img: Call blk_set_enable_write_cache() explicitly

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > qemu-img.c | 79 > ++ > 1 file changed, 48 insertions(+), 31 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.c > index 839e05b..96b51d4

Re: [Qemu-devel] [PATCH 04/20] qemu-img: Expand all BDRV_O_FLAGS uses

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > It always only set the BDRV_O_CACHE_WB flag, which is going to go away. > In order to make the next changes more local for better reviewability > this patches expands the macro. > > Signed-off-by: Kevin Wolf > --- > qemu-img.c | 23

Re: [Qemu-devel] [PATCH 03/20] qemu-io: Call blk_set_enable_write_cache() explicitly

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > qemu-io.c | 21 + > 1 file changed, 13 insertions(+), 8 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 02/20] qemu-nbd: Call blk_set_enable_write_cache() explicitly

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > qemu-nbd.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH 01/20] block: Add bdrv_parse_cache_mode()

2016-03-26 Thread Max Reitz
On 18.03.2016 19:21, Kevin Wolf wrote: > It's like bdrv_parse_cache_flags(), except that writethrough mode isn't > included in the flags, but returned as a separate bool. > > Signed-off-by: Kevin Wolf > --- > block.c | 17 + >

Re: [Qemu-devel] [RFC for-2.7 1/1] block/qapi: Add query-block-node-tree

2016-03-26 Thread Max Reitz
On 25.03.2016 07:54, Wen Congyang wrote: > On 03/25/2016 03:07 AM, Max Reitz wrote: >> This command returns the tree of BlockDriverStates under a given root >> node. >> >> Every tree node is described by its node name and the connection of a >> parent node to its children additionally contains the

Re: [Qemu-devel] [RFC for-2.7 1/1] block/qapi: Add query-block-node-tree

2016-03-26 Thread Max Reitz
On 25.03.2016 03:50, Wen Congyang wrote: > On 03/25/2016 03:07 AM, Max Reitz wrote: >> This command returns the tree of BlockDriverStates under a given root >> node. >> >> Every tree node is described by its node name and the connection of a >> parent node to its children additionally contains the

Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-03-26 Thread Aviv B.D.
On Wed, Mar 23, 2016 at 5:33 PM, Michael S. Tsirkin wrote: > On Sat, Mar 12, 2016 at 06:13:17PM +0200, Aviv B.D. wrote: > > From: "Aviv B.D." > > > > * Fix bug that prevent qemu from starting up when vIOMMU and VFIO > > device are present. > > *

[Qemu-devel] [PATCH v5 4/6] i.MX: Add the Freescale SPI Controller

2016-03-26 Thread Jean-Christophe Dubois
Signed-off-by: Jean-Christophe Dubois --- Changes since V1: * Access SPI slave only at a byte level. * rework the CS activation to avoid to reset access to SPI slaves. Changes since V2: * Added #include "qemu/osdep.h" * remove previous_level from state struct * save

[Qemu-devel] [PATCH v5 1/6] ARM: Factor out ARM on/off PSCI control functions

2016-03-26 Thread Jean-Christophe Dubois
Split ARM on/off function from PSCI support code. This will allow to reuse these functions in other code. Signed-off-by: Jean-Christophe Dubois --- Changes since V1: * Not present on V1 Changes since V2: * Not present on V2 Changes since V3: * Move to a more

[Qemu-devel] [PATCH v5 3/6] FIFO: Add a FIFO32 implementation

2016-03-26 Thread Jean-Christophe Dubois
This one is build on top of the existing FIFO8 Reviewed-by: Peter Maydell Signed-off-by: Jean-Christophe Dubois --- Changes since V1: * None Changes since V2: * Added copyright * define Fifo32 as a struct containing Fifo8 * remove

[Qemu-devel] [PATCH v5 2/6] i.MX: Add i.MX6 System Reset Controller device.

2016-03-26 Thread Jean-Christophe Dubois
This controller is also present in i.MX5X devices but they are not yet emulated by QEMU. Reviewed-by: Peter Maydell Signed-off-by: Jean-Christophe Dubois --- Changes since V1: * Change "reset" sematic to mean full power cyvle. Changes since V2:

[Qemu-devel] [PATCH v5 6/6] i.MX: Add sabrelite i.MX6 emulation.

2016-03-26 Thread Jean-Christophe Dubois
The sabrelite supports one SPI FLASH memory on SPI1 Signed-off-by: Jean-Christophe Dubois --- Changes since V1: * output a message and exit if RAM size is unsupported. Changes since V2: * Added include "qemu/osdep.h" * Added access to controllers through properties.

[Qemu-devel] [PATCH v5 5/6] i.MX: Add i.MX6 SOC implementation.

2016-03-26 Thread Jean-Christophe Dubois
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 * 5 SPI controllers * 1 CCM device * 1 SRC device * various ROM/RAM areas. Reviewed-by:

[Qemu-devel] [PATCH v5 0/6] Add i.MX6 (Single/Dual/Quad) support

2016-03-26 Thread Jean-Christophe Dubois
This patch series adds support for the Freescale i.MX6 processor. 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 * 7 GPIO controllers * 6 SDHC controllers * 5 SPI controllers * 1 CCM device * 1 SRC

Re: [Qemu-devel] [PATCH 3/3] hid.c: Add debug support

2016-03-26 Thread Alex Bennée
Programmingkid writes: > Add debug macros to the code for easier debugging. > > Signed-off-by: John Arbuckle > --- > hw/input/hid.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/hw/input/hid.c b/hw/input/hid.c >