Re: [Qemu-devel] [PATCH v2] pci: fix pci_requester_id()

2016-05-16 Thread Peter Xu
On Mon, May 16, 2016 at 08:20:46PM +0300, Michael S. Tsirkin wrote: [...] > > > Actually I am curious about how generic PCI system delivers > > > requester ID (if there is)... For PCIe, we have encoded TLP header, > > > and requester ID is filled in the specific field of the header. > > > However

Re: [Qemu-devel] [PATCH qemu v16 19/19] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-05-16 Thread Bharata B Rao
On Mon, May 16, 2016 at 11:55 AM, Alexey Kardashevskiy wrote: > On 05/13/2016 06:41 PM, Bharata B Rao wrote: >> >> On Wed, May 4, 2016 at 12:22 PM, Alexey Kardashevskiy >> wrote: > > >> >>> + >>> +avail = SPAPR_PCI_DMA_MAX_WINDOWS - >>>

[Qemu-devel] [PATCH 2/2] qapi: Fix memleak in string visitors on int lists

2016-05-16 Thread Eric Blake
Commit 7f8f9ef1 introduced the ability to store a list of integers as a sorted list of ranges, but when merging ranges, it leaks one or more ranges. It was also using range_get_last() incorrectly within range_compare() (a range is a start/end pair, but range_get_last() is for start/len pairs),

[Qemu-devel] [PATCH 1/2] qapi: Simplify use of range.h

2016-05-16 Thread Eric Blake
Calling our function g_list_insert_sorted_merged() is a misnomer, since we are NOT writing a glib function. Furthermore, we are making every caller pass the same comparator function of range_merge(): any caller that does otherwise would break in weird ways since our internal call to

[Qemu-devel] [PATCH 0/2] Fix leak in handling of integer lists as strings

2016-05-16 Thread Eric Blake
The qapi string-input and string-output visitors can leak memory when used on integer lists that were set up such that the range list needed to merge adjacent/overlapping ranges; detected by valgrind on test-string-{input,output}-visitor. It doesn't hurt that the overall series removes more code

Re: [Qemu-devel] Android-x86 virgl (Virgil3D) support

2016-05-16 Thread Chih-Wei Huang
2016-05-17 2:55 GMT+08:00 Romain Tisserand : > Thanks ! > > No luck so far on my own built-from-source ISO or > android-x86-6.0-20160318.iso you provided. > I am stuck at android boot logo into > (qemu-system-x86_64:25666): Gdk-CRITICAL **: gdk_gl_context_make_current:

Re: [Qemu-devel] [PATCH v5 10/11] pci core: assert ENOSPC when add capability

2016-05-16 Thread Cao jin
On 05/15/2016 09:10 PM, Marcel Apfelbaum wrote: On 05/06/2016 07:20 AM, Cao jin wrote: ENOSPC is programming error, assert it for debugging. +/* out of PCI config space should be programming error */ 'is', not 'should be' Will fix it. Thank You, Marcel. I guess I should put

Re: [Qemu-devel] [PATCH 2/4] dma-helpers: change BlockBackend to opaque value in DMAIOFunc

2016-05-16 Thread Fam Zheng
On Wed, 05/11 13:41, Paolo Bonzini wrote: > diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h > index b0fbb9b..ddc4afc 100644 > --- a/include/sysemu/dma.h > +++ b/include/sysemu/dma.h > @@ -197,14 +197,15 @@ void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, > dma_addr_t len); > void

Re: [Qemu-devel] [PATCH v5 00/16] Introduce Intel 82574 GbE Controller Emulation (e1000e)

2016-05-16 Thread Jason Wang
On 2016年05月15日 21:49, Leonid Bloch wrote: Hello All, This is v5 of e1000e series. For convenience, the same patches are available at: https://github.com/daynix/qemu-e1000e/tree/e1000e-submit-v5 Best regards, Dmitry. Michael, any more comments on this series? If not, I plan to merge this

Re: [Qemu-devel] [PATCH v3 3/3] memory: drop some wrappers that waste cpu cycle

2016-05-16 Thread Fam Zheng
On Thu, 05/12 18:07, Gonglei wrote: > For better performance, we can use RAMblock > directly stored in memory_region at present. > > Signed-off-by: Gonglei > --- > exec.c | 33 ++--- > hw/misc/ivshmem.c | 8 +--- >

[Qemu-devel] [PATCH] ICH9: fix typo

2016-05-16 Thread Cao jin
Signed-off-by: Cao jin --- it is 4th attempt to send this patch... because of it wasn't delivered correctly by eggs.gnu.org hw/isa/lpc_ich9.c | 4 ++-- include/hw/i386/ich9.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PULL 1/1] rfifolock: no need to get thread identifier when nesting

2016-05-16 Thread Stefan Hajnoczi
From: Changlong Xie Signed-off-by: Changlong Xie Reviewed-by: Denis V. Lunev Message-id: 1462874348-32396-1-git-send-email-xiecl.f...@cn.fujitsu.com Signed-off-by: Stefan Hajnoczi --- util/rfifolock.c

[Qemu-devel] [PULL 0/1] Block patches

2016-05-16 Thread Stefan Hajnoczi
The following changes since commit 70f87e0f0aa04f764dabaeb3ed71ff195748076a: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160513-1' into staging (2016-05-13 13:39:38 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request

Re: [Qemu-devel] RFC: Proposed vfio IGD assignment fw_cfg ABI

2016-05-16 Thread Alex Williamson
On Fri, 13 May 2016 10:21:00 +0200 Gerd Hoffmann wrote: > > #1: "etc/igd-opregion" > > > > the IGD OpRegion is an area of memory which contains among other > > things, the Video BIOS Table which is integral in allowing an assigned > > IGD to configure and make use of the

Re: [Qemu-devel] [PATCH v3 00/14] block: Move I/O throttling to BlockBackend

2016-05-16 Thread Stefan Hajnoczi
On Wed, May 11, 2016 at 03:24:11PM +0200, Kevin Wolf wrote: > This is another feature that was "logically" part of the BlockBackend, but > implemented as a BlockDriverState feature. It was always kept on top using > swap_feature_fields(). > > This series moves it to be actually implemented in the

Re: [Qemu-devel] [PATCH v3 10/14] block/io: Quiesce parents between drained_begin/end

2016-05-16 Thread Stefan Hajnoczi
On Wed, May 11, 2016 at 03:24:21PM +0200, Kevin Wolf wrote: > So far, bdrv_parent_drained_begin/end() was called for the duration of > the actual bdrv_drain() at the beginning of a drained section, but we > really should keep parents quiesced until the end of the drained > section. > > This does

Re: [Qemu-devel] [PATCH v3 09/14] block: Drain throttling queue with BdrvChild callback

2016-05-16 Thread Stefan Hajnoczi
On Wed, May 11, 2016 at 03:24:20PM +0200, Kevin Wolf wrote: > diff --git a/include/block/block_int.h b/include/block/block_int.h > index 6af541e..461583b 100644 > --- a/include/block/block_int.h > +++ b/include/block/block_int.h > @@ -359,6 +359,17 @@ typedef struct BdrvAioNotifier { > struct

Re: [Qemu-devel] [PATCH v3 3/5] adb.c: correct several key assignments

2016-05-16 Thread Programmingkid
On May 16, 2016, at 4:48 PM, Peter Maydell wrote: > On 16 May 2016 at 21:42, Programmingkid wrote: >> >> On May 16, 2016, at 2:04 PM, Peter Maydell wrote: >> >>> On 6 May 2016 at 03:37, Programmingkid wrote: /*

Re: [Qemu-devel] [V10 1/4] hw/i386: Introduce AMD IOMMU

2016-05-16 Thread Jan Kiszka
On 2016-05-16 07:59, David Kiarie wrote: > On Sun, May 15, 2016 at 10:29 PM, Jan Kiszka wrote: >> On 2016-05-09 14:15, David Kiarie wrote: >>> +ret->iova = addr & AMDVI_PAGE_MASK_4K; >>> +ret->translated_addr = (pte & AMDVI_DEV_PT_ROOT_MASK) & >>> +

Re: [Qemu-devel] [PATCH RFC 1/3] linux-user: add rtnetlink(7) support

2016-05-16 Thread Laurent Vivier
Le 13/05/2016 à 18:40, Peter Maydell a écrit : > On 30 January 2016 at 22:26, Laurent Vivier wrote: >> rtnetlink is needed to use iproute package (ip addr, ip route) >> and dhcp client. >> >> Examples: >> >> Without this patch: >> # ip link >> Cannot open netlink

Re: [Qemu-devel] [PATCH] Fix QEMU PPC e500v1 efscmp* instructions

2016-05-16 Thread Imran, Talha
Adding some more basis to the patch: I received some documentation from Freescale support relating to this: Signal Processing Engine (SPE) Programming Environments Manual: http://cache.nxp.com/files/32bit/doc/ref_manual/SPEPEM.pdf. Relevant info is on page #113. According to the documentation,

Re: [Qemu-devel] [PATCH v3 3/5] adb.c: correct several key assignments

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 21:42, Programmingkid wrote: > > On May 16, 2016, at 2:04 PM, Peter Maydell wrote: > >> On 6 May 2016 at 03:37, Programmingkid wrote: >>> /* ADB_KEY_RIGHT_COMMAND works as right super in Linux */ >>> /* Use

Re: [Qemu-devel] [PATCH v3 3/5] adb.c: correct several key assignments

2016-05-16 Thread Programmingkid
On May 16, 2016, at 2:04 PM, Peter Maydell wrote: > On 6 May 2016 at 03:37, Programmingkid wrote: >> The original pc_to_adb_keycode mapping did have several keys that were >> incorrectly mapped. This patch fixes these mappings. >> >> Signed-off-by: John Arbuckle

Re: [Qemu-devel] [PATCH v3 0/5] ADB improvements

2016-05-16 Thread Programmingkid
On May 16, 2016, at 2:09 PM, Peter Maydell wrote: > On 6 May 2016 at 03:33, Programmingkid wrote: >> This patch series makes several improvements to the ADB code. To test this >> code, >> please implement the patches in the order below. >> >> John Arbuckle (5): >>

Re: [Qemu-devel] [PATCH 5/5] target-i386: Move user-mode exception actions out of user-exec.c

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 19:33, Peter Maydell wrote: > On 16 May 2016 at 18:54, Sergey Fedorov wrote: >> 'env->eip' was updated by restore_state_to_opc() from >> cpu_restore_state_from_tb() from cpu_restore_state() from >> handle_cpu_signal() _after_

Re: [Qemu-devel] [PATCH qemu v16 14/19] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2)

2016-05-16 Thread Alex Williamson
On Mon, 16 May 2016 11:10:05 +1000 Alexey Kardashevskiy wrote: > On 05/14/2016 08:25 AM, Alex Williamson wrote: > > On Wed, 4 May 2016 16:52:26 +1000 > > Alexey Kardashevskiy wrote: > > > >> This makes use of the new "memory registering" feature. The idea is >

Re: [Qemu-devel] [PATCH qemu v16 18/19] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)

2016-05-16 Thread Alex Williamson
On Mon, 16 May 2016 14:52:41 +1000 Alexey Kardashevskiy wrote: > On 05/14/2016 08:26 AM, Alex Williamson wrote: > > On Wed, 4 May 2016 16:52:30 +1000 > > Alexey Kardashevskiy wrote: > > > >> New VFIO_SPAPR_TCE_v2_IOMMU type supports dynamic DMA window

Re: [Qemu-devel] [PATCH qemu v16 17/19] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO

2016-05-16 Thread Alex Williamson
On Mon, 16 May 2016 18:35:14 +1000 Alexey Kardashevskiy wrote: > On 05/14/2016 08:26 AM, Alex Williamson wrote: > > On Wed, 4 May 2016 16:52:29 +1000 > > Alexey Kardashevskiy wrote: > > > >> The sPAPR TCE tables manage 2 copies when VFIO is using an IOMMU - >

[Qemu-devel] boot HP Firmware Images of Router and Switches

2016-05-16 Thread Dennis Schneck
Hi, can you make it possible to boot Firmware Images of Router and Switches from HP with qemu ? Thanks for example: 5540HI / 7510 and MSR2004 / HSR6808 [1]http://www.techeia.com/2015/10/networking-hp-switches-firmware.html References 1.

[Qemu-devel] [PULL 4/4] slirp: Clean up osdep.h related header inclusions

2016-05-16 Thread Samuel Thibault
From: Thomas Huth qemu/osdep.h is included in some headers twice - one time should be sufficient. Also remove the inclusion of time.h since that is already done by osdep.h, too (this makes scripts/clean-includes happy again). Signed-off-by: Thomas Huth

[Qemu-devel] [PULL 0/4] slirp updates

2016-05-16 Thread Samuel Thibault
Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160513-1' into staging (2016-05-13 13:39:38 +0100) are available in the git repository at: http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault for you to fetch changes up to 9892663dc486755b5534ff8a77913edc5ea28c79:

[Qemu-devel] [PULL 2/4] slirp: Remove obsolete backward-compatibility cruft

2016-05-16 Thread Samuel Thibault
From: Thomas Huth The slirp code does not use index() and gethostid() anymore, so these parts can be removed without problems. memmove() and strerror() should be available on each of the supported platforms nowadays, too, so these wrappers are also not needed anymore. And we

[Qemu-devel] [PULL 1/4] slirp: Clean up slirp_config.h

2016-05-16 Thread Samuel Thibault
From: Thomas Huth There are a lot of unused #defines / #undefs in slirp_config.h, which are apparently left-overs from the very early slirp code. Since there is no more code that uses them, let's simply remove them from our version of slirp. Signed-off-by: Thomas Huth

[Qemu-devel] [PULL 3/4] slirp: Remove some unused code from slirp.h

2016-05-16 Thread Samuel Thibault
From: Thomas Huth These hunks are apparently not used anymore, so let's delete them. Signed-off-by: Thomas Huth Reviewed-by: Peter Maydell Signed-off-by: Samuel Thibault --- slirp/slirp.h | 22

Re: [Qemu-devel] [PATCH 5/5] target-i386: Move user-mode exception actions out of user-exec.c

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 18:54, Sergey Fedorov wrote: > On 16/05/16 19:09, Peter Maydell wrote: >> The exception_action() function in user-exec.c is just a call to >> cpu_loop_exit() for every target CPU except i386. Since this >> function is only called if the target's

Re: [Qemu-devel] [PATCH v5 06/18] atomics: add atomic_read_acquire and atomic_set_release

2016-05-16 Thread Emilio G. Cota
On Sun, May 15, 2016 at 06:22:36 -0400, Pranith Kumar wrote: > On Fri, May 13, 2016 at 11:34 PM, Emilio G. Cota wrote: > > When __atomic is not available, we use full memory barriers instead > > of smp/wmb, since acquire/release barriers apply to all memory > > operations and not

Re: [Qemu-devel] [PATCH 2/5] user-exec: Push resume-from-signal code out to handle_cpu_signal()

2016-05-16 Thread Sergey Fedorov
On 16/05/16 19:09, Peter Maydell wrote: > Since the only caller of page_unprotect() which might cause it to > need to call cpu_resume_from_signal() is handle_cpu_signal() in > the user-mode code, push the longjump handling out to that function. > > Since this is the only caller of

Re: [Qemu-devel] Question about vNVDIMM file format

2016-05-16 Thread Stefan Hajnoczi
On Mon, May 16, 2016 at 04:04:01PM +0100, Richard W.M. Jones wrote: > I'm playing with ext4 and DAX. > > I'm using: > > -object memory-backend-file,id=mem1,share,mem-path=/var/tmp/pmem,size=4G \ > -device nvdimm,memdev=mem1,id=nv1 > > where /var/tmp/pmem is a 4 GB ext4 filesystem image (no

Re: [Qemu-devel] [PATCH v3 5/5] adb.c: add power key support

2016-05-16 Thread Peter Maydell
On 6 May 2016 at 03:39, Programmingkid wrote: > Add support for the power key. It has to be handled differently from the other > keys because it is the only 16-bit value key. > > Signed-off-by: John Arbuckle > --- > v3 change > Add several

Re: [Qemu-devel] use timer for adding latency to each block I/O

2016-05-16 Thread Stefan Hajnoczi
On Thu, May 12, 2016 at 09:27:42AM -0500, Huaicheng Li wrote: > My goal is to add latency for each I/O without blocking the submission path. > Now > I can know how long each I/O should wait before it’s submitted to the AIO > queue > via a model. Now the question is how can I make the I/O wait

Re: [Qemu-devel] [V10 1/4] hw/i386: Introduce AMD IOMMU

2016-05-16 Thread Jan Kiszka
On 2016-05-09 14:15, David Kiarie wrote: > +static void amdvi_page_walk(AMDVIAddressSpace *as, uint64_t *dte, > + IOMMUTLBEntry *ret, unsigned perms, > + hwaddr addr) > +{ > +unsigned level, present, pte_perms; > +uint64_t pte = dte[0],

Re: [Qemu-devel] [PATCH v3 3/5] adb.c: correct several key assignments

2016-05-16 Thread Peter Maydell
On 6 May 2016 at 03:37, Programmingkid wrote: > The original pc_to_adb_keycode mapping did have several keys that were > incorrectly mapped. This patch fixes these mappings. > > Signed-off-by: John Arbuckle > --- > hw/input/adb.c | 33

Re: [Qemu-devel] [PATCH 5/5] target-i386: Move user-mode exception actions out of user-exec.c

2016-05-16 Thread Sergey Fedorov
On 16/05/16 19:09, Peter Maydell wrote: > The exception_action() function in user-exec.c is just a call to > cpu_loop_exit() for every target CPU except i386. Since this > function is only called if the target's handle_mmu_fault() hook has > indicated an MMU fault, and that hook is only called

Re: [Qemu-devel] [PATCH v3 0/5] ADB improvements

2016-05-16 Thread Peter Maydell
On 6 May 2016 at 03:33, Programmingkid wrote: > This patch series makes several improvements to the ADB code. To test this > code, > please implement the patches in the order below. > > John Arbuckle (5): > adb-keys.h: initial commit > adb.c: add support for

Re: [Qemu-devel] Question about vNVDIMM file format

2016-05-16 Thread Richard W.M. Jones
On Mon, May 16, 2016 at 09:53:36AM -0700, Stefan Hajnoczi wrote: > On Mon, May 16, 2016 at 04:04:01PM +0100, Richard W.M. Jones wrote: > > I'm playing with ext4 and DAX. > > > > I'm using: > > > > -object memory-backend-file,id=mem1,share,mem-path=/var/tmp/pmem,size=4G \ > > -device

Re: [Qemu-devel] [PATCH 4/5] user-exec: Don't reextract sigmask from usercontext pointer

2016-05-16 Thread Sergey Fedorov
On 16/05/16 19:09, Peter Maydell wrote: > Extracting the old signal mask from the usercontext pointer passed to > a signal handler is a pain because it is OS and CPU dependent. > Since we've already done it once and passed it to handle_cpu_signal(), > there's no need to do it again in

Re: [Qemu-devel] Hot reload network configuration

2016-05-16 Thread Stefan Hajnoczi
On Wed, May 11, 2016 at 08:50:54PM +0800, Hu Keping wrote: > Is there any possible that start qemu with --net=none and then change the > configuration of the network, say using tap for example? Yes. If your machine type supports PCI hotplug then you can use the netdev_add and device_add

Re: [Qemu-devel] [PATCH] Modify net/socket.c to use socket_* functions from include/qemu/sockets.h

2016-05-16 Thread Stefan Hajnoczi
On Thu, May 12, 2016 at 10:33:05PM +0530, Ashijeet Acharya wrote: > Changed the listen(),connect(),parse_host_port() in net/socket.c with the > socket_*()functions in include/qemu/sockets.h. What is the rationale for this change? Please explain why this is necessary or a good idea. Please

Re: [Qemu-devel] [PATCH v2 1/1] target-arm: Add the HSTR_EL2 register

2016-05-16 Thread Peter Maydell
On 13 May 2016 at 22:28, Alistair Francis wrote: > Add the Hypervisor System Trap Register for EL2. > > This register is used early in the Linux boot and without it the kernel > aborts with a "Synchronous Abort" error. > > Signed-off-by: Alistair Francis

Re: [Qemu-devel] [PATCH v2 1/1] target-arm: Add the HSTR_EL2 register

2016-05-16 Thread Alistair Francis
On Mon, May 16, 2016 at 10:43 AM, Peter Maydell wrote: > On 13 May 2016 at 22:28, Alistair Francis wrote: >> Add the Hypervisor System Trap Register for EL2. >> >> This register is used early in the Linux boot and without it the kernel >>

Re: [Qemu-devel] [PATCH v4 0/1] arm: Steps towards EL2 support round 6

2016-05-16 Thread Peter Maydell
On 5 May 2016 at 17:10, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Hi, > > Another round of patches towards EL2 support. This one adds partial > Instruction Syndrome generation for Data Aborts while running in AArch64. > > I

Re: [Qemu-devel] [PATCH 3/5] cpu-exec: Rename cpu_resume_from_signal() to cpu_loop_exit_noexc()

2016-05-16 Thread Sergey Fedorov
On 16/05/16 19:09, Peter Maydell wrote: > The function cpu_resume_from_signal() is now always called with a > NULL puc argument, and is rather misnamed since it is never called > from a signal handler. It is essentially forcing an exit to the > top level cpu loop but without raising any exception,

Re: [Qemu-devel] [PATCH v3 2/5] adb.c: add support for QKeyCode

2016-05-16 Thread Peter Maydell
On 6 May 2016 at 03:36, Programmingkid wrote: > The old pc scancode translation is replaced with QEMU's QKeyCode. > > Signed-off-by: John Arbuckle > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v3 1/5] adb-keys.h: initial commit

2016-05-16 Thread Peter Maydell
On 6 May 2016 at 03:35, Programmingkid wrote: > Add the adb-keys.h file. It maps ADB transition key codes with values. > > Signed-off-by: John Arbuckle > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] Question about vNVDIMM file format

2016-05-16 Thread Xiao Guangrong
On 05/16/2016 11:04 PM, Richard W.M. Jones wrote: I'm playing with ext4 and DAX. Thanks for your try, Rich! :) I'm using: -object memory-backend-file,id=mem1,share,mem-path=/var/tmp/pmem,size=4G \ -device nvdimm,memdev=mem1,id=nv1 where /var/tmp/pmem is a 4 GB ext4 filesystem

[Qemu-devel] [PATCH] cpus.c: Use pthread_sigmask() rather than sigprocmask()

2016-05-16 Thread Peter Maydell
On Linux, sigprocmask() and pthread_sigmask() are in practice the same thing (they only set the signal mask for the calling thread), but the documentation states that the behaviour of sigprocmask() in a multithreaded process is undefined. Use pthread_sigmask() instead (which is what we do in

Re: [Qemu-devel] [PATCH] cpus.c: Use pthread_sigmask() rather than sigprocmask()

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 18:33, Peter Maydell wrote: > On Linux, sigprocmask() and pthread_sigmask() are in practice the > same thing (they only set the signal mask for the calling thread), > but the documentation states that the behaviour of sigprocmask() in a > multithreaded

Re: [Qemu-devel] [PATCH 00/52] 680x0 instructions emulation

2016-05-16 Thread Laurent Vivier
Le 12/05/2016 à 23:23, Alexander Graf a écrit : > > >> Am 12.05.2016 um 23:17 schrieb John Paul Adrian Glaubitz >> : >> >> Hi! >> >> Now that qemu 2.6.0 has been released, what about making Laurent >> the maintainer for the orphaned M68K target so that the 680x0

Re: [Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()

2016-05-16 Thread Sergey Fedorov
On 16/05/16 20:15, Peter Maydell wrote: > On 16 May 2016 at 18:13, Sergey Fedorov wrote: >> On 16/05/16 19:09, Peter Maydell wrote: >>> @@ -1996,7 +1997,10 @@ int page_unprotect(target_ulong address, uintptr_t >>> pc, void *puc) >>> >>> /* and since the content

Re: [Qemu-devel] [PATCH 00/52] 680x0 instructions emulation

2016-05-16 Thread Laurent Vivier
Le 12/05/2016 à 23:17, John Paul Adrian Glaubitz a écrit : > Hi! > > Now that qemu 2.6.0 has been released, what about making Laurent the > maintainer for the orphaned M68K target so that the 680x0 emulation > support can be merged? > > What do the qemu maintainers think? Is there anything

Re: [Qemu-devel] [PATCH v2] pci: fix pci_requester_id()

2016-05-16 Thread Michael S. Tsirkin
On Mon, May 16, 2016 at 09:44:28AM -0600, Alex Williamson wrote: > On Mon, 16 May 2016 17:58:18 +0800 > Peter Xu wrote: > > > On Mon, May 16, 2016 at 12:21:54PM +0300, Michael S. Tsirkin wrote: > > [...] > > > > "Legacy PCI bus, override requester ID with the bridge's BDF > >

[Qemu-devel] [PATCH 17/50] target-sparc: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make SPARCCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. This helps making files independent of NEED_CPU_H if they only need to pass around CPU pointers. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 18:13, Sergey Fedorov wrote: > On 16/05/16 19:09, Peter Maydell wrote: >> @@ -1996,7 +1997,10 @@ int page_unprotect(target_ulong address, uintptr_t >> pc, void *puc) >> >> /* and since the content will be modified, we must invalidate >>

Re: [Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()

2016-05-16 Thread Sergey Fedorov
On 16/05/16 19:09, Peter Maydell wrote: > The user-mode-only function tb_invalidate_phys_page() is only > called from two places: > * page_unprotect(), which passes in a non-zero pc, a puc pointer >and the value 'true' for the locked argument > * page_set_flags(), which passes in a zero pc,

Re: [Qemu-devel] [PATCH 07/10] blockdev-backup: added support for data compression

2016-05-16 Thread Eric Blake
On 05/14/2016 06:45 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > The idea is simple - backup is "written-once" data. It is written block > by block and it is large enough. It would be nice to save storage > space and compress it. > > +++ b/qapi/block-core.json

Re: [Qemu-devel] [PATCH 06/10] drive-backup: added support for data compression

2016-05-16 Thread Eric Blake
On 05/14/2016 06:45 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > The idea is simple - backup is "written-once" data. It is written block > by block and it is large enough. It would be nice to save storage > space and compress it. > > The patch adds a flag to the

Re: [Qemu-devel] [PATCH CFT v3 00/50] NEED_CPU_H / cpu.h / hw/hw.h cleanups

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 17:53, Peter Maydell wrote: > ppc64 (this is the ppc64be host in the GCC compile farm if > you have an account there): > > /home/pm215/qemu/hw/intc/xics_kvm.c: In function ‘icp_get_kvm_state’: > /home/pm215/qemu/hw/intc/xics_kvm.c:54:12: error: variable

Re: [Qemu-devel] [PATCH 05/10] block: remove BlockDriver.bdrv_write_compressed

2016-05-16 Thread Eric Blake
On 05/14/2016 06:45 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > There are no block drivers left that implement the old > .bdrv_write_compressed interface, so it can be removed now. > > Signed-off-by: Pavel Butsykin > Signed-off-by:

Re: [Qemu-devel] [PATCH CFT v3 00/50] NEED_CPU_H / cpu.h / hw/hw.h cleanups

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 16:35, Paolo Bonzini wrote: > This series removes usage of NEED_CPU_H from several central > include files in QEMU, most notably hw/hw.h and qemu-common.h. > Definitions conditional on NEED_CPU_H remain only in disas/disas.h, > exec/gdbstub.h,

Re: [Qemu-devel] [PATCH 01/10] block/io: add bdrv_co_write_compressed

2016-05-16 Thread Eric Blake
On 05/14/2016 06:45 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > This patch just adds the interface to the bdrv_co_write_compressed, which > is currently not used but will be useful for safe implementation of the > bdrv_co_write_compressed callback in format

Re: [Qemu-devel] [PATCH 4/6] qcow2: add tracepoints for qcow2_co_write_zeroes

2016-05-16 Thread Denis V. Lunev
On 05/16/2016 07:32 PM, Eric Blake wrote: On 05/14/2016 06:01 AM, Denis V. Lunev wrote: Signed-off-by: Denis V. Lunev CC: Kevin Wolf --- block/qcow2.c | 5 + trace-events | 2 ++ 2 files changed, 7 insertions(+) diff --git a/block/qcow2.c

[Qemu-devel] [PATCH v2 2/3] qemu-iotests: Simplify 109 with unaligned qemu-img compare

2016-05-16 Thread Eric Blake
For some time now, qemu-img compare has been able to compare unaligned images. So we no longer need test 109's hack of resizing to sector boundaries before invoking compare. Signed-off-by: Eric Blake Reviewed-by: Max Reitz --- Note that qemu-img compare

[Qemu-devel] [PATCH v2 3/3] qemu-iotests: Fix regression in 136 on aio_read invalid

2016-05-16 Thread Eric Blake
Commit 093ea232 removed the ability for aio_read and aio_write to artificially inflate the invalid statistics counters for block devices, since it no longer flags unaligned offset or length. Add 'aio_read -i' and 'aio_write -i' to restore the ability, and update test 136 to use it. Reported-by:

[Qemu-devel] [PATCH v2 1/3] qemu-io: Fix recent UI updates

2016-05-16 Thread Eric Blake
Commit 770e0e0e [*] tried to add 'writev -f', but didn't tweak the getopt() call to actually let it work. Likewise, commit c2e001c missed implementing 'aio_write -u -z'. The latter commit also introduced a leak of ctx. [*] does it sound "ech0e" in here? :) Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v2 0/3] Fix recent qemu-iotests issues

2016-05-16 Thread Eric Blake
I introduced a couple of bugs in my recent qemu-io enhancements; time to fix them back up now that the broken patches are already part of mainline. in v2: - patch 1: retitle, fix id typo, also plug a coverity leak [mreitz] - patch 3: drop dead comment [mreitz] 001/3:[down] 'qemu-io: Fix recent

[Qemu-devel] [PATCH 35/50] hw: cannot include hw/hw.h from user emulation

2016-05-16 Thread Paolo Bonzini
All qdev definitions are available from other headers, user-mode emulation does not need hw/hw.h. By considering system emulation only, it is simpler to disentangle hw/hw.h from NEED_CPU_H. Signed-off-by: Paolo Bonzini --- exec.c | 21

[Qemu-devel] [PATCH v3] vl.c: Add '-L help' which lists data dirs.

2016-05-16 Thread Richard W.M. Jones
v2 -> v3: - Use constants true/false for list_data_dirs variable. Rich.

[Qemu-devel] [PATCH v3] vl.c: Add '-L help' which lists data dirs.

2016-05-16 Thread Richard W.M. Jones
QEMU compiles a list of data directories from various sources. When consuming a QEMU binary it's useful to be able to get this list of data directories: a primary reason is so you can list what BIOSes or keymaps ship with this version of QEMU. However without reproducing the method that QEMU

Re: [Qemu-devel] [PATCH 4/6] qcow2: add tracepoints for qcow2_co_write_zeroes

2016-05-16 Thread Eric Blake
On 05/14/2016 06:01 AM, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev > CC: Kevin Wolf > --- > block/qcow2.c | 5 + > trace-events | 2 ++ > 2 files changed, 7 insertions(+) > > diff --git a/block/qcow2.c b/block/qcow2.c > index 9a54bbd..97bf870

[Qemu-devel] [PATCH 2/5] user-exec: Push resume-from-signal code out to handle_cpu_signal()

2016-05-16 Thread Peter Maydell
Since the only caller of page_unprotect() which might cause it to need to call cpu_resume_from_signal() is handle_cpu_signal() in the user-mode code, push the longjump handling out to that function. Since this is the only caller of cpu_resume_from_signal() which passes a non-NULL puc argument,

[Qemu-devel] [PATCH 45/50] mips: move CP0 functions out of cpu.h

2016-05-16 Thread Paolo Bonzini
These are here for historical reasons: they are needed from both gdbstub.c and op_helper.c, and the latter was compiled with fixed AREG0. It is not needed anymore, so uninline them. Signed-off-by: Paolo Bonzini --- target-mips/cpu.h| 113

Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions

2016-05-16 Thread Eric Blake
On 05/16/2016 10:25 AM, Paolo Bonzini wrote: > > > On 16/05/2016 18:20, Eric Blake wrote: >>> +QEMU_CFLAGS=$(sed -n s/^QEMU_CFLAGS=//p config-host.mak) >>> +QEMU_INCLUDES=$(sed -n s/^QEMU_INCLUDES=//p config-host.mak | \ >>> +sed 's/$(SRC_PATH)/../g' ) >> >> Could avoid a 'sed | sed' by

[Qemu-devel] [PATCH 48/50] cpu: move exec-all.h inclusion out of cpu.h

2016-05-16 Thread Paolo Bonzini
exec-all.h contains TCG-specific definitions. It is not needed outside TCG-specific files such as translate.c, exec.c or *helper.c. One generic function had snuck into include/exec/exec-all.h; move it to include/qom/cpu.h. Signed-off-by: Paolo Bonzini --- bsd-user/main.c

Re: [Qemu-devel] [PATCH 3/6] qcow2: simplify logic in qcow2_co_write_zeroes

2016-05-16 Thread Eric Blake
On 05/14/2016 06:01 AM, Denis V. Lunev wrote: > Unaligned request could occupy only one cluster. This is true since the s/request could/requests will/ > previous commit. Simplify the code taking this considiration into s/considiration/consideration/ > account. > > There are no other changes

Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions

2016-05-16 Thread Paolo Bonzini
On 16/05/2016 18:20, Eric Blake wrote: >> +QEMU_CFLAGS=$(sed -n s/^QEMU_CFLAGS=//p config-host.mak) >> +QEMU_INCLUDES=$(sed -n s/^QEMU_INCLUDES=//p config-host.mak | \ >> +sed 's/$(SRC_PATH)/../g' ) > > Could avoid a 'sed | sed' by doing: > > QEMU_INCLUDES=$(sed -n '/^QEMU_INCLUDES=/

[Qemu-devel] [PATCH 44/50] arm: move arm_log_exception into .c file

2016-05-16 Thread Paolo Bonzini
Avoid need for qemu/log.h inclusion, and make the function static too. Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- target-arm/helper.c| 15 +++ target-arm/internals.h | 15 --- 2 files changed, 15

[Qemu-devel] [PATCH 20/50] target-xtensa: make cpu-qom.h not target specific

2016-05-16 Thread Paolo Bonzini
Make XtensaCPU an opaque type within cpu-qom.h, and move all definitions of private methods, as well as all type definitions that require knowledge of the layout to cpu.h. Conversely, move all definitions needed to define a class to cpu-qom.h. This helps making files independent of NEED_CPU_H if

[Qemu-devel] [PATCH 4/5] user-exec: Don't reextract sigmask from usercontext pointer

2016-05-16 Thread Peter Maydell
Extracting the old signal mask from the usercontext pointer passed to a signal handler is a pain because it is OS and CPU dependent. Since we've already done it once and passed it to handle_cpu_signal(), there's no need to do it again in cpu_exit_tb_from_sighandler(). This then means we don't need

[Qemu-devel] [PATCH 0/5] user-exec: cpu_resume_from_signal() cleanups

2016-05-16 Thread Peter Maydell
I was trying to reason about user-mode's handling of signal masks, and I found our current code a bit confusing, so I cleaned it up. At the moment for user-only mode cpu_resume_from_signal() takes a usercontext pointer; if this is non-NULL then it has some awkward OS and CPU specific code to set

[Qemu-devel] [PATCH 5/5] target-i386: Move user-mode exception actions out of user-exec.c

2016-05-16 Thread Peter Maydell
The exception_action() function in user-exec.c is just a call to cpu_loop_exit() for every target CPU except i386. Since this function is only called if the target's handle_mmu_fault() hook has indicated an MMU fault, and that hook is only called from the handle_cpu_signal() code path, we can

Re: [Qemu-devel] [PATCH 2/6] block: split write_zeroes always

2016-05-16 Thread Eric Blake
On 05/14/2016 06:01 AM, Denis V. Lunev wrote: > We should split requests even if they are less than write_zeroes_alignment. > For example we can have the following request: > offset 62k > size 4k > write_zeroes_alignment 64k > Original code will send 1 request covering 2 qcow2 clusters.

[Qemu-devel] [PATCH 1/5] translate-all.c: Don't pass puc, locked to tb_invalidate_phys_page()

2016-05-16 Thread Peter Maydell
The user-mode-only function tb_invalidate_phys_page() is only called from two places: * page_unprotect(), which passes in a non-zero pc, a puc pointer and the value 'true' for the locked argument * page_set_flags(), which passes in a zero pc, a NULL puc pointer and a 'false' locked

Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions

2016-05-16 Thread Eric Blake
On 05/16/2016 09:35 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > scripts/analyze-inclusions | 102 > + > 1 file changed, 102 insertions(+) > create mode 100644 scripts/analyze-inclusions > > +# > +# 2)

[Qemu-devel] [PATCH 38/50] qemu-common: stop including qemu/host-utils.h from qemu-common.h

2016-05-16 Thread Paolo Bonzini
Move it to the actual users. There are some inclusions of qemu/host-utils.h in headers, but they are all necessary. Signed-off-by: Paolo Bonzini --- audio/noaudio.c | 1 + audio/spiceaudio.c | 1 + audio/wavaudio.c

Re: [Qemu-devel] [PATCH 1/6] qemu-io: enable tracing in qemu-io

2016-05-16 Thread Eric Blake
On 05/14/2016 06:01 AM, Denis V. Lunev wrote: > It would be convinient to enable tracepoints in qemu-io binary. This would s/convinient/convenient/ > allow to perform investigations without additional code recompilations. > > The command line will be exactly the same as in qemu-system. Reads

[Qemu-devel] [PATCH 49/50] hw: remove pio_addr_t

2016-05-16 Thread Paolo Bonzini
pio_addr_t is almost unused, because these days I/O ports are simply accessed through the address space. cpu_{in,out}[bwl] themselves are almost unused; monitor.c and xen-hvm.c could use address_space_read/write directly, since they have an integer size at hand. This leaves qtest as the only

[Qemu-devel] [PATCH 46/50] hw: explicitly include qemu/log.h

2016-05-16 Thread Paolo Bonzini
Move the inclusion out of hw/hw.h, most files do not need it. Signed-off-by: Paolo Bonzini --- hw/arm/ast2400.c | 1 + hw/arm/nseries.c | 1 + hw/arm/palmetto-bmc.c | 1 + hw/arm/pxa2xx_gpio.c | 1 + hw/arm/stellaris.c

[Qemu-devel] [PATCH 3/5] cpu-exec: Rename cpu_resume_from_signal() to cpu_loop_exit_noexc()

2016-05-16 Thread Peter Maydell
The function cpu_resume_from_signal() is now always called with a NULL puc argument, and is rather misnamed since it is never called from a signal handler. It is essentially forcing an exit to the top level cpu loop but without raising any exception, so rename it to cpu_loop_exit_noexc() and drop

Re: [Qemu-devel] [PATCH v2] vl.c: Add '-L help' which lists data dirs.

2016-05-16 Thread Eric Blake
On 05/16/2016 07:37 AM, Richard W.M. Jones wrote: > QEMU compiles a list of data directories from various sources. When > consuming a QEMU binary it's useful to be able to get this list of > data directories: a primary reason is so you can list what BIOSes or > keymaps ship with this version of

[Qemu-devel] [PATCH 40/50] dma: do not depend on kvm_enabled()

2016-05-16 Thread Paolo Bonzini
Memory barriers are needed also by Xen and, when the ioeventfd bugs are fixed, by TCG as well. sysemu/kvm.h is not anymore needed in sysemu/dma.h, move it to the actual users. Signed-off-by: Paolo Bonzini --- hw/intc/arm_gicv2m.c | 1 + hw/misc/pci-testdev.c | 1 +

  1   2   3   >