[Qemu-devel] [PATCH 07/25] net: vmxnet: use g_new for pkt initialisation

2016-09-20 Thread Michael Roth
From: Li Qiang When vmxnet transport abstraction layer initialises pkt, the maximum fragmentation count is not checked. This could lead to an integer overflow causing a NULL pointer dereference. Replace g_malloc() with g_new() to catch the multiplication overflow. Reported-by: Li Qiang Signed-o

[Qemu-devel] [V5 1/6] hw/msi: Allow platform devices to use explicit SID

2016-09-20 Thread David Kiarie
When using IOMMU platform devices like IOAPIC are required to make interrupt remapping requests using explicit SID. We associate an MSI route with a requester ID and a PCI device if present which ensures that platform devices can call IOMMU interrupt remapping code with explicit SID. This also ensu

[Qemu-devel] [V5 3/6] hw/iommu: Prepare for AMD IOMMU interrupt remapping

2016-09-20 Thread David Kiarie
Introduce macros and trace events for use in AMD IOMMU interrupt remapping Signed-off-by: David Kiarie --- hw/i386/amd_iommu.h | 80 hw/i386/trace-events | 7 + 2 files changed, 87 insertions(+) diff --git a/hw/i386/amd_iommu.h b/hw/i38

Re: [Qemu-devel] [PATCH v16 07/16] hw/ptimer: Add "continuous trigger" policy

2016-09-20 Thread Peter Maydell
On 7 September 2016 at 14:22, Dmitry Osipenko wrote: > Currently, periodic timer that has load = delta = 0 performs trigger > on timer reload and stops, printing a "period zero" error message. > Introduce new policy that makes periodic timer to continuously trigger > with a period interval in case

[Qemu-devel] [PATCH 21/25] scsi: mptconfig: fix misuse of MPTSAS_CONFIG_PACK

2016-09-20 Thread Michael Roth
From: Paolo Bonzini These issues cause respectively a QEMU crash and a leak of 2 bytes of stack. They were discovered by VictorV of 360 Marvel Team. Reported-by: Tom Victor Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini (cherry picked from commit 65a8e1f6413a0f6f79894da710b5d6d43361d

Re: [Qemu-devel] [PATCH v11 0/8] Add a generic loader

2016-09-20 Thread Peter Maydell
On 20 September 2016 at 15:54, Alistair Francis wrote: > This work is based on the original work by Li Guang with extra > features added by Peter C and myself. > > The idea of this loader is to allow the user to load multiple images > or values into QEMU at startup. > > Memory values can be loaded

Re: [Qemu-devel] [PATCH 00/25] Patch Round-up for stable 2.6.2, freeze on 2016-08-26

2016-09-20 Thread Eric Blake
On 09/20/2016 12:05 PM, Michael Roth wrote: > Hi everyone, > > The following new patches are queued for QEMU stable v2.6.2: What happened to the usual shortlog? The following patches still need maintainer pull requests (cc'd), but have been tested and/or reviewed and are candidates for inclusion

Re: [Qemu-devel] [PATCH v16 05/16] hw/ptimer: Add "wraparound after one period" policy

2016-09-20 Thread Peter Maydell
On 7 September 2016 at 14:22, Dmitry Osipenko wrote: > Currently, periodic counter wraps around immediately once counter reaches > "0", this is wrong behaviour for some of the timers, resulting in one period > being lost. Add new ptimer policy that provides correct behaviour for such > timers, so

[Qemu-devel] [PATCH 16/25] scsi: pvscsi: limit process IO loop to ring size

2016-09-20 Thread Michael Roth
From: Prasad J Pandit Vmware Paravirtual SCSI emulator while processing IO requests could run into an infinite loop if 'pvscsi_ring_pop_req_descr' always returned positive value. Limit IO loop to the ring size. Cc: qemu-sta...@nongnu.org Reported-by: Li Qiang Signed-off-by: Prasad J Pandit Mes

[Qemu-devel] [PATCH 25/25] virtio-scsi: Don't abort when media is ejected

2016-09-20 Thread Michael Roth
From: Fam Zheng With an ejected block backend, blk_get_aio_context() would return qemu_aio_context. In this case don't assert. Signed-off-by: Fam Zheng Message-Id: <1473848224-24809-3-git-send-email-f...@redhat.com> Signed-off-by: Paolo Bonzini (cherry picked from commit 2a2d69f490c1b1dc6b6d2a

[Qemu-devel] [PATCH 18/25] scsi-disk: change disk serial length from 20 to 36

2016-09-20 Thread Michael Roth
From: Rony Weng Openstack Cinder assigns volume a 36 characters uuid as serial. QEMU will shrinks the uuid to 20 characters, which does not match the original uuid. Note that there is no limit to the length of the serial number in the SCSI spec. 20 was copy-pasted from virtio-blk which in turn

[Qemu-devel] [PATCH 08/25] 9pfs: forbid illegal path names

2016-09-20 Thread Michael Roth
From: Greg Kurz Empty path components don't make sense for most commands and may cause undefined behavior, depending on the backend. Also, the walk request described in the 9P spec [1] clearly shows that the client is supposed to send individual path components: the official linux client never s

[Qemu-devel] [PATCH 01/25] net: check fragment length during fragmentation

2016-09-20 Thread Michael Roth
From: Prasad J Pandit Network transport abstraction layer supports packet fragmentation. While fragmenting a packet, it checks for more fragments from packet length and current fragment length. It is susceptible to an infinite loop, if the current fragment length is zero. Add check to avoid it.

[Qemu-devel] [PATCH 22/25] crypto: ensure XTS is only used with ciphers with 16 byte blocks

2016-09-20 Thread Michael Roth
From: "Daniel P. Berrange" The XTS cipher mode needs to be used with a cipher which has a block size of 16 bytes. If a mis-matching block size is used, the code will either corrupt memory beyond the IV array, or not fully encrypt/decrypt the IV. This fixes a memory corruption crash when attempti

[Qemu-devel] [PATCH 24/25] scsi-disk: Cleaning up around tray open state

2016-09-20 Thread Michael Roth
From: Fam Zheng Even if tray is not open, it can be empty (blk_is_inserted() == false). Handle both cases correctly by replacing the s->tray_open checks with blk_is_available(), which is an AND of the two. Also simplify successive checks of them into blk_is_available(), in a couple cases. Signe

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Paolo Bonzini
On 20/09/2016 17:14, Daniel P. Berrange wrote: > Any VM which > uses the separate namespace is tainted, which means if theres a bug > report we'll require the reported to remove whatever config caused > the tainting and then reproduce the problem. > > If the vendor specific mdev parameters are t

Re: [Qemu-devel] [PATCH v16 00/16] PTimer fixes/features and ARM MPTimer conversion

2016-09-20 Thread Peter Maydell
On 7 September 2016 at 14:22, Dmitry Osipenko wrote: > Hello, > > Currently, QEMU ARM MPTimer device model provides only a certain subset of > the emulation behavior. This patch series is supposed to add missing parts by > converting the MPTimer to use generic ptimer helper. It fixes some importan

[Qemu-devel] [PATCH 12/25] virtio-balloon: discard virtqueue element on reset

2016-09-20 Thread Michael Roth
From: Ladi Prosek The one pending element is being freed but not discarded on device reset, which causes svq->inuse to creep up, eventually hitting the "Virtqueue size exceeded" error. Properly discarding the element on device reset makes sure that its buffers are unmapped and the inuse counter

[Qemu-devel] [PATCH 06/25] net: vmxnet: check IP header length

2016-09-20 Thread Michael Roth
From: Li Qiang Vmxnet3 device emulator when parsing packet headers does not check for IP header length. It could lead to a OOB access when reading further packet data. Add check to avoid it. Reported-by: Li Qiang Signed-off-by: Prasad J Pandit Reviewed-by: Dmitry Fleytman Signed-off-by: Micha

[Qemu-devel] [PATCH 05/25] iscsi: pass SCSI status back for SG_IO

2016-09-20 Thread Michael Roth
From: Vadim Rozenfeld Signed-off-by: Vadim Rozenfeld Signed-off-by: Paolo Bonzini (cherry picked from commit 644c6869d335e10bc10b8399646f767763c4977f) Signed-off-by: Michael Roth --- block/iscsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/iscsi.c b/block/iscsi.c index 0466c30.

[Qemu-devel] [PATCH 14/25] 9pfs: fix potential segfault during walk

2016-09-20 Thread Michael Roth
From: Greg Kurz If the call to fid_to_qid() returns an error, we will call v9fs_path_free() on uninitialized paths. It is a regression introduced by the following commit: 56f101ecce0e 9pfs: handle walk of ".." in the root directory Let's fix this by initializing dpath and path before calling f

[Qemu-devel] [PATCH 02/25] ui: fix refresh of VNC server surface

2016-09-20 Thread Michael Roth
From: "Daniel P. Berrange" In previous commit commit c7628bff4138ce906a3620d12e0820c1cf6c140d Author: Gerd Hoffmann Date: Fri Oct 30 12:10:09 2015 +0100 vnc: only alloc server surface with clients connected the VNC server was changed so that the 'vd->server' pixman image was only

[Qemu-devel] [PATCH 17/25] qemu-char: avoid segfault if user lacks of permisson of a given logfile

2016-09-20 Thread Michael Roth
From: Lin Ma Function qemu_chr_alloc returns NULL if it failed to open logfile by any reason, says no write permission. For backends tty, stdio and msmouse, They need to check this return value to avoid segfault in this case. Signed-off-by: Lin Ma Cc: qemu-stable Message-Id: <20160914062250.22

[Qemu-devel] [PATCH 09/25] 9pfs: forbid . and .. in file names

2016-09-20 Thread Michael Roth
From: Greg Kurz According to the 9P spec http://man.cat-v.org/plan_9/5/open about the create request: The names . and .. are special; it is illegal to create files with these names. This patch causes the create and lcreate requests to fail with EINVAL if the file name is either "." or "..". Ev

[Qemu-devel] [PATCH 23/25] iothread: Stop threads before main() quits

2016-09-20 Thread Michael Roth
From: Fam Zheng Right after main_loop ends, we release various things but keep iothread alive. The latter is not prepared to the sudden change of resources. Specifically, after bdrv_close_all(), virtio-scsi dataplane get a surprise at the empty BlockBackend: (gdb) bt at /usr/src/debug/qemu-

[Qemu-devel] [PATCH 19/25] vmw_pvscsi: check page count while initialising descriptor rings

2016-09-20 Thread Michael Roth
From: Prasad J Pandit Vmware Paravirtual SCSI emulation uses command descriptors to process SCSI commands. These descriptors come with their ring buffers. A guest could set the page count for these rings to an arbitrary value, leading to infinite loop or OOB access. Add check to avoid it. Report

[Qemu-devel] [PATCH 13/25] vnc: fix qemu crash because of SIGSEGV

2016-09-20 Thread Michael Roth
From: Gonglei The backtrace is: 0x7f0b75cdf880 in pixman_image_get_stride () from /lib64/libpixman-1.so.0 0x7f0b77bcb3cf in vnc_server_fb_stride (vd=0x7f0b7a1a2bb0) at ui/vnc.c:680 vnc_dpy_copy (dcl=0x7f0b7a1a2c00, src_x=224, src_y=263, dst_x=319, dst_y=363, w=1, h=1) at ui/vnc.c:915 0x

[Qemu-devel] [PATCH 03/25] virtio: recalculate vq->inuse after migration

2016-09-20 Thread Michael Roth
From: Stefan Hajnoczi The vq->inuse field is not migrated. Many devices don't hold VirtQueueElements across migration so it doesn't matter that vq->inuse starts at 0 on the destination QEMU. At least virtio-serial, virtio-blk, and virtio-balloon migrate while holding VirtQueueElements. For the

[Qemu-devel] [PATCH 00/25] Patch Round-up for stable 2.6.2, freeze on 2016-08-26

2016-09-20 Thread Michael Roth
Hi everyone, The following new patches are queued for QEMU stable v2.6.2: https://github.com/mdroth/qemu/commits/stable-2.6-staging The release is planned for 2016-08-29: http://wiki.qemu.org/Planning/2.6 Please respond here or CC qemu-sta...@nongnu.org on any patches you think should be i

[Qemu-devel] [PATCH 15/25] scsi: mptsas: use g_new0 to allocate MPTSASRequest object

2016-09-20 Thread Michael Roth
From: Li Qiang When processing IO request in mptsas, it uses g_new to allocate a 'req' object. If an error occurs before 'req->sreq' is allocated, It could lead to an OOB write in mptsas_free_request function. Use g_new0 to avoid it. Reported-by: Li Qiang Signed-off-by: Prasad J Pandit Message

[Qemu-devel] [PATCH 20/25] scsi: mptconfig: fix an assert expression

2016-09-20 Thread Michael Roth
From: Prasad J Pandit When LSI SAS1068 Host Bus emulator builds configuration page headers, mptsas_config_pack() should assert that the size fits in a byte. However, the size is expressed in 32-bit units, so up to 1020 bytes fit. The assertion was only allowing replies up to 252 bytes, so fix i

[Qemu-devel] [PATCH 10/25] 9pfs: handle walk of ".." in the root directory

2016-09-20 Thread Michael Roth
From: Greg Kurz The 9P spec at http://man.cat-v.org/plan_9/5/intro says: All directories must support walks to the directory .. (dot-dot) meaning parent directory, although by convention directories contain no explicit entry for .. or . (dot). The parent of the root directory of a server's tree

[Qemu-devel] [PATCH 11/25] virtio: zero vq->inuse in virtio_reset()

2016-09-20 Thread Michael Roth
From: Stefan Hajnoczi vq->inuse must be zeroed upon device reset like most other virtqueue fields. In theory, virtio_reset() just needs assert(vq->inuse == 0) since devices must clean up in-flight requests during reset (requests cannot not be leaked!). In practice, it is difficult to achieve vq

Re: [Qemu-devel] [PATCH 0/2] Produce better termination message

2016-09-20 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Type: series Message-id: cover.1474383125.git.mpriv...@redhat.com Subject: [Qemu-devel] [PATCH 0/2] Produce better termination message === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Alex Williamson
On Tue, 20 Sep 2016 21:53:16 +0530 Kirti Wankhede wrote: > On 9/20/2016 8:13 PM, Alex Williamson wrote: > > On Tue, 20 Sep 2016 19:51:58 +0530 > > Kirti Wankhede wrote: > > > >> On 9/20/2016 3:06 AM, Alex Williamson wrote: > >>> On Tue, 20 Sep 2016 02:05:52 +0530 > >>> Kirti Wankhede wrote

Re: [Qemu-devel] [Qemu-stable] [PATCH STABLE 2.5] vnc: fix VNC websockets TLS handshake

2016-09-20 Thread Michael Roth
Quoting Daniel P. Berrange (2016-09-14 10:02:10) > ping > > Is qemu-stable dead for the 2.5 branch or was this just > missed ? The stable branches generally die once the next major release lands and I switch over to supporting the new stable tree. Generally there's x.y.1 stable release mid-develo

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2016 at 10:01:18PM +0530, Kirti Wankhede wrote: > > > On 9/20/2016 8:44 PM, Daniel P. Berrange wrote: > > On Tue, Sep 20, 2016 at 05:05:43PM +0200, Paolo Bonzini wrote: > >> > >> > >> On 20/09/2016 16:58, Daniel P. Berrange wrote: > > As I've said in my earlier reply - libvirt

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2016 at 10:12:20PM +0530, Kirti Wankhede wrote: > > > On 9/20/2016 10:06 PM, Daniel P. Berrange wrote: > > On Tue, Sep 20, 2016 at 10:01:18PM +0530, Kirti Wankhede wrote: > >> > >> > >> On 9/20/2016 8:44 PM, Daniel P. Berrange wrote: > >>> On Tue, Sep 20, 2016 at 05:05:43PM +0200,

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 10:06 PM, Daniel P. Berrange wrote: > On Tue, Sep 20, 2016 at 10:01:18PM +0530, Kirti Wankhede wrote: >> >> >> On 9/20/2016 8:44 PM, Daniel P. Berrange wrote: >>> On Tue, Sep 20, 2016 at 05:05:43PM +0200, Paolo Bonzini wrote: On 20/09/2016 16:58, Daniel P. Berrange wro

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2016 at 10:01:18PM +0530, Kirti Wankhede wrote: > > > On 9/20/2016 8:44 PM, Daniel P. Berrange wrote: > > On Tue, Sep 20, 2016 at 05:05:43PM +0200, Paolo Bonzini wrote: > >> > >> > >> On 20/09/2016 16:58, Daniel P. Berrange wrote: > > As I've said in my earlier reply - libvirt

[Qemu-devel] [PATCH v6 1/3] target-ppc: add TLB_NEED_LOCAL_FLUSH flag

2016-09-20 Thread Nikunj A Dadhania
Introduces bit-flag in CPUPPCState::tlb_need_flush: TLB_NEED_LOCAL_FLUSH (0x1) - Flush local tlb This would indicate a pending local tlb flush (isync instructions, interrupts, ...) Signed-off-by: Nikunj A Dadhania Reviewed-by: David Gibson --- target-ppc/cpu.h | 1 + target-ppc/help

[Qemu-devel] [PATCH v6 3/3] target-ppc: tlbie/tlbivax should have global effect

2016-09-20 Thread Nikunj A Dadhania
tlbie (BookS) and tlbivax (BookE) plus the H_CALLs(pseries) should have a global effect. Introduces TLB_NEED_GLOBAL_FLUSH flag. During lazy tlb flush, after taking care of pending local flushes, check broadcast flush(at context synchronizing event ptesync/tlbsync, etc) is needed. Depending on the

[Qemu-devel] [PATCH v6 2/3] target-ppc: add flag in chech_tlb_flush()

2016-09-20 Thread Nikunj A Dadhania
We flush the qemu TLB lazily. check_tlb_flush is called whenever we hit a context synchronizing event or instruction that requires a pending flush to be performed. However, we fail to handle broadcast TLB flush operations. In order to fix that efficiently, we want to differenciate whether check_tl

[Qemu-devel] [PATCH v6 0/3] ppc: handle broadcast tlb flush

2016-09-20 Thread Nikunj A Dadhania
PowerPC failed to handle broadcast TLB flush operations. Executing instructions that are defined architecturally as synchronizing global TLB should have a global effect. * tlbie on BookS * tlbivax on BookE * H_CALLs (H_REMOVE, H_BULK_REMOVE and H_PROTECT) in case of pseries, since they contai

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 8:44 PM, Daniel P. Berrange wrote: > On Tue, Sep 20, 2016 at 05:05:43PM +0200, Paolo Bonzini wrote: >> >> >> On 20/09/2016 16:58, Daniel P. Berrange wrote: > As I've said in my earlier reply - libvirt will *NOT* support passing > arbitrary vendor specific parameters as a blob

[Qemu-devel] [PATCH v11 8/8] docs: Add a generic loader explanation document

2016-09-20 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- V11: - Fix corrections V10: - Split the data loading and PC setting V9: - Clarify the image loading options V8: - Improve documentation V6: - Fixup documentation V4: - Re-write to be more comprehensive docs/generic-loader.txt

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 8:13 PM, Alex Williamson wrote: > On Tue, 20 Sep 2016 19:51:58 +0530 > Kirti Wankhede wrote: > >> On 9/20/2016 3:06 AM, Alex Williamson wrote: >>> On Tue, 20 Sep 2016 02:05:52 +0530 >>> Kirti Wankhede wrote: >>> Hi libvirt experts, 'create': Write-o

Re: [Qemu-devel] [PATCH v7 2/4] vfio: VFIO driver for mediated devices

2016-09-20 Thread Alex Williamson
On Tue, 20 Sep 2016 10:50:47 +0800 Jike Song wrote: > On 09/20/2016 04:03 AM, Alex Williamson wrote: > > On Tue, 20 Sep 2016 00:43:15 +0530 > > Kirti Wankhede wrote: > > > >> On 9/20/2016 12:06 AM, Alex Williamson wrote: > >>> On Mon, 19 Sep 2016 23:52:36 +0530 > >>> Kirti Wankhede wrote:

Re: [Qemu-devel] [PATCH v2 1/8] acpi nvdimm: fix wrong buffer size returned by DSM method

2016-09-20 Thread Igor Mammedov
On Tue, 20 Sep 2016 18:14:48 +0300 "Michael S. Tsirkin" wrote: > On Tue, Sep 20, 2016 at 04:07:57PM +0200, Igor Mammedov wrote: > > As sanity check I'd suggest to extract nvdimm ssdt in guest, decompile and > > compile it back. > > Currently I can't compile it back which mean it's really broken.

[Qemu-devel] [PATCH] virtio crypto device specification

2016-09-20 Thread Xin Zeng
Fix spelling mistakes of keywords to make xelatex happy: filed--->field Signed-off-by: Xin Zeng --- virtio-crypto.tex | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/virtio-crypto.tex b/virtio-crypto.tex index ac1fc0a..c3554e3 100644 --- a/virtio-crypto.tex

Re: [Qemu-devel] [PATCH/RFC] loader: enable roms, kernel and firmware files for KSM sharing

2016-09-20 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 1474379311-76684-1-git-send-email-borntrae...@de.ibm.com Subject: [Qemu-devel] [PATCH/RFC] loader: en

[Qemu-devel] [v19 3/4] hw/i386: Introduce AMD IOMMU

2016-09-20 Thread David Kiarie
Add AMD IOMMU emulaton to Qemu in addition to Intel IOMMU. The IOMMU does basic translation, error checking and has a minimal IOTLB implementation. This IOMMU bypassed the need for target aborts by responding with IOMMU_NONE access rights and exempts the region 0xfee0-0xfeef from translatio

[Qemu-devel] [v19 2/4] hw/i386/trace-events: Add AMD IOMMU trace events

2016-09-20 Thread David Kiarie
Signed-off-by: David Kiarie --- hw/i386/trace-events | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/i386/trace-events b/hw/i386/trace-events index 5b99eba..1938b98 100644 --- a/hw/i386/trace-events +++ b/hw/i386/trace-events @@ -13,3 +13,32 @@ mhp_pc_dimm_as

[Qemu-devel] [PATCH v11 3/8] loader: Allow a custom AddressSpace when loading ROMs

2016-09-20 Thread Alistair Francis
When loading ROMs allow the caller to specify an AddressSpace to use for the load. Signed-off-by: Alistair Francis --- V11: - Fix ordering logic V10: - Set the rom address space instead of leaving it NULL - Cleanup ordering logic V9: - Fixup the ROM ordering - Don't allow address space and m

[Qemu-devel] [v19 0/4] AMD IOMMU

2016-09-20 Thread David Kiarie
Hi all, This patchset adds basic AMD IOMMU emulation support to Qemu. Resent this with some changes suggested by Michael. Changes since v17 -removed host dependent defines in bitfields and replaced that with 'extract64/extract32' [Peter, Michael] Changes since v16 - this is mainly supposed

[Qemu-devel] [v19 1/4] hw/pci: Prepare for AMD IOMMU

2016-09-20 Thread David Kiarie
Introduce PCI macros from for use by AMD IOMMU Signed-off-by: David Kiarie --- include/hw/pci/pci.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index e8b83bb..772692f 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -13,9 +13,

Re: [Qemu-devel] [RFC PATCH] ppc/xics: introduce helpers to find an ICP from some (CPU) index

2016-09-20 Thread Cédric Le Goater
On 09/20/2016 03:25 PM, David Gibson wrote: > On Mon, Sep 19, 2016 at 10:54:10AM +0200, Cédric Le Goater wrote: >> Today, the CPU index is used to index the icp array under xics. This >> works correctly when the indexes are sync but that is an assumption >> that could break future implementations.

[Qemu-devel] [PATCH v11 0/8] Add a generic loader

2016-09-20 Thread Alistair Francis
This work is based on the original work by Li Guang with extra features added by Peter C and myself. The idea of this loader is to allow the user to load multiple images or values into QEMU at startup. Memory values can be loaded like this: -device loader,addr=0xfd1a0104,data=0x800e,data-len

Re: [Qemu-devel] [PATCH v8 11/12] tests: Add uuid tests

2016-09-20 Thread Eric Blake
On 09/17/2016 11:25 PM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > tests/Makefile.include | 2 + > tests/test-uuid.c | 177 > + > 2 files changed, 179 insertions(+) > create mode 100644 tests/test-uuid.c > Please also update test

[Qemu-devel] [PATCH v11 2/8] loader: Use the specified MemoryRegion

2016-09-20 Thread Alistair Francis
Prevously the specified MemoryRegion was ignored during the rom register reset. This patch uses the rom MemoryRegion is avaliable. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- hw/core/loader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/core/loade

[Qemu-devel] [PATCH v11 4/8] loader: Add AddressSpace loading support to ELFs

2016-09-20 Thread Alistair Francis
Add a new function load_elf_as() that allows the caller to specify an AddressSpace to use when loading the ELF. The original load_elf() function doesn't have any change in functionality. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- V8: - Introduce an RFC version of AddressSpac

[Qemu-devel] [PATCH v11 6/8] loader: Add AddressSpace loading support to targphys

2016-09-20 Thread Alistair Francis
Add a new function load_image_targphys_as() that allows the caller to specify an AddressSpace to use when loading a targphys. The original load_image_targphys() function doesn't have any change in functionality. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- V10: - Add comment a

Re: [Qemu-devel] [PATCH 2/2] qemu_kill_report: Report PID name too

2016-09-20 Thread Eric Blake
On 09/20/2016 09:54 AM, Michal Privoznik wrote: > When qemu is being killed, its last words are: > > 2016-08-31T11:48:15.293587Z qemu-system-x86_64: terminating on signal 15 from > pid 11180 > > That's nice, but what process is 11180? What if I told you we can > do better: > > 2016-08-31T11:48:

[Qemu-devel] [PATCH v11 1/8] loader: Allow ELF loader to auto-detect the ELF arch

2016-09-20 Thread Alistair Francis
If the caller didn't specify an architecture for the ELF machine the load_elf() function will auto detect it based on the ELF file. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- V10: - Base checks on the EM_NONE macro V9: - Update documentation V8: - Move into load_elf64/load

[Qemu-devel] [PATCH v11 7/8] generic-loader: Add a generic loader

2016-09-20 Thread Alistair Francis
Add a generic loader to QEMU which can be used to load images or set memory values. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- V11: - Small corrections - Don't check for !data as writing a value of 0 is valid. V10: - Split out the PC setting and data loading V9: - Fix err

Re: [Qemu-devel] [PATCH 1/2] util: Introduce qemu_get_pid_name

2016-09-20 Thread Paolo Bonzini
On 20/09/2016 16:54, Michal Privoznik wrote: > This is a small helper that tries to fetch binary name for given > PID. > > Signed-off-by: Michal Privoznik > --- > include/qemu/osdep.h | 10 ++ > util/oslib-posix.c | 36 > util/oslib-win32.c | 7

Re: [Qemu-devel] [PATCH v3] qqq: module for synchronizing with a simulation

2016-09-20 Thread Nutaro, James J.
I realizes my reply wasn't sent to the forum. Thanks Greg for the feedback. I'll keep this in mind for the next revision. Jim From: Greg Kurz Sent: Wednesday, September 07, 2016 2:33 PM To: Nutaro, James J. Cc: qemu-devel@nongnu.org Subject: Re: [Qemu-dev

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2016 at 08:05:01PM +0530, Kirti Wankhede wrote: > > > On 9/20/2016 3:55 AM, Alex Williamson wrote: > > On Mon, 19 Sep 2016 23:50:56 +0200 > > Paolo Bonzini wrote: > > > >> On 19/09/2016 23:36, Alex Williamson wrote: > >>> On Tue, 20 Sep 2016 02:05:52 +0530 > >>> Kirti Wankhede

[Qemu-devel] [PATCH v11 5/8] loader: Add AddressSpace loading support to uImages

2016-09-20 Thread Alistair Francis
Add a new function load_uimage_as() that allows the caller to specify an AddressSpace to use when loading the uImage. The original load_uimage() function doesn't have any change in functionality. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- V10: - Add comment about the functio

[Qemu-devel] [PATCH v4 8/9] virtio: handle virtqueue_num_heads() errors

2016-09-20 Thread Stefan Hajnoczi
If the avail ring index is bogus virtqueue_num_heads() must return -EINVAL. The only caller is virtqueue_get_avail_bytes(). Return saying no bytes are available when virtqueue_num_heads() fails. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 11 --- 1 file changed, 8 insertion

Re: [Qemu-devel] [Qemu-ppc] KVM-PR is broken with current QEMU

2016-09-20 Thread Cédric Le Goater
On 09/20/2016 02:24 PM, Cédric Le Goater wrote: > On 09/20/2016 01:44 PM, Thomas Huth wrote: >> Hi, >> >> when I try to run my guest in KVM-PR mode, current QEMU refuses to start: >> >> $ sudo qemu-system-ppc64 -M pseries,accel=kvm,kvm-type=PR \ >>-nographic -vga none

Re: [Qemu-devel] [RFC 1/8] ui/vnc-enc-tight: add abort() for unexpected default

2016-09-20 Thread Alex Bennée
Paolo Bonzini writes: > On 20/09/2016 10:02, Marc-André Lureau wrote: >> Hi >> >> On Mon, Sep 19, 2016 at 7:58 PM Alex Bennée > > wrote: >> >> When enabling the sanitizer build it will complain about control >> reaching a non-void function. Normally the com

Re: [Qemu-devel] [PATCH v2 1/8] acpi nvdimm: fix wrong buffer size returned by DSM method

2016-09-20 Thread Michael S. Tsirkin
On Tue, Sep 20, 2016 at 04:07:57PM +0200, Igor Mammedov wrote: > As sanity check I'd suggest to extract nvdimm ssdt in guest, decompile and > compile it back. > Currently I can't compile it back which mean it's really broken. Not always true, disassembler is sometimes producing weird code. But it

[Qemu-devel] [PATCH 0/2] Produce better termination message

2016-09-20 Thread Michal Privoznik
First attempt. There's windows implementation missing in 1/2. Well, there's just a stub implementation. Frankly, I haven't even looked into how to map PID to a name on Windows, but if there's wider demand for that I will. Michal Privoznik (2): util: Introduce qemu_get_pid_name qemu_kill_report

Re: [Qemu-devel] [PATCH v3 2/8] block: set snapshot option for block devices in blkreplay module

2016-09-20 Thread Pavel Dovgalyuk
> From: Kevin Wolf [mailto:kw...@redhat.com] > Am 20.09.2016 um 14:31 hat Pavel Dovgalyuk geschrieben: > > This patch adds overlay option for blkreplay filter. > > It allows creating persistent overlay file for saving and reloading > > VM snapshots in record/replay modes. > > > > Signed-off-by: Pav

Re: [Qemu-devel] [Qemu-ppc] KVM-PR is broken with current QEMU

2016-09-20 Thread Cédric Le Goater
On 09/20/2016 04:24 PM, Thomas Huth wrote: > On 20.09.2016 16:04, Cédric Le Goater wrote: >> On 09/20/2016 02:24 PM, Cédric Le Goater wrote: >>> On 09/20/2016 01:44 PM, Thomas Huth wrote: Hi, when I try to run my guest in KVM-PR mode, current QEMU refuses to start: $ sud

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2016 at 04:49:09PM +0200, Paolo Bonzini wrote: > > > On 20/09/2016 16:41, Daniel P. Berrange wrote: > > As I've said in my earlier reply - libvirt will *NOT* support passing > > arbitrary vendor specific parameters as a blob via the XML. Everything > > that appears in the XML must

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2016 at 05:05:43PM +0200, Paolo Bonzini wrote: > > > On 20/09/2016 16:58, Daniel P. Berrange wrote: > > > > As I've said in my earlier reply - libvirt will *NOT* support passing > > > > arbitrary vendor specific parameters as a blob via the XML. Everything > > > > that appears in

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Paolo Bonzini
On 20/09/2016 16:41, Daniel P. Berrange wrote: > As I've said in my earlier reply - libvirt will *NOT* support passing > arbitrary vendor specific parameters as a blob via the XML. Everything > that appears in the XML must be *fully* specified and explicitly > represented in the XML as a distinc

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Paolo Bonzini
On 20/09/2016 16:58, Daniel P. Berrange wrote: > > > As I've said in my earlier reply - libvirt will *NOT* support passing > > > arbitrary vendor specific parameters as a blob via the XML. Everything > > > that appears in the XML must be *fully* specified and explicitly > > > represented in the X

Re: [Qemu-devel] [PATCH v6 15/18] monitor: use qmp_dispatch()

2016-09-20 Thread Alberto Garcia
On Mon, Sep 12, 2016 at 01:19:10PM +0400, Marc-André Lureau wrote: > Replace the old manual dispatch and validation code by the generic one > provided by qapi common code. > > Note that it is now possible to call the following commands that used to > be disabled by compile-time conditionals: > - d

[Qemu-devel] [Bug 1625295] Re: qemu-arm dies with libarmmem inside ld.so.preload

2016-09-20 Thread Peter Maydell
Patch which fixes this: http://patchwork.ozlabs.org/patch/672288/ ** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1625295 Title: qemu-arm dies

Re: [Qemu-devel] [PATCH v3 2/8] block: set snapshot option for block devices in blkreplay module

2016-09-20 Thread Kevin Wolf
[ Cc: qemu-block ] Am 20.09.2016 um 14:31 hat Pavel Dovgalyuk geschrieben: > This patch adds overlay option for blkreplay filter. > It allows creating persistent overlay file for saving and reloading > VM snapshots in record/replay modes. > > Signed-off-by: Pavel Dovgalyuk > --- > block/blkrepl

[Qemu-devel] [PATCH v4 9/9] virtio: handle virtqueue_get_head() errors

2016-09-20 Thread Stefan Hajnoczi
Stop processing the vring if virtqueue_get_head() fetches an out-of-bounds head index. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 6635ce4..21

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 3:06 AM, Alex Williamson wrote: > On Tue, 20 Sep 2016 02:05:52 +0530 > Kirti Wankhede wrote: > >> Hi libvirt experts, >> >> Thanks for valuable input on v1 version of RFC. >> >> Quick brief, VFIO based mediated device framework provides a way to >> virtualize their devices without

[Qemu-devel] [RFC] test/docker/Makefile.include: add a generic docker-run target

2016-09-20 Thread Alex Bennée
This re-factors the docker makefile to include a docker-run target which can be controlled entirely from environment variables specified on the make command line. This allows us to run against any given docker image we may have in our repository, for example: make docker-run TEST="test-quick"

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Kirti Wankhede
On 9/20/2016 3:55 AM, Alex Williamson wrote: > On Mon, 19 Sep 2016 23:50:56 +0200 > Paolo Bonzini wrote: > >> On 19/09/2016 23:36, Alex Williamson wrote: >>> On Tue, 20 Sep 2016 02:05:52 +0530 >>> Kirti Wankhede wrote: 'fb_length': Read-only file. Mandatory. Returns {K

Re: [Qemu-devel] [RFC 5/8] qom/object: update class cache atomically

2016-09-20 Thread Paolo Bonzini
On 20/09/2016 16:59, Alex Bennée wrote: > > Looks fine to me, would be nicer to have an idea of the performance hit, > > but I suppose it is marginal. > > I was surprised that CONFIG_QOM_CAST_DEBUG is the default because it > does a bunch of stuff on every cast. The other option of course would

[Qemu-devel] [PATCH v4 7/9] virtio: handle virtqueue_read_next_desc() errors

2016-09-20 Thread Stefan Hajnoczi
Stop processing the vring if an avail ring index is invalid. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 45 - 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 44d013e..4d25af4 10

Re: [Qemu-devel] [PATCH v2 01/11] target-ppc: exceptions handling in icount mode

2016-09-20 Thread 'David Gibson'
On Tue, Sep 20, 2016 at 11:42:38AM +0300, Pavel Dovgalyuk wrote: > > From: David Gibson [mailto:da...@gibson.dropbear.id.au] > > On Thu, Sep 15, 2016 at 11:09:59AM +0300, Pavel Dovgalyuk wrote: > > > From: Pavel Dovgalyuk > > > > > > This patch fixes exception handling in PowerPC. > > > Instructio

[Qemu-devel] [PATCH v4 0/9] virtio: avoid exit() when device enters invalid states

2016-09-20 Thread Stefan Hajnoczi
v4: * Rebase to qemu.git/master * Use "unsigned int" instead of "unsigned" in virtqueue_undo_map_desc() [Cornelia] v3: * Patch 1: Fix typo and clarify commit description [Markus] * Use virtio_set_status() instead of open coding assignment [Cornelia] * Add live migration v2: * Add VIRTIO_CO

Re: [Qemu-devel] [RFC v2] libvirt vGPU QEMU integration

2016-09-20 Thread Alex Williamson
On Tue, 20 Sep 2016 20:05:01 +0530 Kirti Wankhede wrote: > On 9/20/2016 3:55 AM, Alex Williamson wrote: > > On Mon, 19 Sep 2016 23:50:56 +0200 > > Paolo Bonzini wrote: > > > >> On 19/09/2016 23:36, Alex Williamson wrote: > >>> On Tue, 20 Sep 2016 02:05:52 +0530 > >>> Kirti Wankhede wrote:

Re: [Qemu-devel] [Qemu-ppc] KVM-PR is broken with current QEMU

2016-09-20 Thread Thomas Huth
On 20.09.2016 16:04, Cédric Le Goater wrote: > On 09/20/2016 02:24 PM, Cédric Le Goater wrote: >> On 09/20/2016 01:44 PM, Thomas Huth wrote: >>> Hi, >>> >>> when I try to run my guest in KVM-PR mode, current QEMU refuses to start: >>> >>> $ sudo qemu-system-ppc64 -M pseries,accel=kvm,kvm-type=PR

Re: [Qemu-devel] [PATCH 1/6] iotests: throw away test timings if args change

2016-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2016 at 09:38:33AM -0500, Eric Blake wrote: > On 09/20/2016 09:15 AM, Daniel P. Berrange wrote: > >>> I guess we could keep things simple by not inventing a new format, > >>> but instead of using 'check.time', use 'check.time.$FORMAT-$PROTOCOL' > >>> eg 'check.time.qcow2-file' > >>

Re: [Qemu-devel] [PATCH] linux-user: ppc64: fix ARCH_206 bit in AT_HWCAP

2016-09-20 Thread David Gibson
On Tue, Sep 20, 2016 at 08:55:09AM +0200, Michael Walle wrote: > Am 2016-09-20 04:23, schrieb David Gibson: > > On Tue, Aug 16, 2016 at 03:40:50PM +0200, Michael Walle wrote: > > > Only the POWER[789] CPUs should have the ARCH_206 bit set. This is > > > what the > > > linux kernel does. I guess thi

Re: [Qemu-devel] [PATCH v3 03/10] ppc/pnv: add a core mask to PnvChip

2016-09-20 Thread David Gibson
On Thu, Sep 15, 2016 at 02:45:53PM +0200, Cédric Le Goater wrote: > This will be used to build real HW ids for the cores and enforce some > limits on the available cores per chip. > > Signed-off-by: Cédric Le Goater > --- > > Changes since v2 : > > - added POWER9 support > - removed cores_ma

[Qemu-devel] [PATCH 2/2] qemu_kill_report: Report PID name too

2016-09-20 Thread Michal Privoznik
When qemu is being killed, its last words are: 2016-08-31T11:48:15.293587Z qemu-system-x86_64: terminating on signal 15 from pid 11180 That's nice, but what process is 11180? What if I told you we can do better: 2016-08-31T11:48:15.293587Z qemu-system-x86_64: terminating on signal 15 from pid

Re: [Qemu-devel] [PATCH]MC146818 RTC: coordinate guest clock base to destination host after migration

2016-09-20 Thread zhong...@sangfor.com.cn
Hi, Paolo The reason that use rtc_flush_time/rtc_adjust_timebase pairs instead of rtc_update_time/rtc_set_time is a trick. what all we do is to coordinate the base point of time line for guest on a new host. So, we don't flush realtime of the guest when it's stopped into cmos, but only convert

[Qemu-devel] [PATCH v4 5/9] virtio: handle virtqueue_get_avail_bytes() errors

2016-09-20 Thread Stefan Hajnoczi
If the vring is invalid, tell the caller no bytes are available and mark the device broken. Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index c499028..f378f9c

[Qemu-devel] [PATCH] target-arm: Correctly handle 'sub pc, pc, 1' for ARMv6

2016-09-20 Thread Peter Maydell
In the ARM v6 architecture, 'sub pc, pc, 1' is not an interworking branch, so the computed new value is written to r15 as a normal value. The architecture says that in this case, bits [1:0] of the value written must be ignored if we are in ARM mode (or bit [0] ignored if in Thumb mode); this is a c

<    1   2   3   4   5   >