Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint

2014-08-11 Thread Alexander Graf
On 01.08.14 06:50, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using an illegal instruction, we trap to hypervisor via Emulation Assistance interrupt, where we check for the illegal instruction and accordingly we return to Host or

[RFC]Enlarge the dalta of TSC match window from one second to five second

2014-08-11 Thread xiexiangyou
hi, In kvm_write_tsc() func of kvm, The TSCs will be synchronized unless the time diff of creating vcpus small than one second. However, In my enviroment, stress is large, the vcpu creating time is delay, sometimes the diff time between vcpu creating is more than one second. In this case, TSCs

Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint

2014-08-11 Thread Benjamin Herrenschmidt
On Mon, 2014-08-11 at 09:26 +0200, Alexander Graf wrote: diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index da86d9b..d95014e 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c This should be book3s_emulate.c. Any reason we can't make that

Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint

2014-08-11 Thread Alexander Graf
On 11.08.14 10:51, Benjamin Herrenschmidt wrote: On Mon, 2014-08-11 at 09:26 +0200, Alexander Graf wrote: diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index da86d9b..d95014e 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c This should be

KVM call for agenda for 2014-08-19

2014-08-11 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. People have complained on the past that I don't cancel the call until the very last minute. So, what do you think that deadline for submitting topics is 23:00UTC on Monday? Call details: 15:00 CEST 13:00 UTC 09:00 EDT Every

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Alexander Graf
On 06.08.14 18:33, Mihai Caraman wrote: ePAPR represents hardware threads as cpu node properties in device tree. So with existing QEMU, hardware threads are simply exposed as vcpus with one hardware thread. The e6500 core shares TLBs between hardware threads. Without tlb write conditional

[PATCH 5/5] kvm: ensure hard lockup detection is disabled by default

2014-08-11 Thread Don Zickus
From: Ulrich Obergfell uober...@redhat.com Use watchdog_enable_hardlockup_detector() to set hard lockup detection's default value to false. It's risky to run this detection in a guest, as false positives are easy to trigger, especially if the host is overcommitted. Signed-off-by: Ulrich

[PATCH 3/5] watchdog: fix print-once on enable

2014-08-11 Thread Don Zickus
From: Ulrich Obergfell uober...@redhat.com This patch avoids printing the message 'enabled on all CPUs, ...' multiple times. For example, the issue can occur in the following scenario: 1) watchdog_nmi_enable() fails to enable PMU counters and sets cpu0_err. 2) 'echo [0|1]

[PATCH 2/5] softlockup: make detector be aware of task switch of processes hogging cpu

2014-08-11 Thread Don Zickus
From: chai wen chaiw.f...@cn.fujitsu.com For now, soft lockup detector warns once for each case of process softlockup. But the thread 'watchdog/n' may not always get the cpu at the time slot between the task switch of two processes hogging that cpu to reset soft_watchdog_warn. An example would

[PATCH 1/5] watchdog: remove unnecessary head files

2014-08-11 Thread Don Zickus
From: chai wen chaiw.f...@cn.fujitsu.com Signed-off-by: chai wen chaiw.f...@cn.fujitsu.com Signed-off-by: Don Zickus dzic...@redhat.com --- kernel/watchdog.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index c3319bd..4c2e11c

[PATCH 4/5] watchdog: control hard lockup detection default

2014-08-11 Thread Don Zickus
From: Ulrich Obergfell uober...@redhat.com In some cases we don't want hard lockup detection enabled by default. An example is when running as a guest. Introduce watchdog_enable_hardlockup_detector(bool) allowing those cases to disable hard lockup detection. This must be executed early by the

[PATCH 0/5] watchdog: various fixes

2014-08-11 Thread Don Zickus
Just respinning these patches with my sign-off. I keep forgetting which is easier for Andrew to digest (this way or just me replying with an ack). Ulrich Obergfell (3): watchdog: fix print-once on enable watchdog: control hard lockup detection default kvm: ensure hard lockup detection is

Re: [PATCH v3] arm64: fix VTTBR_BADDR_MASK

2014-08-11 Thread Joel Schopp
Thanks for the detailed review. the last case would be case 5 and the default case would be a BUG(). I agree with the case, but rather than do a BUG() I'm going to print an error and return -EINVAL. Not worth stopping the host kernel just because kvm is messed up when we can gracefully exit from

Re: KVM call for agenda for 2014-08-19

2014-08-11 Thread Joel Schopp
On 08/11/2014 08:09 AM, Juan Quintela wrote: Hi Please, send any topic that you are interested in covering. People have complained on the past that I don't cancel the call until the very last minute. So, what do you think that deadline for submitting topics is 23:00UTC on Monday? I like

[PATCH 1/1] virtio: rng: add derating factor for use by hwrng core

2014-08-11 Thread Amit Shah
The khwrngd thread is started when a hwrng device of sufficient quality is registered. The virtio-rng device is backed by the hypervisor, and we trust the hypervisor to provide real entropy. A malicious hypervisor is a scenario that's ruled out, so we are certain the quality of randomness we

Re: [PATCH v9 1/4] arm: add ARMv7 HYP API to flush VM TLBs, change generic TLB flush to support arch flush

2014-08-11 Thread Christoffer Dall
On Thu, Jul 24, 2014 at 05:56:05PM -0700, Mario Smarduch wrote: Patch adds HYP interface for global VM TLB invalidation without address parameter. Generic VM TLB flush calls ARMv7 arch defined TLB flush function. Signed-off-by: Mario Smarduch m.smard...@samsung.com ---

Re: [PATCH v9 2/4] arm: ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support)

2014-08-11 Thread Christoffer Dall
Remove the parenthesis from the subject line. On Thu, Jul 24, 2014 at 05:56:06PM -0700, Mario Smarduch wrote: Patch adds support for initial write protection VM memlsot. This patch series ^^^ stray whitespace of

Re: [PATCH v9 4/4] arm: ARMv7 dirty page logging 2nd stage page fault handling support

2014-08-11 Thread Christoffer Dall
On Thu, Jul 24, 2014 at 05:56:08PM -0700, Mario Smarduch wrote: This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and dissolves huge pages to page tables. In case migration is canceled huge pages will be used again.

Re: [PATCH v9 3/4] arm: dirty log write protect mgmt. Moved x86, armv7 to generic, set armv8 ia64 mips powerpc s390 arch specific

2014-08-11 Thread Christoffer Dall
On Thu, Jul 24, 2014 at 05:56:07PM -0700, Mario Smarduch wrote: This patch adds support for keeping track of VM dirty pages. As dirty page log is retrieved, the pages that have been written are write protected again for next write and log read. The dirty log read function is generic for

Re: [PATCH v3] arm64: fix VTTBR_BADDR_MASK

2014-08-11 Thread Christoffer Dall
On Mon, Aug 11, 2014 at 10:20:41AM -0500, Joel Schopp wrote: Thanks for the detailed review. the last case would be case 5 and the default case would be a BUG(). I agree with the case, but rather than do a BUG() I'm going to print an error and return -EINVAL. Not worth stopping the host

Re: [PATCH] vhost: Add polling mode

2014-08-11 Thread David Miller
From: Michael S. Tsirkin m...@redhat.com Date: Sun, 10 Aug 2014 21:45:59 +0200 On Sun, Aug 10, 2014 at 11:30:35AM +0300, Razya Ladelsky wrote: ... And, did your tests actually produce 100% load on both host CPUs? ... Michael, please do not quote an entire patch just to ask a one line

Re: [PATCH v3] arm64: fix VTTBR_BADDR_MASK

2014-08-11 Thread Joel Schopp
That said, I don't think this is doing the right thing. I think you want to refuse running the VM and avoid any stage-2 entried being created if this is not the case (actually, we may want to check this after set_vttbr_baddr_mask() or right aftert allocating the stage-2 pgd), because

[PATCH v4] arm64: fix VTTBR_BADDR_MASK

2014-08-11 Thread Joel Schopp
The current VTTBR_BADDR_MASK only masks 39 bits, which is broken on current systems. Rather than just add a bit it seems like a good time to also set things at run-time instead of compile time to accomodate more hardware. This patch sets TCR_EL2.PS, VTCR_EL2.T0SZ and vttbr_baddr_mask in runtime,

Re: [PATCH 1/1] virtio: rng: add derating factor for use by hwrng core

