Re: [PATCH v7 6/6] hostmem: Handle remapping of RAM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



      /*
@@ -595,6 +628,7 @@ static const TypeInfo host_memory_backend_info = {
      .instance_size = sizeof(HostMemoryBackend),
      .instance_init = host_memory_backend_init,
      .instance_post_init = host_memory_backend_post_init,
+    .instance_finalize = host_memory_backend_finalize,
      .interfaces = (InterfaceInfo[]) {
          { TYPE_USER_CREATABLE },
          { }
diff --git a/include/system/hostmem.h b/include/system/hostmem.h
index 5c21ca55c0..170849e8a4 100644
--- a/include/system/hostmem.h
+++ b/include/system/hostmem.h
@@ -83,6 +83,7 @@ struct HostMemoryBackend {
      HostMemPolicy policy;
MemoryRegion mr;
+    RAMBlockNotifier ram_notifier;
  };

Thinking about Peters comment, it would be a nice improvement to have a single global memory-backend notifier that looks up the fitting memory backend, instead of having one per memory backend.

A per-ramblock notifier might also be possible, but that's a bit harder/ackward to configure: e.g., the resize callback is passed to memory_region_init_resizeable_ram() right now.

--
Cheers,

David / dhildenb





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux