[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d43c14d9-a149-860c-71d6-e5c62b7c356f@amd.com>
Date: Tue, 30 May 2023 14:16:55 +0200
From: "Gupta, Pankaj" <pankaj.gupta@....com>
To: Peter Zijlstra <peterz@...radead.org>,
Tianyu Lan <ltykernel@...il.com>
Cc: luto@...nel.org, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
hpa@...or.com, seanjc@...gle.com, pbonzini@...hat.com,
jgross@...e.com, tiala@...rosoft.com, kirill@...temov.name,
jiangshan.ljs@...group.com, ashish.kalra@....com,
srutherford@...gle.com, akpm@...ux-foundation.org,
anshuman.khandual@....com, pawan.kumar.gupta@...ux.intel.com,
adrian.hunter@...el.com, daniel.sneddon@...ux.intel.com,
alexander.shishkin@...ux.intel.com, sandipan.das@....com,
ray.huang@....com, brijesh.singh@....com, michael.roth@....com,
thomas.lendacky@....com, venu.busireddy@...cle.com,
sterritt@...gle.com, tony.luck@...el.com, samitolvanen@...gle.com,
fenghua.yu@...el.com, pangupta@....com,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
linux-hyperv@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [RFC PATCH V6 01/14] x86/sev: Add a #HV exception handler
>> Add a #HV exception handler that uses IST stack.
>>
>
> Urgh.. that is entirely insufficient. Like it doesn't even begin to
> start to cover things.
>
> The whole existing VC IST stack abuse is already a nightmare and you're
> duplicating that.. without any explanation for why this would be needed
> and how it is correct.
>
> Please try again.
#HV handler handles both #NMI & #MCE in the guest and nested #HV is
never raised by the hypervisor. Next #HV exception is only raised by the
hypervisor when Guest acknowledges the pending #HV exception by clearing
"NoFurtherSignal” bit in the doorbell page.
There is still protection (please see hv_switch_off_ist()) to gracefully
exit the guest if by any chance a malicious hypervisor sends nested #HV.
This saves with most of the nested IST stack pitfalls with #NMI & #MCE,
also #DB is handled in noinstr code
block(exc_vmm_communication()->vc_is_db {...}) hence avoid any recursive
#DBs.
Do you see anything else needs to be handled in #HV IST handling?
Thanks,
Pankaj
Powered by blists - more mailing lists