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

Re: [PATCH] x86/svm: Provide EXITINFO decodes for MOV CR/DR intercepts


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 6 Apr 2023 11:59:20 +0200
  • 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=g5SbSAc4iG86323+6XSRQQY0CLJ/fvoZzH2h7YjVi1I=; b=Z+7PiX+QUjf+kxPWOVWOgdwhN5384o8xHWKu0S2bWCvO2Unf/XdSvdX/cjeHMZ7LR/1SuU91SHzI0XZFRxHBdkfGPCYodr77hUjq94hhWd8/wnA4lTeF9KN3t3UDOj/GGNnByha4pkCH3T6djvPfRmwwBtnQZJln8n2NY8FTEibZ3UKXRtLwxkDYFNzJ0U5jF/hMAUysvzo2qrJYMVTdLkWEuG4I0l9JlQ4Y5+jnwSpCXx87CL+84I32pJ8ASRAnfJdJRw57RU6MW/3EABaCXEKLBtmsUXNB+I5HE8W4335NyYHOPesZEfQVOt8F/5paQ1td9haKqL8m3u2YwPNsuw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NsuT9/OJ8GPjepXuRPCmPvTPmbs7xk68/ESIer9nl2tqQjMpJ2daWbDz7z5ODaIG5ZPfT64vwsWTvvkRs04xCAfinUDCfPEMBtDxMgFJYCRFpHEViW81Cng85Dt+kOSBpOAo5oYstxvEN4N+t2YpFj+6w3X0UxkE2Amjhxj0egHVZOPZ6KVgqwmkNTTAVH1sddwa8HecFLctoJRhuxAC8eiq+mb4JExosBEDblu0m3yoxW73UqtP6ce8XzXfCM0WtBBoESGkjUpyQ4t/7PggEiFTso5SOZDhRKLZqOui2mZCIu6VcFM0iWZLMtrl2M/LZX+r8skYlmWd0dyvqWpWYQ==
  • 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: Thu, 06 Apr 2023 09:59:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06.04.2023 11:52, Andrew Cooper wrote:
> On 06/04/2023 10:31 am, Jan Beulich wrote:
>> On 05.04.2023 22:44, Andrew Cooper wrote:
>>> --- a/xen/arch/x86/include/asm/hvm/svm/vmcb.h
>>> +++ b/xen/arch/x86/include/asm/hvm/svm/vmcb.h
>>> @@ -450,6 +450,11 @@ struct vmcb_struct {
>>>  
>>>                  uint64_t nrip;
>>>              } io;
>>> +            struct {
>>> +                uint64_t gpr:4;
>>> +                uint64_t :59;
>>> +                bool     mov_insn:1; /* MOV, as opposed to LMSW, CLTS, etc 
>>> */
>>> +            } mov;
>> The field being named just "mov" makes it apparently applicable to DRn
>> moves, too (and the title supports this), yet the top bit doesn't have
>> this meaning there. So perhaps say "MOV-CR" (or alike) in the comment?
> 
> Hmm - I'd not spotted that distinction.
> 
> Xen never decodes the exitinfo for a DR access - we just resync dr
> state, drop the intercept and reenter the guest.
> 
> Therefore I think it would be better to rename "mov" to "mov_cr" so you
> can't use the mov_insn field in a context that plausibly looks like a dr
> access.
> 
> Thoughts?

That was my other thought; it merely seemed to me that updating the comment
would allow future (if ever) use with MOV-DR. So yes, if you prefer going
that route: Fine with me.

Jan



 


Rackspace

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