Re: [Qemu-devel] [RFC PATCH v3 3/3] VFIO Type1 IOMMU change: to support with iommu and without iommu

2016-05-19 Thread Dong Jia
On Fri, 13 May 2016 02:05:01 -0700 Neo Jia wrote: ...snip... > > Hi Dong, > > We should definitely be mindful about the data structure performance > especially > dealing with kernel. But for now, we haven't done any performance analysis yet > for the current rbtree implementation, later we wi

Re: [Qemu-devel] [PATCH V2 0/4] pci: better support for 64-bit MMIO allocation

2016-05-19 Thread Igor Mammedov
On Wed, 18 May 2016 17:44:57 +0300 "Michael S. Tsirkin" wrote: > On Wed, May 18, 2016 at 04:38:26PM +0200, Igor Mammedov wrote: > > On Wed, 18 May 2016 17:09:20 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, May 18, 2016 at 03:53:08PM +0200, Igor Mammedov wrote: > > > > On Sun, 15

[Qemu-devel] [Qemu-block] [PATCH v1 1/1] qcow2 resize with snapshots

2016-05-19 Thread zhangzhiming
hi, i wrote some code for 'qcow2 resize' with snapshot with v3 image and 'qcow2 goto’ too, different size of snapshots are supported. and i have tested the function and it seems work well. there are some code copied from snapshot_delete_blkdev_internal, and qmp_block_resize, it feels not very

Re: [Qemu-devel] [Qemu-block] [PATCH v1 1/1] qcow2 resize with snapshots

2016-05-19 Thread zhangzhiming
hi, missed some code. zhangzhiming zhangzhimin...@meituan.com -- diff --git a/block.c b/block.c index 047698a..ff83134 100644 --- a/block.c +++ b/block.c @@ -2641,7 +2641,7 @@ int bdrv_apply_snapshot(BlockDriverState *bs, const char *snapshot_id, uint64_t return ret; } -ret

Re: [Qemu-devel] vfio IGD assignment (was Re: [PATCH v6 0/8] Series short description)

2016-05-19 Thread Gerd Hoffmann
On Mi, 2016-05-18 at 12:45 -0600, Alex Williamson wrote: > On Wed, 18 May 2016 16:24:49 +0200 > Gerd Hoffmann wrote: > > > Hi, > > > > > I believe we're no longer blocked by SeaBIOS being willing to > > > consume the new fw_cfg entries, so barring feedback otherwise, my > > > plan will be to s

Re: [Qemu-devel] [PATCH V2 0/4] pci: better support for 64-bit MMIO allocation

2016-05-19 Thread Igor Mammedov
On Wed, 18 May 2016 17:22:43 +0300 Marcel Apfelbaum wrote: > On 05/18/2016 04:53 PM, Igor Mammedov wrote: > > On Sun, 15 May 2016 22:23:30 +0300 > > Marcel Apfelbaum wrote: > > > >> Hi, > >> > >> First two patches allocate (max_reserved_ram - max_addr_cpu_addressable) > >> range for PCI hotpl

Re: [Qemu-devel] [PATCH 15/50] target-s390x: make cpu-qom.h not target specific

2016-05-19 Thread Cornelia Huck
On Mon, 16 May 2016 17:35:47 +0200 Paolo Bonzini wrote: > Make S390XCPU 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 onl

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

2016-05-19 Thread Cornelia Huck
On Mon, 16 May 2016 17:36:07 +0200 Paolo Bonzini wrote: > 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 > ---

Re: [Qemu-devel] [PATCH 06/23] hw/intc/arm_gicv3: Add state information

2016-05-19 Thread Shannon Zhao
On 2016/5/10 1:29, Peter Maydell wrote: > From: Pavel Fedin > > Add state information to GICv3 object structure and implement > arm_gicv3_common_reset(). > > This commit includes accessor functions for the fields which are > stored as bitmaps in uint32_t arrays. > > Signed-off-by: Pavel Fedin

Re: [Qemu-devel] [PATCH 06/23] hw/intc/arm_gicv3: Add state information

2016-05-19 Thread Peter Maydell
On 19 May 2016 at 10:36, Shannon Zhao wrote: > > > On 2016/5/10 1:29, Peter Maydell wrote: >> From: Pavel Fedin >> >> Add state information to GICv3 object structure and implement >> arm_gicv3_common_reset(). >> >> This commit includes accessor functions for the fields which are >> stored as bitm

Re: [Qemu-devel] [PATCH 41/50] s390x: move stuff out of cpu.h

2016-05-19 Thread Cornelia Huck
On Mon, 16 May 2016 17:36:13 +0200 Paolo Bonzini wrote: Maybe mention which stuff was moved why ;) > Signed-off-by: Paolo Bonzini > --- > hw/s390x/css.c | 4 +- > hw/s390x/s390-skeys.c | 1 + > hw/s390x/s390-virtio-ccw.c |

[Qemu-devel] [PATCH 6/6] virtio-gpu: fix ui idx check

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau Fix off-by-one value check (0 is the first scanout). Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 5811a2d..d1f25d5 100644 --- a/hw

[Qemu-devel] [PATCH 4/6] virtio-gpu: check max_outputs only

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau The scanout id should not be above the configured num_scanouts. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu-3d.c | 4 ++-- hw/display/virtio-gpu.c| 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu-3d.c b/hw

[Qemu-devel] [PATCH 2/6] virtio-vga: propagate on gpu realized error

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu-3d.c | 1 + hw/display/virtio-vga.c| 8 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index fa19294..20e8865 100644 --- a/hw/di

[Qemu-devel] [PATCH 0/6] virtio-gpu: scanout limit fixes

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is a small series improving a bit the scanout limit handling. The first patch was sent previously but is also included in this series for convenience. Marc-André Lureau (6): virtio-gpu: check early scanout id virtio-vga: propagate on gpu realized error vir

[Qemu-devel] [PATCH 3/6] virtio-gpu: check max_outputs value

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau The value must be less than VIRTIO_GPU_MAX_SCANOUT. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 1193838..77e542f 100644 --- a/hw/display/vi

[Qemu-devel] [PATCH 1/6] virtio-gpu: check early scanout id

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau Before accessing the g->scanout array, in order to avoid potential out-of-bounds access. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/di

Re: [Qemu-devel] [PATCH 41/50] s390x: move stuff out of cpu.h

2016-05-19 Thread Paolo Bonzini
On 19/05/2016 12:17, Cornelia Huck wrote: > On Mon, 16 May 2016 17:36:13 +0200 > Paolo Bonzini wrote: > > Maybe mention which stuff was moved why ;) Right: Move cpu_inject_* to the only C file where they are used. Move ioinst.h declarations that need S390CPU to cpu.h, to make ioinst.h i

[Qemu-devel] [PATCH 5/6] virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS

2016-05-19 Thread marcandre . lureau
From: Marc-André Lureau The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c| 4 ++-- include/hw/virtio/virtio-gpu.h | 6 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/display/virti

[Qemu-devel] [PATCH 0/2] Qemu: scsi: esp: check command buffer input length

2016-05-19 Thread P J P
From: Prasad J Pandit Hello, The ESP 53C9X Fast SCSI Controller(FSC) comes with an internal 16-byte FIFO buffer. It is used to handle command and data transfer between controller and the bus. Couple of OOB write access issues were found and reported in its emulation by Mr Li Qiang of 360.cn Inc.

[Qemu-devel] [PATCH 2/2] scsi: check dma length before reading scsi command(CVE-2016-4441)

2016-05-19 Thread P J P
From: Prasad J Pandit The 53C9X Fast SCSI Controller(FSC) comes with an internal 16-byte FIFO buffer. It is used to handle command and data transfer. Routine get_cmd() uses DMA to read scsi commands into this buffer. Add check to validate DMA length against buffer size to avoid any overrun. Fixe

[Qemu-devel] [PATCH 1/2] scsi: check command buffer length before write(CVE-2016-4439)

2016-05-19 Thread P J P
From: Prasad J Pandit The 53C9X Fast SCSI Controller(FSC) comes with an internal 16-byte FIFO buffer. It is used to handle command and data transfer. While writing to this command buffer 's->cmdbuf[TI_BUFSZ=16]', a check was missing to validate input length. Add check to avoid OOB write access.

Re: [Qemu-devel] [PATCH 41/50] s390x: move stuff out of cpu.h

2016-05-19 Thread Cornelia Huck
On Thu, 19 May 2016 12:32:05 +0200 Paolo Bonzini wrote: > On 19/05/2016 12:17, Cornelia Huck wrote: > > On Mon, 16 May 2016 17:36:13 +0200 > > Paolo Bonzini wrote: > > > > Maybe mention which stuff was moved why ;) > > Right: > > > Move cpu_inject_* to the only C file where they are used

Re: [Qemu-devel] [PULL 00/13] Trivial patches for 2016-05-18

2016-05-19 Thread Peter Maydell
On 18 May 2016 at 13:05, Michael Tokarev wrote: > This is first pull request in quite a while. Accumulating > only relatively old stuff which hasn't been applied to other > trees. More to follow. > > Please consider applying. > > Thanks, > > /mjt > > The following changes since commit a257c74149

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

2016-05-19 Thread Paolo Bonzini
On 19/05/2016 06:04, Thomas Huth wrote: > On 18.05.2016 18:36, 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/gdbs

[Qemu-devel] [PATCH] linux-user: Handle negative values in timespec conversion

2016-05-19 Thread Peter Maydell
In a struct timespec, both fields are signed longs. Converting them from guest to host with code like host_ts->tv_sec = tswapal(target_ts->tv_sec); mishandles negative values if the guest has 32-bit longs and the host has 64-bit longs because tswapal()'s return type is abi_ulong: the assignment

[Qemu-devel] [PULL 04/52] log: do not use CONFIG_USER_ONLY

2016-05-19 Thread Paolo Bonzini
This decouples logging further from config-target.h Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- bsd-user/main.c| 1 + include/qemu/log.h | 17 ++--- linux-user/main.c | 1 + util/log.c | 12 ++-- 4 files changed, 14 insertions(+), 17 deletions(-)

[Qemu-devel] [PULL 00/52] NEED_CPU_H cleanups

2016-05-19 Thread Paolo Bonzini
The following changes since commit 8ec4fe0a4bed4fa27e6f28a746bcf77b27cd05a3: Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2016-05-18' into staging (2016-05-19 09:27:28 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream

[Qemu-devel] [PULL 08/52] target-cris: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make CRISCPU 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

[Qemu-devel] [PULL 03/52] include: move CPU-related definitions out of qemu-common.h

2016-05-19 Thread Paolo Bonzini
Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- include/qemu-common.h | 24 include/qemu/timer.h | 1 + include/qom/cpu.h | 9 + include/sysemu/cpus.h | 13 + stubs/cpu-get-icount.c | 1 + translate-common.c | 1 + vl.c

[Qemu-devel] [PULL 05/52] cpu: make cpu-qom.h only include-able from cpu.h

2016-05-19 Thread Paolo Bonzini
Make cpu-qom.h so that it is only included from cpu.h. Then there is no need for it to include cpu.h again. Later we will make cpu-qom.h target independent and we will _want_ to include it from elsewhere, but for now reduce the number of cases to handle. Reviewed-by: Alex Bennée Signed-off-by:

[Qemu-devel] [PULL 09/52] target-i386: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make X86CPU 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 -

[Qemu-devel] [PULL 01/52] scripts: add script to build QEMU and analyze inclusions

2016-05-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- scripts/analyze-inclusions | 102 + 1 file changed, 102 insertions(+) create mode 100644 scripts/analyze-inclusions diff --git a/scripts/analyze-inclusions b/scripts/analyze-inclusions new file mode 100644 index 00

[Qemu-devel] [PULL 11/52] target-m68k: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make M68KCPU 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. Reviewed-by: Thomas Huth Sign

[Qemu-devel] [PULL 02/52] s390x: move .needed functions for subsections to machine.c

2016-05-19 Thread Paolo Bonzini
These functions are only used when defining subsections, so move them there. Acked-by: Cornelia Huck Signed-off-by: Paolo Bonzini --- target-s390x/cpu.h | 26 -- target-s390x/machine.c | 20 2 files changed, 20 insertions(+), 26 deletions(-) dif

[Qemu-devel] [PULL 25/52] sh4: include cpu-qom.h in files that require SuperHCPU

2016-05-19 Thread Paolo Bonzini
This will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- include/hw/sh4/sh.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/sh4/sh.h b/include/hw/sh4/sh.h index e61de9a.

[Qemu-devel] [PULL 06/52] target-alpha: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make AlphaCPU 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

[Qemu-devel] [PULL 26/52] alpha: include cpu-qom.h in files that require AlphaCPU

2016-05-19 Thread Paolo Bonzini
This will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- hw/alpha/alpha_sys.h | 1 + hw/alpha/pci.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/alpha/al

[Qemu-devel] [PULL 07/52] target-arm: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make ARMCPU 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. Reviewed-by: Alex Bennée Signe

[Qemu-devel] [PULL 14/52] target-ppc: do not use target_ulong in cpu-qom.h

2016-05-19 Thread Paolo Bonzini
Bring the PowerPCCPUClass handle_mmu_fault method type into line with the one in CPUClass. Using vaddr also makes the cpu-qom.h file target independent. Signed-off-by: Paolo Bonzini --- target-ppc/cpu-qom.h| 3 +-- target-ppc/mmu-hash32.c | 2 +- target-ppc/mmu-hash32.h | 2 +- target-ppc/m

[Qemu-devel] [PULL 27/52] mips: use MIPSCPU instead of CPUMIPSState

2016-05-19 Thread Paolo Bonzini
This changes a cpu.h dependency into a cpu-qom.h dependency. Signed-off-by: Paolo Bonzini --- hw/mips/cps.c | 7 --- hw/mips/cputimer.c| 4 +++- hw/mips/mips_fulong2e.c | 4 ++-- hw/mips/mips_int.c| 3 ++- hw/mips/mips_jazz.c | 4 ++-- hw/mips/mips_malta.c

[Qemu-devel] [PULL 32/52] explicitly include linux/kvm.h

2016-05-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/i386/kvm/i8254.c | 1 + hw/i386/kvm/pci-assign.c | 1 + hw/intc/xics_kvm.c | 1 + hw/vfio/common.c | 3 +++ 4 files changed, 6 insertions(+) diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c index a4462e5..734992e 100644 --- a/hw/i386/k

[Qemu-devel] [PULL 18/52] target-sh4: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make SuperHCPU 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

[Qemu-devel] [PULL 13/52] target-mips: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make MIPSCPU 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

[Qemu-devel] [PULL 34/52] include: poison symbols in osdep.h

2016-05-19 Thread Paolo Bonzini
Ensure that all target-independent files ignore poisoned symbols, and fix the fallout. Signed-off-by: Paolo Bonzini --- hw/core/Makefile.objs | 2 +- include/exec/cpu-common.h | 4 include/exec/helper-head.h | 23 +-- include/qemu/osdep.h | 2 ++ scripts/c

[Qemu-devel] [PULL 37/52] hw: cannot include hw/hw.h from user emulation

2016-05-19 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 +++-- include/hw/hw.h

[Qemu-devel] [PULL 23/52] arm: include cpu-qom.h in files that require ARMCPU

2016-05-19 Thread Paolo Bonzini
This will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- hw/arm/stm32f205_soc.c | 1 - hw/arm/strongarm.h | 1 + include/hw/arm/arm.h| 2 +- include/hw/arm/exynos4

[Qemu-devel] [PULL 17/52] target-s390x: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make S390XCPU 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. Acked-by: Cornelia Huck Sign

[Qemu-devel] [PULL 46/52] arm: move arm_log_exception into .c file

2016-05-19 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 insertions(+), 15 deletions(-) diff --git a/target-arm/

[Qemu-devel] [PULL 33/52] apic: move target-dependent definitions to cpu.h

2016-05-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/intc/ioapic.c | 1 + include/hw/i386/apic.h | 5 - target-i386/cpu.h | 7 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 378e663..4f42b91 100644 --- a/hw/intc/ioapic.c +++ b/hw/int

[Qemu-devel] [PULL 35/52] hw: do not use VMSTATE_*TL

