aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/lguest_device.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-04-14 23:43:54 -0400
committerRusty Russell <rusty@rustcorp.com.au>2010-04-14 08:13:56 -0400
commit091ebf07a2408f9a56634caa0f86d9360e9af23b (patch)
tree62d3b3424cc1c0dc71b3b750bb1e8e063e658fd3 /drivers/lguest/lguest_device.c
parent5094aeafbbd500509f648e3cd102b053bc7926b3 (diff)
lguest: stop using KVM hypercall mechanism
This is a partial revert of 4cd8b5e2a159 "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 <rusty@rustcorp.com.au> Cc: Matias Zabaljauregui <zabaljauregui@gmail.com> Cc: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'drivers/lguest/lguest_device.c')
-rw-r--r--drivers/lguest/lguest_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c
index 07090f379c63..69c84a1d88ea 100644
--- a/drivers/lguest/lguest_device.c
+++ b/drivers/lguest/lguest_device.c
@@ -178,7 +178,7 @@ static void set_status(struct virtio_device *vdev, u8 status)
178 178
179 /* We set the status. */ 179 /* We set the status. */
180 to_lgdev(vdev)->desc->status = status; 180 to_lgdev(vdev)->desc->status = status;
181 kvm_hypercall1(LHCALL_NOTIFY, (max_pfn << PAGE_SHIFT) + offset); 181 hcall(LHCALL_NOTIFY, (max_pfn << PAGE_SHIFT) + offset, 0, 0, 0);
182} 182}
183 183
184static void lg_set_status(struct virtio_device *vdev, u8 status) 184static void lg_set_status(struct virtio_device *vdev, u8 status)
@@ -229,7 +229,7 @@ static void lg_notify(struct virtqueue *vq)
229 */ 229 */
230 struct lguest_vq_info *lvq = vq->priv; 230 struct lguest_vq_info *lvq = vq->priv;
231 231
232 kvm_hypercall1(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT); 232 hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0, 0);
233} 233}
234 234
235/* An extern declaration inside a C file is bad form. Don't do it. */ 235/* An extern declaration inside a C file is bad form. Don't do it. */