Re: [Qemu-devel] [Qemu-arm] [PATCH 2/2] block: m25p80: Introduce Die Erase command

2016-12-19 Thread Krzeminski, Marcin (Nokia - PL/Wroclaw)
> -Original Message- > From: Edgar E. Iglesias [mailto:edgar.igles...@gmail.com] > Sent: Monday, December 19, 2016 8:28 AM > To: Krzeminski, Marcin (Nokia - PL/Wroclaw) > > Cc: qemu-devel@nongnu.org; peter.mayd...@linaro.org; rfsw- > patc...@mlist.nokia.com; qemu-...@nongnu.org; c...@kao

Re: [Qemu-devel] [RESEND Patch v1 36/37] vhost-user/msg: handling VHOST_USER_SET_FEATURES

2016-12-19 Thread Wei Wang
On 12/19/2016 01:59 PM, Wei Wang wrote: If the featuer bits sent by the slave are not equal to the ones that were sent by the master, perform a reset of the master device. Signed-off-by: Wei Wang --- hw/net/vhost_net.c | 2 ++ hw/virtio/vhost-user.c | 20 hw/vi

[Qemu-devel] [PATCH RFC v2 2/4] block/qapi: reduce the coupling between the bdrv_query_stats and bdrv_query_bds_stats

2016-12-19 Thread Dou Liyang
the bdrv_query_stats and bdrv_query_bds_stats functions need to call each other, that increases the coupling. it also makes the program complicated and makes some unnecessary judgements. remove the call from bdrv_query_bds_stats to bdrv_query_stats, just take some recursion to make it clearly. av

[Qemu-devel] [PATCH RFC v2 0/4] block/qapi: refactor and optimize the qmp_query_blockstats()

2016-12-19 Thread Dou Liyang
These patches aim to refactor the qmp_query_blockstats() and improve the performance by reducing the running time of it. qmp_query_blockstats() is used to monitor the blockstats, it querys all the graph_bdrv_states or monitor_block_backends. There are the two jobs: 1 For the performance: 1.1 th

[Qemu-devel] [PATCH RFC v2 1/4] block: refactor bdrv_next_node for readability

2016-12-19 Thread Dou Liyang
make the bdrv_next_node() clearly and add some comments. Signed-off-by: Dou Liyang --- block.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index 39ddea3..01c9e51 100644 --- a/block.c +++ b/block.c @@ -2931,12 +2931,20 @@ bool bdrv_chain

[Qemu-devel] [PATCH RFC v2 4/4] block/qapi: optimize the query function of the blockstats

2016-12-19 Thread Dou Liyang
this patch works to optimize the qmp_query_blockstats() by removing additional performance overhead from the next_query_bds and bdrv_query_stats. It removes that two functions, and also makes the structure of the code clearly. Signed-off-by: Dou Liyang --- block/qapi.c | 69

Re: [Qemu-devel] [RFC PATCH 00/13] VT-d replay and misc cleanup

2016-12-19 Thread Liu, Yi L
On Tue, Dec 06, 2016 at 06:36:15PM +0800, Peter Xu wrote: > This RFC series is a continue work for Aviv B.D.'s vfio enablement > series with vt-d. Aviv has done a great job there, and what we still > lack there are mostly the following: > > (1) VFIO got duplicated IOTLB notifications due to splitt

Re: [Qemu-devel] [RFC PATCH 03/13] intel_iommu: renaming gpa to iova where proper

2016-12-19 Thread Liu, Yi L
On Tue, Dec 06, 2016 at 06:36:18PM +0800, Peter Xu wrote: > There are lots of places in current intel_iommu.c codes that named > "iova" as "gpa". It is really confusing to use a name "gpa" in these > places (which is very easily to be understood as "Guest Physical > Address", while it's not). To ma

[Qemu-devel] [PATCH RFC v2 3/4] block/qapi: acquire a reference instead of a lock during querying blockstats

2016-12-19 Thread Dou Liyang
This patch works to improve the performance of the query requests. >From the commit 13344f3a, it adds a lock to make query-blockstats safe by the aio_context_acquire(). the qmp_query_blockstats func requires/releases the AioContext lock, which takes some time and blocks the I/O processing. It affe

[Qemu-devel] Strange/wrong behavior with iSCSI Tape devices in QEMU 2.8.0-rc4

2016-12-19 Thread Holger Schranz
# Strange/wrong behavior in QEMU 2.8.0-rc4 After update from QEMU 2.6.2 to 2.8.0-rc4 the tape devices and the corresponding medium changer are no longer available in the VM quest system. The tape devices and the media changer are declared in the xml-file for libvirt. Both, tape drives and medium

[Qemu-devel] [Bug 1267520] Re: Keyboard input not working when the "-k en-us" argument is specified.

2016-12-19 Thread skovalev
I confirm this too: Qemu 2.6.1. I have tried to install Fedora with kickstart file through Packer with `"boot_command": [ "text ks=http://{{.HTTPIP}}:{{.HTTPPort}}/ks.cfg"]`. But no symbol from `["", " ", "[:alpha:]"]` were printed. Only `["=", ":", "/", "."]` could be seen if I manually press "".

Re: [Qemu-devel] [PATCH v5 2/3] utils: Add helper to read arm MIDR_EL1 register

2016-12-19 Thread Vijay Kilari
On Fri, Dec 16, 2016 at 7:34 PM, Peter Maydell wrote: > On 7 December 2016 at 17:06, wrote: >> From: Vijaya Kumar K >> >> Add helper API to read MIDR_EL1 registers to fetch >> cpu identification information. This helps in >> adding errata's and architecture specific features. >> >> This is impl

Re: [Qemu-devel] [RFC PATCH 00/13] VT-d replay and misc cleanup

2016-12-19 Thread Peter Xu
On Sun, Dec 18, 2016 at 04:42:50PM +0800, Liu, Yi L wrote: > On Tue, Dec 06, 2016 at 06:36:15PM +0800, Peter Xu wrote: > > This RFC series is a continue work for Aviv B.D.'s vfio enablement > > series with vt-d. Aviv has done a great job there, and what we still > > lack there are mostly the follow

Re: [Qemu-devel] [RFC PATCH 03/13] intel_iommu: renaming gpa to iova where proper

2016-12-19 Thread Peter Xu
On Sun, Dec 18, 2016 at 04:39:11PM +0800, Liu, Yi L wrote: [...] > > @@ -595,12 +595,12 @@ static uint64_t vtd_get_slpte(dma_addr_t base_addr, > > uint32_t index) > > return slpte; > > } > > > > -/* Given a gpa and the level of paging structure, return the offset of > > current > > - *

Re: [Qemu-devel] [RFC PATCH 00/13] VT-d replay and misc cleanup

2016-12-19 Thread Peter Xu
On Tue, Dec 06, 2016 at 06:36:15PM +0800, Peter Xu wrote: > This RFC series is a continue work for Aviv B.D.'s vfio enablement > series with vt-d. Aviv has done a great job there, and what we still > lack there are mostly the following: > > (1) VFIO got duplicated IOTLB notifications due to splitt

Re: [Qemu-devel] [PATCHv3] multiboot: copy the cmdline verbatim, unescape module strings

2016-12-19 Thread Vlad Lungu
On 12/18/2016 10:25 PM, Eduardo Habkost wrote: > On Thu, Dec 15, 2016 at 02:32:04PM +0200, Vlad Lungu wrote: >> get_opt_value() truncates the value at the first comma >> Use memcpy() instead >> Unescape the module filename and parameters with get_opt_value() >> before calling mb_add_cmdline() >>

[Qemu-devel] [PATCHv4] multiboot: copy the cmdline verbatim, unescape module strings

2016-12-19 Thread Vlad Lungu
get_opt_value() truncates the value at the first comma Use memcpy() instead Unescape the module filename and parameters with get_opt_value() before calling mb_add_cmdline() Signed-off-by: Vlad Lungu --- hw/i386/multiboot.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-

[Qemu-devel] qemu-2.8-rc4 is broken

2016-12-19 Thread Pavel Dovgalyuk
Hi! I encountered the following bug with the latest version of QEMU. I use windows host and start qemu with the following command line: qemu-system-i386.exe -soundhw ac97 -snapshot -hda disk.qcow2 -net none Guest system is Windows XP 32-bit. It founds new hardware (including audio contro

Re: [Qemu-devel] [PATCH v7 3/5] IOMMU: enable intel_iommu map and unmap notifiers

2016-12-19 Thread Peter Xu
On Fri, Dec 16, 2016 at 09:12:05AM +, Liu, Yi L wrote: > > From: "Aviv Ben-David" > > > > Adds a list of registered vtd_as's to intel iommu state to save > > iteration over each PCI device in a search of the corrosponding domain. > > > > Signed-off-by: Aviv Ben-David > > --- > > hw/i386/in

Re: [Qemu-devel] [PATCH for-2.9 v2] qom: Make all interface types abstract

2016-12-19 Thread Markus Armbruster
Paolo Bonzini writes: > On 14/12/2016 18:47, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> On 14/12/2016 14:48, Eduardo Habkost wrote: > How do you find all abstract TypeInfo in the source? The uninitiated > might grep for .abstract = true, and be misled. The initiated will

[Qemu-devel] [PATCH v4 0/4] Add HAX support

2016-12-19 Thread Vincent Palatin
I took a stab at trying to rebase/upstream the support for Intel HAXM. (Hardware Accelerated Execution Manager). Intel HAX is kernel-based hardware acceleration module for Windows and MacOSX. I have based my work on the last version of the source code I found: the emu-2.2-release branch in the ext

[Qemu-devel] [PATCH v4 1/4] kvm: move cpu synchronization code

2016-12-19 Thread Vincent Palatin
Move the generic cpu_synchronize_ functions to the common hw_accel.h header, in order to prepare for the addition of a second hardware accelerator. Signed-off-by: Stefan Weil Signed-off-by: Vincent Palatin --- cpus.c | 1 + gdbstub.c | 1 + hw/i386/kvm/a

[Qemu-devel] [PATCH v4 4/4] hax: add Darwin support

2016-12-19 Thread Vincent Palatin
Re-add the MacOSX/Darwin support: Use the Intel HAX is kernel-based hardware acceleration module (similar to KVM on Linux). Based on the original "target-i386: Add Intel HAX to android emulator" patch from David Chou from emu-2.2-release branch in the external/qemu-android repository. Signed-of

[Qemu-devel] [PATCH v4 3/4] Plumb the HAXM-based hardware acceleration support

2016-12-19 Thread Vincent Palatin
Use the Intel HAX is kernel-based hardware acceleration module for Windows (similar to KVM on Linux). Based on the "target-i386: Add Intel HAX to android emulator" patch from David Chou Signed-off-by: Vincent Palatin --- Makefile.target | 1 + configure | 18

[Qemu-devel] [PATCH v4 2/4] target-i386: Add Intel HAX files

2016-12-19 Thread Vincent Palatin
That's a forward port of the core HAX interface code from the emu-2.2-release branch in the external/qemu-android repository as used by the Android emulator. The original commit was "target-i386: Add Intel HAX to android emulator" saying: """ Backport of 2b3098ff27bab079caab9b46b58546b5036f5c0c

Re: [Qemu-devel] Lock contention in QEMU

2016-12-19 Thread Stefan Hajnoczi
On Fri, Dec 16, 2016 at 04:42:54PM -0500, Weiwei Jia wrote: > Has x-data-plane been used (or accepted) widely in systems. I have > this concern since if it hasn't been widely accepted, it may > have/cause some problems we don't know. Do you know some hidden > problems which may caused by QEMU x-dat

Re: [Qemu-devel] any known virtio-net regressions in Qemu 2.7?

2016-12-19 Thread Stefan Hajnoczi
On Fri, Dec 16, 2016 at 10:00:36PM +0100, Stefan Priebe - Profihost AG wrote: > > Am 15.12.2016 um 07:46 schrieb Alexandre DERUMIER: > > does rollbacking the kernel to previous version fix the problem ? > > The culprit is the used tuned agent from Redhat > (https://github.com/redhat-performance/t

[Qemu-devel] [PATCH v3 0/3] Vhost-user Spec: extension for vhost-pci

2016-12-19 Thread Wei Wang
This spec patch series extends the vhost-user protocol to support the vhost-pci based inter-VM communiaction. v2->v3 changes: 1) replace VHOST_USER_SET_DEV_INFO with VHOST_USER_SET_DEVICE_ID 2) replace VHOST_USER_SET_PEER_CONNECTION with VHOST_USER_SET_VHOST_PCI v1->v2 changes: 1) start from the

[Qemu-devel] [PATCH v3 1/3] spec/vhost-user: extend vhost-user to support the vhost-pci based inter-vm communiaction

2016-12-19 Thread Wei Wang
The protocol feature, VHOST_USER_PROTOCOL_F_VHOST_PCI, indicates the support of vhost-pci. The vhost-pci extension requires the master side implementation to support an asynchronous socket read method. This is used when the slave side vhost-pci device and driver finishes the feature bits negotiatio

[Qemu-devel] [PATCH v3 3/3] spec/vhost-user: add the VHOST_USER_SET_VHOST_PCI message

2016-12-19 Thread Wei Wang
The VHOST_USER_SET_VHOST_PCI message is introduced to start/stop the vhost-pci based inter-VM communiaction by the master. Signed-off-by: Wei Wang --- docs/specs/vhost-user.txt | 12 1 file changed, 12 insertions(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt

[Qemu-devel] [PATCH v3 2/3] spec/vhost-user: add VHOST_USER_PROTOCOL_F_SET_DEVICE_ID

2016-12-19 Thread Wei Wang
The VHOST_USER_PROTOCOL_F_SET_DEVICE_ID protocol feature indicates that the slave side implementation supports different types of devices. The master tells the slave what type of device to create by sending a VHOST_USER_SET_DEVICE_ID message. Signed-off-by: Wei Wang --- docs/specs/vhost-user.txt

Re: [Qemu-devel] [RFC/POC PATCH 0/4] Building TCG tests with emdebian cross compilers

2016-12-19 Thread Marc-André Lureau
Hi - Original Message - > Hi Pranith, > > Here is a proof-of-concept series for you to consider rolling into the TCG > tests > cleanup. It uses the existing docker make machinery to build a Debian > image which has arm, arm64 and ppc64el cross compilers in it. Now if > you run: > > mak

Re: [Qemu-devel] [RFC PATCH 00/13] VT-d replay and misc cleanup

2016-12-19 Thread Liu, Yi L
> -Original Message- > From: Peter Xu [mailto:pet...@redhat.com] > Sent: Monday, December 19, 2016 5:23 PM > To: Liu, Yi L > Cc: Tian, Kevin ; Lan, Tianyu ; > jasow...@redhat.com; qemu-devel@nongnu.org; Liu, Yi L > Subject: Re: [Qemu-devel] [RFC PATCH 00/13] VT-d replay and misc cleanup >

Re: [Qemu-devel] [qemu patch V4 2/2] kvmclock: reduce kvmclock difference on migration

2016-12-19 Thread Marcelo Tosatti
On Fri, Dec 16, 2016 at 11:41:36AM -0200, Eduardo Habkost wrote: > On Fri, Dec 16, 2016 at 11:03:33AM +0100, Paolo Bonzini wrote: > > I'd like to make a few cleanups and add more documentation: > > > > Looks good to me. > > Reviewed-by: Eduardo Habkost +1

Re: [Qemu-devel] [PATCH v7 08/11] x86, kvm/x86.c: support vcpu preempted check

2016-12-19 Thread Andrea Arcangeli
Hello, On Wed, Nov 02, 2016 at 05:08:35AM -0400, Pan Xinhui wrote: > Support the vcpu_is_preempted() functionality under KVM. This will > enhance lock performance on overcommitted hosts (more runnable vcpus > than physical cpus in the system) as doing busy waits for preempted > vcpus will hurt sys

Re: [Qemu-devel] [PATCH v7 3/5] IOMMU: enable intel_iommu map and unmap notifiers

2016-12-19 Thread Liu, Yi L
> -Original Message- > From: Peter Xu [mailto:pet...@redhat.com] > Sent: Monday, December 19, 2016 6:01 PM > To: Liu, Yi L > Cc: bd.a...@gmail.com; qemu-devel@nongnu.org; Michael S. Tsirkin > ; , Jan Kiszka ; , Alex Williamson > ; , Jason Wang ; Lan, > Tianyu ; Tian, Kevin > Subject: Re:

Re: [Qemu-devel] [PATCH v7 3/5] IOMMU: enable intel_iommu map and unmap notifiers

2016-12-19 Thread Liu, Yi L
> -Original Message- > From: Liu, Yi L > Sent: Friday, December 16, 2016 5:12 PM > To: bd.a...@gmail.com; qemu-devel@nongnu.org > Cc: Michael S. Tsirkin ; , Jan Kiszka > ; , Peter Xu ; , Alex Williamson > ; , Jason Wang ; Lan, > Tianyu ; Tian, Kevin ; Liu, Yi L > > Subject: RE: [Qemu-devel

Re: [Qemu-devel] [PATCH 09/21] qcow2: add .bdrv_load_autoloading_dirty_bitmaps

2016-12-19 Thread Vladimir Sementsov-Ogievskiy
16.12.2016 17:37, Max Reitz wrote: On 14.12.2016 16:54, Vladimir Sementsov-Ogievskiy wrote: 07.12.2016 23:51, Max Reitz wrote: On 22.11.2016 18:26, Vladimir Sementsov-Ogievskiy wrote: Auto loading bitmaps are bitmaps in Qcow2, with the AUTO flag set. They are loaded when the image is opened an

Re: [Qemu-devel] Is qemu-img amend an atomic operation?

2016-12-19 Thread Maor Lipchuk
On Mon, Dec 19, 2016 at 2:47 PM, Maor Lipchuk wrote: > Hi All, > > Does amend considered as an atomic operation or should we mark a volume as > ILLEGAL once the amend operation fails? > > also, if I call amend, but downgrade the QCOW volume compatibility level > from 1.1 to 0.10, is that atomic a

[Qemu-devel] Is qemu-img amend an atomic operation?

2016-12-19 Thread Maor Lipchuk
Hi All, Does amend considered as an atomic operation or should we mark a volume as ILLEGAL once the amend operation fails? also, if I call amend, but downgrade the QCOW volume compatibility level from 1.1 to 0.10, is that atomic as well (or not, based on the answer on the previous question)? Reg

Re: [Qemu-devel] Is qemu-img amend an atomic operation?

2016-12-19 Thread Kevin Wolf
Am 19.12.2016 um 13:49 hat Maor Lipchuk geschrieben: > > On Mon, Dec 19, 2016 at 2:47 PM, Maor Lipchuk wrote: > > Hi All, > > Does amend considered as an atomic operation or should we mark a volume as > ILLEGAL once the amend operation fails? > > also, if I call amend, but down

[Qemu-devel] [PATCH v6 0/9] replay additions

2016-12-19 Thread Pavel Dovgalyuk
This set of patches includes several fixes for replay and vmstate. This patches add rrsnapshot option for icount. rrshapshot option creates start snapshot at record and loads it at replay. It allows preserving the state of disk images used by virtual machine. This vm state can also use used to rol

[Qemu-devel] [PATCH v6 1/9] icount: update instruction counter on apic patching

2016-12-19 Thread Pavel Dovgalyuk
kvmvapic patches the code when some instructions are executed. E.g. mov 0xff, 0xfffe0080 is interpreted as push 0xff/call ... This patching is also followed by some side effects (changing apic and guest memory state). Therefore deterministic execution should take this operation into account. This p

[Qemu-devel] [PATCH v6 2/9] replay: improve interrupt handling

2016-12-19 Thread Pavel Dovgalyuk
This patch improves interrupt handling in record/replay mode. Now "interrupt" event is saved only when cc->cpu_exec_interrupt returns true. This patch also adds missing return to cpu_exec_interrupt function. Signed-off-by: Pavel Dovgalyuk --- cpu-exec.c |2 +- target-i386/seg_h

[Qemu-devel] [PATCH v6 7/9] replay: save/load initial state

2016-12-19 Thread Pavel Dovgalyuk
This patch implements initial vmstate creation or loading at the start of record/replay. It is needed for rewinding the execution in the replay mode. v4 changes: - snapshots are not created by default anymore v3 changes: - added rrsnapshot option Signed-off-by: Pavel Dovgalyuk --- docs/repla

[Qemu-devel] [PATCH v6 3/9] apic: save apic_delivered flag

2016-12-19 Thread Pavel Dovgalyuk
This patch implements saving/restoring of static apic_delivered variable. Signed-off-by: Pavel Dovgalyuk --- hw/intc/apic_common.c | 32 include/hw/i386/apic_internal.h |2 ++ 2 files changed, 34 insertions(+) diff --git a/hw/intc/apic_common.c b

[Qemu-devel] [PATCH v6 4/9] replay: don't use rtc clock on loadvm phase

2016-12-19 Thread Pavel Dovgalyuk
This patch disables the update of the periodic timer of mc146818rtc in record/replay mode. State of this timer is saved and therefore does not need to be updated in record/replay mode. Read of RTC breaks the replay because all rtc reads have to be the same as in record mode. Signed-off-by: Pavel D

[Qemu-devel] [PATCH v6 5/9] integratorcp: adding vmstate for save/restore

2016-12-19 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk VMState added by this patch preserves correct loading of the integratorcp device state. Signed-off-by: Pavel Dovgalyuk --- hw/arm/integratorcp.c | 62 + 1 file changed, 62 insertions(+) diff --git a/hw/arm/integratorcp.c

[Qemu-devel] [PATCH v6 8/9] block: implement bdrv_snapshot_goto for blkreplay

2016-12-19 Thread Pavel Dovgalyuk
This patch enables making snapshots with blkreplay used in block devices. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c |8 1 file changed, 8 insertions(+) diff --git a/block/blkreplay.c b/block/blkreplay.c index a741654..8a03d62 100644 --- a/block/blkreplay.c +++ b/block/bl

[Qemu-devel] [PATCH v6 9/9] blkreplay: create temporary overlay for underlaying devices

2016-12-19 Thread Pavel Dovgalyuk
This patch allows using '-snapshot' behavior in record/replay mode. blkreplay layer creates temporary overlays on top of underlaying disk images. It is needed, because creating an overlay over blkreplay breaks the determinism. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c | 76 +

[Qemu-devel] [PATCH v6 6/9] savevm: add public save_vmstate function

2016-12-19 Thread Pavel Dovgalyuk
This patch introduces save_vmstate function to allow saving and loading vmstates from the replay module. Signed-off-by: Pavel Dovgalyuk --- include/sysemu/sysemu.h |1 + migration/savevm.c | 33 ++--- 2 files changed, 23 insertions(+), 11 deletions(-) diff

Re: [Qemu-devel] [PATCH v7 3/5] IOMMU: enable intel_iommu map and unmap notifiers

2016-12-19 Thread Peter Xu
On Mon, Dec 19, 2016 at 11:53:32AM +, Liu, Yi L wrote: [...] > > > Regards to the s->notifiers_list, I didn't see the init op to it. Does it > > > happen > > > in another patch? If so, it may be better to move it in this patch since > > > this > > > patch introduces both the definition and

Re: [Qemu-devel] Is qemu-img amend an atomic operation?

2016-12-19 Thread Maor Lipchuk
On Mon, Dec 19, 2016 at 3:10 PM, Kevin Wolf wrote: > Am 19.12.2016 um 13:49 hat Maor Lipchuk geschrieben: > > > > On Mon, Dec 19, 2016 at 2:47 PM, Maor Lipchuk > wrote: > > > > Hi All, > > > > Does amend considered as an atomic operation or should we mark a > volume as > > ILLEGAL on

Re: [Qemu-devel] [PATCH] virtio: fix vring->inuse recalc after migr

2016-12-19 Thread Stefan Hajnoczi
On Fri, Dec 16, 2016 at 05:43:29PM +0100, Halil Pasic wrote: > > > On 12/16/2016 05:12 PM, Stefan Hajnoczi wrote: > >> You are not the first one complaining, so the sentence is definitively > >> bad. What disturbs me regarding your formulation is that we do not use > >> uint16_t to represent neit

Re: [Qemu-devel] [PATCH v1 0/2] Add Atmel I2C TPM AT97SC3204T emulated device

2016-12-19 Thread Corey Minyard
On 12/18/2016 07:47 PM, Alastair D'Silva wrote: On Fri, 2016-12-16 at 17:35 +, Peter Maydell wrote: (added a couple of people to cc who might have an opinion on the i2c protocol questions below) I'm certainly no expert, but I'll try :) I know a little bit and I've implemented some stuff,

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-19 Thread Stefan Hajnoczi
On Mon, Dec 19, 2016 at 09:07:43AM +0800, Fam Zheng wrote: > On Sun, 12/18 20:52, Christopher Pereira wrote: > > Hi, > > > > We are doing a "qemu-img convert" operation (qcow2, with compression) to > > shorten the backing-chain (in the middle of the backing-chain). > > In order to force qemu to re

Re: [Qemu-devel] [PATCH v4 2/4] target-i386: Add Intel HAX files

2016-12-19 Thread Vincent Palatin
On Mon, Dec 19, 2016 at 11:29 AM, Vincent Palatin wrote: > That's a forward port of the core HAX interface code from the > emu-2.2-release branch in the external/qemu-android repository as used by > the Android emulator. > > The original commit was "target-i386: Add Intel HAX to android emulator"

[Qemu-devel] [PATCH 1/2] memory: provide common macros for mtree_print_mr()

2016-12-19 Thread Peter Xu
mtree_print_mr() has some common codes. Generalize it. Signed-off-by: Peter Xu --- memory.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/memory.c b/memory.c index 33110e9..5dcc2e1 100644 --- a/memory.c +++ b/memory.c @@ -2450,6 +2450,13

[Qemu-devel] [PATCH 2/2] memory: hmp: dump flat view for 'info mtree'

2016-12-19 Thread Peter Xu
Dumping flat view will be useful to debug the memory rendering logic, also it'll be much easier with it to know what memory region is handling what address range. Signed-off-by: Peter Xu --- memory.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/memory.c b/

[Qemu-devel] [PATCH 0/2] memory: extend "info mtree" with flat view dump

2016-12-19 Thread Peter Xu
Each address space has its own flatview. It's another way to observe memory info besides the default memory region hierachy, for example, if we want to know which memory region will handle the write to specific address, a flatview will suite more here than the default hierachical dump. I used it t

Re: [Qemu-devel] [PATCH RFC v2 1/4] block: refactor bdrv_next_node for readability

2016-12-19 Thread Stefan Hajnoczi
On Mon, Dec 19, 2016 at 04:51:23PM +0800, Dou Liyang wrote: > make the bdrv_next_node() clearly and add some comments. > > Signed-off-by: Dou Liyang > --- > block.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/block.c b/block.c > index 39ddea3..01c9

[Qemu-devel] [PATCH] 9pfs: fix crash when fsdev is missing

2016-12-19 Thread Greg Kurz
If the user passes -device virtio-9p without the corresponding -fsdev, QEMU dereferences a NULL pointer and crashes. This is a 2.8 regression introduced by commit 702dbcc274e2c. Signed-off-by: Greg Kurz --- hw/9pfs/9p.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9

Re: [Qemu-devel] [PATCH v7 08/11] x86, kvm/x86.c: support vcpu preempted check

2016-12-19 Thread Paolo Bonzini
On 19/12/2016 14:56, Pan Xinhui wrote: > hi, Andrea > thanks for your reply. :) > > 在 2016/12/19 19:42, Andrea Arcangeli 写道: >> Hello, >> >> On Wed, Nov 02, 2016 at 05:08:35AM -0400, Pan Xinhui wrote: >>> Support the vcpu_is_preempted() functionality under KVM. This will >>> enhance lock per

[Qemu-devel] [PATCH] intel_iommu: allow dynamic switch of IOMMU region

2016-12-19 Thread Peter Xu
This is preparation work to finally enabled dynamic switching ON/OFF for VT-d protection. The old VT-d codes is using static IOMMU region, and that won't satisfy vfio-pci device listeners. Let me explain. vfio-pci devices depend on the memory region listener and IOMMU replay mechanism to make sur

Re: [Qemu-devel] [PATCH RFC v2 3/4] block/qapi: acquire a reference instead of a lock during querying blockstats

2016-12-19 Thread Stefan Hajnoczi
On Mon, Dec 19, 2016 at 04:51:25PM +0800, Dou Liyang wrote: > This patch works to improve the performance of the query requests. > > From the commit 13344f3a, it adds a lock to make query-blockstats > safe by the aio_context_acquire(). the qmp_query_blockstats func > requires/releases the AioConte

Re: [Qemu-devel] [PATCH RFC v2 0/4] block/qapi: refactor and optimize the qmp_query_blockstats()

2016-12-19 Thread Stefan Hajnoczi
On Mon, Dec 19, 2016 at 04:51:22PM +0800, Dou Liyang wrote: > These patches aim to refactor the qmp_query_blockstats() and > improve the performance by reducing the running time of it. > > qmp_query_blockstats() is used to monitor the blockstats, it > querys all the graph_bdrv_states or monitor_bl

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-19 Thread Christopher Pereira
Hi Fam, Stefan, Thanks for answering. We use "qemu-img convert" to convert a image in the middle of the chain, not the active one. Those images (and the previous ones in the chain) are read-only and there should be no risk in converting them: E.g.: for the following chain: base --> snap1

Re: [Qemu-devel] [PATCH v7 08/11] x86, kvm/x86.c: support vcpu preempted check

2016-12-19 Thread Pan Xinhui
hi, Andrea thanks for your reply. :) 在 2016/12/19 19:42, Andrea Arcangeli 写道: Hello, On Wed, Nov 02, 2016 at 05:08:35AM -0400, Pan Xinhui wrote: Support the vcpu_is_preempted() functionality under KVM. This will enhance lock performance on overcommitted hosts (more runnable vcpus than

[Qemu-devel] [PATCH] mirror: prevent 'top' mode mirroring when no backing file specified on the destination

2016-12-19 Thread sochin jiang
Mirroring using 'top' mode without backing file specified on the target can be success, but end with a disaster. For example: Migration can be success in this situation while the virtual machine on the destination is no longer usable because of backing lost. Remind the user earlier and

Re: [Qemu-devel] [PATCH 13/21] qcow2: add .bdrv_store_persistent_dirty_bitmaps()

2016-12-19 Thread Max Reitz
On 17.12.2016 15:58, Vladimir Sementsov-Ogievskiy wrote: > 09.12.2016 20:05, Max Reitz wrote: >> On 22.11.2016 18:26, Vladimir Sementsov-Ogievskiy wrote: >>> Realize block bitmap storing interface, to allow qcow2 images store >>> persistent bitmaps. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievsk

Re: [Qemu-devel] [PATCH 13/21] qcow2: add .bdrv_store_persistent_dirty_bitmaps()

2016-12-19 Thread Vladimir Sementsov-Ogievskiy
19.12.2016 18:14, Max Reitz wrote: On 17.12.2016 15:58, Vladimir Sementsov-Ogievskiy wrote: 09.12.2016 20:05, Max Reitz wrote: On 22.11.2016 18:26, Vladimir Sementsov-Ogievskiy wrote: Realize block bitmap storing interface, to allow qcow2 images store persistent bitmaps. Signed-off-by: Vladim

Re: [Qemu-devel] [PATCH] mirror: prevent 'top' mode mirroring when no backing file specified on the destination

2016-12-19 Thread Eric Blake
On 12/19/2016 04:38 PM, sochin jiang wrote: > Mirroring using 'top' mode without backing file specified on the target can > be success, > but end with a disaster. > > For example: >Migration can be success in this situation while the virtual machine on > the destination > is no longer us

Re: [Qemu-devel] [PATCH v1 0/2] Add Atmel I2C TPM AT97SC3204T emulated device

2016-12-19 Thread Peter Maydell
On 19 December 2016 at 13:55, Corey Minyard wrote: > On 12/18/2016 07:47 PM, Alastair D'Silva wrote: >> >> On Fri, 2016-12-16 at 17:35 +, Peter Maydell wrote: >>> Our current API seems to envisage that the slave can return a >>> negative value from I2CSlaveClass::recv instead of a data byte, >

Re: [Qemu-devel] [PATCH] mirror: prevent 'top' mode mirroring when no backing file specified on the destination

2016-12-19 Thread Max Reitz
On 19.12.2016 23:38, sochin jiang wrote: > Mirroring using 'top' mode without backing file specified on the target can > be success, > but end with a disaster. > > For example: >Migration can be success in this situation while the virtual machine on > the destination > is no longer usabl

Re: [Qemu-devel] [PATCH 13/21] qcow2: add .bdrv_store_persistent_dirty_bitmaps()

2016-12-19 Thread Max Reitz
On 19.12.2016 16:26, Vladimir Sementsov-Ogievskiy wrote: > 19.12.2016 18:14, Max Reitz wrote: >> On 17.12.2016 15:58, Vladimir Sementsov-Ogievskiy wrote: >>> 09.12.2016 20:05, Max Reitz wrote: On 22.11.2016 18:26, Vladimir Sementsov-Ogievskiy wrote: > Realize block bitmap storing interface

[Qemu-devel] [PATCH v2 1/1] virtio: fix vq->inuse recalc after migr

2016-12-19 Thread Halil Pasic
Correct recalculation of vq->inuse after migration for the corner case where the avail_idx has already wrapped but used_idx not yet. Also change the type of the VirtQueue.inuse to unsigned int. This is done to be consistent with other members representing sizes (VRing.num), and because C99 guarant

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-19 Thread Eric Blake
On 12/19/2016 09:03 AM, Christopher Pereira wrote: > Hi Fam, Stefan, > > Thanks for answering. > > We use "qemu-img convert" to convert a image in the middle of the chain, > not the active one. > Those images (and the previous ones in the chain) are read-only and > there should be no risk in conv

Re: [Qemu-devel] [PATCH 13/21] qcow2: add .bdrv_store_persistent_dirty_bitmaps()

2016-12-19 Thread Vladimir Sementsov-Ogievskiy
19.12.2016 18:34, Max Reitz wrote: On 19.12.2016 16:26, Vladimir Sementsov-Ogievskiy wrote: 19.12.2016 18:14, Max Reitz wrote: On 17.12.2016 15:58, Vladimir Sementsov-Ogievskiy wrote: 09.12.2016 20:05, Max Reitz wrote: On 22.11.2016 18:26, Vladimir Sementsov-Ogievskiy wrote: Realize block bi

[Qemu-devel] [Bug 1651167] [NEW] hw/ipmi/isa_ipmi_bt.c:283: suspect use of macro ?

2016-12-19 Thread dcb
Public bug reported: I just had a go at compiling qemu trunk with llvm trunk. It said: hw/ipmi/isa_ipmi_bt.c:283:31: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] Source code is IPMI_BT_SET_HBUSY(ib->control_reg,

Re: [Qemu-devel] [PATCH v1 0/2] Add Atmel I2C TPM AT97SC3204T emulated device

2016-12-19 Thread Corey Minyard
On 12/19/2016 09:31 AM, Peter Maydell wrote: On 19 December 2016 at 13:55, Corey Minyard wrote: On 12/18/2016 07:47 PM, Alastair D'Silva wrote: On Fri, 2016-12-16 at 17:35 +, Peter Maydell wrote: Our current API seems to envisage that the slave can return a negative value from I2CSlaveCla

Re: [Qemu-devel] Can qemu reopen image files?

2016-12-19 Thread Christopher Pereira
Hi Eric, Thanks for your great answer. On 19-Dec-16 12:48, Eric Blake wrote: Then we do the rebase while the VM is suspended to make sure the image files are reopened. That part is where you are liable to break things. Qemu does NOT have a graceful way to reopen the backing chain, so rebas

[Qemu-devel] [PATCH v5 0/4] Add HAX support

2016-12-19 Thread Vincent Palatin
I took a stab at trying to rebase/upstream the support for Intel HAXM. (Hardware Accelerated Execution Manager). Intel HAX is kernel-based hardware acceleration module for Windows and MacOSX. I have based my work on the last version of the source code I found: the emu-2.2-release branch in the ext

[Qemu-devel] [PATCH v5 3/4] Plumb the HAXM-based hardware acceleration support

2016-12-19 Thread Vincent Palatin
Use the Intel HAX is kernel-based hardware acceleration module for Windows (similar to KVM on Linux). Based on the "target-i386: Add Intel HAX to android emulator" patch from David Chou Signed-off-by: Vincent Palatin --- Makefile.target | 1 + configure | 18

[Qemu-devel] [PATCH v5 1/4] kvm: move cpu synchronization code

2016-12-19 Thread Vincent Palatin
Move the generic cpu_synchronize_ functions to the common hw_accel.h header, in order to prepare for the addition of a second hardware accelerator. Signed-off-by: Stefan Weil Signed-off-by: Vincent Palatin --- cpus.c | 1 + gdbstub.c | 1 + hw/i386/kvm/a

[Qemu-devel] [PATCH v5 2/4] target-i386: Add Intel HAX files

2016-12-19 Thread Vincent Palatin
That's a forward port of the core HAX interface code from the emu-2.2-release branch in the external/qemu-android repository as used by the Android emulator. The original commit was "target-i386: Add Intel HAX to android emulator" saying: """ Backport of 2b3098ff27bab079caab9b46b58546b5036f5c0c

[Qemu-devel] [PATCH v5 4/4] hax: add Darwin support

2016-12-19 Thread Vincent Palatin
Re-add the MacOSX/Darwin support: Use the Intel HAX is kernel-based hardware acceleration module (similar to KVM on Linux). Based on the original "target-i386: Add Intel HAX to android emulator" patch from David Chou from emu-2.2-release branch in the external/qemu-android repository. Signed-of

Re: [Qemu-devel] Is block_save_iterate() dead code?

2016-12-19 Thread Thomas Huth
On 16.12.2016 18:03, Dr. David Alan Gilbert wrote: > * Thomas Huth (th...@redhat.com) wrote: >> On 18.11.2016 09:13, Thomas Huth wrote: >>> On 17.11.2016 04:45, David Gibson wrote: On Mon, Nov 14, 2016 at 07:34:59PM +0100, Juan Quintela wrote: > Thomas Huth wrote: >> qemu_savevm_state

Re: [Qemu-devel] [PATCH RFC v2 0/4] block/qapi: refactor and optimize the qmp_query_blockstats()

2016-12-19 Thread Fam Zheng
On Mon, 12/19 15:02, Stefan Hajnoczi wrote: > On Mon, Dec 19, 2016 at 04:51:22PM +0800, Dou Liyang wrote: > > These patches aim to refactor the qmp_query_blockstats() and > > improve the performance by reducing the running time of it. > > > > qmp_query_blockstats() is used to monitor the blockstat

Re: [Qemu-devel] [RESEND Patch v1 00/37] Implementation of vhost-pci for inter-vm commucation

2016-12-19 Thread Marc-André Lureau
Hi Wei, On Mon, Dec 19, 2016 at 7:00 AM Wei Wang wrote: > This patch series implements vhost-pci, which is a point-to-point based > inter-vm > communication solution. The QEMU side implementation includes the > vhost-user > extension, vhost-pci device emulation and management. The current device

[Qemu-devel] [PATCH v4 0/6] POWER9 TCG enablements - BCD functions - final part

2016-12-19 Thread Jose Ricardo Ziviani
v4: - improves functions to behave exactly like the target v3: - moves shift functions to host-utils.c and added config_int128 guard - changes Makefile to always compile host-utils.c - redesigns bcd[u]trunc to use bitwise operations - removes "target-ppc: Implement bcd_is_valid function" (mer

[Qemu-devel] [PATCH v4 4/6] target-ppc: Implement bcdsr. instruction

2016-12-19 Thread Jose Ricardo Ziviani
bcdsr.: Decimal shift and round. This instruction works like bcds. however, when performing right shift, 1 will be added to the result if the last digit was >= 5. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 48

[Qemu-devel] [PATCH v4 1/6] target-ppc: Implement unsigned quadword left/right shift and unit tests

2016-12-19 Thread Jose Ricardo Ziviani
This commit implements functions to right and left shifts and the unittest for them. Such functions is needed due to instructions that requires them. Today, there is already a right shift implementation in int128.h but it's designed for signed numbers. Signed-off-by: Jose Ricardo Ziviani --- in

[Qemu-devel] [PATCH v4 2/6] target-ppc: Implement bcds. instruction

2016-12-19 Thread Jose Ricardo Ziviani
bcds.: Decimal shift. Given two registers vra and vrb, this instruction shift the vrb value by vra bits into the result register. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 40 + ta

[Qemu-devel] [PATCH v4 3/6] target-ppc: Implement bcdus. instruction

2016-12-19 Thread Jose Ricardo Ziviani
bcdus.: Decimal unsigned shift. This instruction works like bcds. but considers only unsigned BCDs (no sign in least meaning 4 bits). Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 41 +

[Qemu-devel] [PATCH v4 5/6] target-ppc: Implement bcdtrunc. instruction

2016-12-19 Thread Jose Ricardo Ziviani
bcdtrunc.: Decimal integer truncate. Given a BCD number in vrb and the number of bytes to truncate in vra, the return register will have vrb with such bits truncated. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 37

[Qemu-devel] [PATCH v4 6/6] target-ppc: Implement bcdutrunc. instruction

2016-12-19 Thread Jose Ricardo Ziviani
bcdutrunc. Decimal unsigned truncate. Works like bcdtrunc. with unsigned BCD numbers. Signed-off-by: Jose Ricardo Ziviani --- target-ppc/helper.h | 1 + target-ppc/int_helper.c | 51 + target-ppc/translate/vmx-impl.inc.c | 4 +++

Re: [Qemu-devel] [PATCH] intel_iommu: allow dynamic switch of IOMMU region

2016-12-19 Thread Alex Williamson
On Mon, 19 Dec 2016 22:41:26 +0800 Peter Xu wrote: > This is preparation work to finally enabled dynamic switching ON/OFF for > VT-d protection. The old VT-d codes is using static IOMMU region, and > that won't satisfy vfio-pci device listeners. > > Let me explain. > > vfio-pci devices depend o

Re: [Qemu-devel] [PATCH v6 2/4] hw/intc/arm_gicv3_kvm: Implement get/put functions

2016-12-19 Thread Auger Eric
Hi Vijaya, On 23/11/2016 13:39, vijay.kil...@gmail.com wrote: > From: Vijaya Kumar K > > This actually implements pre_save and post_load methods for in-kernel > vGICv3. > > Signed-off-by: Pavel Fedin > Signed-off-by: Peter Maydell > [PMM: > * use decimal, not 0bnnn > * fixed typo in names o

Re: [Qemu-devel] Strange/wrong behavior with iSCSI Tape devices in QEMU 2.8.0-rc4

2016-12-19 Thread John Snow
On 12/19/2016 04:05 AM, Holger Schranz wrote: > # Strange/wrong behavior in QEMU 2.8.0-rc4 > > After update from QEMU 2.6.2 to 2.8.0-rc4 the tape devices > and the corresponding medium changer are no longer available > in the VM quest system. > > The tape devices and the media changer are decla

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH qemu] spapr_pci: Create PCI-express root bus by default

2016-12-19 Thread Andrea Bolognani
On Wed, 2016-12-14 at 20:26 +0200, Marcel Apfelbaum wrote: > > > > > > Maybe I just don't quite get the relationship between Root > > > > > > Complexes and Root Buses, but I guess my question is: what > > > > > > is preventing us from simply doing whatever a > > > > > > spapr-pci-host-bridge is doi

  1   2   >