diff options
author | Max Bruning <max@joyent.com> | 2011-05-23 22:40:52 -0700 |
---|---|---|
committer | Max Bruning <max@joyent.com> | 2011-05-23 22:41:05 -0700 |
commit | 3d4af3113cb5db6f335cc15d4dd0efc1cde17227 (patch) | |
tree | 4e17affface9c60d756ec9cf9a3a5facfa0db329 /kvm_x86.c | |
parent | ff9f076d46c4b1a589e797c5f2ae869dba6d16f2 (diff) | |
download | illumos-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |