diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/lguest/lguest_device.c | 4 | ||||
| -rw-r--r-- | drivers/lguest/x86/core.c | 12 |
2 files changed, 14 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 | ||
| 184 | static void lg_set_status(struct virtio_device *vdev, u8 status) | 184 | static 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. */ |
diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c index fb2b7ef7868e..b4eb675a807e 100644 --- a/drivers/lguest/x86/core.c +++ b/drivers/lguest/x86/core.c | |||
| @@ -288,6 +288,18 @@ static int emulate_insn(struct lg_cpu *cpu) | |||
| 288 | insn = lgread(cpu, physaddr, u8); | 288 | insn = lgread(cpu, physaddr, u8); |
| 289 | 289 | ||
| 290 | /* | 290 | /* |
| 291 | * Around 2.6.33, the kernel started using an emulation for the | ||
| 292 | * cmpxchg8b instruction in early boot on many configurations. This | ||
| 293 | * code isn't paravirtualized, and it tries to disable interrupts. | ||
| 294 | * Ignore it, which will Mostly Work. | ||
| 295 | */ | ||
| 296 | if (insn == 0xfa) { | ||
| 297 | /* "cli", or Clear Interrupt Enable instruction. Skip it. */ | ||
| 298 | cpu->regs->eip++; | ||
| 299 | return 1; | ||
| 300 | } | ||
| 301 | |||
| 302 | /* | ||
| 291 | * 0x66 is an "operand prefix". It means it's using the upper 16 bits | 303 | * 0x66 is an "operand prefix". It means it's using the upper 16 bits |
| 292 | * of the eax register. | 304 | * of the eax register. |
| 293 | */ | 305 | */ |
