[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Minios-devel] [UNIKRAFT PATCH 4/8] plat/xen: Align x86 interrupt stack address at compile time
- To: minios-devel@xxxxxxxxxxxxx
- From: Costin Lupu <costin.lupu@xxxxxxxxx>
- Date: Tue, 23 Apr 2019 13:41:40 +0300
- Cc: felipe.huici@xxxxxxxxx, Florian.Schmidt@xxxxxxxxx, simon.kuenzer@xxxxxxxxx, yuri.volchkov@xxxxxxxxx, sharan.santhanam@xxxxxxxxx
- Delivery-date: Tue, 23 Apr 2019 10:42:03 +0000
- Ironport-phdr: 9a23:hkbj/hE4DRZX4npWUV9TZJ1GYnF86YWxBRYc798ds5kLTJ76psy9bnLW6fgltlLVR4KTs6sC17OP9fywEjZZqdbZ6TZeKcQKD0dEwewt3CUYSPafDkP6KPO4JwcbJ+9lEGFfwnegLEJOE9z/bVCB6le77DoVBwmtfVEtfre9FYHdldm42P6v8JPPfQpImCC9YbRvJxmqsAndrMYbjZZ/JqorxRbEoXREd/pLyWh1IV6fgwvw6t2/8ZJ+7yhcoe4t+9JFXa7nY6k2ULtUASg8PWso/sPrrx7DTQWO5nsYTGoblwdDDhbG4h/nQJr/qzP2ueVh1iaUO832Vq00Vi+576h3Uh/oiTwIOCA//WrKl8F/lqNboBampxxi347ZZZyeOfRicq/Be94RWGxMVdtTWSNcGIOxd4sBAfQcM+hWrIfzoFkBrRWlCAWwGO/i0CNEi2Xq0aEm1ekqDAHI3BYnH9ILqHnZstL1NLwOUeC0yqnD0DPNb+5O2Tfg9YPFdQwuofaXXbJscMrRz1MjFwfYjlWItIzoJC+a1v8Xv2iD8upvTviji3QgqwxopDWk28QiipHRi44IxV3I6D91zYU1KNGiVkJ3f9ypHIFeui2CKod7Td4uT3trtSs60LEKp5C2cSYQxJg6yBPTdfqKeJWS7B35TuaeOzJ4iWpgeLK4mhm971Ctyvb5VsmoyFZKqTdFksXUunANyRPT7s+HR+Nj/kekwzmP1gTT5vtYLkAvj6bbM4MhzaUqmpoJtkTPBi72mEPog6+Kbkgo5+el5/n9brjlppKQLZF4hh/8P6g0lMGzGeE4PRIPX2if9+S8zrrj/UjhTbpWif02ibXZsJHcJcgBoq65HhdV0ps45hmjFDeqyswYnWQcI15fYhKHiJDlO0vSL/DgEfe/n1OsnS9ux/DHOL3hA5LNLmPanLj8Y7l99VBTyA4owNBb5pJUEa0BIOnpVk7+qtPYCAU1Mwuuw+boEN99zJ8RWXqTAq+FN6PfqV+G5uYoI+mWZY8aojD9J+I46fHyjX85nF4dcrS13ZYMbnC3AOhpI0GDbnX3mNsOD3oKtBIkTOP2kF2CTSJTZ3GqUqIy+D47DIOmDZ/dSYy3gLyBwSa7EYFXZm1dDFCDD2vnd4GeVPgXci6dPNJhmCQeVbe9U48hyQ2utAjixrp8Lurb4DcYuojl1NRv/O3cjxcy9SB0D8uH1WGCVWR0k3gORzAowK9/pVZyxUyZ3admnvxSDcZT6O9RUgcmKZ7cyPR3C8vzWgLEedeJTkyqQta7AT4vSNIwwsEBY1xmFtWkkB/Mwy6qDKUOmLCRGpM077rW32LtKMZl13bGyK4hgkEmQ8tSL22mh7Rz9xbUB47Nj0qZl6WqdaMC3CPW8meM03aBvEVCXwFrS6nKQ20fNQPqqoH850XDSKTrBbk5Pw9pzc+ZNrAMetDvy1JcS6TNItPbNkm2gHuxA16s26uRJN7hfH4B3SObDFUcjigY5jCeKAJ4HCD38DGWNyBnCV+6OxCkyuJ5sn7uFkI=
- Ironport-sdr: VoOFzBjqx4FGmQOooG+2ouxhhf+0THrsx8Pj5ygj9SB1zJpj6QELlu+XW+Djj/QQA9aU2JX6j/ Y+QmWkxaYuoA==
- List-id: Mini-os development list <minios-devel.lists.xenproject.org>
This patch aligns the stack base address at compile time and makes the
irqstack variable public.
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
}
--
2.11.0
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|