Re: [Qemu-devel] [PATCH 1/8] ipmi: fix SDR length value

2016-01-06 Thread Cédric Le Goater
On 01/05/2016 08:59 PM, Eric Blake wrote: > On 01/05/2016 10:29 AM, Cédric Le Goater wrote: > > [meta-comment] Your messages were not marked in-reply-to: the 0/8 cover > letter, but came through as separate threads. This makes it harder to > follow, especially in mail clients that sort top-level

Re: [Qemu-devel] [PATCH for v2.3.0] fw_cfg: add check to validate current entry value

2016-01-06 Thread P J P
+-- On Wed, 6 Jan 2016, 朱东海(启路) wrote --+ | Hi, Will you assign a cve to this vulnerability. Yes, I will once the patch is approved upstream. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

[Qemu-devel] [PATCH] virtio serial port: fix to incomplete QOMify

2016-01-06 Thread Cao jin
Signed-off-by: Cao jin --- hw/char/virtio-serial-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 497b0af..2d2a659 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -798,7 +798,7 @

Re: [Qemu-devel] [PATCH] virtio serial port: fix to incomplete QOMify

2016-01-06 Thread Greg Kurz
On Wed, 6 Jan 2016 16:22:55 +0800 Cao jin wrote: > Signed-off-by: Cao jin > --- Reviewed-by: Greg Kurz > hw/char/virtio-serial-bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c > index 497b0af..2d2a659 10

Re: [Qemu-devel] [PATCH 3/6] device_tree: introduce qemu_fdt_node_path

2016-01-06 Thread Eric Auger
On 01/05/2016 06:55 PM, Peter Maydell wrote: > On 5 January 2016 at 16:20, Eric Auger wrote: >> Hi Peter, >> On 12/18/2015 03:23 PM, Peter Maydell wrote: >>> On 17 December 2015 at 12:29, Eric Auger wrote: This new helper routine returns the node path of a device referred to by its node

Re: [Qemu-devel] [PATCH for v2.3.0] fw_cfg: add check to validate current entry value

2016-01-06 Thread 朱东海(启路)
Hi, Will you assign a cve to this vulnerability.This issue has the possibility to remote code execution, and many IAAS providers use qemu prior version 2.4.Donghai.--From:P J P Send Time:2016年1月6日(星期三) 02:08To:Qemu devel Cc:Stefan

[Qemu-devel] [Bug 1531352] [NEW] QEMU_LD_PREFIX PATH not work on loading library

2016-01-06 Thread bananaapple
Public bug reported: run qemu with QEMU_LD_PREFIX argument will not load the library in the PATH. Ex: I use debootstrap to download the library of i386 architecture And use -L point to the path. But not load the library from that directory. ** Affects: qemu Importance: Undecided Sta

[Qemu-devel] [Bug 1531352] Re: QEMU_LD_PREFIX not load correct library order in the PATH

2016-01-06 Thread bananaapple
** Description changed: run qemu with QEMU_LD_PREFIX argument will not load correct library order in the PATH. How to reproduce this bug: These command will download the library of other architectures wget https://raw.githubusercontent.com/BinaryAnalysisPlatform/qira/master/fetchlibs.sh

[Qemu-devel] [Bug 1531352] Re: QEMU_LD_PREFIX PATH not work on loading library

2016-01-06 Thread bananaapple
** Description changed: run qemu with QEMU_LD_PREFIX argument will not load the library in the PATH. - Ex: I use debootstrap to download the library of i386 architecture + Example: I use debootstrap to download the library of i386 architecture And use -L point to the path. But not load the l

[Qemu-devel] [Bug 1531352] Re: QEMU_LD_PREFIX PATH loading library is not in the correct order

2016-01-06 Thread bananaapple
** Summary changed: - QEMU_LD_PREFIX PATH not work on loading library + QEMU_LD_PREFIX PATH loading library is not in the correct order ** Description changed: - run qemu with QEMU_LD_PREFIX argument will not load the library in the PATH. + run qemu with QEMU_LD_PREFIX argument will not load cor

[Qemu-devel] [Bug 1531352] Re: QEMU_LD_PREFIX not load correct library order in the PATH

2016-01-06 Thread bananaapple
** Description changed: run qemu with QEMU_LD_PREFIX argument will not load correct library order in the PATH. How to reproduce this bug: These command will download the library of other architectures wget https://raw.githubusercontent.com/BinaryAnalysisPlatform/qira/master/fetchlibs.sh

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-06 Thread Dr. David Alan Gilbert
* Jason Wang (jasow...@redhat.com) wrote: > > > On 01/05/2016 12:52 AM, Dr. David Alan Gilbert wrote: > > * Jason Wang (jasow...@redhat.com) wrote: > >> > >> On 01/04/2016 04:16 PM, Zhang Chen wrote: > >>> > >>> On 01/04/2016 01:37 PM, Jason Wang wrote: > On 12/31/2015 04:40 PM, Zhang Chen w

Re: [Qemu-devel] [PATCH v2] trace-events: fix broken format strings

2016-01-06 Thread Alex Bennée
Andrew Jones writes: > Fixes compiling with --enable-trace-backends > > Signed-off-by: Andrew Jones > --- > v2: also remove trailing null strings [Laurent] Reviewed-by: Alex Bennée Tested-by: Alex Bennée > > > trace-events | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-)

[Qemu-devel] [PATCH] SCSI device: fix to incomplete QOMify

2016-01-06 Thread Cao jin
Signed-off-by: Cao jin --- hw/scsi/megasas.c | 12 ++-- hw/scsi/scsi-bus.c| 4 ++-- hw/scsi/virtio-scsi.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index d7dc667..78239bf 100644 --- a/hw/scsi/megasas.c +++ b/hw/s

Re: [Qemu-devel] [PATCH v1] kvm/x86: Hyper-V tsc page setup

2016-01-06 Thread Andrey Smetanin
On 01/06/2016 12:48 AM, Peter Hornyack wrote: On Thu, Dec 24, 2015 at 1:33 AM, Andrey Smetanin wrote: Lately tsc page was implemented but filled with empty values. This patch setup tsc page scale and offset based on vcpu tsc, tsc_khz and HV_X64_MSR_TIME_REF_COUNT value. The valid tsc page d

Re: [Qemu-devel] [PATCH 2/8] ipmi: add get and set SENSOR_TYPE commands

2016-01-06 Thread Greg Kurz
On Tue, 5 Jan 2016 18:29:56 +0100 Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- Acked-by: Greg Kurz Just some minor comments on the form below. > hw/ipmi/ipmi_bmc_sim.c | 51 > -- > 1 file changed, 49 insertions(+), 2 dele

Re: [Qemu-devel] What's the advantages of POSTCOPY over CPU-THROTTLE?

2016-01-06 Thread Dr. David Alan Gilbert
* Zhangbo (Oscar) (oscar.zhan...@huawei.com) wrote: > Hi all: >   Postcopy is suitable for migrating guests which have large page change > rates. It > 1 makes the guest run at the destination ASAP. > 2 makes the downtime of the guest small enough. > If we don't take the 1st advantage

[Qemu-devel] [PATCH] virtio-blk: Allow startup of empty cdroms

2016-01-06 Thread Michal Privoznik
If you have an empty IDE cdrom we will start just fine: -drive if=none,id=drive-ide0-0-0,readonly=on -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 However, that's not the case with virtio disk: -drive if=none,media=cdrom,id=drive-virtio-disk1,readonly=on -device virtio-blk-pc

Re: [Qemu-devel] [PATCH v3 0/4] Convert to realize()

2016-01-06 Thread Stefano Stabellini
On Wed, 6 Jan 2016, Cao jin wrote: > v3 changelog: > 1. use following style when we want to check the returned error > > Error *err = NULL; > foo(arg, &err); > if (err) { > handle the error... > error_propagate(errp, err); > } > > Cao jin (4): > Add Error *

Re: [Qemu-devel] [PATCH v2 0/3] virtio: cross-endian helpers fixes

2016-01-06 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 08:19:22PM +0100, Greg Kurz wrote: > On Wed, 23 Dec 2015 17:28:23 +0100 > Greg Kurz wrote: > > > On Wed, 23 Dec 2015 15:47:00 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Dec 17, 2015 at 09:52:46AM +0100, Greg Kurz wrote: > > > > This series tries to rework cr

Re: [Qemu-devel] [PATCH] SCSI device: fix to incomplete QOMify

2016-01-06 Thread Michael S. Tsirkin
On Wed, Jan 06, 2016 at 05:37:46PM +0800, Cao jin wrote: > Signed-off-by: Cao jin Acked-by: Michael S. Tsirkin > --- > hw/scsi/megasas.c | 12 ++-- > hw/scsi/scsi-bus.c| 4 ++-- > hw/scsi/virtio-scsi.c | 2 +- > 3 files changed, 9 insertions(+), 9 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH 03/22] 9pfs: rename virtio-9p-handle.c to 9p-handle.c

2016-01-06 Thread Stefano Stabellini
Wrong subject line: you are renaming virtio-9p-local.c On Tue, 5 Jan 2016, Wei Liu wrote: > This file is not virtio specific. Rename it to use generic name. > > Fix comment and remove unneeded inclusion of virtio.h. > > Signed-off-by: Wei Liu > --- > hw/9pfs/{virtio-9p-local.c => 9p-local.c} |

Re: [Qemu-devel] [PATCH 03/22] 9pfs: rename virtio-9p-handle.c to 9p-handle.c

2016-01-06 Thread Wei Liu
On Wed, Jan 06, 2016 at 11:22:51AM +, Stefano Stabellini wrote: > Wrong subject line: you are renaming virtio-9p-local.c > Oops, yes. I will fix this. Wei.

[Qemu-devel] [PATCH 1/2] create ga_run_program() helper for guest-set-user-password

2016-01-06 Thread Denis V. Lunev
From: Yuriy Pudgorodskiy This helper properly starts chpasswd and collects stdout/stderr of this program to report it as error to the caller. The code will be reused later to run useradd in addition to chpasswd. This code is made specifically for Linux and is inside ifdef Linux braces. Signed-

[Qemu-devel] [PATCH 2/2] guest-set-user-password - added ability to create new user

2016-01-06 Thread Denis V. Lunev
From: Yuriy Pudgorodskiy Added optional 'create' flag to guest-set-user-password command. When it is specified, a new user will be created if it does not exist yet. The option to the existing command is added as password for newly created user should be set as specified. This code is made speci

[Qemu-devel] [PATCH v2 0/2] qga: guest-set-user-password - added ability to create new user

