qemu-8.0.0-1
Update to latest QEMU upstream release, 8.0.0
This commit is contained in:
parent
27bca4038c
commit
493beb6043
@ -0,0 +1,43 @@
|
||||
From 692764e5310a7d1f5f819cbb2c4fb70405b4b119 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Cameron via <qemu-devel@nongnu.org>
|
||||
Date: Thu, 20 Apr 2023 15:27:49 +0100
|
||||
Subject: [PATCH 1/2] hw/pci-bridge: pci_expander_bridge fix type in
|
||||
pxb_cxl_dev_reset()
|
||||
|
||||
Reproduce issue with
|
||||
|
||||
configure --enable-qom-cast-debug ...
|
||||
|
||||
qemu-system-x86_64 -display none -machine q35,cxl=on -device pxb-cxl,bus=pcie.0
|
||||
|
||||
hw/pci-bridge/pci_expander_bridge.c:54:PXB_DEV: Object 0x5570e0b1ada0 is not an instance of type pxb
|
||||
Aborted
|
||||
|
||||
The type conversion results in the right state structure, but PXB_DEV is
|
||||
not a parent of PXB_CXL_DEV hence the error. Rather than directly
|
||||
cleaning up the inheritance, this is the minimal fix which will be
|
||||
followed by the cleanup.
|
||||
|
||||
Fixes: 154070eaf6 ("hw/pxb-cxl: Support passthrough HDM Decoders unless overridden")
|
||||
Reported-by: Peter Maydell <peter.maydell@linaro.org>
|
||||
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
||||
---
|
||||
hw/pci-bridge/pci_expander_bridge.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c
|
||||
index ead33f0c05..a78327b5f2 100644
|
||||
--- a/hw/pci-bridge/pci_expander_bridge.c
|
||||
+++ b/hw/pci-bridge/pci_expander_bridge.c
|
||||
@@ -311,7 +311,7 @@ static void pxb_cxl_dev_reset(DeviceState *dev)
|
||||
* The CXL specification allows for host bridges with no HDM decoders
|
||||
* if they only have a single root port.
|
||||
*/
|
||||
- if (!PXB_DEV(dev)->hdm_for_passthrough) {
|
||||
+ if (!PXB_CXL_DEV(dev)->hdm_for_passthrough) {
|
||||
dsp_count = pcie_count_ds_ports(hb->bus);
|
||||
}
|
||||
/* Initial reset will have 0 dsp so wait until > 0 */
|
||||
--
|
||||
2.40.0
|
||||
|
325
0002-hw-pci-bridge-Make-PCIe-and-CXL-PXB-Devices-inherit-.patch
Normal file
325
0002-hw-pci-bridge-Make-PCIe-and-CXL-PXB-Devices-inherit-.patch
Normal file
@ -0,0 +1,325 @@
|
||||
From 736ef0dcc04348bd478cc69d772a6b44fe660831 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Cameron via <qemu-devel@nongnu.org>
|
||||
Date: Thu, 20 Apr 2023 15:27:50 +0100
|
||||
Subject: [PATCH 2/2] hw/pci-bridge: Make PCIe and CXL PXB Devices inherit from
|
||||
TYPE_PXB_DEV
|
||||
|
||||
Previously, PXB_CXL_DEVICE, PXB_PCIE_DEVICE and PXB_DEVICE all
|
||||
have PCI_DEVICE as their direct parent but share a common state
|
||||
struct PXBDev. convert_to_pxb() is used to get the PXBDev
|
||||
instance from which ever of these types it is called on.
|
||||
|
||||
This patch switches to an explicit heirarchy based on shared
|
||||
functionality. To allow use of OBJECT_DECLARE_SIMPLE_TYPE()
|
||||
whilst minimizing code changes, all types are renamed to have
|
||||
the postfix _DEV rather than _DEVICE. The new heirarchy
|
||||
has PXB_CXL_DEV with parent PXB_PCIE_DEV which in turn
|
||||
has parent PXB_DEV which continues to have parent PCI_DEVICE.
|
||||
|
||||
This allows simple use of PXB_DEV() etc rather than a custom function
|
||||
+ removal of duplicated properties and moving the CXL specific
|
||||
elements out of struct PXBDev.
|
||||
|
||||
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
|
||||
---
|
||||
hw/acpi/cxl.c | 11 +++---
|
||||
hw/cxl/cxl-host.c | 4 +-
|
||||
hw/pci-bridge/pci_expander_bridge.c | 59 ++++++++++-------------------
|
||||
include/hw/cxl/cxl.h | 4 +-
|
||||
include/hw/pci/pci_bridge.h | 28 ++++++++++----
|
||||
5 files changed, 49 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/hw/acpi/cxl.c b/hw/acpi/cxl.c
|
||||
index 2bf8c07993..92b46bc932 100644
|
||||
--- a/hw/acpi/cxl.c
|
||||
+++ b/hw/acpi/cxl.c
|
||||
@@ -30,9 +30,10 @@
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/uuid.h"
|
||||
|
||||
-static void cedt_build_chbs(GArray *table_data, PXBDev *cxl)
|
||||
+static void cedt_build_chbs(GArray *table_data, PXBCXLDev *cxl)
|
||||
{
|
||||
- SysBusDevice *sbd = SYS_BUS_DEVICE(cxl->cxl.cxl_host_bridge);
|
||||
+ PXBDev *pxb = PXB_DEV(cxl);
|
||||
+ SysBusDevice *sbd = SYS_BUS_DEVICE(cxl->cxl_host_bridge);
|
||||
struct MemoryRegion *mr = sbd->mmio[0].memory;
|
||||
|
||||
/* Type */
|
||||
@@ -45,7 +46,7 @@ static void cedt_build_chbs(GArray *table_data, PXBDev *cxl)
|
||||
build_append_int_noprefix(table_data, 32, 2);
|
||||
|
||||
/* UID - currently equal to bus number */
|
||||
- build_append_int_noprefix(table_data, cxl->bus_nr, 4);
|
||||
+ build_append_int_noprefix(table_data, pxb->bus_nr, 4);
|
||||
|
||||
/* Version */
|
||||
build_append_int_noprefix(table_data, 1, 4);
|
||||
@@ -112,7 +113,7 @@ static void cedt_build_cfmws(GArray *table_data, CXLState *cxls)
|
||||
/* Host Bridge List (list of UIDs - currently bus_nr) */
|
||||
for (i = 0; i < fw->num_targets; i++) {
|
||||
g_assert(fw->target_hbs[i]);
|
||||
- build_append_int_noprefix(table_data, fw->target_hbs[i]->bus_nr, 4);
|
||||
+ build_append_int_noprefix(table_data, PXB_DEV(fw->target_hbs[i])->bus_nr, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,7 +122,7 @@ static int cxl_foreach_pxb_hb(Object *obj, void *opaque)
|
||||
{
|
||||
Aml *cedt = opaque;
|
||||
|
||||
- if (object_dynamic_cast(obj, TYPE_PXB_CXL_DEVICE)) {
|
||||
+ if (object_dynamic_cast(obj, TYPE_PXB_CXL_DEV)) {
|
||||
cedt_build_chbs(cedt->buf, PXB_CXL_DEV(obj));
|
||||
}
|
||||
|
||||
diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c
|
||||
index 6e923ceeaf..034c7805b3 100644
|
||||
--- a/hw/cxl/cxl-host.c
|
||||
+++ b/hw/cxl/cxl-host.c
|
||||
@@ -84,7 +84,7 @@ void cxl_fmws_link_targets(CXLState *cxl_state, Error **errp)
|
||||
bool ambig;
|
||||
|
||||
o = object_resolve_path_type(fw->targets[i],
|
||||
- TYPE_PXB_CXL_DEVICE,
|
||||
+ TYPE_PXB_CXL_DEV,
|
||||
&ambig);
|
||||
if (!o) {
|
||||
error_setg(errp, "Could not resolve CXLFM target %s",
|
||||
@@ -141,7 +141,7 @@ static PCIDevice *cxl_cfmws_find_device(CXLFixedWindow *fw, hwaddr addr)
|
||||
addr += fw->base;
|
||||
|
||||
rb_index = (addr / cxl_decode_ig(fw->enc_int_gran)) % fw->num_targets;
|
||||
- hb = PCI_HOST_BRIDGE(fw->target_hbs[rb_index]->cxl.cxl_host_bridge);
|
||||
+ hb = PCI_HOST_BRIDGE(fw->target_hbs[rb_index]->cxl_host_bridge);
|
||||
if (!hb || !hb->bus || !pci_bus_is_cxl(hb->bus)) {
|
||||
return NULL;
|
||||
}
|
||||
diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c
|
||||
index a78327b5f2..613857b601 100644
|
||||
--- a/hw/pci-bridge/pci_expander_bridge.c
|
||||
+++ b/hw/pci-bridge/pci_expander_bridge.c
|
||||
@@ -50,24 +50,8 @@ struct PXBBus {
|
||||
char bus_path[8];
|
||||
};
|
||||
|
||||
-#define TYPE_PXB_DEVICE "pxb"
|
||||
-DECLARE_INSTANCE_CHECKER(PXBDev, PXB_DEV,
|
||||
- TYPE_PXB_DEVICE)
|
||||
-
|
||||
-#define TYPE_PXB_PCIE_DEVICE "pxb-pcie"
|
||||
-DECLARE_INSTANCE_CHECKER(PXBDev, PXB_PCIE_DEV,
|
||||
- TYPE_PXB_PCIE_DEVICE)
|
||||
-
|
||||
-static PXBDev *convert_to_pxb(PCIDevice *dev)
|
||||
-{
|
||||
- /* A CXL PXB's parent bus is PCIe, so the normal check won't work */
|
||||
- if (object_dynamic_cast(OBJECT(dev), TYPE_PXB_CXL_DEVICE)) {
|
||||
- return PXB_CXL_DEV(dev);
|
||||
- }
|
||||
-
|
||||
- return pci_bus_is_express(pci_get_bus(dev))
|
||||
- ? PXB_PCIE_DEV(dev) : PXB_DEV(dev);
|
||||
-}
|
||||
+#define TYPE_PXB_PCIE_DEV "pxb-pcie"
|
||||
+OBJECT_DECLARE_SIMPLE_TYPE(PXBPCIEDev, PXB_PCIE_DEV)
|
||||
|
||||
static GList *pxb_dev_list;
|
||||
|
||||
@@ -89,14 +73,14 @@ bool cxl_get_hb_passthrough(PCIHostState *hb)
|
||||
|
||||
static int pxb_bus_num(PCIBus *bus)
|
||||
{
|
||||
- PXBDev *pxb = convert_to_pxb(bus->parent_dev);
|
||||
+ PXBDev *pxb = PXB_DEV(bus->parent_dev);
|
||||
|
||||
return pxb->bus_nr;
|
||||
}
|
||||
|
||||
static uint16_t pxb_bus_numa_node(PCIBus *bus)
|
||||
{
|
||||
- PXBDev *pxb = convert_to_pxb(bus->parent_dev);
|
||||
+ PXBDev *pxb = PXB_DEV(bus->parent_dev);
|
||||
|
||||
return pxb->numa_node;
|
||||
}
|
||||
@@ -154,7 +138,7 @@ static char *pxb_host_ofw_unit_address(const SysBusDevice *dev)
|
||||
|
||||
pxb_host = PCI_HOST_BRIDGE(dev);
|
||||
pxb_bus = pxb_host->bus;
|
||||
- pxb_dev = convert_to_pxb(pxb_bus->parent_dev);
|
||||
+ pxb_dev = PXB_DEV(pxb_bus->parent_dev);
|
||||
position = g_list_index(pxb_dev_list, pxb_dev);
|
||||
assert(position >= 0);
|
||||
|
||||
@@ -212,8 +196,8 @@ static void pxb_cxl_realize(DeviceState *dev, Error **errp)
|
||||
*/
|
||||
void pxb_cxl_hook_up_registers(CXLState *cxl_state, PCIBus *bus, Error **errp)
|
||||
{
|
||||
- PXBDev *pxb = PXB_CXL_DEV(pci_bridge_get_device(bus));
|
||||
- CXLHost *cxl = pxb->cxl.cxl_host_bridge;
|
||||
+ PXBCXLDev *pxb = PXB_CXL_DEV(pci_bridge_get_device(bus));
|
||||
+ CXLHost *cxl = pxb->cxl_host_bridge;
|
||||
CXLComponentState *cxl_cstate = &cxl->cxl_cstate;
|
||||
struct MemoryRegion *mr = &cxl_cstate->crb.component_registers;
|
||||
hwaddr offset;
|
||||
@@ -299,7 +283,7 @@ static int pxb_map_irq_fn(PCIDevice *pci_dev, int pin)
|
||||
|
||||
static void pxb_cxl_dev_reset(DeviceState *dev)
|
||||
{
|
||||
- CXLHost *cxl = PXB_CXL_DEV(dev)->cxl.cxl_host_bridge;
|
||||
+ CXLHost *cxl = PXB_CXL_DEV(dev)->cxl_host_bridge;
|
||||
CXLComponentState *cxl_cstate = &cxl->cxl_cstate;
|
||||
PCIHostState *hb = PCI_HOST_BRIDGE(cxl);
|
||||
uint32_t *reg_state = cxl_cstate->crb.cache_mem_registers;
|
||||
@@ -337,7 +321,7 @@ static gint pxb_compare(gconstpointer a, gconstpointer b)
|
||||
static void pxb_dev_realize_common(PCIDevice *dev, enum BusType type,
|
||||
Error **errp)
|
||||
{
|
||||
- PXBDev *pxb = convert_to_pxb(dev);
|
||||
+ PXBDev *pxb = PXB_DEV(dev);
|
||||
DeviceState *ds, *bds = NULL;
|
||||
PCIBus *bus;
|
||||
const char *dev_name = NULL;
|
||||
@@ -365,7 +349,7 @@ static void pxb_dev_realize_common(PCIDevice *dev, enum BusType type,
|
||||
} else if (type == CXL) {
|
||||
bus = pci_root_bus_new(ds, dev_name, NULL, NULL, 0, TYPE_PXB_CXL_BUS);
|
||||
bus->flags |= PCI_BUS_CXL;
|
||||
- PXB_CXL_DEV(dev)->cxl.cxl_host_bridge = PXB_CXL_HOST(ds);
|
||||
+ PXB_CXL_DEV(dev)->cxl_host_bridge = PXB_CXL_HOST(ds);
|
||||
} else {
|
||||
bus = pci_root_bus_new(ds, "pxb-internal", NULL, NULL, 0, TYPE_PXB_BUS);
|
||||
bds = qdev_new("pci-bridge");
|
||||
@@ -418,7 +402,7 @@ static void pxb_dev_realize(PCIDevice *dev, Error **errp)
|
||||
|
||||
static void pxb_dev_exitfn(PCIDevice *pci_dev)
|
||||
{
|
||||
- PXBDev *pxb = convert_to_pxb(pci_dev);
|
||||
+ PXBDev *pxb = PXB_DEV(pci_dev);
|
||||
|
||||
pxb_dev_list = g_list_remove(pxb_dev_list, pxb);
|
||||
}
|
||||
@@ -449,7 +433,7 @@ static void pxb_dev_class_init(ObjectClass *klass, void *data)
|
||||
}
|
||||
|
||||
static const TypeInfo pxb_dev_info = {
|
||||
- .name = TYPE_PXB_DEVICE,
|
||||
+ .name = TYPE_PXB_DEV,
|
||||
.parent = TYPE_PCI_DEVICE,
|
||||
.instance_size = sizeof(PXBDev),
|
||||
.class_init = pxb_dev_class_init,
|
||||
@@ -481,15 +465,14 @@ static void pxb_pcie_dev_class_init(ObjectClass *klass, void *data)
|
||||
k->class_id = PCI_CLASS_BRIDGE_HOST;
|
||||
|
||||
dc->desc = "PCI Express Expander Bridge";
|
||||
- device_class_set_props(dc, pxb_dev_properties);
|
||||
dc->hotpluggable = false;
|
||||
set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
|
||||
}
|
||||
|
||||
static const TypeInfo pxb_pcie_dev_info = {
|
||||
- .name = TYPE_PXB_PCIE_DEVICE,
|
||||
- .parent = TYPE_PCI_DEVICE,
|
||||
- .instance_size = sizeof(PXBDev),
|
||||
+ .name = TYPE_PXB_PCIE_DEV,
|
||||
+ .parent = TYPE_PXB_DEV,
|
||||
+ .instance_size = sizeof(PXBPCIEDev),
|
||||
.class_init = pxb_pcie_dev_class_init,
|
||||
.interfaces = (InterfaceInfo[]) {
|
||||
{ INTERFACE_CONVENTIONAL_PCI_DEVICE },
|
||||
@@ -510,11 +493,7 @@ static void pxb_cxl_dev_realize(PCIDevice *dev, Error **errp)
|
||||
}
|
||||
|
||||
static Property pxb_cxl_dev_properties[] = {
|
||||
- /* Note: 0 is not a legal PXB bus number. */
|
||||
- DEFINE_PROP_UINT8("bus_nr", PXBDev, bus_nr, 0),
|
||||
- DEFINE_PROP_UINT16("numa_node", PXBDev, numa_node, NUMA_NODE_UNASSIGNED),
|
||||
- DEFINE_PROP_BOOL("bypass_iommu", PXBDev, bypass_iommu, false),
|
||||
- DEFINE_PROP_BOOL("hdm_for_passthrough", PXBDev, hdm_for_passthrough, false),
|
||||
+ DEFINE_PROP_BOOL("hdm_for_passthrough", PXBCXLDev, hdm_for_passthrough, false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
@@ -540,9 +519,9 @@ static void pxb_cxl_dev_class_init(ObjectClass *klass, void *data)
|
||||
}
|
||||
|
||||
static const TypeInfo pxb_cxl_dev_info = {
|
||||
- .name = TYPE_PXB_CXL_DEVICE,
|
||||
- .parent = TYPE_PCI_DEVICE,
|
||||
- .instance_size = sizeof(PXBDev),
|
||||
+ .name = TYPE_PXB_CXL_DEV,
|
||||
+ .parent = TYPE_PXB_PCIE_DEV,
|
||||
+ .instance_size = sizeof(PXBCXLDev),
|
||||
.class_init = pxb_cxl_dev_class_init,
|
||||
.interfaces =
|
||||
(InterfaceInfo[]){
|
||||
diff --git a/include/hw/cxl/cxl.h b/include/hw/cxl/cxl.h
|
||||
index b2cffbb364..c453983e83 100644
|
||||
--- a/include/hw/cxl/cxl.h
|
||||
+++ b/include/hw/cxl/cxl.h
|
||||
@@ -23,12 +23,12 @@
|
||||
|
||||
#define CXL_WINDOW_MAX 10
|
||||
|
||||
-typedef struct PXBDev PXBDev;
|
||||
+typedef struct PXBCXLDev PXBCXLDev;
|
||||
|
||||
typedef struct CXLFixedWindow {
|
||||
uint64_t size;
|
||||
char **targets;
|
||||
- PXBDev *target_hbs[8];
|
||||
+ PXBCXLDev *target_hbs[8];
|
||||
uint8_t num_targets;
|
||||
uint8_t enc_int_ways;
|
||||
uint8_t enc_int_gran;
|
||||
diff --git a/include/hw/pci/pci_bridge.h b/include/hw/pci/pci_bridge.h
|
||||
index 1677176b2a..01670e9e65 100644
|
||||
--- a/include/hw/pci/pci_bridge.h
|
||||
+++ b/include/hw/pci/pci_bridge.h
|
||||
@@ -84,7 +84,7 @@ struct PCIBridge {
|
||||
#define PCI_BRIDGE_DEV_PROP_SHPC "shpc"
|
||||
typedef struct CXLHost CXLHost;
|
||||
|
||||
-struct PXBDev {
|
||||
+typedef struct PXBDev {
|
||||
/*< private >*/
|
||||
PCIDevice parent_obj;
|
||||
/*< public >*/
|
||||
@@ -92,15 +92,27 @@ struct PXBDev {
|
||||
uint8_t bus_nr;
|
||||
uint16_t numa_node;
|
||||
bool bypass_iommu;
|
||||
+} PXBDev;
|
||||
+
|
||||
+typedef struct PXBPCIEDev {
|
||||
+ /*< private >*/
|
||||
+ PXBDev parent_obj;
|
||||
+} PXBPCIEDev;
|
||||
+
|
||||
+#define TYPE_PXB_DEV "pxb"
|
||||
+OBJECT_DECLARE_SIMPLE_TYPE(PXBDev, PXB_DEV)
|
||||
+
|
||||
+typedef struct PXBCXLDev {
|
||||
+ /*< private >*/
|
||||
+ PXBPCIEDev parent_obj;
|
||||
+ /*< public >*/
|
||||
+
|
||||
bool hdm_for_passthrough;
|
||||
- struct cxl_dev {
|
||||
- CXLHost *cxl_host_bridge; /* Pointer to a CXLHost */
|
||||
- } cxl;
|
||||
-};
|
||||
+ CXLHost *cxl_host_bridge; /* Pointer to a CXLHost */
|
||||
+} PXBCXLDev;
|
||||
|
||||
-#define TYPE_PXB_CXL_DEVICE "pxb-cxl"
|
||||
-DECLARE_INSTANCE_CHECKER(PXBDev, PXB_CXL_DEV,
|
||||
- TYPE_PXB_CXL_DEVICE)
|
||||
+#define TYPE_PXB_CXL_DEV "pxb-cxl"
|
||||
+OBJECT_DECLARE_SIMPLE_TYPE(PXBCXLDev, PXB_CXL_DEV)
|
||||
|
||||
int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset,
|
||||
uint16_t svid, uint16_t ssid,
|
||||
--
|
||||
2.40.0
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 2f0a0afbf915d36c39c5cfac1e31c6edc7f47bef Mon Sep 17 00:00:00 2001
|
||||
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
|
||||
Date: Thu, 1 Sep 2022 12:43:49 -0300
|
||||
Subject: [PATCH 2/7] tests: Disable pci_virtio_vga for ppc64
|
||||
|
||||
starting QEMU: exec ./qemu-system-ppc64 -qtest unix:/tmp/qtest-2378197.sock -qtest-log /dev/null -chardev socket,path=/tmp/qtest-2378197.qmp,id=char0 -mon chardev=char0,mode=control -display none -vga none -device virtio-vga -accel qtest
|
||||
stderr:
|
||||
qemu-system-ppc64: -device virtio-vga: 'virtio-vga' is not a valid device model name
|
||||
Broken pipe
|
||||
../tests/qtest/libqtest.c:156: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
|
||||
|
||||
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
|
||||
---
|
||||
tests/qtest/display-vga-test.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/qtest/display-vga-test.c b/tests/qtest/display-vga-test.c
|
||||
index ace3bb28e0..628dad4cf2 100644
|
||||
--- a/tests/qtest/display-vga-test.c
|
||||
+++ b/tests/qtest/display-vga-test.c
|
||||
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
|
||||
qtest_add_func("/display/pci/multihead", pci_multihead);
|
||||
qtest_add_func("/display/pci/virtio-gpu", pci_virtio_gpu);
|
||||
if (g_str_equal(arch, "i386") || g_str_equal(arch, "x86_64") ||
|
||||
- g_str_equal(arch, "hppa") || g_str_equal(arch, "ppc64")) {
|
||||
+ g_str_equal(arch, "hppa")) {
|
||||
qtest_add_func("/display/pci/virtio-vga", pci_virtio_vga);
|
||||
}
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,67 +0,0 @@
|
||||
From 5c1d2f920c14d6e8f4ac7abc62714eadaa60f228 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 10 Jan 2023 12:37:14 -0500
|
||||
Subject: [PATCH 3/7] Revert "linux-user: add more compat ioctl definitions"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit c5495f4ecb0cdaaf2e9dddeb48f1689cdb520ca0.
|
||||
|
||||
glibc has fixed (in 2.36.9000-40-g774058d729) the problem
|
||||
that caused a clash when both sys/mount.h annd linux/mount.h
|
||||
are included, and backported this to the 2.36 stable release
|
||||
too:
|
||||
|
||||
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
|
||||
|
||||
It is saner for QEMU to remove the workaround it applied for
|
||||
glibc 2.36 and expect distros to ship the 2.36 maint release
|
||||
with the fix. This avoids needing to add a further workaround
|
||||
to QEMU to deal with the fact that linux/brtfs.h now also pulls
|
||||
in linux/mount.h via linux/fs.h since Linux 6.1
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
---
|
||||
linux-user/syscall.c | 25 -------------------------
|
||||
1 file changed, 25 deletions(-)
|
||||
|
||||
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
||||
index 24b25759be..10af5e0d8e 100644
|
||||
--- a/linux-user/syscall.c
|
||||
+++ b/linux-user/syscall.c
|
||||
@@ -111,31 +111,6 @@
|
||||
#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
|
||||
#define FS_IOC32_GETVERSION _IOR('v', 1, int)
|
||||
#define FS_IOC32_SETVERSION _IOW('v', 2, int)
|
||||
-
|
||||
-#define BLKGETSIZE64 _IOR(0x12,114,size_t)
|
||||
-#define BLKDISCARD _IO(0x12,119)
|
||||
-#define BLKIOMIN _IO(0x12,120)
|
||||
-#define BLKIOOPT _IO(0x12,121)
|
||||
-#define BLKALIGNOFF _IO(0x12,122)
|
||||
-#define BLKPBSZGET _IO(0x12,123)
|
||||
-#define BLKDISCARDZEROES _IO(0x12,124)
|
||||
-#define BLKSECDISCARD _IO(0x12,125)
|
||||
-#define BLKROTATIONAL _IO(0x12,126)
|
||||
-#define BLKZEROOUT _IO(0x12,127)
|
||||
-
|
||||
-#define FIBMAP _IO(0x00,1)
|
||||
-#define FIGETBSZ _IO(0x00,2)
|
||||
-
|
||||
-struct file_clone_range {
|
||||
- __s64 src_fd;
|
||||
- __u64 src_offset;
|
||||
- __u64 src_length;
|
||||
- __u64 dest_offset;
|
||||
-};
|
||||
-
|
||||
-#define FICLONE _IOW(0x94, 9, int)
|
||||
-#define FICLONERANGE _IOW(0x94, 13, struct file_clone_range)
|
||||
-
|
||||
#else
|
||||
#include <linux/fs.h>
|
||||
#endif
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,76 +0,0 @@
|
||||
From b40cf0a490c28d5b79e05382d061983b92a7b2b3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 10 Jan 2023 12:37:25 -0500
|
||||
Subject: [PATCH 4/7] Revert "linux-user: fix compat with glibc >= 2.36
|
||||
sys/mount.h"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit 3cd3df2a9584e6f753bb62a0028bd67124ab5532.
|
||||
|
||||
glibc has fixed (in 2.36.9000-40-g774058d729) the problem
|
||||
that caused a clash when both sys/mount.h annd linux/mount.h
|
||||
are included, and backported this to the 2.36 stable release
|
||||
too:
|
||||
|
||||
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
|
||||
|
||||
It is saner for QEMU to remove the workaround it applied for
|
||||
glibc 2.36 and expect distros to ship the 2.36 maint release
|
||||
with the fix. This avoids needing to add a further workaround
|
||||
to QEMU to deal with the fact that linux/brtfs.h now also pulls
|
||||
in linux/mount.h via linux/fs.h since Linux 6.1
|
||||
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
---
|
||||
linux-user/syscall.c | 18 ------------------
|
||||
meson.build | 2 --
|
||||
2 files changed, 20 deletions(-)
|
||||
|
||||
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
||||
index 10af5e0d8e..d974c76b60 100644
|
||||
--- a/linux-user/syscall.c
|
||||
+++ b/linux-user/syscall.c
|
||||
@@ -95,25 +95,7 @@
|
||||
#include <linux/soundcard.h>
|
||||
#include <linux/kd.h>
|
||||
#include <linux/mtio.h>
|
||||
-
|
||||
-#ifdef HAVE_SYS_MOUNT_FSCONFIG
|
||||
-/*
|
||||
- * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
|
||||
- * which in turn prevents use of linux/fs.h. So we have to
|
||||
- * define the constants ourselves for now.
|
||||
- */
|
||||
-#define FS_IOC_GETFLAGS _IOR('f', 1, long)
|
||||
-#define FS_IOC_SETFLAGS _IOW('f', 2, long)
|
||||
-#define FS_IOC_GETVERSION _IOR('v', 1, long)
|
||||
-#define FS_IOC_SETVERSION _IOW('v', 2, long)
|
||||
-#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
|
||||
-#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
|
||||
-#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
|
||||
-#define FS_IOC32_GETVERSION _IOR('v', 1, int)
|
||||
-#define FS_IOC32_SETVERSION _IOW('v', 2, int)
|
||||
-#else
|
||||
#include <linux/fs.h>
|
||||
-#endif
|
||||
#include <linux/fd.h>
|
||||
#if defined(CONFIG_FIEMAP)
|
||||
#include <linux/fiemap.h>
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 5c6b5a1c75..3172b01089 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -2032,8 +2032,6 @@ config_host_data.set('HAVE_OPTRESET',
|
||||
cc.has_header_symbol('getopt.h', 'optreset'))
|
||||
config_host_data.set('HAVE_IPPROTO_MPTCP',
|
||||
cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
|
||||
-config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG',
|
||||
- cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG'))
|
||||
|
||||
# has_member
|
||||
config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,43 +0,0 @@
|
||||
From 930def8769940600dd7dd587ec2accd4a8b6e1f8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
||||
Date: Mon, 27 Feb 2023 16:02:51 +0000
|
||||
Subject: [PATCH 6/7] [PATCH] test-vmstate: fix bad GTree usage, use-after-free
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
According to g_tree_foreach() documentation:
|
||||
"The tree may not be modified while iterating over it (you can't
|
||||
add/remove items)."
|
||||
|
||||
Fixes: 9a85e4b8f6 ("migration: Support gtree migration")
|
||||
Cc: Eric Auger <eric.auger@redhat.com>
|
||||
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||||
---
|
||||
tests/unit/test-vmstate.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/unit/test-vmstate.c b/tests/unit/test-vmstate.c
|
||||
index 541bb4f63e..36b253eb67 100644
|
||||
--- a/tests/unit/test-vmstate.c
|
||||
+++ b/tests/unit/test-vmstate.c
|
||||
@@ -1074,7 +1074,6 @@ static gboolean diff_tree(gpointer key, gpointer value, gpointer data)
|
||||
struct match_node_data d = {tp->tree2, key, value};
|
||||
|
||||
g_tree_foreach(tp->tree2, tp->match_node, &d);
|
||||
- g_tree_remove(tp->tree1, key);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1084,7 +1083,7 @@ static void compare_trees(GTree *tree1, GTree *tree2,
|
||||
struct tree_cmp_data tp = {tree1, tree2, function};
|
||||
|
||||
g_tree_foreach(tree1, diff_tree, &tp);
|
||||
- assert(g_tree_nnodes(tree1) == 0);
|
||||
+ g_tree_destroy(g_tree_ref(tree1));
|
||||
assert(g_tree_nnodes(tree2) == 0);
|
||||
}
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 4021e0a116b568c312b864dfc27dfeed3317538a Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 27 Feb 2023 17:37:10 +0000
|
||||
Subject: [PATCH 7/7] tests: Ensure TAP version is printed before other
|
||||
messages
|
||||
|
||||
These two tests were failing with this error:
|
||||
|
||||
stderr:
|
||||
TAP parsing error: version number must be on the first line
|
||||
[...]
|
||||
Unknown TAP version. The first line MUST be `TAP version <int>`. Assuming version 12.
|
||||
|
||||
This can be fixed by ensuring we always call g_test_init first in the
|
||||
body of main.
|
||||
|
||||
Thanks: Daniel Berrange, for diagnosing the problem
|
||||
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
|
||||
---
|
||||
tests/qtest/rtl8139-test.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c
|
||||
index 8fa3313cc3..90bb616974 100644
|
||||
--- a/tests/qtest/rtl8139-test.c
|
||||
+++ b/tests/qtest/rtl8139-test.c
|
||||
@@ -196,9 +196,10 @@ int main(int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
- qtest_start("-device rtl8139");
|
||||
-
|
||||
g_test_init(&argc, &argv, NULL);
|
||||
+
|
||||
+ qtest_start("-device rtl8139");
|
||||
+
|
||||
qtest_add_func("/rtl8139/nop", nop);
|
||||
qtest_add_func("/rtl8139/timer", test_init);
|
||||
|
||||
--
|
||||
2.37.3
|
||||
|
45
qemu.spec
45
qemu.spec
@ -325,7 +325,7 @@ Obsoletes: %{name}-system-unicore32-core <= %{epoch}:%{version}-%{release}
|
||||
|
||||
Summary: QEMU is a FAST! processor emulator
|
||||
Name: qemu
|
||||
Version: 7.2.1
|
||||
Version: 8.0.0
|
||||
Release: %{baserelease}%{?rcrel}%{?dist}
|
||||
Epoch: 2
|
||||
License: GPLv2 and BSD and MIT and CC-BY
|
||||
@ -346,19 +346,13 @@ Source36: README.tests
|
||||
|
||||
# Fix SGX assert
|
||||
Patch: 0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch
|
||||
Patch: 0002-tests-Disable-pci_virtio_vga-for-ppc64.patch
|
||||
# Fix compat with kernel-headers >= 6.1
|
||||
Patch: 0003-Revert-linux-user-add-more-compat-ioctl-definitions.patch
|
||||
Patch: 0004-Revert-linux-user-fix-compat-with-glibc-2.36-sys-mou.patch
|
||||
# Fix build with glib2 2.75.3
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2173639
|
||||
# https://gitlab.com/qemu-project/qemu/-/issues/1518
|
||||
# Patch is NOT UPSTREAM.
|
||||
Patch: 0006-PATCH-test-vmstate-fix-bad-GTree-usage-use-after-fre.patch
|
||||
# Fix one of the tests. Sent upstream 2023-02-27.
|
||||
Patch: 0007-tests-Ensure-TAP-version-is-printed-before-other-mes.patch
|
||||
# Fix wrong type and rework inheritance.
|
||||
Patch: 0001-hw-pci-bridge-pci_expander_bridge-fix-type-in-pxb_cx.patch
|
||||
Patch: 0002-hw-pci-bridge-Make-PCIe-and-CXL-PXB-Devices-inherit-.patch
|
||||
|
||||
BuildRequires: meson >= %{meson_version}
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: gnutls-devel
|
||||
@ -506,6 +500,8 @@ BuildRequires: fuse3-devel
|
||||
%if %{have_sdl_image}
|
||||
BuildRequires: SDL2_image-devel
|
||||
%endif
|
||||
# gvnc used by vnc-display-test
|
||||
BuildRequires: pkgconfig(gvnc-1.0)
|
||||
|
||||
%if %{user_static}
|
||||
BuildRequires: glibc-static glib2-static zlib-static
|
||||
@ -606,15 +602,6 @@ This package provides the qemu-pr-helper utility that is required for certain
|
||||
SCSI features.
|
||||
|
||||
|
||||
%package -n qemu-virtiofsd
|
||||
Summary: QEMU virtio-fs shared file system daemon
|
||||
Provides: vhostuser-backend(fs)
|
||||
%description -n qemu-virtiofsd
|
||||
This package provides virtiofsd daemon. This program is a vhost-user backend
|
||||
that implements the virtio-fs device that is used for sharing a host directory
|
||||
tree with a guest.
|
||||
|
||||
|
||||
%package tests
|
||||
Summary: tests for the %{name} package
|
||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||
@ -1444,6 +1431,7 @@ mkdir -p %{static_builddir}
|
||||
--disable-auth-pam \\\
|
||||
--disable-avx2 \\\
|
||||
--disable-avx512f \\\
|
||||
--disable-avx512bw \\\
|
||||
--disable-blkio \\\
|
||||
--disable-block-drv-whitelist-in-tools \\\
|
||||
--disable-bochs \\\
|
||||
@ -1488,6 +1476,7 @@ mkdir -p %{static_builddir}
|
||||
--disable-kvm \\\
|
||||
--disable-l2tpv3 \\\
|
||||
--disable-libdaxctl \\\
|
||||
--disable-libdw \\\
|
||||
--disable-libiscsi \\\
|
||||
--disable-libnfs \\\
|
||||
--disable-libpmem \\\
|
||||
@ -1557,7 +1546,6 @@ mkdir -p %{static_builddir}
|
||||
--disable-vhost-vdpa \\\
|
||||
--disable-virglrenderer \\\
|
||||
--disable-virtfs \\\
|
||||
--disable-virtiofsd \\\
|
||||
--disable-vnc \\\
|
||||
--disable-vnc-jpeg \\\
|
||||
--disable-png \\\
|
||||
@ -1625,6 +1613,8 @@ run_configure \
|
||||
--enable-attr \
|
||||
%ifarch %{ix86} x86_64
|
||||
--enable-avx2 \
|
||||
--enable-avx512f \
|
||||
--enable-avx512bw \
|
||||
%endif
|
||||
%if %{have_libblkio}
|
||||
--enable-blkio \
|
||||
@ -1693,7 +1683,6 @@ run_configure \
|
||||
%if %{have_usbredir}
|
||||
--enable-usb-redir \
|
||||
%endif
|
||||
--enable-virtiofsd \
|
||||
--enable-vhost-kernel \
|
||||
--enable-vhost-net \
|
||||
--enable-vhost-user \
|
||||
@ -1725,6 +1714,7 @@ run_configure \
|
||||
%endif
|
||||
--enable-gtk \
|
||||
--enable-libdaxctl \
|
||||
--enable-libdw \
|
||||
%if %{have_block_nfs}
|
||||
--enable-libnfs \
|
||||
%endif
|
||||
@ -2185,12 +2175,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
|
||||
%{_mandir}/man8/qemu-pr-helper.8*
|
||||
|
||||
|
||||
%files -n qemu-virtiofsd
|
||||
%{_mandir}/man1/virtiofsd.1*
|
||||
%{_libexecdir}/virtiofsd
|
||||
%{_datadir}/qemu/vhost-user/50-qemu-virtiofsd.json
|
||||
|
||||
|
||||
%files tools
|
||||
%{_bindir}/qemu-keymap
|
||||
%{_bindir}/qemu-edid
|
||||
@ -2786,6 +2770,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Apr 20 2023 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 8.0.0-1
|
||||
- Rebase to qemu 8.0.0
|
||||
|
||||
* Wed Apr 19 2023 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 7.2.1-1
|
||||
- Rebase to qemu 7.2.1
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (qemu-7.2.1.tar.xz) = e286dc66c923a5df77eb02d69235d048e80a7cced638fae52fbed385b4c3cd736cfea66bb3c9843bebf0a33e81ea141fc015e0bd82108df304f148ce59d9ae8a
|
||||
SHA512 (qemu-8.0.0.tar.xz) = 1f31d1e653dec2d35f1b7a5468ee3f471553b48eca8c8afafffcf9243c6b2260e78a5b73da3fe567f9b85d4133573eebd397747b3aec501fb24076263eb07b27
|
||||
|
Loading…
Reference in New Issue
Block a user