You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
lguest: PAE support
This version requires that host and guest have the same PAE status. NX cap is not offered to the guest, yet. Signed-off-by: Matias Zabaljauregui <zabaljauregui@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Rusty Russell
parent
cefcad1773
commit
acdd0b6292
@@ -1,6 +1,6 @@
|
||||
config LGUEST
|
||||
tristate "Linux hypervisor example code"
|
||||
depends on X86_32 && EXPERIMENTAL && !X86_PAE && FUTEX
|
||||
depends on X86_32 && EXPERIMENTAL && FUTEX
|
||||
select HVC_DRIVER
|
||||
---help---
|
||||
This is a very simple module which allows you to run
|
||||
|
||||
@@ -77,11 +77,21 @@ static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args)
|
||||
guest_set_stack(cpu, args->arg1, args->arg2, args->arg3);
|
||||
break;
|
||||
case LHCALL_SET_PTE:
|
||||
#ifdef CONFIG_X86_PAE
|
||||
guest_set_pte(cpu, args->arg1, args->arg2,
|
||||
__pte(args->arg3 | (u64)args->arg4 << 32));
|
||||
#else
|
||||
guest_set_pte(cpu, args->arg1, args->arg2, __pte(args->arg3));
|
||||
#endif
|
||||
break;
|
||||
case LHCALL_SET_PGD:
|
||||
guest_set_pgd(cpu->lg, args->arg1, args->arg2);
|
||||
break;
|
||||
#ifdef CONFIG_X86_PAE
|
||||
case LHCALL_SET_PMD:
|
||||
guest_set_pmd(cpu->lg, args->arg1, args->arg2);
|
||||
break;
|
||||
#endif
|
||||
case LHCALL_SET_CLOCKEVENT:
|
||||
guest_set_clockevent(cpu, args->arg1);
|
||||
break;
|
||||
|
||||
@@ -137,6 +137,8 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user);
|
||||
* in the kernel. */
|
||||
#define pgd_flags(x) (pgd_val(x) & ~PAGE_MASK)
|
||||
#define pgd_pfn(x) (pgd_val(x) >> PAGE_SHIFT)
|
||||
#define pmd_flags(x) (pmd_val(x) & ~PAGE_MASK)
|
||||
#define pmd_pfn(x) (pmd_val(x) >> PAGE_SHIFT)
|
||||
|
||||
/* interrupts_and_traps.c: */
|
||||
unsigned int interrupt_pending(struct lg_cpu *cpu, bool *more);
|
||||
@@ -170,6 +172,9 @@ int init_guest_pagetable(struct lguest *lg);
|
||||
void free_guest_pagetable(struct lguest *lg);
|
||||
void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable);
|
||||
void guest_set_pgd(struct lguest *lg, unsigned long gpgdir, u32 i);
|
||||
#ifdef CONFIG_X86_PAE
|
||||
void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 i);
|
||||
#endif
|
||||
void guest_pagetable_clear_all(struct lg_cpu *cpu);
|
||||
void guest_pagetable_flush_user(struct lg_cpu *cpu);
|
||||
void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir,
|
||||
|
||||
+312
-37
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user