[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-devel
Subject:    Re: [Xen-devel] [PATCH v2 10/17] tools/libxl: Plumb a restore boolean down into libxl__build_pre()
From:       Andrew Cooper <andrew.cooper3 () citrix ! com>
Date:       2020-02-28 18:50:43
Message-ID: 6b8d1199-cd89-ca6c-719b-bb898842d542 () citrix ! com
[Download RAW message or body]

On 24/02/2020 17:39, Ian Jackson wrote:
> Andrew Cooper writes ("[PATCH v2 10/17] tools/libxl: Plumb a restore boolean down \
> into libxl__build_pre()"):
> > To fix CPUID handling, libxl__build_pre() is going to have to distinguish
> > between a brand new VM vs one which is being migrated-in/resumed.
> The distinction between libxl__build_pre and these other functions is
> not particularly principled.  It is a legacy from an old API (prior to
> the existince of *create) where libxl callers were expected to "build"
> a domain first and then do other things to it.
> 
> Maybe it would be better to pass this via libxl__domain_build_state
> rather than as an additional parameter ?

Well - I tried a similar approach the first time around, and it broke
stubdoms so badly it needed reverting.

(Untrim the commit details)

> v2:
> * New.  This is c/s aacc1430064 "tools/libxl: Plumb domain_create_state down
> into libxl__build_pre()" take-2, without any collateral damage to stubdoms.

The actual information we want is in libxl__domain_create_state
(specifically, restore_fd >= -1).  I first tried plumbing dcs down, to
avoid stashing the same information in two different structures at
different times.

Sadly, plumbing dcs didn't work because it is common between the real
domain and the stubdom (and this lead to the stubdom getting no settings
at all).  What we want to do is only influence the CPUID construction of
the main domain (which may be migrating in), whereas the stubdom always
wants fresh settings.

I could duplicate it into dbs, and at a guess that would probably work,
but isn't it taking a bad problem and making it worse?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic