| 61ad65d0 | 22-Sep-2020 |
Robert Hoo <robert.hu@linux.intel.com> |
cpu: Introduce CPU model deprecation API
Implement the ability of marking some versions deprecated. When that CPU model is chosen, print a warning. The warning message can be customized, e.g. sugge
cpu: Introduce CPU model deprecation API
Implement the ability of marking some versions deprecated. When that CPU model is chosen, print a warning. The warning message can be customized, e.g. suggesting an alternative CPU model to be used instead.
The deprecation message will be printed by x86_cpu_list_entry(), e.g. '-cpu help'.
QMP command 'query-cpu-definitions' will return a bool value indicating the deprecation status.
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com> Message-Id: <1600758855-80046-1-git-send-email-robert.hu@linux.intel.com> [ehabkost: reword commit message] [ehabkost: Handle NULL cpu_type] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| a23151e8 | 06-Oct-2020 |
Maxim Levitsky <mlevitsk@redhat.com> |
device-core: use atomic_set on .realized property
Some code might race with placement of new devices on a bus. We currently first place a (unrealized) device on the bus and then realize it.
As a wo
device-core: use atomic_set on .realized property
Some code might race with placement of new devices on a bus. We currently first place a (unrealized) device on the bus and then realize it.
As a workaround, users that scan the child device list, can check the realized property to see if it is safe to access such a device. Use an atomic write here too to aid with this.
A separate discussion is what to do with devices that are unrealized: It looks like for this case we only call the hotplug handler's unplug callback and its up to it to unrealize the device. An atomic operation doesn't cause harm for this code path though.
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-10-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 2d24a646 | 06-Oct-2020 |
Maxim Levitsky <mlevitsk@redhat.com> |
device-core: use RCU for list of children of a bus
This fixes the race between device emulation code that tries to find a child device to dispatch the request to (e.g a scsi disk), and hotplug of a
device-core: use RCU for list of children of a bus
This fixes the race between device emulation code that tries to find a child device to dispatch the request to (e.g a scsi disk), and hotplug of a new device to that bus.
Note that this doesn't convert all the readers of the list but only these that might go over that list without BQL held.
This is a very small first step to make this code thread safe.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-5-mlevitsk@redhat.com> [Use RCU_READ_LOCK_GUARD in more places, adjust testcase now that the delay in DEVICE_DELETED due to RCU is more consistent. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-9-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| bb755ba4 | 06-Oct-2020 |
Paolo Bonzini <pbonzini@redhat.com> |
qdev: add "check if address free" callback for buses
Check if an address is free on the bus before plugging in the device. This makes it possible to do the check without any side effects, and to de
qdev: add "check if address free" callback for buses
Check if an address is free on the bus before plugging in the device. This makes it possible to do the check without any side effects, and to detect the problem early without having to do it in the realize callback.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| e28ab096 | 06-Oct-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
hw/core: Move the creation of the library to the main meson.build
Be consistent creating all the libraries in the main meson.build file.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off
hw/core: Move the creation of the library to the main meson.build
Be consistent creating all the libraries in the main meson.build file.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201006125602.2311423-4-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 87e6f4a4 | 05-Oct-2020 |
Kevin Wolf <kwolf@redhat.com> |
monitor: Add Monitor parameter to monitor_get_cpu_index()
Most callers actually don't have to rely on cur_mon, but already know for which monitor they call monitor_get_cpu_index().
Signed-off-by: K
monitor: Add Monitor parameter to monitor_get_cpu_index()
Most callers actually don't have to rely on cur_mon, but already know for which monitor they call monitor_get_cpu_index().
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20201005155855.256490-3-kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
| a1d22c66 | 08-Oct-2020 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging
machine + QOM queue, 2020-10-06
* QOM documentation fixes and cleanups (Eduardo Habkost) * user-mode: Pru
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging
machine + QOM queue, 2020-10-06
* QOM documentation fixes and cleanups (Eduardo Habkost) * user-mode: Prune build dependencies (Philippe Mathieu-Daudé) * qom: Improve error message (Philippe Mathieu-Daudé) * numa: hmat: require parent cache description before the next level one (Igor Mammedov)
# gpg: Signature made Tue 06 Oct 2020 23:09:03 BST # gpg: using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6 # gpg: issuer "ehabkost@redhat.com" # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full] # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6
* remotes/ehabkost/tags/machine-next-pull-request: (21 commits) numa: hmat: require parent cache description before the next level one kernel-doc: Remove $decl_type='type name' hack memory: Explicitly tag doc comments for structs qom: Explicitly tag doc comments for typedefs and structs kernel-doc: Handle function typedefs without asterisks kernel-doc: Handle function typedefs that return pointers docs/devel/qom: Avoid long lines docs/devel/qom: Remove usage of <code> docs/devel/qom: Use *emphasis* for emphasis docs/devel/qom: Fix indentation of code blocks docs/devel/qom: Fix indentation of bulleted list qom: Fix DECLARE_*CHECKER documentation qom: Improve error message displayed with missing object properties hw/core/cpu: Add missing 'exec/cpu-common.h' include hw/core/qdev-properties: Extract system-mode specific properties hw/core/qdev-properties: Export some integer-related functions hw/core/qdev-properties: Export qdev_prop_enum hw/core/qdev-properties: Export enum-related functions hw/core/qdev-properties: Fix code style hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr() ...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
| 1b5e843a | 06-Oct-2020 |
Igor Mammedov <imammedo@redhat.com> |
numa: hmat: require parent cache description before the next level one
Spec[1] defines 0 - 3 level memory side cache, however QEMU CLI allows to specify an intermediate cache level without specifyin
numa: hmat: require parent cache description before the next level one
Spec[1] defines 0 - 3 level memory side cache, however QEMU CLI allows to specify an intermediate cache level without specifying previous level. Such option(s) silently ignored when building HMAT table, which leads to incomplete cache information. Make sure that previous level exists and error out if it hasn't been provided.
1) ACPI 6.2A 5.2.27.5 Memory Side Cache Information Structure
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1842877 Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20201006150002.1601845-1-imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| 4a795202 | 08-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
hw/core/cpu: Add missing 'exec/cpu-common.h' include
cpu_common_reset() uses tcg_flush_softmmu_tlb() which is declared in "exec/cpu-common.h". Add the missing header to avoid when refactoring other
hw/core/cpu: Add missing 'exec/cpu-common.h' include
cpu_common_reset() uses tcg_flush_softmmu_tlb() which is declared in "exec/cpu-common.h". Add the missing header to avoid when refactoring other headers:
hw/core/cpu.c: In function ‘cpu_common_reset’: hw/core/cpu.c:273:9: error: implicit declaration of function ‘tcg_flush_softmmu_tlb’ [-Werror=implicit-function-declaration] 273 | tcg_flush_softmmu_tlb(cpu); | ^~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200908123433.105706-1-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| aa1859cc | 30-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
hw/core/qdev-properties: Extract system-mode specific properties
Move properties specific to machines into a separate file.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Ri
hw/core/qdev-properties: Extract system-mode specific properties
Move properties specific to machines into a separate file.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930164949.1425294-9-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| 93e163e4 | 30-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
hw/core/qdev-properties: Export some integer-related functions
We are going to split this file and reuse these static functions. Declare them in the local "qdev-prop-internal.h" header.
Signed-off-
hw/core/qdev-properties: Export some integer-related functions
We are going to split this file and reuse these static functions. Declare them in the local "qdev-prop-internal.h" header.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930164949.1425294-8-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| 79bdf29c | 30-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
hw/core/qdev-properties: Export qdev_prop_enum
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930164949.142
hw/core/qdev-properties: Export qdev_prop_enum
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930164949.1425294-7-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| a2974439 | 30-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
hw/core/qdev-properties: Export enum-related functions
We are going to split this file and reuse these static functions. Add the local "qdev-prop-internal.h" header declaring them.
Signed-off-by: P
hw/core/qdev-properties: Export enum-related functions
We are going to split this file and reuse these static functions. Add the local "qdev-prop-internal.h" header declaring them.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930164949.1425294-6-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| 9ee468f3 | 30-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
hw/core/qdev-properties: Fix code style
We will soon move this code, fix its style to avoid checkpatch.pl to complain.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard
hw/core/qdev-properties: Fix code style
We will soon move this code, fix its style to avoid checkpatch.pl to complain.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930164949.1425294-5-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| bccb20c4 | 30-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()
Replace strtoul() by qemu_strtoul() so checkpatch.pl won't complain if we move this code later.
Signed-off-by: Philippe Mathieu
hw/core/qdev-properties: Use qemu_strtoul() in set_pci_host_devaddr()
Replace strtoul() by qemu_strtoul() so checkpatch.pl won't complain if we move this code later.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930164949.1425294-4-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| c0d67ade | 30-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler
The MACAddr structure contains an array of uint8_t. Previously if a value was out of the [0..255] range, it was silently casted and no
hw/core/qdev-properties: Use qemu_strtol() in set_mac() handler
The MACAddr structure contains an array of uint8_t. Previously if a value was out of the [0..255] range, it was silently casted and no input validation was done. Replace strtol() by qemu_strtol() -- so checkpatch.pl won't complain if we move this code later -- and return EINVAL if the input is invalid.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930164949.1425294-3-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
| bb4776be | 11-Aug-2020 |
Claudio Fontana <cfontana@suse.de> |
cpus: add handle_interrupt to the CpusAccel interface
kvm: uses the generic handler qtest: uses the generic handler whpx: changed to use the generic handler (identical implementation) hax: changed t
cpus: add handle_interrupt to the CpusAccel interface
kvm: uses the generic handler qtest: uses the generic handler whpx: changed to use the generic handler (identical implementation) hax: changed to use the generic handler (identical implementation) hvf: changed to use the generic handler (identical implementation) tcg: adapt tcg-cpus to point to the tcg-specific handler
Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 430065da | 31-Jul-2020 |
Claudio Fontana <cfontana@suse.de> |
cpus: prepare new CpusAccel cpu accelerator interface
The new interface starts unused, will start being used by the next patches.
It provides methods for each accelerator to start a vcpu, kick a vc
cpus: prepare new CpusAccel cpu accelerator interface
The new interface starts unused, will start being used by the next patches.
It provides methods for each accelerator to start a vcpu, kick a vcpu, synchronize state, get cpu virtual clock and elapsed ticks.
In qemu_wait_io_event, make it clear that APC is used only for HAX on Windows.
Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 740b1759 | 19-Aug-2020 |
Claudio Fontana <cfontana@suse.de> |
cpu-timers, icount: new modules
refactoring of cpus.c continues with cpu timer state extraction.
cpu-timers: responsible for the softmmu cpu timers state, including cpu clocks and ticks
cpu-timers, icount: new modules
refactoring of cpus.c continues with cpu timer state extraction.
cpu-timers: responsible for the softmmu cpu timers state, including cpu clocks and ticks.
icount: counts the TCG instructions executed. As such it is specific to the TCG accelerator. Therefore, it is built only under CONFIG_TCG.
One complication is due to qtest, which uses an icount field to warp time as part of qtest (qtest_clock_warp).
In order to solve this problem, provide a separate counter for qtest.
This requires fixing assumptions scattered in the code that qtest_enabled() implies icount_enabled(), checking each specific case.
Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> [remove redundant initialization with qemu_spice_init] Reviewed-by: Alex Bennée <alex.bennee@linaro.org> [fix lingering calls to icount_get] Signed-off-by: Claudio Fontana <cfontana@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 270b33cc | 11-Sep-2020 |
Igor Mammedov <imammedo@redhat.com> |
numa: remove fixup numa_state->num_nodes to MAX_NODES
current code permits only nodeids in [0..MAX_NODES) range due to nodeid check in
parse_numa_node() if (nodenr >= MAX_NODES) {
numa: remove fixup numa_state->num_nodes to MAX_NODES
current code permits only nodeids in [0..MAX_NODES) range due to nodeid check in
parse_numa_node() if (nodenr >= MAX_NODES) { error_setg(errp, "Max number of NUMA nodes reached: %"
so subj fixup is not reachable, drop it.
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20200911084410.788171-4-imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| b21aa7e0 | 11-Sep-2020 |
Igor Mammedov <imammedo@redhat.com> |
numa: drop support for '-numa node' (without memory specified)
it was deprecated since 4.1 commit 4bb4a2732e (numa: deprecate implict memory distribution between nodes)
Users of existing VMs, wishi
numa: drop support for '-numa node' (without memory specified)
it was deprecated since 4.1 commit 4bb4a2732e (numa: deprecate implict memory distribution between nodes)
Users of existing VMs, wishing to preserve the same RAM distribution, should configure it explicitly using ``-numa node,memdev`` options. Current RAM distribution can be retrieved using HMP command `info numa` and if separate memory devices (pc|nv-dimm) are present use `info memory-device` and subtract device memory from output of `info numa`.
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20200911084410.788171-2-imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
| 8dc007d3 | 13-Sep-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
qapi: Restrict LostTickPolicy enum to machine code
Restricting LostTickPolicy to machine.json pulls slightly less QAPI-generated code into user-mode.
Acked-by: Markus Armbruster <armbru@redhat.com>
qapi: Restrict LostTickPolicy enum to machine code
Restricting LostTickPolicy to machine.json pulls slightly less QAPI-generated code into user-mode.
Acked-by: Markus Armbruster <armbru@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200913195348.1064154-2-philmd@redhat.com> [Add rationale to commit message] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
| d55f5182 | 21-Sep-2020 |
Stefano Garzarella <sgarzare@redhat.com> |
virtio: skip legacy support check on machine types less than 5.1
Commit 9b3a35ec82 ("virtio: verify that legacy support is not accidentally on") added a check that returns an error if legacy support
virtio: skip legacy support check on machine types less than 5.1
Commit 9b3a35ec82 ("virtio: verify that legacy support is not accidentally on") added a check that returns an error if legacy support is on, but the device does not support legacy.
Unfortunately some devices were wrongly declared legacy capable even if they were not (e.g vhost-vsock).
To avoid migration issues, we add a virtio-device property (x-disable-legacy-check) to skip the legacy error, printing a warning instead, for machine types < 5.1.
Cc: qemu-stable@nongnu.org Fixes: 9b3a35ec82 ("virtio: verify that legacy support is not accidentally on") Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Suggested-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20200921122506.82515-2-sgarzare@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| 63e79833 | 15-Sep-2020 |
Igor Mammedov <imammedo@redhat.com> |
cphp: remove deprecated cpu-add command(s)
These were deprecated since 4.0, remove both HMP and QMP variants.
Users should use device_add command instead. To get list of possible CPUs and options,
cphp: remove deprecated cpu-add command(s)
These were deprecated since 4.0, remove both HMP and QMP variants.
Users should use device_add command instead. To get list of possible CPUs and options, use 'info hotpluggable-cpus' HMP or query-hotpluggable-cpus QMP command.
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <20200915120403.1074579-1-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
| e8a612b7 | 20-Aug-2020 |
Alistair Francis <alistair.francis@wdc.com> |
core/register: Specify instance_size in the TypeInfo
Reported-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé
core/register: Specify instance_size in the TypeInfo
Reported-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <4cf1beb7dafb9143c261d266557d3173bf160524.1598376594.git.alistair.francis@wdc.com>
show more ...
|