summaryrefslogtreecommitdiff
path: root/kvm_x86.c
diff options
context:
space:
mode:
authorMax Bruning <max@joyent.com>2011-05-23 22:40:52 -0700
committerMax Bruning <max@joyent.com>2011-05-23 22:41:05 -0700
commit3d4af3113cb5db6f335cc15d4dd0efc1cde17227 (patch)
tree4e17affface9c60d756ec9cf9a3a5facfa0db329 /kvm_x86.c
parentff9f076d46c4b1a589e797c5f2ae869dba6d16f2 (diff)
downloadillumos-kvm-3d4af3113cb5db6f335cc15d4dd0efc1cde17227.tar.gz
HVM-228 vmx_vcpu_load should not call hat_getpfnum
Diffstat (limited to 'kvm_x86.c')
-rw-r--r--kvm_x86.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kvm_x86.c b/kvm_x86.c
index 7863d95..ea77a65 100644
--- a/kvm_x86.c
+++ b/kvm_x86.c
@@ -3567,8 +3567,8 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
struct kvm_memory_slot *memslot, struct kvm_memory_slot old,
struct kvm_userspace_memory_region *mem, int user_alloc)
{
- int npages = memslot->npages;
- int i;
+ unsigned int npages = memslot->npages;
+ uint64_t i;
/*
* To keep backward compatibility with older userspace, x86 needs to
@@ -3593,7 +3593,8 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
XXX_KVM_PROBE;
- userspace_addr = smmap64(NULL, npages * PAGESIZE,
+ userspace_addr = smmap64(NULL,
+ (size_t)(npages * PAGESIZE),
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON,
-1, 0);