return 1;
}
+void set_virtual_rr0(void)
+{
+ struct vcpu *v = current;
+
+ ia64_set_rr(0, v->arch.metaphysical_saved_rr0);
+ ia64_srlz_d();
+}
+
// set rr0 to the passed rid (for metaphysical mode so don't use domain offset
-int set_metaphysical_rr0(void)
+void set_metaphysical_rr0(void)
{
struct vcpu *v = current;
// ia64_rr rrv;
// rrv.ve = 1; FIXME: TURN ME BACK ON WHEN VHPT IS WORKING
ia64_set_rr(0, v->arch.metaphysical_rid_dt);
ia64_srlz_d();
- return 1;
}
void init_all_rr(struct vcpu *v)
VCPU processor status register access routines
**************************************************************************/
-void vcpu_set_metaphysical_mode(VCPU * vcpu, BOOLEAN newmode)
+static void vcpu_set_metaphysical_mode(VCPU * vcpu, BOOLEAN newmode)
{
/* only do something if mode changes */
if (!!newmode ^ !!PSCB(vcpu, metaphysical_mode)) {
if (newmode)
set_metaphysical_rr0();
else if (PSCB(vcpu, rrs[0]) != -1)
- set_one_rr(0, PSCB(vcpu, rrs[0]));
+ set_virtual_rr0();
}
}
// This may cause tlb miss. see vcpu_translate(). Be careful!
swap_rr0 = (!region && PSCB(vcpu, metaphysical_mode));
if (swap_rr0) {
- set_one_rr(0x0, PSCB(vcpu, rrs[0]));
+ set_virtual_rr0();
}
*bundle = __get_domain_bundle(gip);
if (swap_rr0) {
if (!pteval)
return IA64_ILLOP_FAULT;
if (swap_rr0)
- set_one_rr(0x0, PSCB(vcpu, rrs[0]));
+ set_virtual_rr0();
vcpu_itc_no_srlz(vcpu, 2, ifa, pteval, pte, _itir.itir, &entry);
if (swap_rr0)
set_metaphysical_rr0();
if (!pteval)
return IA64_ILLOP_FAULT;
if (swap_rr0)
- set_one_rr(0x0, PSCB(vcpu, rrs[0]));
+ set_virtual_rr0();
vcpu_itc_no_srlz(vcpu, 1, ifa, pteval, pte, _itir.itir, &entry);
if (swap_rr0)
set_metaphysical_rr0();