[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/17] fw-cfg: bump "x-file-slots" to 0x20 for 2.9+ m
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 08/17] fw-cfg: bump "x-file-slots" to 0x20 for 2.9+ machine types |
Date: |
Thu, 19 Jan 2017 23:09:30 +0200 |
From: Laszlo Ersek <address@hidden>
More precisely, the "x-file-slots" count is bumped for all machine types
that:
(a) use fw_cfg, and
(b) are not versioned (hence migration is not expected to work for them
across QEMU releases anyway), or have version 2.9.
This affects machine types implemented in the following source files:
- "hw/arm/virt.c". The "virt-*" machine type is versioned, and the <= 2.8
versions already depend on HW_COMPAT_2_8 (see commit e353aac51b944).
Therefore adding the "x-file-slots" compat values to HW_COMPAT_2_8
suffices.
- "hw/i386/pc.c". The "pc-i440fx-*" (including "pc-*") and "pc-q35-*"
machine types are versioned. Modifying HW_COMPAT_2_8 is sufficient here
too (see commit "pc: Add 2.9 machine-types"). The "isapc" machtype is
not versioned. The "xenfv" machine type, which uses fw_cfg for direct
kernel booting, is also not versioned.
- "hw/ppc/mac_newworld.c". The "mac99" machine type is not versioned.
- "hw/ppc/mac_oldworld.c". The "g3beige" machine type is not versioned.
- "hw/sparc/sun4m.c". None of the 9 machine types defined in this file
appear versioned.
- "hw/sparc64/sun4u.c". None of the 3 machine types defined in this file
appear versioned.
Cc: "Gabriel L. Somlo" <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Alexander Graf <address@hidden>
Cc: Anthony Perard <address@hidden>
Cc: Artyom Tarasenko <address@hidden>
Cc: David Gibson <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: Gerd Hoffmann <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Mark Cave-Ayland <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Stefano Stabellini <address@hidden>
Signed-off-by: Laszlo Ersek <address@hidden>
Acked-by: Gabriel Somlo <address@hidden>
Tested-by: Gabriel Somlo <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
---
docs/specs/fw_cfg.txt | 4 ++--
include/hw/compat.h | 10 +++++++++-
hw/nvram/fw_cfg.c | 6 ++++--
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/docs/specs/fw_cfg.txt b/docs/specs/fw_cfg.txt
index 9373bbc..08c00bd 100644
--- a/docs/specs/fw_cfg.txt
+++ b/docs/specs/fw_cfg.txt
@@ -155,8 +155,8 @@ Selector Reg. Range Usage
through the DMA interface in QEMU v2.9+)
0xc000 - 0xffff Arch. Specific (0x0000 - 0x3fff, RW, ignored in v2.4+)
-In practice, the number of allowed firmware configuration items is given
-by the value (FW_CFG_FILE_FIRST + FW_CFG_FILE_SLOTS_MIN) (see fw_cfg.h).
+In practice, the number of allowed firmware configuration items depends on the
+machine type/version.
= Guest-side DMA Interface =
diff --git a/include/hw/compat.h b/include/hw/compat.h
index 4fe44d1..34e9b4a 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -2,7 +2,15 @@
#define HW_COMPAT_H
#define HW_COMPAT_2_8 \
- /* empty */
+ {\
+ .driver = "fw_cfg_mem",\
+ .property = "x-file-slots",\
+ .value = stringify(0x10),\
+ },{\
+ .driver = "fw_cfg_io",\
+ .property = "x-file-slots",\
+ .value = stringify(0x10),\
+ },
#define HW_COMPAT_2_7 \
{\
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index bf75ef7..523d585 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -35,6 +35,8 @@
#include "qemu/cutils.h"
#include "qapi/error.h"
+#define FW_CFG_FILE_SLOTS_DFLT 0x20
+
#define FW_CFG_NAME "fw_cfg"
#define FW_CFG_PATH "/machine/" FW_CFG_NAME
@@ -1058,7 +1060,7 @@ static Property fw_cfg_io_properties[] = {
DEFINE_PROP_BOOL("dma_enabled", FWCfgIoState, parent_obj.dma_enabled,
true),
DEFINE_PROP_UINT16("x-file-slots", FWCfgIoState, parent_obj.file_slots,
- FW_CFG_FILE_SLOTS_MIN),
+ FW_CFG_FILE_SLOTS_DFLT),
DEFINE_PROP_END_OF_LIST(),
};
@@ -1110,7 +1112,7 @@ static Property fw_cfg_mem_properties[] = {
DEFINE_PROP_BOOL("dma_enabled", FWCfgMemState, parent_obj.dma_enabled,
true),
DEFINE_PROP_UINT16("x-file-slots", FWCfgMemState, parent_obj.file_slots,
- FW_CFG_FILE_SLOTS_MIN),
+ FW_CFG_FILE_SLOTS_DFLT),
DEFINE_PROP_END_OF_LIST(),
};
--
MST
- [Qemu-devel] [PULL 00/17] virtio, vhost, pc: fixes, features, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 01/17] virtio-net: enable ioeventfd even if vhost=off, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 02/17] Revert "virtio: turn vq->notification into a nested counter", Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 03/17] virtio: disable notifications again after poll succeeded, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 04/17] vhost_net: device IOTLB support, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 06/17] fw-cfg: turn FW_CFG_FILE_SLOTS into a device property, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 07/17] pc: Add 2.9 machine-types, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 05/17] fw-cfg: support writeable blobs, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 08/17] fw-cfg: bump "x-file-slots" to 0x20 for 2.9+ machine types,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 09/17] virtio: drop an obsolete comment, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 10/17] virtio_mmio: add standard header file, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 11/17] virtio-mmio: switch to linux headers, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 12/17] pci_regs: update to latest linux, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 14/17] update-linux-headers.sh: support __bitwise, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 13/17] virtio_crypto: header update, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 15/17] vhost: drop VHOST_F_DEVICE_IOTLB, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 16/17] virtio: fix up max size checks, Michael S. Tsirkin, 2017/01/19
- [Qemu-devel] [PULL 17/17] virtio: force VIRTIO_F_IOMMU_PLATFORM, Michael S. Tsirkin, 2017/01/19
- Re: [Qemu-devel] [PULL 00/17] virtio, vhost, pc: fixes, features, Peter Maydell, 2017/01/20