Re: [Qemu-devel] BUG: KASAN: use-after-free in free_old_xmit_skbs

2017-06-26 Thread Jean-Philippe Menil
On 06/26/2017 04:50 AM, Jason Wang wrote: On 2017年06月24日 06:32, Cong Wang wrote: On Fri, Jun 23, 2017 at 1:43 AM, Jason Wang wrote: On 2017年06月23日 02:53, Michael S. Tsirkin wrote: On Thu, Jun 22, 2017 at 08:15:58AM +0200, jean-philippe menil wrote: Hi Michael, from what i see, the race a

Re: [Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-06-26 Thread Auger Eric
Hi Bharat, On 19/06/2017 09:54, Bharat Bhushan wrote: > Hi Eric, > > I started added replay in virtio-iommu and came across how MSI interrupts > with work with VFIO. > I understand that on intel this works differently but vsmmu will have same > requirement. > kvm-msi-irq-route are added using

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v3 1/2] virtio-net: enable configurable tx queue size

2017-06-26 Thread Jason Wang
On 2017年06月26日 12:55, Wei Wang wrote: On 06/26/2017 11:18 AM, Jason Wang wrote: On 2017年06月23日 10:32, Wei Wang wrote: This patch enables the virtio-net tx queue size to be configurable between 256 (the default queue size) and 1024 by the user when the vhost-user backend is used. Currently,

Re: [Qemu-devel] [PATCH 3/7] target/m68k: add fsglmul and fsgldiv

2017-06-26 Thread Laurent Vivier
Le 25/06/2017 à 21:44, Philippe Mathieu-Daudé a écrit : > Hi Laurent, > > On 06/25/2017 04:21 PM, Laurent Vivier wrote: >> fsglmul and fsgldiv truncate data to single precision before computing >> results. >> >> Signed-off-by: Laurent Vivier >> --- >> target/m68k/fpu_helper.c | 22 +

Re: [Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-06-26 Thread Auger Eric
Hi Jean-Philippe, On 19/06/2017 12:15, Jean-Philippe Brucker wrote: > On 19/06/17 08:54, Bharat Bhushan wrote: >> Hi Eric, >> >> I started added replay in virtio-iommu and came across how MSI interrupts >> with work with VFIO. >> I understand that on intel this works differently but vsmmu will h

Re: [Qemu-devel] [PATCH v8 2/7] cpu: allocate cpu->trace_dstate in place

2017-06-26 Thread Daniel P. Berrange
On Sun, Jun 25, 2017 at 12:41:57PM +0300, Lluís Vilanova wrote: > Lluís Vilanova writes: > > > Emilio G Cota writes: > >> There's little point in dynamically allocating the bitmap if we > >> know at compile-time the max number of events we want to support. > >> Thus, make room in the struct for th

Re: [Qemu-devel] [PATCH v8 7/7] trace: [trivial] Statically enable all guest events

2017-06-26 Thread Daniel P. Berrange
On Thu, Jun 08, 2017 at 10:25:22PM -0400, Emilio G. Cota wrote: > From: Lluís Vilanova > > The optimizations of this series makes it feasible to have them > available on all builds. I'm not saying you're wrong, but where is the data to backup this assertion ? IMHO, this commit message should be

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Kevin Wolf
[ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: > Hi, > > I am currently working on optimizing speed for compressed QCOW2 > images. We use them for templates and would also like to use them for > backups, but the latter is almost infeasible

[Qemu-devel] [PATCH v4 0/3] Add bitmap for received pages in postcopy migration

2017-06-26 Thread Alexey Perevalov
This is 4th version of [PATCH v1 0/2] Add bitmap for copied pages in postcopy migration cover message from there This is a separate patch set, it derived from https://www.mail-archive.com/qemu-devel@nongnu.org/msg456004.html There are several possible use cases: 1. solve issue with postcopy live

[Qemu-devel] [PATCH v4 1/3] migration: postcopy_place_page factoring out

2017-06-26 Thread Alexey Perevalov
Need to mark copied pages as closer as possible to the place where it tracks down. That will be necessary in futher patch. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 13 +++-- migr

[Qemu-devel] [PATCH v4 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-06-26 Thread Alexey Perevalov
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches. Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Signed-off-by: Alexey Perevalov --- migration/postcopy-ram

[Qemu-devel] [PATCH v4 3/3] migration: add bitmap for received page

2017-06-26 Thread Alexey Perevalov
This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue in postcopy livemigration. Information about received page

[Qemu-devel] [RFC 0/5] vfio: Introduce Live migration capability to vfio_mdev device

2017-06-26 Thread Yulei Zhang
Summary This series RFC would like to introduce the live migration capability to vfio_mdev device. As currently vfio_mdev device don't support migration, we introduce a device flag VFIO_DEVICE_FLAGS_MIGRATABLE to help determine whether the mdev device can be migrate or not, it will check the fla

[Qemu-devel] [RFC 1/5] vfio: introduce a new VFIO region for migration support

2017-06-26 Thread Yulei Zhang
New VFIO region VFIO_PCI_DEVICE_STATE_REGION_INDEX is added to fetch and restore the pci device status during the live migration. Signed-off-by: Yulei Zhang --- hw/vfio/pci.c | 17 + hw/vfio/pci.h | 1 + linux-headers/linux/vfio.h | 5 - 3 files ch

[Qemu-devel] [RFC 2/5] vfio: Add struct vfio_vmstate_info to introduce vfio device put/get funtion

2017-06-26 Thread Yulei Zhang
Introduce vfio_device_put/vfio_device_get funtion for vfio device state save/restore usage. And vfio device unmigratable flag will be set to false during initialization if device flag VFIO_DEVICE_FLAGS_MIGRATABLE is set. Signed-off-by: Yulei Zhang --- hw/vfio/pci.c | 35 +

[Qemu-devel] [RFC 3/5] vfio: introduce new VFIO ioctl VFIO_DEVICE_PCI_STATUS_SET

2017-06-26 Thread Yulei Zhang
New VFIO ioctl VFIO_DEVICE_PCI_STATUS_SET is added to change the vfio pci device status during the migration, stop the device on the source side before fetch its status and start the deivce on the target side after restore its status. Signed-off-by: Yulei Zhang --- hw/vfio/pci.c | 1

[Qemu-devel] [RFC 4/5] vfio: use vfio_device_put/vfio_device_get for device status save/restore

2017-06-26 Thread Yulei Zhang
For VFIO pci device status migrate, on the source side with funtion vfio_device_put to save the following states 1. pci configuration space addr0~addr5 2. pci configuration space msi_addr msi_data 3. pci device status fetch from device driver And on the target side with funtion vfio_device_get to

[Qemu-devel] [RFC 5/5] vifo: introduce new VFIO ioctl VFIO_DEVICE_PCI_GET_DIRTY_BITMAP

2017-06-26 Thread Yulei Zhang
New VFIO ioctl VFIO_DEVICE_PCI_GET_DIRTY_BITMAP is used to sync the pci device dirty pages during the migration. Signed-off-by: Yulei Zhang --- hw/vfio/pci.c | 32 hw/vfio/pci.h | 2 ++ linux-headers/linux/vfio.h | 14 ++ 3

[Qemu-devel] [Intel-gfx][RFC 2/9] drm/i915/gvt: Apply g2h adjustment during fence mmio access

2017-06-26 Thread Yulei Zhang
Apply the guest to host gma conversion while guest config the fence mmio registers due to the host gma change after the migration. Signed-off-by: Yulei Zhang --- drivers/gpu/drm/i915/gvt/aperture_gm.c | 6 -- drivers/gpu/drm/i915/gvt/gvt.h | 14 ++ 2 files changed, 18 in

[Qemu-devel] [Intel-gfx][RFC 8/9] drm/i915/gvt: Introduce new VFIO ioctl for mdev device dirty page sync

2017-06-26 Thread Yulei Zhang
Add new vfio ioctl VFIO_DEVICE_PCI_GET_DIRTY_BITMAP to fetch the dirty page bitmap from mdev device driver for data sync during live migration. Signed-off-by: Yulei Zhang --- drivers/gpu/drm/i915/gvt/kvmgt.c | 33 + include/uapi/linux/vfio.h| 14 ++

[Qemu-devel] [Intel-gfx][RFC 1/9] drm/i915/gvt: Apply g2h adjust for GTT mmio access

2017-06-26 Thread Yulei Zhang
Apply guest to host gma conversion while guest try to access the GTT mmio registers, as after enable live migration the host gma will be changed due to the resourece re-allocation, but guest gma should be remaining unchanged, thus g2h conversion is request for it. Signed-off-by: Yulei Zhang ---

[Qemu-devel] [Intel-gfx][RFC 6/9] drm/i915/gvt: Introduce new flag to indicate migration capability

2017-06-26 Thread Yulei Zhang
New device flag VFIO_DEVICE_FLAGS_MIGRATABLE is added for vfio mdev device vGPU to claim the capability for live migration. Signed-off-by: Yulei Zhang --- drivers/gpu/drm/i915/gvt/kvmgt.c | 1 + include/uapi/linux/vfio.h| 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/dr

[Qemu-devel] [Intel-gfx][RFC 0/9] drm/i915/gvt: Add the live migration support to VFIO mdev deivce - Intel vGPU

2017-06-26 Thread Yulei Zhang
This series RFC patches give a sample about how to enable the live migration on vfio mdev deivce with the new introduced vfio interface and vfio device status region. In order to fulfill the migration requirement we add the following modifications to the mdev device driver. 1. Add the guest to hos

[Qemu-devel] [Intel-gfx][RFC 4/9] drm/i915/gvt: Retrieve the guest gm base address from PVINFO

2017-06-26 Thread Yulei Zhang
As after migration the host gm base address will be changed due to resource re-allocation, in order to make sure the guest gm address doesn't change with that to retrieve the guest gm base address from PVINFO. Signed-off-by: Yulei Zhang --- drivers/gpu/drm/i915/gvt/cfg_space.c | 3 ++- drivers/

[Qemu-devel] [Intel-gfx][RFC 3/9] drm/i915/gvt: Adjust the gma parameter in gpu commands during command parser

2017-06-26 Thread Yulei Zhang
Adjust the gma parameter in gpu commands according to the shift offset in guests' aperture and hidden gm address, and patch the commands before submit to execute. Signed-off-by: Yulei Zhang --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 26 ++ 1 file changed, 18 insertions(+

[Qemu-devel] [Intel-gfx][RFC 9/9] drm/i915/gvt: Add support to VFIO region VFIO_PCI_DEVICE_STATE_REGION_INDEX

2017-06-26 Thread Yulei Zhang
Add new VFIO region VFIO_PCI_DEVICE_STATE_REGION_INDEX support in vGPU, through this new region it can fetch the status from mdev device for migration, on the target side it can retrieve the device status and reconfigure the device to continue running after resume the guest. Signed-off-by: Yulei Z

[Qemu-devel] [Intel-gfx][RFC 5/9] drm/i915/gvt: Align the guest gm aperture start offset for live migration

2017-06-26 Thread Yulei Zhang
As guest gm aperture region start offset is initialized when vGPU created, in order to make sure that start offset is remain the same after migration, align the aperture start offset to 0 for guest. Signed-off-by: Yulei Zhang --- drivers/gpu/drm/i915/gvt/kvmgt.c | 3 +-- drivers/gpu/drm/i915/gvt

[Qemu-devel] [Intel-gfx][RFC 7/9] drm/i915/gvt: Introduce new VFIO ioctl for device status control

2017-06-26 Thread Yulei Zhang
Add handling for new VFIO ioctl VFIO_DEVICE_PCI_STATUS_SET to control the status of mdev device vGPU. vGPU will stop/start rendering according to the command comes along with the ioctl. Signed-off-by: Yulei Zhang --- drivers/gpu/drm/i915/gvt/kvmgt.c | 9 + drivers/gpu/drm/i915/gvt/vgpu.

Re: [Qemu-devel] glue(glue(ld, USUFFIX), _p)

2017-06-26 Thread Peter Maydell
On 25 June 2017 at 22:51, Theodore Dubois wrote: > In include/exec/cpu_ldst_useronly_template.h, there’s > references to glue(glue(ld, USUFFIX), _p), which would > expand to a call to a function looking something like > uint32_t lduw_p(void *) (for example). Where is this > function defined? lduw

Re: [Qemu-devel] [PULL 00/15] Queued target/s390x patches

2017-06-26 Thread Peter Maydell
On 23 June 2017 at 17:22, Richard Henderson wrote: > There are more in the pipeline, but these are the ones that > have passed review. Let's flush before it becomes unwieldy. > > > r~ > > > The following changes since commit e18a639164e162b3a4f078ab60606cd2f163d934: > > Merge remote-tracking br

Re: [Qemu-devel] [PATCH v8 7/7] trace: [trivial] Statically enable all guest events

2017-06-26 Thread Lluís Vilanova
Daniel P Berrange writes: > On Thu, Jun 08, 2017 at 10:25:22PM -0400, Emilio G. Cota wrote: >> From: Lluís Vilanova >> >> The optimizations of this series makes it feasible to have them >> available on all builds. > I'm not saying you're wrong, but where is the data to backup this > assertion ?

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am currently working on optimizing speed for compressed QCOW2 images. We use them for templates and would also like to use them for backups,

Re: [Qemu-devel] [PATCH v8 7/7] trace: [trivial] Statically enable all guest events

2017-06-26 Thread Daniel P. Berrange
On Mon, Jun 26, 2017 at 12:18:14PM +0300, Lluís Vilanova wrote: > Daniel P Berrange writes: > > > On Thu, Jun 08, 2017 at 10:25:22PM -0400, Emilio G. Cota wrote: > >> From: Lluís Vilanova > >> > >> The optimizations of this series makes it feasible to have them > >> available on all builds. > >

Re: [Qemu-devel] [PATCH] Separate function types from opaque types in include/qemu/typedefs.h

2017-06-26 Thread Dr. David Alan Gilbert
* Greg Kurz (gr...@kaod.org) wrote: > On Thu, 22 Jun 2017 19:34:58 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > On 22 June 2017 at 19:08, Thomas Huth wrote: > > > > On 22.06.2017 19:50, Dr. David Alan Gilbert wrote: > > > >> Could do;

Re: [Qemu-devel] Tracing guest virtual addresses

2017-06-26 Thread Lluís Vilanova
Alex Bennée writes: > Lluís Vilanova writes: >> Alex Bennée writes: >> >>> Peter Maydell writes: >> On 20 June 2017 at 12:02, Lluís Vilanova wrote: > Jayanto Minocha writes: >> But that is only used to instrument the cpu_ld/cpu_st macros, which is >> only >> called in t

Re: [Qemu-devel] [PATCH v8 7/7] trace: [trivial] Statically enable all guest events

2017-06-26 Thread Laurent Desnogues
On Mon, Jun 26, 2017 at 11:18 AM, Lluís Vilanova wrote: > Daniel P Berrange writes: > >> On Thu, Jun 08, 2017 at 10:25:22PM -0400, Emilio G. Cota wrote: >>> From: Lluís Vilanova >>> >>> The optimizations of this series makes it feasible to have them >>> available on all builds. > >> I'm not sayin

Re: [Qemu-devel] Tracing guest virtual addresses

2017-06-26 Thread Peter Maydell
On 26 June 2017 at 10:26, Lluís Vilanova wrote: > There's two places where memory access tracing is triggered: > > * tcg_gen_qemu_ld/st_... > * ld/st templates (both softmmu and user) > > AFAIK, helpers use the ld/st templates to access guest memory. Mostly, but there are one or two special cases

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Denis V. Lunev
On 06/26/2017 12:20 PM, Peter Lieven wrote: > > Am 26.06.2017 um 10:28 schrieb Kevin Wolf: >> [ Cc: qemu-devel; don't post to qemu-block only! ] >> >> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: >>> Hi, >>> >>> I am currently working on optimizing speed for compressed QCOW2 >>> images. We

Re: [Qemu-devel] [PATCH v2 0/2] qobject coccinelle followups

2017-06-26 Thread Markus Armbruster
Eric Blake writes: > v1 was here: > https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg02589.html > > Since then: > - reorder the series > - add R-b on patch 1 You missed Max's. Adding it in my tree. > - patch 2 updated to catch recent introduction of longhand usage Applied to qapi-next

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 11:33 schrieb Denis V. Lunev: On 06/26/2017 12:20 PM, Peter Lieven wrote: Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am currently working on optimizing speed for com

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Kevin Wolf
Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: > >So he chose a different algorithm (zstd). When I asked, he posted a > >comparison of algorithms (however a generic one and not measured in the > >context of qemu) that suggests that LZO would be slightly faster, but > >have a considerable wors

[Qemu-devel] [PATCH] fixup! Pass generic CPUState to gen_intermediate_code()

2017-06-26 Thread Alex Bennée
--- target/hppa/translate.c | 5 ++--- target/nios2/translate.c| 5 ++--- target/openrisc/translate.c | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index e10abc5e04..900870cd5a 100644 --- a/target/hppa/translate.c

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Daniel P. Berrange
On Mon, Jun 26, 2017 at 11:20:33AM +0200, Peter Lieven wrote: > > Am 26.06.2017 um 10:28 schrieb Kevin Wolf: > > [ Cc: qemu-devel; don't post to qemu-block only! ] > > > > Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: > > > Hi, > > > > > > I am currently working on optimizing speed for co

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 11:57 schrieb Kevin Wolf: Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: So he chose a different algorithm (zstd). When I asked, he posted a comparison of algorithms (however a generic one and not measured in the context of qemu) that suggests that LZO would be slightly fa

Re: [Qemu-devel] [PATCH v10 09/20] qcow: convert QCow to use QCryptoBlock for encryption

2017-06-26 Thread Alberto Garcia
On Fri 23 Jun 2017 06:24:08 PM CEST, Daniel P. Berrange wrote: > This converts the qcow driver to make use of the QCryptoBlock > APIs for encrypting image content. This is only wired up to > permit use of the legacy QCow encryption format. Users who wish > to have the strong LUKS format should swit

[Qemu-devel] [PATCH] sockets: avoid formatting buffer that may not be NULL terminated

2017-06-26 Thread Daniel P. Berrange
The 'sun_path' field in the sockaddr_un struct is not required to be NULL termianted, so when reporting an error, we must use the separate 'path' variable which is guaranteed terminated. Fixes a bug spotted by coverity that was introduced in commit ad9579aaa16d5b385922d49edac2c96c79bcfb62 Aut

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Daniel P. Berrange
On Mon, Jun 26, 2017 at 12:08:01PM +0200, Peter Lieven wrote: > Am 26.06.2017 um 11:57 schrieb Kevin Wolf: > > Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: > > > > So he chose a different algorithm (zstd). When I asked, he posted a > > > > comparison of algorithms (however a generic one and

Re: [Qemu-devel] [PATCH v9 04/26] target: [tcg] Add generic translation framework

2017-06-26 Thread Alex Bennée
Lluís Vilanova writes: > Signed-off-by: Lluís Vilanova > --- > Makefile.target|1 > include/exec/gen-icount.h |2 > include/exec/translate-block.h | 125 +++ > include/qom/cpu.h | 22 + > translate-block.c |

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Denis V. Lunev
On 06/26/2017 01:04 PM, Daniel P. Berrange wrote: > On Mon, Jun 26, 2017 at 11:20:33AM +0200, Peter Lieven wrote: >> Am 26.06.2017 um 10:28 schrieb Kevin Wolf: >>> [ Cc: qemu-devel; don't post to qemu-block only! ] >>> >>> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Laszlo Ersek
On 06/26/17 11:33, Denis V. Lunev wrote: > On 06/26/2017 12:20 PM, Peter Lieven wrote: >> >> Am 26.06.2017 um 10:28 schrieb Kevin Wolf: >>> [ Cc: qemu-devel; don't post to qemu-block only! ] >>> >>> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am currently working on op

Re: [Qemu-devel] [PATCH] sockets: avoid formatting buffer that may not be NULL terminated

2017-06-26 Thread Thomas Huth
On 26.06.2017 12:11, Daniel P. Berrange wrote: > The 'sun_path' field in the sockaddr_un struct is not required > to be NULL termianted, so when reporting an error, we must use s/NULL/NUL/ NULL is a pointer, NUL is the '\0' character. > the separate 'path' variable which is guaranteed terminated

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 12:12 schrieb Daniel P. Berrange: On Mon, Jun 26, 2017 at 12:08:01PM +0200, Peter Lieven wrote: Am 26.06.2017 um 11:57 schrieb Kevin Wolf: Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: So he chose a different algorithm (zstd). When I asked, he posted a comparison of alg

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 12:15 schrieb Denis V. Lunev: On 06/26/2017 01:04 PM, Daniel P. Berrange wrote: On Mon, Jun 26, 2017 at 11:20:33AM +0200, Peter Lieven wrote: Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven

Re: [Qemu-devel] [PATCH v4 4/4] sockets: Handle race condition between binds to the same port

2017-06-26 Thread Daniel P. Berrange
On Fri, Jun 23, 2017 at 12:31:08PM +0200, Knut Omang wrote: > If an offset of ports is specified to the inet_listen_saddr function(), > and two or more processes tries to bind from these ports at the same time, > occasionally more than one process may be able to bind to the same > port. The conditi

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Denis V. Lunev
On 06/26/2017 01:16 PM, Laszlo Ersek wrote: > On 06/26/17 11:33, Denis V. Lunev wrote: >> On 06/26/2017 12:20 PM, Peter Lieven wrote: >>> Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben:

Re: [Qemu-devel] [PULL 00/61] Block layer patches

2017-06-26 Thread Peter Maydell
On 23 June 2017 at 17:20, Kevin Wolf wrote: > The following changes since commit 4c8c1cc544dbd5e2564868e61c5037258e393832: > > Merge remote-tracking branch > 'remotes/vivier/tags/m68k-for-2.10-pull-request' into staging (2017-06-22 > 19:01:58 +0100) > > are available in the git repository at:

Re: [Qemu-devel] [PULL 00/61] Block layer patches

2017-06-26 Thread Peter Maydell
On 26 June 2017 at 11:23, Peter Maydell wrote: > I also get a core dump in my linux-user smoke test: > /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/ppc-linux-user/qemu-ppc > -L ./gnemul/qemu-ppc ppc/ls -l dummyfile > qemu: uncaught target signal 11 (Segmentation fault) - core dumpe

[Qemu-devel] [PATCH] migration: add "return-path" capability

2017-06-26 Thread Peter Xu
When this capability is enabled, QEMU will use the return path even for precopy migration. This is helpful at least in one case when destination failed to load the image while source quited without confirmation. With return path, source will wait for the last response from destination, and if desti

Re: [Qemu-devel] [PATCH v4 2/4] sockets: factor out create_fast_reuse_socket

2017-06-26 Thread Daniel P. Berrange
On Fri, Jun 23, 2017 at 12:31:06PM +0200, Knut Omang wrote: > First refactoring step to prepare for fixing the problem > exposed with the test-listen test in the previous commit > > Signed-off-by: Knut Omang > --- > util/qemu-sockets.c | 24 +--- > 1 file changed, 17 insertio

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v3 1/2] virtio-net: enable configurable tx queue size

2017-06-26 Thread Wei Wang
On 06/26/2017 04:05 PM, Jason Wang wrote: On 2017年06月26日 12:55, Wei Wang wrote: On 06/26/2017 11:18 AM, Jason Wang wrote: On 2017年06月23日 10:32, Wei Wang wrote: This patch enables the virtio-net tx queue size to be configurable between 256 (the default queue size) and 1024 by the user when t

Re: [Qemu-devel] [PATCH v4 4/4] sockets: Handle race condition between binds to the same port

2017-06-26 Thread Daniel P. Berrange
On Fri, Jun 23, 2017 at 12:31:08PM +0200, Knut Omang wrote: > If an offset of ports is specified to the inet_listen_saddr function(), > and two or more processes tries to bind from these ports at the same time, > occasionally more than one process may be able to bind to the same > port. The conditi

[Qemu-devel] [PATCH v2] sockets: avoid formatting buffer that may not be NUL terminated

2017-06-26 Thread Daniel P. Berrange
The 'sun_path' field in the sockaddr_un struct is not required to be NUL termianted, so when reporting an error, we must use the separate 'path' variable which is guaranteed terminated. Fixes a bug spotted by coverity that was introduced in commit ad9579aaa16d5b385922d49edac2c96c79bcfb62 Auth

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 12:16 schrieb Laszlo Ersek: On 06/26/17 11:33, Denis V. Lunev wrote: On 06/26/2017 12:20 PM, Peter Lieven wrote: Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am curre

Re: [Qemu-devel] [PATCH v2] sockets: avoid formatting buffer that may not be NUL terminated

2017-06-26 Thread Peter Maydell
On 26 June 2017 at 11:37, Daniel P. Berrange wrote: > The 'sun_path' field in the sockaddr_un struct is not required > to be NUL termianted, so when reporting an error, we must use "terminated", but hopefully whoever applies the patch can fix the typo? > the separate 'path' variable which is gua

[Qemu-devel] [PATCH] mirror: fix the inconsistent AioContext problem in the backing BDSs during mirroring.

2017-06-26 Thread sochin.jiang
From: "sochin.jiang" mirror_complete opens the backings, BDSs of the new open backings should have a same AioContext with the top when using iothreads, fix the code to guarantee this, also avoiding unexpected qemu exit(assert fails in bdrv_attach_child). Signed-off-by: sochin.jiang --- blo

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Daniel P. Berrange
On Mon, Jun 26, 2017 at 10:28:38AM +0200, Kevin Wolf wrote: > [ Cc: qemu-devel; don't post to qemu-block only! ] > > Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: > > Hi, > > > > I am currently working on optimizing speed for compressed QCOW2 > > images. We use them for templates and would

Re: [Qemu-devel] [PATCH v4 2/7] Move CONFIG_KVM related definitions to kvm_i386.h

2017-06-26 Thread Philippe Mathieu-Daudé
On 06/26/2017 02:22 AM, Thomas Huth wrote: pc.h and sysemu/kvm.h are also included from common code (where CONFIG_KVM is not available), so the #defines that depend on CONFIG_KVM should not be declared here to avoid that anybody is using them in a wrong way. Since we're also going to poison CONFI

Re: [Qemu-devel] [PATCH v4 6/7] Makefile: Move bootdevice.o to common-obj-y

2017-06-26 Thread Philippe Mathieu-Daudé
On 06/26/2017 02:22 AM, Thomas Huth wrote: There does not seem to be any target specific code in this file, so we can put it into "common-obj" instead of "obj" to compile it only once for all targets. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- Makefile.objs | 2

Re: [Qemu-devel] [PATCH v4 7/7] hw/misc/edu: Compile the edu device as common object

2017-06-26 Thread Philippe Mathieu-Daudé
On 06/26/2017 02:22 AM, Thomas Huth wrote: edu.c does not contain any target-specific code, so we can put it into common-obj-y to compile it only once for all targets. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/Makefile.objs | 2 +- 1 file changed, 1 inse

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Kevin Wolf
Am 26.06.2017 um 12:08 hat Peter Lieven geschrieben: > Am 26.06.2017 um 11:57 schrieb Kevin Wolf: > >Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: > >>>So he chose a different algorithm (zstd). When I asked, he posted a > >>>comparison of algorithms (however a generic one and not measured in

[Qemu-devel] [PATCH] maybe fixup! target: [tcg] Redefine DISAS_* onto the generic translation framework (DJ_*)

2017-06-26 Thread Alex Bennée
Arguably these should be applied to nios2 before these changes. Signed-off-by: Alex Bennée --- target/nios2/cpu.h | 2 -- target/nios2/op_helper.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 13931f3f0b..b6a97c131e 10064

Re: [Qemu-devel] [PATCH v9 21/26] target: [tcg, arm] Port to insn_start

2017-06-26 Thread Alex Bennée
Lluís Vilanova writes: > Incrementally paves the way towards using the generic instruction translation > loop. > > Signed-off-by: Lluís Vilanova > --- > target/arm/translate-a64.c | 11 +-- > target/arm/translate.c | 36 +--- > 2 files changed, 3

Re: [Qemu-devel] [RFC PATCH v9 00/26] translate: [tcg] Generic translation framework

2017-06-26 Thread Alex Bennée
Lluís Vilanova writes: > This series proposes a generic (target-agnostic) instruction translation > framework. > > It basically provides a generic main loop for instruction disassembly, which > calls target-specific functions when necessary. This generalization makes > inserting new code in the

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 13:21 schrieb Kevin Wolf: Am 26.06.2017 um 12:08 hat Peter Lieven geschrieben: Am 26.06.2017 um 11:57 schrieb Kevin Wolf: Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: So he chose a different algorithm (zstd). When I asked, he posted a comparison of algorithms (however

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Richard W.M. Jones
On Mon, Jun 26, 2017 at 12:12:05PM +0100, Daniel P. Berrange wrote: > On Mon, Jun 26, 2017 at 10:28:38AM +0200, Kevin Wolf wrote: > > [ Cc: qemu-devel; don't post to qemu-block only! ] > > > > Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: > > > Hi, > > > > > > I am currently working on opt

Re: [Qemu-devel] [PATCH v4 2/4] sockets: factor out create_fast_reuse_socket

2017-06-26 Thread Knut Omang
On Mon, 2017-06-26 at 11:28 +0100, Daniel P. Berrange wrote: > On Fri, Jun 23, 2017 at 12:31:06PM +0200, Knut Omang wrote: > > First refactoring step to prepare for fixing the problem > > exposed with the test-listen test in the previous commit > >  > > Signed-off-by: Knut Omang > > --- > >  util/

Re: [Qemu-devel] [PATCH v4 2/4] sockets: factor out create_fast_reuse_socket

2017-06-26 Thread Daniel P. Berrange
On Mon, Jun 26, 2017 at 01:56:28PM +0200, Knut Omang wrote: > On Mon, 2017-06-26 at 11:28 +0100, Daniel P. Berrange wrote: > > On Fri, Jun 23, 2017 at 12:31:06PM +0200, Knut Omang wrote: > > > First refactoring step to prepare for fixing the problem > > > exposed with the test-listen test in the pr

Re: [Qemu-devel] Tracing guest virtual addresses

2017-06-26 Thread Lluís Vilanova
Peter Maydell writes: > On 26 June 2017 at 10:26, Lluís Vilanova wrote: >> There's two places where memory access tracing is triggered: >> >> * tcg_gen_qemu_ld/st_... >> * ld/st templates (both softmmu and user) >> >> AFAIK, helpers use the ld/st templates to access guest memory. > Mostly, but

Re: [Qemu-devel] Tracing guest virtual addresses

2017-06-26 Thread Peter Maydell
On 26 June 2017 at 13:04, Lluís Vilanova wrote: > Peter Maydell writes: > >> On 26 June 2017 at 10:26, Lluís Vilanova wrote: >>> There's two places where memory access tracing is triggered: >>> >>> * tcg_gen_qemu_ld/st_... >>> * ld/st templates (both softmmu and user) >>> >>> AFAIK, helpers use t

Re: [Qemu-devel] [PATCH 0/2] slirp: handle errors in sosendoob()

2017-06-26 Thread Peter Maydell
Ping for review? thanks -- PMM On 5 June 2017 at 17:19, Peter Maydell wrote: > At the moment the slirp sosendoob() function doesn't properly > handle errors from slirp_send(), and its callers don't do > anything with its return value either. (Coverity spots the > latter as CID 1005633.) > > This

Re: [Qemu-devel] [PATCH v5 1/1] qemu-ga: add guest-get-osinfo command

2017-06-26 Thread Marc-André Lureau
Hi Looks good overall, On Wed, Jun 7, 2017 at 2:02 PM Tomáš Golembiovský wrote: > Add a new 'guest-get-osinfo' command for reporting basic information of > the guest operating system. This includes machine architecture, > version and release of the kernel and several fields from os-release > fi

Re: [Qemu-devel] [PATCH v5 0/1] qemu-ga: add guest-get-osinfo command

2017-06-26 Thread Marc-André Lureau
Hi On Wed, Jun 7, 2017 at 2:02 PM Tomáš Golembiovský wrote: > v5: > - fixed build failure with older glib > - fixed coding style issues > - fixed one log string > > This is a continuation of the work started by Vinzenz Feenstra in the > threads: > > https://lists.nongnu.org/archive/html/qemu-dev

Re: [Qemu-devel] [PATCH v4 4/4] sockets: Handle race condition between binds to the same port

2017-06-26 Thread Knut Omang
On Mon, 2017-06-26 at 11:22 +0100, Daniel P. Berrange wrote: > On Fri, Jun 23, 2017 at 12:31:08PM +0200, Knut Omang wrote: > > If an offset of ports is specified to the inet_listen_saddr function(), > > and two or more processes tries to bind from these ports at the same time, > > occasionally more

Re: [Qemu-devel] [PATCH v6 2/6] queue: Add macro for incremental traversal

2017-06-26 Thread Lluís Vilanova
Richard Henderson writes: > On 06/12/2017 07:54 AM, Lluís Vilanova wrote: >> Adds macro QTAILQ_FOREACH_CONTINUE to support incremental list >> traversal. >> >> Signed-off-by: Lluís Vilanova >> --- >> include/qemu/queue.h | 12 >> 1 file changed, 12 insertions(+) >> >> diff --git a

[Qemu-devel] [PATCH v6 1/5] iotests: skip 159 & 170 with luks format

2017-06-26 Thread Daniel P. Berrange
While the qemu-img dd command does accept --image-opts this is not sufficient to make it work with the LUKS image yet. This is because bdrv_create() still always requires the non-image-opts syntax. Thus we must skip 159/170 with luks for now Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed

[Qemu-devel] [PATCH v6 3/5] iotests: reduce PBKDF iterations when testing LUKS

2017-06-26 Thread Daniel P. Berrange
By default the PBKDF algorithm used with LUKS is tuned based on the number of iterations to produce 1 second of running time. This makes running the I/O test with the LUKS format orders of magnitude slower than with qcow2/raw formats. When creating LUKS images, set the iteration time to a 10ms to

[Qemu-devel] [PATCH v6 0/5] Improve I/O tests coverage of LUKS driver

2017-06-26 Thread Daniel P. Berrange
The main goal of this series is to get the I/O tests passing 100% with LUKS when run with './check -luks'. It also adds a few more combinations to the LUKS/dmcrypt interoperability test. To make LUKS testing not quite as slow, we drop the PBKDF iteration count down to a very small value. This does

[Qemu-devel] [PATCH v6 2/5] iotests: fix remainining tests to work with LUKS

2017-06-26 Thread Daniel P. Berrange
The tests 033, 140, 145 and 157 were all broken when run with LUKS, since they did not correctly use the required image opts args syntax to specify the decryption secret. Further, the 120 test simply does not make sense to run with luks, as the scenario exercised is not relevant. The test 181 was

[Qemu-devel] [PATCH v6 4/5] iotests: add more LUKS hash combination tests

2017-06-26 Thread Daniel P. Berrange
Add tests for sha224, sha512, sha384 and ripemd160 hash algorithms. Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- tests/qemu-iotests/149 | 10 +- tests/qemu-iotests/149.out | 482 - 2 files changed, 484 ins

[Qemu-devel] [PATCH v6 5/5] iotests: chown LUKS device before qemu-io launches

2017-06-26 Thread Daniel P. Berrange
On some distros, whenever you close a block device file descriptor there is a udev rule that resets the file permissions. This can race with the test script when we run qemu-io multiple times against the same block device. Occasionally the second qemu-io invocation will find udev has reset the perm

Re: [Qemu-devel] [PATCH] fixup! Pass generic CPUState to gen_intermediate_code()

2017-06-26 Thread Lluís Vilanova
Alex Bennée writes: > --- > target/hppa/translate.c | 5 ++--- > target/nios2/translate.c| 5 ++--- > target/openrisc/translate.c | 3 +-- > 3 files changed, 5 insertions(+), 8 deletions(-) I rebased the patches and forgot to test the compilation of other architectures. Sorry about that.

Re: [Qemu-devel] [PATCH v4 4/4] sockets: Handle race condition between binds to the same port

2017-06-26 Thread Daniel P. Berrange
On Mon, Jun 26, 2017 at 02:32:48PM +0200, Knut Omang wrote: > On Mon, 2017-06-26 at 11:22 +0100, Daniel P. Berrange wrote: > > On Fri, Jun 23, 2017 at 12:31:08PM +0200, Knut Omang wrote: > > > If an offset of ports is specified to the inet_listen_saddr function(), > > > and two or more processes tr

Re: [Qemu-devel] [PULL 00/61] Block layer patches

2017-06-26 Thread Kevin Wolf
Am 26.06.2017 um 12:23 hat Peter Maydell geschrieben: > On 23 June 2017 at 17:20, Kevin Wolf wrote: > > The following changes since commit 4c8c1cc544dbd5e2564868e61c5037258e393832: > > > > Merge remote-tracking branch > > 'remotes/vivier/tags/m68k-for-2.10-pull-request' into staging (2017-06-22

Re: [Qemu-devel] [PATCH v9 04/26] target: [tcg] Add generic translation framework

2017-06-26 Thread Lluís Vilanova
Alex Bennée writes: > Lluís Vilanova writes: >> Signed-off-by: Lluís Vilanova >> --- >> Makefile.target|1 >> include/exec/gen-icount.h |2 >> include/exec/translate-block.h | 125 +++ >> include/qom/cpu.h | 22 + >> translate

Re: [Qemu-devel] NVDIMM live migration broken?

2017-06-26 Thread Stefan Hajnoczi
On Mon, Jun 26, 2017 at 10:05:01AM +0800, Haozhong Zhang wrote: > On 06/23/17 10:55 +0100, Stefan Hajnoczi wrote: > > On Fri, Jun 23, 2017 at 08:13:13AM +0800, haozhong.zh...@intel.com wrote: > > > On 06/22/17 15:08 +0100, Stefan Hajnoczi wrote: > > > > I tried live migrating a guest with NVDIMM on

Re: [Qemu-devel] [PATCH] trace: Fix early setting of events with the "vcpu" property

2017-06-26 Thread Stefan Hajnoczi
On Sun, Jun 25, 2017 at 02:08:38PM +0300, Lluís Vilanova wrote: > Events with the "vcpu" property need to be set globally (i.e., as if they > didn't > have that property) while we have not yet created any vCPU. > > Signed-off-by: Lluís Vilanova > --- > trace/control-target.c | 10 +++--- >

Re: [Qemu-devel] [RFC PATCH v9 00/26] translate: [tcg] Generic translation framework

2017-06-26 Thread Lluís Vilanova
Alex Bennée writes: > Lluís Vilanova writes: >> This series proposes a generic (target-agnostic) instruction translation >> framework. >> >> It basically provides a generic main loop for instruction disassembly, which >> calls target-specific functions when necessary. This generalization makes

[Qemu-devel] [PULL v2 00/60] Block layer patches

2017-06-26 Thread Kevin Wolf
The following changes since commit 931892e8a691a8a4151cc5fe1e13c14294bb28fb: Merge remote-tracking branch 'remotes/rth/tags/pull-s390-20170623' into staging (2017-06-23 18:11:48 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fet

Re: [Qemu-devel] [PATCH v10 07/20] block: deprecate "encryption=on" in favor of "encrypt.format=aes"

2017-06-26 Thread Alberto Garcia
On Fri 23 Jun 2017 06:24:06 PM CEST, Daniel P. Berrange wrote: > Historically the qcow & qcow2 image formats supported a property > "encryption=on" to enable their built-in AES encryption. We'll > soon be supporting LUKS for qcow2, so need a more general purpose > way to enable encryption, with a c

Re: [Qemu-devel] [Qemu-block] [PATCH RFC v3 1/8] block: move ThrottleGroup membership to ThrottleGroupMember

2017-06-26 Thread Stefan Hajnoczi
On Fri, Jun 23, 2017 at 03:46:53PM +0300, Manos Pitsidianakis wrote: > This commit gathers ThrottleGroup membership details from > BlockBackendPublic into ThrottleGroupMember and refactors existing code > to use the structure. This summarizes the code change but doesn't explain why it's necessary.

  1   2   3   >