Messages in this thread | | | Subject | Re: [PATCH] x86/paravirt: Fix build PARAVIRT_XXL=y without XEN_PV | From | Sathyanarayanan Kuppuswamy <> | Date | Wed, 17 Nov 2021 17:26:15 -0800 |
| |
On 11/17/21 3:33 PM, Dave Hansen wrote: > On 11/17/21 3:04 PM, Sathyanarayanan Kuppuswamy wrote: >> 1. Directly substitute TDVMCALLs in places where we require emulation. > ... >> Since option#1 is not a scalable approach, > > Why is this not "scalable"? Just eyeballing the problem, here's my > laptop's kernel:
I meant it not scalable because, for any new use case of HLT instruction, it would need substitution again. We cannot always keep tracking its uses in the future, right?
Also, If we make any changes to the core emulation code (like arguments change), we will have to re-touch these use cases to handle it.
If this approach is taken to add some performance benefit, then it makes sense. But for our case, I think it is simpler to use PV ops.
> > $ objdump -d vmlinux | grep 'hlt ' | awk -F: '{print $1}' | while read > addr; do addr2line -e vmlinux $addr; done > arch/x86/include/asm/irqflags.h:51 > arch/x86/include/asm/irqflags.h:51 > arch/x86/include/asm/irqflags.h:57 > arch/x86/include/asm/irqflags.h:57 > arch/x86/include/asm/irqflags.h:57 > arch/x86/include/asm/irqflags.h:57 > arch/x86/include/asm/irqflags.h:51 > arch/x86/include/asm/irqflags.h:51 > arch/x86/include/asm/irqflags.h:51 > arch/x86/kernel/fpu/init.c:84 > arch/x86/include/asm/irqflags.h:57 > > There are a grand total of 3 sites from which a hlt originates. With > only 11 possible instances and 3 sites to patch, I'm not sure anything > here needs to be "scalable". > > I'd suspect half these sites aren't even reachable on a TDX system. >
-- Sathyanarayanan Kuppuswamy Linux Kernel Developer
| |