xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Xu Zhang <xzhang@cs.uic.edu>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Xu Zhang <xzhang@cs.uic.edu>,
	xen-devel@lists.xen.org, stefano.stabellini@eu.citrix.com,
	jeremy@goop.org, gm281@cam.ac.uk
Subject: Re: [PATCH 3/6] mini-os/x86-64 entry: code refactoring; no functional changes
Date: Wed, 10 Apr 2013 23:40:17 -0500	[thread overview]
Message-ID: <51663EB1.9060101@cs.uic.edu> (raw)
In-Reply-To: <20130309210335.GD6036@type.youpi.perso.aquilenet.fr>

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
>> +.endm
>> +
>> +.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
>> +.endm
> 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.

>
>>   retint_kernel:
>>   retint_restore_args:
> 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.

  reply	other threads:[~2013-04-11  4:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 21:30 [PATCH 0/6] mini-os: check and fix up against nested events in x86-64 kernel entry Xu Zhang
2013-03-08 21:30 ` [PATCH 1/6] mini-os/x86-64 entry: code clean-ups Xu Zhang
2013-03-09 20:57   ` Samuel Thibault
2013-03-08 21:30 ` [PATCH 2/6] mini-os/x86-64 entry: define macros for registers partial save and restore Xu Zhang
2013-03-09 20:55   ` Samuel Thibault
2013-03-08 21:30 ` [PATCH 3/6] mini-os/x86-64 entry: code refactoring; no functional changes Xu Zhang
2013-03-09 21:03   ` Samuel Thibault
2013-04-11  4:40     ` Xu Zhang [this message]
2013-03-08 21:30 ` [PATCH 4/6] mini-os/x86-64 entry: remove unnecessary event blocking Xu Zhang
2013-03-09 21:07   ` Samuel Thibault
2013-03-15 20:16   ` Konrad Rzeszutek Wilk
2013-04-11  4:40     ` Xu Zhang
2013-03-08 21:30 ` [PATCH 5/6] mini-os/x86-64 entry: defer RESTORE_REST until return Xu Zhang
2013-03-09 21:15   ` Samuel Thibault
2013-03-08 21:30 ` [PATCH 6/6] mini-os/x86-64 entry: check against nested events and try to fix up Xu Zhang
2013-03-09 21:19   ` Samuel Thibault
2013-03-13  2:42     ` Xu Zhang
2013-03-09 22:44   ` Jeremy Fitzhardinge
2013-03-13  2:42     ` Xu Zhang
2013-03-13  5:53       ` Xu Zhang
2013-03-14  1:09       ` Jeremy Fitzhardinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51663EB1.9060101@cs.uic.edu \
    --to=xzhang@cs.uic.edu \
    --cc=gm281@cam.ac.uk \
    --cc=jeremy@goop.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).