All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 1/2] test: Add IDT framework
Date: Thu, 10 Jun 2010 13:55:18 +0300	[thread overview]
Message-ID: <4C10C496.2000405@redhat.com> (raw)
In-Reply-To: <201006101755.04411.sheng@linux.intel.com>

On 06/10/2010 12:55 PM, Sheng Yang wrote:
> On Thursday 10 June 2010 17:49:16 Avi Kivity wrote:
>    
>> On 06/10/2010 06:31 AM, Sheng Yang wrote:
>>      
>>> +
>>> +#define EXCEPTION_REGION_BEGIN(r, lb) \
>>> +    asm volatile("pushq $"lb"\n\t" \
>>> +                 "mov $2, %0\n\t" \
>>> +                 : "=r"(r))
>>> +#define EXCEPTION_REGION_END(r, lb) \
>>> +    asm volatile("popq %%rdx\n\t" \
>>> +		 "mov $0, %0\n\t" \
>>> +                 lb":\n\t": \
>>> +                 "=r"(r) :: "%rdx")
>>>        
>> These mess up the stack, no?  So if any intervening code uses %rsp based
>> addressing, it will get incorrect information.
>>      
> Yes, but I meant to only include instruction directly in the “region”, and support
> nobody should touch $rsp then. It's directly and simple enough.
>    

Something like "=m"(blah) can cause access to %rsp, usually when 
compiling without frame pointers.

>> I suggest using a special data section like the kernel.
>>      
> Kind of more complex...
>    

Makes it more fun.  I'll have a go.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2010-06-10 10:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10  3:31 [PATCH 1/2] test: Add IDT framework Sheng Yang
2010-06-10  3:31 ` [PATCH 2/2] test: Add XSAVE unit test Sheng Yang
2010-06-10  9:49 ` [PATCH 1/2] test: Add IDT framework Avi Kivity
2010-06-10  9:55   ` Sheng Yang
2010-06-10 10:55     ` Avi Kivity [this message]
2010-06-10 13:32       ` Avi Kivity

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=4C10C496.2000405@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=sheng@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.