Eduardo Habkost
0e4edb3b3b
hw/i386: expose a "smbios-entry-point-type" PC machine property
...
The i440fx and Q35 machine types are both hardcoded to use the
legacy SMBIOS 2.1 (32-bit) entry point. This is a sensible
conservative choice because SeaBIOS only supports SMBIOS 2.1
EDK2, however, can also support SMBIOS 3.0 (64-bit) entry points,
and QEMU already uses this on the ARM virt machine type.
This adds a property to allow the choice of SMBIOS entry point
versions For example to opt in to 64-bit SMBIOS entry point:
$QEMU -machine q35,smbios-entry-point-type=64
Based on a patch submitted by Daniel Berrangé.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20211026151100.1691925-4-ehabkost@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2022-01-07 05:19:55 -05:00
Eduardo Habkost
bdf54a9a7b
hw/smbios: Use qapi for SmbiosEntryPointType
...
This prepares for exposing the SMBIOS entry point type as a
machine property on x86.
Based on a patch from Daniel P. Berrangé.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20211026151100.1691925-3-ehabkost@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Markus Armbruster <armbru@redhat.com >
2022-01-07 05:19:55 -05:00
Eduardo Habkost
10be11d0b4
smbios: Rename SMBIOS_ENTRY_POINT_* enums
...
Rename the enums to match the naming style used by QAPI, and to
use "32" and "64" instead of "20" and "31". This will allow us
to more easily move the enum to the QAPI schema later.
About the naming choice: "SMBIOS 2.1 entry point"/"SMBIOS 3.0
entry point" and "32-bit entry point"/"64-bit entry point" are
synonymous in the SMBIOS specification. However, the phrases
"32-bit entry point" and "64-bit entry point" are used more often.
The new names also avoid confusion between the entry point format
and the actual SMBIOS version reported in the entry point
structure. For example: currently the 32-bit entry point
actually report SMBIOS 2.8 support, not 2.1.
Based on portions of a patch submitted by Daniel P. Berrangé.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20211026151100.1691925-2-ehabkost@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
2022-01-07 05:19:55 -05:00
Eduardo Habkost
24c4cd1311
MAINTAINERS: Change my email address
...
The ehabkost@redhat.com email address will stop working on
2021-12-01, change it to my personal email address.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20211129163053.2506734-1-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20211130204722.2732997-2-ehabkost@redhat.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-12-01 07:17:56 +01:00
Eduardo Habkost
3fd641ac5e
Fix virtio-net-pci* "vectors" compat
...
hw_compat_5_2 has an issue: it affects only "virtio-net-pci"
but not "virtio-net-pci-transitional" and
"virtio-net-pci-non-transitional". The solution is to use the
"virtio-net-pci-base" type in compat_props.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1999141
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be >
Acked-by: Jason Wang <jasowang@redhat.com >
Acked-by: Jean-Louis Dupond <jean-louis@dupond.be >
Reviewed-by: Cornelia Huck <cohuck@redhat.com >
Signed-off-by: Jason Wang <jasowang@redhat.com >
2021-11-05 11:32:00 +08:00
Eduardo Habkost
b19a3e2cd9
machine: Move gpio code to hw/core/gpio.c
...
Only softmmu code uses gpio, so move gpio code from qdev.c to
gpio.c and compile it only on softmmu mode.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20190425200051.19906-2-ehabkost@redhat.com >
[PMD: Rebased]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2021-11-01 19:44:00 +01:00
Eduardo Habkost
b914e741e9
Use PCI_HOST_BRIDGE macro
...
OBJECT_CHECK(PciHostState, ..., TYPE_PCI_HOST_BRIDGE) is exactly
what the PCI_HOST_BRIDGE macro does. We can just use the macro
instead of using OBJECT_CHECK manually.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20210805193431.307761-7-ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
2021-09-04 09:07:46 -04:00
Eduardo Habkost
3a83db5df3
acpi: Delete broken ACPI_GED_X86 macro
...
The macro never worked and never will, because the
AcpiGedX86State type never existed.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20210805193431.307761-2-ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
2021-09-04 09:07:46 -04:00
Eduardo Habkost
80d60a6d1e
sbsa-ref: Rename SBSA_GWDT enum value
...
The SBSA_GWDT enum value conflicts with the SBSA_GWDT() QOM type
checking helper, preventing us from using a OBJECT_DEFINE* or
DEFINE_INSTANCE_CHECKER macro for the SBSA_GWDT() wrapper.
If I understand the SBSA 6.0 specification correctly, the signal
being connected to IRQ 16 is the WS0 output signal from the
Generic Watchdog. Rename the enum value to SBSA_GWDT_WS0 to be
more explicit and avoid the name conflict.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-id: 20210806023119.431680-1-ehabkost@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2021-08-25 10:48:50 +01:00
Eduardo Habkost
80cc1a0dd1
vmbus: Don't make QOM property registration conditional
...
Having properties registered conditionally makes QOM type
introspection difficult. Instead of skipping registration of the
"instanceid" property, always register the property but validate
its value against the instance id required by the class.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com >
Message-Id: <20201009200701.1830060-1-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2021-07-06 18:04:38 -04:00
Eduardo Habkost
278f064e45
Update Linux headers to 5.13-rc4
...
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20210603191541.2862286-1-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2021-06-17 14:11:06 -04:00
Eduardo Habkost
fd1fd38b86
i386: Document when features can be added to kvm_default_props
...
It's very easy to mistakenly extend kvm_default_props to include
features that require a kernel version that's too recent. Add a
comment warning about that, pointing to the documentation file
where the minimum kernel version for KVM is documented.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20200925211021.4158567-1-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2021-05-31 15:53:02 -04:00
Eduardo Habkost
1a14d4e16a
device-crash-test: Remove problematic language
...
Replace "whitelist" in the device-crash-test script with
"rule list".
I'm using "rule list" instead of "allow list" or "pass list"
because the list is not used only for expected/allowed errors.
It also contain rules specifying which errors shouldn't be
ignored and/or should be fatal.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: John Snow <jsnow@redhat.com >
Acked-by: Thomas Huth <thuth@redhat.com >
Message-Id: <20210202191207.4103973-1-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2021-02-18 18:34:47 -05:00
Eduardo Habkost
e9ce43e97a
cpu: Move debug_excp_handler to tcg_ops
...
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210204163931.7358-8-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Eduardo Habkost
e124536f37
cpu: Move tlb_fill to tcg_ops
...
[claudio: wrapped target code in CONFIG_TCG]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210204163931.7358-7-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Eduardo Habkost
48c1a3e303
cpu: Move cpu_exec_* to tcg_ops
...
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
[claudio: wrapped target code in CONFIG_TCG]
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210204163931.7358-6-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Eduardo Habkost
ec62595bab
cpu: Move synchronize_from_tb() to tcg_ops
...
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
[claudio: wrapped target code in CONFIG_TCG, reworded comments]
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20210204163931.7358-5-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Eduardo Habkost
e9e51b7154
cpu: Introduce TCGCpuOperations struct
...
The TCG-specific CPU methods will be moved to a separate struct,
to make it easier to move accel-specific code outside generic CPU
code in the future. Start by moving tcg_initialize().
The new CPUClass.tcg_opts field may eventually become a pointer,
but keep it an embedded struct for now, to make code conversion
easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
[claudio: move TCGCpuOperations inside include/hw/core/cpu.h]
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20210204163931.7358-2-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Eduardo Habkost
63f957ac96
qom: Assert that objects being destroyed have no parent
...
QOM reference counting bugs are often hard to detect, but there's
one kind of bug that's easier: if we are freeing an object but is
still attached to a parent, it means the reference count is wrong
(because the parent always hold a reference to their children).
Add an assertion to make sure we detect those cases.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20201215224133.3545901-3-ehabkost@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2021-01-02 21:03:09 +01:00
Eduardo Habkost
08bdf5d44f
test-char: Destroy chardev correctly at char_file_test_internal()
...
commit 1e419ee68f ("chardev: generate an internal id when none
given") changed the reference ownership semantics of
qemu_chardev_new(NULL, ...): now all chardevs created using
qemu_chardev_new() are added to the /chardevs QOM container, and
the caller does not own a reference to the newly created object.
However, the code at char_file_test_internal() had not been
updated and was calling object_unref() on a chardev object it
didn't own. This makes the chardev be destroyed, but leaves a
dangling pointer in the /chardev container children list, and
seems to be the cause of the following char_serial_test() crash:
Unexpected error in object_property_try_add() at ../qom/object.c:1220: \
attempt to add duplicate property 'serial-id' to object (type 'container')
ERROR test-char - too few tests run (expected 38, got 9)
Update the code to use object_unparent() at the end of
char_file_test_internal(), to make sure the chardev will be
correctly removed from the QOM tree.
Fixes: 1e419ee68f ("chardev: generate an internal id when none given")
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20201215224133.3545901-2-ehabkost@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2021-01-02 21:03:09 +01:00
Eduardo Habkost
f405e3cdff
qdev: Avoid unnecessary DeviceState* variable at set_prop_arraylen()
...
We're just doing pointer math with the device pointer, we can
simply use obj instead.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-32-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:18 -05:00
Eduardo Habkost
1e198715e1
qdev: Rename qdev_get_prop_ptr() to object_field_prop_ptr()
...
The function will be moved to common QOM code, as it is not
specific to TYPE_DEVICE anymore.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com >
Reviewed-by: Cornelia Huck <cohuck@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Acked-by: Paul Durrant <paul@xen.org >
Message-Id: <20201211220529.2290218-31-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:18 -05:00
Eduardo Habkost
8f2aff643c
qdev: Move qdev_prop_tpm declaration to tpm_prop.h
...
Move the variable declaration close to the macro that uses it.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-29-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
0d5d5bc58b
qdev: Make qdev_class_add_property() more flexible
...
Support Property.set_default and PropertyInfo.description even if
PropertyInfo.create is set.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-26-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
f59c6d223d
qdev: Make PropertyInfo.create return ObjectProperty*
...
Returning ObjectProperty* will be useful for new property
registration code that will add additional callbacks
to ObjectProperty after registering it.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-25-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
ea7c1e5c3e
qdev: Move dev->realized check to qdev_property_set()
...
Every single qdev property setter function manually checks
dev->realized. We can just check dev->realized inside
qdev_property_set() instead.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com >
Reviewed-by: Cornelia Huck <cohuck@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Acked-by: Paul Durrant <paul@xen.org >
Message-Id: <20201211220529.2290218-24-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
7ed854af14
qdev: Wrap getters and setters in separate helpers
...
We'll add extra code to the qdev property getters and setters, so
add wrapper functions where additional actions can be performed.
The new functions have a "field_prop_" prefix instead of "qdev_"
because the code will eventually be moved outside
qdev-properties.c, to common QOM code.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-23-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
c80fab0b61
qdev: Add name argument to PropertyInfo.create method
...
This will make it easier to remove the Property.name field in the
future.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-22-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
23a1dae8c1
qdev: Add name parameter to qdev_class_add_property()
...
This will make it easier to remove Property.name in the future.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20201211220529.2290218-21-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
991f0ac901
qdev: Avoid using prop->name unnecessarily
...
We already get the property name as argument to the property
getter and setters, we don't need to use prop->name. This will
make it easier to remove the Property.name field in the future.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-20-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
e68c2cb75a
qdev: Get just property name at error_set_from_qdev_prop_error()
...
Replace `Property *prop` parameter with `char *name`, to reduce
dependency of getter and setter functions on the Property struct
(which will be changed in following patches).
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Cornelia Huck <cohuck@redhat.com >
Message-Id: <20201211220529.2290218-19-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
43b6ab4c67
sparc: Use DEFINE_PROP for nwindows property
...
Use the DEFINE_PROP macro (which will set extra fields in the
struct) instead of initializing a Property struct manually.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20201211220529.2290218-18-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
45efa07f0f
qdev: Reuse DEFINE_PROP in all DEFINE_PROP_* macros
...
Instead of duplicating the code that sets name, info, offset,
and does type checking, make DEFINE_PROP accept a variable number
of arguments and reuse it in all DEFINE_PROP_* macros.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-17-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
ce35e2295e
qdev: Move softmmu properties to qdev-properties-system.h
...
Move the property types and property macros implemented in
qdev-properties-system.c to a new qdev-properties-system.h
header.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-16-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-18 15:20:17 -05:00
Eduardo Habkost
9fb75013d8
cpu: Remove unnecessary noop methods
...
In the previous commits we made cpu_exec_* and debug_excp_handler
optional, so we can now remove these no-op handlers.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Message-Id: <20201212155530.23098-13-cfontana@suse.de >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-16 15:50:33 -05:00
Eduardo Habkost
710384d042
tcg: Make CPUClass.debug_excp_handler optional
...
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20201212155530.23098-12-cfontana@suse.de >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-16 15:50:33 -05:00
Eduardo Habkost
80c4750ba8
tcg: make CPUClass.cpu_exec_* optional
...
This will let us simplify the code that initializes CPU class
methods, when we move cpu_exec_*() to a separate struct.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20201212155530.23098-11-cfontana@suse.de >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-16 15:50:33 -05:00
Eduardo Habkost
035ba06c2e
tcg: cpu_exec_{enter,exit} helpers
...
Move invocation of CPUClass.cpu_exec_*() to separate helpers,
to make it easier to refactor that code later.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20201212155530.23098-10-cfontana@suse.de >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-16 15:50:33 -05:00
Eduardo Habkost
f953c10069
MAINTAINERS: Update my git repository URLs
...
I'm moving my git repositories to gitlab.com, update MAINTAINERS
to point to the correct URL.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20201214212032.2999853-1-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
38255efffe
qdev: Move UUID property to qdev-properties-system.c
...
Only softmmu code uses DEFINE_PROP_UUID, and it currently depends
on error_set_from_qdev_prop_error(). Move it to
qdev-properties-system.c to get out of our way when refactoring
the qdev property system.
We can eventually move it back to the core property system later,
after removing usage of error_set_from_qdev_prop_error().
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20201211220529.2290218-15-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
364f7e833d
qdev: Make qdev_propinfo_get_uint16() static
...
There are no users of the function outside qdev-properties.c.
Make function static and rename it to get_uint16().
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-14-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
c7525b183c
qdev: Make error_set_from_qdev_prop_error() get Object* argument
...
Make the code more generic and not specific to TYPE_DEVICE.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Cornelia Huck <cohuck@redhat.com > #s390 parts
Message-Id: <20201211220529.2290218-13-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
381481597c
qdev: Make check_prop_still_unset() get Object* argument
...
Make the code more generic and not specific to TYPE_DEVICE.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-12-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
395012756c
qdev: Make qdev_find_global_prop() get Object* argument
...
Make the code more generic and not specific to TYPE_DEVICE.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-11-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
828ade86ee
qdev: Make qdev_get_prop_ptr() get Object* arg
...
Make the code more generic and not specific to TYPE_DEVICE.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Cornelia Huck <cohuck@redhat.com > #s390 parts
Acked-by: Paul Durrant <paul@xen.org >
Message-Id: <20201211220529.2290218-10-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
605d9fc0e3
qdev: Make bit_prop_set() get Object* argument
...
Make the code more generic and not specific to TYPE_DEVICE.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-9-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
40ea00b066
qdev: Make PropertyInfo.print method get Object* argument
...
Make the code more generic and not specific to TYPE_DEVICE.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-8-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
5eb32b2113
qdev: Don't use dev->id on set_size32() error message
...
All other qdev property error messages use "<type>.<property>"
instead of "<id>.<property>". Change set_size32() for consistency,
and to make the code not specific to TYPE_DEVICE.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-7-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
0ea0a42ef6
sparc: Check dev->realized at sparc_set_nwindows()
...
sparc_set_nwindows() is one of the very few property setters that
don't check dev->realized, and there's no reason for it to be
special. Check dev->realized like the other setters.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-6-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
85f6f43283
qdev: Check dev->realized at set_size()
...
This setter is one of the very few property setters that don't
check dev->realized, and there's no reason to make size
properties different from the rest. Add the missing check.
Fixes: e8cd45c78f ("qdev: Add SIZE type to qdev properties")
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-5-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
d3fd6e7380
qdev: Move property code to qdev-properties.[ch]
...
Move everything related to Property and PropertyInfo to
qdev-properties.[ch] to make it easier to refactor that code.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-4-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
1b36e4f5a5
cpu: Move cpu_common_props to hw/core/cpu.c
...
There's no reason to keep the property list separate from the CPU
class code. Move the variable to hw/core/cpu.c and make it
static.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-3-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
180c00dfc7
cs4231: Get rid of empty property array
...
An empty props array is unnecessary, we can just not call
device_class_set_props().
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20201211220529.2290218-2-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
f0e34a06f6
netfilter: Use class properties
...
Instance properties make introspection hard and are not shown by
"-object ...,help". Convert them to class properties.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20201111183823.283752-12-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
6d11ea6d8e
netfilter: Reorder functions
...
Trivial code reordering in some filter backends, to make the next
changes easier to review.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20201111183823.283752-11-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
70b756674c
can_host: Use class properties
...
Instance properties make introspection hard and are not shown by
"-object ...,help". Convert them to class properties.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-by: Pavel Pisa <pisa@cmp.felk.cvut.cz >
Message-Id: <20201111183823.283752-9-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
85cc807cbc
arm/cpu64: Register "aarch64" as class property
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20201111183823.283752-8-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
27edeeaafe
virt: Register "its" as class property
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Note: "its" is currently registered conditionally, but this makes
the feature be registered unconditionally. The only side effect
is that it will be now possible to set its=on on virt-2.7 and
older.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20201111183823.283752-7-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
b91def7b83
arm/virt: Register most properties as class properties
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20201111183823.283752-6-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:02:07 -05:00
Eduardo Habkost
f5730c69f0
i386: Register feature bit properties as class properties
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Also, the hundreds of instance properties were having an impact
on QMP commands that create temporary CPU objects. On my
machine, run time of qmp_query_cpu_definitions() changed
from ~200ms to ~16ms after applying this patch.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20201111183823.283752-5-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-15 10:01:32 -05:00
Eduardo Habkost
44ba603937
cs4231: Get rid of empty property array
...
An empty props array is unnecessary, we can just not call
device_class_set_props().
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-id: 20201211220529.2290218-2-ehabkost@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2020-12-15 09:21:09 +01:00
Eduardo Habkost
0b43b6e534
tmp421: Register properties as class properties
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20201111183823.283752-4-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-14 14:25:44 -05:00
Eduardo Habkost
fdfe5ba4a8
vexpress-a15: Register "virtualization" as class property
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20201111183823.283752-3-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-14 14:25:44 -05:00
Eduardo Habkost
4433bb3d83
vexpress: Register "secure" as class property
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20201111183823.283752-2-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-12-14 14:25:44 -05:00
Eduardo Habkost
8a47836548
device-crash-test: Check if path is actually an executable file
...
After the transition to Meson, the build directory now have
subdirectories named "qemu-system-*.p", and device-crash-test
will try to execute them as if they were binaries. This results
in errors like:
PermissionError: [Errno 13] Permission denied: './qemu-system-or1k.p'
When generating the default list of binaries to test, check if
the path is actually a file and if it's executable.
Reported-by: Thomas Huth <thuth@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20201026125238.2752882-1-ehabkost@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Thomas Huth <thuth@redhat.com >
2020-11-09 18:34:21 +01:00
Eduardo Habkost
0259c78ca7
pc: Implement -no-hpet as sugar for -machine hpet=on
...
Get rid of yet another global variable.
The default will be hpet=on only if CONFIG_HPET=y.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20201021144716.1536388-1-ehabkost@redhat.com >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
2020-10-30 04:29:13 -04:00
Eduardo Habkost
2211118a2a
xen: Rename XENBACKEND_DEVICE to XENBACKEND
...
Make the type checking macro name consistent with the TYPE_*
constant.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Anthony PERARD <anthony.perard@citrix.com >
Message-Id: <20200902224311.1321159-58-ehabkost@redhat.com >
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com >
2020-10-19 16:32:06 +01:00
Eduardo Habkost
27cf0896bf
hw/mips: Rename TYPE_MIPS_BOSTON to TYPE_BOSTON
...
This will make the type name constant consistent with the name of
the type checking macro.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20200902224311.1321159-19-ehabkost@redhat.com >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-10-17 13:59:40 +02:00
Eduardo Habkost
31c707fb4d
kvm: Correct documentation of kvm_irqchip_*()
...
When split irqchip support was introduced, the meaning of
kvm_irqchip_in_kernel() changed: now it only means the LAPIC is
in kernel. The PIC, IOAPIC, and PIT might be in userspace if
irqchip=split was set. Update the doc comment to reflect that.
While at it, remove the "the user asked us" part in
kvm_irqchip_is_split() doc comment. That macro has nothing to do
with existence of explicit user-provided options.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20200922203612.2178370-1-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-14 15:28:54 -04:00
Eduardo Habkost
eafa08683f
i386/kvm: Delete kvm_allows_irq0_override()
...
As IRQ routing is always available on x86,
kvm_allows_irq0_override() will always return true, so we don't
need the function anymore.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20200922201922.2153598-4-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-14 15:28:54 -04:00
Eduardo Habkost
8981bae23e
i386/kvm: Remove IRQ routing support checks
...
KVM_CAP_IRQ_ROUTING is always available on x86, so replace checks
for kvm_has_gsi_routing() and KVM_CAP_IRQ_ROUTING with asserts.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20200922201922.2153598-3-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-14 15:28:54 -04:00
Eduardo Habkost
1a6dff5fa8
i386/kvm: Require KVM_CAP_IRQ_ROUTING
...
KVM_CAP_IRQ_ROUTING is available since 2009 (Linux v2.6.30), so
it's safe to just make it a requirement on x86.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20200922201922.2153598-2-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-14 15:28:54 -04:00
Eduardo Habkost
d9753cca6b
can-host-socketcan: Fix crash when 'if' option is not set
...
Fix the following crash:
$ qemu-system-x86_64 -object can-host-socketcan,id=obj0
Segmentation fault (core dumped)
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Acked-by: Pavel Pisa <pisa@cmp.felk.cvut.cz >
Message-Id: <20201008202713.1416823-3-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
14b3948536
authz-list-file: Fix crash when filename is not set
...
Fix the following crash:
$ qemu-system-x86_64 -object authz-list-file,id=obj0
qemu-system-x86_64: -object authz-list-file,id=obj0: GLib: g_file_get_contents: assertion 'filename != NULL' failed
Segmentation fault (core dumped)
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Li Qiang <liq3ea@gmail.com >
Message-Id: <20201008202713.1416823-2-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
abb9369805
vhost-user: Register "chardev" as class property
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20200921221045.699690-6-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
5949703709
vga-pci: Register "big-endian-framebuffer" as class property
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20200921221045.699690-22-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
3e0dceaf94
i386: Register most CPU properties as class properties
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20200921221045.699690-14-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
d85855b894
input-barrier: Register properties as class properties
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Message-Id: <20200921221045.699690-11-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
7da4e3bb11
input-linux: Register properties as class properties
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Message-Id: <20200921221045.699690-10-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
29ee2a1832
rng: Register "opened" as class property
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Message-Id: <20200921221045.699690-8-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
a3d3ee6c13
rng-random: register "filename" as class property
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Message-Id: <20200921221045.699690-5-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
079eed2e77
rng-egd: Register "chardev" as class property
...
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Message-Id: <20200921221045.699690-4-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-13 15:56:30 -04:00
Eduardo Habkost
51c778edd3
docs/devel/qtest: Include libqtest API reference
...
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Thomas Huth <thuth@redhat.com >
Message-Id: <20201005205228.697463-4-ehabkost@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-10-12 11:50:23 -04:00
Eduardo Habkost
f59c6de7f0
docs/devel/qtest: Include protocol spec in document
...
Include the QTest Protocol doc string in docs/devel/qtest.rst,
after converting it to use Sphinx syntax.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Thomas Huth <thuth@redhat.com >
Message-Id: <20201005205228.697463-3-ehabkost@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-10-12 11:50:22 -04:00
Eduardo Habkost
a738a50e62
docs: Move QTest documentation to its own document
...
The qtest and libqtest doc comments will be parsed to generate
API documentation, so move QTest documentation to its own
document where the API and format documentation and will be
included.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Thomas Huth <thuth@redhat.com >
Message-Id: <20201005205228.697463-2-ehabkost@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-10-12 11:50:22 -04:00
Eduardo Habkost
eb4c977508
kernel-doc: Remove $decl_type='type name' hack
...
The $decl_type='type name' hack makes it impossible to document
macros with uppercase names (e.g. most of the macros in
object.h).
Now that we have explicitly tagged the struct and typedef doc
comments in memory.h and object.h, we don't need that hack
anymore. This will make the documentation for the macros in
object.h finally be rendered as expected.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003024123.193840-6-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
301302f067
memory: Explicitly tag doc comments for structs
...
This will allow us to remove the QEMU-specific
$decl_type='type name' hack from the kernel-doc script.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003024123.193840-5-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
ff59780f8d
qom: Explicitly tag doc comments for typedefs and structs
...
If we explicitly indicate we are documenting a typedef or a
struct, we'll be able to remove the $decl_type='type name' hack
from kernel-doc.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003024123.193840-4-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
3cd3c5193c
kernel-doc: Handle function typedefs without asterisks
...
Example of typedef that was not parsed by kernel-doc:
typedef void (ObjectUnparent)(Object *obj);
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003024123.193840-3-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
19ab6044be
kernel-doc: Handle function typedefs that return pointers
...
One example that was not being parsed correctly by kernel-doc is:
typedef Object *(ObjectPropertyResolve)(Object *obj,
void *opaque,
const char *part);
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003024123.193840-2-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
38a0d5bcde
docs/devel/qom: Avoid long lines
...
Long code lines don't look good in the rendered documents, make
them shorter.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003025424.199291-7-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
b99e80cb0f
docs/devel/qom: Remove usage of <code>
...
<code> is not valid reST syntax.
Function @argument references don't need additional markup, so
just remove <code></code>.
Constants were changed to use reST ``code`` syntax
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003025424.199291-6-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
acc34c2144
docs/devel/qom: Use *emphasis* for emphasis
...
<emphasis> is not valid reST syntax.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003025424.199291-5-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
671b3db056
docs/devel/qom: Fix indentation of code blocks
...
Some code blocks had one extra space, fix that.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003025424.199291-4-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
258c732769
docs/devel/qom: Fix indentation of bulleted list
...
The list was incorrectly parsed as a literal block due to
indentation.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003025424.199291-3-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
d5b9959dd7
qom: Fix DECLARE_*CHECKER documentation
...
Correct copy/paste mistake in the DECLARE_INSTANCE_CHECKER and
DECLARE_CLASS_CHECKERS documentation.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20201003025424.199291-2-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-10-06 11:09:35 -04:00
Eduardo Habkost
d1e2d46467
bios-tables-test: Remove kernel-irqchip=off option
...
We don't need to use kernel-irqchip=off for irq0 override if IRQ
routing is supported by the host, which is the case since 2009
(IRQ routing was added to KVM in Linux v2.6.30).
This is a more straightforward fix for Launchpad bug #1896263 , as
it doesn't require increasing the complexity of the MSR code.
kernel-irqchip=off is for debugging only and there's no need to
increase the complexity of the code just to work around an issue
that was already fixed in the kernel.
Fixes: https://bugs.launchpad.net/bugs/1896263
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20200922194732.2100510-1-ehabkost@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-09-30 19:11:36 +02:00
Eduardo Habkost
cd442a45db
docs: Create docs/devel/qom.rst
...
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20200910221526.10041-9-ehabkost@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-09-30 19:11:36 +02:00
Eduardo Habkost
6cf164c00f
qom: Add code block markup to all code blocks
...
Convert all example/codelisting markup to Sphinx code-block.
There are a few sections where backslashes at the end of lines
break code formatting. A comment was added noting that this is
an issue.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20200910221526.10041-8-ehabkost@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-09-30 19:11:36 +02:00
Eduardo Habkost
9bbfd245c3
qom: Indent existing code examples
...
This indents existing code examples that are not indented yet,
just to make future conversion to Sphinx markup easier to review.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20200910221526.10041-7-ehabkost@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-09-30 19:11:36 +02:00