Re: [Qemu-devel] [PATCH] Prevent disk data loss when closing qemu

2012-05-22 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Il 22/05/2012 10:51, Kevin Wolf ha scritto: > > Am 16.05.2012 12:16, schrieb Pavel Dovgaluk: > >> I use qemu under Windows and it has two windows when executes - console > >> and SDL ones. > >> When I close SDL

[Qemu-devel] [PATCH] kvm: collect vcpus' numa info for guest's scheduler

2012-05-22 Thread Liu Ping Fan
From: Liu Ping Fan The guest's scheduler can not see the numa info on the host and this will result to the following scene: Supposing vcpu-a on nodeA, vcpu-b on nodeB, when load balance, the tasks' pull and push between these vcpus will cost more. But unfortunately, currently, the guest is

[Qemu-devel] [PATCH] Qemu: add virt sched domain device

2012-05-22 Thread Liu Ping Fan
From: Liu Ping Fan The device will demand the collection of vcpus' numa info, and trigger the guest to rebuild the sched domain. Signed-off-by: Liu Ping Fan --- Makefile.target |1 + hmp-commands.hx | 16 + hw/qdev.h |1 + hw/virt_sd.c

[Qemu-devel] [PATCH 2/2] sched: add virt domain device's driver

2012-05-22 Thread Liu Ping Fan
From: Liu Ping Fan A driver plays with Qemu's emulated "virt domain device". They aims to export the host numa info to the guest. --todo: A more proper place to archive this driver? Signed-off-by: Liu Ping Fan --- drivers/virtio/Kconfig |4 ++ drivers/virtio/Makefile |1 + drivers/

[Qemu-devel] [PATCH 1/2] sched: add virt sched domain for the guest

2012-05-22 Thread Liu Ping Fan
From: Liu Ping Fan The guest's scheduler can not see the numa info on the host and this will result to the following scene: Supposing vcpu-a on nodeA, vcpu-b on nodeB, when load balance, the tasks' pull and push between these vcpus will cost more. But unfortunately, currently, the guest is just

[Qemu-devel] [RFC] kvm: export host NUMA info to guest's scheduler

2012-05-22 Thread Liu Ping Fan
Currently, the guest can not know the NUMA info of the vcpu, which will result in performance drawback. For example: Supposing vcpu-a on nodeA, vcpu-b on nodeB, when load balance, the tasks' pull and push between these vcpus will cost more. But unfortunately, currently, the guest is just blind to

Re: [Qemu-devel] How to create new target port?

2012-05-22 Thread 陳韋任
> I'm investigating adding a new target architecture > to QEMU. Are there documents, how-to's, or other > guidance on how to approach this? Or any advice? > > I noticed that there are a number of directories for > architectures like target-arm and target-mips. There > are also definitions under

[Qemu-devel] [PATCH qom-next 57/59] cpu: Introduce mandatory tlb_flush callback

2012-05-22 Thread Andreas Färber
Signed-off-by: Andreas Färber --- include/qemu/cpu.h | 12 qom/cpu.c |9 + target-alpha/cpu.c | 16 target-arm/cpu.c| 10 ++ target-cris/cpu.c | 10 ++ target-i386/cpu.c

[Qemu-devel] [PATCH qom-next 23/59] ppc: Pass PowerPCCPU to ppc40x_set_irq()

2012-05-22 Thread Andreas Färber
Needed for qemu_cpu_kick() and moving halted field to CPUState. Signed-off-by: Andreas Färber --- hw/ppc.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/ppc.c b/hw/ppc.c index de1a33b..fc3a65c 100644 --- a/hw/ppc.c +++ b/hw/ppc.c @@ -283,9 +283,10 @@ void

[Qemu-devel] [PATCH qom-next 02/59] cpu: Move CPU_COMMON_THREAD into CPUState

2012-05-22 Thread Andreas Färber
CPU_COMMON_THREAD was only used for Windows, adding an hThread field to CPU_COMMON. Move the field into QOM CPUState and change its type to HANDLE, which it is assigned from. This requires Windows headers, pulled in through qemu-thread.h. Signed-off-by: Andreas Färber --- cpu-defs.h |

[Qemu-devel] [PATCH qom-next 28/59] sun4u: Pass SPARCCPU to cpu_kick_irq()

