From: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
To: xen-devel <xen-devel@lists.xensource.com>
Cc: ospk-vm@lab.ntt.co.jp, Ian Pratt <ian.pratt@citrix.com>,
ian.jackson@eu.citrix.com,
Keir Fraser <keir.fraser@eu.citrix.com>
Subject: [RFC][PATCH 03/13] Kemari: change parameter type of xc_{set, get}_hvm_param
Date: Fri, 06 Mar 2009 14:54:56 +0900 [thread overview]
Message-ID: <49B0BAB0.6040307@lab.ntt.co.jp> (raw)
In-Reply-To: <49B0B8DC.5000606@lab.ntt.co.jp>
This patch changes arguments "value" of xc_set_hvm_param and xc_get_hvm_param
from 32bit to 64bit. This is because Xen sets and gets a 64bit variable for
those "value"s in xc_set_hvm_param and xc_get_hvm_param, respectively. We need
this change because callback irqs got from xc_get_hvm_param and set by
xc_set_hvm_param are 64bit.
Signed-off-by: Yoshisato Yanagisawa <yanagisawa.yoshisato@lab.ntt.co.jp>
Signed-off-by: Yoshi Tamura <tamura.yoshiaki@lab.ntt.co.jp>
---
tools/libxc/xc_cpuid_x86.c | 2 +-
tools/libxc/xc_domain.c | 4 ++--
tools/libxc/xc_domain_save.c | 8 ++++----
tools/libxc/xc_resume.c | 2 +-
tools/python/xen/lowlevel/xc/xc.c | 4 ++--
5 files changed, 10 insertions(+), 10 deletions(-)
diff -r 19201eebab16 tools/libxc/xc_cpuid_x86.c
--- a/tools/libxc/xc_cpuid_x86.c Thu Sep 25 13:33:50 2008 +0100
+++ b/tools/libxc/xc_cpuid_x86.c Wed Mar 04 17:04:19 2009 +0900
@@ -148,7 +148,7 @@
int xc, domid_t domid, const unsigned int *input, unsigned int *regs)
{
char brand[13];
- unsigned long pae;
+ unsigned long long pae;
int is_pae;
xc_get_hvm_param(xc, domid, HVM_PARAM_PAE_ENABLED, &pae);
diff -r 19201eebab16 tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c Thu Sep 25 13:33:50 2008 +0100
+++ b/tools/libxc/xc_domain.c Wed Mar 04 17:04:20 2009 +0900
@@ -690,7 +690,7 @@
return do_domctl(xc_handle, &domctl);
}
-int xc_set_hvm_param(int handle, domid_t dom, int param, unsigned long value)
+int xc_set_hvm_param(int handle, domid_t dom, int param, unsigned long long value)
{
DECLARE_HYPERCALL;
xen_hvm_param_t arg;
@@ -709,7 +709,7 @@
return rc;
}
-int xc_get_hvm_param(int handle, domid_t dom, int param, unsigned long *value)
+int xc_get_hvm_param(int handle, domid_t dom, int param, unsigned long long *value)
{
DECLARE_HYPERCALL;
xen_hvm_param_t arg;
diff -r 19201eebab16 tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c Thu Sep 25 13:33:50 2008 +0100
+++ b/tools/libxc/xc_domain_save.c Wed Mar 04 17:04:20 2009 +0900
@@ -1400,7 +1400,7 @@
} chunk = { -3, 0 };
xc_get_hvm_param(xc_handle, dom, HVM_PARAM_IDENT_PT,
- (unsigned long *)&chunk.ident_pt);
+ &chunk.ident_pt);
if ( (chunk.ident_pt != 0) &&
write_exact(io_fd, &chunk, sizeof(chunk)) )
@@ -1425,11 +1425,11 @@
/* Save magic-page locations. */
memset(magic_pfns, 0, sizeof(magic_pfns));
xc_get_hvm_param(xc_handle, dom, HVM_PARAM_IOREQ_PFN,
- (unsigned long *)&magic_pfns[0]);
+ &magic_pfns[0]);
xc_get_hvm_param(xc_handle, dom, HVM_PARAM_BUFIOREQ_PFN,
- (unsigned long *)&magic_pfns[1]);
+ &magic_pfns[1]);
xc_get_hvm_param(xc_handle, dom, HVM_PARAM_STORE_PFN,
- (unsigned long *)&magic_pfns[2]);
+ &magic_pfns[2]);
if ( write_exact(io_fd, magic_pfns, sizeof(magic_pfns)) )
{
PERROR("Error when writing to state file (7)");
diff -r 19201eebab16 tools/libxc/xc_resume.c
--- a/tools/libxc/xc_resume.c Thu Sep 25 13:33:50 2008 +0100
+++ b/tools/libxc/xc_resume.c Wed Mar 04 17:04:21 2009 +0900
@@ -27,7 +27,7 @@
/* HVM guests without PV drivers do not have a return code to modify. */
if ( info.hvm )
{
- unsigned long irq = 0;
+ unsigned long long irq = 0;
xc_get_hvm_param(xc_handle, domid, HVM_PARAM_CALLBACK_IRQ, &irq);
if ( !irq )
return 0;
diff -r 19201eebab16 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Thu Sep 25 13:33:50 2008 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Wed Mar 04 17:04:22 2009 +0900
@@ -490,7 +490,7 @@
{
uint32_t dom;
int param;
- unsigned long value;
+ unsigned long long value;
static char *kwd_list[] = { "domid", "param", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "ii", kwd_list,
@@ -500,7 +500,7 @@
if ( xc_get_hvm_param(self->xc_handle, dom, param, &value) != 0 )
return pyxc_error_to_exception();
- return PyLong_FromUnsignedLong(value);
+ return PyLong_FromUnsignedLongLong(value);
}
next prev parent reply other threads:[~2009-03-06 5:54 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-06 5:47 [RFC][PATCH 00/13] Kemari: VM synchronization mechanism for fault tolerance Yoshiaki Tamura
2009-03-06 5:50 ` [RFC][PATCH 01/13] Kemari: add ECS_TAP state to event channel Yoshiaki Tamura
2009-03-06 5:53 ` [RFC][PATCH 02/13] Kemari: core kemari code Yoshiaki Tamura
2009-03-06 5:54 ` Yoshiaki Tamura [this message]
2009-03-06 5:56 ` [RFC][PATCH 04/13] Kemari: Kemari controller interface in libxc Yoshiaki Tamura
2009-03-06 6:26 ` [RFC][PATCH 05/13] Kemari: Kemari sender Yoshiaki Tamura
2009-03-06 6:46 ` [RFC][PATCH 06/13] Kemari: Kemari receiver Yoshiaki Tamura
2009-03-06 6:46 ` [RFC][PATCH 07/13] Kemari: add Kemari support to python Yoshiaki Tamura
2009-03-06 6:46 ` [RFC][PATCH 08/13] Kemari: add dev state "Attached" " Yoshiaki Tamura
2009-03-06 6:47 ` [RFC][PATCH 09/13] Kemari: add XenbusStateAttached to xenbus Yoshiaki Tamura
2009-03-06 6:47 ` [RFC][PATCH 10/13] Kemari: XenbusStateAttached handler for blkback Yoshiaki Tamura
2009-03-06 6:47 ` [RFC][PATCH 11/13] Kemari: XenbusStateAttached handler for netback Yoshiaki Tamura
2009-03-06 6:47 ` [RFC][PATCH 12/13] Kemari: use signal to save qemu state for Kemari Yoshiaki Tamura
2009-03-06 11:39 ` Stefano Stabellini
2009-03-06 16:20 ` Yoshiaki Tamura
2009-03-17 17:55 ` Stefano Stabellini
2009-03-17 18:21 ` Ian Jackson
2009-03-17 18:35 ` Stefano Stabellini
2009-03-18 9:11 ` Yoshiaki Tamura
2009-03-18 9:34 ` Keir Fraser
2009-03-18 12:45 ` Yoshiaki Tamura
2009-03-18 12:46 ` Stefano Stabellini
2009-03-18 13:06 ` Keir Fraser
2009-03-19 5:54 ` Yoshiaki Tamura
2009-03-18 17:37 ` Christopher Head
2009-03-19 6:07 ` Yoshiaki Tamura
2009-03-16 18:05 ` Ian Jackson
2009-03-06 6:47 ` [RFC][PATCH 13/13] Kemari: use shared region with to flip logdirty_bitmap Yoshiaki Tamura
-- strict thread matches above, loose matches on Subject: below --
2009-03-12 1:14 [RFC][PATCH 00/13] Kemari: updated to the 3.4 unstable tree Yoshiaki Tamura
2009-03-12 1:16 ` [RFC][PATCH 03/13] Kemari: change parameter type of xc_{set, get}_hvm_param Yoshiaki Tamura
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=49B0BAB0.6040307@lab.ntt.co.jp \
--to=tamura.yoshiaki@lab.ntt.co.jp \
--cc=ian.jackson@eu.citrix.com \
--cc=ian.pratt@citrix.com \
--cc=keir.fraser@eu.citrix.com \
--cc=ospk-vm@lab.ntt.co.jp \
--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.