[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC v3 1/6] xen/arm: Add basic save/restore support for ARM
Hi Wei, On 08/05/14 22:18, Wei Huang wrote: +void arch_hvm_save(struct domain *d, struct hvm_save_header *hdr) +{ + hdr->magic = HVM_ARM_FILE_MAGIC; + hdr->version = HVM_ARM_FILE_VERSION; + hdr->cpuinfo = READ_SYSREG32(MIDR_EL1); You can directly use boot_cpu_data.midr.bits. +} + +int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr) +{ + uint32_t cpuinfo; + + if ( hdr->magic != HVM_ARM_FILE_MAGIC ) + { + printk(XENLOG_G_ERR "HVM%d restore: bad magic number %#"PRIx32"\n", + d->domain_id, hdr->magic); + return -EINVAL; + } + + if ( hdr->version != HVM_ARM_FILE_VERSION ) + { + printk(XENLOG_G_ERR "HVM%d restore: unsupported version %u\n", + d->domain_id, hdr->version); + return -EINVAL; + } + + cpuinfo = READ_SYSREG32(MIDR_EL1); Same here. -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |