Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebe0ba84 authored by Matias Zabaljauregui's avatar Matias Zabaljauregui Committed by Rusty Russell
Browse files

lguest: replace hypercall name LHCALL_SET_PMD with LHCALL_SET_PGD



replace LHCALL_SET_PMD with LHCALL_SET_PGD hypercall name
(That's really what it is, and the confusion gets worse with PAE support)

Signed-off-by: default avatarMatias Zabaljauregui <zabaljauregui@gmail.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Reported-by: default avatarJeremy Fitzhardinge <jeremy@goop.org>
parent 90603d15
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -13,7 +13,7 @@
#define LHCALL_SET_CLOCKEVENT	9
#define LHCALL_SET_CLOCKEVENT	9
#define LHCALL_HALT		10
#define LHCALL_HALT		10
#define LHCALL_SET_PTE		14
#define LHCALL_SET_PTE		14
#define LHCALL_SET_PMD		15
#define LHCALL_SET_PGD		15
#define LHCALL_LOAD_TLS		16
#define LHCALL_LOAD_TLS		16
#define LHCALL_NOTIFY		17
#define LHCALL_NOTIFY		17
#define LHCALL_LOAD_GDT_ENTRY	18
#define LHCALL_LOAD_GDT_ENTRY	18
+1 −1
Original line number Original line Diff line number Diff line
@@ -535,7 +535,7 @@ static void lguest_set_pte_at(struct mm_struct *mm, unsigned long addr,
static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
{
{
	native_set_pmd(pmdp, pmdval);
	native_set_pmd(pmdp, pmdval);
	lazy_hcall2(LHCALL_SET_PMD, __pa(pmdp) & PAGE_MASK,
	lazy_hcall2(LHCALL_SET_PGD, __pa(pmdp) & PAGE_MASK,
		   (__pa(pmdp) & (PAGE_SIZE - 1)) / sizeof(pmd_t));
		   (__pa(pmdp) & (PAGE_SIZE - 1)) / sizeof(pmd_t));
}
}


+2 −2
Original line number Original line Diff line number Diff line
@@ -79,8 +79,8 @@ static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args)
	case LHCALL_SET_PTE:
	case LHCALL_SET_PTE:
		guest_set_pte(cpu, args->arg1, args->arg2, __pte(args->arg3));
		guest_set_pte(cpu, args->arg1, args->arg2, __pte(args->arg3));
		break;
		break;
	case LHCALL_SET_PMD:
	case LHCALL_SET_PGD:
		guest_set_pmd(cpu->lg, args->arg1, args->arg2);
		guest_set_pgd(cpu->lg, args->arg1, args->arg2);
		break;
		break;
	case LHCALL_SET_CLOCKEVENT:
	case LHCALL_SET_CLOCKEVENT:
		guest_set_clockevent(cpu, args->arg1);
		guest_set_clockevent(cpu, args->arg1);
+1 −1
Original line number Original line Diff line number Diff line
@@ -169,7 +169,7 @@ void copy_gdt_tls(const struct lg_cpu *cpu, struct desc_struct *gdt);
int init_guest_pagetable(struct lguest *lg);
int init_guest_pagetable(struct lguest *lg);
void free_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_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable);
void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 i);
void guest_set_pgd(struct lguest *lg, unsigned long gpgdir, u32 i);
void guest_pagetable_clear_all(struct lg_cpu *cpu);
void guest_pagetable_clear_all(struct lg_cpu *cpu);
void guest_pagetable_flush_user(struct lg_cpu *cpu);
void guest_pagetable_flush_user(struct lg_cpu *cpu);
void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir,
void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir,
+1 −1
Original line number Original line Diff line number Diff line
@@ -568,7 +568,7 @@ void guest_set_pte(struct lg_cpu *cpu,
 *
 *
 * So with that in mind here's our code to to update a (top-level) PGD entry:
 * So with that in mind here's our code to to update a (top-level) PGD entry:
 */
 */
void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 idx)
void guest_set_pgd(struct lguest *lg, unsigned long gpgdir, u32 idx)
{
{
	int pgdir;
	int pgdir;