Thread (82 messages) 82 messages, 12 authors, 2012-10-08
STALE4987d

[PATCH 01/15] ARM: add mem_type prot_pte accessor

From: Christoffer Dall <hidden>
Date: 2012-09-18 21:53:02
Also in: kvm

On Tue, Sep 18, 2012 at 5:04 PM, Russell King - ARM Linux
[off-list ref] wrote:
On Sat, Sep 15, 2012 at 11:34:36AM -0400, Christoffer Dall wrote:
quoted
From: Marc Zyngier <redacted>

The KVM hypervisor mmu code requires access to the mem_type prot_pte
field when setting up page tables pointing to a device. Unfortunately,
the mem_type structure is opaque.

Add an accessor (get_mem_type_prot_pte()) to retrieve the prot_pte
value.

Signed-off-by: Marc Zyngier <redacted>
Signed-off-by: Christoffer Dall <redacted>
Is there a reason why we need this to be exposed, along with all the
page table manipulation in patch 7?

Is there a reason why we can't have new MT_ types for PAGE_HYP and
the HYP MT_DEVICE type (which is the same as MT_DEVICE but with
PTE_USER set) and have the standard ARM/generic kernel code build
those mappings?
For hyp mode we can do this, but we cannot do this for the cpu
interfaces that need to be mapped into each VM as they have each their
own pgd. We can move the Hyp mode mappings, and I was playing with the
though of having a PAGE_KVM_DEVICE set in pgtable.h and a
pgprot_guest_device setup in build_mem_type_table.

What do you think?
That would (it seems) also avoid the need to export the pXd_clear_bad()
acessors too...
for hyp mode mappings this would be true, then.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help