* [PATCH] make XEN_DOMCTL_getdomaininfo return shared_info_frame in gmfn
@ 2006-12-07 12:18 Isaku Yamahata
2006-12-07 18:05 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Isaku Yamahata @ 2006-12-07 12:18 UTC (permalink / raw)
To: xen-devel; +Cc: xen-ia64-devel
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
This patch is necessary for xen/ia64 domain build/save/restore.
make XEN_DOMCTL_getdomaininfo return shared_info_frame in gmfn. not mfn.
foreign domain page mapping semantic was changed so that it requires
gmfn. So to map foreign domain's shared_info, gmfn is required.
--
yamahata
[-- Attachment #2: 12757_cf30ad63c214_xen_domctl_getdomaininfo_shared_info_gmfn.patch --]
[-- Type: text/plain, Size: 1936 bytes --]
# HG changeset patch
# User yamahata@valinux.co.jp
# Date 1165484902 -32400
# Node ID cf30ad63c2147a31c90ab8b14ef166771f31c976
# Parent 1d32fb45e08fe9e8ebbc684ae93f71c6b5fd1495
make XEN_DOMCTL_getdomaininfo return shared_info_frame in gmfn. not mfn.
foreign domain page mapping semantic was changed so that it requires
gmfn. So to map foreign domain's shared_info, gmfn is required.
PATCHNAME: xen_domctl_getdomaininfo_shared_info_gmfn
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
diff -r 1d32fb45e08f -r cf30ad63c214 xen/common/domctl.c
--- a/xen/common/domctl.c Wed Dec 06 16:33:48 2006 +0000
+++ b/xen/common/domctl.c Thu Dec 07 18:48:22 2006 +0900
@@ -18,6 +18,7 @@
#include <xen/console.h>
#include <xen/iocap.h>
#include <xen/guest_access.h>
+#include <xen/shadow.h>
#include <asm/current.h>
#include <public/domctl.h>
#include <acm/acm_hooks.h>
@@ -127,6 +128,8 @@ void getdomaininfo(struct domain *d, str
info->tot_pages = d->tot_pages;
info->max_pages = d->max_pages;
info->shared_info_frame = __pa(d->shared_info) >> PAGE_SHIFT;
+ if ( shadow_mode_translate(d) )
+ info->shared_info_frame = get_gpfn_from_mfn(info->shared_info_frame);
memcpy(info->handle, d->handle, sizeof(xen_domain_handle_t));
}
diff -r 1d32fb45e08f -r cf30ad63c214 xen/include/public/domctl.h
--- a/xen/include/public/domctl.h Wed Dec 06 16:33:48 2006 +0000
+++ b/xen/include/public/domctl.h Thu Dec 07 18:48:22 2006 +0900
@@ -93,7 +93,7 @@ struct xen_domctl_getdomaininfo {
uint32_t flags; /* XEN_DOMINF_* */
uint64_t tot_pages;
uint64_t max_pages;
- uint64_t shared_info_frame; /* MFN of shared_info struct */
+ uint64_t shared_info_frame; /* GMFN of shared_info struct */
uint64_t cpu_time;
uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */
uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] make XEN_DOMCTL_getdomaininfo return shared_info_frame in gmfn
2006-12-07 12:18 [PATCH] make XEN_DOMCTL_getdomaininfo return shared_info_frame in gmfn Isaku Yamahata
@ 2006-12-07 18:05 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2006-12-07 18:05 UTC (permalink / raw)
To: Isaku Yamahata, Keir Fraser; +Cc: xen-devel, xen-ia64-devel
On Thu, 2006-12-07 at 21:18 +0900, Isaku Yamahata wrote:
> This patch is necessary for xen/ia64 domain build/save/restore.
> make XEN_DOMCTL_getdomaininfo return shared_info_frame in gmfn. not
> mfn.
> foreign domain page mapping semantic was changed so that it requires
> gmfn. So to map foreign domain's shared_info, gmfn is required.
Hi Keir,
We need this patch to get things working again in the
xen-ia64-unstable tree. We'd really appreciate if you could pull this
in. Thanks,
Alex
>
>
>
>
>
> plain text
> document
> attachment
> (12757_cf30ad63c214_xen_domctl_getdomaininfo_shared_info_gmfn.patch)
>
> # HG changeset patch
> # User yamahata@valinux.co.jp
> # Date 1165484902 -32400
> # Node ID cf30ad63c2147a31c90ab8b14ef166771f31c976
> # Parent 1d32fb45e08fe9e8ebbc684ae93f71c6b5fd1495
> make XEN_DOMCTL_getdomaininfo return shared_info_frame in gmfn. not
> mfn.
> foreign domain page mapping semantic was changed so that it requires
> gmfn. So to map foreign domain's shared_info, gmfn is required.
> PATCHNAME: xen_domctl_getdomaininfo_shared_info_gmfn
>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
>
> diff -r 1d32fb45e08f -r cf30ad63c214 xen/common/domctl.c
> --- a/xen/common/domctl.c Wed Dec 06 16:33:48 2006 +0000
> +++ b/xen/common/domctl.c Thu Dec 07 18:48:22 2006 +0900
> @@ -18,6 +18,7 @@
> #include <xen/console.h>
> #include <xen/iocap.h>
> #include <xen/guest_access.h>
> +#include <xen/shadow.h>
> #include <asm/current.h>
> #include <public/domctl.h>
> #include <acm/acm_hooks.h>
> @@ -127,6 +128,8 @@ void getdomaininfo(struct domain *d, str
> info->tot_pages = d->tot_pages;
> info->max_pages = d->max_pages;
> info->shared_info_frame = __pa(d->shared_info) >> PAGE_SHIFT;
> + if ( shadow_mode_translate(d) )
> + info->shared_info_frame =
> get_gpfn_from_mfn(info->shared_info_frame);
>
> memcpy(info->handle, d->handle, sizeof(xen_domain_handle_t));
> }
> diff -r 1d32fb45e08f -r cf30ad63c214 xen/include/public/domctl.h
> --- a/xen/include/public/domctl.h Wed Dec 06 16:33:48 2006 +0000
> +++ b/xen/include/public/domctl.h Thu Dec 07 18:48:22 2006 +0900
> @@ -93,7 +93,7 @@ struct xen_domctl_getdomaininfo {
> uint32_t flags; /* XEN_DOMINF_* */
> uint64_t tot_pages;
> uint64_t max_pages;
> - uint64_t shared_info_frame; /* MFN of shared_info struct */
> + uint64_t shared_info_frame; /* GMFN of shared_info struct */
> uint64_t cpu_time;
> uint32_t nr_online_vcpus; /* Number of VCPUs currently online.
> */
> uint32_t max_vcpu_id; /* Maximum VCPUID in use by this
> domain. */
--
Alex Williamson HP Open Source & Linux Org.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-07 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07 12:18 [PATCH] make XEN_DOMCTL_getdomaininfo return shared_info_frame in gmfn Isaku Yamahata
2006-12-07 18:05 ` Alex Williamson
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.