[PATCH 3/3] sysctl: introduce a new interface to control kdump-vmcs-clear behaviour

2012-10-11 Thread Zhang Yanfei
This patch exports the variable clear_loaded_vmcs_enabled to userspace. Signed-off-by: zhangyanfei --- Documentation/sysctl/kernel.txt |8 kernel/sysctl.c | 10 ++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/Documentation/sysctl/kernel.t

[PATCH 2/3] KVM: make crash_clear_loaded_vmcss valid when kvm_intel is loaded

2012-10-11 Thread Zhang Yanfei
Signed-off-by: zhangyanfei --- arch/x86/kvm/vmx.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4ff0ab9..f6a16b2 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -41,6 +41,7 @@ #include #include #incl

[PATCH 1/3] x86/kexec: clear vmcss on all cpus if necessary

2012-10-11 Thread Zhang Yanfei
This patch provides an alternative way to clear vmcss related to guests on all cpus when doing kdump. Signed-off-by: zhangyanfei --- arch/x86/include/asm/kexec.h |3 +++ arch/x86/kernel/crash.c | 23 +++ 2 files changed, 26 insertions(+), 0 deletions(-) diff --git

[PATCH 0/3] x86: clear vmcss on all cpus when doing kdump if necessary

2012-10-11 Thread Zhang Yanfei
Currently, kdump just makes all the logical processors leave VMX operation by executing VMXOFF instruction, so any VMCSs active on the logical processors may be corrupted. But, sometimes, we need the VMCSs to debug guest images contained in the host vmcore. To prevent the corruption, we should VMCL

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-11 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Thu, Oct 11, 2012 at 10:33:31AM +1030, Rusty Russell wrote: >> OK. Well, Anthony wants qemu to be robust in this regard, so I am >> tempted to rework all the qemu drivers to handle arbitrary layouts. >> They could use a good audit anyway. > > I agree here. Still

Re: [PATCH] [SCSI] virtio-scsi: Add real 2-clause BSD license to header

2012-10-11 Thread Rusty Russell
Paolo Bonzini writes: > Il 11/10/2012 08:41, Bryan Venteicher ha scritto: >> This is analogous to commit a1b383870a made by Rusty Russell to all >> the VirtIO headers at the time. This eases the use of the header as >> is by other OSes. >> >> Signed-off-by: Bryan Venteicher > > Acked-by: Paolo

Re: Using PCI config space to indicate config location

2012-10-11 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Thu, Oct 11, 2012 at 11:48:22AM +1030, Rusty Russell wrote: >> "Michael S. Tsirkin" writes: >> > On Mon, Oct 08, 2012 at 12:51:25PM +1030, Rusty Russell wrote: >> >> Note before anyone gets confused; we were talking about using the PCI >> >> config space to indic

[PATCH qom-cpu v2 4/7] cpus: Pass CPUState to qemu_cpu_is_self()

2012-10-11 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 |6 -- include/qemu/cpu.h | 10 ++ kvm-all.c |4 +++- qemu-common

[PATCH] kvm/ftrace: change the diplaying format of vector in trace_msi_set_irq

2012-10-11 Thread Sanagi, Koki
This patch changes the way to diplay the vector in trace_msi_set_irq from %x to %u. Currently, it mismatches another output of ftrace such as kvm_msi_set_irq and kvm_inj_virq which uses %u. Signed-off-by: Koki Sanagi --- include/trace/events/kvm.h |2 +- 1 files changed, 1 insertions(+), 1

[PATCH] kvm tools: fix help output for run command

2012-10-11 Thread William Dauchy
This dummy patch remove tabs in help output. Introduced in commit: ae9ec23 kvm tools: generate command line options dynamically Signed-off-by: William Dauchy --- tools/kvm/builtin-run.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools

Re: [PATCH v6 03/16] target-i386: Add cpu object access routines for Hypervisor level.

2012-10-11 Thread Don Slutz
On 10/10/12 11:40, Andreas Färber wrote: Am 10.10.2012 17:22, schrieb Don Slutz: On 10/09/12 15:13, Don Slutz wrote: On 10/09/12 12:25, Marcelo Tosatti wrote: On Mon, Sep 24, 2012 at 10:32:05AM -0400, Don Slutz wrote: +static void x86_cpuid_set_hv_level(Object *obj, Visitor *v, void *opaque,

Re: [PATCH 3/3] KVM: Add KVM_VCPU_GET_REG_LIST/KVM_CAP_REG_LIST.

2012-10-11 Thread Rusty Russell
Marcelo Tosatti writes: > On Wed, Sep 05, 2012 at 05:28:46PM +0930, Rusty Russell wrote: ... >> +struct kvm_reg_list { >> +__u64 n; /* number of registers in reg[] */ >> +__u64 reg[0]; >> +}; >> >> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c >> index 169a001..453fe93 100644 >> -

Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler

2012-10-11 Thread Raghavendra K T
On 10/11/2012 12:57 AM, Andrew Theurer wrote: On Wed, 2012-10-10 at 23:13 +0530, Raghavendra K T wrote: On 10/10/2012 07:54 PM, Andrew Theurer wrote: I ran 'perf sched map' on the dbench workload for medium and large VMs, and I thought I would share some of the results. I think it helps to vis

[PATCH 12/12] KVM: PPC: booke: Get/set guest EPCR register using ONE_REG interface

2012-10-11 Thread Mihai Caraman
Implement ONE_REG interface for EPCR register adding KVM_REG_PPC_EPCR to the list of ONE_REG PPC supported registers. Signed-off-by: Mihai Caraman --- Documentation/virtual/kvm/api.txt |1 + arch/powerpc/include/asm/kvm.h|2 ++ arch/powerpc/kvm/booke.c | 16 +++

[PATCH 05/12] KVM: PPC: e500: Add emulation helper for getting instruction ea

2012-10-11 Thread Mihai Caraman
Add emulation helper for getting instruction ea and refactor tlb instruction emulation to use it. Signed-off-by: Mihai Caraman --- v1: use _t_ype instead of _t_arget _r_egister in tlbilx emulation. arch/powerpc/include/asm/kvm_ppc.h | 11 +++ arch/powerpc/kvm/e500.h|6

[PATCH 10/12] KVM: PPC: bookehv: Add EPCR support in mtspr/mfspr emulation

2012-10-11 Thread Mihai Caraman
Add EPCR support in booke mtspr/mfspr emulation. EPCR register is defined only for 64-bit and HV categories, we will expose it at this point only to 64-bit virtual processors running on 64-bit HV hosts. Define a reusable setter function for vcpu's EPCR. Signed-off-by: Mihai Caraman --- v1: extend

[PATCH 08/12] KVM: PPC: booke: Extend MAS2 EPN mask for 64-bit

2012-10-11 Thread Mihai Caraman
Extend MAS2 EPN mask to retain most significant bits on 64-bit hosts. Use this mask in tlb effective address accessor. Signed-off-by: Mihai Caraman --- arch/powerpc/include/asm/mmu-book3e.h |2 +- arch/powerpc/kvm/e500.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(

[PATCH 11/12] KVM: PPC: booke: Add EPCR support in sregs

2012-10-11 Thread Mihai Caraman
Add KVM_SREGS_E_64 feature and EPCR spr support in get/set sregs for 64-bit hosts. Signed-off-by: Mihai Caraman --- arch/powerpc/kvm/booke.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index e6159f5..d396374 1

[PATCH 03/12] KVM: PPC: bookehv: Remove GET_VCPU macro from exception handler

2012-10-11 Thread Mihai Caraman
GET_VCPU define will not be implemented for 64-bit for performance reasons so get rid of it also on 32-bit. Signed-off-by: Mihai Caraman --- arch/powerpc/kvm/bookehv_interrupts.S |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S

[PATCH 01/12] KVM: PPC: e500: Silence bogus GCC warning in tlb code

2012-10-11 Thread Mihai Caraman
64-bit GCC 4.5.1 warns about an uninitialized variable which was guarded by a flag. Initialize the variable to make it happy. Signed-off-by: Mihai Caraman --- arch/powerpc/kvm/e500_tlb.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch

[PATCH 04/12] KVM: PPC64: bookehv: Add support for interrupt handling

2012-10-11 Thread Mihai Caraman
Add interrupt handling support for 64-bit bookehv hosts. Unify 32 and 64 bit implementations using a common stack layout and a common execution flow starting from kvm_handler_common macro. Update documentation for 64-bit input register values. This patch only address the bolted TLB miss exception h

[PATCH 09/12] KVM: PPC: bookehv: Add guest computation mode for irq delivery

2012-10-11 Thread Mihai Caraman
When delivering guest IRQs, update MSR computation mode according to guest interrupt computation mode found in EPCR. Signed-off-by: Mihai Caraman --- v1: added intermediate msr variable. arch/powerpc/kvm/booke.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ar

[PATCH 07/12] KVM: PPC: e500: Mask MAS2 EPN high 32-bits in 32/64 tlbwe emulation

2012-10-11 Thread Mihai Caraman
Mask high 32 bits of MAS2's effective page number in tlbwe emulation for guests running in 32-bit mode. Signed-off-by: Mihai Caraman --- v1: patch splited. arch/powerpc/kvm/e500_tlb.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/po

[PATCH 02/12] KVM: PPC: booke: Fix get_tb() compile error on 64-bit

2012-10-11 Thread Mihai Caraman
Include header file for get_tb() declaration. Signed-off-by: Mihai Caraman --- arch/powerpc/kvm/booke.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 3d1f35d..7c9c389 100644 --- a/arch/powerpc/kvm/booke.c +++ b/

[PATCH 00/12] KVM: PPC: 64-bit Book3E arch support

2012-10-11 Thread Mihai Caraman
This patchset adds arch support to KVM for 64-bit Book3E PowerPC procesosrs with Embedded.Hypervisor category. The support is limited to the bolted TLB miss exception handlers version and was validated on Freescale's e5500 cores using P5020DS boards. This patchset is based on Alex G. kvm-ppc-next

[PATCH 06/12] KVM: PPC: Mask ea's high 32-bits in 32/64 instr emulation

2012-10-11 Thread Mihai Caraman
Mask high 32 bits of effective address in emulation layer for guests running in 32-bit mode. Signed-off-by: Mihai Caraman --- v1: added BOOK3S implementation. arch/powerpc/include/asm/kvm_ppc.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/inclu

Configuring virtual ethernet interfaces on KVM guests?

2012-10-11 Thread Mark Ferguson
Dear KVM Subscribers: I am new to this list and to KVM, so please bear with me. I'm in search of documentation on how to configure virtual ethernet interfaces on guest VMs. In a CentOS 6.3 environment, after successfully installing my first KVM host machine, I've configured the following virtual

Re: [PATCH v4 1/5] KVM: MMU: fix release noslot pfn

2012-10-11 Thread Marcelo Tosatti
On Thu, Oct 11, 2012 at 09:06:12PM +0800, Xiao Guangrong wrote: > On 10/10/2012 11:11 PM, Marcelo Tosatti wrote: > > > > > Why does is_error_pfn() return true for mmio spte? Its not an "error", > > after all. > > > > Please kill is_invalid_pfn and use > > > > -> is_error_pfn for checking for e

Re: [PATCH v4 5/5] KVM: MMU: introduce FNAME(prefetch_gpte)

2012-10-11 Thread Xiao Guangrong
On 10/10/2012 11:21 PM, Marcelo Tosatti wrote: >> pgprintk("%s: gpte %llx spte %p\n", __func__, (u64)gpte, spte); >> + >> +gfn = gpte_to_gfn(gpte); >> pte_access = sp->role.access & gpte_access(vcpu, gpte); >> protect_clean_gpte(&pte_access, gpte); >> -pfn = gfn_to_pfn_atomi

Re: [PATCH v4 1/5] KVM: MMU: fix release noslot pfn

2012-10-11 Thread Xiao Guangrong
On 10/10/2012 11:11 PM, Marcelo Tosatti wrote: > > Why does is_error_pfn() return true for mmio spte? Its not an "error", > after all. > > Please kill is_invalid_pfn and use > > -> is_error_pfn for checking for errors (mmio spte is not an error pfn, > its a special pfn) > > -> add explicit is

Re: [PATCH] virt: Repairs Migration_multi_host_fd test Pylint correction.

2012-10-11 Thread Lucas Meneghel Rodrigues
On 10/11/2012 09:30 AM, Jiří Župka wrote: Pylint correction makes migration_multi_host_fd test dysfunctional. Ops, I'm sorry about that, applied! pull-request: https://github.com/autotest/virt-test/pull/55 Signed-off-by: Jiří Župka --- kvm/tests/migration_multi_host_fd.py |2 +- 1 fi

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-11 Thread Michael S. Tsirkin
On Tue, Oct 09, 2012 at 04:05:18PM +0800, Asias He wrote: > vhost-blk is an in-kernel virito-blk device accelerator. > > Due to lack of proper in-kernel AIO interface, this version converts > guest's I/O request to bio and use submit_bio() to submit I/O directly. > So this version any supports raw

[Autotest][PATCH] virt: Adds multi_host_migration early boot tests.

2012-10-11 Thread Jiří Župka
pull-request: https://github.com/autotest/virt-test/pull/56 Signed-off-by: Jiří Župka --- kvm/cfg/multi-host-tests.cfg.sample |2 ++ kvm/tests/migration_multi_host_fd.py |7 +-- shared/cfg/subtests.cfg.sample | 17 +++-- virttest/env_process.py |

[PATCH] virt: Repairs Migration_multi_host_fd test Pylint correction.

2012-10-11 Thread Jiří Župka
Pylint correction makes migration_multi_host_fd test dysfunctional. pull-request: https://github.com/autotest/virt-test/pull/55 Signed-off-by: Jiří Župka --- kvm/tests/migration_multi_host_fd.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kvm/tests/migration_multi_

Re: [PATCH] [SCSI] virtio-scsi: Add real 2-clause BSD license to header

2012-10-11 Thread Paolo Bonzini
Il 11/10/2012 08:41, Bryan Venteicher ha scritto: > This is analogous to commit a1b383870a made by Rusty Russell to all > the VirtIO headers at the time. This eases the use of the header as > is by other OSes. > > Signed-off-by: Bryan Venteicher Acked-by: Paolo Bonzini > --- > include/linux/v

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 10:33:31AM +1030, Rusty Russell wrote: > Paolo Bonzini writes: > > Il 09/10/2012 06:59, Rusty Russell ha scritto: > >> Paolo Bonzini writes: > >>> Il 05/10/2012 07:43, Rusty Russell ha scritto: > That's good. But virtio_blk's scsi command is insoluble AFAICT. As I >

Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler

2012-10-11 Thread Nikunj A Dadhania
On Wed, 10 Oct 2012 09:24:55 -0500, Andrew Theurer wrote: > > Below is again 8 x 20-way VMs, but this time I tried out Nikunj's gang > scheduling patches. While I am not recommending gang scheduling, I > think it's a good data point. The performance is 3.88x the PLE result. > > https://docs.g

Re: Using PCI config space to indicate config location

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 11:48:22AM +1030, Rusty Russell wrote: > "Michael S. Tsirkin" writes: > > On Mon, Oct 08, 2012 at 12:51:25PM +1030, Rusty Russell wrote: > >> Note before anyone gets confused; we were talking about using the PCI > >> config space to indicate what BAR(s) the virtio stuff is

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-10-11 Thread Marcelo Tosatti
On Thu, Oct 11, 2012 at 12:47:39AM +, Auld, Will wrote: > Marcelo, > > You are suggesting that I: > Kvm_host.h: > > Struct kvm_x86_ops { > > ... > change > Int (*set_msr)(struct kvm_vcpu * vcpu, u32 mrs_index, u64 data); > to > Int (*set_msr)(struct kvm_vcpu * vcpu, u32 mrs_index