Commit 70f48063 authored by Charlie Jacobsen's avatar Charlie Jacobsen Committed by Vikram Narayanan
Browse files

Tweaking the build set up.

The main makefile will now go in virt/lcd. The
lcd-vmx.h header will be in the standard include
path, and I can reference the x86-dependent code
from there, so it should all just work (build not
tested yet, will do so soon).

Small change to lcd-vmx.c: Made sure I freed
msr bitmap page on failure.
parent 18122896
ccflags-y += -Ivirt/kvm -Iarch/x86/kvm
obj-$(CONFIG_LCD) += lcd-domains.o
#obj-m += lcd.o
lcd-domains-y += $(addprefix ../../../virt/lcd/, core.o cap.o \
lcd-domains-y += lcd-vtx.o utils.o
......@@ -11,8 +11,8 @@
#include <asm/virtext.h>
#include <linux/bitmap.h>
#include <asm/lcd-vmx.h>
#include <linux/bitmap.h>
static struct lcd_vmx_vmcs_config vmcs_config;
static struct lcd_vmx_capability vmx_capability;
......@@ -515,8 +515,10 @@ int lcd_vmx_init(void) {
msr_bitmap = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!msr_bitmap)
return -ENOMEM;
if (!msr_bitmap) {
ret = -ENOMEM;
goto fail1;
memset(msr_bitmap, 0xff, PAGE_SIZE);
vmx_disable_intercept_for_msr(msr_bitmap, MSR_FS_BASE);
......@@ -569,5 +571,6 @@ failed2:
on_each_cpu(vmx_disable, NULL, 1);
free_page((unsigned long)msr_bitmap);
return ret;
......@@ -2,7 +2,7 @@
# LCD configuration
config LCD
menuconfig LCD
tristate "Light-weight Capability Domains"
depends on X86_64
default y
# One (and only) build file for LCD system.
obj-$(CONFIG_LCD) += lcd.o
lcd-y += $(src)/arch/x86/lcd/lcd-vmx.o
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment