Skip to contentSkip to conversation

build-sys: restrict vmcoreinfo to fw_cfg+dma capable targets

PATCH In review Marc-André Lureau 4 participants 5 messages Nov 6, 2017 – Nov 15, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build-sys: restrict vmcoreinfo to fw_cfg+dma capable targets

vmcoreinfo is built for all targets. However, it requires fw_cfg with DMA operations support (write operation). Restrict vmcoreinfo exposure to architectures that are supporting FW_CFG_DMA, that is arm-virt and x86 only atm.

---
 default-configs/arm-softmmu.mak    | 2 ++
 default-configs/i386-softmmu.mak   | 1 +
 default-configs/x86_64-softmmu.mak | 1 +
 hw/misc/Makefile.objs              | 2 +-
 4 files changed, 5 insertions(+), 1 deletion(-)
default-configs/arm-softmmu.mak +2 -0
index 5059d134c8..d37edc4312 100644
@@ -130,3 +130,5 @@ CONFIG_SMBIOS=y
 CONFIG_ASPEED_SOC=y
 CONFIG_GPIO_KEY=y
 CONFIG_MSF2=y
+
+CONFIG_FW_CFG_DMA=y
default-configs/i386-softmmu.mak +1 -0
index a685c439e7..95ac4b464a 100644
@@ -60,3 +60,4 @@ CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
 CONFIG_PXB=y
 CONFIG_ACPI_VMGENID=y
+CONFIG_FW_CFG_DMA=y
default-configs/x86_64-softmmu.mak +1 -0
index ea69e8289e..0221236825 100644
@@ -60,3 +60,4 @@ CONFIG_SMBIOS=y
 CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
 CONFIG_PXB=y
 CONFIG_ACPI_VMGENID=y
+CONFIG_FW_CFG_DMA=y
hw/misc/Makefile.objs +1 -1
index 19202d90cf..10c88a84b4 100644
@@ -9,7 +9,7 @@ common-obj-$(CONFIG_PCI_TESTDEV) += pci-testdev.o
 common-obj-$(CONFIG_EDU) += edu.o
 
 common-obj-y += unimp.o
-common-obj-y += vmcoreinfo.o
+common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o
 
 obj-$(CONFIG_VMPORT) += vmport.o
 
Signature · 1 line
2.15.0.rc0.40.gaefcc5f6f
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Marc-André Lureau

vmcoreinfo is built for all targets. However, it requires fw_cfg with DMA operations support (write operation). Restrict vmcoreinfo exposure to architectures that are supporting FW_CFG_DMA, that is arm-virt and x86 only atm.

---
 default-configs/arm-softmmu.mak    | 2 ++
 default-configs/i386-softmmu.mak   | 1 +
 default-configs/x86_64-softmmu.mak | 1 +
 hw/misc/Makefile.objs              | 2 +-
 4 files changed, 5 insertions(+), 1 deletion(-)
default-configs/arm-softmmu.mak +0 -0
index 5059d134c8..d37edc4312 100644

default-configs/arm-softmmu.mak CONFIG_SMBIOS=y · line 134

Quoted 5 lines
default-configs/arm-softmmu.mak +2 -0
@@ -130,3 +130,5 @@ CONFIG_SMBIOS=y
 CONFIG_ASPEED_SOC=y
 CONFIG_GPIO_KEY=y
 CONFIG_MSF2=y
+
+CONFIG_FW_CFG_DMA=y

Maybe remove the empty line?

Apart from that, patch looks good to me, so:

#2 lore raw

Hi

Quoted 14 lines · Thomas Huth
Quoted 13 lines · Marc-André Lureau

vmcoreinfo is built for all targets. However, it requires fw_cfg with DMA operations support (write operation). Restrict vmcoreinfo exposure to architectures that are supporting FW_CFG_DMA, that is arm-virt and x86 only atm.

---
 default-configs/arm-softmmu.mak    | 2 ++
 default-configs/i386-softmmu.mak   | 1 +
 default-configs/x86_64-softmmu.mak | 1 +
 hw/misc/Makefile.objs              | 2 +-
 4 files changed, 5 insertions(+), 1 deletion(-)
Quoted 13 lines

default-configs/arm-softmmu.mak CONFIG_SMBIOS=y · line 134

Quoted 10 lines
default-configs/arm-softmmu.mak +2 -0
index 5059d134c8..d37edc4312 100644
@@ -130,3 +130,5 @@ CONFIG_SMBIOS=y
 CONFIG_ASPEED_SOC=y
 CONFIG_GPIO_KEY=y
 CONFIG_MSF2=y
+
+CONFIG_FW_CFG_DMA=y

Maybe remove the empty line?

This file seems to be organized somehow, although it's hard to figure out how for me at first glance ;) commenting sections would help.

Quoted 4 lines

Apart from that, patch looks good to me, so:

thanks

Signature · 1 line
Marc-André Lureau
Reviewed-by Tested-by on v1 1/1
#3 lore raw
In reply to Marc-André Lureau
Quoted 7 lines · Marc-André Lureau

vmcoreinfo is built for all targets. However, it requires fw_cfg with DMA operations support (write operation). Restrict vmcoreinfo exposure to architectures that are supporting FW_CFG_DMA, that is arm-virt and x86 only atm.

---

Quoted 47 lines
  default-configs/arm-softmmu.mak    | 2 ++
  default-configs/i386-softmmu.mak   | 1 +
  default-configs/x86_64-softmmu.mak | 1 +
  hw/misc/Makefile.objs              | 2 +-
  4 files changed, 5 insertions(+), 1 deletion(-)
default-configs/arm-softmmu.mak +2 -0
index 5059d134c8..d37edc4312 100644
@@ -130,3 +130,5 @@ CONFIG_SMBIOS=y
  CONFIG_ASPEED_SOC=y
  CONFIG_GPIO_KEY=y
  CONFIG_MSF2=y
+
+CONFIG_FW_CFG_DMA=y
default-configs/i386-softmmu.mak +1 -0
index a685c439e7..95ac4b464a 100644
@@ -60,3 +60,4 @@ CONFIG_SMBIOS=y
  CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
  CONFIG_PXB=y
  CONFIG_ACPI_VMGENID=y
+CONFIG_FW_CFG_DMA=y
default-configs/x86_64-softmmu.mak +1 -0
index ea69e8289e..0221236825 100644
@@ -60,3 +60,4 @@ CONFIG_SMBIOS=y
  CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
  CONFIG_PXB=y
  CONFIG_ACPI_VMGENID=y
+CONFIG_FW_CFG_DMA=y
hw/misc/Makefile.objs +1 -1
index 19202d90cf..10c88a84b4 100644
@@ -9,7 +9,7 @@ common-obj-$(CONFIG_PCI_TESTDEV) += pci-testdev.o
  common-obj-$(CONFIG_EDU) += edu.o
 
  common-obj-y += unimp.o
-common-obj-y += vmcoreinfo.o
+common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o
 
  obj-$(CONFIG_VMPORT) += vmport.o
 
#4 lore raw

Michael,

Could you pick this patch for 2.11 ?

thanks

Quoted 68 lines · Daniel Henrique Barboza
Quoted 8 lines · Marc-André Lureau

vmcoreinfo is built for all targets. However, it requires fw_cfg with DMA operations support (write operation). Restrict vmcoreinfo exposure to architectures that are supporting FW_CFG_DMA, that is arm-virt and x86 only atm.

---

Quoted 48 lines
  default-configs/arm-softmmu.mak    | 2 ++
  default-configs/i386-softmmu.mak   | 1 +
  default-configs/x86_64-softmmu.mak | 1 +
  hw/misc/Makefile.objs              | 2 +-
  4 files changed, 5 insertions(+), 1 deletion(-)
default-configs/arm-softmmu.mak +2 -0
index 5059d134c8..d37edc4312 100644
@@ -130,3 +130,5 @@ CONFIG_SMBIOS=y
  CONFIG_ASPEED_SOC=y
  CONFIG_GPIO_KEY=y
  CONFIG_MSF2=y
+
+CONFIG_FW_CFG_DMA=y
default-configs/i386-softmmu.mak +1 -0
index a685c439e7..95ac4b464a 100644
@@ -60,3 +60,4 @@ CONFIG_SMBIOS=y
  CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
  CONFIG_PXB=y
  CONFIG_ACPI_VMGENID=y
+CONFIG_FW_CFG_DMA=y
default-configs/x86_64-softmmu.mak +1 -0
index ea69e8289e..0221236825 100644
@@ -60,3 +60,4 @@ CONFIG_SMBIOS=y
  CONFIG_HYPERV_TESTDEV=$(CONFIG_KVM)
  CONFIG_PXB=y
  CONFIG_ACPI_VMGENID=y
+CONFIG_FW_CFG_DMA=y
hw/misc/Makefile.objs +1 -1
index 19202d90cf..10c88a84b4 100644
@@ -9,7 +9,7 @@ common-obj-$(CONFIG_PCI_TESTDEV) += pci-testdev.o
  common-obj-$(CONFIG_EDU) += edu.o
    common-obj-y += unimp.o
-common-obj-y += vmcoreinfo.o
+common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o
    obj-$(CONFIG_VMPORT) += vmport.o
 
Signature · 1 line
Marc-André Lureau