2014-08-11 Thread H. Peter Anvin
On 08/11/2014 11:49 AM, Amit Shah wrote: The khwrngd thread is started when a hwrng device of sufficient quality is registered. The virtio-rng device is backed by the hypervisor, and we trust the hypervisor to provide real entropy. A malicious hypervisor is a scenario that's ruled out, so we

[RFC PATCH] arm64: KVM: add irqfd support

2014-08-11 Thread Joel Schopp
Depends on Eric Auger's ARM: KVM: add irqfd support patch. Enable vfio of platform devices for ARM64. This patch fixes the ARM64 compile. However this patch has only been compile tested. It seemed worth sharing as it will allow us to carry both the ARM and ARM64 patches together as we do more

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int kvmppc_core_init_vm_e500mc(struct kvm *kvm) { - int lpid; + int i, lpid; - lpid = kvmppc_alloc_lpid(); - if

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Alexander Graf
Am 12.08.2014 um 01:36 schrieb Scott Wood scottw...@freescale.com: On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int kvmppc_core_init_vm_e500mc(struct kvm *kvm) { -int lpid; +

Re: [PATCH v9 1/4] arm: add ARMv7 HYP API to flush VM TLBs, change generic TLB flush to support arch flush

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:12 PM, Christoffer Dall wrote: On Thu, Jul 24, 2014 at 05:56:05PM -0700, Mario Smarduch wrote: Patch adds HYP interface for global VM TLB invalidation without address parameter. Generic VM TLB flush calls ARMv7 arch defined TLB flush function. Signed-off-by: Mario Smarduch

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Scott Wood
On Tue, 2014-08-12 at 01:53 +0200, Alexander Graf wrote: Am 12.08.2014 um 01:36 schrieb Scott Wood scottw...@freescale.com: On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int

Re: [PATCH 7/7 v3] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 12:08 +0530, Bharat Bhushan wrote: @@ -1249,6 +1284,7 @@ int kvmppc_subarch_vcpu_init(struct kvm_vcpu *vcpu) setup_timer(vcpu-arch.wdt_timer, kvmppc_watchdog_func, (unsigned long)vcpu); + kvmppc_clear_dbsr(); return 0; This could use

Re: [PATCH v9 2/4] arm: ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support)

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:12 PM, Christoffer Dall wrote: Remove the parenthesis from the subject line. Hmmm have to check this don't see it my patch file. On Thu, Jul 24, 2014 at 05:56:06PM -0700, Mario Smarduch wrote: Patch adds support for initial write protection VM memlsot. This patch series

Re: [PATCH v9 3/4] arm: dirty log write protect mgmt. Moved x86, armv7 to generic, set armv8 ia64 mips powerpc s390 arch specific

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:13 PM, Christoffer Dall wrote: On Thu, Jul 24, 2014 at 05:56:07PM -0700, Mario Smarduch wrote: This patch adds support for keeping track of VM dirty pages. As dirty page log is retrieved, the pages that have been written are write protected again for next write and log read.

Re: [PATCH v9 4/4] arm: ARMv7 dirty page logging 2nd stage page fault handling support

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:13 PM, Christoffer Dall wrote: On Thu, Jul 24, 2014 at 05:56:08PM -0700, Mario Smarduch wrote: This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and dissolves huge pages to page tables. In case migration is

Re: [PATCH v9 2/4] arm: ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support)

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:12 PM, Christoffer Dall wrote: Remove the parenthesis from the subject line. On Thu, Jul 24, 2014 at 05:56:06PM -0700, Mario Smarduch wrote: Patch adds support for initial write protection VM memlsot. This patch series ^^^

The status about vhost-net on kvm-arm?

2014-08-11 Thread Li Liu
Hi all, Is anyone there can tell the current status of vhost-net on kvm-arm? Half a year has passed from Isa Ansharullah asked this question: http://www.spinics.net/lists/kvm-arm/msg08152.html I have found two patches which have provided the kvm-arm support of eventfd and irqfd: 1) [RFC PATCH

[PATCH 1/2] KVM: fix cache stale memslot info with correct mmio generation number

2014-08-11 Thread Xiao Guangrong
We may cache the current mmio generation number and stale memslot info into spte, like this scenarioļ¼š CPU 0 CPU 1 page fault:add a new memslot read memslot and detecting its a mmio access

