All of lore.kernel.org
 help / color / mirror / Atom feed
* nested EPT
@ 2014-01-16 16:10 duy hai nguyen
  2014-01-16 17:07 ` Jan Kiszka
  2014-01-16 17:09 ` Paolo Bonzini
  0 siblings, 2 replies; 8+ messages in thread
From: duy hai nguyen @ 2014-01-16 16:10 UTC (permalink / raw)
  To: kvm

Dear All,

I am having a problem with using nested EPT in my system: In L0
hypervisor CPUs support vmx and ept; however, L1 hypervisor's CPUs do
not have ept capability. Flag 'ept' appears in /proc/cpuinfo of L0 but
does not show in that of L1.

- 'Nested' and 'EPT' are enabled in L0:

$cat /sys/module/kvm_intel/parameters/nested
Y

$cat /sys/module/kvm_intel/parameters/ept
Y

- The libvirt xml file used in L0 has this cpu configuration:

<cpu mode='host-passthrough'/>

- The kernel version I am using for both L0 and L1 is 3.9.11



Thank you very much.

Best,
Hai

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: nested EPT
  2014-01-16 16:10 nested EPT duy hai nguyen
@ 2014-01-16 17:07 ` Jan Kiszka
  2014-01-16 17:09 ` Paolo Bonzini
  1 sibling, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2014-01-16 17:07 UTC (permalink / raw)
  To: duy hai nguyen, kvm

On 2014-01-16 17:10, duy hai nguyen wrote:
> Dear All,
> 
> I am having a problem with using nested EPT in my system: In L0
> hypervisor CPUs support vmx and ept; however, L1 hypervisor's CPUs do
> not have ept capability. Flag 'ept' appears in /proc/cpuinfo of L0 but
> does not show in that of L1.
> 
> - 'Nested' and 'EPT' are enabled in L0:
> 
> $cat /sys/module/kvm_intel/parameters/nested
> Y
> 
> $cat /sys/module/kvm_intel/parameters/ept
> Y
> 
> - The libvirt xml file used in L0 has this cpu configuration:
> 
> <cpu mode='host-passthrough'/>
> 
> - The kernel version I am using for both L0 and L1 is 3.9.11
> 

Update your host kernel (L0), nEPT got merged in 3.12.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: nested EPT
  2014-01-16 16:10 nested EPT duy hai nguyen
  2014-01-16 17:07 ` Jan Kiszka
@ 2014-01-16 17:09 ` Paolo Bonzini
  2014-01-16 18:17   ` duy hai nguyen
  1 sibling, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2014-01-16 17:09 UTC (permalink / raw)
  To: duy hai nguyen; +Cc: kvm

Il 16/01/2014 17:10, duy hai nguyen ha scritto:
> Dear All,
> 
> I am having a problem with using nested EPT in my system: In L0
> hypervisor CPUs support vmx and ept; however, L1 hypervisor's CPUs do
> not have ept capability. Flag 'ept' appears in /proc/cpuinfo of L0 but
> does not show in that of L1.
> 
> - 'Nested' and 'EPT' are enabled in L0:
> 
> $cat /sys/module/kvm_intel/parameters/nested
> Y
> 
> $cat /sys/module/kvm_intel/parameters/ept
> Y
> 
> - The libvirt xml file used in L0 has this cpu configuration:
> 
> <cpu mode='host-passthrough'/>
> 
> - The kernel version I am using for both L0 and L1 is 3.9.11

Nested EPT was added in 3.12.  You need that version in L0.

Paolo


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: nested EPT
  2014-01-16 17:09 ` Paolo Bonzini
@ 2014-01-16 18:17   ` duy hai nguyen
  2014-01-17  1:51     ` duy hai nguyen
  0 siblings, 1 reply; 8+ messages in thread
From: duy hai nguyen @ 2014-01-16 18:17 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm

Thanks, Jan and Paolo!

Great! It helps solve the problem.

Sincerely,
Hai

On Thu, Jan 16, 2014 at 12:09 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 16/01/2014 17:10, duy hai nguyen ha scritto:
>> Dear All,
>>
>> I am having a problem with using nested EPT in my system: In L0
>> hypervisor CPUs support vmx and ept; however, L1 hypervisor's CPUs do
>> not have ept capability. Flag 'ept' appears in /proc/cpuinfo of L0 but
>> does not show in that of L1.
>>
>> - 'Nested' and 'EPT' are enabled in L0:
>>
>> $cat /sys/module/kvm_intel/parameters/nested
>> Y
>>
>> $cat /sys/module/kvm_intel/parameters/ept
>> Y
>>
>> - The libvirt xml file used in L0 has this cpu configuration:
>>
>> <cpu mode='host-passthrough'/>
>>
>> - The kernel version I am using for both L0 and L1 is 3.9.11
>
> Nested EPT was added in 3.12.  You need that version in L0.
>
> Paolo
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: nested EPT
  2014-01-16 18:17   ` duy hai nguyen
@ 2014-01-17  1:51     ` duy hai nguyen
  2014-01-17 11:29       ` Kashyap Chamarthy
  0 siblings, 1 reply; 8+ messages in thread
From: duy hai nguyen @ 2014-01-17  1:51 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm

Now I can run an L2 guest (nested guest)  using the kvm kernel module
of kernel 3.12

However, I am facing a new problem when trying to build and use kvm
kernel module from git://git.kiszka.org/kvm-kmod.git: L1 (nested
hypervisor) cannot boot L2  and the graphic console of virt-manager
hangs displaying 'Booting from Hard Disk...'. L1 still runs fine.

Loading kvm_intel with 'emulate_invalid_guest_state=0' in L0 does not
solve the problem. I have also tried with different kernel versions:
3.12.0, 3.12.8 and 3.13.0 without success.

Can you give me some suggestions?

Thank you very much

Best,
Hai

On Thu, Jan 16, 2014 at 1:17 PM, duy hai nguyen <haind93@gmail.com> wrote:
> Thanks, Jan and Paolo!
>
> Great! It helps solve the problem.
>
> Sincerely,
> Hai
>
> On Thu, Jan 16, 2014 at 12:09 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> Il 16/01/2014 17:10, duy hai nguyen ha scritto:
>>> Dear All,
>>>
>>> I am having a problem with using nested EPT in my system: In L0
>>> hypervisor CPUs support vmx and ept; however, L1 hypervisor's CPUs do
>>> not have ept capability. Flag 'ept' appears in /proc/cpuinfo of L0 but
>>> does not show in that of L1.
>>>
>>> - 'Nested' and 'EPT' are enabled in L0:
>>>
>>> $cat /sys/module/kvm_intel/parameters/nested
>>> Y
>>>
>>> $cat /sys/module/kvm_intel/parameters/ept
>>> Y
>>>
>>> - The libvirt xml file used in L0 has this cpu configuration:
>>>
>>> <cpu mode='host-passthrough'/>
>>>
>>> - The kernel version I am using for both L0 and L1 is 3.9.11
>>
>> Nested EPT was added in 3.12.  You need that version in L0.
>>
>> Paolo
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: nested EPT
  2014-01-17  1:51     ` duy hai nguyen
@ 2014-01-17 11:29       ` Kashyap Chamarthy
  2014-01-17 11:40         ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Kashyap Chamarthy @ 2014-01-17 11:29 UTC (permalink / raw)
  To: duy hai nguyen; +Cc: Paolo Bonzini, kvm

On Fri, Jan 17, 2014 at 2:51 AM, duy hai nguyen <haind93@gmail.com> wrote:
> Now I can run an L2 guest (nested guest)  using the kvm kernel module
> of kernel 3.12
>
> However, I am facing a new problem when trying to build and use kvm
> kernel module from git://git.kiszka.org/kvm-kmod.git: L1 (nested
> hypervisor) cannot boot L2  and the graphic console of virt-manager
> hangs displaying 'Booting from Hard Disk...'. L1 still runs fine.
>
> Loading kvm_intel with 'emulate_invalid_guest_state=0' in L0 does not
> solve the problem. I have also tried with different kernel versions:
> 3.12.0, 3.12.8 and 3.13.0 without success.
>
> Can you give me some suggestions?

Maybe you can try without graphical managers and enable serial console
('console=ttyS0') to your Kernel command-line of L2 guest, so you can
see where it's stuck.

/kashyap

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: nested EPT
  2014-01-17 11:29       ` Kashyap Chamarthy
@ 2014-01-17 11:40         ` Jan Kiszka
  2014-01-17 18:41           ` duy hai nguyen
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2014-01-17 11:40 UTC (permalink / raw)
  To: duy hai nguyen; +Cc: Kashyap Chamarthy, Paolo Bonzini, kvm

On 2014-01-17 12:29, Kashyap Chamarthy wrote:
> On Fri, Jan 17, 2014 at 2:51 AM, duy hai nguyen <haind93@gmail.com> wrote:
>> Now I can run an L2 guest (nested guest)  using the kvm kernel module
>> of kernel 3.12
>>
>> However, I am facing a new problem when trying to build and use kvm
>> kernel module from git://git.kiszka.org/kvm-kmod.git: L1 (nested
>> hypervisor) cannot boot L2  and the graphic console of virt-manager
>> hangs displaying 'Booting from Hard Disk...'. L1 still runs fine.
>>
>> Loading kvm_intel with 'emulate_invalid_guest_state=0' in L0 does not
>> solve the problem. I have also tried with different kernel versions:
>> 3.12.0, 3.12.8 and 3.13.0 without success.
>>
>> Can you give me some suggestions?
> 
> Maybe you can try without graphical managers and enable serial console
> ('console=ttyS0') to your Kernel command-line of L2 guest, so you can
> see where it's stuck.

Tracing can also be helpful, both in L1 and L0:

http://www.linux-kvm.org/page/Tracing

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: nested EPT
  2014-01-17 11:40         ` Jan Kiszka
@ 2014-01-17 18:41           ` duy hai nguyen
  0 siblings, 0 replies; 8+ messages in thread
From: duy hai nguyen @ 2014-01-17 18:41 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Kashyap Chamarthy, Paolo Bonzini, kvm

Thank you very much.

I can launch L2 from L1 by directly using qemu-system-x86_64
name_of_image. L2 still hangs if I launch it using 'virsh' command;
libvirt shows this log:

warning : virAuditSend:135 : Failed to send audit message virt=kvm
resrc=net reason=start vm="L2"
uuid=e9549443-e63f-31b5-0692-1396736d06b4 old-net=?
new-net=52:54:00:75:c1:5b: Operation not permitted

I am using libvirt 1.1.1. Is it the above warning that causes the problem?

Best,
Hai

On Fri, Jan 17, 2014 at 6:40 AM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 2014-01-17 12:29, Kashyap Chamarthy wrote:
>> On Fri, Jan 17, 2014 at 2:51 AM, duy hai nguyen <haind93@gmail.com> wrote:
>>> Now I can run an L2 guest (nested guest)  using the kvm kernel module
>>> of kernel 3.12
>>>
>>> However, I am facing a new problem when trying to build and use kvm
>>> kernel module from git://git.kiszka.org/kvm-kmod.git: L1 (nested
>>> hypervisor) cannot boot L2  and the graphic console of virt-manager
>>> hangs displaying 'Booting from Hard Disk...'. L1 still runs fine.
>>>
>>> Loading kvm_intel with 'emulate_invalid_guest_state=0' in L0 does not
>>> solve the problem. I have also tried with different kernel versions:
>>> 3.12.0, 3.12.8 and 3.13.0 without success.
>>>
>>> Can you give me some suggestions?
>>
>> Maybe you can try without graphical managers and enable serial console
>> ('console=ttyS0') to your Kernel command-line of L2 guest, so you can
>> see where it's stuck.
>
> Tracing can also be helpful, both in L1 and L0:
>
> http://www.linux-kvm.org/page/Tracing
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RTC ITP SES-DE
> Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-17 18:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-16 16:10 nested EPT duy hai nguyen
2014-01-16 17:07 ` Jan Kiszka
2014-01-16 17:09 ` Paolo Bonzini
2014-01-16 18:17   ` duy hai nguyen
2014-01-17  1:51     ` duy hai nguyen
2014-01-17 11:29       ` Kashyap Chamarthy
2014-01-17 11:40         ` Jan Kiszka
2014-01-17 18:41           ` duy hai nguyen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.