From: kraxel@suse.de
To: xen-devel@lists.xensource.com
Cc: jbeulich@novell.com
Subject: [patch rfc 3/3] xen arch header rework, check utility.
Date: Thu, 05 Oct 2006 11:05:46 +0200 [thread overview]
Message-ID: <20061005090633.965801000@suse.de> (raw)
In-Reply-To: 20061005090543.625074000@suse.de
[-- Attachment #1: arch-headers-check.diff --]
[-- Type: text/plain, Size: 2192 bytes --]
This adds a tiny utility to verify the patch is correct, by printing the
sizes of the structures. Compile once on 32bit and once on 64bit,
compare the results, it they don't match something is wrong ...
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
Cc: Jan Beulich <jbeulich@novell.com>
---
tools/xcutils/Makefile | 1 +
tools/xcutils/check-structs.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
Index: build-64-unstable-11624/tools/xcutils/Makefile
===================================================================
--- build-64-unstable-11624.orig/tools/xcutils/Makefile
+++ build-64-unstable-11624/tools/xcutils/Makefile
@@ -27,6 +27,7 @@ CFLAGS += -Wp,-MD,.$(@F).d
PROG_DEP = .*.d
PROGRAMS = xc_restore xc_save readnotes
+PROGRAMS += check-structs
LDLIBS = -L$(XEN_LIBXC) -lxenguest -lxenctrl
Index: build-64-unstable-11624/tools/xcutils/check-structs.c
===================================================================
--- /dev/null
+++ build-64-unstable-11624/tools/xcutils/check-structs.c
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <xenctrl.h>
+#include <xen/arch-x86_32.h>
+#include <xen/arch-x86_64.h>
+
+int main(int argc, char *argv[])
+{
+ printf("%-20s %-6s %-6s\n", "struct", "x86_32", "x86_64");
+ printf("----------------------------------\n");
+ printf("%-20s %6zd %6zd\n", "trap_info_t",
+ sizeof(trap_info_x86_32_t),
+ sizeof(trap_info_x86_64_t));
+ printf("%-20s %6zd %6zd\n", "cpu_user_regs_t",
+ sizeof(cpu_user_regs_x86_32_t),
+ sizeof(cpu_user_regs_x86_64_t));
+ printf("%-20s %6zd %6zd\n", "vcpu_guest_context_t",
+ sizeof(vcpu_guest_context_x86_32_t),
+ sizeof(vcpu_guest_context_x86_64_t));
+ printf("%-20s %6zd %6zd\n", "arch_shared_info_t",
+ sizeof(arch_shared_info_x86_32_t),
+ sizeof(arch_shared_info_x86_64_t));
+ printf("%-20s %6zd %6zd\n", "arch_vcpu_info_t",
+ sizeof(arch_vcpu_info_x86_32_t),
+ sizeof(arch_vcpu_info_x86_64_t));
+ printf("%-20s %6zd %6zd\n", "xen_callback_t",
+ sizeof(xen_callback_x86_32_t),
+ sizeof(xen_callback_x86_64_t));
+ return 0;
+}
--
prev parent reply other threads:[~2006-10-05 9:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-05 9:05 [patch rfc 0/3] xen arch header patches kraxel
2006-10-05 9:05 ` [patch rfc 1/3] xen arch header rework kraxel
2006-10-05 12:27 ` Jan Beulich
2006-10-05 13:08 ` Gerd Hoffmann
2006-10-11 9:16 ` Gerd Hoffmann
2006-10-11 9:44 ` Keir Fraser
2006-10-11 10:40 ` Jacob Gorm Hansen
2006-10-11 10:50 ` Keir Fraser
2006-10-11 11:54 ` Gerd Hoffmann
2006-10-11 13:47 ` Jacob Gorm Hansen
2006-10-11 14:49 ` Gerd Hoffmann
2006-10-11 20:38 ` Julian Davison
2006-10-14 1:30 ` Steven Rostedt
2006-10-15 20:21 ` Julian Davison
2006-10-16 14:56 ` Steven Rostedt
2006-10-17 13:28 ` Jacob Gorm Hansen
2006-10-17 20:10 ` Julian Davison
2006-10-11 11:39 ` Gerd Hoffmann
2006-10-11 11:43 ` Keir Fraser
2006-10-11 12:21 ` SPAM: " Gerd Hoffmann
2006-10-11 12:04 ` John Levon
2006-10-05 9:05 ` [patch rfc 2/3] xen arch header rework, fixups kraxel
2006-10-05 9:05 ` kraxel [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=20061005090633.965801000@suse.de \
--to=kraxel@suse.de \
--cc=jbeulich@novell.com \
--cc=xen-devel@lists.xensource.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.