Skip to contentSkip to conversation

hw/mem/nvdimm: fix error message for 'unarmed' flag

PATCH Superseded Julia Suvorova 5 participants 12 messages May 31, 2022 – Jun 17, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/mem/nvdimm: fix error message for 'unarmed' flag

In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is read-only, the 'unarmed' flag must be turned on. The logic is correct, just changing the error message.

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

---
 hw/mem/nvdimm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/mem/nvdimm.c +1 -1
index 7c7d777781..bfb76818c1 100644
@@ -149,7 +149,7 @@ static void nvdimm_prepare_memory_region(NVDIMMDevice *nvdimm, Error **errp)
     if (!nvdimm->unarmed && memory_region_is_rom(mr)) {
         HostMemoryBackend *hostmem = dimm->hostmem;
 
-        error_setg(errp, "'unarmed' property must be off since memdev %s "
+        error_setg(errp, "'unarmed' property must be on since memdev %s "
                    "is read-only",
                    object_get_canonical_path_component(OBJECT(hostmem)));
         return;
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Julia Suvorova

In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is read-only, the 'unarmed' flag must be turned on. The logic is correct, just changing the error message.

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

---
 hw/mem/nvdimm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw
Quoted 7 lines · Stefan Hajnoczi
Quoted 5 lines · Julia Suvorova

In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is read-only, the 'unarmed' flag must be turned on. The logic is correct, just changing the error message.

Quoted 8 lines
Quoted 6 lines

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

---
 hw/mem/nvdimm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

It seems like Xiao is not active, whose tree should this patch go to?

Best regards, Julia Suvorova.

#3 lore raw
Quoted 10 lines · Julia Suvorova
Quoted 9 lines · Stefan Hajnoczi
Quoted 7 lines · Julia Suvorova

In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is read-only, the 'unarmed' flag must be turned on. The logic is correct, just changing the error message.

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
---
 hw/mem/nvdimm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

It seems like Xiao is not active, whose tree should this patch go to?

Michael or Igor can merge it:

  $ scripts/get_maintainer.pl -f hw/mem/nvdimm.c
  Xiao Guangrong <[email protected]> (maintainer:NVDIMM)
  "Michael S. Tsirkin" <[email protected]> (supporter:ACPI/SMBIOS)
  Igor Mammedov <[email protected]> (supporter:ACPI/SMBIOS)
  Ani Sinha <[email protected]> (reviewer:ACPI/SMBIOS)
  [email protected] (open list:All patches CC here)

Stefan

#4 lore raw
Quoted 11 lines · On Mon, 13 Jun 2022 16:09:53 +0100 Stefan Hajnoczi <[email protected]> wrote:
Quoted 10 lines · Julia Suvorova
Quoted 9 lines · Stefan Hajnoczi
Quoted 7 lines · Julia Suvorova

In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is read-only, the 'unarmed' flag must be turned on. The logic is correct, just changing the error message.

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
---
 hw/mem/nvdimm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)  

It seems like Xiao is not active, whose tree should this patch go to?

Perhaps David can add himself as maintainer (i.e. put it under memory mantanership umbrella) and merge it

Quoted 11 lines

Michael or Igor can merge it:

  $ scripts/get_maintainer.pl -f hw/mem/nvdimm.c
  Xiao Guangrong <[email protected]> (maintainer:NVDIMM)
  "Michael S. Tsirkin" <[email protected]> (supporter:ACPI/SMBIOS)
  Igor Mammedov <[email protected]> (supporter:ACPI/SMBIOS)
  Ani Sinha <[email protected]> (reviewer:ACPI/SMBIOS)
  [email protected] (open list:All patches CC here)

Stefan

#5 lore raw
Quoted 14 lines · Igor Mammedov
Quoted 11 lines · On Mon, 13 Jun 2022 16:09:53 +0100 Stefan Hajnoczi <[email protected]> wrote:
Quoted 10 lines · Julia Suvorova
Quoted 9 lines · Stefan Hajnoczi
Quoted 7 lines · Julia Suvorova

In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is read-only, the 'unarmed' flag must be turned on. The logic is correct, just changing the error message.

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
---
 hw/mem/nvdimm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)  

It seems like Xiao is not active, whose tree should this patch go to?

Is that a temporary or a permanent thing? Do we know?

Quoted 3 lines

Perhaps David can add himself as maintainer (i.e. put it under memory mantanership umbrella) and merge it

Maybe it makes sense to combine NVDIMM with pc-dimm.c and memory-device.c into a "MEMORY DEVICE" section. Then, remove "hw/mem/*" from "ACPI/SMBIOS".

cxl_type3.c, npcm7xx_mc.c and sparse-mem.c in /hw/mem/ are a bit different. We could add cxl_type3.c to "Compute Express Link". npcm7xx_mc.c and sparse-mem.c should be already covered.

Signature · 3 lines
Thanks,

David / dhildenb
#6 lore raw
Quoted 21 lines · David Hildenbrand
Quoted 19 lines · Igor Mammedov
Quoted 16 lines · On Mon, 13 Jun 2022 16:09:53 +0100 Stefan Hajnoczi <[email protected]> wrote:
Quoted 15 lines · Julia Suvorova
Quoted 14 lines · Stefan Hajnoczi
Quoted 11 lines · Julia Suvorova

In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is read-only, the 'unarmed' flag must be turned on. The logic is correct, just changing the error message.

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

---
 hw/mem/nvdimm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

It seems like Xiao is not active, whose tree should this patch go to?

Is that a temporary or a permanent thing? Do we know?

No idea. But his last signed-off was three years ago.

Quoted 17 lines
Quoted 3 lines

Perhaps David can add himself as maintainer (i.e. put it under memory mantanership umbrella) and merge it

Maybe it makes sense to combine NVDIMM with pc-dimm.c and memory-device.c into a "MEMORY DEVICE" section. Then, remove "hw/mem/*" from "ACPI/SMBIOS".

cxl_type3.c, npcm7xx_mc.c and sparse-mem.c in /hw/mem/ are a bit different. We could add cxl_type3.c to "Compute Express Link". npcm7xx_mc.c and sparse-mem.c should be already covered.

--
Thanks,

David / dhildenb

#7 lore raw
Quoted 22 lines · Julia Suvorova
Quoted 21 lines · David Hildenbrand
Quoted 19 lines · Igor Mammedov
Quoted 16 lines · On Mon, 13 Jun 2022 16:09:53 +0100 Stefan Hajnoczi <[email protected]> wrote:
Quoted 15 lines · Julia Suvorova
Quoted 14 lines · Stefan Hajnoczi
Quoted 11 lines · Julia Suvorova

In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is read-only, the 'unarmed' flag must be turned on. The logic is correct, just changing the error message.

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

---
 hw/mem/nvdimm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

It seems like Xiao is not active, whose tree should this patch go to?

Is that a temporary or a permanent thing? Do we know?

No idea. But his last signed-off was three years ago.

I sent a patch to Xiao, asking if he's still active in QEMU. If I don't get a reply this week, I'll move forward with proposing an update to MAINTAINERS as described.

Signature · 3 lines
Thanks,

David / dhildenb
#8 lore raw
Quoted 8 lines · David Hildenbrand
Quoted 3 lines
Quoted 1 line

Is that a temporary or a permanent thing? Do we know?

No idea. But his last signed-off was three years ago.

I sent a patch to Xiao, asking if he's still active in QEMU. If I don't get a reply this week, I'll move forward with proposing an update to MAINTAINERS as described.

Okay, please do it.

Sorry, I am just roughly reading the mailing list of qemu & kvm usually, and do not get enough time to actively review or contribute on these fields. :-(

#9 lore raw
Quoted 7 lines · Xiao Guangrong
Quoted 5 lines · David Hildenbrand
Quoted 3 lines
Quoted 1 line

Is that a temporary or a permanent thing? Do we know?

No idea. But his last signed-off was three years ago.

I sent a patch to Xiao, asking if he's still active in QEMU. If I don't

s/patch/mail/ :)

Quoted 9 lines
Quoted 3 lines

get a reply this week, I'll move forward with proposing an update to MAINTAINERS as described.

Okay, please do it.

Sorry, I am just roughly reading the mailing list of qemu & kvm usually, and do not get enough time to actively review or contribute on these fields. :-(

Not an issue, thanks for that information and thanks for your work in the past on that!

Should I keep you entered as a reviewer for the new section?

Signature · 3 lines
Thanks,

David / dhildenb
#10 lore raw
Quoted 3 lines · David Hildenbrand
Quoted 1 line · Xiao Guangrong

On Wed, Jun 15, 2022 at 4:24 PM David Hildenbrand <[email protected]>

Quoted 15 lines · wrote:
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Is that a temporary or a permanent thing? Do we know?

No idea. But his last signed-off was three years ago.

I sent a patch to Xiao, asking if he's still active in QEMU. If I don't

s/patch/mail/ :)

Quoted 6 lines
Quoted 3 lines

get a reply this week, I'll move forward with proposing an update to MAINTAINERS as described.

Okay, please do it.

Quoted 8 lines
Quoted 3 lines

Sorry, I am just roughly reading the mailing list of qemu & kvm usually, and do not get enough time to actively review or contribute on these fields. :-(

Not an issue, thanks for that information and thanks for your work in the past on that!

Should I keep you entered as a reviewer for the new section?

Okay, that is good for me! :)

#11 lore raw
In reply to David Hildenbrand
Quoted 27 lines · On Tue, 14 Jun 2022 11:50:43 +0200 David Hildenbrand <[email protected]> wrote:
Quoted 14 lines · Igor Mammedov
Quoted 11 lines · On Mon, 13 Jun 2022 16:09:53 +0100 Stefan Hajnoczi <[email protected]> wrote:
Quoted 10 lines · Julia Suvorova
Quoted 9 lines · Stefan Hajnoczi
Quoted 7 lines · Julia Suvorova

In the ACPI specification [1], the 'unarmed' bit is set when a device cannot accept a persistent write. This means that when a memdev is read-only, the 'unarmed' flag must be turned on. The logic is correct, just changing the error message.

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
---
 hw/mem/nvdimm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)    

It seems like Xiao is not active, whose tree should this patch go to?

Is that a temporary or a permanent thing? Do we know?

Quoted 1 line
Quoted 6 lines
Quoted 2 lines

Perhaps David can add himself as maintainer (i.e. put it under memory mantanership umbrella) and merge it

Maybe it makes sense to combine NVDIMM with pc-dimm.c and memory-device.c into a "MEMORY DEVICE" section. Then, remove "hw/mem/*" from "ACPI/SMBIOS".

just keep me on supporter list for them so I won't miss patches that needs reviewing.

Quoted 3 lines

cxl_type3.c, npcm7xx_mc.c and sparse-mem.c in /hw/mem/ are a bit different. We could add cxl_type3.c to "Compute Express Link". npcm7xx_mc.c and sparse-mem.c should be already covered.

for cxl I'd add Michael as it's mostly all PCI stuff