2016-01-06 Thread Denis V. Lunev
These patches add optional 'create' flag to guest-set-user-password command. When it is specified, a new user will be created if it does not exist yet. Since v1: - fixed english language mistakes in comments - json description now mentions 'create' as default to false - capture stdout/stderr from

[Qemu-devel] [Bug 1531352] Re: QEMU_LD_PREFIX not load correct library order in the PATH

2016-01-06 Thread bananaapple
** Description changed: run qemu with QEMU_LD_PREFIX argument will not load correct library order in the PATH. How to reproduce this bug: These command will download the library of other architectures wget https://raw.githubusercontent.com/BinaryAnalysisPlatform/qira/master/fetchlibs.sh

[Qemu-devel] [PATCH] xenfb.c: avoid expensive loops when prod <= out_cons

2016-01-06 Thread Stefano Stabellini
If the frontend sets out_cons to a value higher than out_prod, it will cause xenfb_handle_events to loop about 2^32 times. Avoid that by using better checks at the beginning of the function. Signed-off-by: Stefano Stabellini diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index 4e2a27a..f96

Re: [Qemu-devel] [PATCH v8 1/4] hw/ptimer: Fix issues caused by the adjusted timer limit value

2016-01-06 Thread Peter Crosthwaite
On Tue, Jan 05, 2016 at 05:33:26AM +0300, Dmitry Osipenko wrote: > Multiple issues here related to the timer with a adjusted .limit value: > > 1) ptimer_get_count() returns incorrect counter value for the disabled > timer after loading the counter with a small value, because adjusted limit > value

Re: [Qemu-devel] [PATCH v8 3/4] hw/ptimer: Update .delta on period/freq change

2016-01-06 Thread Peter Crosthwaite
On Tue, Jan 05, 2016 at 05:33:28AM +0300, Dmitry Osipenko wrote: > Delta value must be updated on period/freq change, otherwise running timer > would be restarted (counter reloaded with old delta). Only m68k/mcf520x > and arm/arm_timer devices are currently doing freq change correctly, i.e. > stopp

Re: [Qemu-devel] [Xen-devel] [PATCH v4] igd-passthrough-i440FX: convert to realize()

2016-01-06 Thread Stefano Stabellini
Hello Xudong, please test this patch: http://marc.info/?l=qemu-devel&m=145137863501079 with an intel graphic card assigned to a Xen guest. If everything still works as expected, please reply with your Tested-by. Thanks, Stefano On Wed, 6 Jan 2016, Lars Kurth wrote: > Hi folks, > let me introd

Re: [Qemu-devel] [PATCH v8 2/4] hw/ptimer: Perform tick and counter wrap around if timer already expired

2016-01-06 Thread Peter Crosthwaite
On Tue, Jan 05, 2016 at 05:33:27AM +0300, Dmitry Osipenko wrote: > ptimer_get_count() might be called while QEMU timer already been expired. > In that case ptimer would return counter = 0, which might be undesirable > in case of polled timer. Do counter wrap around for periodic timer to keep > it d

Re: [Qemu-devel] [Xen-devel] [PATCH] xenfb.c: avoid expensive loops when prod <= out_cons

2016-01-06 Thread David Vrabel
On 06/01/16 12:08, Stefano Stabellini wrote: > If the frontend sets out_cons to a value higher than out_prod, it will > cause xenfb_handle_events to loop about 2^32 times. Avoid that by using > better checks at the beginning of the function. You can't use less than to compare prod and cons because

[Qemu-devel] [PATCH 2/2] migration/virtio: Remove simple .get/.put use

2016-01-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The 'virtqueue_state' and 'ringsize' can be saved using VMSTATE macros rather than hand coded .get/.put Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/virtio.c | 87 -- 1 file changed, 19 insertions(+), 68

[Qemu-devel] [PATCH 1/2] Add VMSTATE_STRUCT_VARRAY_KNOWN

2016-01-06 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" At the moment we have VMSTATE_STRUCT_ARRAY that requires the field is declared as an array of fixed size. We also have VMSTATE_STRUCT_VARRAY_UINT* that allows a field declared as a pointer, but requires that the length is a field member in the structure being loaded

Re: [Qemu-devel] [PATCH] xenfb.c: avoid expensive loops when prod <= out_cons

2016-01-06 Thread Paul Durrant
> -Original Message- > From: qemu-devel-bounces+paul.durrant=citrix@nongnu.org > [mailto:qemu-devel-bounces+paul.durrant=citrix@nongnu.org] On > Behalf Of Stefano Stabellini > Sent: 06 January 2016 12:08 > To: qemu-devel@nongnu.org > Cc: liuling...@360.cn; xen-de...@lists.xensource.

Re: [Qemu-devel] [PATCH] hw/dma/xilinx_axidma: debug printf fixups

2016-01-06 Thread Andrew Jones
On Tue, Jan 05, 2016 at 05:45:57PM -0800, Alistair Francis wrote: > On Tue, Jan 5, 2016 at 7:32 AM, Andrew Jones wrote: > > On Tue, Jan 05, 2016 at 07:07:22AM -0700, Eric Blake wrote: > >> On 01/05/2016 06:22 AM, Andrew Jones wrote: > >> > (Found by grepping for broken PRI users.) > >> > > >> > Si

[Qemu-devel] [PATCH] hw/dma/xilinx_axidma: remove dead code

