- Nov 07, 2023
-
-
Philippe Mathieu-Daudé authored
Factor the TCG specific code from cpu_common_reset_hold() to tcg_cpu_reset_hold() within tcg-accel-ops.c. Since this file is sysemu specific, we can inline tcg_flush_softmmu_tlb(), removing its declaration in "exec/cpu-common.h". Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Anton Johansson <anjo@rev.ng> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230918104153.24433-4-philmd@linaro.org>
-
- Oct 25, 2023
-
-
Paolo Bonzini authored
KVM_CAP_IOEVENTFD_ANY_LENGTH was added in Linux 4.4, released in 2016. Assume that it is present. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
NR_IOBUS_DEVS was increased to 200 in Linux 2.6.34. By Linux 3.5 it had increased to 1000 and later ioeventfds were changed to not count against the limit. But the earlier limit of 200 would already be enough for kvm_check_many_ioeventfds() to be true, so remove the check. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
KVM_IRQFD was introduced in Linux 2.6.32, and since then it has always been available on architectures that support an in-kernel interrupt controller. We can require it unconditionally. Reviewed-by:
Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This was introduced in KVM in Linux 3.5, we can require it unconditionally in kvm_irqchip_send_msi(). However, not all architectures have to implement it so check it only in x86, the only architecture that ever had MSI injection but not KVM_CAP_SIGNAL_MSI. ARM uses it to detect the presence of the ITS emulation in the kernel, introduced in Linux 4.8. Assume that it's there and possibly fail when realizing the arm-its-kvm device. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This function is only invoked from hw/intc/s390_flic_kvm.c, and therefore only if CONFIG_KVM is defined. Reviewed-by:
Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 12, 2023
-
-
David Hildenbrand authored
We'll need the stub soon from memory device context. While at it, use "unsigned int" as return value and place the declaration next to kvm_get_free_memslots(). Message-ID: <20230926185738.277351-11-david@redhat.com> Reviewed-by:
Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com>
-
David Hildenbrand authored
Let's return the number of free slots instead of only checking if there is a free slot. While at it, check all address spaces, which will also consider SMM under x86 correctly. This is a preparation for memory devices that consume multiple memslots. Message-ID: <20230926185738.277351-5-david@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com>
-
- Oct 07, 2023
-
-
Philippe Mathieu-Daudé authored
Rename accel.softmmu -> accel.system in file paths and the register_types() method. Rename sysemu_stubs_ss -> system_stubs_ss in meson following the pattern used on other source set names. Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231004090629.37473-7-philmd@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 31, 2023
-
-
Philippe Mathieu-Daudé authored
HAX is deprecated since commits 73741fda ("MAINTAINERS: Abort HAXM maintenance") and 90c167a1 ("docs/about/deprecated: Mark HAXM in QEMU as deprecated"), released in v8.0.0. Per the latest HAXM release (v7.8 [*]), the latest QEMU supported is v7.2: Note: Up to this release, HAXM supports QEMU from 2.9.0 to 7.2.0. The next commit (https://github.com/intel/haxm/commit/da1b8ec072) added: HAXM v7.8.0 is our last release and we will not accept pull requests or respond to issues after this. It became very hard to build and test HAXM. Its previous maintainers made it clear they won't help. It doesn't seem to be a very good use of QEMU maintainers to spend their time in a dead project. Save our time by removing this orphan zombie code. [*] https://github.com/intel/haxm/releases/tag/v7.8.0 Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Acked-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230831082016.60885-1-philmd@linaro.org>
-
- Jun 28, 2023
-
-
Philippe Mathieu-Daudé authored
Avoid when calling kvm_direct_msi_enabled() from arm_gicv3_its_common.c the next commit: Undefined symbols for architecture arm64: "_kvm_direct_msi_allowed", referenced from: _its_class_name in hw_intc_arm_gicv3_its_common.c.o ld: symbol(s) not found for architecture arm64 Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230405160454.97436-3-philmd@linaro.org>
-
- Jun 26, 2023
-
-
Anton Johansson authored
Functions for probing memory accesses (and functions that call these) are updated to take a vaddr for guest virtual addresses over target_ulong. Signed-off-by:
Anton Johansson <anjo@rev.ng> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230621135633.1649-9-anjo@rev.ng> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Anton Johansson authored
Replaces target_ulong with vaddr for guest virtual addresses in tlb_*() functions and auxilliary structs. Signed-off-by:
Anton Johansson <anjo@rev.ng> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230621135633.1649-2-anjo@rev.ng> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jun 20, 2023
-
-
Philippe Mathieu-Daudé authored
Since we *might* have user emulation with softmmu, use the clearer 'CONFIG_SYSTEM_ONLY' key to check for system emulation. Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230613133347.82210-9-philmd@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Mar 07, 2023
-
-
Alex Bennée authored
This aids subsystems (like gdbstub) that want to trigger a flush without pulling target specific headers. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230302190846.2593720-8-alex.bennee@linaro.org> Message-Id: <20230303025805.625589-8-richard.henderson@linaro.org>
-
- Feb 28, 2023
-
-
Daniel Henrique Barboza authored
probe_access_flags() as it is today uses probe_access_full(), which in turn uses probe_access_internal() with size = 0. probe_access_internal() then uses the size to call the tlb_fill() callback for the given CPU. This size param ('fault_size' as probe_access_internal() calls it) is ignored by most existing .tlb_fill callback implementations, e.g. arm_cpu_tlb_fill(), ppc_cpu_tlb_fill(), x86_cpu_tlb_fill() and mips_cpu_tlb_fill() to name a few. But RISC-V riscv_cpu_tlb_fill() actually uses it. The 'size' parameter is used to check for PMP (Physical Memory Protection) access. This is necessary because PMP does not make any guarantees about all the bytes of the same page having the same permissions, i.e. the same page can have different PMP properties, so we're forced to make sub-page range checks. To allow RISC-V emulation to do a probe_acess_flags() that covers PMP, we need to either add a 'size' param to the existing probe_acess_flags() or create a new interface (e.g. probe_access_range_flags). There are quite a few probe_* APIs already, so let's add a 'size' param to probe_access_flags() and re-use this API. This is done by open coding what probe_access_full() does inside probe_acess_flags() and passing the 'size' param to probe_acess_internal(). Existing probe_access_flags() callers use size = 0 to not change their current API usage. 'size' is asserted to enforce single page access like probe_access() already does. No behavioral changes intended. Signed-off-by:
Daniel Henrique Barboza <dbarboza@ventanamicro.com> Message-Id: <20230223234427.521114-2-dbarboza@ventanamicro.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Oct 06, 2022
-
-
Alex Bennée authored
Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-47-alex.bennee@linaro.org>
-
Alex Bennée authored
As HW virtualization requires specific support to handle breakpoints lets push out special casing out of the core gdbstub code and into AccelOpsClass. This will make it easier to add other accelerator support and reduces some of the stub shenanigans. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Mads Ynddal <mads@ynddal.dk> Message-Id: <20220929114231.583801-45-alex.bennee@linaro.org>
-
- Oct 04, 2022
-
-
Richard Henderson authored
Wrap the bare TranslationBlock pointer into a structure. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jul 20, 2022
-
-
Hyman Huang authored
Introduce kvm_dirty_ring_size util function to help calculate dirty ring ful time. Signed-off-by:
Hyman Huang(黄勇) <huangy81@chinatelecom.cn> Acked-by:
Peter Xu <peterx@redhat.com> Message-Id: <f9ce1f550bfc0e3a1f711e17b1dbc8f701700e56.1656177590.git.huangy81@chinatelecom.cn> Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
- Jun 27, 2022
-
-
Richard Henderson authored
Reviewed-by:
Luc Michel <lmichel@kalray.eu> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Apr 21, 2022
-
-
Marc-André Lureau authored
G_NORETURN was introduced in glib 2.68, fallback to G_GNUC_NORETURN in glib-compat. Note that this attribute must be placed before the function declaration (bringing a bit of consistency in qemu codebase usage). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Warner Losh <imp@bsdimp.com> Message-Id: <20220420132624.2439741-20-marcandre.lureau@redhat.com>
-
- Mar 15, 2022
-
-
Longpeng (Mike) authored
We invoke the kvm_irqchip_commit_routes() for each addition to MSI route table, which is not efficient if we are adding lots of routes in some cases. This patch lets callers invoke the kvm_irqchip_commit_routes(), so the callers can decide how to optimize. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg00967.html Signed-off-by:
Longpeng <longpeng2@huawei.com> Message-Id: <20220222141116.2091-3-longpeng2@huawei.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 06, 2022
-
-
Philippe Mathieu-Daudé authored
Mirror "sysemu/kvm.h" #ifdef'ry to define CONFIG_HAX_IS_POSSIBLE, expose hax_allowed to hax_enabled() macro. Suggested-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220207075426.81934-9-f4bug@amsat.org>
-
Philippe Mathieu-Daudé authored
Now than we only build this stub with system emulation, remove the user-mode #ifdef'ry. Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220207075426.81934-8-f4bug@amsat.org>
-
Philippe Mathieu-Daudé authored
Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220207075426.81934-2-f4bug@amsat.org>
-
- Nov 01, 2021
-
-
Hyman Huang authored
dirty_pages is used to calculate dirtyrate via dirty ring, when enabled, kvm-reaper will increase the dirty pages after gfns being dirtied. kvm_dirty_ring_enabled shows if kvm-reaper is working. dirtyrate thread could use it to check if measurement can base on dirty ring feature. Signed-off-by:
Hyman Huang(黄勇) <huangy81@chinatelecom.cn> Message-Id: <fee5fb2ab17ec2159405fc54a3cff8e02322f816.1624040308.git.huangy81@chinatelecom.cn> Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
- May 02, 2021
-
-
Thomas Huth authored
Stop including cpu.h in files that don't need it. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20210416171314.2074665-4-thuth@redhat.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Feb 08, 2021
-
-
David Gibson authored
When AMD's SEV memory encryption is in use, flash memory banks (which are initialed by pc_system_flash_map()) need to be encrypted with the guest's key, so that the guest can read them. That's abstracted via the kvm_memcrypt_encrypt_data() callback in the KVM state.. except, that it doesn't really abstract much at all. For starters, the only call site is in code specific to the 'pc' family of machine types, so it's obviously specific to those and to x86 to begin with. But it makes a bunch of further assumptions that need not be true about an arbitrary confidential guest system based on memory encryption, let alone one based on other mechanisms: * it assumes that the flash memory is defined to be encrypted with the guest key, rather than being shared with hypervisor * it assumes that that hypervisor has some mechanism to encrypt data into the guest, even though it can't decrypt it out, since that's the whole point * the interface assumes that this encrypt can be done in place, which implies that the hypervisor can write into a confidential guests's memory, even if what it writes isn't meaningful So really, this "abstraction" is actually pretty specific to the way SEV works. So, this patch removes it and instead has the PC flash initialization code call into a SEV specific callback. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Reviewed-by:
Cornelia Huck <cohuck@redhat.com>
-
- Jan 23, 2021
-
-
Philippe Mathieu-Daudé authored
cpu_loop_exit*() functions are declared in accel/tcg/cpu-exec-common.c, and are not available when TCG accelerator is not built. Add stubs so linking without TCG succeed. Problematic files: - hw/semihosting/console.c in qemu_semihosting_console_inc() - hw/ppc/spapr_hcall.c in h_confer() - hw/s390x/ipl.c in s390_ipl_reset_request() - hw/misc/mips_itu.c Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210117164813.4101761-5-f4bug@amsat.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jan 02, 2021
-
-
Paolo Bonzini authored
Enable removing tcg/$tcg_arch from the include path when TCG is disabled. Move translate-all.h to include/exec, since stubs exist for the functions defined therein. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Nov 16, 2020
-
-
Alex Bennée authored
Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201110192316.26397-7-alex.bennee@linaro.org>
-
- Oct 21, 2020
-
-
Philippe Mathieu-Daudé authored
Restricting xen-set-global-dirty-log and xen-load-devices-state commands migration.json pulls slightly less QAPI-generated code into user-mode and tools. Acked-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201012121536.3381997-6-philmd@redhat.com> Reviewed-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- 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> 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
register a "CpusAccel" interface for KVM as well. Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.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>
-
- Sep 30, 2020
-
-
Philippe Mathieu-Daudé authored
Move hardware stubs unrelated from the accelerator to xen-hw-stub.c. Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200908155530.249806-5-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Philippe Mathieu-Daudé authored
xen_hvm_init() is only meanful to initialize a X86/PC machine, rename it as xen_hvm_init_pc(). Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200908155530.249806-3-philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-