[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92b86a71-3bbb-40a7-ae45-ab32215cce90@redhat.com>
Date: Tue, 10 Sep 2024 12:48:44 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"seanjc@...gle.com" <seanjc@...gle.com>
Cc: "Zhao, Yan Y" <yan.y.zhao@...el.com>,
"nik.borisov@...e.com" <nik.borisov@...e.com>,
"dmatlack@...gle.com" <dmatlack@...gle.com>, "Huang, Kai"
<kai.huang@...el.com>, "isaku.yamahata@...il.com"
<isaku.yamahata@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 06/21] KVM: TDX: Add accessors VMX VMCS helpers
On 9/9/24 23:29, Edgecombe, Rick P wrote:
>> Maybe a bit large when inlined? Maybe
>>
>> if (unlikely(err))
>> tdh_vp_wr_failed(tdx, field, bit, err);
>>
>> and add tdh_vp_wr_failed to tdx.c.
> There is a tiny bit of difference between the messages:
> pr_err("TDH_VP_WR["#uclass".0x%x] = 0x%llx failed: 0x%llx\n", ...
> pr_err("TDH_VP_WR["#uclass".0x%x] |= 0x%llx failed: 0x%llx\n", ...
> pr_err("TDH_VP_WR["#uclass".0x%x] &= ~0x%llx failed: 0x%llx\n", ...
>
> We can parameterize that part of the message, but it gets a bit tortured. Or
> just lose that bit of detail. We can take a look. Thanks.
Yes, you can:
1) have three different functions for the failure
2) leave out the value part
3) pass the mask as well to tdh_vp_wr_failed() and use it to deduce the
=/|=/&= part, like
if (!~mask)
op = "=";
else if (!value)
op = "&= ~", value = mask;
else if (value == mask)
op = "|=";
else
op = "??, value = ";
Paolo
Powered by blists - more mailing lists