public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
@ 2021-12-13 19:38 Brijesh Singh
  2021-12-13 21:46 ` [edk2-devel] " Rebecca Cran
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Brijesh Singh @ 2021-12-13 19:38 UTC (permalink / raw)
  To: devel
  Cc: James Bottomley, Min Xu, Jiewen Yao, Tom Lendacky, Jordan Justen,
	Ard Biesheuvel, Erdem Aktas, Michael Roth, Gerd Hoffmann,
	Brijesh Singh, Rebecca Cran

The XCODE5 reported the below warning

OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized use occurs here
           Compacted
           ^^^^^^^^^

Initialize the 'Compacted' variable to fix the warning.

Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID values)
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Michael Roth <Michael.Roth@amd.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
---
 OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
index a40a31f7c275..ff367411cc59 100644
--- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
+++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
@@ -1872,6 +1872,7 @@ GetCpuidFw (
     UINT32                 XSaveSize;
 
     XssMsr.Uint64 = 0;
+    Compacted = FALSE;
     if (EcxIn == 1) {
       /*
        * The PPR and APM aren't clear on what size should be encoded in
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
  2021-12-13 19:38 [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning Brijesh Singh
@ 2021-12-13 21:46 ` Rebecca Cran
  2021-12-14  2:10 ` Yao, Jiewen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Rebecca Cran @ 2021-12-13 21:46 UTC (permalink / raw)
  To: devel, brijesh.singh
  Cc: James Bottomley, Min Xu, Jiewen Yao, Tom Lendacky, Jordan Justen,
	Ard Biesheuvel, Erdem Aktas, Michael Roth, Gerd Hoffmann

Reviewed-by: Rebecca Cran <rebecca@bsdio.com>


-- 
Rebecca Cran


On 12/13/21 12:38, Brijesh Singh via groups.io wrote:
> The XCODE5 reported the below warning
>
> OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized use occurs here
>             Compacted
>             ^^^^^^^^^
>
> Initialize the 'Compacted' variable to fix the warning.
>
> Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID values)
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Min Xu <min.m.xu@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Michael Roth <Michael.Roth@amd.com>
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
>   OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> index a40a31f7c275..ff367411cc59 100644
> --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> @@ -1872,6 +1872,7 @@ GetCpuidFw (
>       UINT32                 XSaveSize;
>   
>       XssMsr.Uint64 = 0;
> +    Compacted = FALSE;
>       if (EcxIn == 1) {
>         /*
>          * The PPR and APM aren't clear on what size should be encoded in

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
  2021-12-13 19:38 [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning Brijesh Singh
  2021-12-13 21:46 ` [edk2-devel] " Rebecca Cran
@ 2021-12-14  2:10 ` Yao, Jiewen
       [not found] ` <16C07D237B4BFD37.18377@groups.io>
  2022-01-30 18:23 ` Rebecca Cran
  3 siblings, 0 replies; 8+ messages in thread
From: Yao, Jiewen @ 2021-12-14  2:10 UTC (permalink / raw)
  To: Brijesh Singh, devel@edk2.groups.io
  Cc: James Bottomley, Xu, Min M, Tom Lendacky, Justen, Jordan L,
	Ard Biesheuvel, Aktas, Erdem, Michael Roth, Gerd Hoffmann,
	Rebecca Cran

Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>

> -----Original Message-----
> From: Brijesh Singh <brijesh.singh@amd.com>
> Sent: Tuesday, December 14, 2021 3:39 AM
> To: devel@edk2.groups.io
> Cc: James Bottomley <jejb@linux.ibm.com>; Xu, Min M <min.m.xu@intel.com>;
> Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
> <thomas.lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com>;
> Ard Biesheuvel <ardb+tianocore@kernel.org>; Aktas, Erdem
> <erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com>; Gerd
> Hoffmann <kraxel@redhat.com>; Brijesh Singh <brijesh.singh@amd.com>;
> Rebecca Cran <rebecca@bsdio.com>
> Subject: [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
> 
> The XCODE5 reported the below warning
> 
> OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized
> use occurs here
>            Compacted
>            ^^^^^^^^^
> 
> Initialize the 'Compacted' variable to fix the warning.
> 
> Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID values)
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Min Xu <min.m.xu@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Michael Roth <Michael.Roth@amd.com>
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
>  OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> index a40a31f7c275..ff367411cc59 100644
> --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> @@ -1872,6 +1872,7 @@ GetCpuidFw (
>      UINT32                 XSaveSize;
> 
>      XssMsr.Uint64 = 0;
> +    Compacted = FALSE;
>      if (EcxIn == 1) {
>        /*
>         * The PPR and APM aren't clear on what size should be encoded in
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
       [not found] ` <16C07D237B4BFD37.18377@groups.io>
@ 2021-12-14  2:34   ` Yao, Jiewen
  2021-12-14  2:41     ` Rebecca Cran
  0 siblings, 1 reply; 8+ messages in thread
From: Yao, Jiewen @ 2021-12-14  2:34 UTC (permalink / raw)
  To: devel@edk2.groups.io, Yao, Jiewen, Brijesh Singh
  Cc: James Bottomley, Xu, Min M, Tom Lendacky, Justen, Jordan L,
	Ard Biesheuvel, Aktas, Erdem, Michael Roth, Gerd Hoffmann,
	Rebecca Cran

Hey Brijesh

CI fails - https://github.com/tianocore/edk2/pull/2301
Would you please take a look?

Please remember to submit patch after you run CI next time.

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao, Jiewen
> Sent: Tuesday, December 14, 2021 10:11 AM
> To: Brijesh Singh <brijesh.singh@amd.com>; devel@edk2.groups.io
> Cc: James Bottomley <jejb@linux.ibm.com>; Xu, Min M <min.m.xu@intel.com>;
> Tom Lendacky <thomas.lendacky@amd.com>; Justen, Jordan L
> <jordan.l.justen@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>;
> Aktas, Erdem <erdemaktas@google.com>; Michael Roth
> <Michael.Roth@amd.com>; Gerd Hoffmann <kraxel@redhat.com>; Rebecca
> Cran <rebecca@bsdio.com>
> Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized
> variable warning
> 
> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> 
> > -----Original Message-----
> > From: Brijesh Singh <brijesh.singh@amd.com>
> > Sent: Tuesday, December 14, 2021 3:39 AM
> > To: devel@edk2.groups.io
> > Cc: James Bottomley <jejb@linux.ibm.com>; Xu, Min M
> <min.m.xu@intel.com>;
> > Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
> > <thomas.lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com>;
> > Ard Biesheuvel <ardb+tianocore@kernel.org>; Aktas, Erdem
> > <erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com>; Gerd
> > Hoffmann <kraxel@redhat.com>; Brijesh Singh <brijesh.singh@amd.com>;
> > Rebecca Cran <rebecca@bsdio.com>
> > Subject: [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
> >
> > The XCODE5 reported the below warning
> >
> > OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized
> > use occurs here
> >            Compacted
> >            ^^^^^^^^^
> >
> > Initialize the 'Compacted' variable to fix the warning.
> >
> > Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID
> values)
> > Cc: James Bottomley <jejb@linux.ibm.com>
> > Cc: Min Xu <min.m.xu@intel.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Tom Lendacky <thomas.lendacky@amd.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Erdem Aktas <erdemaktas@google.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Rebecca Cran <rebecca@bsdio.com>
> > Cc: Michael Roth <Michael.Roth@amd.com>
> > Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> > ---
> >  OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > index a40a31f7c275..ff367411cc59 100644
> > --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> > @@ -1872,6 +1872,7 @@ GetCpuidFw (
> >      UINT32                 XSaveSize;
> >
> >      XssMsr.Uint64 = 0;
> > +    Compacted = FALSE;
> >      if (EcxIn == 1) {
> >        /*
> >         * The PPR and APM aren't clear on what size should be encoded in
> > --
> > 2.25.1
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
  2021-12-14  2:34   ` [edk2-devel] " Yao, Jiewen
@ 2021-12-14  2:41     ` Rebecca Cran
  2021-12-14  3:27       ` Brijesh Singh
  0 siblings, 1 reply; 8+ messages in thread
From: Rebecca Cran @ 2021-12-14  2:41 UTC (permalink / raw)
  To: devel, jiewen.yao, Brijesh Singh
  Cc: James Bottomley, Xu, Min M, Tom Lendacky, Justen, Jordan L,
	Ard Biesheuvel, Aktas, Erdem, Michael Roth, Gerd Hoffmann,
	Rebecca Cran

[-- Attachment #1: Type: text/plain, Size: 3744 bytes --]

The error is:

ERROR - /home/vsts/work/1/s/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET 
returned 1


 From what I can see, there's no report of the actual error here, so you 
have to setup Uncrustify locally to see what changes it wants to make.

For instructions on setting up Uncrustify, see 
https://github.com/makubacki/tianocore.github.io/blob/add_uncrustify_instructions/EDK-II-Code-Formatting.md 
.


Given the change, I expect the indentation of the equals sign is wrong.


-- 
Rebecca Cran


On 12/13/21 7:34 PM, Yao, Jiewen wrote:
> Hey Brijesh
>
> CI fails - https://github.com/tianocore/edk2/pull/2301
> Would you please take a look?
>
> Please remember to submit patch after you run CI next time.
>
>> -----Original Message-----
>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao, Jiewen
>> Sent: Tuesday, December 14, 2021 10:11 AM
>> To: Brijesh Singh <brijesh.singh@amd.com>; devel@edk2.groups.io
>> Cc: James Bottomley <jejb@linux.ibm.com>; Xu, Min M <min.m.xu@intel.com>;
>> Tom Lendacky <thomas.lendacky@amd.com>; Justen, Jordan L
>> <jordan.l.justen@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>;
>> Aktas, Erdem <erdemaktas@google.com>; Michael Roth
>> <Michael.Roth@amd.com>; Gerd Hoffmann <kraxel@redhat.com>; Rebecca
>> Cran <rebecca@bsdio.com>
>> Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized
>> variable warning
>>
>> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
>>
>>> -----Original Message-----
>>> From: Brijesh Singh <brijesh.singh@amd.com>
>>> Sent: Tuesday, December 14, 2021 3:39 AM
>>> To: devel@edk2.groups.io
>>> Cc: James Bottomley <jejb@linux.ibm.com>; Xu, Min M
>> <min.m.xu@intel.com>;
>>> Yao, Jiewen <jiewen.yao@intel.com>; Tom Lendacky
>>> <thomas.lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com>;
>>> Ard Biesheuvel <ardb+tianocore@kernel.org>; Aktas, Erdem
>>> <erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com>; Gerd
>>> Hoffmann <kraxel@redhat.com>; Brijesh Singh <brijesh.singh@amd.com>;
>>> Rebecca Cran <rebecca@bsdio.com>
>>> Subject: [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
>>>
>>> The XCODE5 reported the below warning
>>>
>>> OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized
>>> use occurs here
>>>             Compacted
>>>             ^^^^^^^^^
>>>
>>> Initialize the 'Compacted' variable to fix the warning.
>>>
>>> Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID
>> values)
>>> Cc: James Bottomley <jejb@linux.ibm.com>
>>> Cc: Min Xu <min.m.xu@intel.com>
>>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>>> Cc: Tom Lendacky <thomas.lendacky@amd.com>
>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>>> Cc: Erdem Aktas <erdemaktas@google.com>
>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>> Cc: Rebecca Cran <rebecca@bsdio.com>
>>> Cc: Michael Roth <Michael.Roth@amd.com>
>>> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
>>> ---
>>>   OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
>>> b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
>>> index a40a31f7c275..ff367411cc59 100644
>>> --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
>>> +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
>>> @@ -1872,6 +1872,7 @@ GetCpuidFw (
>>>       UINT32                 XSaveSize;
>>>
>>>       XssMsr.Uint64 = 0;
>>> +    Compacted = FALSE;
>>>       if (EcxIn == 1) {
>>>         /*
>>>          * The PPR and APM aren't clear on what size should be encoded in
>>> --
>>> 2.25.1
>>
>>
>>
>>
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 9471 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
  2021-12-14  2:41     ` Rebecca Cran
@ 2021-12-14  3:27       ` Brijesh Singh
  2021-12-14  6:37         ` Michael D Kinney
  0 siblings, 1 reply; 8+ messages in thread
From: Brijesh Singh @ 2021-12-14  3:27 UTC (permalink / raw)
  To: devel@edk2.groups.io, jiewen.yao@intel.com, rebecca@nuviainc.com
  Cc: James Bottomley, Xu, Min M, Lendacky, Thomas, Justen, Jordan L,
	Ard Biesheuvel, Aktas, Erdem, Roth, Michael, Gerd Hoffmann,
	Rebecca Cran

[-- Attachment #1: Type: text/plain, Size: 6573 bytes --]

[AMD Official Use Only]

I did ran uncrustify before submitting the patch. I am wondering if CI is reporting for some other issue in that file. I will look at it tomorrow.

-Brijesh

________________________________
From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Rebecca Cran via groups.io <rebecca=nuviainc.com@groups.io>
Sent: Monday, December 13, 2021 8:41 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>; jiewen.yao@intel.com <jiewen.yao@intel.com>; Singh, Brijesh <brijesh.singh@amd.com>
Cc: James Bottomley <jejb@linux.ibm.com>; Xu, Min M <min.m.xu@intel.com>; Lendacky, Thomas <Thomas.Lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Aktas, Erdem <erdemaktas@google.com>; Roth, Michael <Michael.Roth@amd.com>; Gerd Hoffmann <kraxel@redhat.com>; Rebecca Cran <rebecca@bsdio.com>
Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning


The error is:

ERROR - /home/vsts/work/1/s/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET returned 1


>From what I can see, there's no report of the actual error here, so you have to setup Uncrustify locally to see what changes it wants to make.

For instructions on setting up Uncrustify, see https://github.com/makubacki/tianocore.github.io/blob/add_uncrustify_instructions/EDK-II-Code-Formatting.md<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmakubacki%2Ftianocore.github.io%2Fblob%2Fadd_uncrustify_instructions%2FEDK-II-Code-Formatting.md&data=04%7C01%7Cbrijesh.singh%40amd.com%7C7ecf1a179d074ef3f37508d9beab5348%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637750465337231937%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Sl05dDDFzzZvpvzJp%2Bw5DWE81ocuy%2BYC4VfNxffyq5c%3D&reserved=0> .


Given the change, I expect the indentation of the equals sign is wrong.


--
Rebecca Cran

On 12/13/21 7:34 PM, Yao, Jiewen wrote:

Hey Brijesh

CI fails - https://github.com/tianocore/edk2/pull/2301<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F2301&data=04%7C01%7Cbrijesh.singh%40amd.com%7C7ecf1a179d074ef3f37508d9beab5348%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637750465337241935%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=914Gty%2BcMcmasiuDAUXdQr78gmU71%2FqL5mVcsbfrrSQ%3D&reserved=0>
Would you please take a look?

Please remember to submit patch after you run CI next time.



-----Original Message-----
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io><mailto:devel@edk2.groups.io> On Behalf Of Yao, Jiewen
Sent: Tuesday, December 14, 2021 10:11 AM
To: Brijesh Singh <brijesh.singh@amd.com><mailto:brijesh.singh@amd.com>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: James Bottomley <jejb@linux.ibm.com><mailto:jejb@linux.ibm.com>; Xu, Min M <min.m.xu@intel.com><mailto:min.m.xu@intel.com>;
Tom Lendacky <thomas.lendacky@amd.com><mailto:thomas.lendacky@amd.com>; Justen, Jordan L
<jordan.l.justen@intel.com><mailto:jordan.l.justen@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org><mailto:ardb+tianocore@kernel.org>;
Aktas, Erdem <erdemaktas@google.com><mailto:erdemaktas@google.com>; Michael Roth
<Michael.Roth@amd.com><mailto:Michael.Roth@amd.com>; Gerd Hoffmann <kraxel@redhat.com><mailto:kraxel@redhat.com>; Rebecca
Cran <rebecca@bsdio.com><mailto:rebecca@bsdio.com>
Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized
variable warning

Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com><mailto:Jiewen.yao@intel.com>



-----Original Message-----
From: Brijesh Singh <brijesh.singh@amd.com><mailto:brijesh.singh@amd.com>
Sent: Tuesday, December 14, 2021 3:39 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: James Bottomley <jejb@linux.ibm.com><mailto:jejb@linux.ibm.com>; Xu, Min M


<min.m.xu@intel.com><mailto:min.m.xu@intel.com>;


Yao, Jiewen <jiewen.yao@intel.com><mailto:jiewen.yao@intel.com>; Tom Lendacky
<thomas.lendacky@amd.com><mailto:thomas.lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com><mailto:jordan.l.justen@intel.com>;
Ard Biesheuvel <ardb+tianocore@kernel.org><mailto:ardb+tianocore@kernel.org>; Aktas, Erdem
<erdemaktas@google.com><mailto:erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com><mailto:Michael.Roth@amd.com>; Gerd
Hoffmann <kraxel@redhat.com><mailto:kraxel@redhat.com>; Brijesh Singh <brijesh.singh@amd.com><mailto:brijesh.singh@amd.com>;
Rebecca Cran <rebecca@bsdio.com><mailto:rebecca@bsdio.com>
Subject: [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning

The XCODE5 reported the below warning

OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized
use occurs here
           Compacted
           ^^^^^^^^^

Initialize the 'Compacted' variable to fix the warning.

Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID


values)


Cc: James Bottomley <jejb@linux.ibm.com><mailto:jejb@linux.ibm.com>
Cc: Min Xu <min.m.xu@intel.com><mailto:min.m.xu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com><mailto:jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com><mailto:thomas.lendacky@amd.com>
Cc: Jordan Justen <jordan.l.justen@intel.com><mailto:jordan.l.justen@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org><mailto:ardb+tianocore@kernel.org>
Cc: Erdem Aktas <erdemaktas@google.com><mailto:erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com><mailto:kraxel@redhat.com>
Cc: Rebecca Cran <rebecca@bsdio.com><mailto:rebecca@bsdio.com>
Cc: Michael Roth <Michael.Roth@amd.com><mailto:Michael.Roth@amd.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com><mailto:brijesh.singh@amd.com>
---
 OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
index a40a31f7c275..ff367411cc59 100644
--- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
+++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
@@ -1872,6 +1872,7 @@ GetCpuidFw (
     UINT32                 XSaveSize;

     XssMsr.Uint64 = 0;
+    Compacted = FALSE;
     if (EcxIn == 1) {
       /*
        * The PPR and APM aren't clear on what size should be encoded in
--
2.25.1













[-- Attachment #2: Type: text/html, Size: 12204 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
  2021-12-14  3:27       ` Brijesh Singh
@ 2021-12-14  6:37         ` Michael D Kinney
  0 siblings, 0 replies; 8+ messages in thread
From: Michael D Kinney @ 2021-12-14  6:37 UTC (permalink / raw)
  To: devel@edk2.groups.io, brijesh.singh@amd.com, Yao, Jiewen,
	rebecca@nuviainc.com, Kinney, Michael D
  Cc: James Bottomley, Xu, Min M, Lendacky, Thomas, Justen, Jordan L,
	Ard Biesheuvel, Aktas, Erdem, Roth, Michael, Gerd Hoffmann,
	Rebecca Cran

[-- Attachment #1: Type: text/plain, Size: 8907 bytes --]

The log with the information on the issue is here:

https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=35602&view=logs&j=780eaa17-fc2d-5131-b9d2-21b19bc9bec5&t=0a858618-38b5-5fca-13af-b958e180d2a0&l=36

It lists the filename that did not match the expected uncrustify result.

PROGRESS - --Running OvmfPkg: Uncrustify Coding Standard Test NO-TARGET --
WARNING - A file header template is not specified in the config file.
WARNING - A function header template is not specified in the config file.
ERROR - D:\a\1\s\OvmfPkg\Library\VmgExitLib\VmgExitVcHandler.c
ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET returned 1

I may be possible to provide more details on which lines had the differences, but the idea
was that the filename is enough because that is the input to the uncrustify tool.

Please make sure you are using the version of uncrustify installed by the stuart* tools
and the configuration file provided with the UncruustifyCheck pytool plugin.

Thanks,

Mike


From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Brijesh Singh via groups.io
Sent: Monday, December 13, 2021 7:27 PM
To: devel@edk2.groups.io; Yao, Jiewen <jiewen.yao@intel.com>; rebecca@nuviainc.com
Cc: James Bottomley <jejb@linux.ibm.com>; Xu, Min M <min.m.xu@intel.com>; Lendacky, Thomas <Thomas.Lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Aktas, Erdem <erdemaktas@google.com>; Roth, Michael <Michael.Roth@amd.com>; Gerd Hoffmann <kraxel@redhat.com>; Rebecca Cran <rebecca@bsdio.com>
Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning


[AMD Official Use Only]

I did ran uncrustify before submitting the patch. I am wondering if CI is reporting for some other issue in that file. I will look at it tomorrow.

-Brijesh

________________________________
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> on behalf of Rebecca Cran via groups.io <rebecca=nuviainc.com@groups.io<mailto:rebecca=nuviainc.com@groups.io>>
Sent: Monday, December 13, 2021 8:41 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; jiewen.yao@intel.com<mailto:jiewen.yao@intel.com> <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Singh, Brijesh <brijesh.singh@amd.com<mailto:brijesh.singh@amd.com>>
Cc: James Bottomley <jejb@linux.ibm.com<mailto:jejb@linux.ibm.com>>; Xu, Min M <min.m.xu@intel.com<mailto:min.m.xu@intel.com>>; Lendacky, Thomas <Thomas.Lendacky@amd.com<mailto:Thomas.Lendacky@amd.com>>; Justen, Jordan L <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>; Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Aktas, Erdem <erdemaktas@google.com<mailto:erdemaktas@google.com>>; Roth, Michael <Michael.Roth@amd.com<mailto:Michael.Roth@amd.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Rebecca Cran <rebecca@bsdio.com<mailto:rebecca@bsdio.com>>
Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning


The error is:

ERROR - /home/vsts/work/1/s/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET returned 1



From what I can see, there's no report of the actual error here, so you have to setup Uncrustify locally to see what changes it wants to make.

For instructions on setting up Uncrustify, see https://github.com/makubacki/tianocore.github.io/blob/add_uncrustify_instructions/EDK-II-Code-Formatting.md<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmakubacki%2Ftianocore.github.io%2Fblob%2Fadd_uncrustify_instructions%2FEDK-II-Code-Formatting.md&data=04%7C01%7Cbrijesh.singh%40amd.com%7C7ecf1a179d074ef3f37508d9beab5348%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637750465337231937%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Sl05dDDFzzZvpvzJp%2Bw5DWE81ocuy%2BYC4VfNxffyq5c%3D&reserved=0> .



Given the change, I expect the indentation of the equals sign is wrong.



--
Rebecca Cran

On 12/13/21 7:34 PM, Yao, Jiewen wrote:

Hey Brijesh



CI fails - https://github.com/tianocore/edk2/pull/2301<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F2301&data=04%7C01%7Cbrijesh.singh%40amd.com%7C7ecf1a179d074ef3f37508d9beab5348%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637750465337241935%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=914Gty%2BcMcmasiuDAUXdQr78gmU71%2FqL5mVcsbfrrSQ%3D&reserved=0>

Would you please take a look?



Please remember to submit patch after you run CI next time.



-----Original Message-----

From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io><mailto:devel@edk2.groups.io> On Behalf Of Yao, Jiewen

Sent: Tuesday, December 14, 2021 10:11 AM

To: Brijesh Singh <brijesh.singh@amd.com><mailto:brijesh.singh@amd.com>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>

Cc: James Bottomley <jejb@linux.ibm.com><mailto:jejb@linux.ibm.com>; Xu, Min M <min.m.xu@intel.com><mailto:min.m.xu@intel.com>;

Tom Lendacky <thomas.lendacky@amd.com><mailto:thomas.lendacky@amd.com>; Justen, Jordan L

<jordan.l.justen@intel.com><mailto:jordan.l.justen@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org><mailto:ardb+tianocore@kernel.org>;

Aktas, Erdem <erdemaktas@google.com><mailto:erdemaktas@google.com>; Michael Roth

<Michael.Roth@amd.com><mailto:Michael.Roth@amd.com>; Gerd Hoffmann <kraxel@redhat.com><mailto:kraxel@redhat.com>; Rebecca

Cran <rebecca@bsdio.com><mailto:rebecca@bsdio.com>

Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized

variable warning



Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com><mailto:Jiewen.yao@intel.com>



-----Original Message-----

From: Brijesh Singh <brijesh.singh@amd.com><mailto:brijesh.singh@amd.com>

Sent: Tuesday, December 14, 2021 3:39 AM

To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>

Cc: James Bottomley <jejb@linux.ibm.com><mailto:jejb@linux.ibm.com>; Xu, Min M

<min.m.xu@intel.com><mailto:min.m.xu@intel.com>;

Yao, Jiewen <jiewen.yao@intel.com><mailto:jiewen.yao@intel.com>; Tom Lendacky

<thomas.lendacky@amd.com><mailto:thomas.lendacky@amd.com>; Justen, Jordan L <jordan.l.justen@intel.com><mailto:jordan.l.justen@intel.com>;

Ard Biesheuvel <ardb+tianocore@kernel.org><mailto:ardb+tianocore@kernel.org>; Aktas, Erdem

<erdemaktas@google.com><mailto:erdemaktas@google.com>; Michael Roth <Michael.Roth@amd.com><mailto:Michael.Roth@amd.com>; Gerd

Hoffmann <kraxel@redhat.com><mailto:kraxel@redhat.com>; Brijesh Singh <brijesh.singh@amd.com><mailto:brijesh.singh@amd.com>;

Rebecca Cran <rebecca@bsdio.com><mailto:rebecca@bsdio.com>

Subject: [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning



The XCODE5 reported the below warning



OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized

use occurs here

           Compacted

           ^^^^^^^^^



Initialize the 'Compacted' variable to fix the warning.



Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID

values)

Cc: James Bottomley <jejb@linux.ibm.com><mailto:jejb@linux.ibm.com>

Cc: Min Xu <min.m.xu@intel.com><mailto:min.m.xu@intel.com>

Cc: Jiewen Yao <jiewen.yao@intel.com><mailto:jiewen.yao@intel.com>

Cc: Tom Lendacky <thomas.lendacky@amd.com><mailto:thomas.lendacky@amd.com>

Cc: Jordan Justen <jordan.l.justen@intel.com><mailto:jordan.l.justen@intel.com>

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org><mailto:ardb+tianocore@kernel.org>

Cc: Erdem Aktas <erdemaktas@google.com><mailto:erdemaktas@google.com>

Cc: Gerd Hoffmann <kraxel@redhat.com><mailto:kraxel@redhat.com>

Cc: Rebecca Cran <rebecca@bsdio.com><mailto:rebecca@bsdio.com>

Cc: Michael Roth <Michael.Roth@amd.com><mailto:Michael.Roth@amd.com>

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com><mailto:brijesh.singh@amd.com>

---

 OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +

 1 file changed, 1 insertion(+)



diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

index a40a31f7c275..ff367411cc59 100644

--- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

+++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c

@@ -1872,6 +1872,7 @@ GetCpuidFw (

     UINT32                 XSaveSize;



     XssMsr.Uint64 = 0;

+    Compacted = FALSE;

     if (EcxIn == 1) {

       /*

        * The PPR and APM aren't clear on what size should be encoded in

--

2.25.1












[-- Attachment #2: Type: text/html, Size: 58417 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning
  2021-12-13 19:38 [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning Brijesh Singh
                   ` (2 preceding siblings ...)
       [not found] ` <16C07D237B4BFD37.18377@groups.io>
@ 2022-01-30 18:23 ` Rebecca Cran
  3 siblings, 0 replies; 8+ messages in thread
From: Rebecca Cran @ 2022-01-30 18:23 UTC (permalink / raw)
  To: devel, brijesh.singh
  Cc: James Bottomley, Min Xu, Jiewen Yao, Tom Lendacky, Jordan Justen,
	Ard Biesheuvel, Erdem Aktas, Michael Roth, Gerd Hoffmann

I'm still seeing this error when building using XCode 13.2.1, so I guess 
this patch hasn't been committed yet.


--

Rebecca Cran


On 12/13/21 12:38 PM, Brijesh Singh via groups.io wrote:
> The XCODE5 reported the below warning
>
> OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:1895:12: note: uninitialized use occurs here
>             Compacted
>             ^^^^^^^^^
>
> Initialize the 'Compacted' variable to fix the warning.
>
> Fixes: d2b998fbdca4 (OvmfPkg/VmgExitLib: use SEV-SNP-validated CPUID values)
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Min Xu <min.m.xu@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Michael Roth <Michael.Roth@amd.com>
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
>   OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> index a40a31f7c275..ff367411cc59 100644
> --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c
> @@ -1872,6 +1872,7 @@ GetCpuidFw (
>       UINT32                 XSaveSize;
>   
>       XssMsr.Uint64 = 0;
> +    Compacted = FALSE;
>       if (EcxIn == 1) {
>         /*
>          * The PPR and APM aren't clear on what size should be encoded in

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-30 18:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-13 19:38 [PATCH 1/1] OvmfPkg/VmgExitLib: Fix uninitialized variable warning Brijesh Singh
2021-12-13 21:46 ` [edk2-devel] " Rebecca Cran
2021-12-14  2:10 ` Yao, Jiewen
     [not found] ` <16C07D237B4BFD37.18377@groups.io>
2021-12-14  2:34   ` [edk2-devel] " Yao, Jiewen
2021-12-14  2:41     ` Rebecca Cran
2021-12-14  3:27       ` Brijesh Singh
2021-12-14  6:37         ` Michael D Kinney
2022-01-30 18:23 ` Rebecca Cran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox