Skip to content

Commit 79e06c4

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm updates from Paolo Bonzini: "RISCV: - Use common KVM implementation of MMU memory caches - SBI v0.2 support for Guest - Initial KVM selftests support - Fix to avoid spurious virtual interrupts after clearing hideleg CSR - Update email address for Anup and Atish ARM: - Simplification of the 'vcpu first run' by integrating it into KVM's 'pid change' flow - Refactoring of the FP and SVE state tracking, also leading to a simpler state and less shared data between EL1 and EL2 in the nVHE case - Tidy up the header file usage for the nvhe hyp object - New HYP unsharing mechanism, finally allowing pages to be unmapped from the Stage-1 EL2 page-tables - Various pKVM cleanups around refcounting and sharing - A couple of vgic fixes for bugs that would trigger once the vcpu xarray rework is merged, but not sooner - Add minimal support for ARMv8.7's PMU extension - Rework kvm_pgtable initialisation ahead of the NV work - New selftest for IRQ injection - Teach selftests about the lack of default IPA space and page sizes - Expand sysreg selftest to deal with Pointer Authentication - The usual bunch of cleanups and doc update s390: - fix sigp sense/start/stop/inconsistency - cleanups x86: - Clean up some function prototypes more - improved gfn_to_pfn_cache with proper invalidation, used by Xen emulation - add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery - completely remove potential TOC/TOU races in nested SVM consistency checks - update some PMCs on emulated instructions - Intel AMX support (joint work between Thomas and Intel) - large MMU cleanups - module parameter to disable PMU virtualization - cleanup register cache - first part of halt handling cleanups - Hyper-V enlightened MSR bitmap support for nested hypervisors Generic: - clean up Makefiles - introduce CONFIG_HAVE_KVM_DIRTY_RING - optimize memslot lookup using a tree - optimize vCPU array usage by converting to xarray" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (268 commits) x86/fpu: Fix inline prefix warnings selftest: kvm: Add amx selftest selftest: kvm: Move struct kvm_x86_state to header selftest: kvm: Reorder vcpu_load_state steps for AMX kvm: x86: Disable interception for IA32_XFD on demand x86/fpu: Provide fpu_sync_guest_vmexit_xfd_state() kvm: selftests: Add support for KVM_CAP_XSAVE2 kvm: x86: Add support for getting/setting expanded xstate buffer x86/fpu: Add uabi_size to guest_fpu kvm: x86: Add CPUID support for Intel AMX kvm: x86: Add XCR0 support for Intel AMX kvm: x86: Disable RDMSR interception of IA32_XFD_ERR kvm: x86: Emulate IA32_XFD_ERR for guest kvm: x86: Intercept #NM for saving IA32_XFD_ERR x86/fpu: Prepare xfd_err in struct fpu_guest kvm: x86: Add emulation for IA32_XFD x86/fpu: Provide fpu_update_guest_xfd() for IA32_XFD emulation kvm: x86: Enable dynamic xfeatures at KVM_SET_CPUID2 x86/fpu: Provide fpu_enable_guest_xfd_features() for KVM x86/fpu: Add guest support to xfd_enable_feature() ...
2 parents cb3f09f + c862dcd commit 79e06c4

File tree

212 files changed

+9043
-2909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+9043
-2909
lines changed

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ Andy Adamson <andros@citi.umich.edu>
4949
Antoine Tenart <atenart@kernel.org> <antoine.tenart@bootlin.com>
5050
Antoine Tenart <atenart@kernel.org> <antoine.tenart@free-electrons.com>
5151
Antonio Ospite <ao2@ao2.it> <ao2@amarulasolutions.com>
52+
Anup Patel <anup@brainfault.org> <anup.patel@wdc.com>
5253
Archit Taneja <archit@ti.com>
5354
Ard Biesheuvel <ardb@kernel.org> <ard.biesheuvel@linaro.org>
5455
Arnaud Patard <arnaud.patard@rtp-net.org>
5556
Arnd Bergmann <arnd@arndb.de>
57+
Atish Patra <atishp@atishpatra.org> <atish.patra@wdc.com>
5658
Axel Dyks <xl@xlsigned.net>
5759
Axel Lin <axel.lin@gmail.com>
5860
Bart Van Assche <bvanassche@acm.org> <bart.vanassche@sandisk.com>

Documentation/virt/kvm/api.rst

Lines changed: 80 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,9 @@ The bits in the dirty bitmap are cleared before the ioctl returns, unless
371371
KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is enabled. For more information,
372372
see the description of the capability.
373373

374+
Note that the Xen shared info page, if configured, shall always be assumed
375+
to be dirty. KVM will not explicitly mark it such.
376+
374377
4.9 KVM_SET_MEMORY_ALIAS
375378
------------------------
376379

@@ -1566,6 +1569,7 @@ otherwise it will return EBUSY error.
15661569

15671570
struct kvm_xsave {
15681571
__u32 region[1024];
1572+
__u32 extra[0];
15691573
};
15701574

15711575
This ioctl would copy current vcpu's xsave struct to the userspace.
@@ -1574,7 +1578,7 @@ This ioctl would copy current vcpu's xsave struct to the userspace.
15741578
4.43 KVM_SET_XSAVE
15751579
------------------
15761580

1577-
:Capability: KVM_CAP_XSAVE
1581+
:Capability: KVM_CAP_XSAVE and KVM_CAP_XSAVE2
15781582
:Architectures: x86
15791583
:Type: vcpu ioctl
15801584
:Parameters: struct kvm_xsave (in)
@@ -1585,9 +1589,18 @@ This ioctl would copy current vcpu's xsave struct to the userspace.
15851589

15861590
struct kvm_xsave {
15871591
__u32 region[1024];
1592+
__u32 extra[0];
15881593
};
15891594

1590-
This ioctl would copy userspace's xsave struct to the kernel.
1595+
This ioctl would copy userspace's xsave struct to the kernel. It copies
1596+
as many bytes as are returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2),
1597+
when invoked on the vm file descriptor. The size value returned by
1598+
KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) will always be at least 4096.
1599+
Currently, it is only greater than 4096 if a dynamic feature has been
1600+
enabled with ``arch_prctl()``, but this may change in the future.
1601+
1602+
The offsets of the state save areas in struct kvm_xsave follow the
1603+
contents of CPUID leaf 0xD on the host.
15911604

15921605

15931606
4.44 KVM_GET_XCRS
@@ -1684,6 +1697,10 @@ userspace capabilities, and with user requirements (for example, the
16841697
user may wish to constrain cpuid to emulate older hardware, or for
16851698
feature consistency across a cluster).
16861699

1700+
Dynamically-enabled feature bits need to be requested with
1701+
``arch_prctl()`` before calling this ioctl. Feature bits that have not
1702+
been requested are excluded from the result.
1703+
16871704
Note that certain capabilities, such as KVM_CAP_X86_DISABLE_EXITS, may
16881705
expose cpuid features (e.g. MONITOR) which are not supported by kvm in
16891706
its default configuration. If userspace enables such capabilities, it
@@ -1796,6 +1813,7 @@ No flags are specified so far, the corresponding field must be set to zero.
17961813
struct kvm_irq_routing_msi msi;
17971814
struct kvm_irq_routing_s390_adapter adapter;
17981815
struct kvm_irq_routing_hv_sint hv_sint;
1816+
struct kvm_irq_routing_xen_evtchn xen_evtchn;
17991817
__u32 pad[8];
18001818
} u;
18011819
};
@@ -1805,6 +1823,7 @@ No flags are specified so far, the corresponding field must be set to zero.
18051823
#define KVM_IRQ_ROUTING_MSI 2
18061824
#define KVM_IRQ_ROUTING_S390_ADAPTER 3
18071825
#define KVM_IRQ_ROUTING_HV_SINT 4
1826+
#define KVM_IRQ_ROUTING_XEN_EVTCHN 5
18081827

18091828
flags:
18101829

@@ -1856,6 +1875,20 @@ address_hi must be zero.
18561875
__u32 sint;
18571876
};
18581877

1878+
struct kvm_irq_routing_xen_evtchn {
1879+
__u32 port;
1880+
__u32 vcpu;
1881+
__u32 priority;
1882+
};
1883+
1884+
1885+
When KVM_CAP_XEN_HVM includes the KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL bit
1886+
in its indication of supported features, routing to Xen event channels
1887+
is supported. Although the priority field is present, only the value
1888+
KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL is supported, which means delivery by
1889+
2 level event channels. FIFO event channel support may be added in
1890+
the future.
1891+
18591892

18601893
4.55 KVM_SET_TSC_KHZ
18611894
--------------------
@@ -3701,7 +3734,7 @@ KVM with the currently defined set of flags.
37013734
:Architectures: s390
37023735
:Type: vm ioctl
37033736
:Parameters: struct kvm_s390_skeys
3704-
:Returns: 0 on success, KVM_S390_GET_KEYS_NONE if guest is not using storage
3737+
:Returns: 0 on success, KVM_S390_GET_SKEYS_NONE if guest is not using storage
37053738
keys, negative value on error
37063739

37073740
This ioctl is used to get guest storage key values on the s390
@@ -3720,7 +3753,7 @@ you want to get.
37203753

37213754
The count field is the number of consecutive frames (starting from start_gfn)
37223755
whose storage keys to get. The count field must be at least 1 and the maximum
3723-
allowed value is defined as KVM_S390_SKEYS_ALLOC_MAX. Values outside this range
3756+
allowed value is defined as KVM_S390_SKEYS_MAX. Values outside this range
37243757
will cause the ioctl to return -EINVAL.
37253758

37263759
The skeydata_addr field is the address to a buffer large enough to hold count
@@ -3744,7 +3777,7 @@ you want to set.
37443777

37453778
The count field is the number of consecutive frames (starting from start_gfn)
37463779
whose storage keys to get. The count field must be at least 1 and the maximum
3747-
allowed value is defined as KVM_S390_SKEYS_ALLOC_MAX. Values outside this range
3780+
allowed value is defined as KVM_S390_SKEYS_MAX. Values outside this range
37483781
will cause the ioctl to return -EINVAL.
37493782

37503783
The skeydata_addr field is the address to a buffer containing count bytes of
@@ -5134,6 +5167,15 @@ KVM_XEN_ATTR_TYPE_SHARED_INFO
51345167
not aware of the Xen CPU id which is used as the index into the
51355168
vcpu_info[] array, so cannot know the correct default location.
51365169

5170+
Note that the shared info page may be constantly written to by KVM;
5171+
it contains the event channel bitmap used to deliver interrupts to
5172+
a Xen guest, amongst other things. It is exempt from dirty tracking
5173+
mechanisms — KVM will not explicitly mark the page as dirty each
5174+
time an event channel interrupt is delivered to the guest! Thus,
5175+
userspace should always assume that the designated GFN is dirty if
5176+
any vCPU has been running or any event channel interrupts can be
5177+
routed to the guest.
5178+
51375179
KVM_XEN_ATTR_TYPE_UPCALL_VECTOR
51385180
Sets the exception vector used to deliver Xen event channel upcalls.
51395181

@@ -5503,6 +5545,34 @@ the trailing ``'\0'``, is indicated by ``name_size`` in the header.
55035545
The Stats Data block contains an array of 64-bit values in the same order
55045546
as the descriptors in Descriptors block.
55055547

5548+
4.42 KVM_GET_XSAVE2
5549+
------------------
5550+
5551+
:Capability: KVM_CAP_XSAVE2
5552+
:Architectures: x86
5553+
:Type: vcpu ioctl
5554+
:Parameters: struct kvm_xsave (out)
5555+
:Returns: 0 on success, -1 on error
5556+
5557+
5558+
::
5559+
5560+
struct kvm_xsave {
5561+
__u32 region[1024];
5562+
__u32 extra[0];
5563+
};
5564+
5565+
This ioctl would copy current vcpu's xsave struct to the userspace. It
5566+
copies as many bytes as are returned by KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2)
5567+
when invoked on the vm file descriptor. The size value returned by
5568+
KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) will always be at least 4096.
5569+
Currently, it is only greater than 4096 if a dynamic feature has been
5570+
enabled with ``arch_prctl()``, but this may change in the future.
5571+
5572+
The offsets of the state save areas in struct kvm_xsave follow the contents
5573+
of CPUID leaf 0xD on the host.
5574+
5575+
55065576
5. The kvm_run structure
55075577
========================
55085578

@@ -7401,6 +7471,7 @@ PVHVM guests. Valid flags are::
74017471
#define KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL (1 << 1)
74027472
#define KVM_XEN_HVM_CONFIG_SHARED_INFO (1 << 2)
74037473
#define KVM_XEN_HVM_CONFIG_RUNSTATE (1 << 2)
7474+
#define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 3)
74047475

74057476
The KVM_XEN_HVM_CONFIG_HYPERCALL_MSR flag indicates that the KVM_XEN_HVM_CONFIG
74067477
ioctl is available, for the guest to set its hypercall page.
@@ -7420,6 +7491,10 @@ The KVM_XEN_HVM_CONFIG_RUNSTATE flag indicates that the runstate-related
74207491
features KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR/_CURRENT/_DATA/_ADJUST are
74217492
supported by the KVM_XEN_VCPU_SET_ATTR/KVM_XEN_VCPU_GET_ATTR ioctls.
74227493

7494+
The KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL flag indicates that IRQ routing entries
7495+
of the type KVM_IRQ_ROUTING_XEN_EVTCHN are supported, with the priority
7496+
field set to indicate 2 level event channel delivery.
7497+
74237498
8.31 KVM_CAP_PPC_MULTITCE
74247499
-------------------------
74257500

Documentation/virt/kvm/mmu.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Shadow pages contain the following information:
161161
If clear, this page corresponds to a guest page table denoted by the gfn
162162
field.
163163
role.quadrant:
164-
When role.gpte_is_8_bytes=0, the guest uses 32-bit gptes while the host uses 64-bit
164+
When role.has_4_byte_gpte=1, the guest uses 32-bit gptes while the host uses 64-bit
165165
sptes. That means a guest page table contains more ptes than the host,
166166
so multiple shadow pages are needed to shadow one guest page.
167167
For first-level shadow pages, role.quadrant can be 0 or 1 and denotes the
@@ -177,9 +177,9 @@ Shadow pages contain the following information:
177177
The page is invalid and should not be used. It is a root page that is
178178
currently pinned (by a cpu hardware register pointing to it); once it is
179179
unpinned it will be destroyed.
180-
role.gpte_is_8_bytes:
181-
Reflects the size of the guest PTE for which the page is valid, i.e. '1'
182-
if 64-bit gptes are in use, '0' if 32-bit gptes are in use.
180+
role.has_4_byte_gpte:
181+
Reflects the size of the guest PTE for which the page is valid, i.e. '0'
182+
if direct map or 64-bit gptes are in use, '1' if 32-bit gptes are in use.
183183
role.efer_nx:
184184
Contains the value of efer.nx for which the page is valid.
185185
role.cr0_wp:

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10539,8 +10539,8 @@ F: arch/powerpc/kernel/kvm*
1053910539
F: arch/powerpc/kvm/
1054010540

1054110541
KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv)
10542-
M: Anup Patel <anup.patel@wdc.com>
10543-
R: Atish Patra <atish.patra@wdc.com>
10542+
M: Anup Patel <anup@brainfault.org>
10543+
R: Atish Patra <atishp@atishpatra.org>
1054410544
L: kvm@vger.kernel.org
1054510545
L: kvm-riscv@lists.infradead.org
1054610546
L: linux-riscv@lists.infradead.org

arch/arm64/include/asm/kvm_asm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ enum __kvm_host_smccc_func {
6363

6464
/* Hypercalls available after pKVM finalisation */
6565
__KVM_HOST_SMCCC_FUNC___pkvm_host_share_hyp,
66+
__KVM_HOST_SMCCC_FUNC___pkvm_host_unshare_hyp,
6667
__KVM_HOST_SMCCC_FUNC___kvm_adjust_pc,
6768
__KVM_HOST_SMCCC_FUNC___kvm_vcpu_run,
6869
__KVM_HOST_SMCCC_FUNC___kvm_flush_vm_context,

arch/arm64/include/asm/kvm_emulate.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ void kvm_inject_vabt(struct kvm_vcpu *vcpu);
4141
void kvm_inject_dabt(struct kvm_vcpu *vcpu, unsigned long addr);
4242
void kvm_inject_pabt(struct kvm_vcpu *vcpu, unsigned long addr);
4343

44+
void kvm_vcpu_wfi(struct kvm_vcpu *vcpu);
45+
4446
static __always_inline bool vcpu_el1_is_32bit(struct kvm_vcpu *vcpu)
4547
{
4648
return !(vcpu->arch.hcr_el2 & HCR_RW);
@@ -386,7 +388,7 @@ static inline void kvm_vcpu_set_be(struct kvm_vcpu *vcpu)
386388
*vcpu_cpsr(vcpu) |= PSR_AA32_E_BIT;
387389
} else {
388390
u64 sctlr = vcpu_read_sys_reg(vcpu, SCTLR_EL1);
389-
sctlr |= (1 << 25);
391+
sctlr |= SCTLR_ELx_EE;
390392
vcpu_write_sys_reg(vcpu, sctlr, SCTLR_EL1);
391393
}
392394
}

arch/arm64/include/asm/kvm_host.h

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <asm/fpsimd.h>
2727
#include <asm/kvm.h>
2828
#include <asm/kvm_asm.h>
29-
#include <asm/thread_info.h>
3029

3130
#define __KVM_HAVE_ARCH_INTC_INITIALIZED
3231

@@ -298,9 +297,6 @@ struct kvm_vcpu_arch {
298297
/* Exception Information */
299298
struct kvm_vcpu_fault_info fault;
300299

301-
/* State of various workarounds, see kvm_asm.h for bit assignment */
302-
u64 workaround_flags;
303-
304300
/* Miscellaneous vcpu state flags */
305301
u64 flags;
306302

@@ -321,8 +317,8 @@ struct kvm_vcpu_arch {
321317
struct kvm_guest_debug_arch vcpu_debug_state;
322318
struct kvm_guest_debug_arch external_debug_state;
323319

324-
struct thread_info *host_thread_info; /* hyp VA */
325320
struct user_fpsimd_state *host_fpsimd_state; /* hyp VA */
321+
struct task_struct *parent_task;
326322

327323
struct {
328324
/* {Break,watch}point registers */
@@ -367,9 +363,6 @@ struct kvm_vcpu_arch {
367363
int target;
368364
DECLARE_BITMAP(features, KVM_VCPU_MAX_FEATURES);
369365

370-
/* Detect first run of a vcpu */
371-
bool has_run_once;
372-
373366
/* Virtual SError ESR to restore when HCR_EL2.VSE is set */
374367
u64 vsesr_el2;
375368

@@ -411,20 +404,17 @@ struct kvm_vcpu_arch {
411404
#define KVM_ARM64_DEBUG_DIRTY (1 << 0)
412405
#define KVM_ARM64_FP_ENABLED (1 << 1) /* guest FP regs loaded */
413406
#define KVM_ARM64_FP_HOST (1 << 2) /* host FP regs loaded */
414-
#define KVM_ARM64_HOST_SVE_IN_USE (1 << 3) /* backup for host TIF_SVE */
415407
#define KVM_ARM64_HOST_SVE_ENABLED (1 << 4) /* SVE enabled for EL0 */
416408
#define KVM_ARM64_GUEST_HAS_SVE (1 << 5) /* SVE exposed to guest */
417409
#define KVM_ARM64_VCPU_SVE_FINALIZED (1 << 6) /* SVE config completed */
418410
#define KVM_ARM64_GUEST_HAS_PTRAUTH (1 << 7) /* PTRAUTH exposed to guest */
419411
#define KVM_ARM64_PENDING_EXCEPTION (1 << 8) /* Exception pending */
412+
/*
413+
* Overlaps with KVM_ARM64_EXCEPT_MASK on purpose so that it can't be
414+
* set together with an exception...
415+
*/
416+
#define KVM_ARM64_INCREMENT_PC (1 << 9) /* Increment PC */
420417
#define KVM_ARM64_EXCEPT_MASK (7 << 9) /* Target EL/MODE */
421-
#define KVM_ARM64_DEBUG_STATE_SAVE_SPE (1 << 12) /* Save SPE context if active */
422-
#define KVM_ARM64_DEBUG_STATE_SAVE_TRBE (1 << 13) /* Save TRBE context if active */
423-
424-
#define KVM_GUESTDBG_VALID_MASK (KVM_GUESTDBG_ENABLE | \
425-
KVM_GUESTDBG_USE_SW_BP | \
426-
KVM_GUESTDBG_USE_HW | \
427-
KVM_GUESTDBG_SINGLESTEP)
428418
/*
429419
* When KVM_ARM64_PENDING_EXCEPTION is set, KVM_ARM64_EXCEPT_MASK can
430420
* take the following values:
@@ -442,11 +432,14 @@ struct kvm_vcpu_arch {
442432
#define KVM_ARM64_EXCEPT_AA64_EL1 (0 << 11)
443433
#define KVM_ARM64_EXCEPT_AA64_EL2 (1 << 11)
444434

445-
/*
446-
* Overlaps with KVM_ARM64_EXCEPT_MASK on purpose so that it can't be
447-
* set together with an exception...
448-
*/
449-
#define KVM_ARM64_INCREMENT_PC (1 << 9) /* Increment PC */
435+
#define KVM_ARM64_DEBUG_STATE_SAVE_SPE (1 << 12) /* Save SPE context if active */
436+
#define KVM_ARM64_DEBUG_STATE_SAVE_TRBE (1 << 13) /* Save TRBE context if active */
437+
#define KVM_ARM64_FP_FOREIGN_FPSTATE (1 << 14)
438+
439+
#define KVM_GUESTDBG_VALID_MASK (KVM_GUESTDBG_ENABLE | \
440+
KVM_GUESTDBG_USE_SW_BP | \
441+
KVM_GUESTDBG_USE_HW | \
442+
KVM_GUESTDBG_SINGLESTEP)
450443

451444
#define vcpu_has_sve(vcpu) (system_supports_sve() && \
452445
((vcpu)->arch.flags & KVM_ARM64_GUEST_HAS_SVE))
@@ -606,6 +599,8 @@ int __kvm_arm_vcpu_set_events(struct kvm_vcpu *vcpu,
606599
void kvm_arm_halt_guest(struct kvm *kvm);
607600
void kvm_arm_resume_guest(struct kvm *kvm);
608601

602+
#define vcpu_has_run_once(vcpu) !!rcu_access_pointer((vcpu)->pid)
603+
609604
#ifndef __KVM_NVHE_HYPERVISOR__
610605
#define kvm_call_hyp_nvhe(f, ...) \
611606
({ \
@@ -724,7 +719,6 @@ void kvm_arm_vcpu_ptrauth_trap(struct kvm_vcpu *vcpu);
724719
static inline void kvm_arch_hardware_unsetup(void) {}
725720
static inline void kvm_arch_sync_events(struct kvm *kvm) {}
726721
static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {}
727-
static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {}
728722

729723
void kvm_arm_init_debug(void);
730724
void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu);
@@ -744,8 +738,10 @@ long kvm_vm_ioctl_mte_copy_tags(struct kvm *kvm,
744738
/* Guest/host FPSIMD coordination helpers */
745739
int kvm_arch_vcpu_run_map_fp(struct kvm_vcpu *vcpu);
746740
void kvm_arch_vcpu_load_fp(struct kvm_vcpu *vcpu);
741+
void kvm_arch_vcpu_ctxflush_fp(struct kvm_vcpu *vcpu);
747742
void kvm_arch_vcpu_ctxsync_fp(struct kvm_vcpu *vcpu);
748743
void kvm_arch_vcpu_put_fp(struct kvm_vcpu *vcpu);
744+
void kvm_vcpu_unshare_task_fp(struct kvm_vcpu *vcpu);
749745

750746
static inline bool kvm_pmu_counter_deferred(struct perf_event_attr *attr)
751747
{
@@ -756,12 +752,7 @@ static inline bool kvm_pmu_counter_deferred(struct perf_event_attr *attr)
756752
void kvm_arch_vcpu_load_debug_state_flags(struct kvm_vcpu *vcpu);
757753
void kvm_arch_vcpu_put_debug_state_flags(struct kvm_vcpu *vcpu);
758754

759-
#ifdef CONFIG_KVM /* Avoid conflicts with core headers if CONFIG_KVM=n */
760-
static inline int kvm_arch_vcpu_run_pid_change(struct kvm_vcpu *vcpu)
761-
{
762-
return kvm_arch_vcpu_run_map_fp(vcpu);
763-
}
764-
755+
#ifdef CONFIG_KVM
765756
void kvm_set_pmu_events(u32 set, struct perf_event_attr *attr);
766757
void kvm_clr_pmu_events(u32 clr);
767758

arch/arm64/include/asm/kvm_hyp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ void __debug_restore_host_buffers_nvhe(struct kvm_vcpu *vcpu);
9090

9191
void __fpsimd_save_state(struct user_fpsimd_state *fp_regs);
9292
void __fpsimd_restore_state(struct user_fpsimd_state *fp_regs);
93-
void __sve_save_state(void *sve_pffr, u32 *fpsr);
9493
void __sve_restore_state(void *sve_pffr, u32 *fpsr);
9594

9695
#ifndef __KVM_NVHE_HYPERVISOR__

0 commit comments

Comments
 (0)