[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 6 Apr 2023 12:11:05 +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=xQYGpsCo7B1mDdak5WQS3B5OG7n7X0XtcLMqpUqH6mM=; b=IXUG2dtEzk9e3WNEmqcfENSfCI77cb6tSAHs2EL5eXUC5HjgK66SSA4qNHVHHFhK3OYkjm+FqaTVGyBJo1ZiNokRaVXfYQJHzSgYiE+dfhXsAUIVoLie+LLgZWaNmfQKhXUTxXZbyXb4yIVUo+runGoHmLwYZnid5DtUwxHe6n1Gzd2LingC4Hc5TQCUvj6qDpaMipZjUk/5xOuY5v4Ar2rmt1hJH2YYNyBQ+T+taLTP9X9Sl4Hlr66bRA9RBGJ+C4TctF87wjqQp+6iYn6QSBS0brwFvNPI9ya04VHF+IPHxixMlaQ/aCrwfdq/q+hLMMjV82cYkRpyk0VMhtfmnw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jDpSdODRKyZeIayjbLGbOl2YxFR+Can9uLFAnM8ovDpjuknCuICkjiVKv+/vnCbxMfjSeblEHi36T4sZISu31DAXGuXkBrmL6pkQgToNV4QZcxHduO0/WSVPQNUqd/8fNIJSZ9aSdedTiJRnUDZOc6msmrcwY3SeoTj7ZD+PYc+YSy6e6WMVK0d4ivoC7vWr3RwdByA6cvrzlxb74CGyWW+drWIsqNh8L1qpFj3Vy4z6f9D2OT973ftamxJqx7El17fv8+UGcjNYB12puaJjpAzVteNjRJN3ffiur+dFmE7WKTvy9zLVQCXWQONXxRHTJxAzKkBuTZTYy3/qxPVVXg==
  • 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, 06 Apr 2023 11:11:35 +0000
  • Ironport-data: A9a23:xCpjjq15o/4hWcSlqfbD5fFwkn2cJEfYwER7XKvMYLTBsI5bpzwPn TMWUWCPMv/eamr2e9xwbNjno0JQucXRy4VmHVRspC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK6ULWeUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8tuTS+HuDgNyo4GlD5gBmO6gS1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfOUFkp NE9Dnc0SlOEueWQmJ2Zdtldr5F2RCXrFNt3VnBI6xj8VKxjZK+ZBqLA6JlfwSs6gd1IEbDGf c0FZDFzbRPGJRpSJlMQD5F4l+Ct7pX9W2QA9BTJ+uxpvS6PlWSd05C0WDbRUvWMSd9YgQCzo WXe8n6iKhobKMae2XyO9XfEaurnxHunBNxKTezhnhJsqFiJ3GJDLT5GbAuEneC0rROBSd9iE VNBr0LCqoB3riRHVOLVXRe1vXqFtR40QMdLHqsx7wTl4rXQyxaUAC4DVDEpQMwrsoo6SCIn0 neNnsj1Hnp/vbuNU3Wf+7yI6zSoNkAowXQqYCYFSU4A/IPlqYRq1BbXFI4/Seiyk8H/Hiz2z 3aSti8iir4PjMkNkaKm4VTAhDHqrZ/MJuIo2jjqsquexlsRTOaYi0aAszA3Md4owF6lc2S8
  • Ironport-hdrordr: A9a23:R4phR6lC+bGxeq8A23G/hkkMlNLpDfLz3DAbv31ZSRFFG/Fw9v re+sjzsCWftN9/YgBCpTntAtjjfZq+z+8T3WByB9eftWDd0QPCQe0Mg+rfKlbbaknDH4BmpM JdWpk7Mcb3C1dii8b8/U2XL/YMqeP3iZyAtKPm1HFqQhhta6Z8qyFDKijePHFXaWB9dOIE/L z13Ls8m9NlQwVtUviG
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06/04/2023 10:59 am, Jan Beulich wrote:
> 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.

Will do.  I don't foresee us ever needing to inspect the dr decode
information.

~Andrew



 


Rackspace

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