2016-05-19 Thread Paolo Bonzini
Reserve this to CPU state serialization. Luckily, they were only used by sPAPR devices and these are ppc64 only. So there is no change to migration format. Signed-off-by: Paolo Bonzini --- hw/net/spapr_llan.c| 8 hw/ppc/spapr_vio.c | 2 +- include/hw/ppc/spapr_vio.h |

[Qemu-devel] [PULL 10/52] target-lm32: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make LM32CPU 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

[Qemu-devel] [PULL 29/52] arm: remove useless cpu.h inclusion

2016-05-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/hw/arm/digic.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h index a739d6a..aaefe0b 100644 --- a/include/hw/arm/digic.h +++ b/include/hw/arm/digic.h @@ -18,8 +18,6 @@ #ifndef HW_ARM_DIGIC_H #define H

[Qemu-devel] [PULL 39/52] qemu-common: stop including qemu/bswap.h from qemu-common.h

2016-05-19 Thread Paolo Bonzini
Move it to the actual users. There are still a few includes of qemu/bswap.h in headers; removing them is left for future work. Signed-off-by: Paolo Bonzini --- audio/mixeng.c | 1 + block/bochs.c | 1 + block/cloop.c | 1 + block/parallels.c | 1 + block/qcow.c

[Qemu-devel] [PULL 12/52] target-microblaze: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make MicroBlazeCPU 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 Bon

[Qemu-devel] [PULL 28/52] ppc: use PowerPCCPU instead of CPUPPCState

2016-05-19 Thread Paolo Bonzini
This changes a cpu.h dependency for hw/ppc/ppc.h into a cpu-qom.h dependency. For it to compile we also need to clean up a few unused definitions. Signed-off-by: Paolo Bonzini --- hw/ppc/ppc.c| 20 +- include/hw/ppc/ppc.h| 24 +++- target-ppc/translate_in

[Qemu-devel] [PULL 51/52] hw: remove pio_addr_t

2016-05-19 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 user

[Qemu-devel] [PULL 38/52] cpu: move endian-dependent load/store functions to cpu-all.h

2016-05-19 Thread Paolo Bonzini
Disentangle cpu-common.h and memory.h from NEED_CPU_H. Prototypes are not defined for !NEED_CPU_H, so remove them from poison.h too. Only macros need poisoning. Signed-off-by: Paolo Bonzini --- include/exec/cpu-all.h| 25 + include/exec/cpu-common.h | 10 --

[Qemu-devel] [PULL 36/52] hw: move CPU state serialization to migration/cpu.h

2016-05-19 Thread Paolo Bonzini
Remove usage of NEED_CPU_H from hw/hw.h. Signed-off-by: Paolo Bonzini --- include/hw/hw.h | 49 --- include/migration/cpu.h | 48 ++ target-alpha/machine.c| 1 + target-arm/machine.c |

[Qemu-devel] [PULL 16/52] target-ppc: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make PowerPCCPU 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

Re: [Qemu-devel] [PATCH 0/2] Qemu: scsi: esp: check command buffer input length

2016-05-19 Thread Paolo Bonzini
On 19/05/2016 12:39, P J P wrote: > From: Prasad J Pandit > > Hello, > > The ESP 53C9X Fast SCSI Controller(FSC) comes with an internal 16-byte > FIFO buffer. It is used to handle command and data transfer between > controller and the bus. Couple of OOB write access issues were found > and rep

[Qemu-devel] [PULL 47/52] mips: move CP0 functions out of cpu.h

2016-05-19 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 ++-

[Qemu-devel] [PULL 30/52] explicitly include qom/cpu.h

2016-05-19 Thread Paolo Bonzini
exec/cpu-all.h includes qom/cpu.h. Explicit inclusion will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- hw/acpi/piix4.c | 1 + hw/arm/collie.c | 1 + hw/cpu/a9mpcor

[Qemu-devel] [PULL 15/52] target-ppc: do not make PowerPCCPUClass depend on target-specific symbols

2016-05-19 Thread Paolo Bonzini
Just leave some members in even if they are unused on e.g. 32-bit PPC or user-mode emulation. This avoids complications when using PowerPCCPUClass in code that is compiled just once (because it applies to both 32-bit and 64-bit PPC for example) but still needs to peek at PPC-specific members. Sig

[Qemu-devel] [PULL 52/52] hw: clean up hw/hw.h includes

2016-05-19 Thread Paolo Bonzini
Include qom/object.h and exec/memory.h instead of exec/ioport.h; exec/ioport.h was almost everywhere required only for those two includes, not for the content of the header itself. Remove block/aio.h, everybody is already including it through another path. With this change, include/hw/hw.h is fre

[Qemu-devel] [Bug 1583420] Re: Please support "-soundhw none"

2016-05-19 Thread Paolo Bonzini
Actually, QEMU doesn't provide a default set of sound hardware. The pcspk device provides port 0x61 and like most other legacy ISA devices is not removed by -nodefaults (i8254 PIT, i8257 DMA, i8259 PIC; only the serial port can be removed). However, unless you configure it specifically with "-sou

[Qemu-devel] [PULL 42/52] dma: do not depend on kvm_enabled()

2016-05-19 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/intc/xics_kvm.c| 2 +- hw/misc/pci-testdev.c | 1 +

[Qemu-devel] [PULL 24/52] m68k: include cpu-qom.h in files that require M68KCPU

2016-05-19 Thread Paolo Bonzini
This will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- include/hw/m68k/mcf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/m68k/mcf.h b/include/hw/m68k/mcf.h index

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

2016-05-19 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 1/1] migration: fix ram decompression race deadlock

