[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v10 03/38] x86/msr: Add the WRMSRNS instruction support
- To: "Li, Xin3" <xin3.li@xxxxxxxxx>, Nikolay Borisov <nik.borisov@xxxxxxxx>, "linux-doc@xxxxxxxxxxxxxxx" <linux-doc@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-edac@xxxxxxxxxxxxxxx" <linux-edac@xxxxxxxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Li, Xin3" <xin3.li@xxxxxxxxx>
- Date: Fri, 22 Sep 2023 08:16:33 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.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=EQvJLeXzZr7g3gTBMq6MexQopd1VQr21aioxU5Il9bw=; b=RYBHEdROst8Adp2LMw3YrvkQyqIpsHul5Ws2AGCA52ndeofNQIuleYktVm8oBgme2IkGFHLnmTqpOBt+qLVoImgd++wwxHanKYEcYuskPZcnFbq2lJzJWZ2Mp7CK+8B1LfsTyplcRR9EOdNqHMdy1QndZjtLpljB385lwSS/UVH9B50ARTliHZM7g71TVvrqtlkjgM0mEm5Qs1z5sgEdIR/rR5aL8jWcmPOy2wTRnvi11SU3Zi/Y1TjgJHhQuOCQrnhyGg+7msRmpWCe6iJe1YqoE7usyL+wptztJ7SqEL8lvYd8Pp1MLRh+JKLfDSpR4HOHxjxjzXbccLOco1OjkA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CEXu+PWgHbkIxu1yI9iKS3QnpuVMRZTczQaOPLRZXjrNYUh+vzUGQNuNC7miXGBUXv2W5h9PpZC3dG28TL+JbDlJ5h0DMNAgE8D6ulf008b8omZCOWDsdejCdbWOTWa+uaNcj3cA0yWAi5FDFnQgC2uMDivzQG0Ov7PvFBoyi2H2FhDBaJq4GblcnycbblWRAyRvVLepKcmowg521z7ibmERdwruVN7pGZ36tTv7OW408vdRdC+pSnomlef/B0fPwIhVxPi8zQL7GMxjZW28ZBKS2ymG3perayuKCl8rjQoEAfC8aylFOtR7ltsY4soFfcPFpgkSjFoV9cYasFei2A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
- Cc: "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx>, "Lutomirski, Andy" <luto@xxxxxxxxxx>, "pbonzini@xxxxxxxxxx" <pbonzini@xxxxxxxxxx>, "Christopherson,, Sean" <seanjc@xxxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, "Gross, Jurgen" <jgross@xxxxxxxx>, "Shankar, Ravi V" <ravi.v.shankar@xxxxxxxxx>, "mhiramat@xxxxxxxxxx" <mhiramat@xxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "jiangshanlai@xxxxxxxxx" <jiangshanlai@xxxxxxxxx>
- Delivery-date: Fri, 22 Sep 2023 08:17:08 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZ5ssSXb894LHEBkqZUWtDh9samLAjYtKAgAADDuCAAyUhEA==
- Thread-topic: [PATCH v10 03/38] x86/msr: Add the WRMSRNS instruction support
> > > +static __always_inline void __wrmsrns(u32 msr, u32 low, u32 high)
> >
> > Shouldn't this be named wrmsrns_safe since it has exception handling,
> > similar
> to
> > the current wrmsrl_safe.
> >
>
> Both safe and unsafe versions have exception handling, while the safe
> version returns an integer to its caller to indicate an exception did
> happen or not.
I notice there are several call sites using the safe version w/o
checking the return value, should the unsafe version be a better
choice in such cases?
|