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

Re: [PATCH] x86/svm: Provide EXITINFO decodes for Exceptions/NPT intercepts


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 6 Apr 2023 16:28:43 +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=VTFReQIaRtGB9vNQPjk8BpE+DVD5nFEnKxcMO3XVxCs=; b=i1gdlzc4dD5l57hRl4NBR+6KR2B5Kevn2va713rycesXIsTn7jpHLFl0MNc4w7e7GOZHVdQHe2lBlkhafS9Gw6neYPERdxChPaDF/HAbXvTaKz9ihXPTY3Ooa1ZLn9AhwKdMASNrCIhE7kSeZyqsvtpzZAuNzcPB2btMq32NUow4KF0vXDjU9RRLVs4nW8y4CHCAG5iJQMhEbD+lO0efkpb0n/WhcwHLrOcU7jhgkWIvRss1RGnJhltYF8yDSAyzMYDgRhPso5iCrH0FmirlmnrN+LLIjCnExV8Z5N79SSc0wzNhj2ABRh9uypQV0hcklbBWuG2lXVEnUDudkU3efg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d9tlqmYMa4a+dzcHIM/YNWEvRKX1eO6UviwX7D7S/mSeqNwBHGQIBc9TVNLjnilBeqvVTeQmzY3BTRfmzKnBAYiJm5x0jgqnv1+BGi7LBll58f6XL5+z2MXCtcvrq81TBakAkhVwddhn4vwvpBSbJn7D2Zh4yNLF24YvxV390UCc2FJGXtEw5In/F6oIBpsxajZ75Gp+yi9HloH8+k4T/wU4/HLENwZXSi/pSDhngSIl53CtV+lL/gOtF5P9MAalxqdVp8KpFR/rWTAakl/0iQ9hfIxQraWn68vNy9+HreUKqYNvVNCfYeR6ThSxomFLRQkKhslddZxzvusjcxqXEA==
  • 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 14:28:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06.04.2023 15:27, Andrew Cooper wrote:
> Exceptions and NPT intercepts almost have the same layout, but NPT has bits
> above 31 in the error code, and the name for exitinfo2 really does want
> distinguishing between cr2 and gpa.
> 
> In nsvm_vcpu_vmexit_inject() rearrange VMEXIT_NPF to fall through instead of
> repeating the exitinfo1 write.  Use the fallthrough pseudo keyword instead of
> a comment.
> 
> In VMEXIT_NPF, as we're editing the printk() anyway, switch to using the newer
> domain_crash() form.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

with one remark / suggestion:

> @@ -455,6 +461,10 @@ struct vmcb_struct {
>                  uint64_t :59;
>                  bool     mov_insn:1; /* MOV, as opposed to LMSW, CLTS, etc */
>              } mov_cr;
> +            struct {
> +                uint64_t ec;
> +                uint64_t gpa;
> +            } npt;

Maybe better "npf" than "npt", as it's describing the exit/fault?

Jan



 


Rackspace

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