[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 9/9] RFC: Everything else
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 30 Mar 2023 13:01:12 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pgt+4zNGwgPcQx4D49bppNj7A3bwzLoJnmF/d35Os+w=; b=Yn/82k5o5pdLyhbMXTKfCCRDPYw4k2aEu35/AuVRVkFFU/Tj2L2/h+wge4qIR2m0qYYPrRjWyipf2vJZDyDk96zI1aAeqfsFoT0WCJqjQDYRZtCK7HvEjKaRqwWYc3xjx7NTZ1c3q/mESadWdhaNxO6A08MvZKMD3MId/LiJRIXQDjsNwwdxM0NZAbbJdxbhPELj3m9iCK2d+YZ9uks+28QSAEEf0nSIlSffcPnxJKOtCZOUsObfJE03LgPu57U1JivKeB1uJ3iL+eewpQvpx6DZuvIxxCKk3ae9iTr7NqqSlwzowL8VmYeKdFeVqQ8l+KiKAGkajrPuu9r7ilgHXA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gud/r0MFXyam+aK7eA2cDDNCfhj8mtNSE7nXM+Wz+lpnYZUtr59b/jbjJUujDTNPguaAHnOljWqdW73tGxxCtyks07DmVhtPnfZ8W3S7BqGUUEAhgpnsEfKi/JeMgylX8VqNSAM9y6Ccyh4a6DW1xH4KsiKgxn73D8sTkZm+Tg0D6auM973sLme4wenGDxcM/41LNXi+GNKq789vkPw5HcaOJKzvaixps1TebaeK+mP9BoYoJNWDuQKtpoXdPkkpMHBdwECslegeDKnaUGkrOTGwJxjgvkAzsLOwLAzm4KJLOrfsM1JZ+7M6nMlL93ExOluQble8LZaAE0JYzDn+sg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 30 Mar 2023 12:01:40 +0000
- Ironport-data: A9a23:I0lE16v4omuJ2IH1WA1ohHuOGufnVHtfMUV32f8akzHdYApBsoF/q tZmKT2FMv2MNDP3LdglOo608R5QvpOGytA1GQI5/ChkEigW+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiffHg3HVQ+IMsYoUoLs/YjhYJ1isSODQqIu Nfjy+XSI1bg0DNvWo4uw/vrRChH4bKj6Fv0gnRkPaoQ5ASFzyFMZH4iDfrZw0XQE9E88tGSH 44v/JnhlkvF8hEkDM+Sk7qTWiXmlZaLYGBiIlIPM0STqkAqSh4ai87XB9JFAatjsB2bnsgZ9 Tl4ncfYpTHFnEH7sL91vxFwS0mSNEDdkVPNCSDXXce7lyUqf5ZwqhnH4Y5f0YAwo45K7W9yG fMwMgpRUBui27iMm6+dbvh0n98mHdTrFdZK0p1g5Wmx4fcOZ7nmGv+Pz/kImTA6i4ZJAOrUY NcfZXx3dhPcbhZTO1ARTpUjgOOvgXq5eDpdwL6XjfNvvy6Pk0osjf60b4a9lt+iHK25mm6xo G7c8nu/KRYdLNGFkhKO8262h/+JliT+MG4XPOTgqKY60QzOmwT/DjUOElS2oMKUg3KOePlvN xA3+goh8LgtoRnDot7VGkfQTGS/lhwWVsdUEuY6wBqQ0aeS6AGcbkAbShZRZdpgs9U5LRQ62 1nMk973CDhHtLyOVWnb5rqStSm1OyUeMSkFfyBscOcey9zqoYV2hBSfSN9mSfSxloesRm22x C2Wpi8jgblVldQMy6iw4VHAhXSru4TNSQk2oA7QWwpJ8z9EWWJsXKTwgXCz0BqKBNbxooWp1 JTcp/Wj0Q==
- Ironport-hdrordr: A9a23:jV+eA6qom1Yej/ukE/UeLAEaV5o8eYIsimQD101hICG9E/bo9P xG+c5xvyMc5wxhOk3I5urwXZVoLUmwyXcX2+ks1NWZMjUO0VHARL2Ki7GP/9SKIUzDH4Bmup uIepIObOHNMQ==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 30/03/2023 11:16 am, Jan Beulich wrote:
> On 29.03.2023 22:51, Andrew Cooper wrote:
>> Looking at this diff, I'm wondering whether keeping
>>
>> union {
>> struct cpu_policy *cpuid;
>> struct cpu_policy *cpu_policy;
>> };
>>
>> permentantly might be a good idea, because d->arch.cpuid->$X reads rather
>> better than d->arch.cpu_policy->$X
>>
>> Thoughts?
> I'm not overly fussed, but perhaps yes.
If we were to do this, we ought to keep d->arch.msr too for the same reason.
(Honestly - I'm still undecided on whether this is a good idea or not...)
> Nevertheless e.g. ...
>
>> --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c
>> +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c
>> @@ -893,7 +893,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t
>> size)
>> struct x86_emulate_ctxt ctxt = {
>> .data = &state,
>> .regs = &input.regs,
>> - .cpuid = &cp,
>> + .cpu_policy = &cp,
> ... this and ...
>
>> --- a/tools/tests/x86_emulator/test_x86_emulator.c
>> +++ b/tools/tests/x86_emulator/test_x86_emulator.c
>> @@ -909,7 +909,7 @@ int main(int argc, char **argv)
>>
>> ctxt.regs = ®s;
>> ctxt.force_writeback = 0;
>> - ctxt.cpuid = &cp;
>> + ctxt.cpu_policy = &cp;
> ... this imo want keeping as you have it here.
Ok, so that's a firm "switch to using cpu_policy for emul_ctxt" then.
Which is fine - in fact it's one I'd already started splitting out of
this patch.
~Andrew
|