[Bug 42755] New: KVM is being extremely slow on AMD Athlon64 4000+ Dual Core 2.1GHz Brisbane

2012-02-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42755 Summary: KVM is being extremely slow on AMD Athlon64 4000+ Dual Core 2.1GHz Brisbane Product: Virtualization Version: unspecified Kernel Version: 3.2.2 Platform: All

[Bug 42755] KVM is being extremely slow on AMD Athlon64 4000+ Dual Core 2.1GHz Brisbane

2012-02-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42755 --- Comment #1 from Rosen sandik...@yandex.ru 2012-02-10 08:06:25 --- in kvm guest this speed are about 2MB/s and is slow like a hell. With it booting for about 15 minutes. Same guest machine boot for about 4-7 seconds on virtualbox/vmware

[Bug 42755] KVM is being extremely slow on AMD Athlon64 4000+ Dual Core 2.1GHz Brisbane

2012-02-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42755 --- Comment #2 from Michael Tokarev m...@tls.msk.ru 2012-02-10 09:18:35 --- This is very unlikely to do with the kernel. Qemu (which you're using to run your guest -- kvm is just in-kernel module) will emulate whole machine including CPU in

[KVM-Autotest][PATCH 1/2] kvm test: Change cpuflags test call structure.

2012-02-10 Thread Jiří Župka
This changes are neccesary because people who use the test want to use this test another way. Signed-off-by: Jiří Župka jzu...@redhat.com --- client/tests/kvm/tests/cpuflags.py | 890 +--- client/virt/subtests.cfg.sample| 24 +- 2 files changed, 438

[KVM-Autotest][PATCH 2/2] kvm test: Adds new subtest to cpuflags test.

2012-02-10 Thread Jiří Župka
Adds new subtest which tests warning of qemu-kvm -cpu started with parameter check. Signed-off-by: Jiří Župka jzu...@redhat.com --- client/tests/kvm/tests/cpuflags.py | 35 +++ client/virt/subtests.cfg.sample|2 ++ client/virt/virt_utils.py |

[Bug 42755] KVM is being extremely slow on AMD Athlon64 4000+ Dual Core 2.1GHz Brisbane

2012-02-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42755 --- Comment #3 from Rosen sandik...@yandex.ru 2012-02-10 09:36:35 --- cmdline: sudo kvm -enable-kvm -cpu 'host' -smp '2,cores=2,threads=2,sockets=1' -m 512M -vga vmware -usbdevice tablet -soundhw es1370 -drive

[PATCH 1/4] kvm tool: Stop init if check_extensions failed

2012-02-10 Thread Yang Bai
If kvm__check_extensions found that some of the required KVM extention is not supported by OS, we should stop the init and free all allocated resources. Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/kvm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

[PATCH 2/4] kvm tool: unite the error handle in kvm__init

2012-02-10 Thread Yang Bai
When error occurs, just set the ret to the reason, then jump to the error handle labels. This makes the code more readable. Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/kvm.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/kvm/kvm.c

[PATCH 3/4] kvm tool: if kvm_ipc__start failed, return negative

2012-02-10 Thread Yang Bai
If kvm_ipc__start failed, it returns a negative and by checking this return value, we can ensure that it succeeds. Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/kvm-ipc.c | 38 -- tools/kvm/kvm.c |7 ++- 2 files changed, 38

[PATCH 4/4] kvm tool: ensure kvm_ipc__register_handler success

2012-02-10 Thread Yang Bai
By checking the return value from kvm_ipc__register_handler, we can ensure that it succeeds. Signed-off-by: Yang Bai hamo...@gmail.com --- tools/kvm/kvm.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index f02d5df..99bcef4

Re: x86: kvmclock: abstract save/restore sched_clock_state

2012-02-10 Thread Amit Shah
On (Thu) 09 Feb 2012 [16:13:29], Igor Mammedov wrote: Stalls are probably caused by uninitialized percpu hv_clock, with following patch I don't see stalls. Although I might be just lucky. http://git.kernel.org/?p=virt/kvm/kvm.git;a=commit;h=e2971ac7e1d186af059e088d305496c5cb47d487 Your commit

[PATCH v3 2/3] KVM: PPC: epapr: Add idle hcall support for host

