Lines Matching full:memory
2 * Memory Device Interface
14 #include "hw/mem/memory-device.h"
29 /* dropping const here is fine as we don't touch the memory region */ in memory_device_is_empty()
62 if (dev->realized) { /* only realized memory devices matter */ in memory_device_build_list()
82 * Memslots that are reserved by memory devices (required but still reported
89 /* This is unexpected, and we warned already in the memory notifier. */ in get_reserved_memslots()
137 * Consider our soft-limit across all memory devices. We don't really in memory_device_memslot_decision_limit()
158 /* We cannot have any other memory devices? So give all to this device. */ in memory_device_memslot_decision_limit()
165 * still available for memory devices. in memory_device_memslot_decision_limit()
192 /* we will need memory slots for kvm and vhost */ in memory_device_check_addable()
195 error_setg(errp, "hypervisor has not enough free memory slots left"); in memory_device_check_addable()
199 error_setg(errp, "a used vhost backend has not enough free memory slots left"); in memory_device_check_addable()
203 /* will we exceed the total amount of memory specified */ in memory_device_check_addable()
207 " in use of total space for memory devices 0x" RAM_ADDR_FMT, in memory_device_check_addable()
228 " maximum alignment, memory will get fragmented and not" in memory_device_get_free_addr()
229 " all 'maxmem' might be usable for memory devices.", in memory_device_get_free_addr()
241 error_setg(errp, "can't add memory device [0x%" PRIx64 ":0x%" PRIx64 in memory_device_get_free_addr()
242 "], usable range for memory devices [0x%" PRIx64 ":0x%" in memory_device_get_free_addr()
249 error_setg(errp, "can't add memory device, device too big"); in memory_device_get_free_addr()
254 /* find address range that will fit new memory device */ in memory_device_get_free_addr()
272 error_setg(errp, "address range conflicts with memory device" in memory_device_get_free_addr()
289 "memory device - memory fragmented due to alignments"); in memory_device_get_free_addr()
309 /* Let's query infotmation even for empty memory devices. */ in qmp_memory_device_list()
355 /* We support empty memory devices even without device memory. */ in memory_device_pre_plug()
361 error_setg(errp, "the configuration is not prepared for memory devices" in memory_device_pre_plug()
362 " (e.g., for memory hotplug), consider specifying the" in memory_device_pre_plug()
378 * We always want the memory region size to be multiples of the memory in memory_device_pre_plug()
381 * of any additional alignment requirements the memory device might in memory_device_pre_plug()
386 error_setg(errp, "backend memory size must be multiple of 0x%" in memory_device_pre_plug()
476 /* dropping const here is fine as we don't touch the memory region */ in memory_device_get_region_size()
492 warn_report("Unexpected memory region mapped into device memory region."); in memory_devices_region_mod()
497 * The expectation is that each distinct RAM memory region section in in memory_devices_region_mod()
498 * our region for memory devices consumes exactly one memslot in KVM in memory_devices_region_mod()
500 * * ROM memory regions don't consume a memslot. These get used very in memory_devices_region_mod()
501 * rarely for memory devices (R/O NVDIMMs). in memory_devices_region_mod()
502 * * Memslots without a fd (memory-backend-ram) don't necessarily in memory_devices_region_mod()
504 * the memory would be inaccessible by such vhost devices. in memory_devices_region_mod()
513 warn_report("Memory devices use more memory slots than indicated as required."); in memory_devices_region_mod()
536 memory_region_init(&ms->device_memory->mr, OBJECT(ms), "device-memory", in machine_memory_devices_init()
539 "device-memory"); in machine_memory_devices_init()
543 /* Track the number of memslots used by memory devices. */ in machine_memory_devices_init()