[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/6] mini-os/x86-64 entry: code refactoring; no functional changes

On 03/09/2013 03:03 PM, Samuel Thibault wrote:
+/* Macros */
+.macro zeroentry sym
+       movq (%rsp),%rcx
+       movq 8(%rsp),%r11
+       addq $0x10,%rsp /* skip rcx and r11 */
+       pushq $0        /* push error code/oldrax */
+       pushq %rax      /* push real oldrax to the rdi slot */
+       leaq  \sym(%rip),%rax
+       jmp error_entry
+.macro errorentry sym
+       movq (%rsp),%rcx
+       movq 8(%rsp),%r11
+       addq $0x10,%rsp /* rsp points to the error code */
+       pushq %rax
+       leaq  \sym(%rip),%rax
+       jmp error_entry
I disagree on moving those, as they do have some context.

Well, if they have some context, they probably end off better before they first get called, say before hypervisor_callback. Note they are also used in exception handlers. Besides, it's kind of annoying to have these macros sit in between assembly routines. Probably it's just me. If you prefer leave them untouched, I am perfectly fine with that.

Please also drop these labels, they're not used.

I would argue it gonna be a different story if mini-os has an user space: "retint_kernel" returns to kernel, and presumably "retint_user" would do schedule, x87 lazy switch, handle softirqs and etc. But since it does not, I guess they can be dropped.

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.