* [PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2
@ 2020-04-02 17:23 Leonardo Bras
2020-04-02 22:49 ` David Gibson
0 siblings, 1 reply; 7+ messages in thread
From: Leonardo Bras @ 2020-04-02 17:23 UTC (permalink / raw)
To: David Gibson, Bharata B Rao
Cc: Leonardo Bras, qemu-ppc, qemu-devel, Bharata B Rao
On reboot, all memory that was previously added using object_add and
device_add is placed in this DIMM area.
The new SPAPR_LMB_FLAGS_HOTREMOVABLE flag helps Linux to put this memory in
the correct memory zone, so no unmovable allocations are made there,
allowing the object to be easily hot-removed by device_del and
object_del.
This new flag was accepted in Power Architecture documentation.
Signed-off-by: Leonardo Bras <leonardo@linux.ibm.com>
Reviewed-by: Bharata B Rao <bharata@linux.ibm.com>
---
Changes since v1:
- Flag name changed from SPAPR_LMB_FLAGS_HOTPLUGGED to
SPAPR_LMB_FLAGS_HOTREMOVABLE
---
hw/ppc/spapr.c | 3 ++-
include/hw/ppc/spapr.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 9a2bd501aa..fe662e297e 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -446,7 +446,8 @@ static int spapr_dt_dynamic_memory_v2(SpaprMachineState *spapr, void *fdt,
g_assert(drc);
elem = spapr_get_drconf_cell(size / lmb_size, addr,
spapr_drc_index(drc), node,
- SPAPR_LMB_FLAGS_ASSIGNED);
+ (SPAPR_LMB_FLAGS_ASSIGNED |
+ SPAPR_LMB_FLAGS_HOTREMOVABLE);
QSIMPLEQ_INSERT_TAIL(&drconf_queue, elem, entry);
nr_entries++;
cur_addr = addr + size;
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 42d64a0368..93e0d43051 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -880,6 +880,7 @@ int spapr_rtc_import_offset(SpaprRtcState *rtc, int64_t legacy_offset);
#define SPAPR_LMB_FLAGS_ASSIGNED 0x00000008
#define SPAPR_LMB_FLAGS_DRC_INVALID 0x00000020
#define SPAPR_LMB_FLAGS_RESERVED 0x00000080
+#define SPAPR_LMB_FLAGS_HOTREMOVABLE 0x00000100
void spapr_do_system_reset_on_cpu(CPUState *cs, run_on_cpu_data arg);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2
2020-04-02 17:23 [PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2 Leonardo Bras
@ 2020-04-02 22:49 ` David Gibson
2020-04-02 23:00 ` Leonardo Bras
0 siblings, 1 reply; 7+ messages in thread
From: David Gibson @ 2020-04-02 22:49 UTC (permalink / raw)
To: Leonardo Bras; +Cc: Bharata B Rao, qemu-ppc, qemu-devel, Bharata B Rao
[-- Attachment #1: Type: text/plain, Size: 2417 bytes --]
On Thu, Apr 02, 2020 at 02:23:40PM -0300, Leonardo Bras wrote:
> On reboot, all memory that was previously added using object_add and
> device_add is placed in this DIMM area.
>
> The new SPAPR_LMB_FLAGS_HOTREMOVABLE flag helps Linux to put this memory in
> the correct memory zone, so no unmovable allocations are made there,
> allowing the object to be easily hot-removed by device_del and
> object_del.
>
> This new flag was accepted in Power Architecture documentation.
>
> Signed-off-by: Leonardo Bras <leonardo@linux.ibm.com>
> Reviewed-by: Bharata B Rao <bharata@linux.ibm.com>
The change looks reasonable. Is there a PAPR RFC I can see describing
the new bit, though?
> ---
> Changes since v1:
> - Flag name changed from SPAPR_LMB_FLAGS_HOTPLUGGED to
> SPAPR_LMB_FLAGS_HOTREMOVABLE
> ---
> hw/ppc/spapr.c | 3 ++-
> include/hw/ppc/spapr.h | 1 +
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 9a2bd501aa..fe662e297e 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -446,7 +446,8 @@ static int spapr_dt_dynamic_memory_v2(SpaprMachineState *spapr, void *fdt,
> g_assert(drc);
> elem = spapr_get_drconf_cell(size / lmb_size, addr,
> spapr_drc_index(drc), node,
> - SPAPR_LMB_FLAGS_ASSIGNED);
> + (SPAPR_LMB_FLAGS_ASSIGNED |
> + SPAPR_LMB_FLAGS_HOTREMOVABLE);
> QSIMPLEQ_INSERT_TAIL(&drconf_queue, elem, entry);
> nr_entries++;
> cur_addr = addr + size;
> diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> index 42d64a0368..93e0d43051 100644
> --- a/include/hw/ppc/spapr.h
> +++ b/include/hw/ppc/spapr.h
> @@ -880,6 +880,7 @@ int spapr_rtc_import_offset(SpaprRtcState *rtc, int64_t legacy_offset);
> #define SPAPR_LMB_FLAGS_ASSIGNED 0x00000008
> #define SPAPR_LMB_FLAGS_DRC_INVALID 0x00000020
> #define SPAPR_LMB_FLAGS_RESERVED 0x00000080
> +#define SPAPR_LMB_FLAGS_HOTREMOVABLE 0x00000100
>
> void spapr_do_system_reset_on_cpu(CPUState *cs, run_on_cpu_data arg);
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2
2020-04-02 22:49 ` David Gibson
@ 2020-04-02 23:00 ` Leonardo Bras
2020-04-02 23:16 ` David Gibson
0 siblings, 1 reply; 7+ messages in thread
From: Leonardo Bras @ 2020-04-02 23:00 UTC (permalink / raw)
To: David Gibson; +Cc: Bharata B Rao, qemu-ppc, qemu-devel, Bharata B Rao
[-- Attachment #1: Type: text/plain, Size: 630 bytes --]
Hello David,
On Fri, 2020-04-03 at 09:49 +1100, David Gibson wrote:
>
> The change looks reasonable. Is there a PAPR RFC I can see describing
> the new bit, though?
The ACR is approved and I already added the change to LoPAPR/LOPAR,
it's just a matter of time to get it released.
(I think it's accessible to members of OpenPower Foundation)
This is the snippet of the change:
At the bottom of "Table 3.11: Flag Word", add another line containing:
Hot-removable Memory | 0x00000100 | If b'1', this LMB can be hot-
removed.
| | If b'0', this LMB may not be hot-
removed
Best regards,
Leonardo Bras
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2
2020-04-02 23:00 ` Leonardo Bras
@ 2020-04-02 23:16 ` David Gibson
2020-04-02 23:19 ` Leonardo Bras
0 siblings, 1 reply; 7+ messages in thread
From: David Gibson @ 2020-04-02 23:16 UTC (permalink / raw)
To: Leonardo Bras; +Cc: Bharata B Rao, qemu-ppc, qemu-devel, Bharata B Rao
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
On Thu, Apr 02, 2020 at 08:00:57PM -0300, Leonardo Bras wrote:
> Hello David,
>
> On Fri, 2020-04-03 at 09:49 +1100, David Gibson wrote:
> >
> > The change looks reasonable. Is there a PAPR RFC I can see describing
> > the new bit, though?
>
> The ACR is approved and I already added the change to LoPAPR/LOPAR,
> it's just a matter of time to get it released.
> (I think it's accessible to members of OpenPower Foundation)
Hrm. The latest LoPAPR I can find is from 2016, so a "matter of time"
isn't very encouraging.
>
> This is the snippet of the change:
>
> At the bottom of "Table 3.11: Flag Word", add another line containing:
> Hot-removable Memory | 0x00000100 | If b'1', this LMB can be hot-
> removed.
> | | If b'0', this LMB may not be hot-
> removed
>
> Best regards,
> Leonardo Bras
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2
2020-04-02 23:16 ` David Gibson
@ 2020-04-02 23:19 ` Leonardo Bras
2020-04-02 23:40 ` David Gibson
0 siblings, 1 reply; 7+ messages in thread
From: Leonardo Bras @ 2020-04-02 23:19 UTC (permalink / raw)
To: David Gibson; +Cc: Bharata B Rao, qemu-ppc, qemu-devel, Bharata B Rao
[-- Attachment #1: Type: text/plain, Size: 839 bytes --]
On Fri, 2020-04-03 at 10:16 +1100, David Gibson wrote:
> On Thu, Apr 02, 2020 at 08:00:57PM -0300, Leonardo Bras wrote:
> > Hello David,
> >
> > On Fri, 2020-04-03 at 09:49 +1100, David Gibson wrote:
> > > The change looks reasonable. Is there a PAPR RFC I can see describing
> > > the new bit, though?
> >
> > The ACR is approved and I already added the change to LoPAPR/LOPAR,
> > it's just a matter of time to get it released.
> > (I think it's accessible to members of OpenPower Foundation)
>
> Hrm. The latest LoPAPR I can find is from 2016, so a "matter of time"
> isn't very encouraging.
I understand the feeling.
There is a new initiative inside the OpenPower Foundation to keep these
documents updated.
I think we will be able to have more frequent updates of the
documentation soon.
Best Regards,
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2
2020-04-02 23:19 ` Leonardo Bras
@ 2020-04-02 23:40 ` David Gibson
2020-04-03 0:00 ` Leonardo Bras
0 siblings, 1 reply; 7+ messages in thread
From: David Gibson @ 2020-04-02 23:40 UTC (permalink / raw)
To: Leonardo Bras; +Cc: Bharata B Rao, qemu-ppc, qemu-devel, Bharata B Rao
[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]
On Thu, Apr 02, 2020 at 08:19:34PM -0300, Leonardo Bras wrote:
> On Fri, 2020-04-03 at 10:16 +1100, David Gibson wrote:
> > On Thu, Apr 02, 2020 at 08:00:57PM -0300, Leonardo Bras wrote:
> > > Hello David,
> > >
> > > On Fri, 2020-04-03 at 09:49 +1100, David Gibson wrote:
> > > > The change looks reasonable. Is there a PAPR RFC I can see describing
> > > > the new bit, though?
> > >
> > > The ACR is approved and I already added the change to LoPAPR/LOPAR,
> > > it's just a matter of time to get it released.
> > > (I think it's accessible to members of OpenPower Foundation)
> >
> > Hrm. The latest LoPAPR I can find is from 2016, so a "matter of time"
> > isn't very encouraging.
>
> I understand the feeling.
> There is a new initiative inside the OpenPower Foundation to keep these
> documents updated.
>
> I think we will be able to have more frequent updates of the
> documentation soon.
Urgh. Ok, I'm sorry Leonardo, but,
Nack. I will not merge a change where my only knowledge of the spec
has to be based on hearsay.
By all means use this as ammunition to convince IBM and/or the
openpower foundation to expedite getting a workable document release
process up and running.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2
2020-04-02 23:40 ` David Gibson
@ 2020-04-03 0:00 ` Leonardo Bras
0 siblings, 0 replies; 7+ messages in thread
From: Leonardo Bras @ 2020-04-03 0:00 UTC (permalink / raw)
To: David Gibson; +Cc: Bharata B Rao, qemu-ppc, qemu-devel, Bharata B Rao
[-- Attachment #1: Type: text/plain, Size: 589 bytes --]
On Fri, 2020-04-03 at 10:40 +1100, David Gibson wrote:
> Urgh. Ok, I'm sorry Leonardo, but,
>
> Nack. I will not merge a change where my only knowledge of the spec
> has to be based on hearsay.
>
> By all means use this as ammunition to convince IBM and/or the
> openpower foundation to expedite getting a workable document release
> process up and running.
No problem David, of course I understand your point.
I am working on this document release, and it will probably be
available soon.
When it is, we can visit this patch again.
Best regards,
Leonardo Bras
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-03 0:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-02 17:23 [PATCH v3 1/1] ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2 Leonardo Bras
2020-04-02 22:49 ` David Gibson
2020-04-02 23:00 ` Leonardo Bras
2020-04-02 23:16 ` David Gibson
2020-04-02 23:19 ` Leonardo Bras
2020-04-02 23:40 ` David Gibson
2020-04-03 0:00 ` Leonardo Bras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).