Warning: E-mail viruses detected

2010-10-17 Thread Email Virus Scanner
Our virus detector has just been triggered by a message you sent:- To: go...@erg.abdn.ac.uk Subject: Mail System Error - Returned Mail Date: Mon Oct 18 07:27:58 2010 One or more of the attachments are on the list of unacceptable attachments for this site and will not have been delivered to t

Re: [PATCH 0/3] Launch other test during migration

2010-10-17 Thread Jason Wang
Hello guys: Any further suggestion which I need to improve those patches? I agree that there's no much tests need to be run is this way except for migration. In order to validate the function of migration, many tests need to be run in parallel with migration and this series is just aimed at this.

Re: [BUG] kvm: guest can not startup due to triple fault

2010-10-17 Thread Dave Young
On Sun, Oct 17, 2010 at 8:15 PM, Avi Kivity wrote: >  On 10/17/2010 12:14 PM, Dave Young wrote: >> >> On Sun, Oct 17, 2010 at 5:34 PM, Avi Kivity  wrote: >> >    On 10/17/2010 10:54 AM, Dave Young wrote: >> >> >> >>  linux guest can not startup normally, qemu keep rebooting. >> >> >> >>  host&    

QEMU 0.13.0 RC3 and Ubuntu 10.04

2010-10-17 Thread Mark Bidewell
I am running Ubuntu 10.04 in a VM and the mouse appears frozen. The keyboard works and CentOS work with both keyboard and mouse. Any suggestions on how to debug this? Thanks. -- Mark Bidewell http://www.linkedin.com/in/markbidewell -- To unsubscribe from this list: send the line "unsubscribe k

Scheduler notification e-mail: Order failures by reason

2010-10-17 Thread Lucas Meneghel Rodrigues
Ordering by reason makes it easy to group failures and easily identifying them. Signed-off-by: Lucas Meneghel Rodrigues --- scheduler/scheduler_models.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/scheduler/scheduler_models.py b/scheduler/scheduler_models.py index f

KVM test: Refactor Koji/Brew package download code

2010-10-17 Thread Lucas Meneghel Rodrigues
This patch creates a convenience KojiDownloader class, that downloads rpm packages from either brew or koji (the RHEL/Fedora build systems). This way other parts of the code can benefit from downloading rpm packages from the build system, such as the host kernel install code on the control file. S

Re: [PATCH v7 03/12] Retry fault before vmentry

2010-10-17 Thread Gleb Natapov
When page is swapped in it is mapped into guest memory only after guest tries to access it again and generate another fault. To save this fault we can map it immediately since we know that guest is going to access the page. Do it only when tdp is enabled for now. Shadow paging case is more complica

Re: [PATCH 19/27] nVMX: Exiting from L2 to L1

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:13 PM, Nadav Har'El wrote: This patch implements nested_vmx_vmexit(), called when the nested L2 guest exits and we want to run its L1 parent and let it handle this exit. Note that this will not necessarily be called on every L2 exit. L0 may decide to handle a particular exit on

Re: [PATCH 17/27] nVMX: Implement VMLAUNCH and VMRESUME

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:12 PM, Nadav Har'El wrote: Implement the VMLAUNCH and VMRESUME instructions, allowing a guest hypervisor to run its own guests. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 221 ++- 1 file changed, 218 insertions(+), 3 deletio

Re: [PATCH 10/27] nVMX: Implement VMCLEAR

2010-10-17 Thread Gleb Natapov
On Sun, Oct 17, 2010 at 04:12:35PM +0200, Avi Kivity wrote: > On 10/17/2010 03:37 PM, Nadav Har'El wrote: > >On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 10/27] nVMX: > >Implement VMCLEAR": > >> Is something preventing you from changing all kmap()s to kmap_atomic()s > >> (like guest

Re: [PATCH 10/27] nVMX: Implement VMCLEAR

2010-10-17 Thread Avi Kivity
On 10/17/2010 03:37 PM, Nadav Har'El wrote: On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 10/27] nVMX: Implement VMCLEAR": > Is something preventing you from changing all kmap()s to kmap_atomic()s > (like guest memory access in the mapped section)? Yes. We've discussed this before

Re: [PATCH 15/27] nVMX: Prepare vmcs02 from vmcs01 and vmcs12

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:11 PM, Nadav Har'El wrote: This patch contains code to prepare the VMCS which can be used to actually run the L2 guest, vmcs02. prepare_vmcs02 appropriately merges the information in vmcs12 (the vmcs that L1 built for L2) and in vmcs01 (the vmcs that we built for L1). VMREAD/WR

Re: [PATCH 10/27] nVMX: Implement VMCLEAR

2010-10-17 Thread Nadav Har'El
On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 10/27] nVMX: Implement VMCLEAR": > Is something preventing you from changing all kmap()s to kmap_atomic()s > (like guest memory access in the mapped section)? Yes. We've discussed this before, and I know you suggested other alternatives, b

Re: [PATCH 0/24] Nested VMX, v5

2010-10-17 Thread Avi Kivity
On 10/17/2010 02:39 PM, Nadav Har'El wrote: On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 0/24] Nested VMX, v5": > >patch. In short, try running the L0 kernel with the "nosmp" option, > What are the problems with smp? Unfortunately, there appears to be a bug which causes KVM with n

Re: [PATCH 05/27] nVMX: Introduce vmcs12: a VMCS structure for L1

2010-10-17 Thread Avi Kivity
On 10/17/2010 03:18 PM, Nadav Har'El wrote: On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 05/27] nVMX: Introduce vmcs12: a VMCS structure for L1": > >+ if(to_vmx(vcpu)->nested.current_vmptr != -1ull){ > > Missing whitespace after if and before {. Sorry about that - I forgot to

Re: [PATCH 10/27] nVMX: Implement VMCLEAR

2010-10-17 Thread Avi Kivity
On 10/17/2010 03:25 PM, Nadav Har'El wrote: On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 10/27] nVMX: Implement VMCLEAR": > >+ vmcs12 = kmap(page); > > kmap_atomic() please (better, kvm_write_guest(), but can defer that for > later) Sorry about my ignorance, but why is kmap_

Re: [PATCH 14/27] nVMX: Implement VMREAD and VMWRITE

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:10 PM, Nadav Har'El wrote: Implement the VMREAD and VMWRITE instructions. With these instructions, L1 can read and write to the VMCS it is holding. The values are read or written to the fields of the vmcs_fields structure introduced in the previous patch. + +static inline bool

Re: [PATCH 10/27] nVMX: Implement VMCLEAR

2010-10-17 Thread Nadav Har'El
On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 10/27] nVMX: Implement VMCLEAR": > >+vmcs12 = kmap(page); > > kmap_atomic() please (better, kvm_write_guest(), but can defer that for > later) Sorry about my ignorance, but why is kmap_atomic() better here than kmap()? While handling

[PATCH] alsa: fix 100% CPU load when idle w/ dmix

2010-10-17 Thread Jindřich Makovička
Hi, when using dmix as an ALSA output, the output cannot be polled and ALSA (snd_pcm_poll_descriptors) returns the event mask set to POLLIN instead. As this event mask is passed to the main loop, the select() in main_loop_wait() never waits, because the output file descriptor is never read. So, qe

Re: [PATCH 05/27] nVMX: Introduce vmcs12: a VMCS structure for L1

2010-10-17 Thread Nadav Har'El
On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 05/27] nVMX: Introduce vmcs12: a VMCS structure for L1": > >+if(to_vmx(vcpu)->nested.current_vmptr != -1ull){ > > Missing whitespace after if and before {. Sorry about that - I forgot to run checkpatch.pl on this iteration. I now fixed

Re: [PATCH 13/27] nVMX: Add VMCS fields to the vmcs12

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:10 PM, Nadav Har'El wrote: In this patch we add to vmcs12 (the VMCS that L1 keeps for L2) all the standard VMCS fields. These fields are encapsulated in a struct vmcs_fields. Later patches will enable L1 to read and write these fields using VMREAD/ VMWRITE, and they will be use

Re: [PATCH 03/27] nVMX: Implement VMXON and VMXOFF

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:05 PM, Nadav Har'El wrote: This patch allows a guest to use the VMXON and VMXOFF instructions, and emulates them accordingly. Basically this amounts to checking some prerequisites, and then remembering whether the guest has enabled or disabled VMX operation. Please add a TODO

Re: [PATCH 10/27] nVMX: Implement VMCLEAR

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:08 PM, Nadav Har'El wrote: This patch implements the VMCLEAR instruction. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) --- .before/arch/x86/kvm/vmx.c 2010-10-17 11:52:

Re: [PATCH 08/27] nVMX: Hold a vmcs02 for each vmcs12

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:07 PM, Nadav Har'El wrote: In this patch we add a list of L0 (hardware) VMCSs, which we'll use to hold a hardware VMCS for each active vmcs12 (i.e., for each L2 guest). We call each of these L0 VMCSs a "vmcs02", as it is the VMCS that L0 uses to run its nested guest L2. + +/*

Re: [PATCH 06/27] nVMX: Implement reading and writing of VMX MSRs

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:06 PM, Nadav Har'El wrote: When the guest can use VMX instructions (when the "nested" module option is on), it should also be able to read and write VMX MSRs, e.g., to query about VMX capabilities. This patch adds this support. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx

Re: [PATCH 03/27] nVMX: Implement VMXON and VMXOFF

2010-10-17 Thread Nadav Har'El
On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 03/27] nVMX: Implement VMXON and VMXOFF": > >+static int handle_vmon(struct kvm_vcpu *vcpu) >.. > >+if (!nested || > > Is the !nested case needed? Presumably cr4.vmxe will be clear is !nested. Right - I just added this as a redundant

Re: [PATCH 0/24] Nested VMX, v5

2010-10-17 Thread Nadav Har'El
On Sun, Oct 17, 2010, Avi Kivity wrote about "Re: [PATCH 0/24] Nested VMX, v5": > >patch. In short, try running the L0 kernel with the "nosmp" option, > What are the problems with smp? Unfortunately, there appears to be a bug which causes KVM with nested VMX to hang when SMP is enabled, even if yo

Re: [PATCH 05/27] nVMX: Introduce vmcs12: a VMCS structure for L1

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:06 PM, Nadav Har'El wrote: An implementation of VMX needs to define a VMCS structure. This structure is kept in guest memory, but is opaque to the guest (who can only read or write it with VMX instructions). This patch starts to define the VMCS structure which our nested VMX im

Re: [PATCH 04/27] nVMX: Allow setting the VMXE bit in CR4

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:05 PM, Nadav Har'El wrote: This patch allows the guest to enable the VMXE bit in CR4, which is a prerequisite to running VMXON. Whether to allow setting the VMXE bit now depends on the architecture (svm or vmx), so its checking has moved to kvm_x86_ops->set_cr4(). This function

Re: [PATCH 03/27] nVMX: Implement VMXON and VMXOFF

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:05 PM, Nadav Har'El wrote: This patch allows a guest to use the VMXON and VMXOFF instructions, and emulates them accordingly. Basically this amounts to checking some prerequisites, and then remembering whether the guest has enabled or disabled VMX operation. +/* + * Emulate th

Re: [BUG] kvm: guest can not startup due to triple fault

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:14 PM, Dave Young wrote: On Sun, Oct 17, 2010 at 5:34 PM, Avi Kivity wrote: >On 10/17/2010 10:54 AM, Dave Young wrote: >> >> linux guest can not startup normally, qemu keep rebooting. >> >> host&guest both use linux-2.6.36-rc8+ kernel >> >> Add a dump_stack in x86.c

Re: [PATCH 0/24] Nested VMX, v5

2010-10-17 Thread Avi Kivity
On 10/17/2010 02:03 PM, Nadav Har'El wrote: On Tue, Jun 15, 2010, Avi Kivity wrote about "Re: [PATCH 0/24] Nested VMX, v5": > I've tried to test the patches, but I see a vm-entry failure code 7 on > the very first vmentry. Guest is Fedora 12 x86-64 (2.6.32.9-70.fc12). Hi, as you can see, I p

Re: [PATCH 0/24] Nested VMX, v5

2010-10-17 Thread Nadav Har'El
On Tue, Jun 15, 2010, Avi Kivity wrote about "Re: [PATCH 0/24] Nested VMX, v5": > I've tried to test the patches, but I see a vm-entry failure code 7 on > the very first vmentry. Guest is Fedora 12 x86-64 (2.6.32.9-70.fc12). Hi, as you can see, I posted a new set of patches, which apply to the c

Re: [PATCH v7 03/12] Retry fault before vmentry

2010-10-17 Thread Avi Kivity
On 10/17/2010 12:33 PM, Avi Kivity wrote: On 10/14/2010 11:22 AM, Gleb Natapov wrote: When page is swapped in it is mapped into guest memory only after guest tries to access it again and generate another fault. To save this fault we can map it immediately since we know that guest is going to a

Re: [PATCH v7 03/12] Retry fault before vmentry

2010-10-17 Thread Avi Kivity
On 10/14/2010 11:22 AM, Gleb Natapov wrote: When page is swapped in it is mapped into guest memory only after guest tries to access it again and generate another fault. To save this fault we can map it immediately since we know that guest is going to access the page. Do it only when tdp is enabl

[PATCH 27/27] nVMX: Documentation

2010-10-17 Thread Nadav Har'El
This patch includes a brief introduction to the nested vmx feature in the Documentation/kvm directory. The document also includes a copy of the vmcs12 structure, as requested by Avi Kivity. Signed-off-by: Nadav Har'El --- Documentation/kvm/nested-vmx.txt | 237 + 1 f

[PATCH 26/27] nVMX: Miscellenous small corrections

2010-10-17 Thread Nadav Har'El
Small corrections of KVM (spelling, etc.) not directly related to nested VMX. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- .before/arch/x86/kvm/vmx.c 2010-10-17 11:52:03.0 +0200 +++ .after/arch/x86/kvm/vmx.c 2010-10-1

[PATCH 25/27] nVMX: Additional TSC-offset handling

2010-10-17 Thread Nadav Har'El
In the unlikely case that L1 does not capture MSR_IA32_TSC, L0 needs to emulate this MSR write by L2 by modifying vmcs02.tsc_offset. We also need to set vmcs12.tsc_offset, for this change to survive the next nested entry (see prepare_vmcs02()). Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c

[PATCH 24/27] nVMX: Handling of CR0.TS and #NM for Lazy FPU loading

2010-10-17 Thread Nadav Har'El
KVM's "Lazy FPU loading" means that sometimes L0 needs to set CR0.TS, even if a guest didn't set it. Moreover, L0 must also trap CR0.TS changes and NM exceptions, even if we have a guest hypervisor (L1) who didn't want these traps. And of course, conversely: If L1 wanted to trap these events, we mu

[PATCH 23/27] nVMX: Correct handling of idt vectoring info

2010-10-17 Thread Nadav Har'El
This patch adds correct handling of IDT_VECTORING_INFO_FIELD for the nested case. When a guest exits while handling an interrupt or exception, we get this information in IDT_VECTORING_INFO_FIELD in the VMCS. When L2 exits to L1, there's nothing we need to do, because L1 will see this field in vmcs

[PATCH 21/27] nVMX: Correct handling of interrupt injection

2010-10-17 Thread Nadav Har'El
When KVM wants to inject an interrupt, the guest should think a real interrupt has happened. Normally (in the non-nested case) this means checking that the guest doesn't block interrupts (and if it does, inject when it doesn't - using the "interrupt window" VMX mechanism), and setting up the approp

[PATCH 22/27] nVMX: Correct handling of exception injection

2010-10-17 Thread Nadav Har'El
Similar to the previous patch, but concerning injection of exceptions rather than external interrupts. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 26 ++ 1 file changed, 26 insertions(+) --- .before/arch/x86/kvm/vmx.c 2010-10-17 11:52:02.0 +0200 +++ .

Re: [BUG] kvm: guest can not startup due to triple fault

2010-10-17 Thread Dave Young
On Sun, Oct 17, 2010 at 5:34 PM, Avi Kivity wrote: >  On 10/17/2010 10:54 AM, Dave Young wrote: >> >> linux guest can not startup normally, qemu keep rebooting. >> >> host&  guest both use linux-2.6.36-rc8+ kernel >> >> Add a dump_stack in x86.c around EXIT_SHUTDOWN code, I got: >> [ 3924.503041]

[PATCH 20/27] nVMX: Deciding if L0 or L1 should handle an L2 exit

2010-10-17 Thread Nadav Har'El
This patch contains the logic of whether an L2 exit should be handled by L0 and then L2 should be resumed, or whether L1 should be run to handle this exit (using the nested_vmx_vmexit() function of the previous patch). The basic idea is to let L1 handle the exit only if it actually asked to trap t

[PATCH 19/27] nVMX: Exiting from L2 to L1

2010-10-17 Thread Nadav Har'El
This patch implements nested_vmx_vmexit(), called when the nested L2 guest exits and we want to run its L1 parent and let it handle this exit. Note that this will not necessarily be called on every L2 exit. L0 may decide to handle a particular exit on its own, without L1's involvement; In that cas

[PATCH 18/27] nVMX: No need for handle_vmx_insn function any more

2010-10-17 Thread Nadav Har'El
Before nested VMX support, the exit handler for a guest executing a VMX instruction (vmclear, vmlaunch, vmptrld, vmptrst, vmread, vmread, vmresume, vmwrite, vmon, vmoff), was handle_vmx_insn(). This handler simply threw a #UD exception. Now that all these exit reasons are properly handled (and emul

[PATCH 17/27] nVMX: Implement VMLAUNCH and VMRESUME

2010-10-17 Thread Nadav Har'El
Implement the VMLAUNCH and VMRESUME instructions, allowing a guest hypervisor to run its own guests. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 221 ++- 1 file changed, 218 insertions(+), 3 deletions(-) --- .before/arch/x86/kvm/vmx.c 2010-10-1

[PATCH 16/27] nVMX: Move register-syncing to a function

2010-10-17 Thread Nadav Har'El
Move code that syncs dirty RSP and RIP registers back to the VMCS, into a function. We will need to call this function from additional places in the next patch. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) --- .befor

[PATCH 15/27] nVMX: Prepare vmcs02 from vmcs01 and vmcs12

2010-10-17 Thread Nadav Har'El
This patch contains code to prepare the VMCS which can be used to actually run the L2 guest, vmcs02. prepare_vmcs02 appropriately merges the information in vmcs12 (the vmcs that L1 built for L2) and in vmcs01 (the vmcs that we built for L1). VMREAD/WRITE can only access one VMCS at a time (the "cu

[PATCH 14/27] nVMX: Implement VMREAD and VMWRITE

2010-10-17 Thread Nadav Har'El
Implement the VMREAD and VMWRITE instructions. With these instructions, L1 can read and write to the VMCS it is holding. The values are read or written to the fields of the vmcs_fields structure introduced in the previous patch. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 171 +

[PATCH 13/27] nVMX: Add VMCS fields to the vmcs12

2010-10-17 Thread Nadav Har'El
In this patch we add to vmcs12 (the VMCS that L1 keeps for L2) all the standard VMCS fields. These fields are encapsulated in a struct vmcs_fields. Later patches will enable L1 to read and write these fields using VMREAD/ VMWRITE, and they will be used during a VMLAUNCH/VMRESUME in preparing vmcs0

[PATCH 12/27] nVMX: Implement VMPTRST

2010-10-17 Thread Nadav Har'El
This patch implements the VMPTRST instruction. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 27 ++- arch/x86/kvm/x86.c |3 ++- arch/x86/kvm/x86.h |3 +++ 3 files changed, 31 insertions(+), 2 deletions(-) --- .before/arch/x86/kvm/x86.c 2010-10-17 11:52

[PATCH 11/27] nVMX: Implement VMPTRLD

2010-10-17 Thread Nadav Har'El
This patch implements the VMPTRLD instruction. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 64 ++- 1 file changed, 63 insertions(+), 1 deletion(-) --- .before/arch/x86/kvm/vmx.c 2010-10-17 11:52:01.0 +0200 +++ .after/arch/x86/kvm/vmx.c

[PATCH 10/27] nVMX: Implement VMCLEAR

2010-10-17 Thread Nadav Har'El
This patch implements the VMCLEAR instruction. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) --- .before/arch/x86/kvm/vmx.c 2010-10-17 11:52:01.0 +0200 +++ .after/arch/x86/kvm/vmx.c

[PATCH 09/27] nVMX: Success/failure of VMX instructions.

2010-10-17 Thread Nadav Har'El
VMX instructions specify success or failure by setting certain RFLAGS bits. This patch contains common functions to do this, and they will be used in the following patches which emulate the various VMX instructions. Signed-off-by: Nadav Har'El --- arch/x86/include/asm/vmx.h | 31 ++

[PATCH 08/27] nVMX: Hold a vmcs02 for each vmcs12

2010-10-17 Thread Nadav Har'El
In this patch we add a list of L0 (hardware) VMCSs, which we'll use to hold a hardware VMCS for each active vmcs12 (i.e., for each L2 guest). We call each of these L0 VMCSs a "vmcs02", as it is the VMCS that L0 uses to run its nested guest L2. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c

[PATCH 07/27] nVMX: Decoding memory operands of VMX instructions

2010-10-17 Thread Nadav Har'El
This patch includes a utility function for decoding pointer operands of VMX instructions issued by L1 (a guest hypervisor) Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 59 +++ arch/x86/kvm/x86.c |3 +- arch/x86/kvm/x86.h |3 ++ 3 files ch

[PATCH 06/27] nVMX: Implement reading and writing of VMX MSRs

2010-10-17 Thread Nadav Har'El
When the guest can use VMX instructions (when the "nested" module option is on), it should also be able to read and write VMX MSRs, e.g., to query about VMX capabilities. This patch adds this support. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 117 +

[PATCH 04/27] nVMX: Allow setting the VMXE bit in CR4

2010-10-17 Thread Nadav Har'El
This patch allows the guest to enable the VMXE bit in CR4, which is a prerequisite to running VMXON. Whether to allow setting the VMXE bit now depends on the architecture (svm or vmx), so its checking has moved to kvm_x86_ops->set_cr4(). This function now returns an int: If kvm_x86_ops->set_cr4()

[PATCH 05/27] nVMX: Introduce vmcs12: a VMCS structure for L1

2010-10-17 Thread Nadav Har'El
An implementation of VMX needs to define a VMCS structure. This structure is kept in guest memory, but is opaque to the guest (who can only read or write it with VMX instructions). This patch starts to define the VMCS structure which our nested VMX implementation will present to L1. We call it "vm

[PATCH 03/27] nVMX: Implement VMXON and VMXOFF

2010-10-17 Thread Nadav Har'El
This patch allows a guest to use the VMXON and VMXOFF instructions, and emulates them accordingly. Basically this amounts to checking some prerequisites, and then remembering whether the guest has enabled or disabled VMX operation. Signed-off-by: Nadav Har'El --- arch/x86/kvm/vmx.c | 102 ++

[PATCH 02/27] nVMX: Add VMX and SVM to list of supported cpuid features

2010-10-17 Thread Nadav Har'El
If the "nested" module option is enabled, add the "VMX" CPU feature to the list of CPU features KVM advertises with the KVM_GET_SUPPORTED_CPUID ioctl. Qemu uses this ioctl, and intersects KVM's list with its own list of desired cpu features (depending on the -cpu option given to qemu) to determine

[PATCH 01/27] nVMX: Add "nested" module option to vmx.c

2010-10-17 Thread Nadav Har'El
This patch adds a module option "nested" to vmx.c, which controls whether the guest can use VMX instructions, i.e., whether we allow nested virtualization. A similar, but separate, option already exists for the SVM module. This option currently defaults to 0, meaning that nested VMX must be explic

[PATCH 0/27] nVMX: Nested VMX, v6

2010-10-17 Thread Nadav Har'El
Hi, About three months have passed since my previous (v5) nested VMX patch set, and it can no longer be applied cleanly to the current KVM trunk. This version of the patches can be applied to the current trunk, and addresses dozens of concerns that have been raised by Avi Kivity, Marcelo Tosatti,

Re: [BUG] kvm: guest can not startup due to triple fault

2010-10-17 Thread Avi Kivity
On 10/17/2010 10:54 AM, Dave Young wrote: linux guest can not startup normally, qemu keep rebooting. host& guest both use linux-2.6.36-rc8+ kernel Add a dump_stack in x86.c around EXIT_SHUTDOWN code, I got: [ 3924.503041] Pid: 1685, comm: qemu-system-x86 Not tainted 2.6.36-rc8+ #62 [ 3924.503

Re: [patch 0/8] port qemu-kvm's MCE support (v3 resend)

2010-10-17 Thread Avi Kivity
On 10/11/2010 08:31 PM, Marcelo Tosatti wrote: Port qemu-kvm's KVM MCE (Machine Check Exception) handling to qemu. It allows qemu to propagate MCEs to the guest. v2: - rename do_qemu_ram_addr_from_host. - fix kvm_on_sigbus/kvm_on_sigbus_vcpu naming. - fix bank register restoration (Dean Nelson)

Re: [BUG] kvm: guest can not startup due to triple fault

2010-10-17 Thread Dave Young
On Sun, Oct 17, 2010 at 4:54 PM, Dave Young wrote: > linux guest can not startup normally, qemu keep rebooting. > > host & guest both use linux-2.6.36-rc8+ kernel BTW, qemu cmdline with -kernel will more likely trigger this bug > > Add a dump_stack in x86.c around EXIT_SHUTDOWN code, I got: > [

[BUG] kvm: guest can not startup due to triple fault

2010-10-17 Thread Dave Young
linux guest can not startup normally, qemu keep rebooting. host & guest both use linux-2.6.36-rc8+ kernel Add a dump_stack in x86.c around EXIT_SHUTDOWN code, I got: [ 3924.503041] Pid: 1685, comm: qemu-system-x86 Not tainted 2.6.36-rc8+ #62 [ 3924.503045] Call Trace: [ 3924.503055] [] handle_tr