[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/18] backdoor: Declare guest-side interface macros
From: |
Lluís |
Subject: |
[Qemu-devel] [PATCH 04/18] backdoor: Declare guest-side interface macros |
Date: |
Mon, 18 Oct 2010 19:40:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Header for the user to include when compiling guest applications that want to
communicate with QEMU through backdoor instructions.
Signed-off-by: Lluís Vilanova <address@hidden>
---
backdoor/guest.h | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
create mode 100644 backdoor/guest.h
diff --git a/backdoor/guest.h b/backdoor/guest.h
new file mode 100644
index 0000000..58847e2
--- /dev/null
+++ b/backdoor/guest.h
@@ -0,0 +1,36 @@
+/*
+ * Guest-side interface for instruction-based backdoor communication.
+ *
+ * Copyright (c) 2010 Lluís Vilanova <address@hidden>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef BACKDOOR_GUEST_H
+#define BACKDOOR_GUEST_H
+
+/* Backdoor macro names define the types of its arguments:
+ *
+ * - i8: immediate of 8 bits
+ * - V: value passed in register
+ */
+
+#error Undefined instruction-based backdoor interface for guest architecture
+
+#define __str(s) #s
+#define __xstr(s) __str(s)
+
+#define __BACKDOOR_i8(b) asm volatile (".byte " __xstr(b))
+
+#endif /* BACKDOOR_GUEST_H */
--
1.7.1
--
"And it's much the same thing with knowledge, for whenever you learn
something new, the whole world becomes that much richer."
-- The Princess of Pure Reason, as told by Norton Juster in The Phantom
Tollbooth
- [Qemu-devel] [PATCH 00/17] [RFC] static instrumentation, (continued)
- [Qemu-devel] [PATCH 00/17] [RFC] static instrumentation, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 01/18] backdoor: Handle config-time activation, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 02/18] backdoor: Declare host-side backdoor helpers, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 13/18] instrument: Add FETCH point, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 14/18] instrument: [i386] Call FETCH point, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 15/18] instrument: Add VMEM point, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 16/18] instrument: [all] Call VMEM point, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 17/18] instrument: Add PLVL point, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 18/18] instrument: [i386] Call PLVL point, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 03/18] backdoor: [all] Include backdoor helper declarations, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 04/18] backdoor: Declare guest-side interface macros,
Lluís <=
- [Qemu-devel] [PATCH 08/18] instrument: Handle config-time activation, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 12/18] instrument: [all] Include instrumentation helper declarations, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 07/18] backdoor: Add a simple example, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 11/18] instrument: Code-generation macros, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 05/18] backdoor: [i386] Decode backdoor instructions, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 06/18] backdoor: [i386] Declare guest-side interface macros, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 09/18] instrument: Add initial instrumentation example, Lluís, 2010/10/22
- [Qemu-devel] [PATCH 10/18] instrument: Dynamic per-CPU state of static instrumentation points, Lluís, 2010/10/22
- Re: [Qemu-devel] [PATCH 00/17] [RFC] static instrumentation, Blue Swirl, 2010/10/23