* [PATCH for 7.2 0/2] s390x/s390-virtio-ccw:
@ 2022-11-07 16:13 Cédric Le Goater
2022-11-07 16:13 ` [PATCH for 7.2 1/2] Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property" Cédric Le Goater
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Cédric Le Goater @ 2022-11-07 16:13 UTC (permalink / raw)
To: qemu-s390x, qemu-devel
Cc: Thomas Huth, Matthew Rosato, Eric Farman, David Hildenbrand,
Cédric Le Goater
From: Cédric Le Goater <clg@redhat.com>
Hello,
This series removes the redundant "zpcii-disable" machine property and
and introduces a GlobalProperty compat array to maintain the same
behaviour on older machines.
Thanks,
C.
Cédric Le Goater (2):
Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property"
s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines
include/hw/s390x/s390-virtio-ccw.h | 1 -
hw/s390x/s390-pci-kvm.c | 4 +---
hw/s390x/s390-virtio-ccw.c | 29 +++++------------------------
util/qemu-config.c | 4 ----
qemu-options.hx | 8 +-------
5 files changed, 7 insertions(+), 39 deletions(-)
--
2.38.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH for 7.2 1/2] Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property"
2022-11-07 16:13 [PATCH for 7.2 0/2] s390x/s390-virtio-ccw: Cédric Le Goater
@ 2022-11-07 16:13 ` Cédric Le Goater
2022-11-07 16:13 ` [PATCH for 7.2 2/2] s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines Cédric Le Goater
2022-11-07 16:49 ` [PATCH for 7.2 0/2] s390x/s390-virtio-ccw: Matthew Rosato
2 siblings, 0 replies; 4+ messages in thread
From: Cédric Le Goater @ 2022-11-07 16:13 UTC (permalink / raw)
To: qemu-s390x, qemu-devel
Cc: Thomas Huth, Matthew Rosato, Eric Farman, David Hildenbrand,
Cédric Le Goater
From: Cédric Le Goater <clg@redhat.com>
This reverts commit 59d1ce44396e3ad2330dc3261ff3da7ad3a16184.
The "zpcii-disable" machine property is redundant with the "interpret"
zPCI device property. Remove it for clarification.
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
include/hw/s390x/s390-virtio-ccw.h | 1 -
hw/s390x/s390-pci-kvm.c | 4 +---
hw/s390x/s390-virtio-ccw.c | 24 ------------------------
util/qemu-config.c | 4 ----
qemu-options.hx | 8 +-------
5 files changed, 2 insertions(+), 39 deletions(-)
diff --git a/include/hw/s390x/s390-virtio-ccw.h b/include/hw/s390x/s390-virtio-ccw.h
index 4f8a39abda..9bba21a916 100644
--- a/include/hw/s390x/s390-virtio-ccw.h
+++ b/include/hw/s390x/s390-virtio-ccw.h
@@ -27,7 +27,6 @@ struct S390CcwMachineState {
bool aes_key_wrap;
bool dea_key_wrap;
bool pv;
- bool zpcii_disable;
uint8_t loadparm[8];
};
diff --git a/hw/s390x/s390-pci-kvm.c b/hw/s390x/s390-pci-kvm.c
index 5eb7fd12e2..9134fe185f 100644
--- a/hw/s390x/s390-pci-kvm.c
+++ b/hw/s390x/s390-pci-kvm.c
@@ -22,9 +22,7 @@
bool s390_pci_kvm_interp_allowed(void)
{
- return (kvm_s390_get_zpci_op() && !s390_is_pv() &&
- !object_property_get_bool(OBJECT(qdev_get_machine()),
- "zpcii-disable", NULL));
+ return kvm_s390_get_zpci_op() && !s390_is_pv();
}
int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, bool assist)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 560ddbb6fb..bb98d40792 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -627,21 +627,6 @@ static inline void machine_set_dea_key_wrap(Object *obj, bool value,
ms->dea_key_wrap = value;
}
-static inline bool machine_get_zpcii_disable(Object *obj, Error **errp)
-{
- S390CcwMachineState *ms = S390_CCW_MACHINE(obj);
-
- return ms->zpcii_disable;
-}
-
-static inline void machine_set_zpcii_disable(Object *obj, bool value,
- Error **errp)
-{
- S390CcwMachineState *ms = S390_CCW_MACHINE(obj);
-
- ms->zpcii_disable = value;
-}
-
static S390CcwMachineClass *current_mc;
/*
@@ -778,12 +763,6 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
"Up to 8 chars in set of [A-Za-z0-9. ] (lower case chars converted"
" to upper case) to pass to machine loader, boot manager,"
" and guest kernel");
-
- object_class_property_add_bool(oc, "zpcii-disable",
- machine_get_zpcii_disable,
- machine_set_zpcii_disable);
- object_class_property_set_description(oc, "zpcii-disable",
- "disable zPCI interpretation facilties");
}
static inline void s390_machine_initfn(Object *obj)
@@ -792,7 +771,6 @@ static inline void s390_machine_initfn(Object *obj)
ms->aes_key_wrap = true;
ms->dea_key_wrap = true;
- ms->zpcii_disable = false;
}
static const TypeInfo ccw_machine_info = {
@@ -857,12 +835,10 @@ DEFINE_CCW_MACHINE(7_2, "7.2", true);
static void ccw_machine_7_1_instance_options(MachineState *machine)
{
static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V7_1 };
- S390CcwMachineState *ms = S390_CCW_MACHINE(machine);
ccw_machine_7_2_instance_options(machine);
s390_cpudef_featoff_greater(16, 1, S390_FEAT_PAIE);
s390_set_qemu_cpu_model(0x8561, 15, 1, qemu_cpu_feat);
- ms->zpcii_disable = true;
}
static void ccw_machine_7_1_class_options(MachineClass *mc)
diff --git a/util/qemu-config.c b/util/qemu-config.c
index 5325f6bf80..433488aa56 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -236,10 +236,6 @@ static QemuOptsList machine_opts = {
.help = "Up to 8 chars in set of [A-Za-z0-9. ](lower case chars"
" converted to upper case) to pass to machine"
" loader, boot manager, and guest kernel",
- },{
- .name = "zpcii-disable",
- .type = QEMU_OPT_BOOL,
- .help = "disable zPCI interpretation facilities",
},
{ /* End of list */ }
}
diff --git a/qemu-options.hx b/qemu-options.hx
index 911d82afa5..1e140e99e1 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -37,8 +37,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
" memory-encryption=@var{} memory encryption object to use (default=none)\n"
" hmat=on|off controls ACPI HMAT support (default=off)\n"
" memory-backend='backend-id' specifies explicitly provided backend for main RAM (default=none)\n"
- " cxl-fmw.0.targets.0=firsttarget,cxl-fmw.0.targets.1=secondtarget,cxl-fmw.0.size=size[,cxl-fmw.0.interleave-granularity=granularity]\n"
- " zpcii-disable=on|off disables zPCI interpretation facilities (default=off)\n",
+ " cxl-fmw.0.targets.0=firsttarget,cxl-fmw.0.targets.1=secondtarget,cxl-fmw.0.size=size[,cxl-fmw.0.interleave-granularity=granularity]\n",
QEMU_ARCH_ALL)
SRST
``-machine [type=]name[,prop=value[,...]]``
@@ -158,11 +157,6 @@ SRST
::
-machine cxl-fmw.0.targets.0=cxl.0,cxl-fmw.0.targets.1=cxl.1,cxl-fmw.0.size=128G,cxl-fmw.0.interleave-granularity=512k
-
- ``zpcii-disable=on|off``
- Disables zPCI interpretation facilties on s390-ccw hosts.
- This feature can be used to disable hardware virtual assists
- related to zPCI devices. The default is off.
ERST
DEF("M", HAS_ARG, QEMU_OPTION_M,
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH for 7.2 2/2] s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines
2022-11-07 16:13 [PATCH for 7.2 0/2] s390x/s390-virtio-ccw: Cédric Le Goater
2022-11-07 16:13 ` [PATCH for 7.2 1/2] Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property" Cédric Le Goater
@ 2022-11-07 16:13 ` Cédric Le Goater
2022-11-07 16:49 ` [PATCH for 7.2 0/2] s390x/s390-virtio-ccw: Matthew Rosato
2 siblings, 0 replies; 4+ messages in thread
From: Cédric Le Goater @ 2022-11-07 16:13 UTC (permalink / raw)
To: qemu-s390x, qemu-devel
Cc: Thomas Huth, Matthew Rosato, Eric Farman, David Hildenbrand,
Cédric Le Goater
From: Cédric Le Goater <clg@redhat.com>
zPCI enhancement features (interpretation and forward assist) were
recently introduced to improve performance on PCI passthrough devices.
To maintain the same behaviour on older Z machines, deactivate the
features with the associated properties.
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
hw/s390x/s390-virtio-ccw.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index bb98d40792..7d80bc1837 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -844,9 +844,14 @@ static void ccw_machine_7_1_instance_options(MachineState *machine)
static void ccw_machine_7_1_class_options(MachineClass *mc)
{
S390CcwMachineClass *s390mc = S390_CCW_MACHINE_CLASS(mc);
+ static GlobalProperty compat[] = {
+ { TYPE_S390_PCI_DEVICE, "interpret", "off", },
+ { TYPE_S390_PCI_DEVICE, "forwarding-assist", "off", },
+ };
ccw_machine_7_2_class_options(mc);
compat_props_add(mc->compat_props, hw_compat_7_1, hw_compat_7_1_len);
+ compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
s390mc->max_threads = S390_MAX_CPUS;
}
DEFINE_CCW_MACHINE(7_1, "7.1", false);
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH for 7.2 0/2] s390x/s390-virtio-ccw:
2022-11-07 16:13 [PATCH for 7.2 0/2] s390x/s390-virtio-ccw: Cédric Le Goater
2022-11-07 16:13 ` [PATCH for 7.2 1/2] Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property" Cédric Le Goater
2022-11-07 16:13 ` [PATCH for 7.2 2/2] s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines Cédric Le Goater
@ 2022-11-07 16:49 ` Matthew Rosato
2 siblings, 0 replies; 4+ messages in thread
From: Matthew Rosato @ 2022-11-07 16:49 UTC (permalink / raw)
To: Cédric Le Goater, qemu-s390x, qemu-devel
Cc: Thomas Huth, Eric Farman, David Hildenbrand, Cédric Le Goater
On 11/7/22 11:13 AM, Cédric Le Goater wrote:
> From: Cédric Le Goater <clg@redhat.com>
>
> Hello,
>
> This series removes the redundant "zpcii-disable" machine property and
> and introduces a GlobalProperty compat array to maintain the same
> behaviour on older machines.
>
> Thanks,
>
> C.
Thanks Cedric.
For the series:
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Also did a quick test on top of
https://gitlab.com/thuth/qemu.git tags/pull-request-2022-11-06
to verify that zPCI interpretation/forwarding is available as expected with machine 7.2 and off by default in 7.1 and older.
>
> Cédric Le Goater (2):
> Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property"
> s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines
>
> include/hw/s390x/s390-virtio-ccw.h | 1 -
> hw/s390x/s390-pci-kvm.c | 4 +---
> hw/s390x/s390-virtio-ccw.c | 29 +++++------------------------
> util/qemu-config.c | 4 ----
> qemu-options.hx | 8 +-------
> 5 files changed, 7 insertions(+), 39 deletions(-)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-07 16:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07 16:13 [PATCH for 7.2 0/2] s390x/s390-virtio-ccw: Cédric Le Goater
2022-11-07 16:13 ` [PATCH for 7.2 1/2] Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property" Cédric Le Goater
2022-11-07 16:13 ` [PATCH for 7.2 2/2] s390x/s390-virtio-ccw: Switch off zPCI enhancements on older machines Cédric Le Goater
2022-11-07 16:49 ` [PATCH for 7.2 0/2] s390x/s390-virtio-ccw: Matthew Rosato
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.