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/
Home Products Support Community News


[Xen-devel] update_va_mapping() question

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] update_va_mapping() question
From: Goswin von Brederlow <brederlo@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Sep 2007 21:13:36 +0200
Delivery-date: Mon, 24 Sep 2007 12:14:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.19 (linux)

two little questions about update_va_mapping():

The Xen Interface Manual says the following:

| Regardless of which page table update mode is being used, however,
| there are some occasions (notably handling a demand page fault)
| where a guest OS will wish to modify exactly one PTE rather than a
| batch, and where that PTE is mapped into the current address
| space. This is catered for by the following:
|    update_va_mapping(unsigned long va, uint64_t val, unsigned long flags) 
| Update the currently installed PTE that maps virtual address va to
| new value val. As with mmu_update, Xen checks the modification is
| safe before applying it. The flags determine which kind of TLB
| flush, if any, should follow the update.

What does "where that PTE is mapped into the current address space"?

Does that mean it must be in the Page table tree, i.e. the virtual
address must be mapped or mappable without adding Page tables?

Or does the actual Page Table that will be changed have to be mapped
into the domains virtual space?

I'm hoping for the former so I don't have to map all my page tables.

Secondly is there an opposite call not mentioned in the interface or
could we make one? Something like

  /* Return the currently installed PTE that maps virtual address va. */
  uint64_t get_va_mapping(unsigned long va) 

Unmapped entries could give 0 or encode the level at which the lookup
failed in some unused bits.

Or more generaly a

  /* mmu_read(): Read page table entries
   * @req[i].ptr   : machine address to read
   * @req[i].val   : on return value of that entry
   * @count        : size of req[]
   * @success_count: number of entries read
  mmu_read(mmu_update_t *req, int count, int *success_count)


Xen-devel mailing list

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