[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/4] Add basic domain.guest_type support.
Signed-off-by: Don Slutz <dslutz@xxxxxxxxxxx> --- xen_hyper.c | 8 ++++++++ xen_hyper_defs.h | 1 + xen_hyper_dump_tables.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/xen_hyper.c b/xen_hyper.c index 00a0e2c..c18e815 100644 --- a/xen_hyper.c +++ b/xen_hyper.c @@ -207,6 +207,7 @@ xen_hyper_domain_init(void) XEN_HYPER_MEMBER_OFFSET_INIT(domain_domain_flags, "domain", "domain_flags"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_evtchn, "domain", "evtchn"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_hvm, "domain", "is_hvm"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_guest_type, "domain", "guest_type"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_privileged, "domain", "is_privileged"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_debugger_attached, "domain", "debugger_attached"); @@ -1251,6 +1252,13 @@ xen_hyper_store_domain_context(struct xen_hyper_domain_context *dc, *(dp + XEN_HYPER_OFFSET(domain_is_hvm))) { dc->domain_flags |= XEN_HYPER_DOMS_HVM; } + if (XEN_HYPER_VALID_MEMBER(domain_guest_type) && + *(dp + XEN_HYPER_OFFSET(domain_guest_type))) { + /* For now PVH and HVM are the same for crash. + * and 0 is PV. + */ + dc->domain_flags |= XEN_HYPER_DOMS_HVM; + } if (*(dp + XEN_HYPER_OFFSET(domain_is_privileged))) { dc->domain_flags |= XEN_HYPER_DOMS_privileged; } diff --git a/xen_hyper_defs.h b/xen_hyper_defs.h index 1f5b0ba..abc9a07 100644 --- a/xen_hyper_defs.h +++ b/xen_hyper_defs.h @@ -673,6 +673,7 @@ struct xen_hyper_offset_table { long domain_domain_flags; long domain_evtchn; long domain_is_hvm; + long domain_guest_type; long domain_is_privileged; long domain_debugger_attached; long domain_is_polling; diff --git a/xen_hyper_dump_tables.c b/xen_hyper_dump_tables.c index 38558d5..337eb25 100644 --- a/xen_hyper_dump_tables.c +++ b/xen_hyper_dump_tables.c @@ -772,6 +772,8 @@ xen_hyper_dump_xen_hyper_offset_table(char *spec, ulong makestruct) (buf, "%ld\n", xen_hyper_offset_table.domain_evtchn)); XEN_HYPER_PRI(fp, len, "domain_is_hvm: ", buf, flag, (buf, "%ld\n", xen_hyper_offset_table.domain_is_hvm)); + XEN_HYPER_PRI(fp, len, "domain_guest_type: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_guest_type)); XEN_HYPER_PRI(fp, len, "domain_is_privileged: ", buf, flag, (buf, "%ld\n", xen_hyper_offset_table.domain_is_privileged)); XEN_HYPER_PRI(fp, len, "domain_debugger_attached: ", buf, flag, -- 1.8.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |