- Oct 13, 2020
-
-
Eduardo Habkost authored
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>
-
Philippe Mathieu-Daudé authored
Commit 0b09be2b ("Nicer debug output for exceptions") added twice the same "Tag Overflow" entry, remove the extra one. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20201011200112.3222822-1-f4bug@amsat.org> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Oct 12, 2020
-
-
Markus Armbruster authored
Missed in commit 41fba161 "docs/system: convert the documentation of deprecated features to rST." Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200929075824.1517969-3-armbru@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Oct 08, 2020
-
-
Greg Kurz authored
VMState handlers are supposed to return negative errno values on failure. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <20200914123505.612812-4-groug@kaod.org> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Greg Kurz authored
As recommended in "qapi/error.h", indicate success / failure with a return value. Since ppc_set_compat() is called from a VMState handler, let's make it an int so that it propagates any negative errno returned by kvmppc_set_compat(). Do the same for ppc_set_compat_all() for consistency, even if it isn't called in a context where a negative errno is required on failure. This will allow to simplify error handling in the callers. Signed-off-by:
Greg Kurz <groug@kaod.org> Message-Id: <20200914123505.612812-3-groug@kaod.org> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Peter Maydell authored
QEMU supports a 48-bit physical address range, but we don't currently expose it in the '-cpu max' ID registers (you get the same range as Cortex-A57, which is 44 bits). Set the ID_AA64MMFR0.PARange field to indicate 48 bits. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20201001160116.18095-1-peter.maydell@linaro.org
-
Andrew Jones authored
We add the kvm-steal-time CPU property and implement it for machvirt. A tiny bit of refactoring was also done to allow pmu and pvtime to use the same vcpu device helper functions. Reviewed-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-id: 20201001061718.101915-7-drjones@redhat.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Andrew Jones authored
When we compile without KVM support !defined(CONFIG_KVM) we generate stubs for functions that the linker will still encounter. Sometimes these stubs can be executed safely and are placed in paths where they get executed with or without KVM. Other functions should never be called without KVM. Those functions should be guarded by kvm_enabled(), but should also be robust to refactoring mistakes. Putting a g_assert_not_reached() in the function should help. Additionally, the g_assert_not_reached() calls may actually help the linker remove some code. We remove the stubs for kvm_arm_get/put_virtual_time(), as they aren't necessary at all - the only caller is in kvm.c Reviewed-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-id: 20201001061718.101915-3-drjones@redhat.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Oct 05, 2020
-
-
Claudio Fontana authored
Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Claudio Fontana authored
Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Claudio Fontana authored
Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Roman Bolshakov <r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Claudio Fontana authored
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>
-
Claudio Fontana authored
register a "CpusAccel" interface for HVF as well. Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Roman Bolshakov <r.bolshakov@yadro.com> [added const] Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Claudio Fontana authored
register a "CpusAccel" interface for WHPX as well. Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Claudio Fontana authored
register a "CpusAccel" interface for HAX as well. Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Claudio Fontana authored
Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Claudio Fontana authored
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>
-
- Oct 04, 2020
-
-
Zhenwei Pi authored
Post memory failure event through QMP to handle hardware memory corrupted event. Rather than simply printing to the log, QEMU could report more effective message to the client. For example, if a guest receives an MCE, evacuating the host could be a good idea. Signed-off-by:
zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20200930100440.1060708-4-pizhenwei@bytedance.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Zhenwei Pi authored
Previously we would only get a simple string "Triple fault" in qemu log. Add detailed message for the two reasons to describe why qemu has to reset the guest. Signed-off-by:
zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20200930100440.1060708-2-pizhenwei@bytedance.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 03, 2020
-
-
Richard Henderson authored
Enable s390x, aka SYSZ, in the git submodule build. Set the capstone parameters for both s390x host and guest. Tested-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Acked-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Oct 02, 2020
-
-
David Hildenbrand authored
As with the other crypto functions, we only implement subcode 0 (query) and no actual encryption/decryption. We now implement S390_FEAT_MSA_EXT_8. Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200928122717.30586-10-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
We implement all relevant instructions. Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200928122717.30586-9-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
We need new CC handling, determining the CC based on the intermediate result (64bit for MSC and MSRKC, 128bit for MSGC and MSGRKC). We want to store out2 ("low") after muls128 to r1, so add "wout_out2_r1". Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200928122717.30586-8-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
Just like BRANCH ON CONDITION - however the address is read from memory (always 8 bytes are read), we have to wrap the address manually. The address is read using current CPU DAT/address-space controls, just like ordinary data. Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200928122717.30586-7-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
Just like MULTIPLY HALFWORD IMMEDIATE (MGHI), only the second operand (signed 16 bit) comes from memory. Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200928122717.30586-6-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
Multiply two signed 64bit values and store the 128bit result in r1 (0-63) and r1 + 1 (64-127). Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200928122717.30586-5-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
Easy to wire up. Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200928122717.30586-4-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
Easy, just like ADD HALFWORD IMMEDIATE (AGHI). Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200928122717.30586-3-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
Let's avoid confusion with the "Miscellaneous-Instruction-Extensions Facility 1" Suggested-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20200928122717.30586-2-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
David Hildenbrand authored
Recent upstream Linux uses the MONITOR CALL instruction for things like BUG_ON() and WARN_ON(). We currently inject an operation exception when we hit a MONITOR CALL instruction - which is wrong, as the instruction is not glued to specific CPU features. Doing a simple WARN_ON_ONCE() currently results in a panic: [ 18.162801] illegal operation: 0001 ilc:2 [#1] SMP [ 18.162889] Modules linked in: [...] [ 18.165476] Kernel panic - not syncing: Fatal exception: panic_on_oops With a proper implementation, we now get: [ 18.242754] ------------[ cut here ]------------ [ 18.242855] WARNING: CPU: 7 PID: 1 at init/main.c:1534 [...] [ 18.242919] Modules linked in: [...] [ 18.246262] ---[ end trace a420477d71dc97b4 ]--- [ 18.259014] Freeing unused kernel memory: 4220K Reported-by:
Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200918085122.26132-1-david@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
Collin L. Walling authored
DIAGNOSE 0x318 (diag318) is an s390 instruction that allows the storage of diagnostic information that is collected by the firmware in the case of hardware/firmware service events. QEMU handles the instruction by storing the info in the CPU state. A subsequent register sync will communicate the data to the hypervisor. QEMU handles the migration via a VM State Description. This feature depends on the Extended-Length SCCB (els) feature. If els is not present, then a warning will be printed and the SCLP bit that allows the Linux kernel to execute the instruction will not be set. Availability of this instruction is determined by byte 134 (aka fac134) bit 0 of the SCLP Read Info block. This coincidentally expands into the space used for CPU entries, which means VMs running with the diag318 capability may not be able to read information regarding all CPUs unless the guest kernel supports an extended-length SCCB. This feature is not supported in protected virtualization mode. Signed-off-by:
Collin Walling <walling@linux.ibm.com> Acked-by:
Janosch Frank <frankja@linux.ibm.com> Acked-by:
Thomas Huth <thuth@redhat.com> Acked-by:
David Hildenbrand <david@redhat.com> Acked-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <20200915194416.107460-9-walling@linux.ibm.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
Collin L. Walling authored
As more features and facilities are added to the Read SCP Info (RSCPI) response, more space is required to store them. The space used to store these new features intrudes on the space originally used to store CPU entries. This means as more features and facilities are added to the RSCPI response, less space can be used to store CPU entries. With the Extended-Length SCCB (ELS) facility, a KVM guest can execute the RSCPI command and determine if the SCCB is large enough to store a complete reponse. If it is not large enough, then the required length will be set in the SCCB header. The caller of the SCLP command is responsible for creating a large-enough SCCB to store a complete response. Proper checking should be in place, and the caller should execute the command once-more with the large-enough SCCB. This facility also enables an extended SCCB for the Read CPU Info (RCPUI) command. When this facility is enabled, the boundary violation response cannot be a result from the RSCPI, RSCPI Forced, or RCPUI commands. In order to tolerate kernels that do not yet have full support for this feature, a "fixed" offset to the start of the CPU Entries within the Read SCP Info struct is set to allow for the original 248 max entries when this feature is disabled. Additionally, this is introduced as a CPU feature to protect the guest from migrating to a machine that does not support storing an extended SCCB. This could otherwise hinder the VM from being able to read all available CPU entries after migration (such as during re-ipl). Signed-off-by:
Collin Walling <walling@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <20200915194416.107460-7-walling@linux.ibm.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
- Oct 01, 2020
-
-
Richard Henderson authored
While converting to gen_gvec_ool_zzzp, we lost passing a->esz as the data argument to the function. Fixes: 36cbb7a8 Cc: qemu-stable@nongnu.org Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20200918000500.2690937-1-richard.henderson@linaro.org Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Richard Henderson authored
The mte update missed a bit when producing clean addresses. Fixes: b2aa8879 Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20200916014102.2446323-1-richard.henderson@linaro.org Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Maydell authored
The M-profile definition of the MVFR1 ID register differs slightly from the A-profile one, and in particular the check for "does the CPU support fp16 arithmetic" is not the same. We don't currently implement any M-profile CPUs with fp16 arithmetic, so this is not yet a visible bug, but correcting the logic now disarms this beartrap for when we eventually do. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20200910173855.4068-6-peter.maydell@linaro.org
-
Peter Maydell authored
Give the Cortex-M0 ID register values corresponding to its implemented behaviour. These will not be guest-visible but will be used to govern the behaviour of QEMU's emulation. We use the same values that the Cortex-M3 does. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20200910173855.4068-5-peter.maydell@linaro.org
-
Peter Maydell authored
Move the id_pfr0 and id_pfr1 fields into the ARMISARegisters sub-struct. We're going to want id_pfr1 for an isar_features check, and moving both at the same time avoids an odd inconsistency. Changes other than the ones to cpu.h and kvm64.c made automatically with: perl -p -i -e 's/cpu->id_pfr/cpu->isar.id_pfr/' target/arm/*.c hw/intc/armv7m_nvic.c Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20200910173855.4068-3-peter.maydell@linaro.org
-
Peter Maydell authored
The ARM_FEATURE_PXN bit indicates whether the CPU supports the PXN bit in short-descriptor translation table format descriptors. This is indicated by ID_MMFR0.VMSA being at least 0b0100. Replace the feature bit with an ID register check, in line with our preference for ID register checks over feature bits. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20200910173855.4068-2-peter.maydell@linaro.org
-
- Sep 30, 2020
-
-
Paolo Bonzini authored
Paravirtualized features have been listed in KVM_GET_SUPPORTED_CPUID since Linux 2.6.35 (commit 84478c829d0f, "KVM: x86: export paravirtual cpuid flags in KVM_GET_SUPPORTED_CPUID", 2010-05-19). It has been more than 10 years, so remove the fallback code. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Vitaly Kuznetsov authored
QEMU's kvmclock device is only created when KVM PV feature bits for kvmclock (KVM_FEATURE_CLOCKSOURCE/KVM_FEATURE_CLOCKSOURCE2) are exposed to the guest. With 'kvm=off' cpu flag the device is not created and we don't call KVM_GET_CLOCK/KVM_SET_CLOCK upon migration. It was reported that without these call at least Hyper-V TSC page clocksouce (which can be enabled independently) gets broken after migration. Switch to creating kvmclock QEMU device unconditionally, it seems to always make sense to call KVM_GET_CLOCK/KVM_SET_CLOCK on migration. Use KVM_CAP_ADJUST_CLOCK check instead of CPUID feature bits. Reported-by:
Antoine Damhet <antoine.damhet@blade-group.com> Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20200922151934.899555-1-vkuznets@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-