[Qemu-devel] [PATCH 19/18] Introduce "xen-load-devices-state"

2014-10-24 Thread Wen Congyang
Introduce a "xen-load-devices-state" QAPI command that can be used to load the state of all devices, but not the RAM or the block devices of the VM. We only have hmp commands savevm/loadvm, and qmp commands xen-save-devices-state. We use this new command for COLO: 1. suspend both primay vm and se

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/4] os-posix: report error message when lock file failed

2014-10-24 Thread Michael Tokarev
On 09/25/2014 01:46 PM, arei.gong...@huawei.com wrote: > From: Gonglei > > It will cause that create vm failed When manager > tool is killed forcibly (kill -9 libvirtd_pid), > the file not was unlink, and unlock. It's better > that report the error message for users. > > Signed-off-by: Huangweid

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-10-24 Thread Chen, Tiejun
On 2014/10/12 17:50, Michael S. Tsirkin wrote: On Thu, Oct 09, 2014 at 01:53:16PM +0800, Chen, Tiejun wrote: On 2014/10/7 15:26, Michael S. Tsirkin wrote: On Tue, Sep 30, 2014 at 10:43:09AM +0800, Chen, Tiejun wrote: On 2014/9/29 18:01, Michael S. Tsirkin wrote: On Sun, Sep 28, 2014 at 10:5

Re: [Qemu-devel] [Qemu-trivial] [PATCH] target-ppc: kvm: Fix memory overflow issue about strncat()

2014-10-24 Thread Michael Tokarev
On 10/13/2014 06:47 PM, Alexander Graf wrote: > On 13.10.14 16:36, Chen Gang wrote: >> strncat() will append additional '\0' to destination buffer, so need >> additional 1 byte for it, or may cause memory overflow, just like other >> area within QEMU have done. >> >> Signed-off-by: Chen Gang > >

Re: [Qemu-devel] [Qemu-trivial] [PATCH] target-ppc: kvm: Fix memory overflow issue about strncat()

2014-10-24 Thread Alexander Graf
> Am 24.10.2014 um 09:49 schrieb Michael Tokarev : > >> On 10/13/2014 06:47 PM, Alexander Graf wrote: >>> On 13.10.14 16:36, Chen Gang wrote: >>> strncat() will append additional '\0' to destination buffer, so need >>> additional 1 byte for it, or may cause memory overflow, just like other >>>

Re: [Qemu-devel] [Qemu-trivial] [PATCH] target-ppc: kvm: Fix memory overflow issue about strncat()

2014-10-24 Thread Chen Gang
On 10/24/14 15:49, Michael Tokarev wrote: > On 10/13/2014 06:47 PM, Alexander Graf wrote: >> On 13.10.14 16:36, Chen Gang wrote: >>> strncat() will append additional '\0' to destination buffer, so need >>> additional 1 byte for it, or may cause memory overflow, just like other >>> area within QEMU

[Qemu-devel] [RFC 0/3] qemu-char: Add poll timeouts for character backends

2014-10-24 Thread Heinz Graalfs
On s390 one can observe system hang situations wrt console input when using 'dataplane=on'. dataplane processing causes an inactive main thread and an active dataplane thread. When a character backend descriptor disappears from the main thread's poll() descriptor array (when can_read() returns 0)

[Qemu-devel] [RFC 3/3] s390x: Avoid hanging SCLP ASCII console

2014-10-24 Thread Heinz Graalfs
Exploit the new can_read timeout infrastructure in order to avoid hangs when no further activity happens on the main thread. Signed-off-by: Heinz Graalfs --- hw/char/sclpconsole.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsol

[Qemu-devel] [RFC 2/3] s390x: Fix hanging SCLP line mode console

2014-10-24 Thread Heinz Graalfs
Exploit the new can_read timeout infrastructure in order to avoid hangs when no further activity happens on the main thread. Signed-off-by: Heinz Graalfs --- hw/char/sclpconsole-lm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpco

[Qemu-devel] [RFC 1/3] char: Trigger timeouts on poll() when frontend is unready

2014-10-24 Thread Heinz Graalfs
When a character frontend returns zero on 'can_read' poll() goes on without the backend's descriptor. The remaining active descriptors may not be a part of the main thread's poll; for example, if dataplane is active, activity may only be ongoing on the dataplane thread. This patch changes the cha

[Qemu-devel] is qemu-2.1 support 1G hugepage

2014-10-24 Thread Linhaifeng
Hi, I run qemu2.1 with 1G hugepage and found that VM can't start (too slowly?) but can start with 2M hugepage quickly. kernel version:3.10.0-123.6.3.el7.x86_64 command:qemu-kvm -name vm1 -enable-kvm -smp 2 -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/dev/hugepages,share=on -

Re: [Qemu-devel] [PATCH RFC 00/11] qemu: towards virtio-1 host support

2014-10-24 Thread Cornelia Huck
On Fri, 24 Oct 2014 00:42:20 +0300 "Michael S. Tsirkin" wrote: > On Tue, Oct 07, 2014 at 04:39:56PM +0200, Cornelia Huck wrote: > > This patchset aims to get us some way to implement virtio-1 compliant > > and transitional devices in qemu. Branch available at > > > > git://github.com/cohuck/qemu

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/4] os-posix: report error message when lock file failed