2016-05-19 Thread Denis V. Lunev
On 05/13/2016 10:27 AM, Denis V. Lunev wrote: From: Maxim Nestratov There is a race in between do_data_decompress and start_decompression. do_data_decompress() while (!quit_decomp_thread) { qemu_mutex_lock(¶m->mutex); while (!param->start && !quit_decomp_thread) {

[Qemu-devel] [PULL 20/52] target-tricore: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make TriCoreCPU 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 Bonzin

[Qemu-devel] [PULL 40/52] qemu-common: stop including qemu/host-utils.h from qemu-common.h

2016-05-19 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| 2 +- cont

Re: [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices

2016-05-19 Thread Paolo Bonzini
On 19/05/2016 05:43, xiaoqiang zhao wrote: > This patch set trys to QOM'ify hw/char files, see commit messages > for more details > > Thanks Paolo for your suggestions. > > Note: > * CRIS axis_dev88 broad related test is passed and looks ok. > * lm32 test is needed. Michael, can you test pat

[Qemu-devel] [PULL 22/52] target-xtensa: make cpu-qom.h not target specific

2016-05-19 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

Re: [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices

2016-05-19 Thread michael
Am 2016-05-19 13:32, schrieb Paolo Bonzini: On 19/05/2016 05:43, xiaoqiang zhao wrote: This patch set trys to QOM'ify hw/char files, see commit messages for more details Thanks Paolo for your suggestions. Note: * CRIS axis_dev88 broad related test is passed and looks ok. * lm32 test is needed

[Qemu-devel] [PULL 19/52] target-sparc: make cpu-qom.h not target specific

2016-05-19 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] [PULL 00/52] NEED_CPU_H cleanups

2016-05-19 Thread Peter Maydell
On 19 May 2016 at 12:17, Paolo Bonzini wrote: > The following changes since commit 8ec4fe0a4bed4fa27e6f28a746bcf77b27cd05a3: > > Merge remote-tracking branch > 'remotes/mjt/tags/pull-trivial-patches-2016-05-18' into staging (2016-05-19 > 09:27:28 +0100) > > are available in the git repository

[Qemu-devel] [PULL 21/52] target-unicore32: make cpu-qom.h not target specific

2016-05-19 Thread Paolo Bonzini
Make UniCore32CPU 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 Bonz

[Qemu-devel] [PULL 31/52] explicitly include hw/qdev-core.h

2016-05-19 Thread Paolo Bonzini
exec/cpu-all.h includes qom/cpu.h, which includes hw/qdev-core.h. Explicit inclusion will keep things working when cpu.h will not be included indirectly almost everywhere (either directly or through qemu-common.h). Signed-off-by: Paolo Bonzini --- bootdevice.c | 1 + 1 file changed, 1 insertion(

Re: [Qemu-devel] [PULL 00/52] NEED_CPU_H cleanups

2016-05-19 Thread Paolo Bonzini
On 19/05/2016 13:59, Peter Maydell wrote: > On 19 May 2016 at 12:17, Paolo Bonzini wrote: >> The following changes since commit 8ec4fe0a4bed4fa27e6f28a746bcf77b27cd05a3: >> >> Merge remote-tracking branch >> 'remotes/mjt/tags/pull-trivial-patches-2016-05-18' into staging (2016-05-19 >> 09:27

Re: [Qemu-devel] [Qemu-block] [PATCH v1 1/1] qcow2 resize with snapshots

2016-05-19 Thread zhangzhiming
add code, shrink l1 table while resize. zhangzhiming zhangzhimin...@meituan.com -- diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 31ecc10..3e07510 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -31,6 +31,36 @@ #include "block/qcow2.h" #include "trace.h" +

[Qemu-devel] [PATCH] target-ppc/fpu_helper: Fix efscmp* instructions handling

2016-05-19 Thread Talha Imran
With specification at hand from the reference manual from Freescale http://cache.nxp.com/files/32bit/doc/ref_manual/SPEPEM.pdf , I have found a fix to efscmp* instructions handling in QEMU. efscmp* instructions in QEMU set crD (Condition Register nibble) values as (0b0100 << 2) = 0b1 (conside

[Qemu-devel] [PULL 44/52] acpi: do not use TARGET_PAGE_SIZE

2016-05-19 Thread Paolo Bonzini
This is a #define used by the CPU. NVDIMM can just use 4K unconditionally. Signed-off-by: Paolo Bonzini --- hw/acpi/nvdimm.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 9531340..fb925dc 100644 --- a/hw/ac

[Qemu-devel] [PULL 41/52] gdbstub: remove unnecessary includes from gdbstub-xml.c

2016-05-19 Thread Paolo Bonzini
gdbstub-xml.c defines a bunch of arrays of strings; there is no need to include anything. Keep osdep.h for consistency, but remove the rest. Signed-off-by: Paolo Bonzini --- scripts/feature_to_c.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/feature_to_c.sh b/scripts/feature_to

[Qemu-devel] [PULL v2 43/52] s390x: reorganize CSS bits between cpu.h and other headers

2016-05-19 Thread Paolo Bonzini
Move cpu_inject_* to the only C file where they are used. Move ioinst.h declarations that need S390CPU to cpu.h, to make ioinst.h independent of cpu.h. Move channel declarations that only need SubchDev from cpu.h to css.h, to make more channel users independent of cpu.h. Acked-by: Cornelia Huck

[Qemu-devel] [PULL 45/52] qemu-common: push cpu.h inclusion out of qemu-common.h

2016-05-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- arch_init.c | 2 ++ cpus.c | 3 ++- exec.c | 2 +- gdbstub.c| 2 +- hw/arm/nseries.c | 1 + hw/arm/pxa2xx_

[Qemu-devel] [PULL 49/52] exec: extract exec/tb-context.h

2016-05-19 Thread Paolo Bonzini
TCG backends do not need most of exec-all.h; extract what they actually need to a separate file or move it directly to tcg.h. The next patch will stop including exec-all.h from everywhere. Signed-off-by: Paolo Bonzini --- include/exec/exec-all.h | 45 +-

[Qemu-devel] [PULL 43/52] s390x: reorganize CSS bits between cpu.h and other headers

2016-05-19 Thread Paolo Bonzini
Move cpu_inject_* to the only C file where they are used. Move ioinst.h declarations that need S390CPU to cpu.h, to make ioinst.h independent of cpu.h. Move channel declarations that only need SubchDev from cpu.h to css.h, to make more channel users independent of cpu.h. Acked-by: Cornelia Huck

[Qemu-devel] [PULL 48/52] hw: explicitly include qemu/log.h

2016-05-19 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 | 1 + hw/arm/stro

Re: [Qemu-devel] [PATCH] build-sys: delete TAGS in distclean only

2016-05-19 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > automake and other GNU build-sys generally keep TAGS file in make > 'clean' rule and delete it only in 'distclean' (and 'mrproper' for > linux). Do the same for qemu. > > Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbr

Re: [Qemu-devel] [Qemu-block] [PATCH v1 1/1] qcow2 resize with snapshots

2016-05-19 Thread zhangzhiming
hi, and some extra code need to be changed. zhangzhiming zhangzhimin...@meituan.com -- diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index d872cf2..fb888b0 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -498,7 +498,7 @@ int qcow2_snapshot_goto(BlockDriverState

Re: [Qemu-devel] [PATCH] fw_cfg: follow CODING_STYLE

2016-05-19 Thread Markus Armbruster
Corey Minyard writes: > On 05/18/2016 05:59 AM, Cao jin wrote: >> Replace tab with 4 spaces; brace the indented statement. > > Thanks, I think I have my editor set up to avoid the tab/space issue from > now on. I'm going to have to handle kernel/qemu switching in my brain > for the brace issue.

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/1] block: clarify error message for qmp-eject

2016-05-19 Thread Kevin Wolf
Am 18.05.2016 um 23:53 hat John Snow geschrieben: > v2: Reduce helper to just one parameter, > push has_force logic back up into qmp interfaces. > > Always return -errno if we set errp, > return +errno on soft errors where errp remains unset. Thanks, applied to the block branch. Kevi

[Qemu-devel] [PULL v2 00/52] NEED_CPU_H cleanups

2016-05-19 Thread Paolo Bonzini
The following changes since commit 8ec4fe0a4bed4fa27e6f28a746bcf77b27cd05a3: Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2016-05-18' into staging (2016-05-19 09:27:28 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream

[Qemu-devel] [PATCH V2 0/2] block/nfs: add support for libnfs pagecache

2016-05-19 Thread Peter Lieven
this adds support for the upcoming libnfs cachepage to Qemu. While at it neglect to use readahead if cache.direct is on. v1->v2: - move the readahead fix to Patch 1 and CC qemu-stable - check for changed cache settings in bdrv_reopen_prepare [Jeff] Peter Lieven (2): block/nfs: refuse re

[Qemu-devel] [PATCH V2 1/2] block/nfs: refuse readahead if cache.direct is on

2016-05-19 Thread Peter Lieven
if we open a NFS export with disabled cache we should refuse the readahead feature as it will cache data inside libnfs. If a export was opened with readahead enabled it should futher not be allowed to disable the cache while running. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven --- bl

[Qemu-devel] [PATCH V2 2/2] block/nfs: add support for libnfs pagecache

2016-05-19 Thread Peter Lieven
upcoming libnfs will have support for a read cache that can significantly help to speed up requests since libnfs by design circumvents the kernel cache. Example: qemu -cdrom nfs://127.0.0.1/iso/my.iso?pagecache=1024 The pagecache parameters takes the maximum amount of pages to cache. A page in

Re: [Qemu-devel] [PATCH 10/23] hw/intc/arm_gicv3: Implement functions to identify next pending irq

2016-05-19 Thread Shannon Zhao
On 2016/5/10 1:29, Peter Maydell wrote: > +uint32_t pend, grpmask; > +uint32_t pending = *gic_bmp_ptr32(s->pending, irq - GIC_INTERNAL); > +uint32_t edge_trigger = *gic_bmp_ptr32(s->edge_trigger, irq - > GIC_INTERNAL); > +uint32_t level = *gic_bmp_ptr32(s->level, irq - GIC_INTERN

[Qemu-devel] [PATCH v2 0/6] acpi: simplify bios_linker API

2016-05-19 Thread Igor Mammedov
Simplify bios_linker API by adding file name + blob tracking so user would have to suppily less arguments which reduces chances of mistake by using wrong blob pointer with not related file. And also refactor API to take file offsets, which is what is usualy used in context of file APIs, (and as it'

[Qemu-devel] [PATCH v2 3/6] acpi: cleanup bios_linker_loader_cleanup()

2016-05-19 Thread Igor Mammedov
bios_linker_loader_cleanup() is called only from one place and returned value is immediately freed wich makes returning pointer from bios_linker_loader_cleanup() useless. Cleanup bios_linker_loader_cleanup() by freeing data there so that caller won't have to free it. Signed-off-by: Igor Mammedov

  1   2   3   >