Re: [Qemu-devel] [PATCH] target-i386: Sanity check host processor physical address width

2015-07-09 Thread Laszlo Ersek
On 07/09/15 00:42, Bandan Das wrote: > > If a Linux guest is assigned more memory than is supported > by the host processor, the guest is unable to boot. That > is expected, however, there's no message indicating the user > what went wrong. This change prints a message to stderr if > KVM has the c

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-09 Thread Paolo Bonzini
On 08/07/2015 22:48, Peter Maydell wrote: > On 8 July 2015 at 12:19, Paolo Bonzini wrote: >> The following changes since commit f6e3035f75e5c6a73485335765ae070304c7a110: >> >> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream-smm' into >> staging (2015-07-06 23:37:53 +0100) >> >

Re: [Qemu-devel] [PATCH v5] vhost-user: add multi queue support

2015-07-09 Thread Michael S. Tsirkin
On Thu, Jul 09, 2015 at 12:00:59AM +0200, Maxime Leroy wrote: > Hi Michael, > > On Wed, Jul 8, 2015 at 4:29 PM, Michael S. Tsirkin wrote: > > On Thu, May 28, 2015 at 09:23:06AM +0800, Ouyang Changchun wrote: > >> Based on patch by Nikolay Nikolaev: > >> Vhost-user will implement the multi queue s

[Qemu-devel] [PATCH 00/10] target-i386 addressing cleanups

2015-07-09 Thread Richard Henderson
This is a revival of a patch set I posted in 2013. At the time Paolo had some comments on the keystone patch, and I didn't have time to address them. I've since made several revisions, and I think the patchset is in good shape, but I've lost those original comments. Anyway, I'm reviving this now

[Qemu-devel] [PATCH 01/10] target-i386: Create gen_lea_v_seg

2015-07-09 Thread Richard Henderson
Add forgotten zero-extension in the TARGET_X86_64, !CODE64, ss32 case; use this new function to implement gen_string_movl_A0_EDI, gen_string_movl_A0_ESI, gen_add_A0_ds_seg. Signed-off-by: Richard Henderson --- target-i386/translate.c | 160 1 file

[Qemu-devel] [PATCH 03/10] target-i386: Use gen_lea_v_seg in gen_lea_modrm

2015-07-09 Thread Richard Henderson
Centralize handling of segment bases. Signed-off-by: Richard Henderson --- target-i386/translate.c | 82 ++--- 1 file changed, 23 insertions(+), 59 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index a900508..d85e800 1006

[Qemu-devel] [PATCH 07/10] target-i386: Rewrite gen_enter inline

2015-07-09 Thread Richard Henderson
Use gen_lea_v_seg for centralized segment base knowledge. Unify code across 32- and 64-bit. Fix note about "must save state" before using the out-of-line helpers. Signed-off-by: Richard Henderson --- target-i386/helper.h | 4 --- target-i386/seg_helper.c | 68 -

[Qemu-devel] [PATCH 02/10] target-i386: Introduce mo_stacksize

2015-07-09 Thread Richard Henderson
Centralize computation of a MO_SIZE for the stack pointer. Signed-off-by: Richard Henderson --- target-i386/translate.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 2c6c5ec..a900508 100644 -

[Qemu-devel] [PATCH 05/10] target-i386: Access segs via TCG registers

2015-07-09 Thread Richard Henderson
Having segs[].base as a register significantly improves code generation for real and protected modes, particularly for TBs that have multiple memory references where the segment base can be held in a hard register through the TB. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- t

[Qemu-devel] [PATCH 04/10] target-i386: Use gen_lea_v_seg in stack subroutines

2015-07-09 Thread Richard Henderson
I.e. gen_push_v, gen_pop_T0, gen_stack_A0. More centralization of handling of segment bases. Signed-off-by: Richard Henderson --- target-i386/translate.c | 52 + 1 file changed, 13 insertions(+), 39 deletions(-) diff --git a/target-i386/translate.

[Qemu-devel] [PATCH 06/10] target-i386: Use gen_lea_v_seg in pusha/popa

2015-07-09 Thread Richard Henderson
More centralization of handling of segment bases. Also fixes the note about 16-bit wrap around not fully handled. Signed-off-by: Richard Henderson --- target-i386/translate.c | 50 +++-- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/t

[Qemu-devel] [PATCH 08/10] target-i386: Rewrite leave

2015-07-09 Thread Richard Henderson
Unify the code across stack pointer widths. Fix the note about not updating ESP before the potential exception. Signed-off-by: Richard Henderson --- target-i386/translate.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/target-i386/translate.

[Qemu-devel] [PATCH 09/10] target-i386: Tidy gen_add_A0_im

2015-07-09 Thread Richard Henderson
Merge gen_op_addl_A0_im and gen_op_addq_A0_im into gen_add_A0_im and clean up the ifdef. Replace the one remaining user of gen_op_addl_A0_im with gen_add_A0_im. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-i386/translate.c | 27 +-- 1 file chan

[Qemu-devel] [PATCH 10/10] target-i386: Deconstruct the cpu_T array

2015-07-09 Thread Richard Henderson
All references to cpu_T are done with a constant index. It aids readability to decompose the array into two scalar variables. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-i386/translate.c | 1254 --- 1 file changed, 644 inse

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v5] vhost-user: add multi queue support

2015-07-09 Thread Michael S. Tsirkin
On Thu, Jul 09, 2015 at 01:29:48AM +, Ouyang, Changchun wrote: > > > > -Original Message- > > From: snabb-de...@googlegroups.com [mailto:snabb- > > de...@googlegroups.com] On Behalf Of Maxime Leroy > > Sent: Thursday, July 9, 2015 6:01 AM > > To: Michael S. Tsirkin > > Cc: Ouyang, Cha

Re: [Qemu-devel] [PATCH v4 1/1] s390 pci infrastructure modelling

2015-07-09 Thread Michael S. Tsirkin
On Wed, Jul 08, 2015 at 01:44:55PM +0800, Yi Min Zhao wrote: > @@ -588,9 +606,172 @@ static const TypeInfo s390_pcihost_info = { > } > }; > > +static void s390_pci_device_hot_plug(HotplugHandler *hotplug_dev, > + DeviceState *dev, Error **errp) > +{ > +

Re: [Qemu-devel] [PATCH] target-i386: Sanity check host processor physical address width

2015-07-09 Thread Paolo Bonzini
On 09/07/2015 00:42, Bandan Das wrote: > > If a Linux guest is assigned more memory than is supported > by the host processor, the guest is unable to boot. That > is expected, however, there's no message indicating the user > what went wrong. This change prints a message to stderr if > KVM has t

Re: [Qemu-devel] [PULL 27/28] migration: protect migration_bitmap

2015-07-09 Thread Paolo Bonzini
On 09/07/2015 03:19, Wen Congyang wrote: > Yes, why migration doesn't trigger this problem? We will fix it soon. This should be the fix if someone wants to test it and/or post it: diff --git a/migration/ram.c b/migration/ram.c index 57368e1..8d5a73a 100644 --- a/migration/ram.c +++ b/migration/

Re: [Qemu-devel] [PATCH] RDMA: Reduce restriction on block length match

2015-07-09 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> "Dr. David Alan Gilbert (git)" wrote: > >> > From: "Dr. David Alan Gilbert" > >> > > >> > My e4d633207 patch has an over zealous sanity check that checked > >> > t

Re: [Qemu-devel] [PULL 27/28] migration: protect migration_bitmap

2015-07-09 Thread Wen Congyang
On 07/09/2015 03:59 PM, Paolo Bonzini wrote: > > > On 09/07/2015 03:19, Wen Congyang wrote: >> Yes, why migration doesn't trigger this problem? We will fix it soon. > > This should be the fix if someone wants to test it and/or post it: > > diff --git a/migration/ram.c b/migration/ram.c > index

Re: [Qemu-devel] [PATCH 0/2] mips/kvm: Fixes for big endian & MIPS64 hosts

2015-07-09 Thread Leon Alrae
On 08/07/2015 16:22, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > > > On 08/07/2015 17:03, James Hogan wrote: >> Hi Paolo, >> >> On 24/04/15 11:26, James Hogan wrote: >>> A couple of small fixes for accessing 32-bit KVM registers on >>> big endian, and to sign ext

[Qemu-devel] [PATCH 01/14] target-i386: Split fxsave/fxrstor implementation

2015-07-09 Thread Richard Henderson
We will be able to reuse these pieces for XSAVE/XRSTOR. Signed-off-by: Richard Henderson --- target-i386/fpu_helper.c | 145 --- target-i386/helper.h | 4 +- target-i386/translate.c | 4 +- 3 files changed, 90 insertions(+), 63 deletions(-) d

[Qemu-devel] [PATCH 02/14] target-i386: Rearrange processing of 0F 01

2015-07-09 Thread Richard Henderson
Rather than nesting tests of OP, MOD, and RM, decode them all at once with a switch. Fixes incorrect decoding of AMD Pacifica extensions (aka vmrun et al) via op==2 path. Signed-off-by: Richard Henderson --- target-i386/translate.c | 470 +--- 1 file

[Qemu-devel] [PATCH 03/14] target-i386: Add XSAVE extension

2015-07-09 Thread Richard Henderson
This includes XSAVE, XRSTOR, XGETBV, XSETBV, which are all related, as well as the associate cpuid bits. Signed-off-by: Richard Henderson --- target-i386/cpu.c| 39 +-- target-i386/cpu.h| 2 + target-i386/fpu_helper.c | 123 +

[Qemu-devel] [PATCH 07/14] target-i386: Split up gen_lea_modrm

2015-07-09 Thread Richard Henderson
This is immediately usable by lea and multi-byte nop, and will be required to implement parts of the mpx spec. Signed-off-by: Richard Henderson --- target-i386/translate.c | 199 +--- 1 file changed, 85 insertions(+), 114 deletions(-) diff --git a/tar

[Qemu-devel] [PATCH 00/14] target-i386: Implement MPX extension

2015-07-09 Thread Richard Henderson
I'm still in the process of testing this, as there's no code written for it yet and hardware to compare against doesn't start shipping until (probably) August. But in the meantime there are a number of holes that I found in XSAVE support that might affect KVM, and one question wrt SMM support that

[Qemu-devel] [PATCH 08/14] target-i386: Implement BNDMK

2015-07-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/translate.c | 54 - 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index ada0dec..69bb6c6 100644 --- a/target-i386/translate.c +++ b/ta

[Qemu-devel] [PATCH 04/14] target-i386: Implement XSAVEOPT

2015-07-09 Thread Richard Henderson
Note the cpu.c change -- don't advertise more XSAVE features than we implement. Signed-off-by: Richard Henderson --- target-i386/cpu.c| 2 +- target-i386/fpu_helper.c | 28 +++- target-i386/helper.h | 1 + target-i386/translate.c | 27 ++

[Qemu-devel] [PATCH 12/14] target-i386: Implement BNDLDX, BNDSTX

2015-07-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/helper.h | 4 +++ target-i386/mpx_helper.c | 93 target-i386/translate.c | 61 +++ 3 files changed, 158 insertions(+) diff --git a/target-i386/helper.h b/target-i38

[Qemu-devel] [PATCH 10/14] target-i386: Implement BNDCL, BNDCU, BNDCN

2015-07-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/helper.h | 2 ++ target-i386/mpx_helper.c | 8 target-i386/translate.c | 46 +- 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/target-i386/helper.h b/target-i386/helper.h i

[Qemu-devel] [PATCH 05/14] target-i386: Enable control registers for MPX

2015-07-09 Thread Richard Henderson
Enable and disable at CPL changes, MSR changes, and XRSTOR changes. Signed-off-by: Richard Henderson --- target-i386/Makefile.objs | 2 +- target-i386/cpu.c | 18 +-- target-i386/cpu.h | 21 - target-i386/fpu_helper.c | 78 +++

[Qemu-devel] [PATCH 09/14] target-i386: Implement BNDMOV

2015-07-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/translate.c | 73 - 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 69bb6c6..fcafa81 100644 --- a/target-i386/translate.c +++ b/ta

[Qemu-devel] [PATCH 14/14] target-i386: Enable XCR0 features for user-mode

2015-07-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/cpu.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index c19ff8a..2402c2a 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2654,7 +2654,17 @@ static void

[Qemu-devel] [PATCH 06/14] target-i386: Perform set/reset_inhibit_irq inline

2015-07-09 Thread Richard Henderson
With helpers that can be reused for other things. Signed-off-by: Richard Henderson --- target-i386/cc_helper.c | 10 -- target-i386/helper.h| 2 -- target-i386/translate.c | 37 - 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/ta

[Qemu-devel] [PATCH 11/14] target-i386: Update BNDSTATUS for exceptions raised by BOUND

2015-07-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/mem_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target-i386/mem_helper.c b/target-i386/mem_helper.c index 1aec8a5..c8d5fac 100644 --- a/target-i386/mem_helper.c +++ b/target-i386/mem_helper.c @@ -91,6 +91,9 @@ void helper_bou

[Qemu-devel] [PATCH 13/14] target-i386: Clear bndregs during legacy near jumps

2015-07-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-i386/translate.c | 25 + 1 file changed, 25 insertions(+) diff --git a/target-i386/translate.c b/target-i386/translate.c index 7892951..f067d98 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -2410,6 +2410,

Re: [Qemu-devel] [PATCH v3 14/16] acpi: Add a way for devices to add ACPI tables

2015-07-09 Thread Igor Mammedov
On Wed, 8 Jul 2015 22:39:24 +0200 Paolo Bonzini wrote: > > > On 08/07/2015 21:26, Igor Mammedov wrote: > > > This was suggested by Michael, so I think you should read the reviews > > > of earlier versions first. > > > > That is basically the same as hooks in v1 only the other way around > > wi

Re: [Qemu-devel] [PATCH] target-i386: Sanity check host processor physical address width

2015-07-09 Thread Laszlo Ersek
On 07/09/15 09:59, Paolo Bonzini wrote: > > > On 09/07/2015 00:42, Bandan Das wrote: >> >> If a Linux guest is assigned more memory than is supported >> by the host processor, the guest is unable to boot. That >> is expected, however, there's no message indicating the user >> what went wrong. Thi

[Qemu-devel] [PATCH] migration: use call_rcu instead of synchronize_rcu

2015-07-09 Thread Li Zhijian
from commit 2ff6403, we make a mistake to call synchronize_rcu() within rcu_read_lock()/rcu_read_unlock() Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian --- migration/ram.c | 49 - 1 file changed, 32 insertions(+)

Re: [Qemu-devel] [PATCH] replaced get_ticks_per_sec() with constant

2015-07-09 Thread Stefan Hajnoczi
On Wed, Jul 08, 2015 at 04:29:49PM +0300, Emil Condrea wrote: > On Mon, Jul 6, 2015 at 6:11 PM, Stefan Hajnoczi wrote: > > > On Sun, Jul 5, 2015 at 7:15 AM, Emil Condrea > > wrote: > > > Stefan, do you know if this patch was applied? > > > > It hasn't been applied, sorry. It slipped through the

Re: [Qemu-devel] virtio-blk multiqueue support in qemu.

2015-07-09 Thread Stefan Hajnoczi
On Wed, Jul 08, 2015 at 05:37:12PM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 02, 2015 at 09:21:21AM +0800, Fam Zheng wrote: > > On Wed, 07/01 22:45, Naredula Janardhana Reddy wrote: > > > HI, > > > I am trying to improve the throughput of virtio-blk for my kernel ( > > > https://github.c

Re: [Qemu-devel] [PATCH COLO-BLOCK v7 00/17] Block replication for continuous checkpoints

2015-07-09 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > >> I have sent the v8. But the usage is not changed. You can setup the > >> environment according to the wiki. > >> When we open nbd client, we need to connect to the nbd server. So I > >> introduce a new command child_add to add NBD client > >> as

[Qemu-devel] [PATCH for 2.4 1/2] tcg/mips: Fix build error from merged memop+mmu_idx parameter

2015-07-09 Thread James Hogan
Commit 3972ef6f830d ("tcg: Push merged memop+mmu_idx parameter to softmmu routines") caused the following build errors when building TCG for MIPS: In file included from tcg/tcg.c:258:0: tcg/mips/tcg-target.c In function ‘tcg_out_qemu_ld_slow_path’: tcg/mips/tcg-target.c:1015:22: error: ‘lb’ undecl

[Qemu-devel] [PATCH for 2.4 2/2] mips/kvm: Sync with newer MIPS KVM headers

2015-07-09 Thread James Hogan
The KVM_REG_MIPS_COUNT_* definitions are now included in linux-headers/asm-mips/kvm.h since commit b061808d39fa ("linux-headers: update linux headers to kvm/next"), therefore the duplicate definitions in target-mips/kvm.c can now be dropped (the definitions were tweaked slightly in commit 7a52ce8a1

[Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4

2015-07-09 Thread James Hogan
These two patches fix build errors for the MIPS TCG backend and MIPS KVM. Please could they be applied for v2.4. James Hogan (2): tcg/mips: Fix build error from merged memop+mmu_idx parameter mips/kvm: Sync with newer MIPS KVM headers target-mips/kvm.c | 15 ++- tcg/mips/tcg

Re: [Qemu-devel] [PATCH v2] net: Flush queued packets when guest resumes

2015-07-09 Thread Stefan Hajnoczi
On Tue, Jul 07, 2015 at 12:10:15PM +0300, Michael S. Tsirkin wrote: > On Tue, Jul 07, 2015 at 04:58:29PM +0800, Jason Wang wrote: > > > > > > On 07/07/2015 04:13 PM, Michael S. Tsirkin wrote: > > > On Tue, Jul 07, 2015 at 09:21:07AM +0800, Fam Zheng wrote: > > >> Since commit 6e99c63 "net/socket:

Re: [Qemu-devel] [PATCH] target-i386: Sanity check host processor physical address width

2015-07-09 Thread Igor Mammedov
On Thu, 09 Jul 2015 09:02:38 +0200 Laszlo Ersek wrote: > On 07/09/15 00:42, Bandan Das wrote: > > > > If a Linux guest is assigned more memory than is supported > > by the host processor, the guest is unable to boot. That > > is expected, however, there's no message indicating the user > > what

[Qemu-devel] [PATCH for-2.4] i.MX: Fix UART driver to work with unitialized "chardev" device

2015-07-09 Thread Jean-Christophe Dubois
The "chardev" property initialisation might failed (for example because there is not enough chardev handled by Qemu). The serial device emulator need to be able to "work" with an uninitialized (NULL) "chardev" device pointer. This patch add some test on the "chardev" pointer value before using it

Re: [Qemu-devel] [PATCH v4 1/1] s390 pci infrastructure modelling

2015-07-09 Thread zyimin
On 7/9/2015 3:48 PM, Michael S. Tsirkin wrote: On Wed, Jul 08, 2015 at 01:44:55PM +0800, Yi Min Zhao wrote: @@ -588,9 +606,172 @@ static const TypeInfo s390_pcihost_info = { } }; +static void s390_pci_device_hot_plug(HotplugHandler *hotplug_dev, +

Re: [Qemu-devel] [PATCH COLO-BLOCK v7 00/17] Block replication for continuous checkpoints

2015-07-09 Thread Wen Congyang
On 07/09/2015 05:16 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: > I have sent the v8. But the usage is not changed. You can setup the environment according to the wiki. When we open nbd client, we need to connect to the nbd server. So I in

Re: [Qemu-devel] [PATCH] raw-posix.c: Make physical devices usable in QEMU

2015-07-09 Thread Laurent Vivier
On 07/07/2015 19:33, Programmingkid wrote: > Make physical devices like a USB flash drive or a CDROM drive work in > QEMU. With > this patch I can use a USB flash drive like a hard drive. Before this > patch, > QEMU would just quit with a message like "resource busy". Now it handles > issues > l

Re: [Qemu-devel] [PATCH 2.4] socket: pass correct size in net_socket_send()

2015-07-09 Thread Stefan Hajnoczi
On Tue, Jul 07, 2015 at 05:00:56PM +0800, Jason Wang wrote: > We should pass the size of packet instead of the remaining to > qemu_send_packet_async(). > > Fixes: 6e99c631f116221d169ea53953d91b8aa74d297a >("net/socket: Drop net_socket_can_send") > > Signed-off-by: Jason Wang > --- > net

Re: [Qemu-devel] [PATCH for-2.5 1/4] block: add BlockLimits.max_iov field

2015-07-09 Thread Stefan Hajnoczi
On Thu, Jul 09, 2015 at 06:39:02AM +0200, Peter Lieven wrote: > Am 08.07.2015 um 17:30 schrieb Stefan Hajnoczi: > >The maximum number of struct iovec elements depends on the > >BlockDriverState. The raw-posix protocol has a maximum of IOV_MAX but > >others could have different values. > > > >Inste

[Qemu-devel] [PATCH for-2.5 v2 2/4] block-backend: add blk_get_max_iov()

2015-07-09 Thread Stefan Hajnoczi
Add a function to query BlockLimits.max_iov. Signed-off-by: Stefan Hajnoczi --- block/block-backend.c | 5 + include/sysemu/block-backend.h | 1 + 2 files changed, 6 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index aee8a12..5108aec 100644 --- a/block/b

[Qemu-devel] [PATCH for-2.5 v2 0/4] block: replace IOV_MAX with BlockLimits.max_iov

2015-07-09 Thread Stefan Hajnoczi
v2: * Default to IOV_MAX instead of INT_MAX [Peter Lieven] This series depends on "[PATCH] block/mirror: limit qiov to IOV_MAX elements". IOV_MAX has been hardcoded in several places since preadv()/pwritev()/etc refuse to take more iovecs per call. That's actually an implementation detail of ra

[Qemu-devel] [PATCH for-2.5 v2 3/4] block: replace IOV_MAX with BlockLimits.max_iov

2015-07-09 Thread Stefan Hajnoczi
Request merging must not result in a huge request that exceeds the maximum number of iovec elements. Use BlockLimits.max_iov instead of hardcoding IOV_MAX. Signed-off-by: Stefan Hajnoczi --- block/io.c| 3 ++- hw/block/virtio-blk.c | 2 +- 2 files changed, 3 insertions(+), 2 deletio

[Qemu-devel] [PATCH for-2.5 v2 1/4] block: add BlockLimits.max_iov field

2015-07-09 Thread Stefan Hajnoczi
The maximum number of struct iovec elements depends on the BlockDriverState. The raw-posix and iSCSI protocols have a maximum of IOV_MAX but others could have different values. Cc: Peter Lieven Suggested-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- v2: * Change default from INT_MAX to IO

Re: [Qemu-devel] [PATCH v4 1/1] s390 pci infrastructure modelling

2015-07-09 Thread Michael S. Tsirkin
On Thu, Jul 09, 2015 at 05:30:08PM +0800, zyimin wrote: > > > On 7/9/2015 3:48 PM, Michael S. Tsirkin wrote: > >On Wed, Jul 08, 2015 at 01:44:55PM +0800, Yi Min Zhao wrote: > >>@@ -588,9 +606,172 @@ static const TypeInfo s390_pcihost_info = { > >> } > >> }; > >>+static void s390_pci_device_

[Qemu-devel] [PATCH for-2.5 v2 4/4] block/mirror: replace IOV_MAX with blk_get_max_iov()

2015-07-09 Thread Stefan Hajnoczi
Use blk_get_max_iov() instead of hardcoding IOV_MAX, which may not apply to all BlockDrivers. Signed-off-by: Stefan Hajnoczi --- block/mirror.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index adde12b..74d475b 100644 --- a/block/mirr

Re: [Qemu-devel] [Qemu-block] [PATCH 0/4] rbd cleanup and settings precedence fixes

2015-07-09 Thread Stefan Hajnoczi
On Tue, Jun 30, 2015 at 11:28:18AM -0700, Josh Durgin wrote: > Ping > > On 06/10/2015 08:28 PM, Josh Durgin wrote: > >Patches 1 and 2 are simple cleanups. 3 and 4 fix the precedence of > >cache options and ceph settings. The cache option precedence in > >particular is important due to the potentia

Re: [Qemu-devel] [PATCH] target-ppc: Add POWER8E_v2.1 CPU model.

2015-07-09 Thread Andrea Bolognani
On Thu, 2015-07-09 at 12:35 +1000, Alexey Kardashevskiy wrote: > > > Does "all versions of POWER8" include things like POWER8E, > > POWER8NVL > > and "POWER8 DD1", as one of the variations is known in the kernel > > source? Can we safely migrate guests eg. from a POWER8 v1.0 host to > > a POWER8E

Re: [Qemu-devel] [PATCH] target-i386: Sanity check host processor physical address width

2015-07-09 Thread Laszlo Ersek
On 07/09/15 11:27, Igor Mammedov wrote: > On Thu, 09 Jul 2015 09:02:38 +0200 > Laszlo Ersek wrote: > >> On 07/09/15 00:42, Bandan Das wrote: >>> >>> If a Linux guest is assigned more memory than is supported >>> by the host processor, the guest is unable to boot. That >>> is expected, however, th

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] block: vpc - prevent overflow if max_table_entries >= 0x40000000

2015-07-09 Thread Stefan Hajnoczi
On Wed, Jul 08, 2015 at 01:55:34PM +0200, Kevin Wolf wrote: > Am 26.06.2015 um 11:57 hat Stefan Hajnoczi geschrieben: > > On Thu, Jun 25, 2015 at 11:05:20AM -0400, Jeff Cody wrote: > > > On Thu, Jun 25, 2015 at 03:28:35PM +0100, Stefan Hajnoczi wrote: > > > > On Wed, Jun 24, 2015 at 03:54:27PM -040

Re: [Qemu-devel] [PULL 10/12] block: convert qcow/qcow2 to use generic cipher API

2015-07-09 Thread Christian Borntraeger
Am 07.07.2015 um 16:12 schrieb Paolo Bonzini: > From: "Daniel P. Berrange" > > Switch the qcow/qcow2 block driver over to use the generic cipher > API, this allows it to use the pluggable AES implementations, > instead of being hardcoded to use QEMU's built-in impl. > > Signed-off-by: Daniel P.

Re: [Qemu-devel] [PATCH v2] trivial: remove trailing newline from error_report

2015-07-09 Thread Stefan Hajnoczi
On Mon, Jun 29, 2015 at 04:56:26PM -0400, John Snow wrote: > Minor cleanup. > > Signed-off-by: John Snow > --- > hw/ide/ahci.c | 2 +- > hw/vfio/platform.c | 2 +- > net/tap-linux.c| 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Stefan Hajnoczi Laszlo Ersek

Re: [Qemu-devel] [PATCH COLO-BLOCK v7 00/17] Block replication for continuous checkpoints

2015-07-09 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 07/09/2015 05:16 PM, Dr. David Alan Gilbert wrote: > > * Wen Congyang (we...@cn.fujitsu.com) wrote: > > > I have sent the v8. But the usage is not changed. You can setup the > environment according to the wiki. > When we open nbd cl

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-09 Thread Stefan Hajnoczi
On Tue, Jul 07, 2015 at 02:43:06PM +0300, Catalin Vasile wrote: > My vhost module respects the format vhost-net uses: > > /* summary */ > mutex_lock(&vq->mutex); > vhost_disable_notify(); > for (;;) { > head = vhost_get_vq_desc(); >if (head == vq->num) { > if (unlikely

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-09 Thread Catalin Vasile
I have managed to deal with it. The thing is I was using one of the latest versions of qemu, but an old Linux Kernel version of 3.12. On Thu, Jul 9, 2015 at 1:43 PM, Stefan Hajnoczi wrote: > On Tue, Jul 07, 2015 at 02:43:06PM +0300, Catalin Vasile wrote: >> My vhost module respects the format vho

Re: [Qemu-devel] [Qemu-block] [PATCH] raw-posix.c: Make physical devices usable in QEMU

2015-07-09 Thread Stefan Hajnoczi
On Tue, Jul 07, 2015 at 01:33:23PM -0400, Programmingkid wrote: > Make physical devices like a USB flash drive or a CDROM drive work in QEMU. > With > this patch I can use a USB flash drive like a hard drive. Before this patch, > QEMU would just quit with a message like "resource busy". The comm

[Qemu-devel] qcow crypto changes crash on migration (was: [PULL 10/12] block: convert qcow/qcow2 to use generic cipher API)

2015-07-09 Thread Christian Borntraeger
Forgot some CCs (patch author and migration folks) Am 09.07.2015 um 12:17 schrieb Christian Borntraeger: > Am 07.07.2015 um 16:12 schrieb Paolo Bonzini: >> From: "Daniel P. Berrange" >> >> Switch the qcow/qcow2 block driver over to use the generic cipher >> API, this allows it to use the pluggab

Re: [Qemu-devel] [PATCH COLO-BLOCK v7 00/17] Block replication for continuous checkpoints

2015-07-09 Thread Wen Congyang
On 07/09/2015 06:37 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> On 07/09/2015 05:16 PM, Dr. David Alan Gilbert wrote: >>> * Wen Congyang (we...@cn.fujitsu.com) wrote: >>> >> I have sent the v8. But the usage is not changed. You can setup the >> envir

[Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties

2015-07-09 Thread Cornelia Huck
64 bit props used 32 bit callbacks in two places, leading to broken feature bits on virtio (example: got 0x310006d4 which is obviously bogus). Fix this. Fixes: fdba6d96 ("qdev: add 64bit properties") Signed-off-by: Cornelia Huck --- hw/core/qdev-properties.c| 2 +- include/hw/qdev-pr

Re: [Qemu-devel] using MSIX for virtio-blk

2015-07-09 Thread Stefan Hajnoczi
On Tue, Jul 07, 2015 at 10:50:59PM +0530, Naredula Janardhana Reddy wrote: > How to enable MSIX for virtio-blk, this is to avoid extra use of > VIRTIO_PCI_ISR port reads. > This is for qemu 2.3.0 with virtio-blk-pci with x-data-plane is on. I tried the following with QEMU 2.3.0: qemu-system-x8

Re: [Qemu-devel] qcow crypto changes crash on migration

2015-07-09 Thread Christian Borntraeger
Am 09.07.2015 um 12:53 schrieb Christian Borntraeger: > Forgot some CCs (patch author and migration folks) > > > Am 09.07.2015 um 12:17 schrieb Christian Borntraeger: >> Am 07.07.2015 um 16:12 schrieb Paolo Bonzini: >>> From: "Daniel P. Berrange" >>> >>> Switch the qcow/qcow2 block driver over t

Re: [Qemu-devel] [PATCH for-2.4] qdev: fix 64 bit properties

2015-07-09 Thread Christian Borntraeger
Am 09.07.2015 um 13:01 schrieb Cornelia Huck: > 64 bit props used 32 bit callbacks in two places, leading to broken > feature bits on virtio (example: got 0x310006d4 which is > obviously bogus). Fix this. > > Fixes: fdba6d96 ("qdev: add 64bit properties") > Signed-off-by: Cornelia Huck T

[Qemu-devel] [PATCH v4 2/7] memory: introduce MemoryRegion container with reserved HVA range

2015-07-09 Thread Igor Mammedov
Patch adds - memory_region_init_hva_range() - memory_region_add_subregion_to_hva() - memory_region_find_hva_range() API to allocate, map into and lookup reserved HVA MemoryRegion. MemoryRegion with reserved HVA range will be used for providing linear 1:1 HVA->GVA mapping for RAM MemoryRegion

[Qemu-devel] [PATCH v4 6/7] exec: add qemu_ram_unmap_hva() API for unmapping memory from HVA area

2015-07-09 Thread Igor Mammedov
it will allow to return atomically return RAMBlock's host address range into continuos HVA area so that no hole would appear in there. also mark RAMBlock with RAM_PREALLOC flag so it won't be umapped as conventional memory by reclaim_ramblock()->qemu_anon_ram_free() Signed-off-by: Igor Mammedov

[Qemu-devel] [PATCH v4 4/7] pc: fix QEMU crashing when more than ~50 memory hotplugged

2015-07-09 Thread Igor Mammedov
QEMU asserts in vhost due to hitting vhost backend limit on number of supported memory regions. Describe all hotplugged memory as one continuos range to vhost with linear 1:1 HVA->GPA mapping in backend. Signed-off-by: Igor Mammedov --- hw/virtio/vhost.c | 47 +++

[Qemu-devel] [PATCH v4 3/7] pc: reserve hotpluggable memory range with memory_region_init_hva_range()

2015-07-09 Thread Igor Mammedov
It makes sure that all hotplugged memory will be put in continuos HVA range allowing to use 1:1 GVA<->HVA mapping. 1:1 mapping will be used by vhost to reduce number of memory ranges for hotplugged memory to a single range that covers all hotpluggable memory address space. Signed-off-by: Igor Mam

[Qemu-devel] [PATCH v4 5/7] exec: make sure that RAMBlock descriptor won't be leaked

2015-07-09 Thread Igor Mammedov
HVA remapped file backed RAMBlock shouldn't be freed with munmap() as it will create a hole in HVA area but file descriptor should be freed so it won't leak. Rearrange code so that file descriptor is freed always if it's been used and drop unnecessary munmap() call/branch because qemu_anon_ram_fre

[Qemu-devel] [PATCH v4 0/7] Fix QEMU crash during memory hotplug with vhost=on

2015-07-09 Thread Igor Mammedov
Changelog: v3->v4: * drop patch extending memory_region_subregion_add() with error argument * and add memory_region_add_subregion_to_hva() API instead * add madvise(DONTNEED) when returning range to HVA container v2->v3: * fixed(work-arouned) unmapping issues, now memory sub

[Qemu-devel] [PATCH v4 1/7] memory: get rid of memory_region_destructor_ram_from_ptr()

2015-07-09 Thread Igor Mammedov
memory_region_destructor_ram() -> qemu_ram_free() calls reclaim_ramblock() which does: if (!(block->flags & RAM_PREALLOC)) free_host_memory() g_free(block) while memory_region_destructor_ram_from_ptr() -> qemu_ram_free_from_ptr() calls g_free_rcu(block, rcu) results -> g_free(block

[Qemu-devel] [PATCH v4 7/7] memory: add support for deleting HVA mapped MemoryRegion

2015-07-09 Thread Igor Mammedov
Although memory_region_del_subregion() removes MemoryRegion from current address space, it's possible that it's still in use/referenced until old address space view is destroyed. That doesn't allow to unmap it from HVA region at the time of memory_region_del_subregion(). As a solution track HVA map

Re: [Qemu-devel] [PATCH 0/3] mirror: Fix guest responsiveness during bitmap scan

2015-07-09 Thread Alexandre DERUMIER
Hi, I have tested them, they works fine here (tested with source :raw on nfs, raw on ext3, and ceph/rbd device). Patch 3 give me a big boost with an empty 10GB source raw on ext3. (take some seconds vs some minutes) - Mail original - De: "Fam Zheng" À: "qemu-devel" Cc: "Kevin Wolf"

Re: [Qemu-devel] [PATCH v5] vhost-user: add multi queue support

2015-07-09 Thread Martin Kletzander
On Thu, Jul 09, 2015 at 10:06:35AM +0300, Michael S. Tsirkin wrote: On Thu, Jul 09, 2015 at 12:00:59AM +0200, Maxime Leroy wrote: Hi Michael, On Wed, Jul 8, 2015 at 4:29 PM, Michael S. Tsirkin wrote: > On Thu, May 28, 2015 at 09:23:06AM +0800, Ouyang Changchun wrote: >> Based on patch by Nikol

Re: [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4

2015-07-09 Thread Leon Alrae
On 09/07/2015 10:17, James Hogan wrote: > These two patches fix build errors for the MIPS TCG backend and MIPS > KVM. > > Please could they be applied for v2.4. > > James Hogan (2): > tcg/mips: Fix build error from merged memop+mmu_idx parameter > mips/kvm: Sync with newer MIPS KVM headers >

Re: [Qemu-devel] [PATCH v5] vhost-user: add multi queue support

2015-07-09 Thread Maxime Leroy
Hi Martin, Michael, On Thu, Jul 9, 2015 at 2:00 PM, Martin Kletzander wrote: > On Thu, Jul 09, 2015 at 10:06:35AM +0300, Michael S. Tsirkin wrote: >> >> On Thu, Jul 09, 2015 at 12:00:59AM +0200, Maxime Leroy wrote: >>> >>> Hi Michael, >>> >>> On Wed, Jul 8, 2015 at 4:29 PM, Michael S. Tsirkin >>

Re: [Qemu-devel] Virtualising qmp_query_cpus() arch specifics

2015-07-09 Thread Andreas Färber
Am 09.07.2015 um 08:36 schrieb Peter Crosthwaite: > Hi All, > > So for my multi-arch work, one of the eventual requirements is to > remove all #define TARGET_FOO from core code. I came across this in > cpus.c/qmp_query_cpus(): > > #if defined(TARGET_I386) > X86CPU *x86_cpu = X86_CPU(cpu);

Re: [Qemu-devel] [PATCH v5] vhost-user: add multi queue support

2015-07-09 Thread Martin Kletzander
On Thu, Jul 09, 2015 at 02:24:51PM +0200, Maxime Leroy wrote: Hi Martin, Michael, On Thu, Jul 9, 2015 at 2:00 PM, Martin Kletzander wrote: On Thu, Jul 09, 2015 at 10:06:35AM +0300, Michael S. Tsirkin wrote: On Thu, Jul 09, 2015 at 12:00:59AM +0200, Maxime Leroy wrote: Hi Michael, On Wed,

Re: [Qemu-devel] [PATCH] KVM: x86: Add host physical address width capability

2015-07-09 Thread Paolo Bonzini
On 09/07/2015 08:43, Laszlo Ersek wrote: > On 07/09/15 08:09, Paolo Bonzini wrote: >> >> >> On 09/07/2015 00:36, Bandan Das wrote: >>> Let userspace inquire the maximum physical address width >>> of the host processors; this can be used to identify maximum >>> memory that can be assigned to the g

Re: [Qemu-devel] [PATCH for-2.4] watchdog/diag288: correctly register for system reset requests

2015-07-09 Thread Cornelia Huck
On Wed, 8 Jul 2015 12:31:40 +0200 Cornelia Huck wrote: > On Wed, 8 Jul 2015 09:45:05 +0200 > Cornelia Huck wrote: > > > On Tue, 7 Jul 2015 14:11:18 -0700 > > Peter Crosthwaite wrote: > > > > Yes I see. I think it is a core code bug though and we want to avoid > > > having to patch individual

Re: [Qemu-devel] [PATCH] target-i386: Sanity check host processor physical address width

2015-07-09 Thread Igor Mammedov
On Wed, 08 Jul 2015 18:42:01 -0400 Bandan Das wrote: > > If a Linux guest is assigned more memory than is supported > by the host processor, the guest is unable to boot. That > is expected, however, there's no message indicating the user > what went wrong. This change prints a message to stderr

Re: [Qemu-devel] [PULL 27/28] migration: protect migration_bitmap

2015-07-09 Thread Paolo Bonzini
On 09/07/2015 10:14, Wen Congyang wrote: > > flush_compressed_data(f); > > ram_control_after_iterate(f, RAM_CONTROL_FINISH); > > -migration_end(); > > - > > rcu_read_unlock(); > > + > > +migration_end(); > > qemu_put_be64(f, RAM_SAVE_FLAG_EOS); > > Yes, this patch can

Re: [Qemu-devel] [PATCH v5] vhost-user: add multi queue support

2015-07-09 Thread Michael S. Tsirkin
On Thu, Jul 09, 2015 at 02:24:51PM +0200, Maxime Leroy wrote: > Hi Martin, Michael, > > On Thu, Jul 9, 2015 at 2:00 PM, Martin Kletzander wrote: > > On Thu, Jul 09, 2015 at 10:06:35AM +0300, Michael S. Tsirkin wrote: > >> > >> On Thu, Jul 09, 2015 at 12:00:59AM +0200, Maxime Leroy wrote: > >>> >

Re: [Qemu-devel] [Qemu-block] [PATCH 1/3] blockjob: Introduce block_job_relax_cpu

2015-07-09 Thread Stefan Hajnoczi
On Thu, Jul 09, 2015 at 11:47:56AM +0800, Fam Zheng wrote: > block_job_sleep_ns is called by block job coroutines to yield the > execution to VCPU threads and monitor etc. It is pointless to sleep for > 0 or a few nanoseconds, because that equals to a "yield + enter" with no > intermission in betwe

Re: [Qemu-devel] [PATCH 3/3] mirror: Speed up bitmap initial scanning

2015-07-09 Thread Stefan Hajnoczi
On Thu, Jul 09, 2015 at 11:47:58AM +0800, Fam Zheng wrote: > Limiting to sectors_per_chunk for each bdrv_is_allocated_above is slow, > because the underlying protocol driver would issue much more queries > than necessary. We should coalesce the query. > > Signed-off-by: Fam Zheng > --- > block/m

Re: [Qemu-devel] [Qemu-block] [PATCH 2/3] mirror: Use block_job_relax_cpu during bitmap scanning

2015-07-09 Thread Stefan Hajnoczi
On Thu, Jul 09, 2015 at 11:47:57AM +0800, Fam Zheng wrote: > Sleeping for 0 second may not be as effective as we want, use > block_job_relax_cpu. > > Signed-off-by: Fam Zheng > --- > block/mirror.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi pgpVTPfKr

Re: [Qemu-devel] [Qemu-block] [PATCH 0/3] mirror: Fix guest responsiveness during bitmap scan

2015-07-09 Thread Stefan Hajnoczi
On Thu, Jul 09, 2015 at 11:47:55AM +0800, Fam Zheng wrote: > This supersedes: > > http://patchwork.ozlabs.org/patch/491415/ > > and [1] which is currently in Jeff's tree. > > Although [1] fixed the QMP responsiveness, Alexandre DERUMIER reported that > guest responsiveness still suffers when we

Re: [Qemu-devel] [PATCH] target-i386: Sanity check host processor physical address width

2015-07-09 Thread Paolo Bonzini
On 09/07/2015 10:26, Laszlo Ersek wrote: >> > >> > Perhaps KVM could simply hide memory above the limit (i.e. treat it as >> > MMIO), and the BIOS could remove RAM above the limit from the e820 >> > memory map? > I'd prefer to leave the guest firmware*s* out of this... :) > > E820 is a legacy B

Re: [Qemu-devel] [PATCH v4 4/7] pc: fix QEMU crashing when more than ~50 memory hotplugged

2015-07-09 Thread Michael S. Tsirkin
On Thu, Jul 09, 2015 at 01:47:21PM +0200, Igor Mammedov wrote: > QEMU asserts in vhost due to hitting vhost backend limit > on number of supported memory regions. > > Describe all hotplugged memory as one continuos range > to vhost with linear 1:1 HVA->GPA mapping in backend. > > Signed-off-by: I

  1   2   3   >