/openbmc/qemu/block/ |
H A D | dirty-bitmap.c | 2 * Block Dirty Bitmap 30 #include "block/dirty-bitmap.h" 35 HBitmap *bitmap; /* Dirty bitmap implementation */ member 36 bool busy; /* Bitmap is busy, it can't be used via QMP */ 39 int64_t size; /* Size of the bitmap, in bytes */ 40 bool disabled; /* Bitmap is disabled. It ignores all writes to 43 bool readonly; /* Bitmap is read-only. This field also 47 and this bitmap must remain unchanged while 49 bool persistent; /* bitmap must be saved to owner disk image */ 50 bool inconsistent; /* bitmap is persistent, but inconsistent. [all …]
|
H A D | qcow2-bitmap.c | 30 #include "block/dirty-bitmap.h" 40 /* Bitmap directory entry constraints */ 47 /* Size of bitmap table entries */ 53 #error In the code bitmap table physical size assumed to fit into int 56 /* Bitmap directory entry flags */ 192 error_setg(errp, "Too much space will be occupied by the bitmap. " in check_constraints_on_bitmap() 287 * @bitmap must be cleared */ 290 uint32_t bitmap_table_size, BdrvDirtyBitmap *bitmap) in load_bitmap_data() argument 295 uint64_t bm_size = bdrv_dirty_bitmap_size(bitmap); in load_bitmap_data() 299 bdrv_dirty_bitmap_serialization_size(bitmap, 0, bm_size)); in load_bitmap_data() [all …]
|
/openbmc/linux/drivers/md/ |
H A D | md-bitmap.c | 3 * bitmap.c two-level bitmap (C) Peter T. Breuer (ptb@ot.uc3m.es) 2003 5 * bitmap_create - sets up the bitmap structure 6 * bitmap_destroy - destroys the bitmap structure 9 * - added disk storage for bitmap 10 * - changes to allow various bitmap chunk sizes 33 #include "md-bitmap.h" 35 static inline char *bmname(struct bitmap *bitmap) in bmname() argument 37 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; in bmname() 50 static int md_bitmap_checkpage(struct bitmap_counts *bitmap, in md_bitmap_checkpage() argument 52 __releases(bitmap->lock) in md_bitmap_checkpage() [all …]
|
H A D | md-bitmap.h | 3 * bitmap.h: Copyright (C) Peter T. Breuer (ptb@ot.uc3m.es) 2003 11 /* version 4 insists the bitmap is in little-endian order 20 * in-memory bitmap: 110 * bitmap structures: 115 /* use these for bitmap->flags and bitmap->sb->state bit-fields */ 117 BITMAP_STALE = 1, /* the bitmap file is out of date or had -EIO */ 122 /* the superblock at the front of the bitmap file -- little endian */ 125 __le32 version; /* 4 the bitmap major for now, could change... */ 127 __le64 events; /* 24 event counter for the bitmap (1)*/ 130 __le32 state; /* 48 bitmap state information */ [all …]
|
/openbmc/linux/drivers/vfio/ |
H A D | iova_bitmap.c | 14 * struct iova_bitmap_map - A bitmap representing an IOVA range 16 * Main data structure for tracking mapped user pages of bitmap data. 24 * The user does not need to exact location of the bits in the bitmap. 26 * records the IOVA *range* in the bitmap by setting the corresponding 29 * The bitmap is an array of u64 whereas each bit represents an IOVA of 30 * range of (1 << pgshift). Thus formula for the bitmap data to be set is: 47 /* pinned pages representing the bitmap data */ 52 * struct iova_bitmap - The IOVA bitmap object 54 * Main data structure for iterating over the bitmap data. 57 * It uses a windowing scheme and pins the bitmap in relatively [all …]
|
/openbmc/qemu/include/block/ |
H A D | dirty-bitmap.h | 25 int bdrv_dirty_bitmap_create_successor(BdrvDirtyBitmap *bitmap, 27 BdrvDirtyBitmap *bdrv_dirty_bitmap_abdicate(BdrvDirtyBitmap *bitmap, 29 BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BdrvDirtyBitmap *bitmap, 31 void bdrv_dirty_bitmap_enable_successor(BdrvDirtyBitmap *bitmap); 34 int bdrv_dirty_bitmap_check(const BdrvDirtyBitmap *bitmap, uint32_t flags, 36 void bdrv_release_dirty_bitmap(BdrvDirtyBitmap *bitmap); 46 void bdrv_disable_dirty_bitmap(BdrvDirtyBitmap *bitmap); 47 void bdrv_enable_dirty_bitmap(BdrvDirtyBitmap *bitmap); 48 void bdrv_enable_dirty_bitmap_locked(BdrvDirtyBitmap *bitmap); 51 uint32_t bdrv_dirty_bitmap_granularity(const BdrvDirtyBitmap *bitmap); [all …]
|
/openbmc/linux/fs/xfs/scrub/ |
H A D | bitmap.h | 13 void xbitmap_init(struct xbitmap *bitmap); 14 void xbitmap_destroy(struct xbitmap *bitmap); 16 int xbitmap_clear(struct xbitmap *bitmap, uint64_t start, uint64_t len); 17 int xbitmap_set(struct xbitmap *bitmap, uint64_t start, uint64_t len); 18 int xbitmap_disunion(struct xbitmap *bitmap, struct xbitmap *sub); 19 uint64_t xbitmap_hweight(struct xbitmap *bitmap); 22 * Return codes for the bitmap iterator functions are 0 to continue iterating, 25 * iteration, because neither bitmap iterator ever generates that error code on 26 * its own. Callers must not modify the bitmap while walking it. 29 int xbitmap_walk(struct xbitmap *bitmap, xbitmap_walk_fn fn, [all …]
|
H A D | bitmap.c | 15 #include "scrub/bitmap.h" 58 /* Iterate each interval of a bitmap. Do not change the bitmap. */ in INTERVAL_TREE_DEFINE() 59 #define for_each_xbitmap_extent(bn, bitmap) \ in INTERVAL_TREE_DEFINE() argument 60 for ((bn) = rb_entry_safe(rb_first(&(bitmap)->xb_root.rb_root), \ in INTERVAL_TREE_DEFINE() 66 /* Clear a range of this bitmap. */ 69 struct xbitmap *bitmap, 77 while ((bn = xbitmap_tree_iter_first(&bitmap->xb_root, start, last))) { 82 xbitmap_tree_remove(bn, &bitmap->xb_root); 84 xbitmap_tree_insert(bn, &bitmap->xb_root); 93 xbitmap_tree_insert(new_bn, &bitmap->xb_root); [all …]
|
/openbmc/linux/lib/ |
H A D | find_bit_benchmark.c | 14 * - randomly filled bitmap with approximately equal number of set and 16 * - sparse bitmap with few set bits at random positions. 29 static DECLARE_BITMAP(bitmap, BITMAP_LEN) __initdata; 34 * all other tests for the same bitmap because it sets all bits of bitmap to 1. 36 static int __init test_find_first_bit(void *bitmap, unsigned long len) in test_find_first_bit() argument 43 i = find_first_bit(bitmap, len); in test_find_first_bit() 44 __clear_bit(i, bitmap); in test_find_first_bit() 52 static int __init test_find_first_and_bit(void *bitmap, const void *bitmap2, unsigned long len) in test_find_first_and_bit() argument 58 bitmap_copy(cp, bitmap, BITMAP_LEN); in test_find_first_and_bit() 71 static int __init test_find_next_bit(const void *bitmap, unsigned long len) in test_find_next_bit() argument [all …]
|
H A D | bitmap.c | 3 * lib/bitmap.c 4 * Helper functions for bitmap.h. 7 #include <linux/bitmap.h> 26 * DOC: bitmap introduction 30 * given bitmap does _not_ need to be an exact multiple of 34 * of a bitmap are 'don't care'. The implementation makes 37 * The bitmap operations that return Boolean (bitmap_empty, 93 * __bitmap_shift_right - logical right shift of the bits in a bitmap 94 * @dst : destination bitmap 95 * @src : source bitmap [all …]
|
H A D | idr.c | 2 #include <linux/bitmap.h> 334 * each entry. The XA_FREE_MARK is only cleared when all bits in the bitmap 341 * leaf bitmap before doing a radix tree lookup. 344 * leaf, instead of allocating a 128-byte bitmap, we store the bits 346 * because we can always convert them into a bitmap entry. 349 * single 128-byte bitmap, we currently switch to a 576-byte node, put 350 * the 128-byte bitmap in the first entry and then start allocating extra 352 * data as a bitmap before moving to that scheme. I do not believe this 361 * RCU head in the bitmap, which adds a 2-pointer overhead to each 128-byte 362 * bitmap, which is excessive. [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx4/ |
H A D | alloc.c | 38 #include <linux/bitmap.h> 44 u32 mlx4_bitmap_alloc(struct mlx4_bitmap *bitmap) in mlx4_bitmap_alloc() argument 48 spin_lock(&bitmap->lock); in mlx4_bitmap_alloc() 50 obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->last); in mlx4_bitmap_alloc() 51 if (obj >= bitmap->max) { in mlx4_bitmap_alloc() 52 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_alloc() 53 & bitmap->mask; in mlx4_bitmap_alloc() 54 obj = find_first_zero_bit(bitmap->table, bitmap->max); in mlx4_bitmap_alloc() 57 if (obj < bitmap->max) { in mlx4_bitmap_alloc() 58 set_bit(obj, bitmap->table); in mlx4_bitmap_alloc() [all …]
|
/openbmc/qemu/block/monitor/ |
H A D | bitmap-qmp-cmds.c | 2 * QEMU block dirty bitmap QMP commands 37 #include "block/dirty-bitmap.h" 43 * Return a dirty bitmap (if present), after validating 44 * the node reference and bitmap names. 47 * @name: The name of the bitmap to search for 51 * @return: A bitmap object on success, or NULL on failure. 59 BdrvDirtyBitmap *bitmap; in block_dirty_bitmap_lookup() local 68 error_setg(errp, "Bitmap name cannot be NULL"); in block_dirty_bitmap_lookup() 77 bitmap = bdrv_find_dirty_bitmap(bs, name); in block_dirty_bitmap_lookup() 78 if (!bitmap) { in block_dirty_bitmap_lookup() [all …]
|
/openbmc/qemu/tests/qemu-iotests/tests/ |
H A D | qemu-img-bitmaps | 4 # Test qemu-img bitmap handling 60 # Create backing image with one bitmap 62 $QEMU_IMG bitmap --add -f $IMGFMT "$TEST_IMG.base" b0 70 $QEMU_IMG bitmap --add -g 512k -f $IMGFMT "$TEST_IMG" b1 71 $QEMU_IMG bitmap --add --disable -f $IMGFMT "$TEST_IMG" b2 73 $QEMU_IMG bitmap --clear -f $IMGFMT "$TEST_IMG" b1 75 $QEMU_IMG bitmap --disable -f $IMGFMT "$TEST_IMG" b1 76 $QEMU_IMG bitmap --enable -f $IMGFMT "$TEST_IMG" b2 80 echo "=== Bitmap preservation not possible to non-qcow2 ===" 88 echo "=== Convert with bitmap preservation ===" [all …]
|
/openbmc/qemu/tests/qemu-iotests/ |
H A D | 242.out | 2 {"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 16384, "name"… 21 No bitmap in JSON format output 24 {"execute": "block-dirty-bitmap-add", "arguments": {"disabled": true, "granularity": 32768, "name":… 42 name: bitmap-1 53 "name": "bitmap-1" 58 {"execute": "block-dirty-bitmap-add", "arguments": {"disabled": false, "granularity": 65536, "name"… 76 name: bitmap-1 81 name: bitmap-2 92 "name": "bitmap-1" 99 "name": "bitmap-2" [all …]
|
H A D | 257.out | 2 === Mode bitmap; Bitmap Sync never with simulated failure === 37 --- Add Bitmap --- 39 {"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmap0", "node"… 67 = Checking Bitmap bitmap0 = 94 … false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "back… 152 = Checking Bitmap bitmap0 = 155 = Checking Bitmap (anonymous) = 177 = Checking Bitmap bitmap0 = 205 = Checking Bitmap bitmap0 = 232 … false, "bitmap": "bitmap0", "bitmap-mode": "never", "device": "drive0", "filter-node-name": "back… [all …]
|
H A D | 124 | 43 return transaction_action('block-dirty-bitmap-clear', 52 class Bitmap: class 191 def make_reference_backup(self, bitmap=None): argument 192 if bitmap is None: 193 bitmap = self.bitmaps[-1] 194 _, reference = bitmap.last_target() 195 res = self.do_qmp_backup(job_id=bitmap.drive['id'], 196 device=bitmap.drive['id'], sync='full', 197 format=bitmap.drive['fmt'], target=reference) 202 bitmap = Bitmap(name, drive) [all …]
|
H A D | 246 | 4 # Test persistent bitmap resizing. 50 vm.qmp_log("block-dirty-bitmap-add", node="drive0", 52 vm.qmp_log("block-dirty-bitmap-add", node="drive0", 54 vm.qmp_log("block-dirty-bitmap-add", node="drive0", 56 vm.qmp_log("block-dirty-bitmap-add", node="drive0", 68 log('--- Adding new bitmap, growing image, and adding 2nd new bitmap ---') 69 vm.qmp_log("block-dirty-bitmap-add", node="drive0", 73 vm.qmp_log("block-dirty-bitmap-add", node="drive0", 85 log('--- Adding "NewB" bitmap, removing "New" bitmap ---') 86 vm.qmp_log("block-dirty-bitmap-add", node="drive0", [all …]
|
/openbmc/qemu/migration/ |
H A D | block-dirty-bitmap.c | 2 * Block dirty bitmap postcopy migration 24 * Bitmap migration implies creating bitmap with the same name and granularity 25 * in destination QEMU. If the bitmap with the same name (for the same node) 34 * [ 1 byte: bitmap alias size ] \ flags & BITMAP_NAME 35 * [ n bytes: bitmap alias ] / 37 * # Start of bitmap migration (flags & START) 40 * 1 byte: bitmap flags (corresponds to BdrvDirtyBitmap) 41 * bit 0 - bitmap is enabled 42 * bit 1 - bitmap is persistent 43 * bit 2 - bitmap is autoloading [all …]
|
/openbmc/linux/fs/afs/ |
H A D | dir_edit.c | 19 * There are 64 slots, which means we can load the entire bitmap into a 25 u64 bitmap; in afs_find_contig_bits() local 29 bitmap = (u64)block->hdr.bitmap[0] << 0 * 8; in afs_find_contig_bits() 30 bitmap |= (u64)block->hdr.bitmap[1] << 1 * 8; in afs_find_contig_bits() 31 bitmap |= (u64)block->hdr.bitmap[2] << 2 * 8; in afs_find_contig_bits() 32 bitmap |= (u64)block->hdr.bitmap[3] << 3 * 8; in afs_find_contig_bits() 33 bitmap |= (u64)block->hdr.bitmap[4] << 4 * 8; in afs_find_contig_bits() 34 bitmap |= (u64)block->hdr.bitmap[5] << 5 * 8; in afs_find_contig_bits() 35 bitmap |= (u64)block->hdr.bitmap[6] << 6 * 8; in afs_find_contig_bits() 36 bitmap |= (u64)block->hdr.bitmap[7] << 7 * 8; in afs_find_contig_bits() [all …]
|
/openbmc/qemu/docs/interop/ |
H A D | bitmaps.rst | 31 that is tracked is the granularity of the bitmap. If the granularity of a 32 bitmap is 64K, each '1' bit means that a 64K region as a whole may have 36 requires more computational overhead and larger bitmap sizes. Larger 37 granularities mean smaller bitmap sizes, but less targeted backups. 39 The size of a bitmap (in bytes) can be computed as such: 42 e.g. the size of a 64KiB granularity bitmap on a 2TiB image is: 56 attaching the bitmap elsewhere in the storage graph. This is beyond the scope 72 writes bitmap data to disk upon close. If persistence is not required for a 73 specific use case, all bitmap features excepting persistence are available for 77 any changes to the bitmap will be discarded upon exit. [all …]
|
/openbmc/linux/arch/powerpc/sysdev/ |
H A D | msi_bitmap.c | 9 #include <linux/bitmap.h> 22 offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, in msi_bitmap_alloc_hwirqs() 27 bitmap_set(bmp->bitmap, offset, num); in msi_bitmap_alloc_hwirqs() 48 bitmap_clear(bmp->bitmap, offset, num); in msi_bitmap_free_hwirqs() 60 bitmap_allocate_region(bmp->bitmap, hwirq, 0); in msi_bitmap_reserve_hwirq() 66 * @bmp: pointer to the MSI bitmap. 70 * are reserved in the bitmap. 96 bitmap_allocate_region(bmp->bitmap, 0, get_count_order(bmp->irq_count)); in msi_bitmap_reserve_dt_hwirqs() 104 bitmap_release_region(bmp->bitmap, *p + j, 0); in msi_bitmap_reserve_dt_hwirqs() 121 pr_debug("msi_bitmap: allocator bitmap size is 0x%x bytes\n", size); in msi_bitmap_alloc() [all …]
|
/openbmc/linux/fs/ntfs/ |
H A D | bitmap.h | 3 * bitmap.h - Defines for NTFS kernel bitmap handling. Part of the Linux-NTFS 22 * ntfs_bitmap_set_bits_in_run - set a run of bits in a bitmap to a value 23 * @vi: vfs inode describing the bitmap 28 * Set @count bits starting at bit @start_bit in the bitmap described by the 41 * ntfs_bitmap_set_run - set a run of bits in a bitmap 42 * @vi: vfs inode describing the bitmap 46 * Set @count bits starting at bit @start_bit in the bitmap described by the 58 * ntfs_bitmap_clear_run - clear a run of bits in a bitmap 59 * @vi: vfs inode describing the bitmap 63 * Clear @count bits starting at bit @start_bit in the bitmap described by the [all …]
|
/openbmc/qemu/hw/ppc/ |
H A D | spapr_ovec.c | 17 #include "qemu/bitmap.h" 26 /* we *could* work with bitmaps directly, but handling the bitmap privately 27 * allows us to more safely make assumptions about the bitmap size and 31 unsigned long *bitmap; member 40 VMSTATE_BITMAP(bitmap, SpaprOptionVector, 1, bitmap_size), 50 ov->bitmap = bitmap_new(OV_MAXBITS); in spapr_ovec_new() 63 bitmap_copy(ov->bitmap, ov_orig->bitmap, OV_MAXBITS); in spapr_ovec_clone() 76 bitmap_and(ov->bitmap, ov1->bitmap, ov2->bitmap, OV_MAXBITS); in spapr_ovec_intersect() 88 bitmap_andnot(tmp, ov1->bitmap, ov2->bitmap, OV_MAXBITS); in spapr_ovec_subset() 99 g_free(ov->bitmap); in spapr_ovec_cleanup() [all …]
|
/openbmc/linux/drivers/gpu/drm/panfrost/ |
H A D | panfrost_regs.h | 87 #define GPU_SHADER_PRESENT_LO 0x100 /* (RO) Shader core present bitmap, low word */ 88 #define GPU_SHADER_PRESENT_HI 0x104 /* (RO) Shader core present bitmap, high word */ 89 #define GPU_TILER_PRESENT_LO 0x110 /* (RO) Tiler core present bitmap, low word */ 90 #define GPU_TILER_PRESENT_HI 0x114 /* (RO) Tiler core present bitmap, high word */ 92 #define GPU_L2_PRESENT_LO 0x120 /* (RO) Level 2 cache present bitmap, low word */ 93 #define GPU_L2_PRESENT_HI 0x124 /* (RO) Level 2 cache present bitmap, high word */ 99 #define GPU_STACK_PRESENT_LO 0xE00 /* (RO) Core stack present bitmap, low word */ 100 #define GPU_STACK_PRESENT_HI 0xE04 /* (RO) Core stack present bitmap, high word */ 102 #define SHADER_READY_LO 0x140 /* (RO) Shader core ready bitmap, low word */ 103 #define SHADER_READY_HI 0x144 /* (RO) Shader core ready bitmap, high word */ [all …]
|