lkml.org 
[lkml]   [2021]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC v2 14/32] x86/tdx: Handle port I/O
From
Date
On 5/10/21 2:57 PM, Dan Williams wrote:
>> Decompression code uses port IO for earlyprintk. We must use
>> paravirt calls there too if we want to allow earlyprintk.
> What is the tradeoff between teaching the decompression code to handle
> #VE (the implied assumption) vs teaching it to avoid #VE with direct
> TDVMCALLs (the chosen direction)?

To me, the tradeoff is not just "teaching" the code to handle a #VE, but
ensuring that the entire architecture works.

Intentionally invoking a #VE is like making a function call that *MIGHT*
recurse on itself. Sure, you can try to come up with a story about
bounding the recursion. But, I don't see any semblance of that in this
series.

Exception-based recursion is really nasty because it's implicit, not
explicit. That's why I'm advocating for a design where the kernel never
intentionally causes a #VE: it never intentionally recurses without bounds.

\
 
 \ /
  Last update: 2021-05-11 17:37    [W:0.680 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site