2012-02-10 Thread Liu Yu
And add a new flag definition in kvm_ppc_pvinfo to indicate whether host support EV_IDLE hcall. Signed-off-by: Liu Yu yu@freescale.com --- v3: no change arch/powerpc/include/asm/kvm_para.h | 14 -- arch/powerpc/kvm/powerpc.c |8 include/linux/kvm.h

[PATCH v3 1/3] KVM: PPC: epapr: Factor out the epapr init

2012-02-10 Thread Liu Yu
from the kvm guest paravirt init code. Signed-off-by: Liu Yu yu@freescale.com --- v3: apply the epapr init for all ppc platform arch/powerpc/Kconfig|4 +++ arch/powerpc/include/asm/epapr_hcalls.h |8 + arch/powerpc/kernel/Makefile|1 +

[PATCH v3 3/3] KVM: PPC: epapr: install ev_idle hcall for e500 guest

2012-02-10 Thread Liu Yu
If the guest hypervisor node contains has-idle property. Signed-off-by: Liu Yu yu@freescale.com --- v3: 1. apply the hcall idle for all ppc platform 2. add a loop to prevent spurious wakeups arch/powerpc/kernel/Makefile |2 +- arch/powerpc/kernel/epapr.S | 47

Re: WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43()

2012-02-10 Thread Srivatsa S. Bhat
Adding Suresh and Peter to Cc. On 02/10/2012 01:16 AM, Sasha Levin wrote: On Wed, Feb 8, 2012 at 7:59 PM, Josh Boyer jwbo...@gmail.com wrote: On Wed, Feb 8, 2012 at 8:31 PM, Sasha Levin levinsasha...@gmail.com wrote: Hi all, I got the following warning when shutting down a KVM guest with a

Re: performance trouble

2012-02-10 Thread David Cure
hello, Le Sun, Feb 05, 2012 at 11:38:34AM +0200, Avi Kivity ecrivait : Please post a trace as documented in http://www.linux-kvm.org/page/Tracing. I made the trace : started just before the slow function launch and stoped just after. I start only one VM with 2

Re: x86: kvmclock: abstract save/restore sched_clock_state

2012-02-10 Thread Igor Mammedov
Could you send me your .config and commit id of kernel you are using? - Original Message - From: Amit Shah amit.s...@redhat.com To: Igor Mammedov imamm...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com, kvm@vger.kernel.org, t...@linutronix.de, mi...@redhat.com, h...@zytor.com,

Re: x86: kvmclock: abstract save/restore sched_clock_state

2012-02-10 Thread Amit Shah
On (Fri) 10 Feb 2012 [05:11:00], Igor Mammedov wrote: Could you send me your .config and commit id of kernel you are using? Kernel's based on bd3ce7d57c380af110c86d19e256115d0e7053ca plus your commit + Marcelo's patch. config is attached below. # # Automatically generated file; DO NOT EDIT. #

QEMU applying for Google Summer of Code 2012

2012-02-10 Thread Stefan Hajnoczi
This year's Google Summer of Code has been announced: http://www.google-melange.com/gsoc/events/google/gsoc2012 For those who haven't heard of GSoC before, it funds university students to work on open source projects during the summer. Organizations, such as QEMU, can participate to attract

Re: [libvirt] QEMU applying for Google Summer of Code 2012

2012-02-10 Thread Daniel P. Berrange
On Fri, Feb 10, 2012 at 10:30:24AM +, Stefan Hajnoczi wrote: This year's Google Summer of Code has been announced: http://www.google-melange.com/gsoc/events/google/gsoc2012 For those who haven't heard of GSoC before, it funds university students to work on open source projects during

Re: [PATCH v5 0/3] virtio-scsi driver

2012-02-10 Thread Stefan Hajnoczi
On Sun, Feb 5, 2012 at 11:15 AM, Paolo Bonzini pbonz...@redhat.com wrote: This is the first implementation of the virtio-scsi driver, a virtual HBA that will be supported by KVM.  It implements a subset of the spec, in particular it does not implement asynchronous notifications for either LUN

Re: [libvirt] QEMU applying for Google Summer of Code 2012

2012-02-10 Thread Stefan Hajnoczi
On Fri, Feb 10, 2012 at 10:59 AM, Daniel P. Berrange berra...@redhat.com wrote: On Fri, Feb 10, 2012 at 10:30:24AM +, Stefan Hajnoczi wrote: This year's Google Summer of Code has been announced: http://www.google-melange.com/gsoc/events/google/gsoc2012 For those who haven't heard of GSoC

Re: [PATCH 1/4] kvm tool: Stop init if check_extensions failed

2012-02-10 Thread Pekka Enberg
On Fri, Feb 10, 2012 at 11:55 AM, Yang Bai hamo...@gmail.com wrote: If kvm__check_extensions found that some of the required KVM extention is not supported by OS, we should stop the init and free all allocated resources. Signed-off-by: Yang Bai hamo...@gmail.com Applied all four patches,

Re: x86: kvmclock: abstract save/restore sched_clock_state

2012-02-10 Thread Marcelo Tosatti
On Fri, Feb 10, 2012 at 03:32:11PM +0530, Amit Shah wrote: On (Thu) 09 Feb 2012 [16:13:29], Igor Mammedov wrote: Stalls are probably caused by uninitialized percpu hv_clock, with following patch I don't see stalls. Although I might be just lucky.

Re: x86: kvmclock: abstract save/restore sched_clock_state

2012-02-10 Thread Marcelo Tosatti
On Fri, Feb 10, 2012 at 10:32:16AM -0200, Marcelo Tosatti wrote: On Fri, Feb 10, 2012 at 03:32:11PM +0530, Amit Shah wrote: On (Thu) 09 Feb 2012 [16:13:29], Igor Mammedov wrote: Stalls are probably caused by uninitialized percpu hv_clock, with following patch I don't see stalls.

Re: x86: kvmclock: abstract save/restore sched_clock_state

2012-02-10 Thread Igor Mammedov
On 02/10/2012 01:33 PM, Marcelo Tosatti wrote: On Fri, Feb 10, 2012 at 10:32:16AM -0200, Marcelo Tosatti wrote: On Fri, Feb 10, 2012 at 03:32:11PM +0530, Amit Shah wrote: On (Thu) 09 Feb 2012 [16:13:29], Igor Mammedov wrote: Stalls are probably caused by uninitialized percpu hv_clock, with

Re: [RFC] need to improve slot creation/destruction? -- Re: [RFC][PATCH] srcu: Implement call_srcu()

2012-02-10 Thread Takuya Yoshikawa
Avi Kivity a...@redhat.com wrote: On 02/09/2012 04:23 PM, Avi Kivity wrote: BTW do we really need fast slot creation/destruction? Not really, but it's good to have infrastructure that copes with different workloads. If the patches keep the code simple I think it's a good thing to

Re: x86: kvmclock: abstract save/restore sched_clock_state

2012-02-10 Thread Amit Shah
On (Fri) 10 Feb 2012 [10:32:16], Marcelo Tosatti wrote: On Fri, Feb 10, 2012 at 03:32:11PM +0530, Amit Shah wrote: On (Thu) 09 Feb 2012 [16:13:29], Igor Mammedov wrote: Stalls are probably caused by uninitialized percpu hv_clock, with following patch I don't see stalls. Although I

Re: [RFC] need to improve slot creation/destruction? -- Re: [RFC][PATCH] srcu: Implement call_srcu()

2012-02-10 Thread Takuya Yoshikawa
Avi Kivity a...@redhat.com wrote: 2. When we create(and shift?) a memory slot, we call kvm_arch_flush_shadow() to clear all mmio sptes, again not restricted to that slot. /* * If the new memory slot is created, we need to clear all * mmio sptes. */ if

Re: [RFC PATCH v0 1/2] net: bridge: propagate FDB table into hardware

2012-02-10 Thread Roopa Prabhu
On 2/9/12 9:36 AM, John Fastabend john.r.fastab...@intel.com wrote: On 2/8/2012 8:36 PM, Stephen Hemminger wrote: On Wed, 08 Feb 2012 19:22:06 -0800 John Fastabend john.r.fastab...@intel.com wrote: Propagate software FDB table into hardware uc, mc lists when the NETIF_F_HW_FDB is set.

virtio-blk performance regression and qemu-kvm

2012-02-10 Thread Dongsu Park
Hi, Recently I observed performance regression regarding virtio-blk, especially different IO bandwidths between qemu-kvm 0.14.1 and 1.0. So I want to share the benchmark results, and ask you what the reason would be. 1. Test condition - On host, ramdisk-backed block device (/dev/ram0) -

Re: [RFC PATCH v0 1/2] net: bridge: propagate FDB table into hardware

2012-02-10 Thread jamal
Hi John, I went backwards to summarize at the top after going through your email. TL;DR version 0.1: you provide a good use case where it makes sense to do things in the kernel. IMO, you could make the same arguement if your embedded switch could do ACLs, IPv4 forwarding etc. And the kernel

Re: [PATCH 2/4 V13] Add functions to check if the host has stopped the vm

2012-02-10 Thread Marcelo Tosatti
On Wed, Feb 08, 2012 at 10:07:44AM -0500, Eric B Munson wrote: When a host stops or suspends a VM it will set a flag to show this. The watchdog will use these functions to determine if a softlockup is real, or the result of a suspended VM. Signed-off-by: Eric B Munson emun...@mgebm.net

Re: [RFC PATCH v0 1/2] net: bridge: propagate FDB table into hardware

2012-02-10 Thread Stephen Hemminger
On Fri, 10 Feb 2012 10:18:31 -0500 jamal h...@cyberus.ca wrote: Hi John, I went backwards to summarize at the top after going through your email. TL;DR version 0.1: you provide a good use case where it makes sense to do things in the kernel. IMO, you could make the same arguement if

Re: [RFC] need to improve slot creation/destruction? -- Re: [RFC][PATCH] srcu: Implement call_srcu()

2012-02-10 Thread Marcelo Tosatti
On Thu, Feb 09, 2012 at 04:25:36PM +0200, Avi Kivity wrote: On 02/08/2012 08:45 PM, Marcelo Tosatti wrote: BTW do we really need fast slot creation/destruction? At the moment yes. Boot a RHEL/Fedora installation disk (or any other guest which uses SYSLINUX splash screen) and you will

Re: [RFC] need to improve slot creation/destruction? -- Re: [RFC][PATCH] srcu: Implement call_srcu()

2012-02-10 Thread Marcelo Tosatti
On Fri, Feb 10, 2012 at 10:08:12PM +0900, Takuya Yoshikawa wrote: Avi Kivity a...@redhat.com wrote: On 02/09/2012 04:23 PM, Avi Kivity wrote: BTW do we really need fast slot creation/destruction? Not really, but it's good to have infrastructure that copes with different

[PATCH v3] KVM: Allow host IRQ sharing for assigned PCI 2.3 devices

2012-02-10 Thread Jan Kiszka
PCI 2.3 allows to generically disable IRQ sources at device level. This enables us to share legacy IRQs of such devices with other host devices when passing them to a guest. The new IRQ sharing feature introduced here is optional, user space has to request it explicitly. Moreover, user space can

[PATCH v2 8/8] kvmvapic: Use optionrom helpers

2012-02-10 Thread Jan Kiszka
Use OPTION_ROM_START/END from the common header file, add comment to init code. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- pc-bios/optionrom/kvmvapic.S | 18 -- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pc-bios/optionrom/kvmvapic.S

[PATCH v2 2/8] Allow to use pause_all_vcpus from VCPU context

2012-02-10 Thread Jan Kiszka
In order to perform critical manipulations on the VM state in the context of a VCPU, specifically code patching, stopping and resuming of all VCPUs may be necessary. resume_all_vcpus is already compatible, now enable pause_all_vcpus for this use case by stopping the calling context before starting

[PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests

2012-02-10 Thread Jan Kiszka
This enables acceleration for MMIO-based TPR registers accesses of 32-bit Windows guest systems. It is mostly useful with KVM enabled, either on older Intel CPUs (without flexpriority feature, can also be manually disabled for testing) or any current AMD processor. The approach introduced here is

[PATCH v2 3/8] target-i386: Add infrastructure for reporting TPR MMIO accesses

2012-02-10 Thread Jan Kiszka
This will allow the APIC core to file a TPR access report. Depending on the accelerator and kernel irqchip mode, it will either be delivered right away or queued for later reporting. In TCG mode, we can restart the triggering instruction and can therefore forward the event directly. KVM does not

[PATCH v2 0/8] uq/master: TPR access optimization for Windows guests

2012-02-10 Thread Jan Kiszka
Here is v2 of the TPR access optimization. Changes: - plug race between patching and running VCPUs accessing the same TPR instruction by stopping VCPUs during patch process - realized forward/backward check in evaluate_tpr_instruction via a table but kept patch_instruction as is (too much

[PATCH v2 6/8] kvmvapic: Simplify mp/up_set_tpr

2012-02-10 Thread Jan Kiszka
The CH registers is only written, never read. So we can remove these operations and, in case of up_set_tpr, also the ECX push/pop. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- pc-bios/optionrom/kvmvapic.S |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git

[PATCH v2 4/8] kvmvapic: Add option ROM

2012-02-10 Thread Jan Kiszka
This imports and builds the original VAPIC option ROM of qemu-kvm. Its interaction with QEMU is described in the commit that introduces the corresponding device model. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- .gitignore |1 + Makefile |2

[PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-10 Thread Jan Kiszka
As we have thread-local cpu_single_env now and KVM uses exactly one thread per VCPU, we can drop the cpu_single_env updates from the loop and initialize this variable only once during setup. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpus.c|1 + kvm-all.c |5 - 2 files

[PATCH v2 7/8] optionsrom: Reserve space for checksum

2012-02-10 Thread Jan Kiszka
Always add a byte before the final 512-bytes alignment to reserve the space for the ROM checksum. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- pc-bios/optionrom/optionrom.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/pc-bios/optionrom/optionrom.h

Re: [PATCH v3 1/3] KVM: PPC: epapr: Factor out the epapr init

2012-02-10 Thread Scott Wood
On 02/10/2012 04:02 AM, Liu Yu wrote: from the kvm guest paravirt init code. Signed-off-by: Liu Yu yu@freescale.com --- v3: apply the epapr init for all ppc platform arch/powerpc/Kconfig|4 +++ arch/powerpc/include/asm/epapr_hcalls.h |8 +

Re: [PATCH v3 3/3] KVM: PPC: epapr: install ev_idle hcall for e500 guest

2012-02-10 Thread Scott Wood
On 02/10/2012 04:02 AM, Liu Yu wrote: +_GLOBAL(epapr_ev_idle) +epapr_ev_idle: +#ifdef CONFIG_E500 + rlwinm r3,r1,0,0,31-THREAD_SHIFT /* current thread_info */ + lwz r4,TI_LOCAL_FLAGS(r3) /* set napping bit */ + ori r4,r4,_TLF_NAPPING /* so when we take an

Re: WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43()

2012-02-10 Thread Peter Zijlstra
On Fri, 2012-02-10 at 15:36 +0530, Srivatsa S. Bhat wrote: [ 32.448626] [ cut here ] [ 32.449160] WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43() [ 32.449621] Pid: 1, comm: init_stage2 Not tainted 3.2.0+ #14 [ 32.449621] Call

Re: WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43()

2012-02-10 Thread Peter Zijlstra
On Fri, 2012-02-10 at 19:58 +0100, Peter Zijlstra wrote: OK, so a 'modern' kernel does it slightly different and I've no idea what exactly goes wrong in your vintage version. But I can see the current stuff going at it all wrong. What seems to happen is that native_nmi_stop_other_cpus() NMI

Re: WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43()

2012-02-10 Thread Don Zickus
On Fri, Feb 10, 2012 at 08:03:53PM +0100, Peter Zijlstra wrote: On Fri, 2012-02-10 at 19:58 +0100, Peter Zijlstra wrote: OK, so a 'modern' kernel does it slightly different and I've no idea what exactly goes wrong in your vintage version. But I can see the current stuff going at it all

Re: WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43()

2012-02-10 Thread Peter Zijlstra
On Fri, 2012-02-10 at 15:02 -0500, Don Zickus wrote: I also ran into the same problem you did and hacked up another patch that checked a global atomic variable that let the system know we were shutting down and not to do the WARN_ON (the global is already created for the NMI case now).

Re: WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43()

2012-02-10 Thread Don Zickus
On Fri, Feb 10, 2012 at 09:18:41PM +0100, Peter Zijlstra wrote: On Fri, 2012-02-10 at 15:02 -0500, Don Zickus wrote: I also ran into the same problem you did and hacked up another patch that checked a global atomic variable that let the system know we were shutting down and not to do the

Re: WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43()

2012-02-10 Thread Peter Zijlstra
On Fri, 2012-02-10 at 15:31 -0500, Don Zickus wrote: So my second patch which I will eventually post will just skip the WARN_ON if the system is going down. Not sure if that is the proper way to address this problem or change all of the stop_this_cpu code to use a different bitmask than the

Re: x86: kvmclock: abstract save/restore sched_clock_state

2012-02-10 Thread Igor Mammedov
I've to revoke my ack and say NAK to this patch. Patch itself is in right direction but clock restore happens too late. With patch I've used to hunt down overflow for cpu hotplug (maybe it will be better for it to be in kernel, which will help to detect overflow problem without spending a lot

Re: WARNING: at arch/x86/kernel/smp.c:119 native_smp_send_reschedule+0x25/0x43()

2012-02-10 Thread Don Zickus
On Fri, Feb 10, 2012 at 09:36:03PM +0100, Peter Zijlstra wrote: On Fri, 2012-02-10 at 15:31 -0500, Don Zickus wrote: So my second patch which I will eventually post will just skip the WARN_ON if the system is going down. Not sure if that is the proper way to address this problem or change

[PATCH RFC v2 1/3] KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER

2012-02-10 Thread Marc Zyngier
In order to avoid compilation failure when KVM is not compiled in, guard the mmu_notifier specific sections with both CONFIG_MMU_NOTIFIER and KVM_ARCH_WANT_MMU_NOTIFIER, like it is being done in the rest of the KVM code. Signed-off-by: Marc Zyngier marc.zyng...@arm.com ---

[PATCH RFC v2 2/3] ARM: KVM: mark the end of the HYP mode code with __kvm_hyp_code_end

2012-02-10 Thread Marc Zyngier
Use __kvm_hyp_code_end to mark the end of the main HYP code instead of __kvm_vcpu_run_end. It's a bit cleaner as we're about to add more code to that section. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm/include/asm/kvm_asm.h |3 ++- arch/arm/kvm/arm.c |4

[PATCH RFC v2 3/3] ARM: KVM: Add support for MMU notifiers

2012-02-10 Thread Marc Zyngier
Add the necessary infrastructure to handle MMU notifiers on KVM/ARM. As we don't have shadow page tables, the implementation is actually very simple. The only supported operation is kvm_unmap_hva(), where we remove the HVA from the 2nd stage translation. All other hooks are NOPs. Signed-off-by:

Re: [PATCH RFC v2 2/3] ARM: KVM: mark the end of the HYP mode code with __kvm_hyp_code_end

2012-02-10 Thread Christoffer Dall
On Fri, Feb 10, 2012 at 2:22 PM, Marc Zyngier marc.zyng...@arm.com wrote: Use __kvm_hyp_code_end to mark the end of the main HYP code instead of __kvm_vcpu_run_end. It's a bit cleaner as we're about to add more code to that section. this is good, but should we not rename the beginning of the

Re: [PATCH RFC v2 3/3] ARM: KVM: Add support for MMU notifiers

2012-02-10 Thread Christoffer Dall
On Fri, Feb 10, 2012 at 2:22 PM, Marc Zyngier marc.zyng...@arm.com wrote: Add the necessary infrastructure to handle MMU notifiers on KVM/ARM. As we don't have shadow page tables, the implementation is actually very simple. The only supported operation is kvm_unmap_hva(), where we remove the

[PATCH v3 1/3] KVM: PPC: epapr: Factor out the epapr init

2012-02-10 Thread Liu Yu
from the kvm guest paravirt init code. Signed-off-by: Liu Yu yu@freescale.com --- v3: apply the epapr init for all ppc platform arch/powerpc/Kconfig|4 +++ arch/powerpc/include/asm/epapr_hcalls.h |8 + arch/powerpc/kernel/Makefile|1 +

[PATCH v3 3/3] KVM: PPC: epapr: install ev_idle hcall for e500 guest

2012-02-10 Thread Liu Yu
If the guest hypervisor node contains has-idle property. Signed-off-by: Liu Yu yu@freescale.com --- v3: 1. apply the hcall idle for all ppc platform 2. add a loop to prevent spurious wakeups arch/powerpc/kernel/Makefile |2 +- arch/powerpc/kernel/epapr.S | 47

Re: [PATCH v3 3/3] KVM: PPC: epapr: install ev_idle hcall for e500 guest

2012-02-10 Thread Scott Wood
On 02/10/2012 04:02 AM, Liu Yu wrote: +_GLOBAL(epapr_ev_idle) +epapr_ev_idle: +#ifdef CONFIG_E500 + rlwinm r3,r1,0,0,31-THREAD_SHIFT /* current thread_info */ + lwz r4,TI_LOCAL_FLAGS(r3) /* set napping bit */ + ori r4,r4,_TLF_NAPPING /* so when we take an