KVM: x86: Move FPU register accessors into fpu.h
authorSiddharth Chandrasekaran <sidcha@amazon.de>
Wed, 26 May 2021 08:56:08 +0000 (10:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 17:09:24 +0000 (13:09 -0400)
commit43e5146436099a98fcd30793598d61e582ec6830
tree53cdc68e0255c1416ee3aa17ce3ff0c245c45b18
parenta9d6496d667fdb86713868a402378a0e4db62b50
KVM: x86: Move FPU register accessors into fpu.h

Hyper-v XMM fast hypercalls use XMM registers to pass input/output
parameters. To access these, hyperv.c can reuse some FPU register
accessors defined in emulator.c. Move them to a common location so both
can access them.

While at it, reorder the parameters of these accessor methods to make
them more readable.

Cc: Alexander Graf <graf@amazon.com>
Cc: Evgeny Iakovlev <eyakovl@amazon.de>
Signed-off-by: Siddharth Chandrasekaran <sidcha@amazon.de>
Message-Id: <01a85a6560714d4d3637d3d86e5eba65073318fa.1622019133.git.sidcha@amazon.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c
arch/x86/kvm/fpu.h [new file with mode: 0644]
arch/x86/kvm/kvm_emulate.h