mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
KVM: MMU: Add infrastructure for two-level page walker
This patch introduces a mmu-callback to translate gpa addresses in the walk_addr code. This is later used to translate l2_gpa addresses into l1_gpa addresses. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
1e301feb07
commit
c30a358d33
3 changed files with 12 additions and 0 deletions
|
@ -534,6 +534,11 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn)
|
|||
return (gpa_t)gfn << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
static inline gfn_t gpa_to_gfn(gpa_t gpa)
|
||||
{
|
||||
return (gfn_t)(gpa >> PAGE_SHIFT);
|
||||
}
|
||||
|
||||
static inline hpa_t pfn_to_hpa(pfn_t pfn)
|
||||
{
|
||||
return (hpa_t)pfn << PAGE_SHIFT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue