Skip to content

kvm/svm: implement new DecodeAssist features

Andre Przywara kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5kvm/svm: add new SVM feature bit namesarch/x86/kvm/svm.c+4 -00 replies
2/5kvm/svm: enhance MOV CR intercept handlerarch/x86/include/asm/svm.h arch/x86/kvm/svm.c+82 -113 replies
3/5kvm/svm: enhance mov DR intercept handlerarch/x86/kvm/svm.c+45 -163 replies
4/5kvm/svm: implement enhanced INVLPG interceptarch/x86/kvm/svm.c+6 -10 replies
5/5kvm/svm: copy instruction bytes from VMCBarch/x86/include/asm/kvm_host.h arch/x86/include/asm/svm.h arch/x86/kvm/emulate.c +2 more+34 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH -v2 0/5] kvm/svm: implement new DecodeAssist features

Hi,

version 2 of the DecodeAssist patches.
Changes over version 1:
- goes on top of the CR8 handling fix I sent out earlier this week (required for proper handling of CR8 exceptions)
- handles exception cases properly (for mov cr and mov dr)
- uses X86_FEATURE_ names instead of SVM_FEATURE names (for boot_cpu_has) (thanks to Joerg for spotting this)
- use static_cpu_has where appropriate
- some minor code cleanups (for instance cr register calculation)
- move prefetch callback into x86_decode_insn and out of every fetch I refrained from ditching the callback at all, as I dont like extending every emulate_instruction call with "NULL, 0". But if this is desperately needed, I can still change it.
- rename vendor specific prefetch function names

Upcoming AMD CPUs will have a SVM enhancement called DecodeAssist which will provide more information when intercepting certain events. These information allows to skip the instruction fetching and decoding and handle the intercept immediately.
This patch set implements all the features which are documented in the recent AMD manual (APM vol. 2). For details see the patches.

Please review and apply.

Regards,
Andre.