On 6/27/22 03:31, Kai Huang wrote:
try_accept_once() uses 'enum pg_level' PG_LEVEL_{4K,2M,1G} directly. They can+/* Page sizes supported by TDX */Are these the same constants as the magic numbers in Kirill's
+enum tdx_page_sz {
+ TDX_PG_4K,
+ TDX_PG_2M,
+ TDX_PG_1G,
+ TDX_PG_MAX,
+};
try_accept_one()?
be used directly too, but 'enum pg_level' has more than we need here:
I meant this:
+ switch (level) {
+ case PG_LEVEL_4K:
+ page_size = 0;
+ break;
Because TDX_PG_4K==page_size==0, and for this:
+ case PG_LEVEL_2M:
+ page_size = 1;
where TDX_PG_2M==page_size==1
See?
Are Kirill's magic 0/1/2 numbers the same as
TDX_PG_4K,
TDX_PG_2M,
TDX_PG_1G,
?