qom: Drop object_property_add_enum() parameter @lookup
All callers now pass non-null @qapi_type and null @lookup. Drop @lookup and simplify the code accordingly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20261101201717.3911097-55-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
1 parent
f8846c2a0c
commit
40b0c6e835
28 files changed
+58
-81
No files matched your search
+1
-1
@@ -271,7 +271,7 @@ static void hvf_accel_class_init(ObjectClass *oc, const void *data)
|
||||
|
||||
object_class_property_add_enum(oc, "kernel-irqchip", "on|off|split",
|
||||
&OnOffSplit_type_info, NULL,
|
||||
NULL, hvf_set_kernel_irqchip);
|
||||
hvf_set_kernel_irqchip);
|
||||
object_class_property_set_description(oc, "kernel-irqchip",
|
||||
"Configure HVF irqchip");
|
||||
}
|
||||
|
||||
+1
-1
@@ -4299,7 +4299,7 @@ static void kvm_accel_class_init(ObjectClass *oc, const void *data)
|
||||
|
||||
object_class_property_add_enum(oc, "kernel-irqchip", "on|off|split",
|
||||
&OnOffSplit_type_info, NULL,
|
||||
NULL, kvm_set_kernel_irqchip);
|
||||
kvm_set_kernel_irqchip);
|
||||
object_class_property_set_description(oc, "kernel-irqchip",
|
||||
"Configure KVM in-kernel irqchip");
|
||||
|
||||
|
||||
@@ -510,12 +510,12 @@ static void whpx_accel_class_init(ObjectClass *oc, const void *data)
|
||||
|
||||
object_class_property_add_enum(oc, "kernel-irqchip", "on|off|split",
|
||||
&OnOffSplit_type_info, NULL,
|
||||
NULL, whpx_set_kernel_irqchip);
|
||||
whpx_set_kernel_irqchip);
|
||||
object_class_property_set_description(oc, "kernel-irqchip",
|
||||
"Configure WHPX in-kernel irqchip");
|
||||
object_class_property_add_enum(oc, "hyperv", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
NULL, whpx_set_hyperv);
|
||||
whpx_set_hyperv);
|
||||
object_class_property_set_description(oc, "hyperv",
|
||||
"Configure Hyper-V enlightenments");
|
||||
|
||||
|
||||
@@ -123,7 +123,6 @@ qauthz_list_class_init(ObjectClass *oc, const void *data)
|
||||
|
||||
object_class_property_add_enum(oc, "policy", "QAuthZListPolicy",
|
||||
&QAuthZListPolicy_type_info,
|
||||
NULL,
|
||||
qauthz_list_prop_get_policy,
|
||||
qauthz_list_prop_set_policy);
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ file_backend_class_init(ObjectClass *oc, const void *data)
|
||||
file_memory_backend_get_readonly,
|
||||
file_memory_backend_set_readonly);
|
||||
object_class_property_add_enum(oc, "rom", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
&OnOffAuto_type_info,
|
||||
file_memory_backend_get_rom,
|
||||
file_memory_backend_set_rom);
|
||||
object_class_property_set_description(oc, "rom",
|
||||
|
||||
@@ -204,8 +204,8 @@ memfd_backend_class_init(ObjectClass *oc, const void *data)
|
||||
"Huge pages size (ex: 2M, 1G)");
|
||||
}
|
||||
|
||||
object_class_property_add_enum(oc, "guest-memfd", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
object_class_property_add_enum(oc, "guest-memfd", "OnOffAuto",
|
||||
&OnOffAuto_type_info,
|
||||
memfd_backend_get_guest_memfd,
|
||||
memfd_backend_set_guest_memfd);
|
||||
object_class_property_set_description(oc, "guest-memfd",
|
||||
|
||||
+1
-1
@@ -554,7 +554,7 @@ host_memory_backend_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_set_description(oc, "host-nodes",
|
||||
"Binds memory to the list of NUMA host nodes");
|
||||
object_class_property_add_enum(oc, "policy", "HostMemPolicy",
|
||||
&HostMemPolicy_type_info, NULL,
|
||||
&HostMemPolicy_type_info,
|
||||
host_memory_backend_get_policy,
|
||||
host_memory_backend_set_policy);
|
||||
object_class_property_set_description(oc, "policy",
|
||||
|
||||
@@ -271,7 +271,7 @@ qcrypto_secret_class_init(ObjectClass *oc, const void *data)
|
||||
ucc->complete = qcrypto_secret_complete;
|
||||
|
||||
object_class_property_add_enum(oc, "format", "QCryptoSecretFormat",
|
||||
&QCryptoSecretFormat_type_info, NULL,
|
||||
&QCryptoSecretFormat_type_info,
|
||||
qcrypto_secret_prop_get_format,
|
||||
qcrypto_secret_prop_set_format);
|
||||
object_class_property_add_str(oc, "keyid",
|
||||
|
||||
+1
-1
@@ -223,7 +223,7 @@ qcrypto_tls_creds_class_init(ObjectClass *oc, const void *data)
|
||||
qcrypto_tls_creds_prop_get_dir,
|
||||
qcrypto_tls_creds_prop_set_dir);
|
||||
object_class_property_add_enum(oc, "endpoint", "QCryptoTLSCredsEndpoint",
|
||||
&QCryptoTLSCredsEndpoint_type_info, NULL,
|
||||
&QCryptoTLSCredsEndpoint_type_info,
|
||||
qcrypto_tls_creds_prop_get_endpoint,
|
||||
qcrypto_tls_creds_prop_set_endpoint);
|
||||
object_class_property_add_str(oc, "priority",
|
||||
|
||||
+2
-2
@@ -4202,8 +4202,8 @@ static void virt_machine_class_init(ObjectClass *oc, const void *data)
|
||||
mc->default_nic = "virtio-net-pci";
|
||||
|
||||
object_class_property_add_enum(oc, "acpi", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
virt_get_acpi, virt_set_acpi);
|
||||
&OnOffAuto_type_info, virt_get_acpi,
|
||||
virt_set_acpi);
|
||||
object_class_property_set_description(oc, "acpi",
|
||||
"Enable ACPI");
|
||||
object_class_property_add_bool(oc, "secure", virt_get_secure,
|
||||
|
||||
+6
-9
@@ -658,25 +658,22 @@ static void microvm_class_init(ObjectClass *oc, const void *data)
|
||||
hc->unplug_request = microvm_device_unplug_request_cb;
|
||||
hc->unplug = microvm_device_unplug_cb;
|
||||
|
||||
object_class_property_add_enum(oc, MICROVM_MACHINE_RTC,
|
||||
"OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
object_class_property_add_enum(oc, MICROVM_MACHINE_RTC, "OnOffAuto",
|
||||
&OnOffAuto_type_info,
|
||||
microvm_machine_get_rtc,
|
||||
microvm_machine_set_rtc);
|
||||
object_class_property_set_description(oc, MICROVM_MACHINE_RTC,
|
||||
"Enable MC146818 RTC");
|
||||
|
||||
object_class_property_add_enum(oc, MICROVM_MACHINE_PCIE,
|
||||
"OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
object_class_property_add_enum(oc, MICROVM_MACHINE_PCIE, "OnOffAuto",
|
||||
&OnOffAuto_type_info,
|
||||
microvm_machine_get_pcie,
|
||||
microvm_machine_set_pcie);
|
||||
object_class_property_set_description(oc, MICROVM_MACHINE_PCIE,
|
||||
"Enable PCIe");
|
||||
|
||||
object_class_property_add_enum(oc, MICROVM_MACHINE_IOAPIC2,
|
||||
"OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
object_class_property_add_enum(oc, MICROVM_MACHINE_IOAPIC2, "OnOffAuto",
|
||||
&OnOffAuto_type_info,
|
||||
microvm_machine_get_ioapic2,
|
||||
microvm_machine_set_ioapic2);
|
||||
object_class_property_set_description(oc, MICROVM_MACHINE_IOAPIC2,
|
||||
|
||||
+2
-3
@@ -1726,9 +1726,8 @@ static void pc_machine_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_set_description(oc, PC_MACHINE_MAX_RAM_BELOW_4G,
|
||||
"Maximum ram below the 4G boundary (32bit boundary)");
|
||||
|
||||
object_class_property_add_enum(oc, PC_MACHINE_VMPORT,
|
||||
"OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
object_class_property_add_enum(oc, PC_MACHINE_VMPORT, "OnOffAuto",
|
||||
&OnOffAuto_type_info,
|
||||
pc_machine_get_vmport,
|
||||
pc_machine_set_vmport);
|
||||
object_class_property_set_description(oc, PC_MACHINE_VMPORT,
|
||||
|
||||
+2
-3
@@ -389,9 +389,8 @@ static void pc_i440fx_machine_options(MachineClass *m)
|
||||
|
||||
object_class_property_add_enum(oc, "x-south-bridge",
|
||||
"PCSouthBridgeOption",
|
||||
&PCSouthBridgeOption_type_info, NULL,
|
||||
pc_get_south_bridge,
|
||||
pc_set_south_bridge);
|
||||
&PCSouthBridgeOption_type_info,
|
||||
pc_get_south_bridge, pc_set_south_bridge);
|
||||
object_class_property_set_description(oc, "x-south-bridge",
|
||||
"Use a different south bridge than PIIX3");
|
||||
compat_props_add(m->compat_props,
|
||||
|
||||
+4
-8
@@ -373,29 +373,25 @@ static void x86_machine_class_init(ObjectClass *oc, const void *data)
|
||||
nc->raise_nmi = x86_nmi;
|
||||
|
||||
object_class_property_add_enum(oc, X86_MACHINE_SMM, "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
x86_machine_get_smm,
|
||||
&OnOffAuto_type_info, x86_machine_get_smm,
|
||||
x86_machine_set_smm);
|
||||
object_class_property_set_description(oc, X86_MACHINE_SMM,
|
||||
"Enable SMM");
|
||||
|
||||
object_class_property_add_enum(oc, X86_MACHINE_ACPI, "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
x86_machine_get_acpi,
|
||||
&OnOffAuto_type_info, x86_machine_get_acpi,
|
||||
x86_machine_set_acpi);
|
||||
object_class_property_set_description(oc, X86_MACHINE_ACPI,
|
||||
"Enable ACPI");
|
||||
|
||||
object_class_property_add_enum(oc, X86_MACHINE_PIT, "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
x86_machine_get_pit,
|
||||
&OnOffAuto_type_info, x86_machine_get_pit,
|
||||
x86_machine_set_pit);
|
||||
object_class_property_set_description(oc, X86_MACHINE_PIT,
|
||||
"Enable i8254 PIT");
|
||||
|
||||
object_class_property_add_enum(oc, X86_MACHINE_PIC, "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
x86_machine_get_pic,
|
||||
&OnOffAuto_type_info, x86_machine_get_pic,
|
||||
x86_machine_set_pic);
|
||||
object_class_property_set_description(oc, X86_MACHINE_PIC,
|
||||
"Enable i8259 PIC");
|
||||
|
||||
+7
-7
@@ -1470,18 +1470,18 @@ static void virt_class_init(ObjectClass *oc, const void *data)
|
||||
hc->unplug = virt_device_unplug;
|
||||
|
||||
object_class_property_add_enum(oc, "acpi", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
virt_get_acpi, virt_set_acpi);
|
||||
&OnOffAuto_type_info, virt_get_acpi,
|
||||
virt_set_acpi);
|
||||
object_class_property_set_description(oc, "acpi",
|
||||
"Enable ACPI");
|
||||
object_class_property_add_enum(oc, "v-eiointc", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
virt_get_veiointc, virt_set_veiointc);
|
||||
&OnOffAuto_type_info, virt_get_veiointc,
|
||||
virt_set_veiointc);
|
||||
object_class_property_set_description(oc, "v-eiointc",
|
||||
"Enable Virt Extend I/O Interrupt Controller.");
|
||||
object_class_property_add_enum(oc, "dmsi", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
virt_get_dmsi, virt_set_dmsi);
|
||||
object_class_property_add_enum(oc, "dmsi", "OnOffAuto",
|
||||
&OnOffAuto_type_info, virt_get_dmsi,
|
||||
virt_set_dmsi);
|
||||
object_class_property_set_description(oc, "dmsi",
|
||||
"Enable direct Message-interrupts Controller.");
|
||||
machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE);
|
||||
|
||||
@@ -176,7 +176,7 @@ static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc,
|
||||
mc->is_default = true;
|
||||
|
||||
prop = object_class_property_add_enum(oc, "endianness", "EndianMode",
|
||||
&EndianMode_type_info, NULL,
|
||||
&EndianMode_type_info,
|
||||
machine_get_endianness,
|
||||
machine_set_endianness);
|
||||
object_property_set_default_str(prop, target_big_endian() ? "big"
|
||||
|
||||
+5
-5
@@ -1175,14 +1175,14 @@ static void virt_machine_class_init(ObjectClass *oc, const void *data)
|
||||
}
|
||||
|
||||
object_class_property_add_enum(oc, "acpi", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
virt_get_acpi, virt_set_acpi);
|
||||
&OnOffAuto_type_info, virt_get_acpi,
|
||||
virt_set_acpi);
|
||||
object_class_property_set_description(oc, "acpi",
|
||||
"Enable ACPI");
|
||||
|
||||
object_class_property_add_enum(oc, "iommu-sys", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
virt_get_iommu_sys, virt_set_iommu_sys);
|
||||
object_class_property_add_enum(oc, "iommu-sys", "OnOffAuto",
|
||||
&OnOffAuto_type_info, virt_get_iommu_sys,
|
||||
virt_set_iommu_sys);
|
||||
object_class_property_set_description(oc, "iommu-sys",
|
||||
"Enable IOMMU platform device");
|
||||
}
|
||||
|
||||
@@ -358,8 +358,7 @@ static inline void chardev_vc_add_encoding_prop(ObjectClass *oc,
|
||||
void (*set)(Object *, int, Error **))
|
||||
{
|
||||
object_class_property_add_enum(oc, "encoding", "ChardevVCEncoding",
|
||||
&ChardevVCEncoding_type_info, NULL,
|
||||
get, set);
|
||||
&ChardevVCEncoding_type_info, get, set);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1988,7 +1988,6 @@ ObjectProperty *object_class_property_add_bool(ObjectClass *klass,
|
||||
* @name: the name of the property
|
||||
* @typename: the name of the enum data type
|
||||
* @qapi_type: QAPI type info descriptor
|
||||
* @lookup: enum value namelookup table
|
||||
* @get: the getter or %NULL if the property is write-only.
|
||||
* @set: the setter or %NULL if the property is read-only
|
||||
*
|
||||
@@ -2000,7 +1999,6 @@ ObjectProperty *object_class_property_add_bool(ObjectClass *klass,
|
||||
ObjectProperty *object_property_add_enum(Object *obj, const char *name,
|
||||
const char *typename,
|
||||
const QAPITypeInfo *qapi_type,
|
||||
const QEnumLookup *lookup,
|
||||
int (*get)(Object *, Error **),
|
||||
void (*set)(Object *, int, Error **));
|
||||
|
||||
@@ -2010,7 +2008,6 @@ ObjectProperty *object_property_add_enum(Object *obj, const char *name,
|
||||
* @name: the name of the property
|
||||
* @typename: the name of the enum data type
|
||||
* @qapi_type: QAPI type info descriptor
|
||||
* @lookup: enum value namelookup table
|
||||
* @get: the getter or %NULL if the property is write-only.
|
||||
* @set: the setter or %NULL if the property is read-only
|
||||
*
|
||||
@@ -2023,7 +2020,6 @@ ObjectProperty *object_class_property_add_enum(ObjectClass *klass,
|
||||
const char *name,
|
||||
const char *typename,
|
||||
const QAPITypeInfo *qapi_type,
|
||||
const QEnumLookup *lookup,
|
||||
int (*get)(Object *, Error **),
|
||||
void (*set)(Object *, int, Error **));
|
||||
|
||||
|
||||
+1
-1
@@ -136,7 +136,7 @@ static void monitor_qmp_class_init(ObjectClass *cls, const void *data)
|
||||
monitor_qmp_set_pretty);
|
||||
object_class_property_add_enum(cls, "close-action",
|
||||
"MonitorQMPCloseAction",
|
||||
&MonitorQMPCloseAction_type_info, NULL,
|
||||
&MonitorQMPCloseAction_type_info,
|
||||
monitor_qmp_get_close_action,
|
||||
monitor_qmp_set_close_action);
|
||||
|
||||
|
||||
+3
-2
@@ -344,8 +344,9 @@ static void netfilter_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_add_str(oc, "netdev",
|
||||
netfilter_get_netdev_id, netfilter_set_netdev_id);
|
||||
object_class_property_add_enum(oc, "queue", "NetFilterDirection",
|
||||
&NetFilterDirection_type_info, NULL,
|
||||
netfilter_get_direction, netfilter_set_direction);
|
||||
&NetFilterDirection_type_info,
|
||||
netfilter_get_direction,
|
||||
netfilter_set_direction);
|
||||
object_class_property_add_str(oc, "status",
|
||||
netfilter_get_status, netfilter_set_status);
|
||||
object_class_property_add_str(oc, "position",
|
||||
|
||||
+4
-11
@@ -2501,8 +2501,7 @@ object_class_property_add_bool(ObjectClass *klass, const char *name,
|
||||
}
|
||||
|
||||
typedef struct EnumProperty {
|
||||
const QAPITypeInfo *qapi_type; /* non-null for QAPI enums */
|
||||
const QEnumLookup *lookup;
|
||||
const QAPITypeInfo *qapi_type;
|
||||
int (*get)(Object *, Error **);
|
||||
void (*set)(Object *, int, Error **);
|
||||
} EnumProperty;
|
||||
@@ -2520,7 +2519,7 @@ static void property_get_enum(Object *obj, Visitor *v, const char *name,
|
||||
return;
|
||||
}
|
||||
|
||||
visit_type_enum(v, name, &value, prop->lookup, errp);
|
||||
visit_type_enum(v, name, &value, prop->qapi_type->lookup, errp);
|
||||
}
|
||||
|
||||
static void property_set_enum(Object *obj, Visitor *v, const char *name,
|
||||
@@ -2529,7 +2528,7 @@ static void property_set_enum(Object *obj, Visitor *v, const char *name,
|
||||
EnumProperty *prop = opaque;
|
||||
int value;
|
||||
|
||||
if (!visit_type_enum(v, name, &value, prop->lookup, errp)) {
|
||||
if (!visit_type_enum(v, name, &value, prop->qapi_type->lookup, errp)) {
|
||||
return;
|
||||
}
|
||||
prop->set(obj, value, errp);
|
||||
@@ -2539,15 +2538,12 @@ ObjectProperty *
|
||||
object_property_add_enum(Object *obj, const char *name,
|
||||
const char *typename,
|
||||
const QAPITypeInfo *qapi_type,
|
||||
const QEnumLookup *lookup,
|
||||
int (*get)(Object *, Error **),
|
||||
void (*set)(Object *, int, Error **))
|
||||
{
|
||||
EnumProperty *prop = g_malloc(sizeof(*prop));
|
||||
|
||||
assert(!qapi_type != !lookup);
|
||||
prop->qapi_type = qapi_type;
|
||||
prop->lookup = lookup ?: qapi_type->lookup;
|
||||
prop->get = get;
|
||||
prop->set = set;
|
||||
|
||||
@@ -2562,15 +2558,12 @@ ObjectProperty *
|
||||
object_class_property_add_enum(ObjectClass *klass, const char *name,
|
||||
const char *typename,
|
||||
const QAPITypeInfo *qapi_type,
|
||||
const QEnumLookup *lookup,
|
||||
int (*get)(Object *, Error **),
|
||||
void (*set)(Object *, int, Error **))
|
||||
{
|
||||
EnumProperty *prop = g_malloc(sizeof(*prop));
|
||||
|
||||
assert(!qapi_type != !lookup);
|
||||
prop->qapi_type = qapi_type;
|
||||
prop->lookup = lookup ?: qapi_type->lookup;
|
||||
prop->get = get;
|
||||
prop->set = set;
|
||||
|
||||
@@ -2607,7 +2600,7 @@ int object_property_get_enum(Object *obj, const char *name,
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = qapi_enum_parse(enumprop->lookup, str, -1, errp);
|
||||
ret = qapi_enum_parse(enumprop->qapi_type->lookup, str, -1, errp);
|
||||
g_free(str);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -7101,7 +7101,7 @@ static void kvm_arch_set_honor_guest_pat(Object *obj, int value, Error **errp)
|
||||
void kvm_arch_accel_class_init(ObjectClass *oc)
|
||||
{
|
||||
object_class_property_add_enum(oc, "notify-vmexit", "NotifyVMexitOption",
|
||||
&NotifyVmexitOption_type_info, NULL,
|
||||
&NotifyVmexitOption_type_info,
|
||||
kvm_arch_get_notify_vmexit,
|
||||
kvm_arch_set_notify_vmexit);
|
||||
object_class_property_set_description(oc, "notify-vmexit",
|
||||
@@ -7141,7 +7141,7 @@ void kvm_arch_accel_class_init(ObjectClass *oc)
|
||||
"Maximum number of Xen PIRQs");
|
||||
|
||||
object_class_property_add_enum(oc, "honor-guest-pat", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
&OnOffAuto_type_info,
|
||||
kvm_arch_get_honor_guest_pat,
|
||||
kvm_arch_set_honor_guest_pat);
|
||||
object_class_property_set_description(oc, "honor-guest-pat",
|
||||
|
||||
+1
-1
@@ -3019,7 +3019,7 @@ sev_guest_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_set_description(oc, "session-file",
|
||||
"guest owners session parameters (encoded with base64)");
|
||||
object_class_property_add_enum(oc, "legacy-vm-type", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
&OnOffAuto_type_info,
|
||||
sev_guest_get_legacy_vm_type,
|
||||
sev_guest_set_legacy_vm_type);
|
||||
object_class_property_set_description(oc, "legacy-vm-type",
|
||||
|
||||
@@ -2974,17 +2974,16 @@ void whpx_arch_accel_class_init(ObjectClass *oc)
|
||||
{
|
||||
object_class_property_add_enum(oc, "ignore-unknown-msr", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
NULL, whpx_set_unknown_msr);
|
||||
whpx_set_unknown_msr);
|
||||
object_class_property_set_description(oc, "ignore-unknown-msr",
|
||||
"Configure unknown MSR behavior");
|
||||
object_class_property_add_enum(oc, "intercept-msr-gp", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
NULL, whpx_set_intercept_msr_gp);
|
||||
whpx_set_intercept_msr_gp);
|
||||
object_class_property_set_description(oc, "intercept-msr-gp",
|
||||
"Intercept #GP to log erroring MSR accesses.");
|
||||
object_class_property_add_enum(oc, "ssd", "OnOffAuto",
|
||||
&OnOffAuto_type_info, NULL,
|
||||
NULL, whpx_set_ssd);
|
||||
&OnOffAuto_type_info, NULL, whpx_set_ssd);
|
||||
object_class_property_set_description(oc, "ssd",
|
||||
"Separate security domain");
|
||||
}
|
||||
|
||||
@@ -152,8 +152,7 @@ static void dummy_class_init(ObjectClass *cls, const void *data)
|
||||
dummy_get_sv, dummy_set_sv,
|
||||
NULL, NULL);
|
||||
object_class_property_add_enum(cls, "av", "DummyAnimal",
|
||||
&dummy_animal_qapi_type_info, NULL,
|
||||
dummy_get_av,
|
||||
&dummy_animal_qapi_type_info, dummy_get_av,
|
||||
dummy_set_av);
|
||||
}
|
||||
|
||||
|
||||
@@ -511,8 +511,8 @@ dbus_display_class_init(ObjectClass *oc, const void *data)
|
||||
object_class_property_add_str(oc, "addr", get_dbus_addr, set_dbus_addr);
|
||||
object_class_property_add_str(oc, "audiodev", get_audiodev, set_audiodev);
|
||||
object_class_property_add_enum(oc, "gl-mode", "DisplayGLMode",
|
||||
&DisplayGLMode_type_info, NULL,
|
||||
get_gl_mode, set_gl_mode);
|
||||
&DisplayGLMode_type_info, get_gl_mode,
|
||||
set_gl_mode);
|
||||
}
|
||||
|
||||
#define TYPE_CHARDEV_VC "chardev-vc"
|
||||
|
||||
+1
-1
@@ -508,7 +508,7 @@ static void input_linux_class_init(ObjectClass *oc, const void *data)
|
||||
input_linux_get_repeat,
|
||||
input_linux_set_repeat);
|
||||
object_class_property_add_enum(oc, "grab-toggle", "GrabToggleKeys",
|
||||
&GrabToggleKeys_type_info, NULL,
|
||||
&GrabToggleKeys_type_info,
|
||||
input_linux_get_grab_toggle,
|
||||
input_linux_set_grab_toggle);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user