Re: [Qemu-devel] [PATCH v4 0/3] bugs fix for hpet

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 07:29, liu ping fan ha scritto: > On Tue, Sep 3, 2013 at 7:17 PM, Paolo Bonzini wrote: >> Il 02/09/2013 09:06, Liu Ping Fan ha scritto: >>> note: I rebase it onto Stefan's net-next tree, since pc-1.7 has already >>> been defined there. >>> >>> v4: >>> use standard compat property

Re: [Qemu-devel] [PATCH v2 05/10] raven: set a correct PCI I/O memory region

2013-09-04 Thread Peter Maydell
On 4 September 2013 07:01, Paolo Bonzini wrote: > Not using address_space_io is fine as well, but it's a separate change > and I doubt it is a good idea to do it for a single target; if you do it > for all non-x86 PCI bridges, and move the initialization of > address_space_io to target-i386, that'

[Qemu-devel] [RFC 2/2] hw/mips: use sizes.h macros

2013-09-04 Thread Antony Pavlov
Signed-off-by: Antony Pavlov --- hw/mips/mips_malta.c | 3 ++- include/hw/mips/bios.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index ae0921c..7e8978b 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -51,6

[Qemu-devel] [RFC 1/2] include/: import sizes.h from barebox

2013-09-04 Thread Antony Pavlov
The header file sizes.h is used in linux kernel, barebox bootloader and u-boot bootloader. It provides the short and easy-to-read names for power-of-two numbers. The numbers like this are othen used for memory range sizes. This commits imports the sizes.h from barebox bootloader source code (see h

[Qemu-devel] [RFC 0/2] use sizes.h macros for power-of-two sizes

2013-09-04 Thread Antony Pavlov
[RFC 1/2] include/: import sizes.h from barebox [RFC 2/2] hw/mips: use sizes.h macros The sizes.h macros is a easy-to-read method of power-of-two memory sizes representation. The sizes.h macros are actively used in linux kernel and other projects, so let's use them in QEMU too.

Re: [Qemu-devel] Would virtio support 64 bit address for vring virtqueue?

2013-09-04 Thread Rusty Russell
"Xie, Huawei" writes: > If this is the case, one possible fix would be: > Write two continuous 32bit DWORD to combine a 64bit address > Use the upper 12 bits of PFN val to indicate if it is combined write > In this way, we wouldn't break other virtio driver, register layout > and only

Re: [Qemu-devel] question about qemu disk cache mode

2013-09-04 Thread Kevin Wolf
Am 04.09.2013 um 05:47 hat xuanmao_001 geschrieben: > Dear qemuers: > > my qemu-kvm version is 1.0.1 > I would like to figure out the qemu disk cache mode. I have visited the > qemu-options.hx > there is two cache that I didn't understand: the host cache page and the qemu > disk write cache. >

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-04 Thread Stefan Hajnoczi
On Tue, Sep 03, 2013 at 03:45:52PM +0200, Kevin Wolf wrote: > @@ -103,7 +107,11 @@ in the description of a field. > write to an image with unknown auto-clear features if it > clears the respective bits from this field first. > > -Bits

Re: [Qemu-devel] [Qemu-stable][PATCH] rdma: fix multiple VMs parallel migration

2013-09-04 Thread Frank Yang
> On 2013-9-3 13:03, Lei Li wrote: >> Hi Frank, >> >> I failed to apply this patch. Please make sure to use git-send-email, >> otherwise >> it's a little hard to review. :) >> >> On 08/30/2013 08:39 PM, Frank Yang wrote: >>> When several VMs migrate with RDMA at the same time, the increased pressu

Re: [Qemu-devel] [PATCH v2 05/10] raven: set a correct PCI I/O memory region

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 09:22, Peter Maydell ha scritto: > > Not using address_space_io is fine as well, but it's a separate change > > and I doubt it is a good idea to do it for a single target; if you do it > > for all non-x86 PCI bridges, and move the initialization of > > address_space_io to target-i386,

Re: [Qemu-devel] [PATCH v4 0/3] bugs fix for hpet

2013-09-04 Thread liu ping fan
On Wed, Sep 4, 2013 at 3:03 PM, Paolo Bonzini wrote: > Il 04/09/2013 07:29, liu ping fan ha scritto: >> On Tue, Sep 3, 2013 at 7:17 PM, Paolo Bonzini wrote: >>> Il 02/09/2013 09:06, Liu Ping Fan ha scritto: note: I rebase it onto Stefan's net-next tree, since pc-1.7 has already been de

Re: [Qemu-devel] [PATCH v2 05/10] raven: set a correct PCI I/O memory region

2013-09-04 Thread Peter Maydell
On 4 September 2013 09:11, Paolo Bonzini wrote: > Il 04/09/2013 09:22, Peter Maydell ha scritto: >> should not be using address_space_io; but the >> easiest way to get there is to convert the PCI bridges one at >> a time as we have maintenance effort to do so. > > I'm not against the patch, but th

Re: [Qemu-devel] Block Filters

2013-09-04 Thread Stefan Hajnoczi
On Tue, Sep 03, 2013 at 06:24:49PM +0200, Benoît Canet wrote: > -$user want to do Copy On Read This feature is currently implemented in the read code path in block.c. Putting it into a separate, stackable module is fine but may require a per-device request queue. Today every BDS has its own reque

Re: [Qemu-devel] Questions about hvm domU default devices with upstream qemu

2013-09-04 Thread Fabio Fantoni
Il 04/07/2013 15:51, Fabio Fantoni ha scritto: Last year I posted a question about default devices of upstream qemu that differ from qemu traditional, like empty floppy and cdrom in particular. About empty floppy now is disabled as workaround. About empty cdrom Stabellini tells that is useful,

Re: [Qemu-devel] [PATCH v2 05/10] raven: set a correct PCI I/O memory region

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 10:25, Peter Maydell ha scritto: > My plan for that goes: > 1. where people are overhauling a host bridge (ie in a patchset like > this one) allow them to make the changes that move in the right > direction > 2. look at how many other bridges remain after that > 3. fix th

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-04 Thread Max Reitz
On 2013-09-03 15:45, Kevin Wolf wrote: This contains an extension of the qcow2 spec that introduces journalling to the image format, plus some preliminary type definitions and function prototypes in the qcow2 code. Journalling functionality is a crucial feature for the design of data deduplicati

Re: [Qemu-devel] [PATCH] ne2000: mark I/O as LITTLE_ENDIAN

2013-09-04 Thread Stefan Hajnoczi
On Mon, Sep 02, 2013 at 01:10:34PM +0200, Aurelien Jarno wrote: > Now that the memory subsystem is propagating the endianness correctly, > the ne2000 device should have its I/O ports marked as LITTLE_ENDIAN, as > PCI devices are little endian. > > This makes the ne2000 NIC to work again on PowerPC

Re: [Qemu-devel] [PATCH v2 05/10] raven: set a correct PCI I/O memory region

2013-09-04 Thread Peter Maydell
On 4 September 2013 09:31, Paolo Bonzini wrote: > The endianness test does reads and writes to the I/O address space of > most bridges. Nice. It looks like it's using an ISA device though, which is a bit of a roundabout way of testing PCI I/O (means it can't test the versatile pci bridge's handli

Re: [Qemu-devel] [PATCH v2 05/10] raven: set a correct PCI I/O memory region

2013-09-04 Thread Andreas Färber
Am 04.09.2013 10:25, schrieb Peter Maydell: > (Does 'make check' really test all the host bridges? This doesn't > seem very likely to me.) Not sure if all yet. Now that the ppc pull is merged, I'll respin and push forward my qom-test, which covers all targets and thereby all PHBs instantiated by d

Re: [Qemu-devel] I/O performance degradation with Virtio-Blk-Data-Plane

2013-09-04 Thread Stefan Hajnoczi
On Mon, Sep 02, 2013 at 05:24:09PM +0900, Jonghwan Choi wrote: > Nowdays i measured io performance with Virtio-Blk-Data-Plane. > There was something strange in test. > When vcpu count is 1, io performance is increased in test > But vcpu count is over 2, io performance is decreased in test. > > i u

[Qemu-devel] [PATCH 1/3 resend v2] savevm: add comments for qemu_file_get_error()

2013-09-04 Thread Lei Li
Add comments for qemu_file_get_error(), as its return value is not very clear. Signed-off-by: Lei Li --- savevm.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 03fc4d9..95a11f9 100644 --- a/savevm.c +++ b/savevm.c @@ -566,6 +566,13 @@ QE

[Qemu-devel] [PATCH 3/3 resend v2] arch_init: right return for ram_save_iterate

2013-09-04 Thread Lei Li
qemu_file_rate_limit() never return negative value since the refactor by Commit 1964a39, this patch gets rid of the negative check for it, adjust bytes_transferred and return value correspondingly in ram_save_iterate(). Signed-off-by: Lei Li Signed-off-by: Paolo Bonzini --- Change since v1:

[Qemu-devel] [PATCH V12 09/13] NUMA: set guest numa nodes memory policy

2013-09-04 Thread Wanlong Gao
Set the guest numa nodes memory policies using the mbind(2) system call node by node. After this patch, we are able to set guest nodes memory policies through the QEMU options, this arms to solve the guest cross nodes memory access performance issue. And as you all know, if PCI-passthrough is used,

[Qemu-devel] [PATCH V12 02/13] NUMA: check if the total numa memory size is equal to ram_size

2013-09-04 Thread Wanlong Gao
If the total number of the assigned numa nodes memory is not equal to the assigned ram size, it will write the wrong data to ACPI talb, then the guest will ignore the wrong ACPI table and recognize all memory to one node. It's buggy, we should check it to ensure that we write the right data to ACPI

[Qemu-devel] [PATCH 0/3 resend v2] Migration fix

2013-09-04 Thread Lei Li
This small patch series is extracted from localhost migration series that Paolo reviewed positively, send it separately as his request. It fixs wrong initialization in RDMA hook ram_control_load_hook() and gets rid of the negative check for qemu_file_rate_limit() with bytes_transferred and re

[Qemu-devel] [PATCH 2/3 resend v2] savevm: fix wrong initialization by ram_control_load_hook

2013-09-04 Thread Lei Li
It should set negative error value rather than 0 in QEMUFile if there has been an error. Reviewed-by: Michael R. Hines Signed-off-by: Lei Li --- Change since v1: Initialize ret to -EINVAL rather than -1 from Paolo Bonzini. savevm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCH V12 04/13] NUMA: convert -numa option to use OptsVisitor

2013-09-04 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 3 +- numa.c | 148 +++- qapi-schema.json| 30 ++ vl.c| 11 +++- 4 files changed, 114 insertions(+), 78 deletions(-) diff --git a/include/

[Qemu-devel] [PATCH V12 06/13] NUMA: add "-numa mem," options

2013-09-04 Thread Wanlong Gao
Add "-numa mem," option like following as Paolo suggested: -numa mem,nodeid=0,size=1G This new option will make later coming memory hotplug better. We will use the new options to specify nodes memory info, and just remain "-numa node,mem=xx" as legacy. Reviewed-by: Laszlo Ersek Signed-off-

[Qemu-devel] [PATCH V12 07/13] NUMA: expand MAX_NODES from 64 to 128

2013-09-04 Thread Wanlong Gao
libnuma choosed 128 for MAX_NODES, so we follow libnuma here. Signed-off-by: Wanlong Gao --- include/sysemu/sysemu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 58c728c..12529a1 100644 --- a/include/sysemu/sysemu.h +

[Qemu-devel] [PATCH V12 12/13] NUMA: add qmp command query-numa

2013-09-04 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao --- numa.c | 65 qapi-schema.json | 36 +++ qmp-commands.hx | 49 ++ 3 fil

[Qemu-devel] [PATCH V12 05/13] NUMA: introduce NumaMemOptions

2013-09-04 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- qapi-schema.json | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index fe12ea5..3ca742e 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3783,7 +3783,8 @@ ## { 'union': 'NumaOption

[Qemu-devel] [PATCH V12 00/13] Add support for binding guest numa nodes to host numa nodes

2013-09-04 Thread Wanlong Gao
As you know, QEMU can't direct it's memory allocation now, this may cause guest cross node access performance regression. And, the worse thing is that if PCI-passthrough is used, direct-attached-device uses DMA transfer between device and qemu process. All pages of the guest will be pinned by get_u

[Qemu-devel] [PATCH V12 11/13] NUMA: add hmp command set-mem-policy

2013-09-04 Thread Wanlong Gao
Add hmp command set-mem-policy to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mem-policy 0 policy=membind,relative=false,host-nodes=0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx | 16 ++ h

[Qemu-devel] [PATCH V12 01/13] NUMA: move numa related code to new file numa.c

2013-09-04 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- Makefile.target | 2 +- cpus.c | 14 include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 3 + numa.c | 182 vl.c| 139 +---

[Qemu-devel] [RFC qom-cpu 00/41] QOM CPUState, part 13: Emptying CPU_COMMON

2013-09-04 Thread Andreas Färber
Hello, This series aggressively decimizes CPU_COMMON fields and then begins with some follow-up cleanups in core CPU code. It is not complete in terms of cleanups, surrounding Coding Style fixes or explanatory commit messages - sending it out early as a gentle reminder not to use unnecessary CPUFo

[Qemu-devel] [PATCH V12 13/13] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-09-04 Thread Wanlong Gao
Signed-off-by: Wanlong Gao --- hmp.c | 54 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index ae695b0..2d878c6 100644 --- a/hmp.c +++ b/hmp.c @@ -27

[Qemu-devel] [RFC qom-cpu 08/41] cpu: Move icount_decr field from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-exec.c| 4 ++-- cpus.c| 13 ++--- include/exec/cpu-defs.h | 20 include/exec/gen-icount.h | 6 -- include/qom/cpu.h | 19 +++ qom/cpu.c | 1 + tr

[Qemu-devel] [PATCH V12 10/13] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-09-04 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind relative=true host-nodes=0-1 Signed-off-by: Wanlong Gao --- numa.c | 66 ++

[Qemu-devel] [PATCH V12 08/13] NUMA: parse guest numa nodes memory policy

2013-09-04 Thread Wanlong Gao
The memory policy setting format is like: policy={default|membind|interleave|preferred}[,relative=true],host-nodes=N-N And we are adding this setting as a suboption of "-numa mem,", the memory policy then can be set like following: -numa node,nodeid=0,cpus=0 \ -numa node,nodeid=1,cpus=1

[Qemu-devel] [RFC qom-cpu 02/41] cpu: Turn cpu_mmu_index() into a CPUClass hook

2013-09-04 Thread Andreas Färber
Default to 0. Signed-off-by: Andreas Färber --- cputlb.c | 7 +++ include/exec/softmmu_header.h | 4 ++-- include/qom/cpu.h | 15 +++ qom/cpu.c | 6 ++ target-alpha/cpu.c| 14 ++ target-alpha/cpu.

[Qemu-devel] [RFC qom-cpu 05/41] cpu: Move mem_io_{pc, vaddr} fields from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Reset them. Signed-off-by: Andreas Färber --- exec.c | 4 ++-- hw/i386/kvmvapic.c | 2 +- include/exec/cpu-defs.h | 7 --- include/exec/softmmu_template.h | 10 ++ include/qom/cpu.h | 8 qom/cpu.c

[Qemu-devel] [RFC qom-cpu 04/41] cpu: Turn cpu_handle_mmu_fault() into a CPUClass hook

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- include/qom/cpu.h | 3 +++ target-alpha/cpu.c| 4 +++- target-alpha/cpu.h| 5 ++--- target-alpha/helper.c | 12 target-alpha/mem_helper.c | 3 ++- target-arm/cpu.c | 4 +++- target-arm

[Qemu-devel] [RFC qom-cpu 07/41] cpu: Move icount_extra field from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Reset it. Signed-off-by: Andreas Färber --- cpu-exec.c | 10 +- cpus.c | 14 +++--- include/exec/cpu-defs.h | 1 - include/qom/cpu.h | 2 ++ qom/cpu.c | 1 + 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/cpu-

[Qemu-devel] [RFC qom-cpu 01/41] cpu: Turn cpu_has_work() into a CPUClass hook

2013-09-04 Thread Andreas Färber
Default to false. Tidy variable naming and inline cast uses while at it. Signed-off-by: Andreas Färber --- cpu-exec.c | 5 - cpus.c | 2 +- include/qom/cpu.h | 12 ++-- qom/cpu.c | 6 ++ target-alpha/cpu.c

[Qemu-devel] [RFC qom-cpu 10/41] cpu: Move jmp_env field from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-exec.c | 8 +--- include/exec/cpu-defs.h | 2 -- include/qom/cpu.h | 2 ++ user-exec.c | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 31331dc..39e4f8b 100644 --- a/cpu-e

[Qemu-devel] [RFC qom-cpu 03/41] cpu: Turn cpu_get_tb_cpu_state() into a CPUClass hook

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-exec.c | 6 -- exec.c | 10 ++ hw/i386/kvmvapic.c | 8 +--- include/qom/cpu.h | 4 target-alpha/cpu.c | 24 target-alpha/cpu.h | 21 ---

[Qemu-devel] [RFC qom-cpu 13/41] cpu: Drop cpu_model_str from CPU_COMMON

2013-09-04 Thread Andreas Färber
Since this is only read in cpu_copy() and linux-user has a global cpu_model, drop the field from generic code. Signed-off-by: Andreas Färber --- include/exec/cpu-defs.h | 2 -- linux-user/main.c | 4 ++-- target-alpha/cpu.c | 4 target-arm/helper.c | 3 --- ta

[Qemu-devel] [RFC qom-cpu 09/41] cpu: Move tb_jmp_cache field from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Clear it on reset. Signed-off-by: Andreas Färber --- cpu-exec.c | 5 +++-- cputlb.c| 2 +- include/exec/cpu-defs.h | 4 include/qom/cpu.h | 4 qom/cpu.c | 1 + translate-all.c | 15 ++- 6 files changed, 15 insert

[Qemu-devel] [RFC qom-cpu 14/41] cpu: Move opaque field from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- bsd-user/main.c | 2 +- gdbstub.c| 3 +-- include/exec/cpu-defs.h | 3 --- include/qom/cpu.h| 3 +++ linux-user/elfload.c | 10 ++ linux-user/linuxload.c | 3 +-- linux-user/m68k/target_

[Qemu-devel] [RFC qom-cpu 06/41] cpu: Move can_do_io field from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Rename can_do_io() to cpu_can_do_io() and change argument to CPUState. Signed-off-by: Andreas Färber --- cpus.c | 2 +- include/exec/cpu-defs.h | 1 - include/exec/exec-all.h | 21 + include/exec/gen-icount.h | 4 ++-- include

[Qemu-devel] [RFC qom-cpu 15/41] cpu: Move watchpoint fields from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-exec.c | 5 +++-- exec.c | 33 - gdbstub.c | 8 include/exec/cpu-defs.h | 10 -- include/qom/cpu.h | 10 ++ linux-user/main.c | 5 +++-- target

[Qemu-devel] [RFC qom-cpu 16/41] cpu: Move breakpoints field from CPU_COMMON to CPUState

2013-09-04 Thread Andreas Färber
Most targets were using offsetof(CPUFooState, breakpoints) to determine how much of CPUFooState to clear on reset. Use the next field after CPU_COMMON instead, if any, or sizeof(CPUFooState) otherwise. Signed-off-by: Andreas Färber --- exec.c| 21 + in

[Qemu-devel] [RFC qom-cpu 17/41] cpu: Move tlb_flush_{addr, mask} fields from CPU_COMMON_TLB to CPUState

2013-09-04 Thread Andreas Färber
Change their type to vaddr but keep comparing target_ulongs for now. Signed-off-by: Andreas Färber --- cputlb.c| 27 ++- include/exec/cpu-defs.h | 2 -- include/qom/cpu.h | 3 +++ 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/cpu

[Qemu-devel] [RFC qom-cpu 19/41] cpu-exec: Change cpu_loop_exit() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-exec.c| 14 ++ exec.c| 2 +- include/exec/exec-all.h | 2 +- target-alpha/helper.c | 4 ++-- target-alpha/mem_helper.c | 4 ++-- target-arm/op_helper.c| 6 +++--- target-cr

[Qemu-devel] [RFC qom-cpu 22/41] translate-all: Change tb_check_watchpoint() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- exec.c | 2 +- translate-all.c | 4 ++-- translate-all.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exec.c b/exec.c index 06fb881..0a81967 100644 --- a/exec.c +++ b/exec.c @@ -1480,7 +1480,7 @@ static void check_watchpoint(int

[Qemu-devel] [RFC qom-cpu 21/41] translate-all: Change cpu_restore_state_from_tb() argument to CPUState

2013-09-04 Thread Andreas Färber
And normalize the argument order. Signed-off-by: Andreas Färber --- translate-all.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/translate-all.c b/translate-all.c index 5673420..0dd6a60 100644 --- a/translate-all.c +++ b/translate-all.c @@ -193,10 +193,10 @

[Qemu-devel] [RFC qom-cpu 18/41] exec: Change tlb_fill() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- include/exec/exec-all.h | 2 +- include/exec/softmmu_template.h | 4 ++-- target-alpha/mem_helper.c | 8 +--- target-arm/op_helper.c | 12 +++- target-cris/op_helper.c | 7 --- target-i386/mem_helper.c| 1

[Qemu-devel] [RFC qom-cpu 28/41] exec: Change cpu_breakpoint_{insert, remove{, _by_ref, _all}} argument

2013-09-04 Thread Andreas Färber
Use CPUState. Allows to clean up CPUArchState in gdbstub. Signed-off-by: Andreas Färber --- exec.c | 20 gdbstub.c | 20 include/exec/cpu-all.h | 15 --- include/qom/cpu.h | 15 +++ linux-user/mai

[Qemu-devel] [RFC qom-cpu 26/41] target-ppc: Use PowerPCCPU in PowerPCCPUClass::handle_mmu_fault hook

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- target-ppc/cpu-qom.h| 8 +--- target-ppc/mmu-hash32.c | 5 +++-- target-ppc/mmu-hash32.h | 2 +- target-ppc/mmu-hash64.c | 5 +++-- target-ppc/mmu-hash64.h | 2 +- target-ppc/mmu_helper.c | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --

[Qemu-devel] [RFC qom-cpu 37/41] target-microblaze: Replace DisasContext::env field with MicroBlazeCPU

2013-09-04 Thread Andreas Färber
This cleans up some mb_env_get_cpu() needed for cpu_abort(). Signed-off-by: Andreas Färber --- target-microblaze/translate.c | 84 +-- 1 file changed, 40 insertions(+), 44 deletions(-) diff --git a/target-microblaze/translate.c b/target-microblaze/transla

[Qemu-devel] [RFC qom-cpu 24/41] translate-all: Change tb_gen_code() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-exec.c | 4 ++-- exec.c | 2 +- hw/i386/kvmvapic.c | 2 +- include/exec/exec-all.h | 2 +- translate-all.c | 9 + 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index

[Qemu-devel] [RFC qom-cpu 27/41] exec: Change cpu_watchpoint_{insert, remove{, _by_ref, _all}} argument

2013-09-04 Thread Andreas Färber
Use CPUState. This lets us drop a few local env usages. Signed-off-by: Andreas Färber --- exec.c| 34 +- gdbstub.c | 17 + include/exec/cpu-all.h| 6 -- include/qom/cpu.h | 7 +++ linux-user

Re: [Qemu-devel] question about qemu disk cache mode

2013-09-04 Thread xuanmao_001
I understand the physical disk cache and host page cache. I want to the difference between guest disk write cache and host page cache that described with "Caching modes in Qemu" in https://events.linuxfoundation.org/slides/2011/linuxcon-japan/lcj2011_hajnoczi.pdf give me some more information p

[Qemu-devel] [RFC qom-cpu 31/41] exec: Change memory_region_section_get_iotlb() argument to CPUState

2013-09-04 Thread Andreas Färber
It no longer needs CPUArchState since moving watchpoints to CPUState. Signed-off-by: Andreas Färber --- cputlb.c | 3 ++- exec.c| 3 +-- include/exec/cputlb.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cputlb.c b/cputlb.c index bd5cf0e..e5

[Qemu-devel] [RFC qom-cpu 33/41] cputlb: Change tlb_set_page() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cputlb.c | 4 ++-- include/exec/exec-all.h| 2 +- target-alpha/helper.c | 2 +- target-arm/helper.c| 2 +- target-cris/helper.c | 2 +- target-i386/helper.c | 2 +- target-lm32/helper.c | 6 +++--- target-m68k/

[Qemu-devel] [RFC qom-cpu 32/41] cputlb: Change tlb_set_page() argument to CPUState

2013-09-04 Thread Andreas Färber
It no longer needs CPUArchState since moving tlb_flush_* to CPUState. Signed-off-by: Andreas Färber --- cputlb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cputlb.c b/cputlb.c index e5b6145..ddcd2cd 100644 --- a/cputlb.c +++ b/cputlb.c @@ -212,10 +212,9 @@ void tlb_

[Qemu-devel] [RFC qom-cpu 41/41] user-exec: Change exception_action() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- user-exec.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/user-exec.c b/user-exec.c index 3b795c1..bc58056 100644 --- a/user-exec.c +++ b/user-exec.c @@ -38,11 +38,12 @@ //#define DEBUG_SIGNAL -static void exception_action(C

[Qemu-devel] [RFC qom-cpu 36/41] target-lm32: Replace DisasContext::env field with LM32CPU

2013-09-04 Thread Andreas Färber
This cleans up some lm32_env_get_cpu() introduced for cpu_abort(). Signed-off-by: Andreas Färber --- target-lm32/translate.c | 60 - 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/target-lm32/translate.c b/target-lm32/translate.c i

[Qemu-devel] [RFC qom-cpu 38/41] target-lm32: Move features field from CPULM32State to LM32CPU

2013-09-04 Thread Andreas Färber
This simplifies the code after conversion to DisasContext::cpu. Signed-off-by: Andreas Färber --- target-lm32/cpu-qom.h | 3 +++ target-lm32/cpu.h | 2 -- target-lm32/helper.c| 2 +- target-lm32/translate.c | 16 4 files changed, 12 insertions(+), 11 deletions(-)

[Qemu-devel] [RFC qom-cpu 40/41] cputlb: Change tlb_flush() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cputlb.c | 6 +++--- exec.c | 4 +--- hw/sh4/sh7750.c| 2 +- include/exec/exec-all.h| 4 ++-- target-alpha/cpu.c | 2 +- target-alpha/sys_helper.c

[Qemu-devel] [RFC qom-cpu 39/41] cputlb: Change tlb_flush_page() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cputlb.c | 4 +-- exec.c | 7 ++ include/exec/exec-all.h | 4 +-- target-alpha/sys_helper.c| 2 +- target-arm/helper.c | 8 -- target-cris/mmu.c| 3 ++- target-cris/op_helper.c

[Qemu-devel] [PATCH resend] sdl: Reverse support for video mode setting

2013-09-04 Thread Lei Li
Currently, If the setting of video mode failed, qemu will exit. It should go back to the previous setting if the new screen resolution failed. This patch fixes LP#1216368, add support to revert to existing surface for the failure of video mode setting. Reported-by: Sascha Krissler Signed-off-by:

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-04 Thread Benoît Canet
> > +They consist of transactions, which in turn contain operations that > > +are effectively executed atomically. A qcow2 image can have a main image > > +journal that deals with cluster management operations, and additional > > specific > > +journals can be used by other features like data dedup

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-04 Thread Kevin Wolf
First of all, excuse any inconsistencies in the following mail. I wrote it from top to bottom, and there was some thought process involved in almost every paragraph... Am 04.09.2013 um 10:03 hat Stefan Hajnoczi geschrieben: > On Tue, Sep 03, 2013 at 03:45:52PM +0200, Kevin Wolf wrote: > > @@ -103,

[Qemu-devel] [RFC qom-cpu 20/41] translate-all: Change cpu_restore_state() argument to CPUState

2013-09-04 Thread Andreas Färber
This lets us drop some local variables in tlb_fill() functions. Signed-off-by: Andreas Färber --- hw/i386/kvmvapic.c| 2 +- include/exec/exec-all.h | 2 +- target-alpha/helper.c | 2 +- target-alpha/mem_helper.c | 7 ++- target-arm/op_helper.c| 2 +-

[Qemu-devel] [RFC qom-cpu 25/41] translate-all: Change tb_flush_jmp_cache() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cputlb.c | 2 +- include/exec/cputlb.h | 2 +- translate-all.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cputlb.c b/cputlb.c index e02663c..3721bfc 100644 --- a/cputlb.c +++ b/cputlb.c @@ -120,7 +120,7 @@ void tlb_

Re: [Qemu-devel] [PATCH] target-arm: fix ARMv7M stack alignment on reset

2013-09-04 Thread Peter Maydell
On 4 September 2013 10:23, Sebastian Ottlik wrote: > When the initial SP is loaded from the vector table on ARMv7M systems the two > least significant bits are ignored as the stack is always aligned at a four > byte > boundary (see ARM DDI 0403C, B1.4.1 and B1.5.5). So far QEMU did not ignore > t

Re: [Qemu-devel] [PATCH] kvm: fix traces to use %x instead of %d

2013-09-04 Thread Stefan Hajnoczi
On Tue, Sep 03, 2013 at 04:43:46PM +1000, Alexey Kardashevskiy wrote: > KVM request types are normally defined using hex constants but QEMU traces > print decimal values instead what is not very convinient. > > This changes the request type format from %d to %x. > > Signed-off-by: Alexey Kardashe

[Qemu-devel] [RFC qom-cpu 29/41] cpu-exec: Change cpu_resume_from_signal() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-exec.c | 4 +--- exec.c | 3 +-- hw/i386/kvmvapic.c | 3 +-- include/exec/exec-all.h | 2 +- target-i386/helper.c| 2 +- target-xtensa/helper.c | 2 +- translate-all.c | 12 ++-- user-exec.c

Re: [Qemu-devel] question about qemu disk cache mode

2013-09-04 Thread Stefan Hajnoczi
On Wed, Sep 04, 2013 at 11:47:04AM +0800, xuanmao_001 wrote: > my qemu-kvm version is 1.0.1 > I would like to figure out the qemu disk cache mode. I have visited the > qemu-options.hx > there is two cache that I didn't understand: the host cache page and the qemu > disk write cache. > > Is "host

[Qemu-devel] [RFC qom-cpu 12/41] cpu: Move cpu_copy() into linux-user

2013-09-04 Thread Andreas Färber
It is only used there and is deemed very fragile if not incorrect in its current memcpy() form. Moving it into linux-user will allow to move parts into target_cpu.h headers and only copy what the ABI mandates. Signed-off-by: Andreas Färber --- exec.c| 32 -

Re: [Qemu-devel] question about qemu disk cache mode

2013-09-04 Thread Kevin Wolf
Am 04.09.2013 um 11:07 hat xuanmao_001 geschrieben: > I understand the physical disk cache and host page cache. > > I want to the difference between guest disk write cache and host page cache > that described with "Caching modes in Qemu" in > > https://events.linuxfoundation.org/slides/2011/linu

[Qemu-devel] [RFC qom-cpu 30/41] cputlb: Change tlb_update_dirty() argument to CPUState

2013-09-04 Thread Andreas Färber
This allows to drop env in tb_invalidate_phys_page_range(). Note that the argument is unused. Signed-off-by: Andreas Färber --- cputlb.c | 2 +- include/exec/cputlb.h | 2 +- translate-all.c | 12 ++-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-04 Thread Kevin Wolf
Am 04.09.2013 um 10:32 hat Max Reitz geschrieben: > On 2013-09-03 15:45, Kevin Wolf wrote: > >This contains an extension of the qcow2 spec that introduces journalling > >to the image format, plus some preliminary type definitions and > >function prototypes in the qcow2 code. > > > >Journalling func

[Qemu-devel] [PATCH V12 03/13] NUMA: Add numa_info structure to contain numa nodes info

2013-09-04 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8 ++

Re: [Qemu-devel] [PATCH v5] powerpc: add PVR mask support

2013-09-04 Thread Alexey Kardashevskiy
On 08/28/2013 09:01 PM, Alexey Kardashevskiy wrote: > On 08/28/2013 08:49 PM, Andreas Färber wrote: >> Am 28.08.2013 12:37, schrieb Alexey Kardashevskiy: >>> IBM POWERPC processors encode PVR as a CPU family in higher 16 bits and >>> a CPU version in lower 16 bits. Since there is no significant cha

[Qemu-devel] [RFC PATCH] spapr: add initial ibm, client-architecture-support rtas call support

2013-09-04 Thread Alexey Kardashevskiy
This is an RFC patch. The modern Linux kernel supports every known POWERPC CPU so when it boots, it can always find a matching cpu_spec from the cpu_specs array. However if the kernel is quite old, it may be missing the definition of the actual CPU. To provide ability for old kernels to work on

[Qemu-devel] [RFC qom-cpu 23/41] translate-all: Change cpu_io_recompile() argument to CPUState

2013-09-04 Thread Andreas Färber
Signed-off-by: Andreas Färber --- include/exec/exec-all.h | 2 +- include/exec/softmmu_template.h | 4 ++-- translate-all.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index c25951c..40d5931 100

[Qemu-devel] [RFC qom-cpu 35/41] target-cris: Replace DisasContext::env field with CRISCPU

2013-09-04 Thread Andreas Färber
This cleans up repeated cris_env_get_cpu() for cpu_abort(). Signed-off-by: Andreas Färber --- target-cris/translate.c | 16 target-cris/translate_v10.c | 16 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/target-cris/translate.c b/target-cr

[Qemu-devel] [PATCH] target-arm: fix ARMv7M stack alignment on reset

2013-09-04 Thread Sebastian Ottlik
When the initial SP is loaded from the vector table on ARMv7M systems the two least significant bits are ignored as the stack is always aligned at a four byte boundary (see ARM DDI 0403C, B1.4.1 and B1.5.5). So far QEMU did not ignore these bits leading to a stack alignment inconsitent with real ha

Re: [Qemu-devel] [PATCH] qemu-iotests: Fixed test case 026

2013-09-04 Thread Stefan Hajnoczi
On Mon, Sep 02, 2013 at 03:07:39PM +0200, Kevin Wolf wrote: > Am 02.09.2013 um 14:58 hat Stefan Hajnoczi geschrieben: > > On Mon, Sep 02, 2013 at 02:42:00PM +0200, Kevin Wolf wrote: > > > diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check > > > index 74628ae..42d6955 100755 > > > ---

Re: [Qemu-devel] [RFC] qcow2 journalling draft

2013-09-04 Thread Benoît Canet
> > I'm not sure if multiple journals will work in practice. Doesn't this > > re-introduce the need to order update steps and flush between them? > > This is a question for Benoît, who made this requirement. I asked him > the same a while ago and apparently his explanation made some sense to > me

Re: [Qemu-devel] [RFC qom-cpu 03/41] cpu: Turn cpu_get_tb_cpu_state() into a CPUClass hook

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 11:04, Andreas Färber ha scritto: > static inline TranslationBlock *tb_find_fast(CPUArchState *env) > { > +CPUState *cpu = ENV_GET_CPU(env); > +CPUClass *cc = CPU_GET_CLASS(cpu); > TranslationBlock *tb; > -target_ulong cs_base, pc; > +vaddr cs_base, pc; > i

[Qemu-devel] [PATCH v2] kvm: fix traces to use %x instead of %d

2013-09-04 Thread Alexey Kardashevskiy
KVM request types are normally defined using hex constants but QEMU traces print decimal values instead, which is not very convenient. This changes the request type format from %d to %x. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Andreas Färber Reviewed-by: Paolo Bonzini --- Changes: v2:

Re: [Qemu-devel] question about qemu disk cache mode

2013-09-04 Thread xuanmao_001
so, the guest disk write cache just only for none and writeback cache mode? the cache allocate on host for disk file image by qemu? xuanmao_001 From: Kevin Wolf Date: 2013-09-04 17:45 To: xuanmao_001 CC: qemu-devel; qemu-discuss Subject: Re: Re: question about qemu disk cache mode Am 04.09.201

[Qemu-devel] [PATCH] dump-guest-memory: Check for the correct return value

2013-09-04 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" We should check for error with s->note_size Signed-off-by: Aneesh Kumar K.V --- dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dump.c b/dump.c index c0dae2c..80dd9d6 100644 --- a/dump.c +++ b/dump.c @@ -66,7 +66,7 @@ typedef struct DumpS

Re: [Qemu-devel] [RFC PATCH] spapr: add initial ibm, client-architecture-support rtas call support

2013-09-04 Thread Alexander Graf
On 04.09.2013, at 12:19, Alexey Kardashevskiy wrote: > This is an RFC patch. > > The modern Linux kernel supports every known POWERPC CPU so when > it boots, it can always find a matching cpu_spec from the cpu_specs array. > However if the kernel is quite old, it may be missing the definition

[Qemu-devel] [PATCH 0/6] pci: keep window properties up to date

2013-09-04 Thread Michael S. Tsirkin
w32/w64 properties that we report in QOM are currently static, but this is wrong: guest firmware can select its own windows: optimal placement for w64 is guest-dependent, further, for Q35, w32 is affected by the MCFG base and size. This detects the actual window configuration used by guest and rep

[Qemu-devel] [PATCH 1/6] q35: make pci window address/size match guest cfg

2013-09-04 Thread Michael S. Tsirkin
For Q35, MMCFG address and size are guest configurable. Update w32 property to make it behave accordingly. Signed-off-by: Michael S. Tsirkin --- hw/pci-host/q35.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 4febd24..3f1d447 100644 -

[Qemu-devel] [PATCH 2/6] range: add Range to typedefs

2013-09-04 Thread Michael S. Tsirkin
will help simplify header dependencies. Signed-off-by: Michael S. Tsirkin --- include/qemu/range.h| 2 +- include/qemu/typedefs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu/range.h b/include/qemu/range.h index b76cc0d..4a0780d 100644 --- a/include/qemu/

  1   2   3   >