Re: [Qemu-devel] [PATCH V2] add migration capability to bypass the shared memory

2016-08-11 Thread Li, Liang Z
> >> > BTW. Is it possible to bypass the shared block in the > >> 'ram_find_and_save_block'? > >> > I mean no to check if a page is dirty for a shared block, it may > >> > make things > >> faster. > >> > >> Nice spotted. That would make things faster. But once there we > >> could split the bitmap

Re: [Qemu-devel] [PULL 3/3] vhost-user: Attempt to fix a race with set_mem_table.

2016-08-11 Thread Fam Zheng
On Wed, 08/10 18:30, Michael S. Tsirkin wrote: > From: Prerna Saxena > > The set_mem_table command currently does not seek a reply. Hence, there is > no easy way for a remote application to notify to QEMU when it finished > setting up memory, or if there were errors doing so. > > As an example:

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-11 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Tue, Aug 09, 2016 at 02:47:46PM +0530, Nikunj A Dadhania wrote: >> Nikunj A Dadhania writes: >> >> > David Gibson writes: >> > >> >> [ Unknown signature status ] >> >> On Mon, Aug 08, 2016 at 07:33:37AM +1000, Benjamin Herrenschmidt wrot

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-11 Thread David Gibson
On Tue, Aug 09, 2016 at 02:47:46PM +0530, Nikunj A Dadhania wrote: > Nikunj A Dadhania writes: > > > David Gibson writes: > > > >> [ Unknown signature status ] > >> On Mon, Aug 08, 2016 at 07:33:37AM +1000, Benjamin Herrenschmidt wrote: > >>> On Sun, 2016-08-07 at 23:06 +0530, Nikunj A Dadhania

Re: [Qemu-devel] [PATCH v5 1/9] util: Add UUID API

2016-08-11 Thread Fam Zheng
On Fri, 08/12 07:24, Richard Henderson wrote: > On 08/12/2016 05:52 AM, Fam Zheng wrote: > >+/* Version 4 UUID (pseudo random numbers), RFC4122 4.4. */ > >+ > >+typedef struct { > >+union { > >+unsigned char data[16]; > >+struct { > >+/* Generated in BE endian, can b

Re: [Qemu-devel] [PATCH v5 1/9] util: Add UUID API

2016-08-11 Thread Richard Henderson
On 08/12/2016 05:52 AM, Fam Zheng wrote: +/* Version 4 UUID (pseudo random numbers), RFC4122 4.4. */ + +typedef struct { +union { +unsigned char data[16]; +struct { +/* Generated in BE endian, can be swapped with qemu_uuid_bswap. */ Nit: BE endian is redundant.

Re: [Qemu-devel] [PATCH v4 1/9] util: Add UUID API

2016-08-11 Thread Richard Henderson
On 08/12/2016 03:01 AM, Fam Zheng wrote: On Thu, 08/11 23:21, Richard Henderson wrote: On 08/11/2016 05:50 AM, Fam Zheng wrote: +void qemu_uuid_bswap(QemuUUID *uuid) +{ +bswap32s((uint32_t *)&uuid->data[0]); +bswap16s((uint16_t *)&uuid->data[4]); +bswap16s((uint16_t *)&uuid->data[6]

Re: [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8

2016-08-11 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1470977536-18209-1-git-send-email-f...@redhat.com Subject: [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Type

[Qemu-devel] [PATCH v5 8/9] vl: Switch qemu_uuid to QemuUUID

2016-08-11 Thread Fam Zheng
Update all qemu_uuid users as well, especially get rid of the duplicated low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API. Since qemu_uuid_parse is quite tangled with qemu_uuid, it's switching to QemuUUID is done here too to keep everything in sync and avoid code churn. Sig

[Qemu-devel] [Bug 638955] Re: emulated netcards don't work with recent sunos kernel

2016-08-11 Thread T. Huth
Based on comment #30, it sounds like the original problem of this bug has been fixed, and since the remaining apic-related problem is tracked in ticket #1395217 already, I think we can close this bug now (if you don't agree, feel free to open this ticket again). ** Changed in: qemu Status:

Re: [Qemu-devel] [PATCH v1 01/10] target-ppc: add xxspltib instruction

2016-08-11 Thread Nikunj A Dadhania
Richard Henderson writes: > On 08/10/2016 08:00 PM, Nikunj A Dadhania wrote: >> +#if defined(TARGET_PPC64) >> +#define pattern(x) (((x) & 0xff) * (~(target_ulong)0 / 0xff)) >> + >> +static void gen_xxspltib(DisasContext *ctx) > ... >> +tcg_gen_movi_i64(cpu_vsrh(xT(ctx->opcode)), pattern(uim8)

[Qemu-devel] [PATCH v5 6/9] tests: No longer dependent on CONFIG_UUID

2016-08-11 Thread Fam Zheng
crypto now uses built-in uuid implementation, so this check is not needed. Signed-off-by: Fam Zheng --- tests/test-crypto-block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-crypto-block.c b/tests/test-crypto-block.c index a38110d..1957a86 100644 --- a/tests/te

[Qemu-devel] [PATCH v5 9/9] tests: Add uuid tests

2016-08-11 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile.include | 2 + tests/test-uuid.c | 173 + 2 files changed, 175 insertions(+) create mode 100644 tests/test-uuid.c diff --git a/tests/Makefile.include b/tests/Makefile.include index 14be491..aa4f83

[Qemu-devel] [PATCH v5 7/9] configure: Remove detection code for UUID

2016-08-11 Thread Fam Zheng
All code now uses built-in UUID implementation. Remove the code of libuuid and make --enable-uuid and --disable-uuid only print a message. Signed-off-by: Fam Zheng --- configure | 43 --- 1 file changed, 4 insertions(+), 39 deletions(-) diff --git a/confi

[Qemu-devel] [PATCH v5 2/9] vhdx: Use QEMU UUID API

2016-08-11 Thread Fam Zheng
This removes our dependency to libuuid, so that the driver can always be built. Similar to how we handled data plane configure options, --enable-vhdx and --disable-vhdx are also changed to a nop with a message saying it's obsolete. Signed-off-by: Fam Zheng --- block/Makefile.objs | 2 +- block

[Qemu-devel] [PATCH v5 3/9] vdi: Use QEMU UUID API

2016-08-11 Thread Fam Zheng
The UUID operations we need from libuuid is fully supported by QEMU UUID implementation. Use it, and remove the unused code. Signed-off-by: Fam Zheng --- block/vdi.c | 73 ++--- 1 file changed, 17 insertions(+), 56 deletions(-) diff --git

[Qemu-devel] [PATCH v5 5/9] crypto: Switch to QEMU UUID API

2016-08-11 Thread Fam Zheng
The uuid generation doesn't return error, so update the function signature and calling code accordingly. Signed-off-by: Fam Zheng --- crypto/block-luks.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c inde

[Qemu-devel] [PATCH v5 1/9] util: Add UUID API

2016-08-11 Thread Fam Zheng
A number of different places across the code base use CONFIG_UUID. Some of them are soft dependency, some are not built if libuuid is not available, some come with dummy fallback, some throws runtime error. It is hard to maintain, and hard to reason for users. Since UUID is a simple standard with

[Qemu-devel] [PATCH v5 4/9] vpc: Use QEMU UUID API

2016-08-11 Thread Fam Zheng
Previously we conditionally generated footer->uuid, when libuuid was available. Now that we have a built-in implementation, we can switch to it. Signed-off-by: Fam Zheng --- block/vpc.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index

Re: [Qemu-devel] [PATCH v1 02/10] target-ppc: consolidate load operations

2016-08-11 Thread Nikunj A Dadhania
Richard Henderson writes: > On 08/10/2016 08:00 PM, Nikunj A Dadhania wrote: >> +#define GEN_QEMU_LOAD_64(ldop, op) \ >> +static void glue(gen_qemu_, glue(ldop, _i64))(DisasContext *ctx,\ >> + TCGv_i64 val,

[Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8

2016-08-11 Thread Fam Zheng
v5: Add union fields in QemuUUID to help the alignment necessary for bswap, and assert. [Richard] Update the test case initializer syntax accordingly. v4: Use memcpy instead of pointer type cast. [Richard] Keep parameter order consistent with libuuid. [Jeff] qemu_uuid_convert -> qe

Re: [Qemu-devel] [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT revision changes

2016-08-11 Thread Michael S. Tsirkin
On Fri, Aug 12, 2016 at 12:47:04AM +, Zheng, Lv wrote: > Hi, Igor > > Thanks for the review. > > > From: Igor Mammedov [mailto:imamm...@redhat.com] > > Subject: Re: [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT > > revision changes > > > > On Thu, 11 Aug 2016 17:36:45 +0800 > > Lv

Re: [Qemu-devel] [PATCH v4 1/9] util: Add UUID API

2016-08-11 Thread Fam Zheng
On Thu, 08/11 23:21, Richard Henderson wrote: > On 08/11/2016 05:50 AM, Fam Zheng wrote: > >+void qemu_uuid_bswap(QemuUUID *uuid) > >+{ > >+bswap32s((uint32_t *)&uuid->data[0]); > >+bswap16s((uint16_t *)&uuid->data[4]); > >+bswap16s((uint16_t *)&uuid->data[6]); > >+} > > You have align

Re: [Qemu-devel] [PATCH v2] virtio-net: allow increasing rx queue size

2016-08-11 Thread Jason Wang
On 2016年08月11日 19:48, Cornelia Huck wrote: On Wed, 10 Aug 2016 17:47:16 +0300 "Michael S. Tsirkin" wrote: This allows increasing the rx queue size up to 1024: unlike with tx, guests don't put in huge S/G lists into RX so the risk of running into the max 1024 limitation due to some off-by-one

Re: [Qemu-devel] [PATCH for-2.8] dmg: Move the driver to block-obj-y

2016-08-11 Thread Fam Zheng
On Thu, 08/11 10:46, Fam Zheng wrote: > If you apply this patch with the above two issues fixed, I'll send another > patch to fix the last cast? Is that okay? If we want to apply Corlin's series for dynamic loading, I'll need to rebase anyway. Let's discuss or proceed in his other thread. Fam

Re: [Qemu-devel] [PATCH v7 3/4] blockdev: Add dynamic module loading for block drivers

2016-08-11 Thread Fam Zheng
On Thu, 08/11 12:03, Colin Lord wrote: > On 08/10/2016 11:23 PM, Fam Zheng wrote: > > On Wed, 08/10 21:06, Max Reitz wrote: > >> On 10.08.2016 21:04, Colin Lord wrote: > >>> On 08/10/2016 02:37 PM, Max Reitz wrote: > On 08.08.2016 20:07, Colin Lord wrote: > > From: Marc Mari > > > >>>

Re: [Qemu-devel] [PATCH for 2.7] ppc: parse cpu features once

2016-08-11 Thread David Gibson
On Wed, Aug 10, 2016 at 09:08:01PM +0200, Cédric Le Goater wrote: > From: Greg Kurz > > Considering that features are converted to global properties and > global properties are automatically applied to every new instance > of created CPU (at object_new() time), there is no point in > parsing cpu_

Re: [Qemu-devel] [QUESTION]stuck in SeaBIOS and vm cannot be reset any more

2016-08-11 Thread Xulei (Stone)
> On 11/08/2016 04:13, Xulei (Stone) wrote: > > Following your suggestion, I found this problem may be caused by the > > flag of HF_SMM_MASK. I'm now sure QEMU is sending the KVM_SMI ioctl, > > and kmod already handles this ioctl. > > > > I add printk in inject_pending_event(), like this: > > > > /

Re: [Qemu-devel] [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT revision changes

2016-08-11 Thread Zheng, Lv
Hi, Igor Thanks for the review. > From: Igor Mammedov [mailto:imamm...@redhat.com] > Subject: Re: [PATCH v5 2/2] ACPI: Add -acpitable fadt= to allow FADT > revision changes > > On Thu, 11 Aug 2016 17:36:45 +0800 > Lv Zheng wrote: > > > This patch allows FADT to be built with different revision

[Qemu-devel] [Bug 1490611] Re: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding to the result file, which Microsoft Azure rejects as invalid

2016-08-11 Thread Brian Murray
It looks like there was a regression caused by that security update see bug 1612089. It might be best to coordinate with the security team, if they are doing a regular SRU, regarding the the fix for this bug. -- You received this bug notification because you are a member of qemu- devel-ml, which

Re: [Qemu-devel] [PATCH v1 02/10] target-ppc: consolidate load operations

2016-08-11 Thread Richard Henderson
On 08/10/2016 08:00 PM, Nikunj A Dadhania wrote: +#define GEN_QEMU_LOAD_64(ldop, op) \ +static void glue(gen_qemu_, glue(ldop, _i64))(DisasContext *ctx,\ + TCGv_i64 val, \ +

Re: [Qemu-devel] [PATCH v1 01/10] target-ppc: add xxspltib instruction

2016-08-11 Thread Richard Henderson
On 08/10/2016 08:00 PM, Nikunj A Dadhania wrote: +#if defined(TARGET_PPC64) +#define pattern(x) (((x) & 0xff) * (~(target_ulong)0 / 0xff)) + +static void gen_xxspltib(DisasContext *ctx) ... +tcg_gen_movi_i64(cpu_vsrh(xT(ctx->opcode)), pattern(uim8)); Is this function really not available

Re: [Qemu-devel] [PATCH v4 1/9] util: Add UUID API

2016-08-11 Thread Richard Henderson
On 08/11/2016 05:50 AM, Fam Zheng wrote: +void qemu_uuid_bswap(QemuUUID *uuid) +{ +bswap32s((uint32_t *)&uuid->data[0]); +bswap16s((uint16_t *)&uuid->data[4]); +bswap16s((uint16_t *)&uuid->data[6]); +} You have alignment problems here too. Perhaps you really did want to add uint32

Re: [Qemu-devel] [PATCH] xen: handle inbound migration of VMs without ioreq server pages

2016-08-11 Thread Stefano Stabellini
On Tue, 9 Aug 2016, Paul Durrant wrote: > > -Original Message- > > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > > Sent: 09 August 2016 16:19 > > To: Paul Durrant > > Cc: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org; Stefano > > Stabellini > > Subject: Re: [PATCH] xen:

Re: [Qemu-devel] [PATCH] Xen: fix converity warning of xen_pt_config_init()

2016-08-11 Thread Stefano Stabellini
Well spotted, thanks Peter! It looks OK and has passed my tests, I'll send it in the next pull request. On Thu, 11 Aug 2016, Peter Maydell wrote: > Hi Stefano -- just a ping on this patch from January -- I have a feeling > it maybe got lost in your change of email address? > > (I noticed looking

[Qemu-devel] [PATCH] Fix memory leak in ide_register_restart_cb()

2016-08-11 Thread Ashijeet Acharya
Introduce VMChangeStateEntry parameter in ide_register_restart_cb() to handle possible memory leak from qemu_add_vm_change_state_handler(). Signed-off-by: Ashijeet Acharya --- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/core.c | 4 ++-- hw/ide/isa.c

Re: [Qemu-devel] [PATCH v6 2/4] vfio: VFIO driver for mediated PCI device

2016-08-11 Thread Alex Williamson
On Thu, 11 Aug 2016 23:16:06 +0530 Kirti Wankhede wrote: > On 8/11/2016 9:54 PM, Alex Williamson wrote: > > On Thu, 11 Aug 2016 21:29:35 +0530 > > Kirti Wankhede wrote: > > > >> On 8/11/2016 4:30 AM, Alex Williamson wrote: > >>> On Thu, 11 Aug 2016 02:53:10 +0530 > >>> Kirti Wankhede wrote

Re: [Qemu-devel] [PATCH] Xen: fix converity warning of xen_pt_config_init()

2016-08-11 Thread Peter Maydell
Hi Stefano -- just a ping on this patch from January -- I have a feeling it maybe got lost in your change of email address? (I noticed looking through coverity reports that this one was unfixed and found Cao Jin's patch in the list archive.) thanks -- PMM On 25 January 2016 at 12:16, Cao jin w

[Qemu-devel] [PATCH for-2.7] linux-user: Fix llseek with high bit of offset_low set

2016-08-11 Thread Peter Maydell
The llseek syscall takes two 32-bit arguments, offset_high and offset_low, which must be combined to form a single 64-bit offset. Unfortunately we were combining them with (uint64_t)arg2 << 32) | arg3 and arg3 is a signed type; this meant that when promoting arg3 to a 64-bit type it would be sig

Re: [Qemu-devel] [PULL 2.7 0/4] migration: fixes

2016-08-11 Thread Peter Maydell
On 11 August 2016 at 12:39, Amit Shah wrote: > The following changes since commit d08306dc42ea599ffcf8aad056fa9c23acfbe230: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2016-08-10 17:14:35 +0100) > > are available in the git repository at: > > http://git.ke

Re: [Qemu-devel] [PATCH v6 2/4] vfio: VFIO driver for mediated PCI device

2016-08-11 Thread Kirti Wankhede
On 8/11/2016 9:54 PM, Alex Williamson wrote: > On Thu, 11 Aug 2016 21:29:35 +0530 > Kirti Wankhede wrote: > >> On 8/11/2016 4:30 AM, Alex Williamson wrote: >>> On Thu, 11 Aug 2016 02:53:10 +0530 >>> Kirti Wankhede wrote: >>> On 8/10/2016 12:30 AM, Alex Williamson wrote: > On Thu,

Re: [Qemu-devel] [RFC v4 00/28] Base enabling patches for MTTCG

2016-08-11 Thread Alex Bennée
Alex Bennée writes: > This is the fourth iteration of the RFC patch set which aims to > provide the basic framework for MTTCG. I hope this will provide a good > base for discussion at KVM Forum later this month. > > > In practice the memory barrier problems don't show up with an x86 > host. In

Re: [Qemu-devel] lseek beyond 2GB offset for qemu-arm user

2016-08-11 Thread Peter Maydell
On 11 August 2016 at 17:06, Chanho Park wrote: > Hi, > > When I executed below source in qemu-arm user binary, It was failed > with Invalid Argument. > > gcc lseek_test.c -o lseek_test -D_FILE_OFFSET_BITS=64 > ./lseek_test > error: Invalid argument > > It seems the qemu-arm user does not support t

Re: [Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Lluís Vilanova
Daniel P Berrange writes: > On Thu, Aug 11, 2016 at 06:41:36PM +0200, Lluís Vilanova wrote: >> Daniel P Berrange writes: >> >> > On Thu, Aug 11, 2016 at 06:11:29PM +0200, Lluís Vilanova wrote: >> >> An explicit if/else is clearer than arithmetic assuming #true is 1, >> >> while the compiler shoul

Re: [Qemu-devel] [PATCH v2 02/27] atomics: add atomic_op_fetch variants

2016-08-11 Thread Alex Bennée
Richard Henderson writes: > From: "Emilio G. Cota" > > This paves the way for upcoming work. > > Signed-off-by: Emilio G. Cota > Message-Id: <1467054136-10430-9-git-send-email-c...@braap.org> Reviewed-by: Alex Bennée > --- > include/qemu/atomic.h | 17 + > 1 file changed, 17

Re: [Qemu-devel] [PATCH v2 01/27] atomics: add atomic_xor

2016-08-11 Thread Alex Bennée
Richard Henderson writes: > From: "Emilio G. Cota" > > This paves the way for upcoming work. > > Signed-off-by: Emilio G. Cota > Message-Id: <1467054136-10430-8-git-send-email-c...@braap.org> Reviewed-by: Alex Bennée > --- > include/qemu/atomic.h | 4 > 1 file changed, 4 insertions(+)

Re: [Qemu-devel] [PATCH v2 for-2.7] Update ancient copyright string in -version output

2016-08-11 Thread Peter Maydell
On 4 August 2016 at 12:14, Peter Maydell wrote: > Currently the -version command line argument prints a string ending > with "Copyright (c) 2003-2008 Fabrice Bellard". This is now some > eight years out of date; abstract it out of the several places that > print the string and update it to: > > C

Re: [Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 06:41:36PM +0200, Lluís Vilanova wrote: > Daniel P Berrange writes: > > > On Thu, Aug 11, 2016 at 06:11:29PM +0200, Lluís Vilanova wrote: > >> An explicit if/else is clearer than arithmetic assuming #true is 1, > >> while the compiler should be able to generate just as opti

Re: [Qemu-devel] [RFC v4 00/28] Base enabling patches for MTTCG

2016-08-11 Thread G 3
On Aug 11, 2016, at 11:24 AM, qemu-devel-requ...@nongnu.org wrote: Performance === You can't do full work-load testing on this tree due to the lack of atomic support (but I will run some numbers on mttcg/base-patches-v4-with-cmpxchg-atomics-v2). However you certainly see a run time imp

Re: [Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Lluís Vilanova
Daniel P Berrange writes: > On Thu, Aug 11, 2016 at 06:11:29PM +0200, Lluís Vilanova wrote: >> An explicit if/else is clearer than arithmetic assuming #true is 1, >> while the compiler should be able to generate just as optimal code. >> >> Signed-off-by: Lluís Vilanova >> --- >> stubs/trace-cont

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-11 Thread Ashijeet Acharya
On Thu, Aug 11, 2016 at 10:04 PM, Paolo Bonzini wrote: > >> I think we should do >> >> s->vmstate = qemu_add_vm_change_state_handler(ide_restart_cb, bus); >> instead of >> qemu_add_vm_change_state_handler(ide_restart_cb, bus); >> >> in ide_register_restart_cb() in hw/ide/core.c to store the return

Re: [Qemu-devel] [PATCH 0/2] coroutine: Assertions and debugging aids

2016-08-11 Thread Paolo Bonzini
> A while ago we were debugging a hang where coroutines were waiting for a > mutex > to be unlocked, but we couldn't find out who held the lock. This series adds > some information to Coroutine and CoMutex that both allows to add a few > assertions to check locking behaviour and can be used to find

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-11 Thread Paolo Bonzini
> I think we should do > > s->vmstate = qemu_add_vm_change_state_handler(ide_restart_cb, bus); > instead of > qemu_add_vm_change_state_handler(ide_restart_cb, bus); > > in ide_register_restart_cb() in hw/ide/core.c to store the returned > pointer to memory to avoid a possible memory leak I guess

Re: [Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 06:11:29PM +0200, Lluís Vilanova wrote: > An explicit if/else is clearer than arithmetic assuming #true is 1, > while the compiler should be able to generate just as optimal code. > > Signed-off-by: Lluís Vilanova > --- > stubs/trace-control.c |9 +++-- > trace/c

Re: [Qemu-devel] [PATCH v6 3/4] vfio iommu: Add support for mediated devices

2016-08-11 Thread Alex Williamson
On Thu, 11 Aug 2016 19:52:06 +0530 Kirti Wankhede wrote: > Thanks Alex. I'll take care of suggested nits and rename structures and > function. > > On 8/10/2016 12:30 AM, Alex Williamson wrote: > > On Thu, 4 Aug 2016 00:33:53 +0530 > > Kirti Wankhede wrote: > > > ... > > >> > >> +/* > >> + *

Re: [Qemu-devel] [PATCH v6 2/4] vfio: VFIO driver for mediated PCI device

2016-08-11 Thread Alex Williamson
On Thu, 11 Aug 2016 21:29:35 +0530 Kirti Wankhede wrote: > On 8/11/2016 4:30 AM, Alex Williamson wrote: > > On Thu, 11 Aug 2016 02:53:10 +0530 > > Kirti Wankhede wrote: > > > >> On 8/10/2016 12:30 AM, Alex Williamson wrote: > >>> On Thu, 4 Aug 2016 00:33:52 +0530 > >>> Kirti Wankhede wrote

[Qemu-devel] [PATCH 1/2] coroutine: Let CoMutex remember who holds it

2016-08-11 Thread Kevin Wolf
In cases of deadlocks, knowing who holds a given CoMutex is really helpful for debugging. Keeping the information around doesn't cost much and allows us to add another assertion to keep the code correct, so let's just add it. Signed-off-by: Kevin Wolf --- include/qemu/coroutine.h | 1 + util/q

[Qemu-devel] [PATCH 2/2] coroutine: Assert that no locks are held on termination

2016-08-11 Thread Kevin Wolf
A coroutine that takes a lock must also release it again. If the coroutine terminates without having released all its locks, it's buggy and we'll probably run into a deadlock sooner or later. Make sure that we don't get such cases. Signed-off-by: Kevin Wolf --- include/qemu/coroutine_int.h | 1

[Qemu-devel] [PATCH 0/2] coroutine: Assertions and debugging aids

2016-08-11 Thread Kevin Wolf
A while ago we were debugging a hang where coroutines were waiting for a mutex to be unlocked, but we couldn't find out who held the lock. This series adds some information to Coroutine and CoMutex that both allows to add a few assertions to check locking behaviour and can be used to find the culpr

Re: [Qemu-devel] Dangling change state handler while hot unplugging ahci adapter

2016-08-11 Thread Ashijeet Acharya
On Thu, Aug 11, 2016 at 1:50 PM, Ashijeet Acharya wrote: > On Wed, Aug 10, 2016 at 11:12 AM, Ashijeet Acharya > wrote: >> On Tue, Aug 9, 2016 at 11:48 PM, John Snow wrote: >>> >>> >>> On 08/09/2016 01:16 PM, Ashijeet Acharya wrote: Hi again, I am still waiting for some guidance...

[Qemu-devel] [PATCH v3 1/2] trace: Remove 'trace_events_dstate_init'

2016-08-11 Thread Lluís Vilanova
Removes the event state array used for early initialization. Since only events with the "vcpu" property need a late initialization fixup, threats their initialization specially. Assumes that the user won't touch the state of "vcpu" events between early and late initialization (e.g., through QMP).

Re: [Qemu-devel] [PATCH v7 3/4] blockdev: Add dynamic module loading for block drivers

2016-08-11 Thread Colin Lord
On 08/10/2016 11:23 PM, Fam Zheng wrote: > On Wed, 08/10 21:06, Max Reitz wrote: >> On 10.08.2016 21:04, Colin Lord wrote: >>> On 08/10/2016 02:37 PM, Max Reitz wrote: On 08.08.2016 20:07, Colin Lord wrote: > From: Marc Mari > > Extend the current module interface to allow for blo

[Qemu-devel] [PATCH v3 2/2] trace: Avoid implicit bool->integer conversions

2016-08-11 Thread Lluís Vilanova
An explicit if/else is clearer than arithmetic assuming #true is 1, while the compiler should be able to generate just as optimal code. Signed-off-by: Lluís Vilanova --- stubs/trace-control.c |9 +++-- trace/control-target.c | 18 ++ 2 files changed, 21 insertions(+),

[Qemu-devel] [PATCH v3 0/2] trace: Simplify late initialization

2016-08-11 Thread Lluís Vilanova
Removes the need for 'trace_events_dstate_init' and does a little cleanup in how state values are modified (to avoid implicit conversions from bool). Changes in v2 = * Fix late-init state value [Daniel P. Berrange]. Changes in v3 = * Avoid implicit conversions from bool

Re: [Qemu-devel] [PATCH] intel_iommu: add "eim" property

2016-08-11 Thread Radim Krčmář
2016-08-11 21:29+0800, Peter Xu: > Adding one extra property for intel-iommu device to decide whether we > should support EIM bit for IR. > > Now we are throwing high 24 bits of dest_id away directly. This will > cause interrupt issues with guests that: > > - enabled x2apic with cluster mode > -

[Qemu-devel] lseek beyond 2GB offset for qemu-arm user

2016-08-11 Thread Chanho Park
Hi, When I executed below source in qemu-arm user binary, It was failed with Invalid Argument. gcc lseek_test.c -o lseek_test -D_FILE_OFFSET_BITS=64 ./lseek_test error: Invalid argument It seems the qemu-arm user does not support the D_FILE_OFFSET_BITS flag. Is it a known issue or I had wrong te

[Qemu-devel] [RFC v4 27/28] cputlb: make tlb_reset_dirty safe for MTTCG

2016-08-11 Thread Alex Bennée
The main use case for tlb_reset_dirty is to set the TLB_NOTDIRTY flags in TLB entries to force the slow-path on writes. This is used to mark page ranges containing code which has been translated so it can be invalidated if written to. To do this safely we need to ensure the TLB entries in question

[Qemu-devel] [RFC v4 20/28] cpus: tweak sleeping and safe_work rules for MTTCG

2016-08-11 Thread Alex Bennée
Once TCG gains the ability to sleep individual threads we need to make sure they don't sleep when safe work is pending as all threads need to go through the process_queued_work function. Also if we have multiple threads wait_for_safe_work can now sleep without deadlocking. Signed-off-by: Alex Benn

Re: [Qemu-devel] [PATCH v6 2/4] vfio: VFIO driver for mediated PCI device

2016-08-11 Thread Kirti Wankhede
On 8/11/2016 4:30 AM, Alex Williamson wrote: > On Thu, 11 Aug 2016 02:53:10 +0530 > Kirti Wankhede wrote: > >> On 8/10/2016 12:30 AM, Alex Williamson wrote: >>> On Thu, 4 Aug 2016 00:33:52 +0530 >>> Kirti Wankhede wrote: >>> >> >> ... >> + + switch (info.index) { +

[Qemu-devel] [RFC v4 26/28] cputlb: tweak qemu_ram_addr_from_host_nofail reporting

2016-08-11 Thread Alex Bennée
This moves the helper function closer to where it is called and updates the error message to report via error_report instead of the deprecated fprintf. Signed-off-by: Alex Bennée --- cputlb.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cputlb.c

[Qemu-devel] [RFC v4 24/28] cputlb: add assert_cpu_is_self checks

2016-08-11 Thread Alex Bennée
For SoftMMU the TLB flushes are an example of a task that can be triggered on one vCPU by another. To deal with this properly we need to use safe work to ensure these changes are done safely. The new assert can be enabled while debugging to catch these cases. Signed-off-by: Alex Bennée --- cputl

[Qemu-devel] [RFC v4 23/28] atomic: introduce cmpxchg_bool

2016-08-11 Thread Alex Bennée
This allows for slightly neater code when checking for success of a cmpxchg operation. Signed-off-by: Alex Bennée --- v4 (base-patches) - brought forward from ARM enabling patches - remove the un-needed extra temps --- include/qemu/atomic.h | 9 + 1 file changed, 9 insertions(+)

[Qemu-devel] [RFC v4 25/28] cputlb: introduce tlb_flush_* async work.

2016-08-11 Thread Alex Bennée
From: KONRAD Frederic Some architectures allow to flush the tlb of other VCPUs. This is not a problem when we have only one thread for all VCPUs but it definitely needs to be an asynchronous work when we are in true multithreaded work. This patch doesn't do anything to protect other cputlb funct

[Qemu-devel] [RFC v4 22/28] tcg: enable thread-per-vCPU

2016-08-11 Thread Alex Bennée
There are a couple of changes that occur at the same time here: - introduce a single vCPU qemu_tcg_cpu_thread_fn One of these is spawned per vCPU with its own Thread and Condition variables. qemu_tcg_rr_cpu_thread_fn is the new name for the old single threaded function. - the TLS curre

[Qemu-devel] [RFC v4 28/28] cputlb: make tlb_flush_by_mmuidx safe for MTTCG

2016-08-11 Thread Alex Bennée
These flushes allow a per-mmuidx granularity to the TLB flushing and are currently only used by the ARM model. As it is possible to hammer the other vCPU threads with flushes (and build up long queues of identical flushes) we extend mechanism used for the global tlb_flush and set a bitmap describin

[Qemu-devel] [RFC v4 14/28] tcg: add kick timer for single-threaded vCPU emulation

2016-08-11 Thread Alex Bennée
Currently we rely on the side effect of the main loop grabbing the iothread_mutex to give any long running basic block chains a kick to ensure the next vCPU is scheduled. As this code is being re-factored and rationalised we now do it explicitly here. Signed-off-by: Alex Bennée --- v2 - re-bas

[Qemu-devel] [RFC v4 16/28] tcg: drop global lock during TCG code execution

2016-08-11 Thread Alex Bennée
From: Jan Kiszka This finally allows TCG to benefit from the iothread introduction: Drop the global mutex while running pure TCG CPU code. Reacquire the lock when entering MMIO or PIO emulation, or when leaving the TCG loop. We have to revert a few optimization for the current TCG threading mode

[Qemu-devel] [RFC v4 19/28] tcg: move locking for tb_invalidate_phys_page_range up

2016-08-11 Thread Alex Bennée
In the linux-user case all things that involve ''l1_map' and PageDesc tweaks are protected by the memory lock (mmpa_lock). For SoftMMU mode we previously relied on single threaded behaviour, with MTTCG we now use the tb_lock(). As a result we need to do a little re-factoring and push the taking o

[Qemu-devel] [RFC v4 17/28] cpus: re-factor out handle_icount_deadline

2016-08-11 Thread Alex Bennée
In preparation for adding a MTTCG thread we re-factor out a bit of what will be common code to handle the QEMU_CLOCK_VIRTUAL expiration. Signed-off-by: Alex Bennée --- v4 - split from exit_request patch --- cpus.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) dif

[Qemu-devel] [RFC v4 12/28] tcg: cpus rm tcg_exec_all()

2016-08-11 Thread Alex Bennée
In preparation for multi-threaded TCG we remove tcg_exec_all and move all the CPU cycling into the main thread function. When MTTCG is enabled we shall use a separate thread function which only handles one vCPU. Signed-off-by: Alex Bennée Reviewed-by: Sergey Fedorov Reviewed-by: Richard Henderso

[Qemu-devel] [RFC v4 13/28] tcg: add options for enabling MTTCG

2016-08-11 Thread Alex Bennée
From: KONRAD Frederic We know there will be cases where MTTCG won't work until additional work is done in the front/back ends to support. It will however be useful to be able to turn it on. As a result MTTCG will default to off unless the combination is supported. However the user can turn it on

[Qemu-devel] [RFC v4 09/28] tcg: protect TBContext with tb_lock.

2016-08-11 Thread Alex Bennée
From: KONRAD Frederic This protects TBContext with tb_lock to make tb_* thread safe. Signed-off-by: KONRAD Frederic Message-Id: <1439220437-23957-8-git-send-email-fred.kon...@greensocs.com> Signed-off-by: Emilio G. Cota Signed-off-by: Paolo Bonzini [AJB: moved into tree, clean-up history] S

[Qemu-devel] [RFC v4 21/28] tcg: enable tb_lock() for SoftMMU

2016-08-11 Thread Alex Bennée
tb_lock() has long been used for linux-user mode to protect code generation. By enabling it now we prepare for MTTCG and ensure all code generation is serialised by this lock. The other major structure that needs protecting is the l1_map and its PageDesc structures. For the SoftMMU case we also use

[Qemu-devel] [RFC v4 08/28] translate-all: Add assert_(memory|tb)_lock annotations

2016-08-11 Thread Alex Bennée
This adds calls to the assert_(memory|tb)_lock for all public APIs which are documented as needing them held for linux-user mode. The asserts are NOPs for system-mode although these will be converted when MTTCG is enabled. Signed-off-by: Alex Bennée --- v4 - mention tb_locks as well - tweak

[Qemu-devel] [RFC v4 11/28] tcg: move tcg_exec_all and helpers above thread fn

2016-08-11 Thread Alex Bennée
This is a pure mechanical change in preparation for up-coming re-factoring. Instead of a forward declaration for tcg_exec_all it and the associated helper functions are moved in front of the call from qemu_tcg_cpu_thread_fn. Signed-off-by: Alex Bennée --- v4 - split from tcg: cpus rm tcg_exec_

[Qemu-devel] [RFC v4 10/28] target-arm/arm-powerctl: wake up sleeping CPUs

2016-08-11 Thread Alex Bennée
Testing with Alexander's bare metal syncronisation tests fails in MTTCG leaving one CPU spinning forever waiting for the second CPU to wake up. We simply need to kick the vCPU once we have processed the PSCI power on call. As the power control API is for system emulation only as is the qemu_kick_c

[Qemu-devel] [RFC v4 18/28] tcg: remove global exit_request

2016-08-11 Thread Alex Bennée
There are now only two uses of the global exit_request left. The first ensures we exit the run_loop when we first start to process pending work and in the kick handler. This is just as easily done by setting the first_cpu->exit_request flag. The second use is in the round robin kick routine. The

[Qemu-devel] [RFC v4 03/28] translate-all: add DEBUG_LOCKING asserts

2016-08-11 Thread Alex Bennée
This adds asserts to check the locking on the various translation engines structures. There are two sets of structures that are protected by locks. The first the l1map and PageDesc structures used to track which translation blocks are associated with which physical addresses. In user-mode this is

[Qemu-devel] [RFC v4 07/28] linux-user/elfload: ensure mmap_lock() held while setting up

2016-08-11 Thread Alex Bennée
Future patches will enforce the holding of mmap_lock() when we are manipulating internal memory structures. Technically it doesn't matter in the case of elfload as we haven't started executing yet. However it is easier to grab the lock when required than special case the translate-all API. Signed-

[Qemu-devel] [RFC v4 15/28] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2016-08-11 Thread Alex Bennée
..and make the definition local to cpus. In preparation for MTTCG the concept of a global tcg_current_cpu will no longer make sense. However we still need to keep track of it in the single-threaded case to be able to exit quickly when required. qemu_cpu_kick_no_halt() moves and becomes qemu_cpu_ki

[Qemu-devel] [RFC v4 00/28] Base enabling patches for MTTCG

2016-08-11 Thread Alex Bennée
This is the fourth iteration of the RFC patch set which aims to provide the basic framework for MTTCG. I hope this will provide a good base for discussion at KVM Forum later this month. Prerequisites = This tree has been built on top of two other series of patches: - Reduce lock co

[Qemu-devel] [RFC v4 04/28] cpu-exec: include cpu_index in CPU_LOG_EXEC messages

2016-08-11 Thread Alex Bennée
Even more important when debugging MTTCG is seeing which vCPU is currently executing. Signed-off-by: Alex Bennée --- cpu-exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index f8cfdbd..f8fbf0d 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -143

[Qemu-devel] [RFC v4 01/28] cpus: make all_vcpus_paused() return bool

2016-08-11 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Sergey Fedorov Reviewed-by: Richard Henderson --- v3 - add r-b tags --- cpus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpus.c b/cpus.c index 1ea60e4..1700032 100644 --- a/cpus.c +++ b/cpus.c @@ -1219,17 +1219,17 @@ voi

[Qemu-devel] [RFC v4 06/28] tcg: comment on which functions have to be called with tb_lock held

2016-08-11 Thread Alex Bennée
From: Paolo Bonzini softmmu requires more functions to be thread-safe, because translation blocks can be invalidated from e.g. notdirty callbacks. Probably the same holds for user-mode emulation, it's just that no one has ever tried to produce a coherent locking there. This patch will guide the

[Qemu-devel] [RFC v4 05/28] docs: new design document multi-thread-tcg.txt (DRAFTING)

2016-08-11 Thread Alex Bennée
This is a current DRAFT of a design proposal for upgrading TCG emulation to take advantage of modern CPUs by running a thread-per-CPU. The document goes through the various areas of the code affected by such a change and proposes design requirements for each part of the solution. Where solutions h

[Qemu-devel] [RFC v4 02/28] translate_all: DEBUG_FLUSH -> DEBUG_TB_FLUSH

2016-08-11 Thread Alex Bennée
Make the debug define consistent with the others. The flush operation is all about invalidating TranslationBlocks on flush events. Also fix up the commenting on the other DEBUG for the benefit of checkpatch. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- translate-all.c | 8

Re: [Qemu-devel] [PULL 2.7 0/1] virtio-console: fix receiving data from guest

2016-08-11 Thread Peter Maydell
On 11 August 2016 at 16:01, Peter Maydell wrote: > On 11 August 2016 at 15:56, Daniel P. Berrange wrote: >> Strange, because that command line doesn't even add a virtio-console >> or virtio-serial device and AFAICT it doesn't hotplug any such device >> either. So I'm unclear how this patch could

Re: [Qemu-devel] [PULL 2.7 0/1] virtio-console: fix receiving data from guest

2016-08-11 Thread Peter Maydell
On 11 August 2016 at 15:56, Daniel P. Berrange wrote: > On Thu, Aug 11, 2016 at 03:37:27PM +0100, Peter Maydell wrote: >> On 11 August 2016 at 12:23, Amit Shah wrote: >> > The following changes since commit >> > d08306dc42ea599ffcf8aad056fa9c23acfbe230: >> > >> > Merge remote-tracking branch '

Re: [Qemu-devel] [PATCH v2 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-08-11 Thread Kevin Wolf
Am 08.08.2016 um 04:01 hat Ashish Mittal geschrieben: > This patch adds support for a new block device type called "vxhs". > Source code for the library that this code loads can be downloaded from: > https://github.com/MittalAshish/libqnio.git > > Version 2 patch submission fixes the following iss

Re: [Qemu-devel] [PULL 2.7 0/1] virtio-console: fix receiving data from guest

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 03:37:27PM +0100, Peter Maydell wrote: > On 11 August 2016 at 12:23, Amit Shah wrote: > > The following changes since commit d08306dc42ea599ffcf8aad056fa9c23acfbe230: > > > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > > (2016-08-10 17:14:

  1   2   3   >