[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 08/11] xen: arch-specific hooks for domain_soft_reset()
"Jan Beulich" <JBeulich@xxxxxxxx> writes: >>>> On 16.07.15 at 18:27, <vkuznets@xxxxxxxxxx> wrote: >> --- a/xen/arch/x86/domain.c >> +++ b/xen/arch/x86/domain.c >> @@ -704,6 +704,90 @@ void arch_domain_unpause(struct domain *d) >> viridian_time_ref_count_thaw(d); >> } >> >> +int arch_domain_soft_reset(struct domain *d) >> +{ >> + struct page_info *page = virt_to_page(d->shared_info), *new_page; >> + int ret = 0; >> + struct domain *owner; >> + unsigned long mfn, mfn_new, gfn; >> + p2m_type_t p2mt; >> + unsigned int i; >> + >> + /* Soft reset is supported for HVM domains only. */ >> + if ( !is_hvm_domain(d) ) >> + return -EINVAL; > > This suggests that the whole function may better go somewhere in > hvm/. > > And is this intentionally excluding PVH? > Not really. As far as I understand the descision is to go for "HVM without dm" way for PVH in future? In that case, isn't is_hvm_domain() supposed to return true for it? I hope the selected approach to kexec should "just work" for such PVH guests. >... >> --- a/xen/common/domain.c >> +++ b/xen/common/domain.c >> @@ -1035,6 +1035,10 @@ int domain_soft_reset(struct domain *d) >> for_each_vcpu ( d, v ) >> unmap_vcpu_info(v); >> >> + rc = arch_domain_soft_reset(d); >> + if (rc) >> + return rc; > > I don't think this can be done this late, or else you'd need to have > a way to undo everything you've done earlier in the function. This > of course also applies to what's being done inside the function. Or > if undoing is - as it looks like - rather hard, perhaps the domain > would better be crashed than left in an inconsistent state? Crashing the domain seems reasonable. -- Vitaly _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |