[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 2/3] arm: export platform_op XENPF_settime64
On Thu, 2015-11-12 at 17:46 +0000, Stefano Stabellini wrote: > Call update_domain_wallclock_time at domain initialization. > Set time_offset_seconds to the number of seconds between physical boot > and domain initialization: it is going to be used to get/set the > wallclock time. > Add time_offset_seconds to system_time when before calling do_settime, > so that system_time actually accounts for all the time in nsec between > machine boot and when the wallclock was set. > > Expose xsm_platform_op to ARM. > > Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> An aside:[...] @@ -1332,6 +1332,75 @@ static int flask_deassign_dtdevice(struct domain > *d, const char *dtpath) > Â} > Â#endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE */ > Â > +static int flask_platform_op(uint32_t op) > +{ > +ÂÂÂÂswitch ( op ) > +ÂÂÂÂ{ > +#ifdef CONFIG_X86 > +ÂÂÂÂ/* These operations have their own XSM hooks */ > +ÂÂÂÂcase XENPF_cpu_online: > +ÂÂÂÂcase XENPF_cpu_offline: > +ÂÂÂÂcase XENPF_cpu_hotadd: > +ÂÂÂÂcase XENPF_mem_hotadd: > +ÂÂÂÂÂÂÂÂreturn 0; Should this not then be an error (e.g. fail closed)? Also, although only implemented today for x86 they don't seem inherently any more x86 specific than many of the other things below, so maybe the ifdef could be ditched? > +#endif > + > +ÂÂÂÂcase XENPF_settime32: > +ÂÂÂÂcase XENPF_settime64: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__SETTIME); > + > +ÂÂÂÂcase XENPF_add_memtype: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__MTRR_ADD); > + > +ÂÂÂÂcase XENPF_del_memtype: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__MTRR_DEL); > + > +ÂÂÂÂcase XENPF_read_memtype: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__MTRR_READ); > + > +ÂÂÂÂcase XENPF_microcode_update: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__MICROCODE); > + > +ÂÂÂÂcase XENPF_platform_quirk: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__QUIRK); > + > +ÂÂÂÂcase XENPF_firmware_info: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__FIRMWARE); > + > +ÂÂÂÂcase XENPF_efi_runtime_call: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__FIRMWARE); > + > +ÂÂÂÂcase XENPF_enter_acpi_sleep: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__SLEEP); > + > +ÂÂÂÂcase XENPF_change_freq: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__FREQUENCY); > + > +ÂÂÂÂcase XENPF_getidletime: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__GETIDLE); > + > +ÂÂÂÂcase XENPF_set_processor_pminfo: > +ÂÂÂÂcase XENPF_core_parking: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__PM_OP); > + > +ÂÂÂÂcase XENPF_get_cpu_version: > +ÂÂÂÂcase XENPF_get_cpuinfo: > +ÂÂÂÂÂÂÂÂreturn domain_has_xen(current->domain, XEN__GETCPUINFO); > + > +ÂÂÂÂcase XENPF_resource_op: > +ÂÂÂÂÂÂÂÂreturn avc_current_has_perm(SECINITSID_XEN, SECCLASS_XEN2, > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂXEN2__RESOURCE_OP, NULL); > + > +ÂÂÂÂcase XENPF_get_symbol: > +ÂÂÂÂÂÂÂÂreturn avc_has_perm(domain_sid(current->domain), SECINITSID_XEN, > +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂSECCLASS_XEN2, XEN2__GET_SYMBOL, NULL); > + > +ÂÂÂÂdefault: > +ÂÂÂÂÂÂÂÂprintk("flask_platform_op: Unknown op %d\n", op); > +ÂÂÂÂÂÂÂÂreturn -EPERM; > +ÂÂÂÂ} > +} > + _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |