Re: [PATCH Part1 v5 33/38] x86/sev: Provide support for SNP guest request NAEs

From: Tom Lendacky
Date: Fri Aug 27 2021 - 15:57:19 EST


On 8/27/21 1:07 PM, Brijesh Singh wrote:
On 8/27/21 12:44 PM, Borislav Petkov wrote:
On Fri, Aug 20, 2021 at 10:19:28AM -0500, Brijesh Singh wrote:

...

+
+/*
+ * The error code when the data_npages is too small. The error code
+ * is defined in the GHCB specification.
+ */
+#define SNP_GUEST_REQ_INVALID_LEN 0x100000000ULL
so basically

BIT_ULL(32)

Noted.

The main thing about this is that it is an error code from the HV on extended guest requests. The HV error code sits in the high-order 32-bits of the SW_EXIT_INFO_2 field. So defining it either way seems a bit confusing. To me, the value should just be 1ULL and then it should be shifted when assigning it to the SW_EXIT_INFO_2.

Thanks,
Tom