All of lore.kernel.org
 help / color / mirror / Atom feed
* Some questions about processing page fault in kvm
@ 2010-07-23 15:02 Gu, Zhongshu
  2010-07-25  8:52 ` Avi Kivity
  0 siblings, 1 reply; 7+ messages in thread
From: Gu, Zhongshu @ 2010-07-23 15:02 UTC (permalink / raw)
  To: kvm

Hi all:
        I have some confusion when looking at the code to process page
fault. If there is vm exit caused by page fault, what is the timing of
this vm exit? In my understanding that it will vm exit before entering
the page fault handler in the kernel. But when it enters vm again,
will it enter the guest kernel's page fault handler again?
       And another problem is that prefetch_page in paging_tmpl.h is
used to optimize kvm to reduce the number of vm exit. Is there any
possibility to bypass the guest page fault? I mean all the page faults
are delegated to kvm to process, no matter it is the page fault of
guest page table or shadow page table.

Thanks

-- 
Zhongshu

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

* Re: Some questions about processing page fault in kvm
  2010-07-23 15:02 Some questions about processing page fault in kvm Gu, Zhongshu
@ 2010-07-25  8:52 ` Avi Kivity
  2010-07-25 16:31   ` Gu, Zhongshu
  0 siblings, 1 reply; 7+ messages in thread
From: Avi Kivity @ 2010-07-25  8:52 UTC (permalink / raw)
  To: Gu, Zhongshu; +Cc: kvm

  On 07/23/2010 06:02 PM, Gu, Zhongshu wrote:
> Hi all:
>          I have some confusion when looking at the code to process page
> fault. If there is vm exit caused by page fault, what is the timing of
> this vm exit? In my understanding that it will vm exit before entering
> the page fault handler in the kernel.

Yes.  Some page faults are delivered directly to the guest, though.  
These are all guest faults with ept or npt enabled, and some not-present 
faults on Intel in shadow mode.

>   But when it enters vm again,
> will it enter the guest kernel's page fault handler again?

What do you mean "again"?

It will enter the guest fault handler if it is a guest fault.

>         And another problem is that prefetch_page in paging_tmpl.h is
> used to optimize kvm to reduce the number of vm exit. Is there any
> possibility to bypass the guest page fault? I mean all the page faults
> are delegated to kvm to process, no matter it is the page fault of
> guest page table or shadow page table.

Not all.  See shadow_notrap_nonpresent_pte.

-- 
error compiling committee.c: too many arguments to function


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

* Re: Some questions about processing page fault in kvm
  2010-07-25  8:52 ` Avi Kivity
@ 2010-07-25 16:31   ` Gu, Zhongshu
  2010-07-25 18:16     ` Avi Kivity
  2010-08-04 23:12     ` Virtualization technology conferences/tutorials/courses to attend?Wednesday, August 4, 2010 6:59 PM Anjali Kulkarni
  0 siblings, 2 replies; 7+ messages in thread
From: Gu, Zhongshu @ 2010-07-25 16:31 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

On Sun, Jul 25, 2010 at 4:52 AM, Avi Kivity <avi@redhat.com> wrote:
>  On 07/23/2010 06:02 PM, Gu, Zhongshu wrote:
>>
>> Hi all:
>>         I have some confusion when looking at the code to process page
>> fault. If there is vm exit caused by page fault, what is the timing of
>> this vm exit? In my understanding that it will vm exit before entering
>> the page fault handler in the kernel.
>
> Yes.  Some page faults are delivered directly to the guest, though.  These
> are all guest faults with ept or npt enabled, and some not-present faults on
> Intel in shadow mode.
So if i set the module parameter of bypass_guest_pf to 0, all the page
faults will cause vm exit. Is that right?

>
>>  But when it enters vm again,
>> will it enter the guest kernel's page fault handler again?
>
> What do you mean "again"?
>
> It will enter the guest fault handler if it is a guest fault.
if there is guest fault, it means that the gpte is non-present. If the
bypass_guest_pf is set to 1, there will be no possibility for this
situation.
>
>>        And another problem is that prefetch_page in paging_tmpl.h is
>> used to optimize kvm to reduce the number of vm exit. Is there any
>> possibility to bypass the guest page fault? I mean all the page faults
>> are delegated to kvm to process, no matter it is the page fault of
>> guest page table or shadow page table.
>
> Not all.  See shadow_notrap_nonpresent_pte.
>

> --
> error compiling committee.c: too many arguments to function
>
>



-- 
Zhongshu

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

* Re: Some questions about processing page fault in kvm
  2010-07-25 16:31   ` Gu, Zhongshu