2016-01-06 Thread Andrew Jones
stream_desc_show() (and DEBUG_ENET) appear to be unused, as the function isn't compilable (there are broken PRI format strings). Signed-off-by: Andrew Jones --- hw/dma/xilinx_axidma.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c i

Re: [Qemu-devel] [PATCH v8 2/4] hw/ptimer: Perform tick and counter wrap around if timer already expired

2016-01-06 Thread Dmitry Osipenko
06.01.2016 15:17, Peter Crosthwaite пишет: On Tue, Jan 05, 2016 at 05:33:27AM +0300, Dmitry Osipenko wrote: ptimer_get_count() might be called while QEMU timer already been expired. In that case ptimer would return counter = 0, which might be undesirable in case of polled timer. Do counter wrap

Re: [Qemu-devel] [PATCH v8 4/4] arm_mptimer: Convert to use ptimer

2016-01-06 Thread Peter Crosthwaite
On Tue, Jan 05, 2016 at 05:33:29AM +0300, Dmitry Osipenko wrote: > Current ARM MPTimer implementation uses QEMUTimer for the actual timer, > this implementation isn't complete and mostly tries to duplicate of what > generic ptimer is already doing fine. > > Conversion to ptimer brings the followin

Re: [Qemu-devel] [PATCH v8 1/4] hw/ptimer: Fix issues caused by the adjusted timer limit value

