From: Avi Kivity <avi@redhat.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH v2] test: Add IDT framework
Date: Fri, 11 Jun 2010 11:03:47 +0300 [thread overview]
Message-ID: <4C11EDE3.8040102@redhat.com> (raw)
In-Reply-To: <201006111552.04765.sheng@linux.intel.com>
On 06/11/2010 10:52 AM, Sheng Yang wrote:
>
>
>> +void do_handle_exception(struct ex_regs *regs)
>> +{
>> + struct ex_record *ex;
>> + unsigned ex_val;
>> +
>> + printf("exception: vector %ld error %lx rip %lx\n", regs->vector,
>> + regs->error_code, regs->rip);
>> +
>> + ex_val = regs->vector | (regs->error_code<< 16);
>> +
>> + asm("mov %0, %%gs:4" : : "r"(ex_val));
>> +
>> + for (ex =&exception_table_start; ex !=&exception_table_end; ++ex) {
>> + printf("ex_table: %lx %lx\n", ex->rip, ex->handler);
>>
> How about use something like #ifdef VERBOSE? (Well, in fact I didn't use unit test
> much, if you don't mind the format of output, it's also fine.)
>
That was just debugging code I forgot to remove. It shouldn't be there
except for the unhandled exception case.
>
>> +int test(void)
>> +{
>> + int r;
>> +
>> + setup_idt();
>> + printf("GP testing: ");
>> + r = test_gp();
>> + report(r == GP_VECTOR, "#GP");
>> + r = test_ud2();
>> + report(r == UD_VECTOR, "#UD");
>>
> Miss a "UD testing"?
>
Yeah :(
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
prev parent reply other threads:[~2010-06-11 8:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 13:30 [PATCH v2] test: Add IDT framework Avi Kivity
2010-06-11 7:52 ` Sheng Yang
2010-06-11 8:03 ` Avi Kivity [this message]
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=4C11EDE3.8040102@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