Lines Matching defs:rmap
163 struct gmap_rmap *rmap, *rnext, *head;
182 gmap_for_each_rmap_safe(rmap, rnext, head)
183 kfree(rmap);
1187 * gmap_insert_rmap - add a rmap to the host_to_rmap radix tree
1189 * @vmaddr: vm address associated with the rmap
1190 * @rmap: pointer to the rmap structure
1195 struct gmap_rmap *rmap)
1203 rmap->next = radix_tree_deref_slot_protected(slot,
1205 for (temp = rmap->next; temp; temp = temp->next) {
1206 if (temp->raddr == rmap->raddr) {
1207 kfree(rmap);
1211 radix_tree_replace_slot(&sg->host_to_rmap, slot, rmap);
1213 rmap->next = NULL;
1215 rmap);
1220 * gmap_protect_rmap - restrict access rights to memory (RO) and create an rmap
1222 * @raddr: rmap address in the shadow gmap
1226 * Returns 0 if successfully protected and the rmap was created, -ENOMEM
1233 struct gmap_rmap *rmap;
1245 rmap = kzalloc(sizeof(*rmap), GFP_KERNEL_ACCOUNT);
1246 if (!rmap)
1248 rmap->raddr = raddr;
1251 kfree(rmap);
1261 gmap_insert_rmap(sg, vmaddr, rmap);
1267 kfree(rmap);
1306 * @raddr: rmap address in the shadow guest address space
1325 * @raddr: rmap address in the shadow guest address space
1372 * @raddr: rmap address in the shadow guest address space
1401 * @raddr: rmap address in the shadow guest address space
1459 * @raddr: rmap address in the shadow guest address space
1488 * @raddr: rmap address in the shadow guest address space
1517 * @raddr: rmap address in the shadow guest address space
1546 * @raddr: rmap address in the shadow guest address space
2138 struct gmap_rmap *rmap;
2149 rmap = kzalloc(sizeof(*rmap), GFP_KERNEL_ACCOUNT);
2150 if (!rmap)
2152 rmap->raddr = (saddr & PAGE_MASK) | _SHADOW_RMAP_PGTABLE;
2179 gmap_insert_rmap(sg, vmaddr, rmap);
2180 rmap = NULL;
2193 kfree(rmap);
2206 struct gmap_rmap *rmap, *rnext, *head;
2230 gmap_for_each_rmap_safe(rmap, rnext, head) {
2231 bits = rmap->raddr & _SHADOW_RMAP_MASK;
2232 raddr = rmap->raddr ^ bits;
2250 kfree(rmap);