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

Re: [PATCH v4] x86/HVM: support emulated UMIP


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 20 Mar 2023 08:45:45 +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=XXJIjDbR5xUJjs00RqVQVcWmI5CGmxY/bzTrxSuk4OU=; b=I0UNO4ql84pmXTPiERs413Uyjd4jHfbjOAlGT2g7cU/CWg+kxztHWhTf1Q/P4xApXok9hqINCIwFGjaRPkeQfpT/LBFwG0ui2PeT06Lxwnk0B6K7xZx9FF7wbV60KRRKtkN6ppqYpZFgTDcLM0UJ3lJ7vYYB4njQtam2v6Rj48Bt7NXrcoAdo1HVwPazVffGMMJg+26hNerfRBi1DsvRg0uSkBZWHleje0WjMRCpd5iRjHNZk5BvbQ6tc4nBv+B15NdQC3ry9yoM/Xq4TTlGFHWKKpWzwwAepWmZnjW/JQ3b0NvCOxGxVSDS5YPhkVMdhAj9xA71bQ9acxwXCaEtWQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kSz/PFn3BGMjTkXDrLHqJ8wmdB6KxsQ+VW8XFnVOOmiTreFSL4tQW9YR2vZ1GmJr64Ijxk01vsnmbHJMRi6f5Rw/mwPgmQHcH0Pxb2ugY7fXXQ6n1wIMLtpPgsCndycAMnuNNwxUltFLlkkcl9fgzlX2N6pazdHNYC/5StgK29L0voZciqr5I7mqGEPfrdU+7/bOA/Gp7ATKg1R0vdZTsqs3VSihnrkpJ2RWN7zmKgTcdbN7EnJ9NxCRqYHWRYyb8CXUh6SDwsK3FFfBk1Q1YwxH+ZGChkiYf8z3sIE6GXoWq1QFnmU3YLUmrsWsQga5/4cR9fHdGIKZ3MW1paFTJA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>
  • Delivery-date: Mon, 20 Mar 2023 07:46:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.03.2023 17:09, Roger Pau Monné wrote:
> On Fri, Mar 17, 2023 at 04:01:59PM +0100, Jan Beulich wrote:
>> On 17.03.2023 15:29, Roger Pau Monné wrote:
>>> On Thu, Apr 15, 2021 at 11:47:42AM +0200, Jan Beulich wrote:
>>>> There are three noteworthy drawbacks:
>>>> 1) The intercepts we need to enable here are CPL-independent, i.e. we
>>>>    now have to emulate certain instructions for ring 0.
>>>> 2) On VMX there's no intercept for SMSW, so the emulation isn't really
>>>>    complete there.
>>>
>>> Then I'm afraid we can't set the bit in the max CPUID policy.  What
>>> about domains being migrated from a host that has UMIP to an Intel
>>> host where UMIP is emulated?  They would see a change in behavior in
>>> SMSW, and the behavior won't match the ISA anymore.
>>
>> Right, but that's the price to pay if we want such emulation (which back
>> at the time did look at least desirable, because the other affected insns
>> are more important to deal with). Not setting the bit in the max policy
>> is as good as not having emulation on VMX at all then.
> 
> It would need some kind of justification at least on why it's deemed
> worth exposing in the max policy (and thus made available to incoming
> guests) even when not compliant to the specification.
> 
> Could the non-intercaption of CR0 reads and thus no #GP on SMSW on
> Intel lead to software malfunctioning as a result?

One can't exclude it of course, but I don't view this as very likely.

But as said in reply to Andrew - I guess I'll simply drop this patch
then (which also eliminates your request for further justification,
which I have to admit I don't really follow).

Jan



 


Rackspace

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