Re: [Qemu-devel] [PATCH v3 0/6] Some PCI related cleanup patches

2015-01-26 Thread Hu Tao
On Wed, Jan 21, 2015 at 02:00:58PM +0200, Michael S. Tsirkin wrote: > On Wed, Jan 21, 2015 at 02:41:33PM +0800, Hu Tao wrote: > > ping... > > At some point you said "will resend". I meant resend patch 6. Patches 1-5 can still apply cleanly. Regards, Hu > >

Re: [Qemu-devel] [PATCH v3 6/6] pci: introduce PCI_DEVFN_AUTO

2015-01-26 Thread Hu Tao
On Wed, Jan 21, 2015 at 02:00:02PM +0200, Michael S. Tsirkin wrote: > On Thu, Dec 11, 2014 at 10:20:28AM +0800, Hu Tao wrote: > > Introduce PCI_DEVFN_AUTO rather than using -1 in code. > > > > Signed-off-by: Hu Tao > > --- > > hw/core/qdev-properties.c | 1 + &

Re: [Qemu-devel] [PATCH v3 0/6] Some PCI related cleanup patches

2015-01-20 Thread Hu Tao
ping... On Thu, Dec 11, 2014 at 10:20:22AM +0800, Hu Tao wrote: > Hi, > > This is v3 of PCI clenaup series. See each patch for the detail. > > Regards, > Hu > > changes: > > v3: > - rebase on top of 7fb8da2b886, all 5 patches applied cleanly. > - new

[Qemu-devel] [PATCH v3 RESEND 6/6] pci: introduce PCI_DEVFN_AUTO

2014-12-10 Thread Hu Tao
Introduce PCI_DEVFN_AUTO rather than using -1 in code. Signed-off-by: Hu Tao --- hw/pci/pci.c | 5 ++--- include/hw/pci/pci.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 371699c..73c7dec 100644 --- a/hw/pci/pci.c +++ b/hw/pci

Re: [Qemu-devel] [PATCH v3 6/6] pci: introduce PCI_DEVFN_AUTO

2014-12-10 Thread Hu Tao
On Thu, Dec 11, 2014 at 10:20:28AM +0800, Hu Tao wrote: > Introduce PCI_DEVFN_AUTO rather than using -1 in code. > > Signed-off-by: Hu Tao > --- > hw/core/qdev-properties.c | 1 + > hw/pci/pci.c | 5 ++--- > include/hw/pci/pci.h | 2 ++ > 3 files cha

[Qemu-devel] [PATCH v3 6/6] pci: introduce PCI_DEVFN_AUTO

2014-12-10 Thread Hu Tao
Introduce PCI_DEVFN_AUTO rather than using -1 in code. Signed-off-by: Hu Tao --- hw/core/qdev-properties.c | 1 + hw/pci/pci.c | 5 ++--- include/hw/pci/pci.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev

[Qemu-devel] [PATCH v3 3/6] pci: define PCI_HOST_BRIDGE_CONFIG_ADDR and PCI_HOST_BRIDGE_CONFIG_DATA.

2014-12-10 Thread Hu Tao
PCI_HOST_BRIDGE_CONFIG_ADDR and PCI_HOST_BRIDGE_CONFIG_DATA are defined in PCI specification, so move them to common place. Signed-off-by: Hu Tao Reviewed-by: Marcel Apfelbaum --- hw/pci-host/piix.c| 8 hw/pci-host/prep.c| 6 -- hw/pci-host/q35.c | 8

[Qemu-devel] [PATCH v3 2/6] pci: introduce pci_host_config_enabled()

2014-12-10 Thread Hu Tao
This makes code more readable. Signed-off-by: Hu Tao Reviewed-by: Marcel Apfelbaum --- hw/mips/gt64xxx_pci.c | 4 ++-- hw/pci/pci_host.c | 5 +++-- include/hw/pci/pci_host.h | 5 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips

[Qemu-devel] [PATCH v3 4/6] pci: remove the limit parameter of pci_host_config_read_common

2014-12-10 Thread Hu Tao
Since the limit parameter is always set to the size of pci device's configuration space, and we can determine the size from the type of pci device. Signed-off-by: Hu Tao --- hw/pci/pci_host.c | 15 +++ hw/pci/pcie_host.c| 9 + hw/ppc/spapr_pci.c

[Qemu-devel] [PATCH v3 0/6] Some PCI related cleanup patches

2014-12-10 Thread Hu Tao
Marcel's suggestion - place macros in pci_host.h as per Marcel's suggestion - new patch 'pci: reorganize QEMU_PCI_CAP_*' Hu Tao (6): pci: reorganize QEMU_PCI_CAP_* pci: introduce pci_host_config_enabled() pci: define PCI_HOST_BRIDGE_CONFIG_ADDR and PCI_HOST_BRIDG

[Qemu-devel] [PATCH v3 1/6] pci: reorganize QEMU_PCI_CAP_*

2014-12-10 Thread Hu Tao
This makes code more readable. Signed-off-by: Hu Tao Reviewed-by: Marcel Apfelbaum --- include/hw/pci/pci.h | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index c352c7b..b18759a 100644

[Qemu-devel] [PATCH v3 5/6] pci: remove the limit parameter of pci_host_config_write_common

2014-12-10 Thread Hu Tao
Since the limit parameter is always set to the size of pci device's configuration space, and we can determine the size from the type of pci device. Signed-off-by: Hu Tao --- hw/pci/pci_host.c | 13 ++--- hw/pci/pcie_host.c| 9 + hw/ppc/spapr_pci.c

Re: [Qemu-devel] [PATCH v2 0/5] Some PCI related cleanup patches

2014-11-05 Thread Hu Tao
On Wed, Nov 05, 2014 at 07:48:10PM +0200, Michael S. Tsirkin wrote: > On Wed, Nov 05, 2014 at 05:02:41PM +0800, Hu Tao wrote: > > Hi, > > > > This is v2 of PCI clenaup series. See each patch for the detail. > > Thanks for the patches! > > Pls note this is all

[Qemu-devel] [RFC PATCH 0/6] pci cleanup: remove pci_config_set_*

2014-11-05 Thread Hu Tao
() and friends are extensively used in qemu. They are used both for predefined registers and device specific registers. - another option is to complete the pci_config_set_* for all predefined registers (though they will co-exist with pci_set_*). Hence the RFC. Hu Tao (6): pci

[Qemu-devel] [PATCH 6/6] pci: remove pci_config_set_interrupt_pin

2014-11-05 Thread Hu Tao
See also commit 'pci: remove pci_config_set_vendor_id'. Signed-off-by: Hu Tao --- hw/audio/intel-hda.c | 2 +- hw/i2c/smbus_ich9.c | 2 +- hw/ide/ich.c | 2 +- hw/isa/i82378.c | 2 +- hw/misc/ivshmem.c| 2 +- hw/misc/vfio.c | 2 +- hw/scsi/vmw_pvscsi.c | 2 +-

[Qemu-devel] [PATCH 1/6] pci: remove pci_config_set_vendor_id

2014-11-05 Thread Hu Tao
extensively used in qemu. They are used both for predefined registers and device specific registers. - another option is to complete the pci_config_set_* for all predefined registers (though they will co-exist with pci_set_*). Hence the RFC. Signed-off-by: Hu Tao --- hw/pci

[Qemu-devel] [PATCH 4/6] pci: remove pci_config_set_class

2014-11-05 Thread Hu Tao
See also commit 'pci: remove pci_config_set_vendor_id'. Signed-off-by: Hu Tao --- hw/block/nvme.c| 2 +- hw/pci-host/ppce500.c | 2 +- hw/pci/pci.c | 2 +- hw/pci/pci_bridge.c| 2 +- hw/virtio/virtio-pci.c | 2 +- include/hw/pci/pci.h | 6 -- 6 files

[Qemu-devel] [PATCH 5/6] pci: remove pci_config_set_prog_interface

2014-11-05 Thread Hu Tao
See also commit 'pci: remove pci_config_set_vendor_id'. Signed-off-by: Hu Tao --- hw/block/nvme.c| 2 +- hw/i386/xen/xen_platform.c | 2 +- hw/i386/xen/xen_pvdevice.c | 2 +- hw/ide/ich.c | 2 +- hw/ide/via.c | 2 +- hw/isa/vt82c686.c

[Qemu-devel] [PATCH 2/6] pci: remove pci_config_set_device_id

2014-11-05 Thread Hu Tao
See also commit 'pci: remove pci_config_set_vendor_id'. Signed-off-by: Hu Tao --- hw/pci/pci.c | 2 +- include/hw/pci/pci.h | 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 6c544ed..e5d192d 100644 --- a/hw/pci/pci.c ++

[Qemu-devel] [PATCH 3/6] pci: remove pci_config_set_revision

2014-11-05 Thread Hu Tao
See also commit 'pci: remove pci_config_set_vendor_id'. Signed-off-by: Hu Tao --- hw/pci/pci.c | 2 +- include/hw/pci/pci.h | 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e5d192d..fdab941 100644 --- a/hw/pci/pci.c ++

[Qemu-devel] [PATCH v2 4/5] pci: remove the limit parameter of pci_host_config_read_common

2014-11-05 Thread Hu Tao
Since the limit parameter is always set to the size of pci device's configuration space, and we can determine the size from the type of pci device. Signed-off-by: Hu Tao --- hw/pci/pci_host.c | 15 +++ hw/pci/pcie_host.c| 9 + hw/ppc/spapr_pci.c

[Qemu-devel] [PATCH v2 5/5] pci: remove the limit parameter of pci_host_config_write_common

2014-11-05 Thread Hu Tao
Since the limit parameter is always set to the size of pci device's configuration space, and we can determine the size from the type of pci device. Signed-off-by: Hu Tao --- hw/pci/pci_host.c | 13 ++--- hw/pci/pcie_host.c| 9 + hw/ppc/spapr_pci.c

[Qemu-devel] [PATCH v2 0/5] Some PCI related cleanup patches

2014-11-05 Thread Hu Tao
Hi, This is v2 of PCI clenaup series. See each patch for the detail. changes: v2: - remove patch 3 from v1 which is incorrect. - rename defined macros as per Marcel's suggestion - place macros in pci_host.h as per Marcel's suggestion - new patch 'pci: reorganize QEMU_PCI

[Qemu-devel] [PATCH v2 3/5] pci: define PCI_HOST_BRIDGE_CONFIG_ADDR and PCI_HOST_BRIDGE_CONFIG_DATA.

2014-11-05 Thread Hu Tao
PCI_HOST_BRIDGE_CONFIG_ADDR and PCI_HOST_BRIDGE_CONFIG_DATA are defined in PCI specification, so move them to common place. Signed-off-by: Hu Tao --- hw/pci-host/piix.c| 8 hw/pci-host/prep.c| 6 -- hw/pci-host/q35.c | 8 include/hw/pci-host/q35

[Qemu-devel] [PATCH v2 1/5] pci: reorganize QEMU_PCI_CAP_*

2014-11-05 Thread Hu Tao
This makes code more readable. Signed-off-by: Hu Tao --- include/hw/pci/pci.h | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index c352c7b..b18759a 100644 --- a/include/hw/pci/pci.h +++ b

[Qemu-devel] [PATCH v2 2/5] pci: introduce pci_host_config_enabled()

2014-11-05 Thread Hu Tao
This makes code more readable. Signed-off-by: Hu Tao --- hw/mips/gt64xxx_pci.c | 4 ++-- hw/pci/pci_host.c | 5 +++-- include/hw/pci/pci_host.h | 5 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c index 1f2fe5f

Re: [Qemu-devel] [PATCH 2/5] pc: define PC_PCI_CONFIG_ADDR and PC_PCI_CONFIG_DATA

2014-11-05 Thread Hu Tao
On Tue, Nov 04, 2014 at 03:44:35PM +0200, Marcel Apfelbaum wrote: > On Tue, 2014-11-04 at 17:12 +0800, Hu Tao wrote: > > PC_PCI_CONFIG_ADDR and PC_PCI_CONFIG_DATA are defined in PCI > > specification, so move them to common place. > > > > Signed-off-by: Hu Tao >

Re: [Qemu-devel] [PATCH 1/5] pci: introduce PC_PCI_CONFIG_ENABLED()

2014-11-05 Thread Hu Tao
On Tue, Nov 04, 2014 at 03:41:11PM +0200, Marcel Apfelbaum wrote: > Hi, > > On Tue, 2014-11-04 at 17:12 +0800, Hu Tao wrote: > > This makes code more readable. > > > > Signed-off-by: Hu Tao > > --- > > hw/mips/gt64xxx_pci.c | 4 ++-- > > hw/pci

Re: [Qemu-devel] [RESEND PATCH v4 09/10] acpi: Add hardware implementation for memory hot unplug.

2014-11-04 Thread Hu Tao
On Wed, Nov 05, 2014 at 01:49:54PM +0800, Tang Chen wrote: <...> > - 2-7: reserved, OSPM must clear them before writing to register > + 2: set by hardware after it has emitted devive eject event for s/devive/device/ Regards, Hu

Re: [Qemu-devel] [PATCH 3/5] pci: move initialization of pci's conf_addr and conf_data to common place

2014-11-04 Thread Hu Tao
On Tue, Nov 04, 2014 at 04:21:41PM +0200, Marcel Apfelbaum wrote: > On Tue, 2014-11-04 at 17:12 +0800, Hu Tao wrote: > > So that standard pci host device can share them. > > > > Signed-off-by: Hu Tao > > --- > > hw/pci-host/piix.c | 20

[Qemu-devel] [PATCH 2/5] pc: define PC_PCI_CONFIG_ADDR and PC_PCI_CONFIG_DATA

2014-11-04 Thread Hu Tao
PC_PCI_CONFIG_ADDR and PC_PCI_CONFIG_DATA are defined in PCI specification, so move them to common place. Signed-off-by: Hu Tao --- hw/pci-host/piix.c| 8 hw/pci-host/q35.c | 8 include/hw/pci-host/q35.h | 3 --- include/hw/pci/pci.h | 5 + tests

[Qemu-devel] [PATCH 0/5] Some PCI related cleanup patches

2014-11-04 Thread Hu Tao
Hi, This series includes 5 PCI clenaup patches. See each patch for the detail. Hu Tao (5): pci: introduce PC_PCI_CONFIG_ENABLED() pc: define PC_PCI_CONFIG_ADDR and PC_PCI_CONFIG_DATA pci: move initialization of pci's conf_addr and conf_data to common place pci: remove the

[Qemu-devel] [PATCH 1/5] pci: introduce PC_PCI_CONFIG_ENABLED()

2014-11-04 Thread Hu Tao
This makes code more readable. Signed-off-by: Hu Tao --- hw/mips/gt64xxx_pci.c | 4 ++-- hw/pci/pci_host.c | 5 +++-- include/hw/pci/pci.h | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c index 1f2fe5f..a49dbd7 100644

[Qemu-devel] [PATCH 4/5] pci: remove the limit parameter of pci_host_config_read_common

2014-11-04 Thread Hu Tao
Since the limit parameter is always set to the size of pci device's configuration space, and we can determine the size from the type of pci device. Signed-off-by: Hu Tao --- hw/pci/pci_host.c | 15 +++ hw/pci/pcie_host.c| 9 + hw/ppc/spapr_pci.c

[Qemu-devel] [PATCH 5/5] pci: remove the limit parameter of pci_host_config_write_common

2014-11-04 Thread Hu Tao
Since the limit parameter is always set to the size of pci device's configuration space, and we can determine the size from the type of pci device. Signed-off-by: Hu Tao --- hw/pci/pci_host.c | 13 ++--- hw/pci/pcie_host.c| 9 + hw/ppc/spapr_pci.c

[Qemu-devel] [PATCH 3/5] pci: move initialization of pci's conf_addr and conf_data to common place

2014-11-04 Thread Hu Tao
So that standard pci host device can share them. Signed-off-by: Hu Tao --- hw/pci-host/piix.c | 20 hw/pci-host/q35.c | 7 --- hw/pci/pci_host.c | 32 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/hw/pci-host/piix.c

[Qemu-devel] [PATCH] exec: don't exit if failed to preallocate memory for memory-backend-file

2014-09-26 Thread Hu Tao
continues running. Signed-off-by: Hu Tao --- exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 759055d..eed5da2 100644 --- a/exec.c +++ b/exec.c @@ -1163,9 +1163,9 @@ static void *file_ram_alloc(RAMBlock *block, return area; error: -if

Re: [Qemu-devel] [PATCH] vl: Adjust the place of calling mlockall to speedup VM's startup

2014-09-23 Thread Hu Tao
On Tue, Sep 23, 2014 at 11:30:26AM +0300, Michael S. Tsirkin wrote: > On Tue, Sep 23, 2014 at 03:57:47PM +0800, zhanghailiang wrote: > > If we configure mlock=on and memory policy=bind at the same time, > > It will consume lots of time for system to treat with memory, > > especially when call mbind

Re: [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break hotplug memory feature

2014-09-17 Thread Hu Tao
On Wed, Sep 17, 2014 at 02:19:05PM +0400, Andrey Korolyov wrote: > On Wed, Sep 17, 2014 at 2:00 PM, Tang Chen wrote: > > Add Andrey Korolyov > > > > On 09/17/2014 04:32 PM, Hu Tao wrote: > >> > >> On Tue, Sep 16, 2014 at 06:39:15PM +0800, zhanghailiang wr

Re: [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break hotplug memory feature

2014-09-17 Thread Hu Tao
On Tue, Sep 16, 2014 at 06:39:15PM +0800, zhanghailiang wrote: > If we do not configure numa option, memory hotplug should work as well. > It should not depend on numa option. > > Steps to reproduce: > (1) Start VM: qemu-kvm -m 1024,slots=4,maxmem=8G > (2) Hotplug memory > It will fail and reports

Re: [Qemu-devel] [PATCH v15 0/5] qcow2, raw: add preallocation=full and preallocation=falloc

2014-09-16 Thread Hu Tao
On Tue, Sep 16, 2014 at 12:19:58PM +0200, Kevin Wolf wrote: > Am 16.09.2014 um 12:10 hat Hu Tao geschrieben: > > ping... > > Sorry, forgot to send the mail when I merged it. This is in master now. Thank you very much! Regards, Hu > > Kevin > > > On Fri, Sep 12

Re: [Qemu-devel] [PATCH v15 0/5] qcow2, raw: add preallocation=full and preallocation=falloc

2014-09-16 Thread Hu Tao
ping... On Fri, Sep 12, 2014 at 05:22:45PM +0800, Hu Tao wrote: > ping? > > On Wed, Sep 10, 2014 at 05:05:44PM +0800, Hu Tao wrote: > > This series adds two preallocation mode to qcow2 and raw: > > > > Option preallocation=full preallocates disk space for image b

[Qemu-devel] [PATCH v2 2/2] configure: check for pixman-1 version

2014-09-14 Thread Hu Tao
n.c:42: error: ‘PIXMAN_TYPE_RGBA’ undeclared (first use in this function) qemu/ui/qemu-pixman.c:42: error: (Each undeclared identifier is reported only once qemu/ui/qemu-pixman.c:42: error: for each function it appears in.) This patch fixes the problem by checking the pixman version. Signed-o

[Qemu-devel] [PATCH v2 1/2] pixman: update internal copy to pixman-0.32.6

2014-09-14 Thread Hu Tao
d-off-by: Hu Tao --- pixman | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixman b/pixman index 97336fa..87eea99 16 --- a/pixman +++ b/pixman @@ -1 +1 @@ -Subproject commit 97336fad32acf802003855cd8bd6477fa49a12e3 +Subproject commit 87eea99e443b389c978cf37efc52788b

[Qemu-devel] [PATCH v2 0/2] fix building failure with pixman

2014-09-14 Thread Hu Tao
v1: - bump pixman to pixman-0.32.6 Hu Tao (2): pixman: update internal copy to pixman-0.32.6 configure: check for pixman-1 version configure | 5 +++-- pixman| 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) -- 1.9.3

Re: [Qemu-devel] [PATCH] configure: check for pixman-1 version

2014-09-14 Thread Hu Tao
CCed Paolo On Mon, Sep 15, 2014 at 10:41:09AM +0800, Hu Tao wrote: > On Sun, Sep 14, 2014 at 07:23:20PM -0700, Peter Maydell wrote: > > On 14 September 2014 18:53, Hu Tao wrote: > > > commit a93a3af9 introduces use of PIXMAN_TYPE_RGBA, but it's only > > > availab

Re: [Qemu-devel] [PATCH] configure: check for pixman-1 version

2014-09-14 Thread Hu Tao
On Sun, Sep 14, 2014 at 07:23:20PM -0700, Peter Maydell wrote: > On 14 September 2014 18:53, Hu Tao wrote: > > commit a93a3af9 introduces use of PIXMAN_TYPE_RGBA, but it's only available > > in pixman >= 0.21.8. If pixman doesn't meet the version requirement, qemu

Re: [Qemu-devel] [Bug 1368791] [NEW] qemu build fails on Ubuntu 10.04 LTS since recent pixman changes

2014-09-14 Thread Hu Tao
On Fri, Sep 12, 2014 at 02:19:44PM +, Andreas Gustafsson wrote: > Public bug reported: > > Since commit 0dfa7e30126364c434a48cb37a1a41119e536c2a, the qemu git > mainline no longer builds on Ubuntu 10.04 LTS. The build fails with: > > CCui/input.o > ui/qemu-pixman.c: In function 'qemu_p

[Qemu-devel] [PATCH] configure: check for pixman-1 version

2014-09-14 Thread Hu Tao
checking the pixman version. Reported-by: Andreas Gustafsson Signed-off-by: Hu Tao --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 961bf6f..1a9daa5 100755 --- a/configure +++ b/configure @@ -2737,7 +2737,7 @@ fi if test "$

Re: [Qemu-devel] [PATCH v15 0/5] qcow2, raw: add preallocation=full and preallocation=falloc

2014-09-12 Thread Hu Tao
ping? On Wed, Sep 10, 2014 at 05:05:44PM +0800, Hu Tao wrote: > This series adds two preallocation mode to qcow2 and raw: > > Option preallocation=full preallocates disk space for image by writing > zeros to disk, this ensures disk space in any cases. > > Option pr

[Qemu-devel] [PATCH v15 2/5] block: don't convert file size to sector size

2014-09-10 Thread Hu Tao
and avoid converting it back later. Signed-off-by: Hu Tao Reviewed-by: Max Reitz Reviewed-by: Benoît Canet --- block/gluster.c | 9 - block/qcow.c | 8 block/qcow2.c | 10 +- block/raw-posix.c | 12 ++-- block/raw-win32.c | 6 +++--- 5 files

[Qemu-devel] [PATCH v15 3/5] qapi: introduce PreallocMode and new PreallocModes full and falloc.

2014-09-10 Thread Hu Tao
This patch prepares for the subsequent patches. Signed-off-by: Hu Tao Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake --- block/qcow2.c | 28 ++-- qapi/block-core.json | 17 + tests/qemu-iotests/049.out | 2

[Qemu-devel] [PATCH v15 0/5] qcow2, raw: add preallocation=full and preallocation=falloc

2014-09-10 Thread Hu Tao
uentially but does keep information in metadata. Peter, is this acceptable? Hu Tao (5): block: round up file size to nearest sector block: don't convert file size to sector size qapi: introduce PreallocMode and new PreallocModes full and falloc. raw-posix: Add falloc and full preallocatio

[Qemu-devel] [PATCH v15 4/5] raw-posix: Add falloc and full preallocation option

2014-09-10 Thread Hu Tao
This patch adds a new option preallocation for raw format, and implements falloc and full preallocation. Signed-off-by: Hu Tao Reviewed-by: Max Reitz --- block/raw-posix.c | 92 +++ qemu-doc.texi | 9 ++ qemu-img.texi | 9

[Qemu-devel] [PATCH v15 1/5] block: round up file size to nearest sector

2014-09-10 Thread Hu Tao
by rounding up file size to nearest sector so that the actual file size is no less than the requested file size. Signed-off-by: Hu Tao Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- block/archipelago.c | 3 ++- block/cow.c | 3

[Qemu-devel] [PATCH v15 5/5] qcow2: Add falloc and full preallocation option

2014-09-10 Thread Hu Tao
preallocation=falloc allocates disk space by posix_fallocate(), preallocation=full allocates disk space by writing zeros to disk. Both modes imply preallocation=metadata. Signed-off-by: Hu Tao Reviewed-by: Max Reitz --- block/qcow2.c | 63

Re: [Qemu-devel] [PATCH v14 1/5] block: round up file size to nearest sector

2014-09-09 Thread Hu Tao
On Wed, Sep 10, 2014 at 09:50:02AM +0800, Hu Tao wrote: > On Tue, Sep 09, 2014 at 02:12:18PM +0200, Benoît Canet wrote: ... > > > > seems correct but the patch does not apply anymore on latest Kevin/block > > branch neither with git am nor with git apply.. > > Could

Re: [Qemu-devel] [PATCH v7 RESEND 0/8] memory API improvements and bug fixes for memory backends

2014-09-09 Thread Hu Tao
On Tue, Sep 09, 2014 at 01:29:21PM +0200, Paolo Bonzini wrote: > Il 09/09/2014 07:27, Hu Tao ha scritto: > > This is merely a rebase of v7, and fixes two merge conflicts. > > > > This series includes two parts: > > > > 1. part 1 includes patches 1-4,

Re: [Qemu-devel] [PATCH v7 RESEND 4/8] memory: add parameter errp to memory_region_init_rom_device

2014-09-09 Thread Hu Tao
On Tue, Sep 09, 2014 at 01:20:57PM +0200, Paolo Bonzini wrote: > Il 09/09/2014 07:27, Hu Tao ha scritto: > > Add parameter errp to memory_region_init_rom_device and update all call > > sites to pass in &error_abort. > > > > Reviewed-by: Peter Crosthwaite > &g

Re: [Qemu-devel] [PATCH v14 4/5] raw-posix: Add falloc and full preallocation option

2014-09-09 Thread Hu Tao
On Tue, Sep 09, 2014 at 03:21:49PM +0200, Benoît Canet wrote: > The Tuesday 09 Sep 2014 à 11:54:30 (+0800), Hu Tao wrote : > > This patch adds a new option preallocation for raw format, and implements > > falloc and full preallocation. > > > > Signed-off-by: Hu Tao

Re: [Qemu-devel] [PATCH v14 1/5] block: round up file size to nearest sector

2014-09-09 Thread Hu Tao
On Tue, Sep 09, 2014 at 02:12:18PM +0200, Benoît Canet wrote: > The Tuesday 09 Sep 2014 à 11:54:27 (+0800), Hu Tao wrote : > > Taking the time to systematically write a nice sentence in > the commit message body about why your commit exists and > explaining the long term purpose of

Re: [Qemu-devel] [PATCH v14 3/5] qapi: introduce PreallocMode and new PreallocModes full and falloc.

2014-09-09 Thread Hu Tao
On Tue, Sep 09, 2014 at 06:42:13AM -0600, Eric Blake wrote: > On 09/08/2014 09:54 PM, Hu Tao wrote: > > This patch prepares for the subsequent patches. > > > > Signed-off-by: Hu Tao > > Reviewed-by: Max Reitz > > Reviewed-by: Kevin Wolf > > -

Re: [Qemu-devel] [PATCH v14 3/5] qapi: introduce PreallocMode and new PreallocModes full and falloc.

2014-09-09 Thread Hu Tao
On Tue, Sep 09, 2014 at 02:45:56PM +0200, Benoît Canet wrote: > The Tuesday 09 Sep 2014 à 11:54:29 (+0800), Hu Tao wrote : > > This patch prepares for the subsequent patches. > > > > Signed-off-by: Hu Tao > > Reviewed-by: Max Reitz > > Reviewed-by: Kevin

[Qemu-devel] [PATCH v7 RESEND 7/8] exec: report error when memory < hpagesize

2014-09-08 Thread Hu Tao
ore dumped) This patch fixes the problem. With this patch, qemu reports error message like: qemu-system-x86_64: -object memory-backend-file,mem-path=/hugepages,id=mem-file0,size=1M: memory size 0x10 must be equal to or larger than huge page size 0x20 Signed-off-by: Hu Tao --- exe

[Qemu-devel] [PATCH v7 RESEND 6/8] exec: file_ram_alloc: don't exit if failed to preallocate memory

2014-09-08 Thread Hu Tao
t_add memory-backend-file,size=10G,mem-path=/hugepages,id=mem-file0 Signed-off-by: Hu Tao --- exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 2b9c4c5..0362cd8 100644 --- a/exec.c +++ b/exec.c @@ -1129,8 +1129,8 @@ static void *file_ram_

[Qemu-devel] [PATCH v7 RESEND 8/8] exec: add parameter errp to gethugepagesize

2014-09-08 Thread Hu Tao
Signed-off-by: Hu Tao Reviewed-by: Peter Crosthwaite --- exec.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/exec.c b/exec.c index 21af6c9..0f70c04 100644 --- a/exec.c +++ b/exec.c @@ -1031,7 +1031,7 @@ void qemu_mutex_unlock_ramlist(void) #define

[Qemu-devel] [PATCH v7 RESEND 2/8] memory: add parameter errp to memory_region_init_ram

2014-09-08 Thread Hu Tao
Add parameter errp to memory_region_init_ram and update all call sites to pass in &error_abort. Signed-off-by: Hu Tao Reviewed-by: Peter Crosthwaite --- backends/hostmem-ram.c | 2 +- hw/alpha/typhoon.c | 3 ++- hw/arm/armv

[Qemu-devel] [PATCH v7 RESEND 3/8] memory: add parameter errp to memory_region_init_ram_ptr

2014-09-08 Thread Hu Tao
Add parameter errp to memory_region_init_ram_ptr and update all call sites to pass in &error_abort. Reviewed-by: Peter Crosthwaite Signed-off-by: Hu Tao --- hw/display/g364fb.c | 2 +- hw/i386/kvm/pci-assign.c | 3 ++- hw/misc/ivshmem.c| 5 +++-- hw/misc/vfio.c

[Qemu-devel] [PATCH v7 RESEND 5/8] hostmem-ram: don't exit qemu if size of memory-backend-ram is way too big

2014-09-08 Thread Hu Tao
ckend-ram,size=10G,id=ram0 Reviewed-by: Peter Crosthwaite Signed-off-by: Hu Tao --- backends/hostmem-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/hostmem-ram.c b/backends/hostmem-ram.c index e55d066..a67a134 100644 --- a/backends/hostmem-ram.c +++ b/bac

[Qemu-devel] [PATCH v7 RESEND 4/8] memory: add parameter errp to memory_region_init_rom_device

2014-09-08 Thread Hu Tao
Add parameter errp to memory_region_init_rom_device and update all call sites to pass in &error_abort. Reviewed-by: Peter Crosthwaite Signed-off-by: Hu Tao --- hw/block/pflash_cfi01.c | 2 +- hw/block/pflash_cfi02.c | 2 +- include/exec/memory.h | 4 +++- memory.c| 5 +++-

[Qemu-devel] [PATCH v7 RESEND 1/8] exec: add parameter errp to qemu_ram_alloc and qemu_ram_alloc_from_ptr

2014-09-08 Thread Hu Tao
Add parameter errp to qemu_ram_alloc and qemu_ram_alloc_from_ptr so that we can handle errors. Signed-off-by: Hu Tao Reviewed-by: Peter Crosthwaite --- exec.c | 36 +++- include/exec/ram_addr.h | 4 ++-- memory.c| 6 +++--- 3

[Qemu-devel] [PATCH v7 RESEND 0/8] memory API improvements and bug fixes for memory backends

2014-09-08 Thread Hu Tao
of patch 3 v1: - initial version Hu Tao (8): exec: add parameter errp to qemu_ram_alloc and qemu_ram_alloc_from_ptr memory: add parameter errp to memory_region_init_ram memory: add parameter errp to memory_region_init_ram_ptr memory: add parameter errp to memory_region_init_rom_device

[Qemu-devel] [PATCH v14 4/5] raw-posix: Add falloc and full preallocation option

2014-09-08 Thread Hu Tao
This patch adds a new option preallocation for raw format, and implements falloc and full preallocation. Signed-off-by: Hu Tao Reviewed-by: Max Reitz --- block/raw-posix.c | 93 +++ qemu-doc.texi | 9 ++ qemu-img.texi | 9

[Qemu-devel] [PATCH v14 5/5] qcow2: Add falloc and full preallocation option

2014-09-08 Thread Hu Tao
preallocation=falloc allocates disk space by posix_fallocate(), preallocation=full allocates disk space by writing zeros to disk. Both modes imply preallocation=metadata. Signed-off-by: Hu Tao Reviewed-by: Max Reitz --- block/qcow2.c | 62

[Qemu-devel] [PATCH v14 3/5] qapi: introduce PreallocMode and new PreallocModes full and falloc.

2014-09-08 Thread Hu Tao
This patch prepares for the subsequent patches. Signed-off-by: Hu Tao Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- block/qcow2.c | 23 +++ qapi/block-core.json | 17 + tests/qemu-iotests/049.out | 2 +- 3 files changed, 33

[Qemu-devel] [PATCH v14 2/5] block: don't convert file size to sector size

2014-09-08 Thread Hu Tao
and avoid converting it back later. Signed-off-by: Hu Tao Reviewed-by: Max Reitz --- block/gluster.c | 9 - block/qcow.c | 8 block/qcow2.c | 10 +- block/raw-posix.c | 12 ++-- block/raw-win32.c | 6 +++--- 5 files changed, 22 insertions(+), 23

[Qemu-devel] [PATCH v14 1/5] block: round up file size to nearest sector

2014-09-08 Thread Hu Tao
Signed-off-by: Hu Tao Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- block/archipelago.c | 3 ++- block/cow.c | 3 ++- block/gluster.c | 4 +-- block/iscsi.c| 4 +-- block/nfs.c

[Qemu-devel] [PATCH v14 0/5] qcow2, raw: add preallocation=full and preallocation=falloc

2014-09-08 Thread Hu Tao
2 that bdrv_preallocate may clear all information in metadata. This does not necessarily map all data clusters sequentially but does keep information in metadata. Peter, is this acceptable? Hu Tao (5): block: round up file size to nearest sector block: don't convert file size

Re: [Qemu-devel] [PATCH v13 6/6] qcow2: Add full preallocation option

2014-09-08 Thread Hu Tao
On Thu, Sep 04, 2014 at 03:09:08PM +0200, Kevin Wolf wrote: > Am 29.08.2014 um 10:33 hat Hu Tao geschrieben: > > preallocation=full allocates disk space by fallocating the space if > > posix_fallocate() is available, otherwise by writing zeros to disk to > > ensure di

Re: [Qemu-devel] [PATCH v13 2/6] block: don't convert file size to sector size

2014-09-05 Thread Hu Tao
On Thu, Sep 04, 2014 at 11:57:58AM +0200, Kevin Wolf wrote: > Am 29.08.2014 um 10:33 hat Hu Tao geschrieben: > > and avoid converting it back later. > > > > Signed-off-by: Hu Tao > > > diff --git a/block/raw-posix.c b/block/raw-posix.c > > index 9c22e3f

Re: [Qemu-devel] [PATCH 1/2] qemu-iotests: fix filter of encryption option

2014-09-04 Thread Hu Tao
On Fri, Aug 29, 2014 at 05:06:20PM +0100, Stefan Hajnoczi wrote: > On Thu, Aug 28, 2014 at 04:56:03PM +0800, Hu Tao wrote: > > We should filter out encryption=on, too. > > > > Signed-off-by: Hu Tao > > --- > > tests/qemu-iotests/common.filter | 2 +- >

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-04 Thread Hu Tao
On Fri, Aug 29, 2014 at 09:48:01AM +0100, Richard W.M. Jones wrote: > On Fri, Aug 29, 2014 at 04:33:12PM +0800, Hu Tao wrote: > > +if (prealloc == PREALLOC_MODE_FULL) { > > +/* posix_fallocate() doesn't set errno. */ > > +result = -posix_f

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-02 Thread Hu Tao
On Tue, Sep 02, 2014 at 11:45:38PM +0200, Max Reitz wrote: > On 29.08.2014 10:33, Hu Tao wrote: > >This patch adds a new option preallocation for raw format, and implements > >full preallocation. > > > >Signed-off-by: Hu Tao > &g

Re: [Qemu-devel] [PATCH v13 4/6] qapi: introduce PreallocMode and a new PreallocMode full.

2014-09-02 Thread Hu Tao
On Tue, Sep 02, 2014 at 03:51:23PM -0600, Eric Blake wrote: > On 08/29/2014 02:33 AM, Hu Tao wrote: > > This patch prepares for the subsequent patches. > > > > Signed-off-by: Hu Tao > > --- > > block/qcow2.c | 23 +++ >

Re: [Qemu-devel] [PATCH v13 4/6] qapi: introduce PreallocMode and a new PreallocMode full.

2014-09-02 Thread Hu Tao
On Tue, Sep 02, 2014 at 11:32:50PM +0200, Max Reitz wrote: > On 29.08.2014 10:33, Hu Tao wrote: > >This patch prepares for the subsequent patches. > > > >Signed-off-by: Hu Tao > >--- > > block/qcow2.c | 23 +++ >

Re: [Qemu-devel] [PATCH v13 3/6] rename parse_enum_option to qapi_enum_parse and make it public

2014-09-02 Thread Hu Tao
On Tue, Sep 02, 2014 at 11:27:00PM +0200, Max Reitz wrote: > On 29.08.2014 10:33, Hu Tao wrote: > >From: Peter Lieven > > > >relaxing the license to LGPLv2+ is intentional. > > > >Suggested-by: Markus Armbruster > >Signed-off-by: Hu Tao > >Signed-off

Re: [Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-09-02 Thread Hu Tao
On Fri, Aug 29, 2014 at 09:48:01AM +0100, Richard W.M. Jones wrote: > On Fri, Aug 29, 2014 at 04:33:12PM +0800, Hu Tao wrote: > > +if (prealloc == PREALLOC_MODE_FULL) { > > +/* posix_fallocate() doesn't set errno. */ > > +result = -posix_f

[Qemu-devel] [PATCH v13 6/6] qcow2: Add full preallocation option

2014-08-29 Thread Hu Tao
preallocation=full allocates disk space by fallocating the space if posix_fallocate() is available, otherwise by writing zeros to disk to ensure disk space in any cases. Signed-off-by: Hu Tao --- block/qcow2.c | 61 +++--- qemu-doc.texi

[Qemu-devel] [PATCH v13 5/6] raw-posix: Add full preallocation option

2014-08-29 Thread Hu Tao
This patch adds a new option preallocation for raw format, and implements full preallocation. Signed-off-by: Hu Tao --- block/raw-posix.c | 92 +++ qemu-doc.texi | 8 + qemu-img.texi | 8 + 3 files changed, 88 insertions

[Qemu-devel] [PATCH v13 4/6] qapi: introduce PreallocMode and a new PreallocMode full.

2014-08-29 Thread Hu Tao
This patch prepares for the subsequent patches. Signed-off-by: Hu Tao --- block/qcow2.c | 23 +++ qapi/block-core.json | 16 tests/qemu-iotests/049.out | 2 +- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/block/qcow2.c

[Qemu-devel] [PATCH v13 0/6] qcow2, raw: add preallocation=full

2014-08-29 Thread Hu Tao
g file size for more formats (patch 2) Hu Tao (5): block: round up file size to nearest sector block: don't convert file size to sector size qapi: introduce PreallocMode and a new PreallocMode full. raw-posix: Add full preallocation option qcow2: Add full preallocation option Peter

[Qemu-devel] [PATCH v13 3/6] rename parse_enum_option to qapi_enum_parse and make it public

2014-08-29 Thread Hu Tao
From: Peter Lieven relaxing the license to LGPLv2+ is intentional. Suggested-by: Markus Armbruster Signed-off-by: Hu Tao Signed-off-by: Peter Lieven Reviewed-by: Eric Blake Reviewed-by: Benoit Canet --- blockdev.c | 30 ++ include/qapi/util.h | 17

[Qemu-devel] [PATCH v13 1/6] block: round up file size to nearest sector

2014-08-29 Thread Hu Tao
Signed-off-by: Hu Tao --- block/archipelago.c | 3 ++- block/cow.c | 3 ++- block/gluster.c | 4 +-- block/iscsi.c| 4 +-- block/nfs.c | 3 ++- block/qcow.c | 3 ++- block/qcow2

[Qemu-devel] [PATCH v13 2/6] block: don't convert file size to sector size

2014-08-29 Thread Hu Tao
and avoid converting it back later. Signed-off-by: Hu Tao --- block/gluster.c | 9 - block/qcow.c | 8 block/qcow2.c | 10 +- block/raw-posix.c | 6 +++--- block/raw-win32.c | 6 +++--- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a

[Qemu-devel] [PATCH 2/2] qemu-iotests: filter out driver-specific option preallocation

2014-08-28 Thread Hu Tao
Signed-off-by: Hu Tao --- tests/qemu-iotests/common.filter | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index 362394e..97d2934 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter

[Qemu-devel] [PATCH 0/2] qemu-iotests: fix two driver-specific option filtering problems

2014-08-28 Thread Hu Tao
See each patch for the details. Hu Tao (2): qemu-iotests: fix filter of encryption option qemu-iotests: filter out driver-specific option preallocation tests/qemu-iotests/common.filter | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.8.0

[Qemu-devel] [PATCH 1/2] qemu-iotests: fix filter of encryption option

2014-08-28 Thread Hu Tao
We should filter out encryption=on, too. Signed-off-by: Hu Tao --- tests/qemu-iotests/common.filter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index 51192c8..362394e 100644 --- a/tests/qemu-iotests

Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-08-27 Thread Hu Tao
On Tue, Aug 26, 2014 at 11:44:26AM +0100, Stefan Hajnoczi wrote: > On Mon, Aug 25, 2014 at 09:35:15AM +0800, Hu Tao wrote: > > On Fri, Aug 22, 2014 at 12:54:29PM +0200, Kevin Wolf wrote: > > > Am 28.07.2014 um 10:48 hat Hu Tao geschrieben: > > > > ping... > >

Re: [Qemu-devel] [PATCH v7 0/8] memory API improvements and bug fixes for memory backends

2014-08-27 Thread Hu Tao
ping...

Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-08-25 Thread Hu Tao
On Fri, Aug 22, 2014 at 05:00:08PM +0100, Richard W.M. Jones wrote: > On Fri, Aug 22, 2014 at 05:53:22PM +0200, Kevin Wolf wrote: > > Am 22.08.2014 um 17:34 hat Richard W.M. Jones geschrieben: > > > On Fri, Aug 22, 2014 at 05:22:33PM +0200, Kevin Wolf wrote: > > > > It's still useful because it hap

  1   2   3   4   5   6   7   8   9   10   >