2014-10-24 Thread Gonglei
On 2014/10/24 15:32, Michael Tokarev wrote: > On 09/25/2014 01:46 PM, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> It will cause that create vm failed When manager >> tool is killed forcibly (kill -9 libvirtd_pid), >> the file not was unlink, and unlock. It's better >> that report the er

Re: [Qemu-devel] [PATCH] libqos: Convert malloc-pc allocator to a generic allocator

2014-10-24 Thread Marc Marí
El Thu, 23 Oct 2014 18:49:03 -0400 John Snow escribió: > Reviewed-by: John Snow Did you mean this for the v2, which has the extra free? Marc

[Qemu-devel] [PATCH 2/2] spice-char: notify the server when chardev is writable

2014-10-24 Thread Marc-André Lureau
The spice server is polling on write, unless SPICE_CHAR_DEVICE_NOTIFY_WRITABLE flag is set. In this case, qemu must call spice_server_char_device_wakeup() when the frontend is writable. Signed-off-by: Marc-André Lureau --- spice-qemu-char.c | 11 +++ 1 file changed, 11 insertions(+) dif

[Qemu-devel] [PATCH 1/2] virtio-console: notify chardev when writable

2014-10-24 Thread Marc-André Lureau
When the virtio serial is writable, notify the chardev backend with qemu_chr_accept_input(). Signed-off-by: Marc-André Lureau --- Note: This patch depends on Amit Shah patch: "virtio: serial: expose a 'guest_writable' callback for users" hw/char/virtio-console.c | 10 ++ 1 file changed

Re: [Qemu-devel] is it possible to use a disk with multiple iothreads ?

2014-10-24 Thread Stefan Hajnoczi
On Thu, Oct 23, 2014 at 08:26:17PM +0200, Alexandre DERUMIER wrote: > I was reading this interesting presentation, > > http://vmsplice.net/~stefan/stefanha-kvm-forum-2014.pdf > > and I have a specific question. > > > I'm currently evaluate ceph/rbd storage performance through qemu, > > and t

Re: [Qemu-devel] [RFC 0/3] qemu-char: Add poll timeouts for character backends

2014-10-24 Thread Paolo Bonzini
On 10/24/2014 10:13 AM, Heinz Graalfs wrote: > On s390 one can observe system hang situations wrt console input when > using 'dataplane=on'. > > dataplane processing causes an inactive main thread and an active > dataplane thread. > > When a character backend descriptor disappears from the main t

Re: [Qemu-devel] [PATCH] vfio: check if host device supports INTx

2014-10-24 Thread Frank Blaschka
On Thu, Oct 23, 2014 at 08:26:51AM -0600, Alex Williamson wrote: > On Thu, 2014-10-23 at 10:21 +0200, Frank Blaschka wrote: > > On Wed, Oct 22, 2014 at 11:17:11AM -0600, Alex Williamson wrote: > > > On Wed, 2014-10-22 at 17:13 +0200, Frank Blaschka wrote: > > > > From: Frank Blaschka > > > > > >

Re: [Qemu-devel] [PATCH 01/20] target-mips: add MSA defines and data structure

2014-10-24 Thread Yongbok Kim
Hi, On 22/10/2014 12:35, James Hogan wrote: +union wr_t { +int8_t b[MSA_WRLEN/8]; +int16_t h[MSA_WRLEN/16]; +int32_t w[MSA_WRLEN/32]; +int64_t d[MSA_WRLEN/64]; This is incorrect on a big endian host. The least significant bits of the lowest indexed element should always alias.

[Qemu-devel] [Bug 1384892] Re: RTL8168 NIC VFIO not working anymore since QEMU 2.1

2014-10-24 Thread Florian Wickert
I disabled vfio_probe_rtl8168_bar2_window_quirk() as you suggested and indeed, the problem is gone now using QEMU 2.1.2. RTL really isn't the best choice, I guess. Thanks for your quick reply! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed t

Re: [Qemu-devel] [PATCH v4 16/47] Return path: Source handling of return path

2014-10-24 Thread Paolo Bonzini
On 10/23/2014 08:00 PM, Dr. David Alan Gilbert wrote: >>> > > +static bool migration_already_active(MigrationState *ms) >>> > > +{ >>> > > +switch (ms->state) { >>> > > +case MIG_STATE_ACTIVE: >>> > > +case MIG_STATE_SETUP: >>> > > +return true; >>> > > + >>> > > +default:

[Qemu-devel] [PATCH v4 3/3] iotests: Add test for external image truncation

2014-10-24 Thread Max Reitz
It should not be happening, but it is possible to truncate an image outside of qemu while qemu is running (or any of the qemu tools using the block layer. raw_co_get_block_status() should not break then. While touching this test, replace the existing "truncate" invocation by "$QEMU_IMG convert -f

[Qemu-devel] [PATCH v4 0/3] raw-posix: Fix raw_co_get_block_status()

2014-10-24 Thread Max Reitz
raw_co_get_block_status() should return 0 and set *pnum to 0 after the EOF; currently it does this merely by accident, so implement it directly. Also, nb_sectors should be clamped against the image end. While doing that, centralize the generation of raw_co_get_block_status()'s return value along t

[Qemu-devel] [PATCH v4 1/3] raw-posix: Fix raw_co_get_block_status() after EOF

2014-10-24 Thread Max Reitz
As its comment states, raw_co_get_block_status() should unconditionally return 0 and set *pnum to 0 for after EOF. An assertion after lseek(..., SEEK_HOLE) tried to catch this case by asserting that errno != -ENXIO (which would indicate a position after the EOF); but it should be errno != ENXIO in

[Qemu-devel] [PATCH v4 2/3] raw-posix: raw_co_get_block_status() return value

2014-10-24 Thread Max Reitz
Instead of generating the full return value thrice in try_fiemap(), try_seek_hole() and as a fall-back in raw_co_get_block_status() itself, generate the value only in raw_co_get_block_status(). While at it, also remove the pnum parameter from try_fiemap() and try_seek_hole(). Suggested-by: Kevin

Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support

2014-10-24 Thread Eduardo Habkost
On Fri, Oct 24, 2014 at 07:55:10AM +0200, Paolo Bonzini wrote: > > > On 10/24/2014 03:27 AM, Chao Peng wrote: > > On Thu, Oct 23, 2014 at 05:49:23PM -0200, Eduardo Habkost wrote: > >> On Thu, Oct 23, 2014 at 11:02:43AM +0800, Chao Peng wrote: > >> [...] > >>> @@ -707,6 +714,24 @@ typedef union {

Re: [Qemu-devel] [RFC 0/3] qemu-char: Add poll timeouts for character backends

2014-10-24 Thread Heinz Graalfs
On 24/10/14 11:15, Paolo Bonzini wrote: > On 10/24/2014 10:13 AM, Heinz Graalfs wrote: >> On s390 one can observe system hang situations wrt console input when >> using 'dataplane=on'. >> >> dataplane processing causes an inactive main thread and an active >> dataplane thread. >> >> When a characte

[Qemu-devel] [PULL 00/23] target-arm queue

2014-10-24 Thread Peter Maydell
tags/pull-target-arm-20141024 for you to fetch changes up to dbe9d1636787dd226d3f9a61c07fbc27e0db5bbf: target-arm: A32: Emulate the SMC instruction (2014-10-24 12:19:15 +0100) target-arm queue: * remove pointless 'info pcmci

[Qemu-devel] [PULL 16/23] target-arm: Report a valid L1Ip field in CTR_EL0 for CPU type "any"

2014-10-24 Thread Peter Maydell
For the CPU type "any" (only used with linux-user) we were reporting the L1Ip field as 0b00, which is reserved. Change this field to 0b10 instead, indicating a VIPT icache as the comment describes. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell Reviewed-by: Laurent Desnogues Messag

[Qemu-devel] [PULL 22/23] target-arm: make arm_current_el() return EL3

2014-10-24 Thread Peter Maydell
From: Fabian Aggeler Make arm_current_el() return EL3 for secure PL1 and monitor mode. Increase MMU modes since mmu_index is directly inferred from arm_ current_el(). Change assertion in arm_el_is_aa64() to allow EL3. Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows Reviewed-by: Peter

[Qemu-devel] [PULL 12/23] target-arm: Add support for A32 and T32 HVC and SMC insns

2014-10-24 Thread Peter Maydell
Add support for HVC and SMC instructions to the A32 and T32 decoder. Using these for real exceptions to EL2 or EL3 is currently not supported (the do_interrupt routine does not handle them) but we require the instruction support to implement PSCI. Signed-off-by: Peter Maydell Message-id: 14128650

[Qemu-devel] [PULL 08/23] target-arm: add powered off cpu state

2014-10-24 Thread Peter Maydell
From: Rob Herring Add tracking of cpu power state in order to support powering off of cores in system emuluation. The initial state is determined by the start-powered-off QOM property. Signed-off-by: Rob Herring Reviewed-by: Peter Maydell Signed-off-by: Ard Biesheuvel Signed-off-by: Peter May

[Qemu-devel] [PULL 14/23] arm/virt: enable PSCI emulation support for system emulation

2014-10-24 Thread Peter Maydell
From: Rob Herring Now that we have PSCI emulation, enable it for the virt platform. This simplifies the virt machine a bit now that PSCI no longer needs to be a KVM only feature. Signed-off-by: Rob Herring Signed-off-by: Ard Biesheuvel Signed-off-by: Peter Maydell Message-id: 1412865028-17725

[Qemu-devel] [PULL 15/23] target-arm: Correct sense of the DCZID DZP bit

2014-10-24 Thread Peter Maydell
The DZP bit in the DCZID system register should be set if the control bits which prohibit use of the DC ZVA instruction have been set (it stands for Data Zero Prohibited). However we had the sense of the test inverted; fix this so that the bit reads correctly. To avoid this regressing the behaviou

[Qemu-devel] [PULL 10/23] target-arm: add missing PSCI constants needed for PSCI emulation

2014-10-24 Thread Peter Maydell
From: Ard Biesheuvel This adds some PSCI function IDs and symbolic return codes that are needed to implement PSCI emulation in TCG mode. Reviewed-by: Peter Maydell Signed-off-by: Ard Biesheuvel Signed-off-by: Peter Maydell Message-id: 1412865028-17725-4-git-send-email-peter.mayd...@linaro.org

[Qemu-devel] [PULL 09/23] target-arm: do not set do_interrupt handlers for ARM and AArch64 user modes

2014-10-24 Thread Peter Maydell
From: Rob Herring User mode emulation should never get interrupts and thus should not use the system emulation exception handler function. Remove the reference, and '#ifndef USER_MODE_ONLY' the function itself as well, so that we can add system mode only functionality to it. Signed-off-by: Rob H

[Qemu-devel] [PULL 17/23] target-arm: correctly UNDEF writes to FPINST/FPINST2 from EL0

2014-10-24 Thread Peter Maydell
The ARM ARM requires that the FPINST and FPINST2 VFP control registers are not accessible to code at EL0. We were already correctly implementing this for reads of these registers; add the missing check for the write code path. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell Reviewed-

[Qemu-devel] [PULL 11/23] target-arm: Handle SMC/HVC undef-if-no-ELx in pre_* helpers

2014-10-24 Thread Peter Maydell
SMC must UNDEF if EL3 is not implemented; similarly HVC UNDEFs if EL2 is not implemented. Move the handling of this from translate-a64.c into the pre_smc and pre_hvc helper functions. This is necessary because use of these instructions for PSCI takes precedence over this UNDEF case, and we can't te

[Qemu-devel] [PULL 13/23] target-arm: add emulation of PSCI calls for system emulation

2014-10-24 Thread Peter Maydell
From: Rob Herring Add support for handling PSCI calls in system emulation. Both version 0.1 and 0.2 of the PSCI spec are supported. Platforms can enable support by setting the "psci-conduit" QOM property on the cpus to SMC or HVC emulation and having a PSCI binding in their dtb. Signed-off-by: R

[Qemu-devel] [PULL 23/23] target-arm: A32: Emulate the SMC instruction

2014-10-24 Thread Peter Maydell
From: Fabian Aggeler Implements SMC instruction in AArch32 using the A32 syndrome. When executing SMC instruction from monitor CPU mode SCR.NS bit is reset. Signed-off-by: Sergey Fedorov Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows Message-id: 1413910544-20150-7-git-send-email-gr

[Qemu-devel] [PULL 07/23] omap_gpmc.c: Remove duplicate assignment

2014-10-24 Thread Peter Maydell
From: "Dr. David Alan Gilbert" This looks like an old merge error and should have no effect. (Build tested only) Found by Coccinelle using Julia Lawall's script: https://lkml.org/lkml/2014/8/23/128 Signed-off-by: Dr. David Alan Gilbert Message-id: 1414055855-6688-1-git-send-email-dgilb...@redh

[Qemu-devel] [PULL 18/23] target-arm: increase arrays of registers R13 & R14

2014-10-24 Thread Peter Maydell
From: Fabian Aggeler Increasing banked_r13 and banked_r14 to store LR_mon and SP_mon (bank index 7). Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell Message-id: 1413910544-20150-2-git-send-email-greg.bell...@linaro.org Signed-off-by: Peter Maydell --- ta

[Qemu-devel] [PULL 20/23] target-arm: reject switching to monitor mode

2014-10-24 Thread Peter Maydell
From: Sergey Fedorov Reject switching to monitor mode from non-secure state. Signed-off-by: Sergey Fedorov Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows Reviewed-by: Edgar E. Iglesias Reviewed-by: Peter Maydell Message-id: 1413910544-20150-4-git-send-email-greg.bell...@linaro.or

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

2014-10-24 Thread Peter Maydell
On 23 October 2014 21:42, Kevin Wolf wrote: > The following changes since commit e40830afa1cff3ffdc37bdfdd40d80860074636c: > > Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2014-10-22-tag' > into staging (2014-10-22 21:42:33 +0100) > > are available in the git repository at: > > >

[Qemu-devel] [PULL 21/23] target-arm: rename arm_current_pl to arm_current_el

2014-10-24 Thread Peter Maydell
From: Greg Bellows Renamed the arm_current_pl CPU function to more accurately represent that it returns the ARMv8 EL rather than ARMv7 PL. Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell Message-id: 1413910544-20150-5-git-send-email-greg.bell...@linaro.org [PMM: fixed a minor merge reso

[Qemu-devel] [PULL 05/23] arm_gic: remove unused parameter.

2014-10-24 Thread Peter Maydell
From: KONRAD Frederic This removes num_irq parameter from gic_init_irqs_and_distributor as it is not used. Signed-off-by: KONRAD Frederic Message-id: 1412859651-15060-1-git-send-email-fred.kon...@greensocs.com Signed-off-by: Peter Maydell --- hw/intc/arm_gic.c | 4 ++-- hw/intc/armv7m_nv

[Qemu-devel] [PULL 01/23] hmp: Remove "info pcmcia"

2014-10-24 Thread Peter Maydell
From: Markus Armbruster This command lists PCMCIA sockets and cards. Only a few ARM boards have sockets (akita, borzoi, connex, mainstone, spitz, terrier, tosa, verdex, z2), the only card is the DSCM-1 Hitachi Microdrive (qdev "microdrive"), and it is only inserted during machine init, if ev

[Qemu-devel] [PULL 19/23] target-arm: add arm_is_secure() function

2014-10-24 Thread Peter Maydell
From: Fabian Aggeler arm_is_secure() function allows to determine CPU security state if the CPU implements Security Extensions/EL3. arm_is_secure_below_el3() returns true if CPU is in secure state below EL3. Signed-off-by: Sergey Fedorov Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellow

[Qemu-devel] [PULL 02/23] hw/arm/virt: mark timer in fdt as v8-compatible

2014-10-24 Thread Peter Maydell
From: Claudio Fontana check if the first cpu is an armv8 cpu, and if so, put arm,armv8-timer in the compatible string list. Note that due to this check, this patch moves the creation of the timer fdt node to after the cpu creation loop. Signed-off-by: Claudio Fontana Message-id: 1411736960-242

[Qemu-devel] [PULL 04/23] disas/libvixl: Update to libvixl 1.6

2014-10-24 Thread Peter Maydell
Update our copy of libvixl to upstream 1.6. There are no changes of any particular interest to QEMU, so this is simply keeping up with current upstream. Signed-off-by: Peter Maydell Message-id: 1412091418-25744-1-git-send-email-peter.mayd...@linaro.org --- disas/arm-a64.cc |

[Qemu-devel] [PULL 06/23] disas/libvixl/a64/instructions-a64.h: Remove unused constants

2014-10-24 Thread Peter Maydell
From: Chen Gang The instructions-a64.h header defines a number of floating point constants whose initializers are function calls. gcc 5 will warn if these constants are not used by the C or C++ file which includes the header, because they imply a runtime cost. Since for the files QEMU uses from l

Re: [Qemu-devel] BlockBackend next steps

2014-10-24 Thread Stefan Hajnoczi
On Thu, Oct 23, 2014 at 02:16:37PM +0200, Markus Armbruster wrote: > "Need BlockBackend" has been a recurring theme for a long time. It's > finally on master now. Plenty of work left to do. Let's coordinate > next steps to avoid duplicate work. Great job. Thanks for sending this email. I have

[Qemu-devel] [PULL 03/23] hw/arm/boot: register cpu reset handlers if using -bios

2014-10-24 Thread Peter Maydell
From: Ard Biesheuvel Move the registering of CPU reset handlers to before the point where we leave the function in the -bios (not -kernel) case, so CPU reset works correctly with -bios as well. Signed-off-by: Ard Biesheuvel Signed-off-by: Peter Maydell --- hw/arm/boot.c | 17 -

Re: [Qemu-devel] [PATCH] target-i386: add Intel AVX-512 support

2014-10-24 Thread Paolo Bonzini
On 10/24/2014 01:12 PM, Eduardo Habkost wrote: >> > I think we can keep the macros. The actual cleanup would be to have a >> > single member for the 32 512-bit ZMM registers, instead of splitting >> > xmm/ymmh/zmmh/zmm_hi16. This will get rid of the YMM_* and ZMM_* >> > registers. However, we

Re: [Qemu-devel] [PATCH RFC 00/11] qemu: towards virtio-1 host support

2014-10-24 Thread Cornelia Huck
On Fri, 24 Oct 2014 10:38:39 +0200 Cornelia Huck wrote: > On Fri, 24 Oct 2014 00:42:20 +0300 > "Michael S. Tsirkin" wrote: > > > On Tue, Oct 07, 2014 at 04:39:56PM +0200, Cornelia Huck wrote: > > > This patchset aims to get us some way to implement virtio-1 compliant > > > and transitional devi

[Qemu-devel] [PATCH v3 01/15] target-mips: add KScratch registers

2014-10-24 Thread Leon Alrae
KScratch Registers (CP0 Register 31, Selects 2 to 7) The KScratch registers are read/write registers available for scratch pad storage by kernel mode software. They are 32-bits in width for 32-bit processors and 64-bits for 64-bit processors. CP0Config4.KScrExist[2:7] bits indicate presence of CP

[Qemu-devel] [PATCH v3 05/15] target-mips: update PageGrain and m{t, f}c0 EntryLo{0, 1}

2014-10-24 Thread Leon Alrae
PageGrain needs rw bitmask which differs between MIPS architectures. In pre-R6 if RIXI is supported, PageGrain.XIE and PageGrain.RIE are writeable, whereas in R6 they are read-only 1. On MIPS64 mtc0 instruction left shifts bits 31:30 for MIPS32 backward compatiblity, therefore there are separate m

[Qemu-devel] [PATCH v3 00/15] target-mips: add features required in MIPS64R6

2014-10-24 Thread Leon Alrae
This is the next version of patchset containing mainly MIPS64R6 Privileged Resource Architecture changes and it complements the existing MIPS64R6 support in QEMU. This patchset is concatenated from the following series which have been on the mailing list for a while: http://lists.gnu.org/archive/h

[Qemu-devel] [PATCH v3 15/15] target-mips: enable features in MIPS64R6-generic CPU

2014-10-24 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Yongbok Kim --- target-mips/translate_init.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c index bcfc46a..0b70d05 100644 --- a/target-mips/translate_init.c +++ b/t

[Qemu-devel] [PATCH v3 03/15] target-mips: distinguish between data load and instruction fetch

2014-10-24 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Yongbok Kim --- target-mips/helper.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/target-mips/helper.c b/target-mips/helper.c index fe16820..1c9e69d 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c

[Qemu-devel] [PATCH v3 02/15] softmmu: provide softmmu access type enum

2014-10-24 Thread Leon Alrae
New MIPS features depend on the access type and enum is more convenient than using the numbers directly. Signed-off-by: Leon Alrae --- include/exec/cpu-common.h | 6 ++ softmmu_template.h| 26 -- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [PATCH v3 07/15] target-mips: add TLBINV support

2014-10-24 Thread Leon Alrae
For Standard TLB configuration (Config.MT=1): TLBINV invalidates a set of TLB entries based on ASID. The virtual address is ignored in the entry match. TLB entries which have their G bit set to 1 are not modified. TLBINVF causes all entries to be invalidated. Single TLB entry can be marked as in

[Qemu-devel] [PATCH v3 09/15] target-mips: update cpu_save/cpu_load to support new registers

2014-10-24 Thread Leon Alrae
Signed-off-by: Leon Alrae --- target-mips/cpu.h | 2 +- target-mips/machine.c | 26 +- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 4687f4f..c66a725 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @

[Qemu-devel] [PATCH v3 06/15] target-mips: add new Read-Inhibit and Execute-Inhibit exceptions

2014-10-24 Thread Leon Alrae
An Execute-Inhibit exception occurs when the virtual address of an instruction fetch matches a TLB entry whose XI bit is set. This exception type can only occur if the XI bit is implemented within the TLB and is enabled, this is denoted by the PageGrain XIE bit. An Read-Inhibit exception occurs wh

[Qemu-devel] [PATCH v3 04/15] target-mips: add RI and XI fields to TLB entry

2014-10-24 Thread Leon Alrae
In Revision 3 of the architecture, the RI and XI bits were added to the TLB to enable more secure access of memory pages. These bits (along with the Dirty bit) allow the implementation of read-only, write-only, no-execute access policies for mapped pages. Signed-off-by: Leon Alrae --- target-mip

[Qemu-devel] [PATCH v3 12/15] target-mips: CP0_Status.CU0 no longer allows the user to access CP0

2014-10-24 Thread Leon Alrae
Signed-off-by: Leon Alrae Reviewed-by: Yongbok Kim --- target-mips/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 6367d8c..3b975eb 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -790,7 +790,8 @@ static inline voi

[Qemu-devel] [PATCH v3 10/15] target-mips: add Config5.SBRI

2014-10-24 Thread Leon Alrae
SDBBP instruction Reserved Instruction control. The purpose of this field is to restrict availability of SDBBP to kernel mode operation. If the bit is set then SDBBP instruction can only be executed in kernel mode. User execution of SDBBP will cause a Reserved Instruction exception. Additionally

[Qemu-devel] [PATCH v3 08/15] target-mips: add BadInstr and BadInstrP support

2014-10-24 Thread Leon Alrae
BadInstr Register (CP0 Register 8, Select 1) The BadInstr register is a read-only register that capture the most recent instruction which caused an exception. BadInstrP Register (CP0 Register 8, Select 2) The BadInstrP register contains the prior branch instruction, when the faulting instruction i

[Qemu-devel] [PATCH v3 11/15] target-mips: implement forbidden slot

2014-10-24 Thread Leon Alrae
When conditional compact branch is encountered decode one more instruction in current translation block - that will be forbidden slot. Instruction in forbidden slot will be executed only if conditional compact branch is not taken. Any control transfer instruction (CTI) which are branches, jumps, E

[Qemu-devel] [PATCH v3 14/15] target-mips: correctly handle access to unimplemented CP0 register

2014-10-24 Thread Leon Alrae
Release 6 limits the number of cases where software can cause UNDEFINED or UNPREDICTABLE behaviour. In this case, when accessing reserved / unimplemented CP0 register, writes are ignored and reads return 0. In pre-R6 the behaviour is not specified, but generating RI exception is not what the real

[Qemu-devel] [PATCH v3 13/15] target-mips: add restrictions for possible values in registers

2014-10-24 Thread Leon Alrae
In Release 6 not all the values are allowed to be written to a register. If the value is not valid or unsupported then it should stay unchanged. For pre-R6 the existing behaviour has been changed only for CP0_Index register as the current implementation does not seem to be correct - it looks like

Re: [Qemu-devel] [PULL 00/23] target-arm queue

2014-10-24 Thread Peter Maydell
ble in the git repository at: > > > git://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20141024 > > for you to fetch changes up to dbe9d1636787dd226d3f9a61c07fbc27e0db5bbf: > > target-arm: A32: Em

Re: [Qemu-devel] BlockBackend next steps

2014-10-24 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Thu, Oct 23, 2014 at 02:16:37PM +0200, Markus Armbruster wrote: >> "Need BlockBackend" has been a recurring theme for a long time. It's >> finally on master now. Plenty of work left to do. Let's coordinate >> next steps to avoid duplicate work. > > Great job. Than

Re: [Qemu-devel] [PATCH 01/20] target-mips: add MSA defines and data structure

2014-10-24 Thread Leon Alrae
On 24/10/2014 10:35, Yongbok Kim wrote: > Hi, > > On 22/10/2014 12:35, James Hogan wrote: >> +union wr_t { >> +int8_t b[MSA_WRLEN/8]; >> +int16_t h[MSA_WRLEN/16]; >> +int32_t w[MSA_WRLEN/32]; >> +int64_t d[MSA_WRLEN/64]; >> This is incorrect on a big endian host. The least signifi

Re: [Qemu-devel] [PATCH] target-mips: add ULL suffix in bitswap to avoid compiler warning

2014-10-24 Thread Peter Maydell
On 22 October 2014 14:00, Leon Alrae wrote: > Signed-off-by: Leon Alrae > --- > target-mips/op_helper.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c > index 5204ed8..9ec548c 100644 > --- a/target-mips/op_h

Re: [Qemu-devel] [PATCH] MAINTAINERS: add myself as MIPS guest cores co-maintainer

2014-10-24 Thread Peter Maydell
On 16 October 2014 16:11, Aurelien Jarno wrote: > On Thu, Oct 16, 2014 at 12:38:07PM +0100, Leon Alrae wrote: >> Add myself to the maintainer list for MIPS guest cores and update the status >> from "Odd Fixes" to "Maintained". >> >> Signed-off-by: Leon Alrae >> --- >> MAINTAINERS | 3 ++- >> 1 f

Re: [Qemu-devel] [PATCH] MAINTAINERS: add myself under 'general project admin' section

2014-10-24 Thread Peter Maydell
On 15 October 2014 21:30, Peter Maydell wrote: > Signed-off-by: Peter Maydell > --- > Update the 'general project admin' section to include me as > well as Anthony, given that I've been in practice doing a > bunch of said admin, and the general consensus at the QEMU > Summit yesterday seemed to t

Re: [Qemu-devel] is it possible to use a disk with multiple iothreads ?

2014-10-24 Thread Alexandre DERUMIER
>>virtio-blk and virtio-scsi emulation only runs in 1 thread at a time. >>It is currently not possible to achieve true multiqueue from guest, >>through QEMU, and down to the host. >> >>This is what the final slides in my presentation were about. Ok Thanks ! >>Regarding Ceph, do you know why it b

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-10-24 Thread Michael S. Tsirkin
On Fri, Oct 24, 2014 at 03:36:20PM +0800, Chen, Tiejun wrote: > >I think the point was mostly to reserve 1f to prevent > >devices from using it. > >As we populate slots in order it doesn't seem to important ... > > If we populate slot at !1f GFX driver can't find this ISA bridge. Right, but I mea

[Qemu-devel] [PATCH v14 00/14] qemu-img: Implement commit like QMP

2014-10-24 Thread Max Reitz
qemu-img should use QMP commands whenever possible in order to ensure feature completeness of both online and offline image operations. For the "commit" command, this is relatively easy, so implement it first (in the hope that indeed others will follow). As qemu-img does not have access to QMP (du

[Qemu-devel] [PATCH v14 03/14] qcow2: Optimize bdrv_make_empty()

2014-10-24 Thread Max Reitz
bdrv_make_empty() is currently only called if the current image represents an external snapshot that has been committed to its base image; it is therefore unlikely to have internal snapshots. In this case, bdrv_make_empty() can be greatly sped up by emptying the L1 and refcount table (while having

[Qemu-devel] [PATCH v14 02/14] qcow2: Implement bdrv_make_empty()

2014-10-24 Thread Max Reitz
Implement this function by making all clusters in the image file fall through to the backing file (by using the recently extended discard). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- block/qcow2.c | 27 +++ 1 file changed, 27 insertions

[Qemu-devel] [PATCH v14 07/14] block/mirror: Improve progress report

2014-10-24 Thread Max Reitz
Instead of taking the total length of the block device as the block job's length, use the number of dirty sectors. The progress is now the number of sectors mirrored to the target block device. Note that this may result in the job's length increasing during operation, which is however in fact desir

[Qemu-devel] [PATCH v14 01/14] qcow2: Allow "full" discard

2014-10-24 Thread Max Reitz
Normally, discarded sectors should read back as zero. However, there are cases in which a sector (or rather cluster) should be discarded as if they were never written in the first place, that is, reading them should fall through to the backing file again. Signed-off-by: Max Reitz Reviewed-by: Eri

[Qemu-devel] [PATCH v14 04/14] blockjob: Introduce block_job_complete_sync()

2014-10-24 Thread Max Reitz
Implement block_job_complete_sync() by doing the exact same thing as block_job_cancel_sync() does, only with calling block_job_complete() instead of block_job_cancel(). Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- blockjob.c | 39 --- in

[Qemu-devel] [PATCH v14 06/14] iotests: Omit length/offset test in 040 and 041

2014-10-24 Thread Max Reitz
As of a follow-up patch to this one, the length of a mirror block job will no longer directly depend on the size of the block device; therefore, drop these checks from this test. Instead, just check whether the final offset equals the block job length. As 041 uses the wait_until_completed function

[Qemu-devel] [PATCH v14 11/14] qemu-img: Specify backing file for commit

2014-10-24 Thread Max Reitz
Introduce a new parameter for qemu-img commit which may be used to explicitly specify the backing file into which an image should be committed if the backing chain has more than a single layer. Signed-off-by: Max Reitz --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 32 +++

[Qemu-devel] [PATCH v14 10/14] qemu-img: Enable progress output for commit

2014-10-24 Thread Max Reitz
Implement progress output for the commit command by querying the progress of the block job. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 23 +-- qemu-img.texi| 2 +- 3 files changed, 24 inse

[Qemu-devel] [PATCH v14 05/14] blockjob: Add "ready" field

2014-10-24 Thread Max Reitz
When a block job signals readiness, this is currently reported only through QMP. If qemu wants to use block jobs for internal tasks, there needs to be another way to correctly detect when a block job may be completed. For this reason, introduce a bool "ready" which is set when the block job may be

[Qemu-devel] [PATCH v14 09/14] qemu-img: Empty image after commit

2014-10-24 Thread Max Reitz
After the top image has been committed, it should be emptied unless specified otherwise. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 34 +++--- qemu-img.texi| 6 +- 3 files chan

[Qemu-devel] [PATCH v14 13/14] iotests: Add test for backing-chain commits

2014-10-24 Thread Max Reitz
Add a test for qemu-img commit on backing chains with more than two images. This test also checks whether the top image is emptied (unless this is prevented by specifying either -d or -b) and does therefore not work for qed and vmdk which requires it to be separate from 020. Signed-off-by: Max Rei

[Qemu-devel] [PATCH v14 08/14] qemu-img: Implement commit like QMP

2014-10-24 Thread Max Reitz
qemu-img should use QMP commands whenever possible in order to ensure feature completeness of both online and offline image operations. As qemu-img itself has no access to QMP (since this would basically require just everything being linked into qemu-img), imitate QMP's implementation of block-comm

[Qemu-devel] [PATCH v14 14/14] iotests: Add test for qcow2's bdrv_make_empty

2014-10-24 Thread Max Reitz
Add a test for qcow2's fast bdrv_make_empty implementation on images without internal snapshots. Signed-off-by: Max Reitz --- tests/qemu-iotests/098 | 82 ++ tests/qemu-iotests/098.out | 52 + tests/qemu-iotests/group

[Qemu-devel] [PATCH v14 12/14] iotests: Add _filter_qemu_img_map

2014-10-24 Thread Max Reitz
As different image formats most probably map guest addresses to different host addresses, add a filter to filter the host addresses out; also, the image filename should be filtered. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- tests/qemu-iotests/common.filter |

Re: [Qemu-devel] [PATCH v3 02/15] softmmu: provide softmmu access type enum

2014-10-24 Thread Thomas Huth
On Fri, 24 Oct 2014 13:42:16 +0100 Leon Alrae wrote: > New MIPS features depend on the access type and enum is more convenient than > using the numbers directly. > > Signed-off-by: Leon Alrae > --- > include/exec/cpu-common.h | 6 ++ > softmmu_template.h| 26 --

Re: [Qemu-devel] [PATCH RFC 00/11] qemu: towards virtio-1 host support

2014-10-24 Thread Michael S. Tsirkin
On Fri, Oct 24, 2014 at 02:37:08PM +0200, Cornelia Huck wrote: > On Fri, 24 Oct 2014 10:38:39 +0200 > Cornelia Huck wrote: > > > On Fri, 24 Oct 2014 00:42:20 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Tue, Oct 07, 2014 at 04:39:56PM +0200, Cornelia Huck wrote: > > > > This patchset aims

Re: [Qemu-devel] [PATCH 19/18] Introduce "xen-load-devices-state"

2014-10-24 Thread Eric Blake
On 10/24/2014 01:06 AM, Wen Congyang wrote: > Introduce a "xen-load-devices-state" QAPI command that can be used to load > the state of all devices, but not the RAM or the block devices of the > VM. > > We only have hmp commands savevm/loadvm, and qmp commands > xen-save-devices-state. > > We use

Re: [Qemu-devel] [PATCH v4 3/3] iotests: Add test for external image truncation

2014-10-24 Thread Eric Blake
On 10/24/2014 04:58 AM, Max Reitz wrote: > It should not be happening, but it is possible to truncate an image > outside of qemu while qemu is running (or any of the qemu tools using > the block layer. raw_co_get_block_status() should not break then. > > While touching this test, replace the exist

Re: [Qemu-devel] [PATCH RFC 00/11] qemu: towards virtio-1 host support

2014-10-24 Thread Michael S. Tsirkin
On Fri, Oct 24, 2014 at 10:38:39AM +0200, Cornelia Huck wrote: > On Fri, 24 Oct 2014 00:42:20 +0300 > "Michael S. Tsirkin" wrote: > > > On Tue, Oct 07, 2014 at 04:39:56PM +0200, Cornelia Huck wrote: > > > This patchset aims to get us some way to implement virtio-1 compliant > > > and transitional

  1   2   >