2012-05-22 Thread Andreas Färber
Needed for qemu_cpu_kick(). Signed-off-by: Andreas Färber --- hw/sun4u.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/sun4u.c b/hw/sun4u.c index 4cea102..0453522 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -310,8 +310,10 @@ void cpu_check_irqs(CPUSPARCStat

[Qemu-devel] [PATCH qom-next 25/59] sun4m: Pass SPARCCPU to cpu_set_irq()

2012-05-22 Thread Andreas Färber
Needed for cpu_kick_irq(). Signed-off-by: Andreas Färber --- hw/sun4m.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/sun4m.c b/hw/sun4m.c index a959261..e9b9d9b 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -262,7 +262,8 @@ static void cpu_kick_irq(CPUSPARCState

[Qemu-devel] [PATCH qom-next 14/59] cpu: Move stopped field to CPUState

2012-05-22 Thread Andreas Färber
Change its type to bool. Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 30 ++ hw/ppce500_spin.c |3 ++- include/qemu/cpu.h |2 ++ 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h

[Qemu-devel] [PATCH qom-next 44/59] target-i386: Pass X86CPU to kvm_mce_inject()

2012-05-22 Thread Andreas Färber
Needed for cpu_x86_inject_mce(). Signed-off-by: Andreas Färber --- target-i386/kvm.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 92ad338..758bf8f 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -221,8 +221,

[Qemu-devel] [PATCH qom-next 19/59] cpus: Pass CPUState to qemu_tcg_init_vcpu()

2012-05-22 Thread Andreas Färber
CPUArchState is no longer needed. Signed-off-by: Andreas Färber --- cpus.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cpus.c b/cpus.c index 7b87ad9..5bae5fc 100644 --- a/cpus.c +++ b/cpus.c @@ -988,11 +988,8 @@ void resume_all_vcpus(void) } } -static v

[Qemu-devel] [PATCH qom-next 04/59] pc: Add CPU as /machine/cpu[n]

2012-05-22 Thread Andreas Färber
Using the cpu_index, give the X86CPU a canonical path. This must be done before initializing the APIC. Signed-off-by: Igor Mammedov Signed-off-by: Andreas Färber --- hw/pc.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 4167782..e9d

[Qemu-devel] [PATCH qom-next 30/59] target-s390x: Let cpu_s390x_init() return S390CPU

2012-05-22 Thread Andreas Färber
Let cpu_init() return CPUS390XState for backwards compatibility. Signed-off-by: Andreas Färber --- target-s390x/cpu.c|2 +- target-s390x/cpu.h|8 target-s390x/helper.c |4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target-s390x/cpu.c b/target

[Qemu-devel] [PATCH qom-next 05/59] apic: Replace cpu_env pointer by X86CPU link

2012-05-22 Thread Andreas Färber
Needed for converting cpu_is_bsp(). Signed-off-by: Andreas Färber Cc: Paolo Bonzini --- hw/apic.c | 34 +++--- hw/apic_common.c | 14 +++--- hw/apic_internal.h |2 +- hw/kvm/apic.c |9 + hw/pc.c|9 -

[Qemu-devel] [PATCH qom-next 03/59] cpu: Move thread field into CPUState

2012-05-22 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 40 +++- include/qemu/cpu.h |1 + 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index d0dd781..be89684 100644 --- a/cpu-defs.h +

[Qemu-devel] [PATCH qom-next 51/59] target-i386: Pass X86CPU to kvm_handle_halt()

2012-05-22 Thread Andreas Färber
Needed for moving interrupt_request and halted fields to CPUState. Signed-off-by: Andreas Färber --- target-i386/kvm.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 21de2e1..f7651bf 100644 --- a/target-i386/kvm.c +++ b/

[Qemu-devel] [PATCH qom-next 56/59] sun4u: Pass SPARCCPU to cpu_set_ivec_irq()

2012-05-22 Thread Andreas Färber
Needed for moving halted field to CPUState. Signed-off-by: Andreas Färber --- hw/sun4u.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/sun4u.c b/hw/sun4u.c index d41e80a..56c3ddf 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -321,7 +321,8 @@ static void cpu_kick

[Qemu-devel] [PATCH qom-next 52/59] target-mips: Pass MIPSCPU to mips_tc_wake()

2012-05-22 Thread Andreas Färber
Needed for mips_vpe_is_wfi(). Signed-off-by: Andreas Färber --- target-mips/op_helper.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 66037ac..50e2dd7 100644 --- a/target-mips/op_helper.c +++ b/target-mips/

[Qemu-devel] [PATCH qom-next 38/59] target-ppc: Pass PowerPCCPU to powerpc_excp()

2012-05-22 Thread Andreas Färber
Needed for cpu_ppc_hypercall(). Signed-off-by: Andreas Färber --- target-ppc/helper.c | 40 ++-- 1 files changed, 22 insertions(+), 18 deletions(-) diff --git a/target-ppc/helper.c b/target-ppc/helper.c index f556f85..f947684 100644 --- a/target-ppc/helper.

[Qemu-devel] [PATCH qom-next 21/59] ppc: Pass PowerPCCPU to ppc970_set_irq()

2012-05-22 Thread Andreas Färber
Needed for qemu_cpu_kick() and moving halted field into CPUState. Signed-off-by: Andreas Färber --- hw/ppc.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/ppc.c b/hw/ppc.c index f21aa40..bce24c6 100644 --- a/hw/ppc.c +++ b/hw/ppc.c @@ -162,9 +162,10 @@ voi

[Qemu-devel] [PATCH qom-next 18/59] cpus: Pass CPUState to qemu_tcg_cpu_thread_fn

2012-05-22 Thread Andreas Färber
CPUArchState is no longer needed except for iterating the CPUs. Needed for qemu_tcg_init_vcpu(). KVM and dummy threads still need CPUArchState for cpu_single_env. Signed-off-by: Andreas Färber --- cpus.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpus.c b/cpu

[Qemu-devel] [PATCH qom-next 43/59] cpus: Pass CPUState to [qemu_]cpu_has_work()

2012-05-22 Thread Andreas Färber
For target-mips also change the return type to bool. Make include paths for cpu-qom.h consistent for alpha and unicore32. Signed-off-by: Andreas Färber --- cpu-all.h |2 -- cpu-exec.c |8 +++- cpus.c |2 +- hw/spapr_hcall.c|

[Qemu-devel] [PATCH qom-next 58/59] xen_machine_pv: Use cpu_x86_init() to obtain X86CPU

2012-05-22 Thread Andreas Färber
Needed for moving halted field to CPUState. Signed-off-by: Andreas Färber --- hw/xen_machine_pv.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c index 7eee770..4b72aa7 100644 --- a/hw/xen_machine_pv.c +++ b/hw/xen_machine_pv.

[Qemu-devel] [PATCH qom-next 16/59] cpus: Pass CPUState to cpu_can_run()

2012-05-22 Thread Andreas Färber
CPUArchState is no longer needed there. Also change its return type to bool. Signed-off-by: Andreas Färber --- cpus.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index 753277d..c0f253e 100644 --- a/cpus.c +++ b/cpus.c @@ -422,17 +422,15

[Qemu-devel] [PATCH qom-next 35/59] cpu: Move queued_work_{first, last} to CPUState

2012-05-22 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 19 ++- include/qemu/cpu.h |1 + 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index 7c68c39..54807f5 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@ -2

[Qemu-devel] [PATCH v7 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx

2012-05-22 Thread Amos Kong
Attached the v7, test passed. From bec7ec71dbeb92dc830719be7c11f87786830863 Mon Sep 17 00:00:00 2001 From: Amos Kong Date: Tue, 22 May 2012 18:35:11 + Subject: [PATCH 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx When we add a device with acpiphp, we enumerate all f

[Qemu-devel] [PATCH qom-next 17/59] cpu: Move halt_cond to CPUState

2012-05-22 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 22 -- include/qemu/cpu.h |1 + 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index 43af2ba..7c68c39 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@

[Qemu-devel] [PATCH qom-next 37/59] cpus: Pass CPUState to qemu_wait_io_event_common()

2012-05-22 Thread Andreas Färber
CPUArchState is no longer needed there. Signed-off-by: Andreas Färber --- cpus.c | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cpus.c b/cpus.c index 2e7eafb..83880e7 100644 --- a/cpus.c +++ b/cpus.c @@ -689,10 +689,8 @@ static void flush_queued_work(CPUState

[Qemu-devel] [PATCH qom-next 29/59] target-ppc: Rename kvm_kick_{env => cpu} and pass PowerPCCPU

2012-05-22 Thread Andreas Färber
Needed for qemu_cpu_kick(). Signed-off-by: Andreas Färber --- target-ppc/kvm.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index c09cc39..f111e87 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -71,8 +71,11 @@ static

[Qemu-devel] [PATCH qom-next 27/59] sun4u: Pass SPARCCPU to {, s, hs}tick_irq() and cpu_timer_create()

2012-05-22 Thread Andreas Färber
Needed for cpu_kick_irq(). Signed-off-by: Andreas Färber --- hw/sun4u.c | 19 +++ 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/hw/sun4u.c b/hw/sun4u.c index 137a7c6..4cea102 100644 --- a/hw/sun4u.c +++ b/hw/sun4u.c @@ -366,7 +366,7 @@ void cpu_get_timer(QEMUF

[Qemu-devel] [PATCH qom-next 22/59] ppc: Pass PowerPCCPU to power7_set_irq()

2012-05-22 Thread Andreas Färber
Needed for consistency with surrounding _set_irq() functions. Signed-off-by: Andreas Färber --- hw/ppc.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/ppc.c b/hw/ppc.c index bce24c6..de1a33b 100644 --- a/hw/ppc.c +++ b/hw/ppc.c @@ -246,9 +246,10 @@ void pp

[Qemu-devel] [PATCH qom-next 46/59] cpus: Pass CPUState to run_on_cpu()

2012-05-22 Thread Andreas Färber
CPUArchState is no longer needed. Move the declaration to include/qemu/cpu.h and add documentation. Signed-off-by: Andreas Färber --- cpu-all.h|1 - cpus.c |3 +-- hw/kvm/apic.c|2 +- hw/kvmvapic.c|6 -- hw/ppce500_spin.c|2 +

[Qemu-devel] [PATCH qom-next 48/59] target-i386: Pass X86CPU to cpu_x86_load_seg_cache_sipi()

2012-05-22 Thread Andreas Färber
Simplifies the call in apic_sipi() again and needed for moving halted field to CPUState. Signed-off-by: Andreas Färber --- hw/apic.c |2 +- target-i386/cpu.h |4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index b14635d..2f642b0 10064

[Qemu-devel] [PATCH qom-next 50/59] target-i386: Pass X86CPU to kvm_get_mp_state()

2012-05-22 Thread Andreas Färber
Needed for moving halted field to CPUState. Signed-off-by: Andreas Färber --- target-i386/kvm.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index f611a96..21de2e1 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@

[Qemu-devel] [PATCH qom-next 00/59] QOM CPUState, part 4: CPU_COMMON

2012-05-22 Thread Andreas Färber
Hello, This series, based on qom-next and the two pending ARM cleanup patches, starts moving fields from CPUArchState (CPU_COMMON) to QOM CPUState. It stops short of moving all easily possible fields (i.e., those not depending on target_ulong or target_phys_addr_t) since the series got too long al

[Qemu-devel] How to create new target port?

2012-05-22 Thread Michael Eager
Hi All -- I'm investigating adding a new target architecture to QEMU. Are there documents, how-to's, or other guidance on how to approach this? Or any advice? I noticed that there are a number of directories for architectures like target-arm and target-mips. There are also definitions under t

[Qemu-devel] [PATCH qom-next 10/59] cpus: Pass CPUState to qemu_cpu_kick_thread()

2012-05-22 Thread Andreas Färber
CPUArchState is no longer needed there. Signed-off-by: Andreas Färber --- cpus.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cpus.c b/cpus.c index 8712259..7d30e55 100644 --- a/cpus.c +++ b/cpus.c @@ -846,9 +846,8 @@ static void *qemu_tcg_cpu_thread_fn(void *

[Qemu-devel] [PATCH qom-next 53/59] target-mips: Pass MIPSCPU to mips_vpe_is_wfi()

2012-05-22 Thread Andreas Färber
Needed for moving halted field to CPUState. Signed-off-by: Andreas Färber --- target-mips/op_helper.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 50e2dd7..af62c8b 100644 --- a/target-mips/op_helper.c

[Qemu-devel] [PATCH qom-next 47/59] cpu: Move thread_id to CPUState

2012-05-22 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 11 ++- exec.c |5 - include/qemu/cpu.h |1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index 54807f5..d846674 100644 --- a/cpu-defs.

[Qemu-devel] [PATCH qom-next 49/59] target-i386: Drop version 5 CPU VMState support

2012-05-22 Thread Andreas Färber
Version 5 contained the halted field, that we are about to move from CPUX86State to CPUState. To avoid inventing new VMSTATE macros for calculating a negative offset from CPUX86State to the field in CPUState, rather bump the minimum version from 3 to 6. We're at 12 currently. Suggested-by: Juan Qu

[Qemu-devel] [PATCH qom-next 39/59] target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall

2012-05-22 Thread Andreas Färber
Adapt emulate_spapr_hypercall() accordingly. Needed for spapr_hypercall(). Signed-off-by: Andreas Färber --- hw/spapr.c |4 +++- target-ppc/cpu.h|2 +- target-ppc/helper.c |4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/spapr.c b/hw/spapr.c in

[Qemu-devel] [PATCH qom-next 11/59] cpu: Move created field to CPUState

2012-05-22 Thread Andreas Färber
Change its type to bool. Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 13 +++-- include/qemu/cpu.h |2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index 4018b88..ae95158 100644 --- a/cpu-defs.h +++

[Qemu-devel] [PATCH qom-next 31/59] s390-virtio: Use cpu_s390x_init() to obtain S390CPU

2012-05-22 Thread Andreas Färber
Needed to store S390CPU in ipi_states[]. Signed-off-by: Andreas Färber --- hw/s390-virtio.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index c0e19fd..49b3495 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -209,9 +209,1

[Qemu-devel] [PATCH qom-next 07/59] cpu: Move thread_kicked to CPUState

2012-05-22 Thread Andreas Färber
Change field type to bool. Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 14 +- include/qemu/cpu.h |1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index be89684..4018b88 100644 --- a/cpu-defs.h

[Qemu-devel] [PATCH qom-next 13/59] ppce500_spin: Store PowerPCCPU in SpinKick

2012-05-22 Thread Andreas Färber
Needed for moving stop field to CPUState. Signed-off-by: Andreas Färber --- hw/ppce500_spin.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppce500_spin.c b/hw/ppce500_spin.c index fddf219..4c4a456 100644 --- a/hw/ppce500_spin.c +++ b/hw/ppce500_spin.c @@ -49,7

[Qemu-devel] [PATCH qom-next 41/59] spapr: Pass PowerPCCPU to hypercalls

2012-05-22 Thread Andreas Färber
Needed for cpu_has_work() in h_cede(). Signed-off-by: Andreas Färber --- hw/spapr.h |2 +- hw/spapr_hcall.c | 34 -- hw/spapr_llan.c | 10 +- hw/spapr_vio.c | 12 ++-- hw/spapr_vty.c |4 ++-- hw/xics.c| 11 +++

[Qemu-devel] [PATCH qom-next 33/59] target-s390x: Pass S390CPU to s390_cpu_restart()

2012-05-22 Thread Andreas Färber
Needed for qemu_cpu_kick(). Signed-off-by: Andreas Färber --- target-s390x/kvm.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 2153e38..5800fd6 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -292,8 +292,10

[Qemu-devel] [PATCH qom-next 40/59] spapr: Pass PowerPCCPU to spapr_hypercall()

2012-05-22 Thread Andreas Färber
Needed for the hypercall handlers. Signed-off-by: Andreas Färber --- hw/spapr.c |2 +- hw/spapr.h |2 +- hw/spapr_hcall.c |4 +++- target-ppc/kvm.c |3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/spapr.c b/hw/spapr.c index 70068b4..f9c3631 10

[Qemu-devel] [PATCH qom-next 32/59] s390-virtio: Let s390_cpu_addr2state() return S390CPU

2012-05-22 Thread Andreas Färber
Convert ipi_states to S390CPU**. Needed for s390_cpu_restart() in handle_sigp(). Signed-off-by: Andreas Färber --- hw/s390-virtio-bus.c |6 -- hw/s390-virtio.c |8 target-s390x/cpu.h |2 +- target-s390x/kvm.c |6 -- 4 files changed, 13 insertions(+), 9 d

[Qemu-devel] [PATCH qom-next 54/59] target-mips: Pass MIPSCPU to mips_tc_sleep()

2012-05-22 Thread Andreas Färber
Needed for mips_vpe_sleep(). Signed-off-by: Andreas Färber --- target-mips/op_helper.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index af62c8b..bfced36 100644 --- a/target-mips/op_helper.c +++ b/target-mips/o

[Qemu-devel] [PATCH qom-next 09/59] cpus: Pass CPUState to qemu_cpu_is_self()

2012-05-22 Thread Andreas Färber
Change return type to bool, move to include/qemu/cpu.h and add documentation. Signed-off-by: Andreas Färber --- cpus.c | 10 -- exec.c |3 ++- hw/apic.c |2 +- include/qemu/cpu.h | 10 ++ kvm-all.c |4 +++- qemu-common.h

[Qemu-devel] [PATCH qom-next 45/59] target-i386: Pass X86CPU to cpu_x86_inject_mce()

2012-05-22 Thread Andreas Färber
Needed for run_on_cpu(). Signed-off-by: Andreas Färber --- monitor.c|6 -- target-i386/cpu.h|2 +- target-i386/helper.c |3 ++- target-i386/kvm.c|2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/monitor.c b/monitor.c index 12a6fe2..07d2

[Qemu-devel] [PATCH qom-next 08/59] Makefile.dis: Add include/ to include path

2012-05-22 Thread Andreas Färber
Prepares for including qemu/cpu.h. Signed-off-by: Andreas Färber --- Makefile.dis |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile.dis b/Makefile.dis index 3e1fcaf..65f2662 100644 --- a/Makefile.dis +++ b/Makefile.dis @@ -9,6 +9,7 @@ include $(SRC_PATH)/rules.mak

[Qemu-devel] [PATCH v6 2/2] PCI: acpiphp: remove all functions in slot, even without ACPI _EJx

2012-05-22 Thread Bjorn Helgaas
From: Amos Kong When we add a device with acpiphp, we enumerate all functions in the slot with pci_scan_slot(), regardless of whether they have associated ACPI methods such as _EJ0. When removing the device, we previously removed only the functions with those ACPI methods. This patch makes the

[Qemu-devel] [PATCH v6 1/2] PCI: acpiphp: fix function 0 leak when disabling a slot

2012-05-22 Thread Bjorn Helgaas
From: Amos Kong Previously, we acquired two references to function 0, but only released one. [bhelgaas: split this out from "remove all functions" fix] Signed-off-by: Amos Kong Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/acpiphp_glue.c |1 + 1 files changed, 1 insertions(+), 0 de

[Qemu-devel] [PATCH v6 0/2] PCI: acpiphp: remove multifunction devices

2012-05-22 Thread Bjorn Helgaas
Here's my proposal for fixing this problem. I split out the pci_dev_put() for function 0 because it looks to me like that is actually a separate issue -- it looks like we leaked that reference even for single-function devices. I restructured the iteration over bus->devices to make it read a bit m

[Qemu-devel] [PATCH qom-next 55/59] target-mips: Pass MIPSCPU to mips_vpe_sleep()

2012-05-22 Thread Andreas Färber
Needed for moving halted field to CPUState. Signed-off-by: Andreas Färber --- target-mips/op_helper.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index bfced36..d26c9fb 100644 --- a/target-mips/op_helper.c +++

[Qemu-devel] [PATCH qom-next 34/59] cpus: Pass CPUState to qemu_cpu_kick()

2012-05-22 Thread Andreas Färber
Signed-off-by: Andreas Färber --- cpus.c | 13 + exec.c |2 +- hw/ppc.c |4 ++-- hw/ppce500_spin.c |2 +- hw/spapr_rtas.c|5 - hw/sun4m.c |2 +- hw/sun4u.c |2 +- include/qemu/cpu.h |8 k

[Qemu-devel] [PATCH qom-next 24/59] ppc: Pass PowerPCCPU to ppce500_set_irq()

2012-05-22 Thread Andreas Färber
Needed for consistency with preceding _set_irq() functions. Signed-off-by: Andreas Färber --- hw/ppc.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/ppc.c b/hw/ppc.c index fc3a65c..ada100b 100644 --- a/hw/ppc.c +++ b/hw/ppc.c @@ -365,9 +365,10 @@ void ppc4

[Qemu-devel] [PATCH qom-next 26/59] sun4m: Pass SPARCCPU to cpu_kick_irq()

2012-05-22 Thread Andreas Färber
Needed for qemu_cpu_kick(). Signed-off-by: Andreas Färber --- hw/sun4m.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/sun4m.c b/hw/sun4m.c index e9b9d9b..8846f93 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -253,8 +253,10 @@ void cpu_check_irqs(CPUSPARCState *e

[Qemu-devel] [PATCH qom-next 01/59] qemu-thread: Let qemu_thread_is_self() return bool

2012-05-22 Thread Andreas Färber
Signed-off-by: Andreas Färber --- qemu-thread-posix.c |2 +- qemu-thread-win32.c |2 +- qemu-thread.h |3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qemu-thread-posix.c b/qemu-thread-posix.c index 9e1b5fb..8fbabda 100644 --- a/qemu-thread-posix.c +++ b/qe

[Qemu-devel] [PATCH qom-next 36/59] cpus: Pass CPUState to flush_queued_work()

2012-05-22 Thread Andreas Färber
CPUArchState is no longer needed there. Signed-off-by: Andreas Färber --- cpus.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cpus.c b/cpus.c index e493218..2e7eafb 100644 --- a/cpus.c +++ b/cpus.c @@ -672,9 +672,8 @@ void run_on_cpu(CPUArchState *env, void (*func

[Qemu-devel] [PATCH qom-next 20/59] ppc: Pass PowerPCCPU to ppc6xx_set_irq()

2012-05-22 Thread Andreas Färber
Needed for moving halted field into CPUState. Signed-off-by: Andreas Färber --- hw/ppc.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/ppc.c b/hw/ppc.c index 98546de..f21aa40 100644 --- a/hw/ppc.c +++ b/hw/ppc.c @@ -75,9 +75,10 @@ void ppc_set_irq(CPUPPCSt

[Qemu-devel] [PATCH qom-next 12/59] cpu: Move stop field to CPUState

2012-05-22 Thread Andreas Färber
Change its type to bool. Signed-off-by: Andreas Färber --- cpu-defs.h |1 - cpus.c | 27 ++- include/qemu/cpu.h |2 ++ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/cpu-defs.h b/cpu-defs.h index ae95158..c93371e 100644 ---

Re: [Qemu-devel] [PATCH] exec: fix breakpoint_invalidate() breakage

2012-05-22 Thread Andreas Färber
Am 18.05.2012 11:49, schrieb TeLeMan: > This breakage was introduced by the commit "memory: make > phys_page_find() return an unadjusted". You seem to have found the origin of your problem. If you also mention the commit hash in your commit message then certain frontends (gitk, repo.or.cz) will di

[Qemu-devel] [PATCH qom-next 06/59] pc: Pass X86CPU to cpu_is_bsp()

2012-05-22 Thread Andreas Färber
Also change return type to bool. Signed-off-by: Andreas Färber --- hw/apic.h|2 +- hw/apic_common.c |2 +- hw/pc.c |6 +++--- target-i386/helper.c |2 +- target-i386/kvm.c|4 +++- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/

[Qemu-devel] [PATCH qom-next 15/59] cpus: Pass CPUState to cpu_is_stopped()

2012-05-22 Thread Andreas Färber
CPUArchState is no longer needed there. Also change the return type to bool. Signed-off-by: Andreas Färber --- cpu-all.h |1 - cpus.c |4 +--- include/qemu/cpu.h | 11 +++ target-i386/kvm.c |4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) d

[Qemu-devel] [PATCH qom-next 42/59] xtensa_pic: Pass XtensaCPU to xtensa_ccompare_cb()

2012-05-22 Thread Andreas Färber
Needed for cpu_has_work(). Signed-off-by: Andreas Färber --- hw/xtensa_pic.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/xtensa_pic.c b/hw/xtensa_pic.c index 653ded6..8b9c051 100644 --- a/hw/xtensa_pic.c +++ b/hw/xtensa_pic.c @@ -125,7 +125,8 @@ void xtensa_

Re: [Qemu-devel] buildbot failure in qemu on default_openbsd_current

2012-05-22 Thread dunrong huang
2012/5/23 Andreas Färber > Am 23.05.2012 01:09, schrieb q...@buildbot.b1-systems.de: > > The Buildbot has detected a new failure on builder > default_openbsd_current while building qemu. > > Full details are available at: > > > http://buildbot.b1-systems.de/qemu/builders/default_openbsd_current/b

Re: [Qemu-devel] [PATCH 1/3] Fix aml_name_string() to recognize block name modifiers.

2012-05-22 Thread Kevin O'Connor
On Sun, May 20, 2012 at 12:03:38PM +0300, Gleb Natapov wrote: > > Signed-off-by: Gleb Natapov The patch series looks okay to me. Let me know when the corresponding qemu patches are committed. -Kevin

Re: [Qemu-devel] buildbot failure in qemu on default_openbsd_current

2012-05-22 Thread Andreas Färber
Am 23.05.2012 01:09, schrieb q...@buildbot.b1-systems.de: > The Buildbot has detected a new failure on builder default_openbsd_current > while building qemu. > Full details are available at: > > http://buildbot.b1-systems.de/qemu/builders/default_openbsd_current/builds/271 > > Buildbot URL: htt

[Qemu-devel] buildbot failure in qemu on default_openbsd_current

2012-05-22 Thread qemu
The Buildbot has detected a new failure on builder default_openbsd_current while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_openbsd_current/builds/271 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: brad_openbsd

[Qemu-devel] buildbot failure in qemu on default_openbsd_4.9

2012-05-22 Thread qemu
The Buildbot has detected a new failure on builder default_openbsd_4.9 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_openbsd_4.9/builds/272 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: kraxel_openbsd49 Bu

Re: [Qemu-devel] [PATCH] exec: fix breakpoint_invalidate() breakage

2012-05-22 Thread TeLeMan
On Friday, May 18, 2012, TeLeMan wrote: > This breakage was introduced by the commit "memory: make > phys_page_find() return an unadjusted". > > Signed-off-by: TeLeMan > --- > exec.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/exec.c b/exec.c > index 0607c9b..ad

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Corey Bryant
On 05/22/2012 04:26 PM, Luiz Capitulino wrote: On Tue, 22 May 2012 16:02:19 -0400 Corey Bryant wrote: But there's a small problem. Today getfd commands are closely tied to the Monitor. In Anthony's development tree, the getfd commands are tied to the new QMP server's session support. Asking

Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-22 Thread Anthony Liguori
On 05/22/2012 07:03 AM, Michael S. Tsirkin wrote: On Tue, May 22, 2012 at 09:41:41PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2012-05-22 at 14:14 +0300, Michael S. Tsirkin wrote: The baseline is the laptop without kvm talking to the server. The TCP_STREAM test results are: It's not a good

Re: [Qemu-devel] [PATCH 1/1 v4] Allow machines to configure the QEMU_VERSION that's exposed via hardware

2012-05-22 Thread Peter Maydell
On 22 May 2012 22:10, Crístian Viana wrote: > Based on the following conversation: > > http://mid.gmane.org/4f69f05b.5010...@codemonkey.ws > >> Which reminds me - qemu sticks the release version in >> guest visible places like CPU version. >> This is wrong and causes windows guests to print messag

Re: [Qemu-devel] [PATCH] Add a memory barrier to DMA functions

2012-05-22 Thread Benjamin Herrenschmidt
On Tue, 2012-05-22 at 15:03 +0300, Michael S. Tsirkin wrote: > I have a deja vu. Amos sent perf results when you argued about > exactly the same issue in guest virtio. Delta was small but > measureable. At the moment I have no free time or free hardware > to redo the same work all over again. It's

[Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts

2012-05-22 Thread Stefan Weil
The local variables ret, i are only used if __linux__ is defined. Signed-off-by: Stefan Weil --- hw/virtio-blk.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index f9e1896..60750cb 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @

[Qemu-devel] [PATCH 1/1 v4] Allow machines to configure the QEMU_VERSION that's exposed via hardware

2012-05-22 Thread Crístian Viana
Based on the following conversation: http://mid.gmane.org/4f69f05b.5010...@codemonkey.ws > Which reminds me - qemu sticks the release version in > guest visible places like CPU version. > This is wrong and causes windows guests to print messages > about driver updates when you switch. > We should

[Qemu-devel] [Bug 1003054] [NEW] Socket not closed when a connection ends

2012-05-22 Thread Vincent Autefage
Public bug reported: Hi, I've noticed in the QEMU monitor that when a TCP connection between to QEMU virtual machines is closed in one side, the other side is not closed. Consequence is that the network behavior is completely messed up in case of a reconnection. For instance, we consider that we

[Qemu-devel] How to measure precise system time in qemu?

2012-05-22 Thread Zack Chen
Hill all, I'm now testing some benchmarks on qemu. I am not sure the time measured by "time" command in linux over qemu is precise, since that qemu is an emulator. So, alternatively, I have tried ssh to a native linux machine to get the correct time. However, ssh provide some overhead, and this

Re: [Qemu-devel] [PATCH v2 0/3] Event notifications for balloon driver

2012-05-22 Thread Luiz Capitulino
On Mon, 21 May 2012 17:59:50 +0100 "Daniel P. Berrange" wrote: > This series is a followup to 2 previously posted patches > > * BALLOON_CHANGE QMP event: >http://lists.nongnu.org/archive/html/qemu-devel/2012-05/msg02215.html > > * query-events QMP command: >http://lists.nongnu.org/ar

Re: [Qemu-devel] [PATCH v2 1/3] Add 'query-events' command to QMP to query async events

2012-05-22 Thread Luiz Capitulino
On Mon, 21 May 2012 17:59:51 +0100 "Daniel P. Berrange" wrote: > From: "Daniel P. Berrange" > > Sometimes it is neccessary for an application to determine > whether a particular QMP event is available, so they can > decide whether to use compatibility code instead. This > introduces a new 'quer

[Qemu-devel] [Bug 990364] Re: virtio_ioport_write: unexpected address 0x13 value 0x1

2012-05-22 Thread Vitalis
I see in properties of drivers version 51.63.103.2700 (date is 20.04.2012). ** Attachment added: "Mini052112-01.dmp" https://bugs.launchpad.net/qemu/+bug/990364/+attachment/3158501/+files/Mini052112-01.dmp -- You received this bug notification because you are a member of qemu- devel-ml, whic

Re: [Qemu-devel] [PATCH 1.1 1/2] kvm/apic: correct short memset

2012-05-22 Thread Stefan Weil
Am 10.05.2012 19:28, schrieb Jan Kiszka: On 2012-05-10 13:19, Jim Meyering wrote: From: Jim Meyering kvm_put_apic_state's attempt to clear *kapic before setting its bits cleared sizeof(void*) bytes (no more than 8) rather than the intended 1024 (KVM_APIC_REG_SIZE) bytes. Spotted by coverity

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Luiz Capitulino
On Tue, 22 May 2012 16:02:19 -0400 Corey Bryant wrote: > > But there's a small problem. Today getfd commands are closely tied to the > > Monitor. In Anthony's development tree, the getfd commands are tied to the > > new QMP server's session support. > > > > Asking you to integrate the new QMP ser

Re: [Qemu-devel] [PATCH 1.1] monitor: Fix memory leak with readline completion

2012-05-22 Thread Stefan Weil
Am 14.05.2012 21:47, schrieb Stefan Weil: Each string which is shown during readline completion in the QEMU monitor is allocated dynamically but currently never deallocated. Add the missing loop which calls g_free for the allocated strings. Signed-off-by: Stefan Weil --- readline.c |3 +++

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Corey Bryant
On 05/22/2012 03:06 PM, Luiz Capitulino wrote: On Tue, 22 May 2012 10:18:22 +0100 Stefan Hajnoczi wrote: QMP commands should be added to qapi-schema.json as described in docs/writing-qmp-commands.txt. Looks like there's consensus on dropping this patch and enhancing getfd to return the fd

[Qemu-devel] [PATCH 7/7] Maintaing number of dirty pages

2012-05-22 Thread Juan Quintela
Calculate the number of dirty pages takes a lot on hosts with lots of memory. Just maintain how many pages are dirty. Only sync bitmaps if number is small enough. Signed-off-by: Juan Quintela --- arch_init.c | 15 +-- cpu-all.h |1 + exec-obsolete.h |8

[Qemu-devel] [PATCH 5/7] Only calculate expected_time for stage 2

2012-05-22 Thread Juan Quintela
ram_save_remaining() is an expensive operation when there is a lot of memory. So we only call the function when we need it. Signed-off-by: Juan Quintela --- arch_init.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch_init.c b/arch_init.c index 988adca..76a3

Re: [Qemu-devel] [RFC PATCH 2/4] qmp/hmp: Add getfd_file monitor command

2012-05-22 Thread Luiz Capitulino
On Tue, 22 May 2012 10:18:22 +0100 Stefan Hajnoczi wrote: > QMP commands should be added to qapi-schema.json as described in > docs/writing-qmp-commands.txt. Looks like there's consensus on dropping this patch and enhancing getfd to return the fd number. This would require to first convert getfd

[Qemu-devel] [PATCH 3/7] No need to iterate if we already are over the limit

2012-05-22 Thread Juan Quintela
If buffers are full, don't iterate, just exit. Signed-off-by: Juan Quintela --- savevm.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 779bd22..6bc71b1 100644 --- a/savevm.c +++ b/savevm.c @@ -1625,6 +1625,9 @@ int qemu_savevm_state_iterate(

[Qemu-devel] [PATCH 4/7] Only TCG needs TLB handling

2012-05-22 Thread Juan Quintela
Refactor the code that is only needed for tcg to an static function. Call that only when tcg is enabled. We can't refactor to a dummy function in the kvm case, as qemu can be compiled at the same time with tcg and kvm. Signed-off-by: Juan Quintela --- exec.c | 31 +

[Qemu-devel] [PATCH 2/7] Add tracepoints for savevm section start/end

2012-05-22 Thread Juan Quintela
This allows to know how long each section takes to save. An awk script like this tells us sections that takes more that 10ms $1 ~ /savevm_state_iterate_end/ { /* Print savevm_section_end line when > 10ms duration */ if ($2 > 1) { printf("%s times_missing=%u\n",

[Qemu-devel] [PATCH 6/7] Exit loop if we have been there too long

2012-05-22 Thread Juan Quintela
cheking each 64 pages is a random magic number as good as any other. We don't want to test too many times, but on the other hand, qemu_get_clock_ns() is not so expensive either. We want to be sure that we spent less than 50ms (half of buffered_file timer), if we spent more than 100ms, all the acco

  1   2   3   >