Пример #1
0
static unsigned long iSeries_hpte_getword0(unsigned long slot)
{
	struct hash_pte hpte;

	HvCallHpt_get(&hpte, slot);
	return hpte.v;
}
Пример #2
0
static unsigned long iSeries_hpte_getword0(unsigned long slot)
{
	unsigned long dword0;
	HPTE hpte;

	HvCallHpt_get(&hpte, slot);
	dword0 = hpte.dw0.dword0;

	return dword0;
}
Пример #3
0
/*
 * The HyperVisor expects the "flags" argument in this form:
 * 	bits  0..59 : reserved
 * 	bit      60 : N
 * 	bits 61..63 : PP2,PP1,PP0
 */
static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
				  unsigned long va, int large, int local)
{
	HPTE hpte;
	unsigned long avpn = va >> 23;

	iSeries_hlock(slot);

	HvCallHpt_get(&hpte, slot);
	if ((hpte.dw0.dw0.avpn == avpn) && (hpte.dw0.dw0.v)) {
		HvCallHpt_setPp(slot, (newpp & 0x3) | ((newpp & 0x4) << 1));
		iSeries_hunlock(slot);
		return 0;
	}
	iSeries_hunlock(slot);

	return -1;
}
Пример #4
0
/*
 * The HyperVisor expects the "flags" argument in this form:
 *	bits  0..59 : reserved
 *	bit      60 : N
 *	bits 61..63 : PP2,PP1,PP0
 */
static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
				  unsigned long va, int psize, int local)
{
	struct hash_pte hpte;
	unsigned long want_v;

	iSeries_hlock(slot);

	HvCallHpt_get(&hpte, slot);
	want_v = hpte_encode_v(va, MMU_PAGE_4K);

	if (HPTE_V_COMPARE(hpte.v, want_v) && (hpte.v & HPTE_V_VALID)) {
		/*
		 * Hypervisor expects bits as NPPP, which is
		 * different from how they are mapped in our PP.
		 */
		HvCallHpt_setPp(slot, (newpp & 0x3) | ((newpp & 0x4) << 1));
		iSeries_hunlock(slot);
		return 0;
	}
	iSeries_hunlock(slot);

	return -1;
}