On 24.02.2022 23:27, Dongli Zhang wrote:
> Hello,
>
> This is to report that the soft_reset (kexec/kdump) has not been working for
> me
> since long time ago.
>
> I have tested again with the most recent mainline xen and the most recent
> mainline kernel.
>
> While it works with my old xen version, it does not work with mainline xen.
>
>
> This is the log of my HVM guest.
>
> Waiting for domain test-vm (domid 1) to die [pid 1265]
> Domain 1 has shut down, reason code 5 0x5
> Action for shutdown reason code 5 is soft-reset
> Done. Rebooting now
> xc: error: Failed to set d1's policy (err leaf 0xffffffff, subleaf
> 0xffffffff, msr 0xffffffff) (17 = File exists): Internal error
I don't suppose you tried you track down the origin of this EEXIST? I think
it's pretty obvious, as in the handling of XEN_DOMCTL_set_cpu_policy we have
if ( d->creation_finished )
ret = -EEXIST; /* No changing once the domain is running. */
Question is how to address it: One approach could be to clear
d->creation_finished in domain_soft_reset(). But I think it would be more
clean if the tool stack avoided trying to set the CPUID policy (again) on
the guest when it soft-resets, as it's still the same guest after all.
Cc-ing Andrew and Anthony for possible thoughts.
Jan