[PATCH 2/2] kvm: x86: fix stale mmio cache bug

2014-08-11 Thread Xiao Guangrong
From: David Matlack dmatl...@google.com The following events can lead to an incorrect KVM_EXIT_MMIO bubbling up to userspace: (1) Guest accesses gpa X without a memory slot. The gfn is cached in struct kvm_vcpu_arch (mmio_gfn). On Intel EPT-enabled hosts, KVM sets the SPTE write-execute-noread

Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint

2014-08-11 Thread Madhavan Srinivasan
On Monday 11 August 2014 02:45 PM, Alexander Graf wrote: On 11.08.14 10:51, Benjamin Herrenschmidt wrote: On Mon, 2014-08-11 at 09:26 +0200, Alexander Graf wrote: diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index da86d9b..d95014e 100644 ---

Re: [PATCH 1/1] virtio: rng: add derating factor for use by hwrng core

2014-08-11 Thread Amit Shah
On (Mon) 11 Aug 2014 [15:11:03], H. Peter Anvin wrote: On 08/11/2014 11:49 AM, Amit Shah wrote: The khwrngd thread is started when a hwrng device of sufficient quality is registered. The virtio-rng device is backed by the hypervisor, and we trust the hypervisor to provide real entropy. A

Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint

2014-08-11 Thread Alexander Graf
On 01.08.14 06:50, Madhavan Srinivasan wrote: This patch adds kernel side support for software breakpoint. Design is that, by using an illegal instruction, we trap to hypervisor via Emulation Assistance interrupt, where we check for the illegal instruction and accordingly we return to Host or

Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint

2014-08-11 Thread Benjamin Herrenschmidt
On Mon, 2014-08-11 at 09:26 +0200, Alexander Graf wrote: diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index da86d9b..d95014e 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c This should be book3s_emulate.c. Any reason we can't make that

Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint

2014-08-11 Thread Alexander Graf
On 11.08.14 10:51, Benjamin Herrenschmidt wrote: On Mon, 2014-08-11 at 09:26 +0200, Alexander Graf wrote: diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index da86d9b..d95014e 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c This should be

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Alexander Graf
On 06.08.14 18:33, Mihai Caraman wrote: ePAPR represents hardware threads as cpu node properties in device tree. So with existing QEMU, hardware threads are simply exposed as vcpus with one hardware thread. The e6500 core shares TLBs between hardware threads. Without tlb write conditional

Re: [PATCH 1/2] powerpc/booke: Restrict SPE exception handlers to e200/e500 cores

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 11:39 +0300, Mihai Caraman wrote: SPE exception handlers are now defined for 32-bit e500mc cores even though SPE unit is not present and CONFIG_SPE is undefined. Restrict SPE exception handlers to e200/e500 cores adding CONFIG_SPE_POSSIBLE and consequently guard

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int kvmppc_core_init_vm_e500mc(struct kvm *kvm) { - int lpid; + int i, lpid; - lpid = kvmppc_alloc_lpid(); - if

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Alexander Graf
Am 12.08.2014 um 01:36 schrieb Scott Wood scottw...@freescale.com: On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int kvmppc_core_init_vm_e500mc(struct kvm *kvm) { -int lpid; +

Re: [PATCH] KVM: PPC: e500mc: Add support for single threaded vcpus on e6500 core

2014-08-11 Thread Scott Wood
On Tue, 2014-08-12 at 01:53 +0200, Alexander Graf wrote: Am 12.08.2014 um 01:36 schrieb Scott Wood scottw...@freescale.com: On Wed, 2014-08-06 at 19:33 +0300, Mihai Caraman wrote: @@ -390,19 +400,30 @@ static void kvmppc_core_vcpu_free_e500mc(struct kvm_vcpu *vcpu) static int

Re: [PATCH 7/7 v3] KVM: PPC: BOOKE: Emulate debug registers and exception

2014-08-11 Thread Scott Wood
On Wed, 2014-08-06 at 12:08 +0530, Bharat Bhushan wrote: @@ -1249,6 +1284,7 @@ int kvmppc_subarch_vcpu_init(struct kvm_vcpu *vcpu) setup_timer(vcpu-arch.wdt_timer, kvmppc_watchdog_func, (unsigned long)vcpu); + kvmppc_clear_dbsr(); return 0; This could use