[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] x86: generic MSRs save/restore
Ian, Is it OK at tools side? Thanks, Jinsong > > diff --git a/tools/misc/xen-hvmctx.c b/tools/misc/xen-hvmctx.c > index 5a69245..8a4614d 100644 > --- a/tools/misc/xen-hvmctx.c > +++ b/tools/misc/xen-hvmctx.c > @@ -399,6 +399,26 @@ static void dump_tsc_adjust(void) > printf(" TSC_ADJUST: tsc_adjust %" PRIx64 "\n", p.tsc_adjust); > } > > +#define HVM_CPU_MSR_SIZE(cnt) offsetof(struct hvm_msr, msr[cnt]) > +static void dump_cpu_msr(void) > +{ > + int i; > + struct hvm_msr *p = (struct hvm_msr *)(buf + off); > + > + if ( len - off < HVM_CPU_MSR_SIZE(p->count) ) > + { > + fprintf(stderr, "Error: need another %u bytes, only %u > available", + (unsigned > int)HVM_CPU_MSR_SIZE(p->count), len - off); + exit(1); > + } > + > + for ( i = 0; i < p->count; i++ ) > + printf(" CPU_MSR: msr %" PRIx32 " val %" PRIx64 "\n", > + p->msr[i].index, p->msr[i].val); > + > + off += HVM_CPU_MSR_SIZE(p->count); > +} > + > int main(int argc, char **argv) > { > int entry, domid; > @@ -467,6 +487,7 @@ int main(int argc, char **argv) > case HVM_SAVE_CODE(VIRIDIAN_VCPU): dump_viridian_vcpu(); > break; case HVM_SAVE_CODE(VMCE_VCPU): dump_vmce_vcpu(); > break; case HVM_SAVE_CODE(TSC_ADJUST): dump_tsc_adjust(); > break; + case CPU_MSR_CODE: dump_cpu_msr(); break; > case HVM_SAVE_CODE(END): break; > default: > printf(" ** Don't understand type %u: skipping\n", > > > Thanks, > Jinsong > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |