From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
Henry Wang <Henry.Wang@arm.com>
Subject: Re: [PATCH][4.17?] x86: also zap secondary time area handles during soft reset
Date: Tue, 25 Oct 2022 17:23:53 +0200 [thread overview]
Message-ID: <Y1f/iQaugcmhiP+0@Air-de-Roger> (raw)
In-Reply-To: <c80390e6-b9c2-e15a-b513-ec97e8329ad8@suse.com>
On Thu, Oct 13, 2022 at 08:48:21AM +0200, Jan Beulich wrote:
> Just like domain_soft_reset() properly zaps runstate area handles, the
> secondary time area ones also need discarding to prevent guest memory
> corruption once the guest is re-started.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> To avoid another for_each_vcpu() here, domain_soft_reset() could also
> be made call a new arch_vcpu_soft_reset() out of its already present
> loop. Yet that would make the change less isolated.
>
> In domain_soft_reset() I wonder whether, just like done here, the
> zapping of runstate area handles and vCPU info mappings wouldn't better
> be done after all operations which can fail. But perhaps for this to
> matter the domain is left in too inconsistent a state anyway if the
> function fails ...
We would need some kind of recovery anyway, so given the current code
and lack of recovery it doesn't seem to matter much.
> However, at the very least I wonder whether x86'es
> restriction to HVM shouldn't leave PV guests undisturbed if a soft-reset
> was attempted on them. Right now they not only have state partially
> clobbered, but (if the arch function is reached) they would be crashed
> unconditionally.
It's a toolstack initiated operation by a domctl, so I'm fine with
saying that it's up for the toolstack to prevent soft resets from
being attempted against PV domains. Would be nice to reject the
operation earlier on the hypervisor, maybe by moving
arch_domain_soft_reset() earlier in domain_soft_reset() so that we
can return without crashing?
In any case it's unlikely for a domain that was attempting a soft
reset to survive the hypervisor rejecting the operation, so it doesn't
matter much whether the domain is crashed by Xen or left as-is I would
think.
Thanks, Roger.
next prev parent reply other threads:[~2022-10-25 15:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 6:48 [PATCH][4.17?] x86: also zap secondary time area handles during soft reset Jan Beulich
2022-10-25 15:23 ` Roger Pau Monné [this message]
2022-10-25 15:58 ` Jan Beulich
2022-10-25 16:04 ` Roger Pau Monné
2022-10-27 9:44 ` Henry Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1f/iQaugcmhiP+0@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=Henry.Wang@arm.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.