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 12:49:16 +0300 [thread overview]
Message-ID: <4C10B51C.9070502@redhat.com> (raw)
In-Reply-To: <1276140703-30046-1-git-send-email-sheng@linux.intel.com>
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.
I suggest using a special data section like the kernel.
Also, most tests that use asm don't need an exception region, but will
want to trap an exception on a single address. So need a macro designed
to be placed in asm in front of the faulting instruction.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-06-10 9:49 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 ` Avi Kivity [this message]
2010-06-10 9:55 ` [PATCH 1/2] test: Add IDT framework Sheng Yang
2010-06-10 10:55 ` Avi Kivity
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=4C10B51C.9070502@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox