summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86xpv/os/xen_machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/i86xpv/os/xen_machdep.c')
-rw-r--r--usr/src/uts/i86xpv/os/xen_machdep.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/usr/src/uts/i86xpv/os/xen_machdep.c b/usr/src/uts/i86xpv/os/xen_machdep.c
index 949ac0293d..7106be2b2b 100644
--- a/usr/src/uts/i86xpv/os/xen_machdep.c
+++ b/usr/src/uts/i86xpv/os/xen_machdep.c
@@ -234,7 +234,6 @@ xen_hypervisor_supports_solaris(xen_hypervisor_check_t check)
static void
xen_pte_workaround(void)
{
-#if defined(__amd64)
extern int pt_kern;
if (XENVER_CURRENT(xv_major) != 3)
@@ -248,7 +247,6 @@ xen_pte_workaround(void)
return;
pt_kern = PT_USER;
-#endif
}
void
@@ -257,12 +255,7 @@ xen_set_callback(void (*func)(void), uint_t type, uint_t flags)
struct callback_register cb;
bzero(&cb, sizeof (cb));
-#if defined(__amd64)
cb.address = (ulong_t)func;
-#elif defined(__i386)
- cb.address.cs = KCS_SEL;
- cb.address.eip = (ulong_t)func;
-#endif
cb.type = type;
cb.flags = flags;
@@ -297,10 +290,8 @@ xen_init_callbacks(void)
* system call handler
* XXPV move to init_cpu_syscall?
*/
-#if defined(__amd64)
xen_set_callback(sys_syscall, CALLBACKTYPE_syscall,
CALLBACKF_mask_events);
-#endif /* __amd64 */
}
@@ -1043,7 +1034,6 @@ xen_set_trap_table(trap_info_t *table)
return (err);
}
-#if defined(__amd64)
void
xen_set_segment_base(int reg, ulong_t value)
{
@@ -1058,7 +1048,6 @@ xen_set_segment_base(int reg, ulong_t value)
reg, value, -(int)err);
}
}
-#endif /* __amd64 */
/*
* Translate a hypervisor errcode to a Solaris error code.
@@ -1097,7 +1086,7 @@ xen_xlate_errcode(int error)
* Caller responsible for preventing kernel preemption.
*/
void
-xen_enable_user_iopl(void)
+xen_enable_user_iopl(void *arg __unused)
{
physdev_set_iopl_t set_iopl;
set_iopl.iopl = 3; /* user ring 3 */
@@ -1108,7 +1097,7 @@ xen_enable_user_iopl(void)
* Drop PS_IOPL on current vcpu to kernel level
*/
void
-xen_disable_user_iopl(void)
+xen_disable_user_iopl(void *arg __unused)
{
physdev_set_iopl_t set_iopl;
set_iopl.iopl = 1; /* kernel pseudo ring 1 */
@@ -1119,19 +1108,15 @@ int
xen_gdt_setprot(cpu_t *cp, uint_t prot)
{
int err;
-#if defined(__amd64)
int pt_bits = PT_VALID;
if (prot & PROT_WRITE)
pt_bits |= PT_WRITABLE;
-#endif
if ((err = as_setprot(&kas, (caddr_t)cp->cpu_gdt,
MMU_PAGESIZE, prot)) != 0)
goto done;
-#if defined(__amd64)
err = xen_kpm_page(mmu_btop(cp->cpu_m.mcpu_gdtpa), pt_bits);
-#endif
done:
if (err) {
@@ -1148,17 +1133,14 @@ xen_ldt_setprot(user_desc_t *ldt, size_t lsize, uint_t prot)
{
int err;
caddr_t lva = (caddr_t)ldt;
-#if defined(__amd64)
int pt_bits = PT_VALID;
pgcnt_t npgs;
if (prot & PROT_WRITE)
pt_bits |= PT_WRITABLE;
-#endif /* __amd64 */
if ((err = as_setprot(&kas, (caddr_t)ldt, lsize, prot)) != 0)
goto done;
-#if defined(__amd64)
ASSERT(IS_P2ALIGNED(lsize, PAGESIZE));
npgs = mmu_btop(lsize);
@@ -1168,7 +1150,6 @@ xen_ldt_setprot(user_desc_t *ldt, size_t lsize, uint_t prot)
break;
lva += PAGESIZE;
}
-#endif /* __amd64 */
done:
if (err) {