Re: [Qemu-devel] [PATCH v4 2/6] replication: add shared-disk and shared-disk-id options

2017-04-17 Thread Xie Changlong
On 04/12/2017 10:05 PM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen --- v4: - Add

Re: [Qemu-devel] [Xen-devel] [PATCH] configure: introduce --enable-xen-fb-backend

2017-04-17 Thread Juergen Gross
On 14/04/17 19:52, Stefano Stabellini wrote: > On Fri, 14 Apr 2017, Juergen Gross wrote: >> On 14/04/17 08:06, Oleksandr Andrushchenko wrote: >>> On 04/14/2017 03:12 AM, Stefano Stabellini wrote: On Tue, 11 Apr 2017, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko

Re: [Qemu-devel] [PATCH 26/31] vdi: Avoid bitrot of debugging code

2017-04-17 Thread Stefan Weil
Am 18.04.2017 um 03:33 schrieb Eric Blake: Rework the debug define so that we always get -Wformat checking, even when debugging is disabled. Signed-off-by: Eric Blake --- Reviewed-by: Stefan Weil block/vdi.c | 12 +--- 1 file changed, 9

Re: [Qemu-devel] [PATCH v2 7/7] intel_iommu: support passthrough (PT)

2017-04-17 Thread Peter Xu
On Tue, Apr 18, 2017 at 04:30:40AM +, Liu, Yi L wrote: [...] > > +static void vtd_switch_address_space(VTDAddressSpace *as) { > > +bool use_iommu; > > + > > +assert(as); > > + > > +use_iommu = as->iommu_state->dmar_enabled; > > +if (use_iommu) { > > +/* Further checks

Re: [Qemu-devel] [PATCH v2 7/7] intel_iommu: support passthrough (PT)

2017-04-17 Thread Liu, Yi L
> -Original Message- > From: Qemu-devel [mailto:qemu-devel-bounces+yi.l.liu=intel@nongnu.org] On > Behalf Of Peter Xu > Sent: Monday, April 17, 2017 7:32 PM > To: qemu-devel@nongnu.org > Cc: Lan, Tianyu ; Michael S . Tsirkin ; > Jason Wang

Re: [Qemu-devel] [PATCH 7/7] intel_iommu: support passthrough (PT)

2017-04-17 Thread Peter Xu
On Tue, Apr 18, 2017 at 12:00:13PM +0800, Jason Wang wrote: > > > On 2017年04月18日 11:50, Peter Xu wrote: > >On Tue, Apr 18, 2017 at 11:23:35AM +0800, Jason Wang wrote: > >>On 2017年04月17日 18:58, Peter Xu wrote: > >[...] > > > >>>+static void vtd_switch_address_space(VTDAddressSpace *as) > >>>+{ >

[Qemu-devel] define constant in .risu file

2017-04-17 Thread G 3
Is there a way to define a constant in a .risu file? Something like this: my $upper_imm_limit = 500;

Re: [Qemu-devel] [PATCH v2 1/7] memory: tune last param of iommu_ops.translate()

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 07:32:04PM +0800, Peter Xu wrote: > This patch converts the old "is_write" bool into IOMMUAccessFlags. The > difference is that "is_write" can only express either read/write, but > sometimes what we really want is "none" here (neither read nor write). > Replay is an good

Re: [Qemu-devel] [PATCH v2 2/7] memory: remove the last param in memory_region_iommu_replay()

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 07:32:05PM +0800, Peter Xu wrote: > We were always passing in that one as "false" to assume that's an read > operation, and we also assume that IOMMU translation would always have > that read permission. A better permission would be IOMMU_NONE since the > replay is after

Re: [Qemu-devel] [PATCH v3 0/5] FTGMAC100 nic model for the Aspeed SoCs

2017-04-17 Thread Jason Wang
On 2017年04月14日 16:34, Cédric Le Goater wrote: Hi, The Aspeed SoCs AST2400 and AST2500 have two FTGMAC100 ethernet controllers. This series proposes a model for this device and a way to customize the bit definitions which are slightly different from the Faraday definitions. The last patch

Re: [Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus()

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 06:59:14PM -0300, Eduardo Habkost wrote: > Every single caller of of pci_register_bus() saves the return value in > phb->bus. Do that inside pci_register_bus() to avoid code duplication > and make it harder to break. > > Most (but not all) conversions done using the

Re: [Qemu-devel] [RFC 4/7] pci: Change pci_register_bus() 'parent' parameter to PCIHostState

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 06:59:13PM -0300, Eduardo Habkost wrote: > pci_register_bus() already requires the 'parent' argument to be a > PCI_HOST_BRIDGE object. Change the parameter type to reflect that. > > Cc: Richard Henderson > Cc: Aurelien Jarno > Cc:

Re: [Qemu-devel] [RFC 3/7] pci: Change pci_bus_new*() parameter to PCIHostState

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 06:59:12PM -0300, Eduardo Habkost wrote: > The pci_bus_new*() functions already require the 'parent' argument to be > a PCI_HOST_BRIDGE object. Change the parameter type to reflect that. > > Cc: "Michael S. Tsirkin" > Cc: Marcel Apfelbaum

Re: [Qemu-devel] [RFC 6/7] pci: Set phb->bus inside pci_bus_new()

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 06:59:15PM -0300, Eduardo Habkost wrote: > Every single caller of pci_bus_new() saves the return value inside > phb->bus. Do that inside pci_bus_new() to avoid code duplication and > make it harder to break. > > Cc: "Michael S. Tsirkin" > Cc: Marcel

Re: [Qemu-devel] [RFC 1/7] pci: Change pci_host_bus_register() parameter to PCIHostState

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 06:59:10PM -0300, Eduardo Habkost wrote: > The function requires a PCI_HOST_BRIDGE object, so change the parameter > type to reflect that. > > Cc: "Michael S. Tsirkin" > Cc: Marcel Apfelbaum > Signed-off-by: Eduardo Habkost

Re: [Qemu-devel] [RFC 2/7] pci: Change pci_bus_init() 'parent' parameter to PCIHostState

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 06:59:11PM -0300, Eduardo Habkost wrote: > pci_bus_init() already requires 'parent' to be a PCI_HOST_BRIDGE object, > so change the parameter type to reflect that. > > Cc: "Michael S. Tsirkin" > Cc: Marcel Apfelbaum > Signed-off-by:

Re: [Qemu-devel] [RFC 7/7] pci: Set phb->bus inside pci_bus_new_inplace()

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 06:59:16PM -0300, Eduardo Habkost wrote: > Every single caller of pci_bus_new_inplace() sets phb->bus to point to > 'bus'. Do that inside pci_bus_new_inplace() to avoid code duplication > and make it harder to break. > > Cc: "Hervé Poussineau" > Cc:

Re: [Qemu-devel] [PATCH 7/7] intel_iommu: support passthrough (PT)

2017-04-17 Thread Jason Wang
On 2017年04月18日 11:50, Peter Xu wrote: On Tue, Apr 18, 2017 at 11:23:35AM +0800, Jason Wang wrote: On 2017年04月17日 18:58, Peter Xu wrote: [...] +static void vtd_switch_address_space(VTDAddressSpace *as) +{ +bool use_iommu; + +assert(as); + +use_iommu =

Re: [Qemu-devel] [PATCH 02/15] colo-compare: implement the process of checkpoint

2017-04-17 Thread Jason Wang
On 2017年04月17日 19:04, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 14:38, Jason Wang wrote: On 2017年04月14日 14:22, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 13:57, Jason Wang wrote: On 2017年02月22日 17:31, Zhang Chen wrote: On 02/22/2017 11:42 AM, zhanghailiang wrote: While do

Re: [Qemu-devel] [PATCH 7/7] intel_iommu: support passthrough (PT)

2017-04-17 Thread Peter Xu
On Tue, Apr 18, 2017 at 11:23:35AM +0800, Jason Wang wrote: > On 2017年04月17日 18:58, Peter Xu wrote: [...] > >+static void vtd_switch_address_space(VTDAddressSpace *as) > >+{ > >+bool use_iommu; > >+ > >+assert(as); > >+ > >+use_iommu = as->iommu_state->dmar_enabled; > >+if

Re: [Qemu-devel] [PATCH] cpus: Fix CPU unplug for MTTCG

2017-04-17 Thread David Gibson
On Thu, Apr 13, 2017 at 01:21:46PM +0530, Bharata B Rao wrote: > Ensure that the unplugged CPU thread is destroyed and the waiting > thread is notified about it. This is needed for CPU unplug to work > correctly in MTTCG mode. > > Signed-off-by: Bharata B Rao Applied

Re: [Qemu-devel] [RFC for-2.10 2/3] pci: Allow host bridges to override PCI/PCIe hybrid device behaviour

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 03:30:46PM -0300, Eduardo Habkost wrote: > On Tue, Mar 28, 2017 at 01:16:50PM +1100, David Gibson wrote: > > Currently PCI/PCIe hybrid devices - that is, devices which can appear as > > either plain PCI or PCIe depending on where they're attached - will only > > appear in

Re: [Qemu-devel] [PATCH v2 2/4] ppc: remove cannot_destroy_with_object_finalize_yet

2017-04-17 Thread David Gibson
On Fri, Apr 14, 2017 at 10:37:15AM +0200, Laurent Vivier wrote: > This removes the assert(kvm_enabled()) from kvmppc_host_cpu_initfn() > > This assert can never be triggered as the function is only registered > when KVM is available (see also 4c315c2 > "qdev: Protect device-list-properties

Re: [Qemu-devel] [PATCH 7/7] intel_iommu: support passthrough (PT)

2017-04-17 Thread Jason Wang
On 2017年04月17日 18:58, Peter Xu wrote: Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 109 + hw/i386/intel_iommu_internal.h | 1 + hw/i386/trace-events | 1 + hw/i386/x86-iommu.c| 1 +

[Qemu-devel] [PATCH] MAINTAINERS: update Wen's email address

2017-04-17 Thread Changlong Xie
So he can get CC'ed on future patches and bugs for this feature Signed-off-by: Changlong Xie --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index c60235e..5638992 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

Re: [Qemu-devel] [PULL 2/8] replication: clarify permissions

2017-04-17 Thread Xie Changlong
On 04/18/2017 09:36 AM, Hailiang Zhang wrote: On 2017/4/18 9:23, Eric Blake wrote: On 03/17/2017 08:15 AM, Kevin Wolf wrote: From: Changlong Xie Even if hidden_disk, secondary_disk are backing files, they all need write permissions in replication scenario.

Re: [Qemu-devel] qemu memory manage question

2017-04-17 Thread jack.chen
Thanks very much!! 2017-04-17 19:19 GMT+08:00 李强 : > > >> -Original Message- >> From: Qemu-devel >> [mailto:qemu-devel-bounces+liqiang6-s=360...@nongnu.org] On Behalf Of >> jack.chen >> Sent: Monday, April 17, 2017 6:56 PM >> To: Peter Xu >> Cc: qemu >> Subject: Re:

[Qemu-devel] [PATCH V2 2/2] COLO-compare: Optimize tcp compare trace event

2017-04-17 Thread Zhang Chen
Optimize two trace events as one, adjust print format make it easy to read. rename trace_colo_compare_pkt_info_src/dst to trace_colo_compare_tcp_info. Signed-off-by: Zhang Chen --- net/colo-compare.c | 29 + net/trace-events | 3 +--

[Qemu-devel] [PATCH V2 1/2] COLO-compare: Optimize tcp compare for option field

2017-04-17 Thread Zhang Chen
In this patch we support packet that have tcp options field. Add tcp options field check, If the packet have options field we just skip it and compare tcp payload, Avoid unnecessary checkpoint, optimize performance. Signed-off-by: Zhang Chen --- net/colo-compare.c

[Qemu-devel] [PATCH V2 0/2] COLO-compare: Optimize tcp compare performance and trace format.

2017-04-17 Thread Zhang Chen
In the first patch, we add tcp options support to optimize compare performance. and another patch simplified code and adjust trace print format. Zhang Chen (2): COLO-compare: Optimize tcp compare for option field COLO-compare: Optimize tcp compare trace event net/colo-compare.c | 54

Re: [Qemu-devel] [PATCH 1/2] COLO-compare: Optimize tcp compare for option field

2017-04-17 Thread Zhang Chen
On 04/17/2017 09:43 PM, Philippe Mathieu-Daudé wrote: Hi Zhang, On 04/16/2017 06:24 AM, Zhang Chen wrote: In this patch we support packet that have tcp options field. Add tcp options field check, If the packet have options field we just skip it and compare tcp payload, Avoid unnecessary

Re: [Qemu-devel] [PULL 2/8] replication: clarify permissions

2017-04-17 Thread Hailiang Zhang
On 2017/4/18 9:23, Eric Blake wrote: On 03/17/2017 08:15 AM, Kevin Wolf wrote: From: Changlong Xie Even if hidden_disk, secondary_disk are backing files, they all need write permissions in replication scenario. Otherwise we will encouter below exceptions on

[Qemu-devel] [PATCH 29/31] vpc: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the vpc driver accordingly. Signed-off-by: Eric Blake --- block/vpc.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/block/vpc.c

[Qemu-devel] [PATCH 30/31] vvfat: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the vvfat driver accordingly. Signed-off-by: Eric Blake --- block/vvfat.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c

[Qemu-devel] [PATCH 26/31] vdi: Avoid bitrot of debugging code

2017-04-17 Thread Eric Blake
Rework the debug define so that we always get -Wformat checking, even when debugging is disabled. Signed-off-by: Eric Blake --- block/vdi.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index d12d9cd..a70b969 100644

[Qemu-devel] [PATCH 23/31] qed: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the qed driver accordingly. Signed-off-by: Eric Blake --- block/qed.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/block/qed.c b/block/qed.c

[Qemu-devel] [PATCH 25/31] sheepdog: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the sheepdog driver accordingly. Signed-off-by: Eric Blake --- block/sheepdog.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH 22/31] qcow2: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the qcow2 driver accordingly. Signed-off-by: Eric Blake --- block/qcow2.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c

[Qemu-devel] [PATCH 31/31] block: Drop unused .bdrv_co_get_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Now that all drivers have been updated to provide the byte-based .bdrv_co_block_status(), we can delete the sector-based interface. Signed-off-by: Eric Blake --- include/block/block_int.h | 3 ---

[Qemu-devel] [PATCH 24/31] raw: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the raw driver accordingly. Signed-off-by: Eric Blake --- block/raw-format.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/raw-format.c

[Qemu-devel] [PATCH 28/31] vmdk: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the vmdk driver accordingly. Signed-off-by: Eric Blake --- block/vmdk.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/block/vmdk.c

[Qemu-devel] [PATCH 18/31] mirror: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the mirror driver accordingly. Signed-off-by: Eric Blake --- block/mirror.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/mirror.c b/block/mirror.c

Re: [Qemu-devel] [Qemu-block] [PATCH 00/31] make bdrv_get_block_status byte-based

2017-04-17 Thread Eric Blake
On 04/17/2017 08:33 PM, Eric Blake wrote: > There are patches floating around to add NBD_CMD_BLOCK_STATUS, > but NBD wants to report status on byte granularity (even if the > reporting will probably be naturally aligned to sectors or even > much higher levels). I've therefore started the task of

[Qemu-devel] [PATCH 20/31] parallels: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the parallels driver accordingly. Note that the internal function block_status() is still sector-based, because it is still in use by other sector-based functions; but that's okay because request_alignment is

[Qemu-devel] [PATCH 17/31] iscsi: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the iscsi driver accordingly. In this case, it is handy to teach iscsi_co_block_status() to handle a NULL file parameter, even though the block layer passes a non-NULL value, because we also call the function

[Qemu-devel] [PATCH 27/31] vdi: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the vdi driver accordingly. Note that the TODO is already covered (the block layer guarantees bounds of its requests), and that we can remove the now-unused s->block_sectors. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH 09/31] block: Switch bdrv_co_get_block_status_above() to byte-based

2017-04-17 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal type (no semantic change), and rename it to match the corresponding public function rename. Signed-off-by: Eric Blake --- block/io.c | 42

[Qemu-devel] [PATCH 19/31] null: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the null driver accordingly. Signed-off-by: Eric Blake --- block/null.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/block/null.c

[Qemu-devel] [PATCH 16/31] iscsi: Switch iscsi_allocmap_update() to byte-based

2017-04-17 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert all uses of the allocmap (no semantic change). Callers that already had bytes available are simpler, and callers that now scale to bytes will be easier to switch to byte-based in

[Qemu-devel] [PATCH 13/31] file-posix: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the file protocol driver accordingly. Signed-off-by: Eric Blake --- block/file-posix.c | 47 +++ 1 file changed, 23 insertions(+), 24

[Qemu-devel] [PATCH 21/31] qcow: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the qcow driver accordingly. Signed-off-by: Eric Blake --- block/qcow.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/block/qcow.c

[Qemu-devel] [PATCH 15/31] iscsi: Switch cluster_sectors to byte-based

2017-04-17 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert all uses of the cluster size in sectors, along with adding assertions that we are not dividing by zero. Signed-off-by: Eric Blake --- block/iscsi.c | 56

[Qemu-devel] [PATCH 07/31] block: Switch bdrv_co_get_block_status() to byte-based

2017-04-17 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change), and as with its public counterpart, rename to bdrv_co_block_status() to make the compiler enforce that we catch all uses. For now,

[Qemu-devel] [PATCH 11/31] block: Add .bdrv_co_block_status() callback

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Now that the block layer exposes byte-based allocation, it's time to tackle the drivers. Add a new callback that operates on as small as byte boundaries, and update the block layer to ensure that the callback is only

[Qemu-devel] [PATCH 14/31] gluster: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the gluster driver accordingly. Signed-off-by: Eric Blake --- block/gluster.c | 47 +++ 1 file changed, 23 insertions(+), 24 deletions(-) diff

[Qemu-devel] [PATCH 12/31] commit: Switch to .bdrv_co_block_status()

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Update the commit driver accordingly. Signed-off-by: Eric Blake --- block/commit.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/commit.c b/block/commit.c

[Qemu-devel] [PATCH 06/31] block: Convert bdrv_get_block_status() to bytes

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. In the common case, allocation is unlikely to ever use values that are not naturally sector-aligned, but it is possible that byte-based values will let us be more precise about allocation at the end of an unaligned

[Qemu-devel] [PATCH 04/31] block: Switch bdrv_make_zero() to byte-based

2017-04-17 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Change the internal loop iteration of zeroing a device to track by bytes instead of sectors (although we are still guaranteed that we iterate by steps that are sector-aligned).

[Qemu-devel] [PATCH 03/31] qcow2: Switch is_zero_sectors() to byte-based

2017-04-17 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change), and rename it to is_zero_above() in the process. Signed-off-by: Eric Blake --- block/qcow2.c | 32

[Qemu-devel] [PATCH 10/31] block: Convert bdrv_get_block_status_above() to bytes

2017-04-17 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. In the common case, allocation is unlikely to ever use values that are not naturally sector-aligned, but it is possible that byte-based values will let us be more precise about allocation at the end of an unaligned

[Qemu-devel] [PATCH 05/31] qemu-img: Switch get_block_status() to byte-based

2017-04-17 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Continue by converting an internal function (no semantic change), and simplifying its caller accordingly. Signed-off-by: Eric Blake --- qemu-img.c | 24

[Qemu-devel] [PATCH 08/31] block: Switch BdrvCoGetBlockStatusData to byte-based

2017-04-17 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal type (no semantic change), and rename it to match the corresponding public function rename. Signed-off-by: Eric Blake --- block/io.c | 30

[Qemu-devel] [PATCH 02/31] block: Make bdrv_round_to_clusters() signature more useful

2017-04-17 Thread Eric Blake
In the process of converting sector-based interfaces to bytes, I'm finding it easier to represent a byte count as a 64-bit integer at the block layer (even if we are internally capped by SIZE_MAX or even INT_MAX for individual transactions, it's still nicer to not have to worry about

[Qemu-devel] [PATCH 00/31] make bdrv_get_block_status byte-based

2017-04-17 Thread Eric Blake
There are patches floating around to add NBD_CMD_BLOCK_STATUS, but NBD wants to report status on byte granularity (even if the reporting will probably be naturally aligned to sectors or even much higher levels). I've therefore started the task of converting our block status code to report at a

[Qemu-devel] [PATCH 01/31] block: Drop unused bdrv_round_sectors_to_clusters()

2017-04-17 Thread Eric Blake
Now that the last user [mirror_iteration()] has converted to using bytes, we no longer need a function to round sectors to clusters. Signed-off-by: Eric Blake --- include/block/block.h | 4 block/io.c| 21 - 2 files changed, 25

Re: [Qemu-devel] [PATCH 02/15] colo-compare: implement the process of checkpoint

2017-04-17 Thread Zhang Chen
On 04/17/2017 07:04 PM, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 14:38, Jason Wang wrote: On 2017年04月14日 14:22, Hailiang Zhang wrote: Hi Jason, On 2017/4/14 13:57, Jason Wang wrote: On 2017年02月22日 17:31, Zhang Chen wrote: On 02/22/2017 11:42 AM, zhanghailiang wrote: While do

Re: [Qemu-devel] [PULL 2/8] replication: clarify permissions

2017-04-17 Thread Eric Blake
On 03/17/2017 08:15 AM, Kevin Wolf wrote: > From: Changlong Xie > > Even if hidden_disk, secondary_disk are backing files, they all need > write permissions in replication scenario. Otherwise we will encouter > below exceptions on secondary side during adding nbd

Re: [Qemu-devel] [Qemu-block] [PATCH 00/17] make bdrv_is_allocated[_above] byte-based

2017-04-17 Thread Eric Blake
On 04/17/2017 06:42 PM, John Snow wrote: > > > On 04/11/2017 06:29 PM, Eric Blake wrote: >> There are patches floating around to add NBD_CMD_BLOCK_STATUS, >> but NBD wants to report status on byte granularity (even if the >> reporting will probably be naturally aligned to sectors or even >> much

Re: [Qemu-devel] [Qemu-block] [PATCH 13/17] backup: Switch block_backup.h to byte-based

2017-04-17 Thread Eric Blake
On 04/17/2017 06:24 PM, John Snow wrote: > > > On 04/11/2017 06:29 PM, Eric Blake wrote: >> We are gradually converting to byte-based interfaces, as they are >> easier to reason about than sector-based. Continue by converting >> the public interface to backup jobs (no semantic change),

Re: [Qemu-devel] [Qemu-block] [PATCH 00/17] make bdrv_is_allocated[_above] byte-based

2017-04-17 Thread John Snow
On 04/11/2017 06:29 PM, Eric Blake wrote: > There are patches floating around to add NBD_CMD_BLOCK_STATUS, > but NBD wants to report status on byte granularity (even if the > reporting will probably be naturally aligned to sectors or even > much higher levels). I've therefore started the task

Re: [Qemu-devel] [PATCH v4 0/4] X86/HMP: Expose x86 model specific registers via human monitor

2017-04-17 Thread Eduardo Habkost
On Tue, Apr 04, 2017 at 11:33:33AM +0200, Julian Kirsch wrote: > ping > > I kindly request your comments. Hi Julian, Sorry for taking so long to reply. I can't find the original series on either qemu-devel archives, or on my own mail archive. Searching for the Message-Id you were replying to,

Re: [Qemu-devel] [Qemu-block] [PATCH 13/17] backup: Switch block_backup.h to byte-based

2017-04-17 Thread John Snow
On 04/11/2017 06:29 PM, Eric Blake wrote: > We are gradually converting to byte-based interfaces, as they are > easier to reason about than sector-based. Continue by converting > the public interface to backup jobs (no semantic change), including > a change to CowRequest to track by bytes

[Qemu-devel] [RFC 6/7] pci: Set phb->bus inside pci_bus_new()

2017-04-17 Thread Eduardo Habkost
Every single caller of pci_bus_new() saves the return value inside phb->bus. Do that inside pci_bus_new() to avoid code duplication and make it harder to break. Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Signed-off-by: Eduardo Habkost

[Qemu-devel] [RFC 7/7] pci: Set phb->bus inside pci_bus_new_inplace()

2017-04-17 Thread Eduardo Habkost
Every single caller of pci_bus_new_inplace() sets phb->bus to point to 'bus'. Do that inside pci_bus_new_inplace() to avoid code duplication and make it harder to break. Cc: "Hervé Poussineau" Cc: Marcel Apfelbaum Cc: "Michael S. Tsirkin"

[Qemu-devel] [RFC 3/7] pci: Change pci_bus_new*() parameter to PCIHostState

2017-04-17 Thread Eduardo Habkost
The pci_bus_new*() functions already require the 'parent' argument to be a PCI_HOST_BRIDGE object. Change the parameter type to reflect that. Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: "Hervé Poussineau" Cc: Peter Maydell

[Qemu-devel] [RFC 2/7] pci: Change pci_bus_init() 'parent' parameter to PCIHostState

2017-04-17 Thread Eduardo Habkost
pci_bus_init() already requires 'parent' to be a PCI_HOST_BRIDGE object, so change the parameter type to reflect that. Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Signed-off-by: Eduardo Habkost --- hw/pci/pci.c | 10 ++ 1 file

[Qemu-devel] [RFC 4/7] pci: Change pci_register_bus() 'parent' parameter to PCIHostState

2017-04-17 Thread Eduardo Habkost
pci_register_bus() already requires the 'parent' argument to be a PCI_HOST_BRIDGE object. Change the parameter type to reflect that. Cc: Richard Henderson Cc: Aurelien Jarno Cc: Yongbok Kim Cc: Alexander Graf Cc:

[Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus()

2017-04-17 Thread Eduardo Habkost
Every single caller of of pci_register_bus() saves the return value in phb->bus. Do that inside pci_register_bus() to avoid code duplication and make it harder to break. Most (but not all) conversions done using the following Coccinelle script: @@ identifier b; expression phb; @@ -b =

[Qemu-devel] [RFC 1/7] pci: Change pci_host_bus_register() parameter to PCIHostState

2017-04-17 Thread Eduardo Habkost
The function requires a PCI_HOST_BRIDGE object, so change the parameter type to reflect that. Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Signed-off-by: Eduardo Habkost --- hw/pci/pci.c | 8 +++- 1 file changed, 3 insertions(+), 5

[Qemu-devel] [RFC 0/7] pci: Type-safety and phb->bus initialization cleanup

2017-04-17 Thread Eduardo Habkost
I've noticed that pci_bus_new*() and pci_register_bus() require 'parent' to be a PCI_HOST_BRIDGE object, but this is not clear from the function signatures. This series implements two changes in the PCI code: 1) Replace DeviceState with PCIHostState on functions that already require a

Re: [Qemu-devel] DMG chunk size independence

2017-04-17 Thread John Snow
On 04/15/2017 04:38 AM, Ashijeet Acharya wrote: > Hi, > > Some of you are already aware but for the benefit of the open list, > this mail is regarding the task mentioned > Here -> http://wiki.qemu-project.org/ToDo/Block/DmgChunkSizeIndependence > OK, so the idea here is that we should be able

Re: [Qemu-devel] [PATCH 09/19] migration: Create block capabilities for shared and enable

2017-04-17 Thread Eric Blake
On 04/17/2017 03:00 PM, Juan Quintela wrote: > This two capabilites were added through the command line. Notice that s/This/These/ s/capabilites/capabilities/ > we just created them. This is just the boilerplate. > > Signed-off-by: Juan Quintela > --- >

[Qemu-devel] [PATCH 17/19] migration: Export rdma.c functions in its own file

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/migration.h | 4 include/migration/rdma.h | 22 ++ migration/migration.c | 1 + migration/rdma.c | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) create mode

[Qemu-devel] [PATCH 13/19] migration: Remove qemu-file.h from vmstate.h

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/hw/hw.h | 1 + include/migration/vmstate.h | 3 --- migration/block.c | 1 + migration/channel.c | 1 + migration/colo.c| 1 + migration/postcopy-ram.c| 1 + migration/ram.c |

[Qemu-devel] [PATCH 16/19] migration: Export ram.c functions in its own file

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/migration.h | 36 - include/migration/ram.h | 54 +++ migration/migration.c | 1 + migration/postcopy-ram.c | 1 + migration/ram.c

[Qemu-devel] [PATCH 19/19] monitor: remove monitor parameter from save_vmstate

2017-04-17 Thread Juan Quintela
load_vmstate() already use error_report, so be consistent. Signed-off-by: Juan Quintela --- include/sysemu/sysemu.h | 2 +- migration/savevm.c | 16 monitor.c| 2 +- replay/replay-snapshot.c | 2 +- 4 files changed, 11

[Qemu-devel] [PATCH 10/19] migration: Remove use of old MigrationParams

2017-04-17 Thread Juan Quintela
We have change in the previous patch to use migration capabilities for it. Notice that we continue using the old command line flags from migrate command from the time being. Remove the set_params method as now it is empty. Signed-off-by: Juan Quintela ---

[Qemu-devel] [PATCH 11/19] migration: Remove old MigrationParams

2017-04-17 Thread Juan Quintela
Not used anymore after moving block migration to use capabilities. Signed-off-by: Juan Quintela --- include/migration/migration.h | 10 +++--- include/migration/vmstate.h | 1 - include/qemu/typedefs.h | 1 - include/sysemu/sysemu.h | 3 +--

[Qemu-devel] [PATCH 18/19] monitor: move hmp_savevm() to monitor.c

2017-04-17 Thread Juan Quintela
hmp_loadvm is already there, so be consistent. Signed-off-by: Juan Quintela --- include/sysemu/sysemu.h | 1 - migration/savevm.c | 5 - monitor.c | 5 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/sysemu/sysemu.h

[Qemu-devel] [PATCH 09/19] migration: Create block capabilities for shared and enable

2017-04-17 Thread Juan Quintela
This two capabilites were added through the command line. Notice that we just created them. This is just the boilerplate. Signed-off-by: Juan Quintela --- include/migration/migration.h | 3 +++ migration/migration.c | 36

[Qemu-devel] [PATCH 14/19] migration: Remove vmstate.h from migration.h

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/migration.h | 1 - migration/block.c | 1 + migration/colo-comm.c | 1 + migration/migration.c | 1 + migration/ram.c | 1 + 5 files changed, 4 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH 08/19] migration: Export tls.c functions in its own file

2017-04-17 Thread Juan Quintela
Just for the functions exported from tls.c. Notice that we can't remove the migration/migration.h include from tls.c because it access directly MigrationState for the tls params. Signed-off-by: Juan Quintela --- include/migration/migration.h | 9 -

[Qemu-devel] [PATCH 15/19] migration: Export qemu-file-channel.c functions in its own file

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/qemu-file-channel.h | 22 ++ include/migration/qemu-file.h | 3 --- migration/channel.c | 2 +- migration/colo.c | 2 +- migration/migration.c

[Qemu-devel] [PATCH 06/19] migration: Export fd.c functions in its own file

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/fd.h| 20 include/migration/migration.h | 4 migration/fd.c| 2 +- migration/migration.c | 1 + 4 files changed, 22 insertions(+), 5 deletions(-) create mode

[Qemu-devel] [PATCH 12/19] migration: Remove unneeded includes

2017-04-17 Thread Juan Quintela
I just removed includes that allow me to still compile everything. Signed-off-by: Juan Quintela --- include/migration/colo.h | 3 --- migration/block.c | 7 --- migration/colo-comm.c | 1 - migration/colo-failover.c | 1 + migration/colo.c | 2 --

[Qemu-devel] [PATCH 07/19] migration: Export socket.c functions in its own file

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/migration.h | 8 include/migration/socket.h| 25 + migration/migration.c | 1 + migration/socket.c| 1 + 4 files changed, 27 insertions(+), 8 deletions(-) create

[Qemu-devel] [PATCH 05/19] migration: Export exec.c functions in its own file

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/exec.h | 20 include/migration/migration.h | 4 migration/exec.c | 2 +- migration/migration.c | 1 + 4 files changed, 22 insertions(+), 5 deletions(-) create mode

[Qemu-devel] [PATCH 03/19] migration: Split migration/channel.c for channel operations

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/channel.h | 25 include/migration/migration.h | 7 - migration/Makefile.objs | 2 +- migration/channel.c | 69 +++ migration/exec.c

[Qemu-devel] [PATCH 00/19] Migration cleanup

2017-04-17 Thread Juan Quintela
Hi This is a cleanup on top of my previous series. It does: - create one .h file for each migration/* file - export with meaningful include names the migration functions that we export - untangle the includes mess (migration.h in8cluded vmstate.h who included qemu-file.h). Fixed all callers.

[Qemu-devel] [PATCH 02/19] migration: They are called vmstate_foo, move them to vmstate.c

2017-04-17 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/savevm.c | 17 - migration/vmstate.c | 16 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index cc9c086..c47b209 100644 ---

  1   2   >