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

Re: [PATCH] x86/HVM: drop stale check from hvm_load_cpu_msrs()


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 30 Nov 2022 08:39:21 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=O/iYO3t+Q/vFu0QfApUI8gLnIPZc/JYavzXO2OLqJlY=; b=VzsEVg13pju5uFGw/U73enNg7uSSJad14boejVXAwHmqMKbw9wymXUM1f/wU1PUFX2FtJvYLhDrs+g8bUrOXr42TAfQ/QutgCWhtrR8Z1bj3yu7s+/YCBz60Mwn2ecajKOW/CXmav/2gp9SbRkliGIP3VHywOlErUPjC/xgdEH8RzKAe4Xisl4ASOySEZJ3zGhXdtOLrw3nEkP5LKU6mHYvReSu9OZmwadX+dyR/cwWVrisREmpyRMu/VgEcEoWxTmii5Sfb9vyNixnv4lw4B+d/ScS0pknFznXmzUndTYcP/CyRvMVOShw02bSot8kt2ARxGDllJpm1IPTMpz6cuA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bDgnuEn8WwwnKFMQjf7zNSX6ccaz6Z1PSP7j/WcUdwvFXRYHE/QO+W1S4dZwLYg2+lmpSSz6G3p2ARvcItIcGeEqZWRHpvGmyakJS+a4lWLcgaug5WDksKPT0235rsf4tnD6vfV2hx7JA+Em0xFizaenBnL9K6wUOXZBmrdMkc6FWI36OsZtgU8Om06qQuCDT/7JvASwxEWQkdfiUteauT+YajZj/SekMcOv7jWb+A6Mgs1tFNb8slF67PVEh1tfVWoCH4LDJ28XEnm+4IYG67DZcdKgd1gwijFkdl8mVuZb9pmxzasPeHRYf+VWlN6JFODMDUXsBHW1O8mII9VkMg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 30 Nov 2022 07:39:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.11.2022 21:36, Andrew Cooper wrote:
> On 29/11/2022 14:51, Jan Beulich wrote:
>> Up until f61685a66903 ("x86: remove defunct init/load/save_msr()
>> hvm_funcs") the check of the _rsvd field served as an error check for
>> the earlier hvm_funcs.save_msr() invocation. With that invocation gone
>> the check makes no sense anymore. While dropping it also merge the two
>> paths setting "err" to -ENXIO.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> ---
>> We could go further here, removing the local "err" variable altogether,
>> by using "return -ENXIO". Thoughts.
> 
> 'err' is a non-standard variable name, so yeah, why not.

Okay, I'll make a v2 for this.

> That said, the current code has a split loop checking the incoming _rsvd
> fields in a first pass, and then calling guest_wrmsr() on the second
> pass.  This was also made pointless by the identified changeset, so the
> two loops ought to be merged.

Not really, no - it would violate the "Checking finished" comment (but
of course we could also delete that one), but I'd also prefer to keep
checking for all errors we can check for early _before_ starting to
make any changes to the guest. Therefore if you really wanted that, I
guess you'd need to make a follow-on change yourself, with a convincing
justification (I wouldn't outright object to such a change, but I
probably also wouldn't ack it, leaving that to someone else).

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.