Skip to content

Commit

Permalink
KVM: Keep slot ID in memory slot structure
Browse files Browse the repository at this point in the history
May be used for distinguishing between internal and user slots, or for sorting
slots in size order.

Signed-off-by: Avi Kivity <[email protected]>
  • Loading branch information
avikivity committed Aug 1, 2010
1 parent 0719837 commit e36d96f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ struct kvm_memory_slot {
} *lpage_info[KVM_NR_PAGE_SIZES - 1];
unsigned long userspace_addr;
int user_alloc;
int id;
};

static inline unsigned long kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot)
Expand Down
1 change: 1 addition & 0 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ int __kvm_set_memory_region(struct kvm *kvm,

new = old = *memslot;

new.id = mem->slot;
new.base_gfn = base_gfn;
new.npages = npages;
new.flags = mem->flags;
Expand Down

0 comments on commit e36d96f

Please sign in to comment.