@@ -272,6 +272,21 @@ bool cpu_model_allowed(void)
return true;
}
+static inline bool machine_get_map_css(Object *obj, Error **errp)
+{
+ S390CcwMachineState *ms = S390_CCW_MACHINE(obj);
+
+ return ms->s390_map_css;
+}
+
+static inline void machine_set_map_css(Object *obj, bool value,
+ Error **errp)
+{
+ S390CcwMachineState *ms = S390_CCW_MACHINE(obj);
+
+ ms->s390_map_css = value;
+}
+
static inline void s390_machine_initfn(Object *obj)
{
object_property_add_bool(obj, "aes-key-wrap",
@@ -289,6 +304,14 @@ static inline void s390_machine_initfn(Object *obj)
"enable/disable DEA key wrapping using the CPACF wrapping key",
NULL);
object_property_set_bool(obj, true, "dea-key-wrap", NULL);
+
+ object_property_add_bool(obj, "s390-map-css",
+ machine_get_map_css,
+ machine_set_map_css, NULL);
+ object_property_set_description(obj, "s390-map-css",
+ "enable/disable mapping passed-through subchannels into the "
+ "virtual css", NULL);
+ object_property_set_bool(obj, false, "s390-map-css", NULL);
}
static const TypeInfo ccw_machine_info = {
@@ -28,6 +28,7 @@ typedef struct S390CcwMachineState {
/*< public >*/
bool aes_key_wrap;
bool dea_key_wrap;
+ bool s390_map_css;
} S390CcwMachineState;
typedef struct S390CcwMachineClass {
@@ -43,7 +43,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
" dea-key-wrap=on|off controls support for DEA key wrapping (default=on)\n"
" suppress-vmdesc=on|off disables self-describing migration (default=off)\n"
" nvdimm=on|off controls NVDIMM support (default=off)\n"
- " enforce-config-section=on|off enforce configuration section migration (default=off)\n",
+ " enforce-config-section=on|off enforce configuration section migration (default=off)\n"
+ " s390-map-css=on|off controls support for mapping into virtual css (default=off)\n",
QEMU_ARCH_ALL)
STEXI
@item -machine [type=]@var{name}[,prop=@var{value}[,...]]
@@ -82,6 +83,9 @@ controls whether DEA wrapping keys will be created to allow
execution of DEA cryptographic functions. The default is on.
@item nvdimm=on|off
Enables or disables NVDIMM support. The default is off.
+@item s390-map-css=on|off
+Enables or disables mapping passed-through subchannels into the virtual css.
+The default is off.
@end table
ETEXI
@@ -1249,6 +1249,16 @@ static inline void s390_crypto_reset(void)
}
}
+static inline bool s390_get_map_css(void)
+{
+ if (object_property_get_bool(OBJECT(qdev_get_machine()), "s390-map-css",
+ NULL)) {
+ return true;
+ }
+
+ return false;
+}
+
/* machine check interruption code */
/* subclasses */