[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] x86/msr: Split MSR_SPEC_CTRL handling
- To: Andrew Cooper <amc96@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 17 Jan 2022 12:54:54 +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=uWxoo2cH0Hp918njVehIXs7oY7R6eWjY8pcibjeLxVY=; b=CZ2Wha5g/oFfaOciQpyhUxxb4nsI2Pdd/zaI3LtQo5VCychfnidZLy/k96rtwLYfUbPNh2S3QcXJWiDfnHQR+BP0/C29/qVGFdhWYxRSLazqb4oV17kMfiEZ1bQrVz4rKc8fOXb+wnaA94nTx2VvOYcHT2UscZgzHiMXRSU4vGOyn8H82HT6BVFle8GA2fny0axTuSoXKxxg6d3++b1qXApKFK+DaA63hSupS9WrEa4uk1zz+cZ+LYbv2d2R1aRuK72F8XJiwBHgxNX5OXGvLWsTv1vR4cHdB1+CGM8racBqVfv9kZZ+do7Hed6Ce57zXFeDE/horenKPVp9KeQDkg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hDhcGG+zVE1urjdJ6YoCClkbGf58EICEsaFIR3oGXd2hzJwnezD/TZnZI8ZA3l4bDwQsqxI7anVgj3UiWJUSww4HlFOGjwXUzgo6UddyTJNeCI3HiaUjIebyPefTOgc04UOM5DD5yu7lapfxuHlM1ipZCjwjpvr82P0vz9jnMdz/djKl4a7jSQY2KNT/Z1iDuTsAmFihPQQosrw0F/L5SZl+CAYV6QaIb1PTuyz7jN+GaP01S120RrgSPh+3YVKDCT6zqcCGXX09N3hWFgOTQ2FjuH18+e2EOWSjaFKabm2sigJmDh3AGqOggvRtcFGi6j8eFcdAZLfbN3RZE063FA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 17 Jan 2022 11:55:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 17.01.2022 12:24, Andrew Cooper wrote:
> On 17/01/2022 11:07, Jan Beulich wrote:
>> On 13.01.2022 17:38, Andrew Cooper wrote:
>>> In order to fix a VT-x bug, and support MSR_SPEC_CTRL on AMD, there will
>>> need
>>> to be three different access methods for where the guest's value lives.
>>> However, it would be better not to duplicate the #GP checking logic.
>>>
>>> guest_{rd,wr}msr() are always called first in the PV and HVM MSR paths, so
>>> we
>>> can repurpose X86EMUL_UNHANDLEABLE slightly for this. This is going to be a
>>> common pattern for other MSRs too in the future.
>> I consider this repurposing risky. Did you consider using e.g.
>> X86EMUL_DONE or X86EMUL_RETRY instead? Neither of the two is
>> presently used by the MSR machinery afaics.
>
> RETRY is used for the MSRs which can cause a p2m allocation and hit the
> paging path. DONE is not remotely appropriate for this purpose.
Well, okay then. I would have said DONE is as (in)appropriate as
UNHANDLEABLE here.
Jan
|