[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v20210701 13/40] tools: unify type checking for data pfns in migration stream
- To: Olaf Hering <olaf@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Fri, 2 Jul 2021 20:49:09 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=i7N68Ya0uhCMnAoSNn5iCyw/Z8cNK+0b8HcO4R8m5OY=; b=PlrTqP6A8mpZ240ZHFAhu9HRJ1pPQzlJ9g8MPebYgP+4FqEXARHq+mXWRux0YXc6PDEEVh+eu5XwD7qtDsff3BnaSXgzpTc4xeZsg1Ha2YcOaXyozHu5bzAIiaUQLRq2ca46itDnWqgIGAdtUiuxfGl7p6Yp7gL515k2NZxqf4vyXa3hyCsaCZl8ZiodS84CNG5ZuxqiY07UhDXtOvwCtOFD879Mmshz29GLbCG+k1E1CJ2XRRBXfIuvy70yCeP5QUkd0VGBMRlXXjDtXT6K32pfw7pkXjzOnSxZKsttF1EO2LshdJ+hc99mdbGzvqXjvnAu2LFYcOZx2AD/HUg8Ag==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g1TJij7fKF6HiWndX2m0nt5bcF+Vh3JnQlduLBdB1oz9bC1dghIcCUKYvGosUv3OkjZ5ddtfcZQsk0FJUmO8a1BDYx9sBmBTCGOCx+B/sCRB43OFnyHVh2BDi+PwbpfgDesg+l04LxRYvfZS52FMGiI2H783kmVrAYXom3Ym8clh+D3E/wyDr3Kp22fi1bmnipY3pzCcPx2BZ2wKFJ30y/cMVbKhjPTqxfeDSf6HZJcrR7loa/MbfxoEqV19C6EEEuX5R8pS6XBTNij/X54UPhntgpGonz0sELF171+UY+LW6OzNBl3zHp6u6yx6QWc8KOWQr8ZzYKa6Zbb+PMjUhQ==
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
- Delivery-date: Fri, 02 Jul 2021 19:49:25 +0000
- Ironport-hdrordr: A9a23:T4Cwj63a8bWsp/GYzP8Y7QqjBV9yeYIsimQD101hICG9Lfb3qy n+ppsmPEHP5Ar5OEtBpTiBUJPwJU80hqQFn7X5Wo3SIzUO2VHYUL2KiLGC/9SOIVyEygcw79 YHT0E6MqyMMbEYt7eJ3ODbKadZ/DDvysnB7o2yvhQdL3AfV0gj1XYfNu/yKDwEeOAsP+tBKH Pz3Lsjm9PtQwVsUiztbUN1L9Qr6ue7267OUFojPVoK+QOOhTSn5PrTFAWZ5A4XV3dqza05+W bIvgTl7uH72svLiyP05iv21dB7idHhwtxMCIiljdUUECzljkKNaJ56U7OPkTgpqKWE6Uoskv PLvxA8Vv4DpU/5TyWQm1/AygPg2DEh5zvJ0lmDm0bupsT/WXYTF9dBrZgxSGqa12MQ+PVHlI 5b1WOQsJRaSTnamj7m2tTOXxZ20mKpvHsZl/IJhXA3a/pcVFZol/1awKppKuZGIMqjg7pXVt WGTfuspMq+SGnqKkww5QJUsYWRth1ZJGbyfqAA0vblmQS+0koJl3fw//Zv6EvowqhNAKWs19 60RZiAq4s+B/P+TZgNSdvpEvHHRlAkf3r3QSqvyAPcZdA60jT22sXK3Ik=
- Ironport-sdr: Pu2RNO5O3GfQ+IKxB5dpfof/CEFUGnAJlX8ZsnBjyIkelvLKbbS3odC2nBqAYL43kADqnBWBxj Ph4E/YmoX1cuLUOEAz/GqQSiiq/wyyZsNTnKIXKq2uMDOq/G/ewxxeybk3Nl6Z3U4orW+xs7u4 LXFcEwPZm4uoBV6DE91OnqIwIxf2OZdSZuqrEyQMHbzRaVsUnCdOoHDgyvHkVmgPI66MO+08Dl fPseAJDASZ7eRjiXv9FaP86F9BVQ2r/pdICEQvHlQDqqgaLo/FFGVL04rbZDhasIVYplDBKGhs jik=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 01/07/2021 10:56, Olaf Hering wrote:
> diff --git a/tools/libs/saverestore/common.h b/tools/libs/saverestore/common.h
> index fa242e808d..905b4078f6 100644
> --- a/tools/libs/saverestore/common.h
> +++ b/tools/libs/saverestore/common.h
> @@ -517,6 +517,24 @@ static inline bool page_type_to_populate(uint32_t type)
> }
> return ret;
> }
> +
> +static inline bool page_type_has_stream_data(uint32_t type)
> +{
> + bool ret;
> +
> + switch (type)
> + {
> + case XEN_DOMCTL_PFINFO_BROKEN:
> + case XEN_DOMCTL_PFINFO_XALLOC:
> + case XEN_DOMCTL_PFINFO_XTAB:
> + ret = false;
> + break;
> + default:
> + ret = true;
> + break;
As with page_type_to_populate(), we shouldn't really default the
unallocated types to having stream data.
Subject to this and the other style concerned, Reviewed-by: Andrew
Cooper <andrew.cooper3@xxxxxxxxxx>
I'm happy to fix up all the issue for the page type helpers on commit,
if you're happy.
~Andrew
|