lkml.org 
[lkml]   [2020]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC 02/39] KVM: x86/xen: intercept xen hypercalls if enabled
From
Date
On Tue, 2020-12-01 at 21:19 -0800, Ankur Arora wrote:
> > + for (i = 0; i < PAGE_SIZE / sizeof(instructions); i++) {
> > + *(u32 *)&instructions[1] = i;
> > + if (kvm_vcpu_write_guest(vcpu,
> > + page_addr + (i * sizeof(instructions)),
> > + instructions, sizeof(instructions)))
> > + return 1;
> > + }
>
> HYPERVISOR_iret isn't supported on 64bit so should be ud2 instead.

Yeah, I got part way through typing that part but concluded it probably
wasn't a fast path that absolutely needed to be emulated in the kernel.

The VMM can inject the UD# when it receives the hypercall.

I appreciate it *is* a guest-visible difference, if we're being really
pedantic, but I don't think we were even going to be able to 100% hide
the fact that it's not actually Xen.
[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2020-12-02 09:05    [W:0.143 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site