direct device assignment in nested VM

2014-07-03 Thread Hu Yaohui
Hi All, Is direct device assignment in nested VM supported in the latest KVM mainline now? Thanks, Yaohui -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.h

Nested EPT page fault

2014-05-05 Thread Hu Yaohui
Hi, I have one question related to nested EPT page fault. At the very start, L0 hypervisor launches L2 with an empty EPT0->2 table, building the table on-the-fly. when one L2 physical page is accessed, ept_page_fault(paging_tmpl.h) will be called to handle this fault in L0. which will first call ep

Re: KVM Nested L2 guest startup problems

2014-05-04 Thread Hu Yaohui
Hi Abel, Thanks a lot! It works now. Best Wishes, Yaohui On Sun, May 4, 2014 at 10:57 AM, Abel Gordon wrote: > On Fri, May 2, 2014 at 11:11 PM, Hu Yaohui wrote: >> >> On Fri, May 2, 2014 at 2:39 PM, Bandan Das wrote: >> > Hu Yaohui writes: >> > >> &g

Re: KVM Nested L2 guest startup problems

2014-05-02 Thread Hu Yaohui
On Fri, May 2, 2014 at 2:39 PM, Bandan Das wrote: > Hu Yaohui writes: > >> On Fri, May 2, 2014 at 11:52 AM, Paolo Bonzini wrote: >>> Il 02/05/2014 17:17, Hu Yaohui ha scritto: >>> >>>> Hi Paolo, >>>> I have tried L0 with linux kernel 3.

Re: KVM Nested L2 guest startup problems

2014-05-02 Thread Hu Yaohui
On Fri, May 2, 2014 at 11:52 AM, Paolo Bonzini wrote: > Il 02/05/2014 17:17, Hu Yaohui ha scritto: > >> Hi Paolo, >> I have tried L0 with linux kernel 3.14.2 and L1 with linux kernel 3.14.2 >> L1 QEMU qemu-1.7.0 >> L2 QEMU qemu-1.7.0. > > > Do you mea

Re: KVM Nested L2 guest startup problems

2014-05-02 Thread Hu Yaohui
for mmio generation wraparound May 2 11:12:32 o46 kernel: [38100.616392] nested_vmx_exit_handled failed vm entry 7 Thanks, Yaohui On Fri, May 2, 2014 at 5:53 AM, Paolo Bonzini wrote: > Il 02/05/2014 03:43, Hu Yaohui ha scritto: > >> Hi all, >> I have a problem running the lat

KVM Nested L2 guest startup problems

2014-05-01 Thread Hu Yaohui
Hi all, I have a problem running the latest version of kvm with nested configuration. I used to run it with kernel 3.2.2 both for L0 and L1, which works perfectly. When I change my L0 to kernel 3.10.36, L1 to kernel 3.12.10. When I start L2 guest in L1 with qemu-kvm. I get the following error from

Re: [PATCH v4 0/5] KVM: x86: flush tlb out of mmu-lock after write protection

2014-03-25 Thread Hu Yaohui
, when the entry in the page table is modified. there is no page fault will happen, how can the mmu_need_write_protect to be called to make whether sync or unsync decision? Thanks for your time! Best Wishes, Yaohui On Wed, Mar 26, 2014 at 1:07 AM, Xiao Guangrong wrote: > On 03/26/2014 12:40 PM,

Re: [PATCH v4 0/5] KVM: x86: flush tlb out of mmu-lock after write protection

2014-03-25 Thread Hu Yaohui
if someone could shed me some lights on it. Thanks for your time! Best Wishes, Yaohui On Tue, Mar 25, 2014 at 12:25 PM, Hu Yaohui wrote: > Hi Guangrong, > Since you have written in the kvm/mmu.txt. > > > unsync: > If true, then the translations in this page may not match the g

Re: [PATCH v4 0/5] KVM: x86: flush tlb out of mmu-lock after write protection

2014-03-25 Thread Hu Yaohui
Hi Guangrong, Since you have written in the kvm/mmu.txt. unsync: If true, then the translations in this page may not match the guest's translation. This is equivalent to the state of the tlb when a pte is changed but before the tlb entry is flushed. Accordingly, unsync ptes ar

How pte_mkspecial makes zero-page COW on x86 ARCH

2014-02-19 Thread Hu Yaohui
Hi All, I read the code in do_anonymous_page of the latest linux kernel. I am pretty confused how pte_mkspecial to make the zero-page COW on x86 architecture static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, pte_t *page_table, pmd

kvm mmu notifier

2014-02-09 Thread Hu Yaohui
Hi All, If the host system decides that it wants to push a given page out to swap, the host will notify the host through registered mmu notifier to inform the guest. I am wondering if there any other situations, other than swapping, which will trigger the mmu notifier to inform host page change to

Re: [PATCH] kvm: x86: Fix debug typo error in lapic

2014-01-12 Thread Hu Yaohui
Thank you Marcelo! I really appreciate your explanation. On Sat, Jan 11, 2014 at 7:27 AM, Marcelo Tosatti wrote: > On Thu, Jan 09, 2014 at 03:08:25PM -0500, Hu Yaohui wrote: >> Hi Marcelo, >> Thanks for your replying! >> I hope you have a good day! I am sorry that it's

Re: [PATCH] kvm: x86: Fix debug typo error in lapic

2014-01-09 Thread Hu Yaohui
ource codes. Thanks for your time! Best Wishes, Yaohui Hu On Thu, Jan 9, 2014 at 1:47 PM, Marcelo Tosatti wrote: > On Thu, Jan 09, 2014 at 11:28:40AM -0500, Hu Yaohui wrote: >> Hi Macelo, >> I am sorry to bother you again. In your first possibility, >> kvm_vcpu_kick sends

Re: [PATCH] kvm: x86: Fix debug typo error in lapic

2014-01-09 Thread Hu Yaohui
Thanks a lot Marcelo! On Thu, Jan 9, 2014 at 1:46 PM, Marcelo Tosatti wrote: > On Wed, Jan 08, 2014 at 06:35:00PM -0500, Hu Yaohui wrote: >> Thanks a lot Marcelo! >> >> On Wed, Jan 8, 2014 at 6:25 PM, Marcelo Tosatti wrote: >> > On Wed, Jan 08, 2014 at 06:

Emulated Guest TLB flush IPIs in qemu-kvm

2014-01-09 Thread Hu Yaohui
Hi all. If the hardware does not support APIC virtualization: kvm_vcpu_kick sends an host-IPI to the remote vcpu if that vcpu is in guest mode, a VM-exit (exit reason: external interrupt) will be triggered due to the host-IPI. Then on VM-entry (inject_pending_event) the guest-IPI is injected. If th

Re: [PATCH] kvm: x86: Fix debug typo error in lapic

2014-01-09 Thread Hu Yaohui
, what will happen? Thanks for your time! Best Wishes, Yaohui Hu On Wed, Jan 8, 2014 at 6:35 PM, Hu Yaohui wrote: > Thanks a lot Marcelo! > > On Wed, Jan 8, 2014 at 6:25 PM, Marcelo Tosatti wrote: >> On Wed, Jan 08, 2014 at 06:14:15PM -0500, Hu Yaohui wrote: >>> Hi guys, &

Re: [PATCH] kvm: x86: Fix debug typo error in lapic

2014-01-08 Thread Hu Yaohui
Thanks a lot Marcelo! On Wed, Jan 8, 2014 at 6:25 PM, Marcelo Tosatti wrote: > On Wed, Jan 08, 2014 at 06:14:15PM -0500, Hu Yaohui wrote: >> Hi guys, >> I think you should be pretty familiar with lapic. I would really >> appreciate it if someone could shed some lights on my

Re: [PATCH] kvm: x86: Fix debug typo error in lapic

2014-01-08 Thread Hu Yaohui
Hi guys, I think you should be pretty familiar with lapic. I would really appreciate it if someone could shed some lights on my problem regarding Guest TLB flush IPI. Supposed we get two vcpus 0 and 1. When vcpu#0 wants to invalidate the tlb entry on vcpu#1. An IPI will be generated by lapic on vcp