2016-01-06 Thread Dmitry Osipenko
06.01.2016 15:15, Peter Crosthwaite пишет: diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index edf077c..035af97 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -34,20 +34,39 @@ static void ptimer_trigger(ptimer_state *s) static void ptimer_reload(ptimer_state *s) { -if (s->del

Re: [Qemu-devel] [PATCH v3 4/7] bcm2835_peripherals: add rollup device for bcm2835 peripherals

2016-01-06 Thread Peter Crosthwaite
On Tue, Jan 5, 2016 at 10:07 PM, Andrew Baumann wrote: >> From: Alistair Francis [mailto:alistai...@gmail.com] >> Sent: Tuesday, 5 January 2016 18:14 >> On Thu, Dec 31, 2015 at 4:31 PM, Andrew Baumann >> wrote: >> > This device maintains all the non-CPU peripherals on bcm2835 (Pi1) >> > which are

[Qemu-devel] [PATCH] SPARC ebus: QOMify

2016-01-06 Thread Cao jin
Signed-off-by: Cao jin --- hw/sparc64/sun4u.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index d6b929c..07f74fe 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -98,6 +98,10 @@ typedef struct EbusState { Memo

Re: [Qemu-devel] [PATCH v8 1/4] hw/ptimer: Fix issues caused by the adjusted timer limit value

2016-01-06 Thread Peter Crosthwaite
On Wed, Jan 6, 2016 at 5:25 AM, Dmitry Osipenko wrote: > 06.01.2016 15:15, Peter Crosthwaite пишет: >>> >>> diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c >>> index edf077c..035af97 100644 >>> --- a/hw/core/ptimer.c >>> +++ b/hw/core/ptimer.c >>> @@ -34,20 +34,39 @@ static void ptimer_trigger(pt

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-06 Thread Igor Mammedov
On Tue, 5 Jan 2016 18:22:33 +0100 Laszlo Ersek wrote: > On 01/05/16 18:08, Igor Mammedov wrote: > > On Mon, 4 Jan 2016 21:17:31 +0100 > > Laszlo Ersek wrote: > > > >> Michael CC'd me on the grandparent of the email below. I'll try to add > >> my thoughts in a single go, with regard to OVMF. >

[Qemu-devel] [PATCH] SCSI bus: fix to incomplete QOMify

2016-01-06 Thread Cao jin
Signed-off-by: Cao jin --- hw/scsi/scsi-bus.c | 16 include/hw/scsi/scsi.h | 5 - 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index fea0257..1667e01 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -5

Re: [Qemu-devel] [PATCH 1/2] create ga_run_program() helper for guest-set-user-password

2016-01-06 Thread Denis V. Lunev
On 01/06/2016 03:01 PM, Denis V. Lunev wrote: From: Yuriy Pudgorodskiy This helper properly starts chpasswd and collects stdout/stderr of this program to report it as error to the caller. The code will be reused later to run useradd in addition to chpasswd. This code is made specifically for

Re: [Qemu-devel] [Qemu-block] [PATCH v5 4/6] expose floppy drive geometry and CMOS type

2016-01-06 Thread Denis V. Lunev
On 01/04/2016 11:44 PM, John Snow wrote: On 12/30/2015 03:11 PM, Roman Kagan wrote: Make it possible to query the geometry and the CMOS type of a floppy drive outside of the respective source files. It will be useful, in particular, when dynamically building ACPI tables, and will allow to prop

Re: [Qemu-devel] [PATCH v8 2/4] hw/ptimer: Perform tick and counter wrap around if timer already expired

2016-01-06 Thread Peter Crosthwaite
On Wed, Jan 6, 2016 at 5:12 AM, Dmitry Osipenko wrote: > 06.01.2016 15:17, Peter Crosthwaite пишет: > >> On Tue, Jan 05, 2016 at 05:33:27AM +0300, Dmitry Osipenko wrote: >>> >>> ptimer_get_count() might be called while QEMU timer already been expired. >>> In that case ptimer would return counter =

Re: [Qemu-devel] [PATCH v5 0/6] i386: expose floppy-related objects in SSDT

2016-01-06 Thread Igor Mammedov
On Wed, 30 Dec 2015 23:11:50 +0300 Roman Kagan wrote: > Windows on UEFI systems is only capable of detecting the presence and > the type of floppy drives via corresponding ACPI objects. > > Those objects are added in patch 5; the preceding ones pave the way to > it, by making the necessary data

Re: [Qemu-devel] [Xen-devel] [PATCH] xenfb.c: avoid expensive loops when prod <= out_cons

2016-01-06 Thread Stefano Stabellini
On Wed, 6 Jan 2016, David Vrabel wrote: > On 06/01/16 12:08, Stefano Stabellini wrote: > > If the frontend sets out_cons to a value higher than out_prod, it will > > cause xenfb_handle_events to loop about 2^32 times. Avoid that by using > > better checks at the beginning of the function. > > You

Re: [Qemu-devel] arm64 qemu tests failing in linux-next since 'arm64: kernel: enforce pmuserenr_el0 initialization and restore'

2016-01-06 Thread Lorenzo Pieralisi
Hi Guenter, On Wed, Dec 23, 2015 at 04:52:51PM -0800, Guenter Roeck wrote: > Hi all, > > since commit 60792ad349f3 ("arm64: kernel: enforce pmuserenr_el0 > initialization > and restore"), my arm64 qemu tests of linux-next are failing. After this > commit, > qemu does not display any output. >

Re: [Qemu-devel] [Xen-devel] [PATCH v4] igd-passthrough-i440FX: convert to realize()

2016-01-06 Thread Lars Kurth
Hi folks, let me introduce you to Xudong from Intel, who is willing to help out. Best Regards Lars > On 4 Jan 2016, at 15:41, Stefano Stabellini > wrote: > > On Mon, 4 Jan 2016, Lars Kurth wrote: >> On 04/01/2016 14:47, "Stefano Stabellini" >> wrote: >> >>> Unfortunately I don't have a setup

[Qemu-devel] What's the advantages of POSTCOPY over CPU-THROTTLE?

2016-01-06 Thread Zhangbo (Oscar)
Hi all:   Postcopy is suitable for migrating guests which have large page change rates. It 1 makes the guest run at the destination ASAP. 2 makes the downtime of the guest small enough. If we don't take the 1st advantage into account, then, its benefit seems similar with CPU-THROTTLE

Re: [Qemu-devel] [Xen-devel] [PATCH v3 02/11] pc: remove has_igd_gfx_passthru global

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Reviewed-by: Stefano Stabellini > hw/xen/xen_pt.h | 5 +++-- > vl.c| 10 -- > 2 files changed, 3 insertions(+), 12 deletions(-) > > diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h > index 3749711..cdd

Re: [Qemu-devel] [PATCH v3 04/11] igd: switch TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE to realize

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Reviewed-by: Stefano Stabellini > hw/pci-host/igd.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/hw/pci-host/igd.c b/hw/pci-host/igd.c > index ef0273b..d1eeafb 100644 > --- a/hw/pci-h

Re: [Qemu-devel] [PATCH v3 05/11] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > hw/pci-host/igd.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/hw/pci-host/igd.c b/hw/pci-host/igd.c > index d1eeafb..6f52ab1 100644 > --- a/hw/pci-host/igd.c > +++ b/hw/pci-host/igd.c > @@ -53,1

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-06 Thread Laszlo Ersek
On 01/06/16 14:39, Igor Mammedov wrote: > On Tue, 5 Jan 2016 18:22:33 +0100 > Laszlo Ersek wrote: > >> On 01/05/16 18:08, Igor Mammedov wrote: >>> On Mon, 4 Jan 2016 21:17:31 +0100 >>> Laszlo Ersek wrote: >>> Michael CC'd me on the grandparent of the email below. I'll try to add my

Re: [Qemu-devel] [PATCH v3 06/11] igd: use defines for standard pci config space offsets

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Reviewed-by: Stefano Stabellini > hw/pci-host/igd.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/pci-host/igd.c b/hw/pci-host/igd.c > index 6f52ab1..0784128 100644 > --- a/hw/pci-host

[Qemu-devel] [PATCH] hw/arm/virt: Initialize NICs configured in PCI bus

2016-01-06 Thread Ashok Kumar
virtio model is used for default case. Signed-off-by: Ashok Kumar --- hw/arm/virt.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index acc1fcb..fd52b76 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -808,6 +808,7 @@ static void create_pcie(

Re: [Qemu-devel] [PATCH 3/8] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-06 Thread Greg Kurz
On Tue, 5 Jan 2016 18:29:57 +0100 Cédric Le Goater wrote: > This is a simulator. Just return an unknown cause (0). > > Signed-off-by: Cédric Le Goater > --- Acked-by: Greg Kurz > hw/ipmi/ipmi_bmc_sim.c | 20 ++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff

[Qemu-devel] [PATCH] i2c-tiny-usb: add new usb to i2c bridge

2016-01-06 Thread Tim Sander
Version 4 with improvements suggested by Gerd Hoffmann: Signed-off-by: Tim Sander i2c-tiny-usb is a small usb to i2c bridge: http://www.harbaum.org/till/i2c_tiny_usb/index.shtml It is pretty simple and has no usb endpoints just a control. Reasons for adding this device: * Linux device driver a

Re: [Qemu-devel] [PATCH v3 07/11] igd: revamp host config read

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > Move all work to the host_pci_config_copy helper function, > which we can easily reuse when adding q35 support. > Open sysfs file only once for all values. Use pread. > Proper error handling. Fix bugs: > > * Don't throw away results (like old host_pci_

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Eric Blake
On 01/05/2016 07:50 PM, lihuiba wrote: > At 2016-01-05 21:55:56, "Eric Blake" wrote: >> On 01/05/2016 05:10 AM, lihuiba wrote: >> > In our production environment, we need to extend a qcow2 image with > snapshots in it. >> The thing is that one would need to update all the inactive L1

[Qemu-devel] [PATCH v2 3/7] device_tree: introduce qemu_fdt_node_path

2016-01-06 Thread Eric Auger
This new helper routine returns the node path of a device referred to by its node name and compat string. Signed-off-by: Eric Auger --- v1 -> v2: - move doc comment in header file - do not use a fixed size buffer - break on errors in while loop - use strcmp instead of strncmp RFC -> v1: - impr

[Qemu-devel] [PATCH v2 0/7] AMD XGBE KVM platform passthrough

2016-01-06 Thread Eric Auger
This series allows to set up AMD XGBE passthrough. This was tested on AMD Seattle. The first upstreamed device supporting KVM platform passthrough was the Calxeda Midway XGMAC. Compared to this latter, the XGBE XGMAC exposes a much more complex device tree node. - First There are 2 device tree no

[Qemu-devel] [PATCH v2 1/7] hw/vfio/platform: amd-xgbe device

2016-01-06 Thread Eric Auger
This patch introduces the amd-xgbe VFIO platform device. It allows the guest to do passthrough on a device exposing an "amd,xgbe-seattle-v1a" compat string. Signed-off-by: Eric Auger Reviewed-by: Alex Benné --- RFC -> v1: - add Alex' R-b --- hw/vfio/Makefile.objs | 1 + hw/vfio/amd-x

[Qemu-devel] [PATCH v2 2/7] device_tree: introduce load_device_tree_from_sysfs

2016-01-06 Thread Eric Auger
This function returns the host device tree blob from sysfs (/proc/device-tree). It uses a recursive function inspired from dtc read_fstree. Signed-off-by: Eric Auger --- v1 -> v2: - do not implement/expose read_fstree and load_device_tree_from_sysfs if CONFIG_LINUX is not defined (lstat is not

[Qemu-devel] [PATCH v2 4/7] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-06 Thread Eric Auger
Current qemu_fdt_getprop exits if the property is not found. It is sometimes needed to read an optional property, in which case we do not wish to exit but simply returns a null value. This patch converts qemu_fdt_getprop to accept an Error **, and existing users are converted to pass &error_fatal.

[Qemu-devel] [PATCH v2 6/7] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2016-01-06 Thread Eric Auger
This patch allows the instantiation of the vfio-amd-xgbe device from the QEMU command line (-device vfio-amd-xgbe,host=""). The guest is exposed with a device tree node that combines the description of both XGBE and PHY (representation supported from 4.2 onwards kernel): Documentation/devicetree/b

[Qemu-devel] [PATCH v2 7/7] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check

2016-01-06 Thread Eric Auger
qemu_fdt_setprop self-exists in case of error hence no need to check the returned value. Signed-off-by: Eric Auger --- hw/arm/sysbus-fdt.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index 66fa766..68d7e53 100644

Re: [Qemu-devel] [RFC v6 04/14] softmmu: Add helpers for a new slowpath

2016-01-06 Thread Alex Bennée
Alvise Rigo writes: > The new helpers rely on the legacy ones to perform the actual read/write. > > The LoadLink helper (helper_ldlink_name) prepares the way for the > following SC operation. It sets the linked address and the size of the > access. nit: extra line or continue paragraph > These

[Qemu-devel] [PATCH v2 5/7] hw/arm/sysbus-fdt: helpers for clock node generation

2016-01-06 Thread Eric Auger
Some passthrough'ed devices depend on clock nodes. Those need to be generated in the guest device tree. This patch introduces some helpers to build a clock node from information retrieved in the host device tree. - inherit_properties copies properties from a host device tree node to a guest devi

[Qemu-devel] [RFC] util: Fix QEMU_LD_PREFIX endless loop

2016-01-06 Thread Wei-Bo, Chen
Detail bug report in the following url: https://bugs.launchpad.net/qemu/+bug/1245703 Remove is_dir_maybe macro condition DT_LNK in util/path.c Signed-off-by: Wei-Bo, Chen --- util/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/path.c b/util/path.c index 4e4877e.

Re: [Qemu-devel] [PATCH 3/6] nvdimm acpi: introduce patched dsm memory

2016-01-06 Thread Igor Mammedov
On Tue, 5 Jan 2016 02:52:05 +0800 Xiao Guangrong wrote: > The dsm memory is used to save the input parameters and store > the dsm result which is filled by QEMU. > > The address of dsm memory is decided by bios and patched into > int64 object returned by "MEMA" method > > Signed-off-by: Xiao G

Re: [Qemu-devel] [PATCH v3 10/11] igd: handle igd-passthrough-isa-bridge setup in realize()

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > That way a simple '-device igd-passthrough-isa-bridge,addr=1f' will > do the setup. Is this going to change the QEMU command line arguments to use it? > Also instead of looking up reasonable PCI IDs based on the graphic > device id simply copy over the

Re: [Qemu-devel] [PATCH v3 11/11] igd: move igd-passthrough-isa-bridge creation to machine init

2016-01-06 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > This patch moves igd-passthrough-isa-bridge creation out of the xen > passthrough code into machine init. It is triggered by the > igd-passthru=on machine option. Advantages: > > * This works for on both xen and kvm. > * It is activated for the pc mac

Re: [Qemu-devel] could i using qemu-img covert && rebase -u to do qcow2 rollback?

2016-01-06 Thread Max Reitz
On 05.01.2016 04:52, Huan Zhang wrote: > Hi Max, > "rollback" means revert user data to snap1 state, and for some reason, > we want to > keep snap2 and 'rollbacked' qocw2 file in a single backing file chain. > After rollback, looks like: > snap0.qcow2 -> snap1.qcow2 ->snap2.qcow2 -> rollbacked-sna

Re: [Qemu-devel] [PATCH v3 05/11] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize

2016-01-06 Thread Gerd Hoffmann
> > > > +static void (*i440fx_realize)(PCIDevice *pci_dev, Error **errp); > > static void igd_pt_i440fx_realize(PCIDevice *pci_dev, Error **errp) > > { > > +Error *err = NULL; > > uint32_t val = 0; > > int rc, i, num; > > int pos, len; > > Can't we get the parent PCIDeviceCl

Re: [Qemu-devel] [PATCH 3/6] nvdimm acpi: introduce patched dsm memory

2016-01-06 Thread Xiao Guangrong
On 01/06/2016 11:23 PM, Igor Mammedov wrote: On Tue, 5 Jan 2016 02:52:05 +0800 Xiao Guangrong wrote: The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided by bios and patched into int64 object returned by

Re: [Qemu-devel] [PATCH v3 0/4] Convert to realize()

2016-01-06 Thread Eric Blake
On 01/06/2016 04:08 AM, Stefano Stabellini wrote: > On Wed, 6 Jan 2016, Cao jin wrote: >> v3 changelog: >> 1. use following style when we want to check the returned error >> >> Error *err = NULL; >> foo(arg, &err); >> if (err) { >> handle the error... >> error_propa

Re: [Qemu-devel] [PATCH v3 07/11] igd: revamp host config read

2016-01-06 Thread Gerd Hoffmann
> > +for (i = 0; i < len; i++) { > > +rc = pread(config_fd, guest->config + list[i].offset, > > + list[i].len, list[i].offset); > > +if (rc != list[i].len) { > > pread is allowed to return early, returning the number of bytes read. > This is a sysfs file tho

Re: [Qemu-devel] [PATCH v3 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-06 Thread Eric Blake
On 01/05/2016 07:39 PM, Cao jin wrote: > To catch the error msg. Also modify the caller > > Signed-off-by: Cao jin > --- > hw/xen/xen-host-pci-device.c | 106 > +-- > hw/xen/xen-host-pci-device.h | 5 +- > hw/xen/xen_pt.c | 12 +++-- > 3 f

Re: [Qemu-devel] [PATCH v3 10/11] igd: handle igd-passthrough-isa-bridge setup in realize()

2016-01-06 Thread Gerd Hoffmann
On Mi, 2016-01-06 at 15:29 +, Stefano Stabellini wrote: > On Tue, 5 Jan 2016, Gerd Hoffmann wrote: > > That way a simple '-device igd-passthrough-isa-bridge,addr=1f' will > > do the setup. > > Is this going to change the QEMU command line arguments to use it? See patch 11 ;) cheers, Gerd

Re: [Qemu-devel] [PATCH v3 2/4] Add Error **errp for xen_pt_setup_vga()

2016-01-06 Thread Eric Blake
On 01/05/2016 07:39 PM, Cao jin wrote: > To catch the error msg. Also modify the caller > > Signed-off-by: Cao jin > Reviewed-by: Stefano Stabellini > --- > hw/xen/xen_pt.c | 5 - > hw/xen/xen_pt.h | 3 ++- > hw/xen/xen_pt_graphics.c | 11 ++- > 3 files changed,

Re: [Qemu-devel] [PATCH] hw/dma/xilinx_axidma: remove dead code

2016-01-06 Thread Eric Blake
On 01/06/2016 05:53 AM, Andrew Jones wrote: > stream_desc_show() (and DEBUG_ENET) appear to be unused, as the > function isn't compilable (there are broken PRI format strings). > > Signed-off-by: Andrew Jones > --- > hw/dma/xilinx_axidma.c | 10 -- > 1 file changed, 10 deletions(-) Revi

Re: [Qemu-devel] [PATCH v3 3/4] Add Error **errp for xen_pt_config_init()

2016-01-06 Thread Eric Blake
On 01/05/2016 07:39 PM, Cao jin wrote: > To catch the error msg. Also modify the caller > > Signed-off-by: Cao jin > --- > hw/xen/xen_pt.c | 7 --- > hw/xen/xen_pt.h | 2 +- > hw/xen/xen_pt_config_init.c | 51 > - > 3 fil

Re: [Qemu-devel] [PATCH v3 0/4] Convert to realize()

2016-01-06 Thread Stefano Stabellini
On Wed, 6 Jan 2016, Eric Blake wrote: > On 01/06/2016 04:08 AM, Stefano Stabellini wrote: > > On Wed, 6 Jan 2016, Cao jin wrote: > >> v3 changelog: > >> 1. use following style when we want to check the returned error > >> > >> Error *err = NULL; > >> foo(arg, &err); > >> if (err) { >

Re: [Qemu-devel] [PATCH v3 4/4] Xen PCI passthru: convert to realize()

2016-01-06 Thread Eric Blake
On 01/05/2016 07:39 PM, Cao jin wrote: > Signed-off-by: Cao jin > Reviewed-by: Stefano Stabellini > --- > hw/xen/xen_pt.c | 53 - > 1 file changed, 28 insertions(+), 25 deletions(-) > > @@ -801,19 +801,19 @@ static int xen_pt_initfn(PCIDevice

[Qemu-devel] [Bug 1357226] Re: qemu: uncaught target signal 11 (Segmentation fault) - core dumped

2016-01-06 Thread Scott Moser
This may or may not be relevant here, but the mysterious "uncaught target signal 11" error was fixed for maas images (lp:maas-images) build process by increasing the memory to the VMs that were doing the build. We had been doing the cross/qemu-static building in ~512M vms and that was resulting in

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Max Reitz
On 06.01.2016 16:04, Eric Blake wrote: > On 01/05/2016 07:50 PM, lihuiba wrote: >> At 2016-01-05 21:55:56, "Eric Blake" wrote: >>> On 01/05/2016 05:10 AM, lihuiba wrote: >>> >> In our production environment, we need to extend a qcow2 image with >> snapshots in it. >>> > The thing is th

Re: [Qemu-devel] [Xen-devel] [PATCH v3 07/11] igd: revamp host config read

2016-01-06 Thread Stefano Stabellini
On Wed, 6 Jan 2016, Gerd Hoffmann wrote: > > > +for (i = 0; i < len; i++) { > > > +rc = pread(config_fd, guest->config + list[i].offset, > > > + list[i].len, list[i].offset); > > > +if (rc != list[i].len) { > > > > pread is allowed to return early, returning t

Re: [Qemu-devel] [RFC] util: Fix QEMU_LD_PREFIX endless loop

2016-01-06 Thread 陳威伯
For further explaination of endless loop happen in util/path.c For example, set the QEMU_LD_PREFIX="/home/apple/i386" sudo debootstrap --arch=i386 trusty /home/apple/i386 http://archive.ubuntu.com/ubuntu/ magic is a normal dynamic-linkd 32-bit elf. qemu-i386 -L /home/apple/i386 /home/apple/magic Th

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Eric Blake
On 01/06/2016 09:20 AM, Max Reitz wrote: >> If I take a snapshot while the guest sees a 1G disk, then resize the >> disk to 2G, then roll back to the point in time of the snapshot, I'd >> expect the disk to roll back to 1G in size. Anything else is likely to >> confuse the guest. And that's what

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Max Reitz
On 06.01.2016 17:28, Eric Blake wrote: > On 01/06/2016 09:20 AM, Max Reitz wrote: > >>> If I take a snapshot while the guest sees a 1G disk, then resize the >>> disk to 2G, then roll back to the point in time of the snapshot, I'd >>> expect the disk to roll back to 1G in size. Anything else is li

[Qemu-devel] [PATCH v2] xenfb.c: avoid expensive loops when prod <= out_cons

2016-01-06 Thread Stefano Stabellini
If the frontend sets out_cons to a value higher than out_prod, it will cause xenfb_handle_events to loop about 2^32 times. Avoid that by using better checks at the beginning of the function. Signed-off-by: Stefano Stabellini Reported-by: Ling Liu --- diff --git a/hw/display/xenfb.c b/hw/displa

Re: [Qemu-devel] [PATCH v5 01/15] block: Add "file" output parameter to block status query functions

2016-01-06 Thread Max Reitz
On 05.01.2016 09:11, Fam Zheng wrote: > The added parameter can be used to return the BDS pointer which the > valid offset is referring to. Its value should be ignored unless > BDRV_BLOCK_OFFSET_VALID in ret is set. > > Until block drivers fill in the right value, let's clear it explicitly > right

Re: [Qemu-devel] [v15 12/15] vfio: add bus in reset flag

2016-01-06 Thread Alex Williamson
On Wed, 2016-01-06 at 10:13 +0800, Chen Fan wrote: > On 01/06/2016 03:58 AM, Alex Williamson wrote: > > On Tue, 2016-01-05 at 09:20 +0800, Cao jin wrote: > > > From: Chen Fan > > > > > > mark the host bus be in reset. avoid multiple devices trigger the > > > host bus reset many times. > > > > >

Re: [Qemu-devel] [PATCH v5 11/15] vmdk: Return extent's file in bdrv_get_block_status

2016-01-06 Thread Max Reitz
On 05.01.2016 09:11, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital signature

Re: [Qemu-devel] [PATCH v5 12/15] block: Remove the "bs->file" test in bdrv_co_get_block_status

2016-01-06 Thread Max Reitz
On 05.01.2016 09:11, Fam Zheng wrote: > Now that all drivers return the right "file" pointer, we can remove this > check. > > Signed-off-by: Fam Zheng > --- > block/io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/io.c b/block/io.c > index 492c291..1ca4e61 100

  1   2   >