[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v2 1/5] plat/xen: Align x86 interrupt stack address at compile time
Hi Costin, thanks for the added explanation. Reviewed-by: Florian Schmidt <florian.schmidt@xxxxxxxxx> On 5/29/19 6:56 AM, Costin Lupu wrote: This patch aligns the stack base address at compile time and makes the irqstack variable public. Before this patch, the IRQ stack size was 2 * STACK_SIZE bytes because the aligned address was computed at runtime and the bottom half of the stack was wasted. This patch fixes that and aligns the stack address at build time, therefore avoiding a waste of STACK_SIZE bytes. Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- plat/xen/x86/arch_events.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plat/xen/x86/arch_events.c b/plat/xen/x86/arch_events.c index 1e165c81..7d7289fc 100644 --- a/plat/xen/x86/arch_events.c +++ b/plat/xen/x86/arch_events.c @@ -30,9 +30,10 @@ #include <stdint.h> #include <x86/cpu.h> #include <uk/plat/config.h> +#include <uk/essentials.h>#if defined(__x86_64__)-static char irqstack[2 * STACK_SIZE]; +char irqstack[STACK_SIZE] __align(STACK_SIZE);static struct pda {int irqcount; /* offset 0 (used in x86_64.S) */ @@ -48,8 +49,7 @@ void arch_init_events(void) wrmsrl(0xc0000101, (uint64_t) &cpu0_pda); cpu0_pda.irqcount = -1; cpu0_pda.irqstackptr = - (void *) (((unsigned long)irqstack + 2 * STACK_SIZE) - & STACK_MASK_TOP); + (void *) ((unsigned long) irqstack + STACK_SIZE); #endif } -- Dr. Florian Schmidt フローリアン・シュミット Research Scientist, Systems and Machine Learning Group NEC Laboratories Europe Kurfürsten-Anlage 36, D-69115 Heidelberg Tel. +49 (0)6221 4342-265 Fax: +49 (0)6221 4342-155 e-mail: florian.schmidt@xxxxxxxxx ============================================================ Registered at Amtsgericht Mannheim, Germany, HRB728558 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |