summaryrefslogtreecommitdiff
path: root/kvm_x86host.h
diff options
context:
space:
mode:
authorMax Bruning <max@joyent.com>2011-06-10 07:39:01 -0700
committerMax Bruning <max@joyent.com>2011-06-10 07:39:01 -0700
commit6131ce9627f5c601354b0428c2270ed7bf7c12d8 (patch)
treeecf44fe994e724ac2f2ccf3b9fb7c82c43219e15 /kvm_x86host.h
parent386657f94b827157f49c4a394211854b274b9783 (diff)
downloadillumos-kvm-6131ce9627f5c601354b0428c2270ed7bf7c12d8.tar.gz
HVM-358 alloc_page leaks memory
Diffstat (limited to 'kvm_x86host.h')
-rw-r--r--kvm_x86host.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/kvm_x86host.h b/kvm_x86host.h
index 09e1cdd..e52a618 100644
--- a/kvm_x86host.h
+++ b/kvm_x86host.h
@@ -143,9 +143,14 @@ enum {
*/
#define KVM_NR_MEM_OBJS 40
+struct kvm_objects {
+ void *kma_object;
+ void *kpm_object;
+};
+
typedef struct kvm_mmu_memory_cache {
- int nobjs;
- void *objects[KVM_NR_MEM_OBJS];
+ int nobjs; /* current number free in cache */
+ struct kvm_objects objects[KVM_NR_MEM_OBJS];
} kvm_mmu_memory_cache_t;
#define NR_PTE_CHAIN_ENTRIES 5
@@ -196,9 +201,11 @@ typedef struct kvm_mmu_page {
union kvm_mmu_page_role role;
uint64_t *spt;
+ char *sptkma;
uintptr_t kmp_avlspt;
/* hold the gfn of each spte inside spt */
gfn_t *gfns;
+ char *gfnskma;
/*
* One bit set per slot which has memory
* in this shadow page.
@@ -212,6 +219,7 @@ typedef struct kvm_mmu_page {
uint64_t *parent_pte; /* !multimapped */
list_t parent_ptes; /* multimapped, kvm_pte_chain */
};
+ struct kvm_vcpu *vcpu; /* needed for free */
unsigned long unsync_child_bitmap[BT_BITOUL(512)];
} kvm_mmu_page_t;
@@ -257,6 +265,7 @@ typedef struct kvm_mmu {
union kvm_mmu_page_role base_role;
uint64_t *pae_root;
+ void *alloc_pae_root;
uint64_t rsvd_bits_mask[2][4];
} kvm_mmu_t;