@ 2010-07-25 18:16     ` Avi Kivity
  2010-08-04 23:12     ` Virtualization technology conferences/tutorials/courses to attend?Wednesday, August 4, 2010 6:59 PM Anjali Kulkarni
  1 sibling, 0 replies; 7+ messages in thread
From: Avi Kivity @ 2010-07-25 18:16 UTC (permalink / raw)
  To: Gu, Zhongshu; +Cc: kvm

  On 07/25/2010 07:31 PM, Gu, Zhongshu wrote:
>
>> Yes.  Some page faults are delivered directly to the guest, though.  These
>> are all guest faults with ept or npt enabled, and some not-present faults on
>> Intel in shadow mode.
> So if i set the module parameter of bypass_guest_pf to 0, all the page
> faults will cause vm exit. Is that right?

It is (in addition, make sure ept=0).

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


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

* Virtualization technology conferences/tutorials/courses to attend?Wednesday, August 4, 2010 6:59 PM
  2010-07-25 16:31   ` Gu, Zhongshu
  2010-07-25 18:16     ` Avi Kivity
@ 2010-08-04 23:12     ` Anjali Kulkarni
  2010-08-04 23:17       ` Virtualization technology conferences/tutorials/courses to attend? Anjali Kulkarni
  1 sibling, 1 reply; 7+ messages in thread
From: Anjali Kulkarni @ 2010-08-04 23:12 UTC (permalink / raw)
  To: Anjali Kulkarni; +Cc: kvm

Hi,

I am new to Virtualization, so can someone point me to 
conferences/tutorials/courses that I can attend related to Linux KVM,
para-virtualization, device driver virtualization, hardware assisted
virtualization etc.? Even documents pointers will be much useful.

Thanks!
Anjali



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

* Virtualization technology conferences/tutorials/courses to attend?
  2010-08-04 23:12     ` Virtualization technology conferences/tutorials/courses to attend?Wednesday, August 4, 2010 6:59 PM Anjali Kulkarni
@ 2010-08-04 23:17       ` Anjali Kulkarni
  2010-08-05  2:26         ` Anthony Liguori
  0 siblings, 1 reply; 7+ messages in thread
From: Anjali Kulkarni @ 2010-08-04 23:17 UTC (permalink / raw)
  To: kvm

Hi,

I am new to Virtualization, so can someone point me to 
conferences/tutorials/courses that I can attend related to Linux KVM,
para-virtualization, device driver virtualization, hardware assisted
virtualization etc.? Even documents pointers will be much useful.

Thanks!
Anjali


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

* Re: Virtualization technology conferences/tutorials/courses to attend?
  2010-08-04 23:17       ` Virtualization technology conferences/tutorials/courses to attend? Anjali Kulkarni
@ 2010-08-05  2:26         ` Anthony Liguori
  0 siblings, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2010-08-05  2:26 UTC (permalink / raw)
  To: Anjali Kulkarni; +Cc: kvm

On 08/04/2010 06:17 PM, Anjali Kulkarni wrote:
> Hi,
>
> I am new to Virtualization, so can someone point me to 
> conferences/tutorials/courses that I can attend related to Linux KVM,
> para-virtualization, device driver virtualization, hardware assisted
> virtualization etc.? Even documents pointers will be much useful.
>    

KVM Forum is next week.  See http://www.linux-kvm.org/page/KVM_Forum_2010

There will also be a virtualization track at Plumbers in November.  For 
plan documentation, the KVM and QEMU wikis would be a good start.

Regards,

Anthony Liguori

> Thanks!
> Anjali
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>    


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

end of thread, other threads:[~2010-08-05  2:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23 15:02 Some questions about processing page fault in kvm Gu, Zhongshu
2010-07-25  8:52 ` Avi Kivity
2010-07-25 16:31   ` Gu, Zhongshu
2010-07-25 18:16     ` Avi Kivity
2010-08-04 23:12     ` Virtualization technology conferences/tutorials/courses to attend?Wednesday, August 4, 2010 6:59 PM Anjali Kulkarni
2010-08-04 23:17       ` Virtualization technology conferences/tutorials/courses to attend? Anjali Kulkarni
2010-08-05  2:26         ` Anthony Liguori

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.