x86/PVH: replace bogus assertion with conditional
PATCH 1/1 x86/PVH: replace bogus assertion with conditional
While PVH guests currently have to start in 64-bit mode, nothing keeps them from entering compatibility mode via a suitable ring-0 code selector and making a hypercall from there. Fail such attempts rather than asserting they won't happen.
xen/arch/x86/hvm/hvm.c +2 -2
@@ -4876,10 +4876,10 @@ int hvm_do_hypercall(struct cpu_user_reg regs->r8, regs->r9); curr->arch.hvm_vcpu.hcall_64bit =0 ; } +else if (unlikely (is_pvh_vcpu (curr)) ) + regs->_eax = -ENOSYS ;/* PVH 32bitfixme. */ else { -ASSERT (!is_pvh_vcpu (curr));/* PVH 32bitfixme. */ - HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%x, %x, %x, %x, %x, %x)", eax, (uint32_t)regs->ebx, (uint32_t)regs->ecx, (uint32_t)regs->edx, (uint32_t)regs->esi,
x86/PVH: replace bogus assertion with conditional
While PVH guests currently have to start in 64-bit mode, nothing keeps them from entering compatibility mode via a suitable ring-0 code selector and making a hypercall from there. Fail such attempts rather than asserting they won't happen.
xen/arch/x86/hvm/hvm.c +2 -2
@@ -4876,10 +4876,10 @@ int hvm_do_hypercall(struct cpu_user_reg regs->r8, regs->r9); curr->arch.hvm_vcpu.hcall_64bit =0 ; } +else if (unlikely (is_pvh_vcpu (curr)) ) + regs->_eax = -ENOSYS ;/* PVH 32bitfixme. */ else { -ASSERT (!is_pvh_vcpu (curr));/* PVH 32bitfixme. */ - HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%x, %x, %x, %x, %x, %x)", eax, (uint32_t)regs->ebx, (uint32_t)regs->ecx, (uint32_t)regs->edx, (uint32_t)regs->esi,
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines · Jan Beulich
While PVH guests currently have to start in 64-bit mode, nothing keeps them from entering compatibility mode via a suitable ring-0 code selector and making a hypercall from there. Fail such attempts rather than asserting they won't happen.
Signed-off-by Jan Beulich <[email protected]>
Quoted 21 lines
xen/arch/x86/hvm/hvm.c +2
-2@@ -4876,10 +4876,10 @@ int hvm_do_hypercall(struct cpu_user_reg regs->r8, regs->r9); curr->arch.hvm_vcpu.hcall_64bit =0 ; } +else if (unlikely (is_pvh_vcpu (curr)) ) + regs->_eax = -ENOSYS ;/* PVH 32bitfixme. */ else { -ASSERT (!is_pvh_vcpu (curr));/* PVH 32bitfixme. */ - HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%u(%x, %x, %x, %x, %x, %x)", eax, (uint32_t)regs->ebx, (uint32_t)regs->ecx, (uint32_t)regs->edx, (uint32_t)regs->esi,
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel