lkml.org 
[lkml]   [2020]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 51/62] x86/sev-es: Handle #AC Events
Date
From: Joerg Roedel <jroedel@suse.de>

Implement a handler for #VC exceptions caused by #AC exceptions. The #AC
exception is just forwarded to do_alignment_check() and not pushed down
to the hypervisor, as requested by the SEV-ES GHCB Standardization
Specification.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
arch/x86/kernel/sev-es.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/x86/kernel/sev-es.c b/arch/x86/kernel/sev-es.c
index 6bd2cae7eb9c..1b873d00e38f 100644
--- a/arch/x86/kernel/sev-es.c
+++ b/arch/x86/kernel/sev-es.c
@@ -375,6 +375,10 @@ static enum es_result handle_vc_exception(struct es_em_ctxt *ctxt,
case SVM_EXIT_WRITE_DR7:
result = handle_dr7_write(ghcb, ctxt, early);
break;
+ case SVM_EXIT_EXCP_BASE + X86_TRAP_AC:
+ do_alignment_check(ctxt->regs, 0);
+ result = ES_RETRY;
+ break;
case SVM_EXIT_RDTSC:
case SVM_EXIT_RDTSCP:
result = handle_rdtsc(ghcb, ctxt, exit_code);
--
2.17.1
\
 
 \ /
  Last update: 2020-02-11 14:55    [W:0.576 / U:23.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site