WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] device-mmio emulation in Xen

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] device-mmio emulation in Xen
From: Abhinav Srivastava <abhinavs_iitkgp@xxxxxxxxxxx>
Date: Tue, 5 Jan 2010 21:02:37 +0530 (IST)
Delivery-date: Tue, 05 Jan 2010 07:33:02 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s1024; t=1262705557; bh=9oo50eOyBToG9jeLa3oCNXVHvenjjUi2+AXLPRLx/LA=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Vo0hVLVYIk4An/C/vsrGoBwlAs1Afw7EyBfspiXixNvBDWFHK4W2lQmbViwyu7KRui+PULG/4bMwV5wc6RBT6ZOjGl4/41uKhGmB/j53/aht1OSwiPOoobITspUw/+JdJqm5kBJbVzxd16J8LXpwAxIBNiEUNmyD75nPJTRifvk=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=vsJV8fhpuDNHhIBkoyT2TYmq37Ah0RgWKCELCDCDelrbQgNixW42HDhJfDg+9BU575JOSWCXvWfgvcIuCCLyMgdlwrVTxoybDQqhgllAW1cLGuxkZrFZnQ6+koGJQGV69jW8GJQt4MaNiR9gBnP7zt1iZ7GKzSMPoe/K4udkFjA=;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi there,

I am trying to understand how does Xen handle device MMIO. More specifically, I 
am looking at the network behavior, however my understanding is that other 
devices such as disk will use the same logic.

I noticed that during a network copy operation Xen page faults a lot and 
control goes to sh_page_fault function. When I printed some debugging info, it 
showed me gmfn = -1. Then the execution goes through the regular path of the 
page fault handler code, which means it creates an entry using 
shadow_get_and_create_l1e, propagates it using l1e_propagate_from_guest, and 
finally updates the entry using shadow_set_l1e. It finally goes into the 
device-model mmio condition. In this condition, it extracts a guest physical 
address and calls "goto mmio", which in turn calls handle_mmio function that 
emulates the instruction.

However with the gmfn = -1 condition, the execution sometimes directly goto
to handle_mmio function using the fast_fault_path with going through the 
regular path. It seems like there are two possible execution paths, and I did 
not understand which one is chosen when?

I have some questions related to this behavior:

1. Why are there so many faults duing network copy operation?

2. What does gmfn = -1 signify? Is it reserved for mmio addresses?

3. How does Xen handle this gmfn = -1? It seems like on the regular path
it still creates, propagates, and updates entries for gmfn = -1. How does Xen 
handles this at the shadow page table level?

4. What are these two code execution paths, and when does Xen decide which
path to choose?

5. Finally, is there anyway these faults can be reduced?

I would very appreciate any help in this regard.

Thanks,
Abhinav



      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

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

<Prev in Thread] Current Thread [Next in Thread>