[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH RFC 03/10] domain: GADDR based shared guest area registration alternative - teardown


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 18 Jan 2023 09:59:17 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=71zGWGcb82+wBdIKl0Wpk5LPrXZxwf9fCZVf5L6JJgY=; b=MbF48F62B+59nUQVjM25PJud8fQ1VYdrY2qAy+jIDC+sdCKkUJ+BNPJMIcHS/gSTdP7CghNKZmc9exGZq3CsJ2HGiYO5kzAXu5f8Y634WrUildPDeZXdq7FJKjFnarqX3ESPf+ZDXlqwZhANWPfsaVAuIqIATe/LeDAdv28MEV00Lu86mFNZKw4/hSsoRRw+NZ8MN/udKrD18KFfGZD/WvGjWjIU/lUdDVfOT9TW7YHXxw5aJRNdfxuj4U3F7ppiGwHRJIK/j/j9CuCE+7iGiLpYhBNkIdl+sMKjkEBj2eBUD/NOgn9lFr2yxOOtNAYPpAixYemNgioOslBhBBPXSg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NKv2Ernh7WKhXXoJC/evTqzfM5Nxvu5etqbU5GXbc/klCOMfUELfUhd59SUehIpEdrRJdC5vrnHfvSgcWZ33sHOBFyhi7V2GW+medWut8I6/mymmZKZFXmSAGHDLSlvImrq6MRGJyRB+miSuKVgW1hsL8PuLJninsbLQC6ltU5/JB9Bu2Xwy0TJxrZoZt603miCBLyjN/tL5gdrMEO8HiWjCtmH+0MPxf8cjP3QHPPS2izjDg53vKPwVgdltmmKnUV4DjM1y/AEZeRFtUoDUFHhznhms6b1p7Wgwxe13YM0IZ0nmQspcMWcOSWKIJqArF8rsqpSFyyprJo/bzbjkgA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Delivery-date: Wed, 18 Jan 2023 08:59:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.01.2023 22:17, Andrew Cooper wrote:
> On 19/10/2022 8:40 am, Jan Beulich wrote:
>> In preparation of the introduction of new vCPU operations allowing to
>> register the respective areas (one of the two is x86-specific) by
>> guest-physical address, add the necessary domain cleanup hooks.
> 
> What are the two areas you're discussing here?
> 
> I assume you mean VCPUOP_register_vcpu_time_memory_area to be the
> x86-specific op, but ARM permits both  VCPUOP_register_vcpu_info and
> VCPUOP_register_runstate_memory_area.
> 
> So isn't it more 2+1 rather than 1+1?

Not in my view: The vcpu_info registration is already physical address
based, and there's also no new vCPU operation introduced there.

>> ---
>> RFC: Zapping the areas in pv_shim_shutdown() may not be strictly
>>      necessary: Aiui unmap_vcpu_info() is called only because the vCPU
>>      info area cannot be re-registered. Beyond that I guess the
>>      assumption is that the areas would only be re-registered as they
>>      were before. If that's not the case I wonder whether the guest
>>      handles for both areas shouldn't also be zapped.
> 
> At this point in pv_shim_shutdown(), have already come out of suspend
> (successfully) and are preparing to poke the PV guest out of suspend too.
> 
> The PV guest needs to not have its subsequent VCPUOP_register_vcpu_info
> call fail, but beyond that I can entirely believe that it was coded to
> "Linux doesn't crash" rather than "what's everything we ought to reset
> here" - recall that we weren't exactly flush with time when trying to
> push Shim out of the door.
> 
> Whatever does get reregstered will be reregistered at the same
> position.  No guest at all is going to have details like that dynamic
> across migrate.

I read this as "keep code as is, drop RFC remark", but that's not
necessarily the only way to interpret your reply.

> As a tangential observation, i see the periodic timer gets rearmed. 
> This is still one of the more insane default properties of a PV guest;
> Linux intentionally clobbers it on boot, but I can equivalent logic to
> re-clobber after resume.

I guess you meant s/can/can't spot/, in which case let's Cc Linux
folks for awareness.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.