Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372957
b: refs/heads/master
c: 462fce4
h: refs/heads/master
i:
  372955: 9f4eabe
v: v3
  • Loading branch information
Takuya Yoshikawa authored and Marcelo Tosatti committed Mar 4, 2013
1 parent 6a5cf10 commit 4b6a424
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee2c25efdd46d7ed5605d6fe877bdf4b47a4ab2e
refs/heads/master: 462fce46065ec4b200c08619c047b9e5a8fd154a
6 changes: 2 additions & 4 deletions trunk/arch/arm/kvm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,14 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
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,
bool user_alloc)
struct kvm_userspace_memory_region *mem)
{
return 0;
}

void kvm_arch_commit_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
struct kvm_memory_slot old,
bool user_alloc)
struct kvm_memory_slot old)
{
}

Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/ia64/kvm/kvm-ia64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,8 +1579,7 @@ int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages)
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,
bool user_alloc)
struct kvm_userspace_memory_region *mem)
{
unsigned long i;
unsigned long pfn;
Expand Down Expand Up @@ -1610,8 +1609,7 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,

void kvm_arch_commit_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
struct kvm_memory_slot old,
bool user_alloc)
struct kvm_memory_slot old)
{
return;
}
Expand Down
12 changes: 5 additions & 7 deletions trunk/arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,18 +411,16 @@ int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages)
}

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,
bool user_alloc)
struct kvm_memory_slot *memslot,
struct kvm_memory_slot old,
struct kvm_userspace_memory_region *mem)
{
return kvmppc_core_prepare_memory_region(kvm, memslot, mem);
}

void kvm_arch_commit_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
struct kvm_memory_slot old,
bool user_alloc)
struct kvm_userspace_memory_region *mem,
struct kvm_memory_slot old)
{
kvmppc_core_commit_memory_region(kvm, mem, old);
}
Expand Down
9 changes: 2 additions & 7 deletions trunk/arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,8 +975,7 @@ int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages)
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,
bool user_alloc)
struct kvm_userspace_memory_region *mem)
{
/* A few sanity checks. We can have exactly one memory slot which has
to start at guest virtual zero and which has to be located at a
Expand All @@ -997,16 +996,12 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
if (mem->memory_size & 0xffffful)
return -EINVAL;

if (!user_alloc)
return -EINVAL;

return 0;
}

void kvm_arch_commit_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
struct kvm_memory_slot old,
bool user_alloc)
struct kvm_memory_slot old)
{
int rc;

Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -6907,8 +6907,7 @@ int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages)
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,
bool user_alloc)
struct kvm_userspace_memory_region *mem)
{
int npages = memslot->npages;

Expand Down Expand Up @@ -6938,8 +6937,7 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,

void kvm_arch_commit_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
struct kvm_memory_slot old,
bool user_alloc)
struct kvm_memory_slot old)
{

int nr_mmu_pages = 0, npages = mem->memory_size >> PAGE_SHIFT;
Expand Down
6 changes: 2 additions & 4 deletions trunk/include/linux/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,10 @@ int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages);
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,
bool user_alloc);
struct kvm_userspace_memory_region *mem);
void kvm_arch_commit_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
struct kvm_memory_slot old,
bool user_alloc);
struct kvm_memory_slot old);
bool kvm_largepages_enabled(void);
void kvm_disable_largepages(void);
/* flush all memory translations */
Expand Down
4 changes: 2 additions & 2 deletions trunk/virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
slots = old_memslots;
}

r = kvm_arch_prepare_memory_region(kvm, &new, old, mem, user_alloc);
r = kvm_arch_prepare_memory_region(kvm, &new, old, mem);
if (r)
goto out_slots;

Expand Down Expand Up @@ -915,7 +915,7 @@ int __kvm_set_memory_region(struct kvm *kvm,

old_memslots = install_new_memslots(kvm, slots, &new);

kvm_arch_commit_memory_region(kvm, mem, old, user_alloc);
kvm_arch_commit_memory_region(kvm, mem, old);

kvm_free_physmem_slot(&old, &new);
kfree(old_memslots);
Expand Down

0 comments on commit 4b6a424

Please sign in to comment.