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

Re: [PATCH 1/3] xen: check required Xen features


  • To: Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
  • From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • Date: Mon, 10 May 2021 08:11:56 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.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=rIcuE5kOedayuhR3R9WmVjbSFPpiiS9ZXiljrSfR7Z4=; b=KMvTFH3UkJ4RIFiSFFZsVtU771rlVg5q3+ds//5aJZ75n/cokvNEX7ss35rfMlT1JkbMU2FXIPfwhLdrWDdJJF7UBkCvsD14+u2q07SMV88tzO166azsdMGvQ1D/cVBbK1lD/75G0aIDxRZXR0a8ZTuZjW4fVNvz5wAeSnmh1WGaaxao52Y1w9LRaJtkWDdyBTZtNzRRaHk/tKb4JoivQTiOL0M+eKvZs55ptL2Wv62vYtNUtQpYyugdolpenmOLyaWUbDrBq/lZtTFLUzPtXLlqxRbM9ZB6faaj4+dyJvJMhIBxsbyk/lQ66b6KBNAKLXDI8Mh8RBhTv2F7+UZ3Hg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bq9vy0bcYQM0Rk/Yiq5Yw9SgFpFbKtviHuE7bNZG9yWng76ZbwogdtuelnsvOaSVlcsu5PDF2iqvaSmUgdKUwAtslpX7UfSFmCJpBwF+zlCs2OYLufYqm/PE1Jv3Juh4PB3IK6yGgkm38OTKwjTXMVNlTandXBHU3cGNfId1il5bmM4hW3VOCcretGno7EJr+0IRaat9jtlezDSGoz7gJGBhQ05PP5VbhBmuM76A3ypOOZ1npnYEW0jZX9MOwUoQn8Rrplad1EyqzpFBZjkstnP5rvGxq+2SimPY+uCZ5AkNlFKIyTSvqqciabZ5bWc2Gyndh8P+kuu/R1dcFvnH+A==
  • Authentication-results: infradead.org; dkim=none (message not signed) header.d=none;infradead.org; dmarc=none action=none header.from=oracle.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 10 May 2021 12:12:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 4/22/21 11:10 AM, Juergen Gross wrote:
>  
> +/*
> + * Linux kernel expects at least Xen 4.0.
> + *
> + * Assume some features to be available for that reason (depending on guest
> + * mode, of course).
> + */
> +#define chk_feature(f) {                                             \
> +             if (!xen_feature(f))                                    \
> +                     pr_err("Xen: feature %s not available!\n", #f); \
> +     }


With your changes in the subsequent patches, are we still going to function 
properly without those features? (i.e. maybe we should just panic)


(Also, chk_required_features() perhaps?)


-boris


> +
>  u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly;
>  EXPORT_SYMBOL_GPL(xen_features);
>  
> @@ -31,4 +44,9 @@ void xen_setup_features(void)
>               for (j = 0; j < 32; j++)
>                       xen_features[i * 32 + j] = !!(fi.submap & 1<<j);
>       }
> +
> +     if (xen_pv_domain()) {
> +             chk_feature(XENFEAT_mmu_pt_update_preserve_ad);
> +             chk_feature(XENFEAT_gnttab_map_avail_bits);
> +     }
>  }



 


Rackspace

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