qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v4 13/36] i386/tdx: Validate TD attributes


From: Xiaoyao Li
Subject: Re: [RFC PATCH v4 13/36] i386/tdx: Validate TD attributes
Date: Tue, 24 May 2022 16:11:56 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.9.0

On 5/24/2022 2:59 PM, Gerd Hoffmann wrote:
On Tue, May 24, 2022 at 12:19:51PM +0800, Xiaoyao Li wrote:
On 5/23/2022 5:39 PM, Gerd Hoffmann wrote:
So, how is this supposed to work?  Patch #2 introduces attributes as
user-settable property.  So do users have to manually figure and pass
the correct value, so the check passes?  Specifically the fixed1 check?

I think 'attributes' should not be user-settable in the first place.
Each feature-bit which is actually user-settable (and not already
covered by another option like pmu) should be a separate attribute for
tdx-object.  Then the tdx code can create attributes from hardware
capabilities and user settings.

In patch #2, tdx-guest.attributes is defined as a field to hold a 64 bits
value of attributes but it doesn't provide any getter/setter for it. So it's
*not* user-settable.

Ok.  Why it is declared as object property in the first place then?

Is there another way to define a member/field of object besides property?

take care,
   Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]