From: Manali Shukla <manali.shukla@amd.com>
To: <pbonzini@redhat.com>
Cc: <kvm@vger.kernel.org>, <seanjc@google.com>, <aaronlewis@google.com>
Subject: [kvm-unit-tests PATCH 2/3] x86: Make exception_mnemonic() visible to the tests
Date: Mon, 7 Feb 2022 05:12:01 +0000 [thread overview]
Message-ID: <20220207051202.577951-3-manali.shukla@amd.com> (raw)
In-Reply-To: <20220207051202.577951-1-manali.shukla@amd.com>
From: Aaron Lewis <aaronlewis@google.com>
exception_mnemonic() is a useful function for more than just desc.c.
Make it global, so it can be used in other KUT tests.
Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Signed-off-by: Manali Shukla <manali.shukla@amd.com>
---
lib/x86/desc.c | 2 +-
lib/x86/desc.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/x86/desc.c b/lib/x86/desc.c
index 16b7256..c2eb16e 100644
--- a/lib/x86/desc.c
+++ b/lib/x86/desc.c
@@ -91,7 +91,7 @@ struct ex_record {
extern struct ex_record exception_table_start, exception_table_end;
-static const char* exception_mnemonic(int vector)
+const char* exception_mnemonic(int vector)
{
switch(vector) {
case 0: return "#DE";
diff --git a/lib/x86/desc.h b/lib/x86/desc.h
index 9b81da0..ad6277b 100644
--- a/lib/x86/desc.h
+++ b/lib/x86/desc.h
@@ -224,6 +224,7 @@ void set_intr_alt_stack(int e, void *fn);
void print_current_tss_info(void);
handler handle_exception(u8 v, handler fn);
void unhandled_exception(struct ex_regs *regs, bool cpu);
+const char* exception_mnemonic(int vector);
bool test_for_exception(unsigned int ex, void (*trigger_func)(void *data),
void *data);
--
2.30.2
next prev parent reply other threads:[~2022-02-07 5:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 5:11 [kvm-unit-tests PATCH 0/3] nSVM: Add testing for routing L2 exceptions Manali Shukla
2022-02-07 5:12 ` [kvm-unit-tests PATCH 1/3] x86: Add routines to set/clear PT_USER_MASK for all pages Manali Shukla
2022-02-14 19:30 ` Sean Christopherson
2022-02-17 3:55 ` Shukla, Manali
2022-02-17 14:34 ` Aaron Lewis
2022-02-20 4:42 ` Shukla, Manali
2022-02-17 15:20 ` Sean Christopherson
2022-02-20 5:35 ` Shukla, Manali
2022-02-07 5:12 ` Manali Shukla [this message]
2022-02-07 5:12 ` [kvm-unit-tests PATCH 3/3] x86: nSVM: Add an exception test framework and tests Manali Shukla
2022-02-14 20:20 ` Aaron Lewis
2022-02-17 3:26 ` Shukla, Manali
2022-02-17 14:46 ` Aaron Lewis
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=20220207051202.577951-3-manali.shukla@amd.com \
--to=manali.shukla@amd.com \
--cc=aaronlewis@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.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