mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
lguest: stop using KVM hypercall mechanism
This is a partial revert of 4cd8b5e2a1 "lguest: use KVM hypercalls";
we revert to using (just as questionable but more reliable) int $15 for
hypercalls. I didn't revert the register mapping, so we still use the
same calling convention as kvm.
KVM in more recent incarnations stopped injecting a fault when a guest
tried to use the VMCALL instruction from ring 1, so lguest under kvm
fails to make hypercalls. It was nice to share code with our KVM
cousins, but this was overreach.
Signed-off-by: Rusty Russell <[email protected]>
Cc: Matias Zabaljauregui <[email protected]>
Cc: Avi Kivity <[email protected]>
This commit is contained in:
parent
5094aeafbb
commit
091ebf07a2
4 changed files with 56 additions and 40 deletions
|
|
@ -178,7 +178,7 @@ static void set_status(struct virtio_device *vdev, u8 status)
|
|||
|
||||
/* We set the status. */
|
||||
to_lgdev(vdev)->desc->status = status;
|
||||
kvm_hypercall1(LHCALL_NOTIFY, (max_pfn << PAGE_SHIFT) + offset);
|
||||
hcall(LHCALL_NOTIFY, (max_pfn << PAGE_SHIFT) + offset, 0, 0, 0);
|
||||
}
|
||||
|
||||
static void lg_set_status(struct virtio_device *vdev, u8 status)
|
||||
|
|
@ -229,7 +229,7 @@ static void lg_notify(struct virtqueue *vq)
|
|||
*/
|
||||
struct lguest_vq_info *lvq = vq->priv;
|
||||
|
||||
kvm_hypercall1(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT);
|
||||
hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0, 0);
|
||||
}
|
||||
|
||||
/* An extern declaration inside a C file is bad form. Don't do it. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue