[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] page fault handling in Xen


  • To: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
  • From: jeet <jeet_sat12@xxxxxxxxxxx>
  • Date: Mon, 5 Mar 2007 11:59:18 +0530 (IST)
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Sun, 04 Mar 2007 22:28:32 -0800
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=CuMJ6zPowJrIvcEGUAmPMfhEzpfCR419VHBYdOt18/tl8nZTlYGXjuZvWcyT0gD+SBZnls0dYOXvk4aBLadplmyiWdKVtQKmBEdNp9qR5Mx7FbKq+BXbbfpzvDqif7VQHHzJIv4+/5p9Cs0C2ynK4l1cVrT83nLdLvNtUF08rys=;
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi Tim

in case of second fault that will occur when guest will try to write in 
GPT(which is readonly)
and faulting address would be of Page table in which the write is attempted. VM 
exit will occur and xen would execute 
following code

in file  xen-3.0.3_0-src\xen\arch\mm\shadow\multi.c  in the page fault handler

static int sh_page_fault(struct vcpu *v, 
                          unsigned long va, 
                          struct cpu_user_regs *regs)
{
...
...
[line 2949]
  // Was it a write fault?
    //
    if ( regs->error_code & PFEC_write_access )
    {
    // //if error is write access and RW permission is not present
        if ( unlikely(!(accumulated_gflags & _PAGE_RW)) )
        {
             perfc_incrc(shadow_fault_bail_ro_mapping);
            goto not_a_shadow_fault;
        }

...
..

Above code will execute and in inner unlikely condition will be true as PT 
table is read only and  error is write_access
and control will go to not_a_shadow_fault?

so when the emulation code would be executed for the write that has been 
performed on read only guest PT for adding entry in 
guest page table by guest?

Have I missed some thing here in understanding 

kindly provide your valuable reply 

jeet

----- Original Message ----
From: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
To: jeet <jeet_sat12@xxxxxxxxxxx>
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Sent: Friday, 2 March, 2007 7:05:43 PM
Subject: Re: [Xen-devel] page fault handling in Xen

At 17:36 +0530 on 02 Mar (1172856988), jeet wrote:
> Is shadow code implementation in xen 3.0.3 is same as explained by you in 
> reply?

Yes.

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel





                
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.