diff mbox

[RFC,v0,1/3] pc-dimm: Add a field to PCDIMMDevice to mark device deletion state

Message ID 1439967371-15870-2-git-send-email-bharata@linux.vnet.ibm.com
State New
Headers show

Commit Message

Bharata B Rao Aug. 19, 2015, 6:56 a.m. UTC
Add a field to PCDIMMDevice to note that the device has been marked
for removal. This will be used by PowerPC memory hotplug code to
honour the LMB removal requests of only those LMBs that belong to
PCDIMMDevice that has been marked for removal. This will be set from
-unplug() handler.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
---
 include/hw/mem/pc-dimm.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael Roth Aug. 25, 2015, 2:30 a.m. UTC | #1
Quoting Bharata B Rao (2015-08-19 01:56:09)
> Add a field to PCDIMMDevice to note that the device has been marked
> for removal. This will be used by PowerPC memory hotplug code to
> honour the LMB removal requests of only those LMBs that belong to
> PCDIMMDevice that has been marked for removal. This will be set from
> -unplug() handler.

Why not track the delete pending state in the DRC? We have an
awaiting_release flag there for similar purpose.

> 
> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
> ---
>  include/hw/mem/pc-dimm.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
> index d83bf30..4ca9316 100644
> --- a/include/hw/mem/pc-dimm.h
> +++ b/include/hw/mem/pc-dimm.h
> @@ -56,6 +56,7 @@ typedef struct PCDIMMDevice {
>      uint32_t node;
>      int32_t slot;
>      HostMemoryBackend *hostmem;
> +    bool delete_pending;
>  } PCDIMMDevice;
> 
>  /**
> -- 
> 2.1.0
>
Bharata B Rao Aug. 26, 2015, 4:32 a.m. UTC | #2
On Mon, Aug 24, 2015 at 09:30:35PM -0500, Michael Roth wrote:
> Quoting Bharata B Rao (2015-08-19 01:56:09)
> > Add a field to PCDIMMDevice to note that the device has been marked
> > for removal. This will be used by PowerPC memory hotplug code to
> > honour the LMB removal requests of only those LMBs that belong to
> > PCDIMMDevice that has been marked for removal. This will be set from
> > -unplug() handler.
> 
> Why not track the delete pending state in the DRC? We have an
> awaiting_release flag there for similar purpose.

Ah yes, that should be possible. Will drop this patch in the
next iteration.

Regards,
Bharata.
diff mbox

Patch

diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index d83bf30..4ca9316 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -56,6 +56,7 @@  typedef struct PCDIMMDevice {
     uint32_t node;
     int32_t slot;
     HostMemoryBackend *hostmem;
+    bool delete_pending;
 } PCDIMMDevice;
 
 /**