[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/3] x86: Delete str()
- To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Fri, 28 Jul 2023 20:43:20 +0100
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- Delivery-date: Fri, 28 Jul 2023 19:43:46 +0000
- Ironport-data: A9a23:s5516agEfkzsM1wTmoZzsMNaX161WxAKZh0ujC45NGQN5FlHY01je htvCD+OOPrcMWqmf4txbYW2p00EvZWBz9AyHVA5+H1nECsb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyr0N8klgZmP6sT4wWOzyN94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQ0bw5cUg7cwNiN0eu2Q/hKovsYBtD0adZ3VnFIlVk1DN4jSJHHBa7L+cVZzHE7gcUm8fT2P pRDL2A1NVKZPkMJYw1MYH49tL7Aan3XWjtUsl+K44Ew5HDe1ldZ27nxKtvFPNeNQK25m27B/ DqaozWjWUly2Nq34iKfqHaGn8n0nS7rY441SIG2//00uQjGroAUIEJPDgbqyRWjsWauVtQaJ 0EK9y4Gqakp6FftXtT7Rwe/onOPolgbQdU4O88Q5RyJy6HUyx2EHWVCRTlEAPQ5sOcmSDps0 UWG9/vzAjZiqqGSD3iU+bGdtzqaMzUaNmIEamkPSg5ty9/iq4Y3h1TRQ8p5Eai0ptfoFir9x T/Mpy8774j/luZSif/9pwqexWvx+N6QFFVdChjrsnyNwkRHNbK7OMuS0kmC4P9RCqKmdXOYo y1R8ySB19ziHa1hhQTUHrRVQe/3uajVWNHPqQUxRsd8rlxB71bmJNkNu28meS+FJ+5eIVfUj FnvVRS9DXO5FF+jdudJbo24EKzGJoCwRI2+Bpg4gjejC6WdlTNrHwk0PyZ8J0i3zCARfVgXY P93i/qEA3cAErhAxzGrXeob2rJD7nlglDuOG8Gjn0/8ieT2iJuppVEtagDmggcRtfPsneko2 4wHa5viJ+t3DoUSnRU7AaZMdAtXfBDX9Lj9qtBNd/7rH+aVMDhJNhMl+pt4I9YNt/0Mxo/1E oSVBhcwJKzX2SeWdm1nqxlLNNvSYHqIhStqZnV1bQ74gShLjETGxP53SqbbtIIPrIRLpcOYh dFfEylcKpyjkgj6xgk=
- Ironport-hdrordr: A9a23:0wM8Ta4KFJONwqjd3QPXwY2BI+orL9Y04lQ7vn2ZKCYlB/Bw8v rE8sjzuiWVtN9vYgBdpTntAsi9qBDnhO1ICPcqTNWftWDd0QPDEGgI1/qA/9SPIVyaygZXvZ 0QDJSXYLfLYWST5qzBjzVR3LwbreWvweSQoaP78l8odAdtbshbnnVE4sTwKDwJeOGDb6BJZK Z1I6B81kudkA8sH6CGL0hAZfHHu9rI0Lr+eHc9dmcawTjLtyqs9Ln5VzOF3hISOgk/vIsKwC z+ignk4afmlPm+xnbnpgjuxqUTosLl1txAQOqTjcQPQw+c7DqAVcBaQrifuzJwmsGDgWxa6O XkklMbJsFu7HGURG2vvhf3/AHl3F8VmgTf4G7du2Lnvcv6AA03ENBAg4UxSGqi13Yd
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
This is used in an assertion only, which is somewhat dubious to begin with and
won't surivive the x86-S work (where TR will become be a NUL selector).
Delete it now. This avoids many cases where as a global symbol, it shadows
local string variables.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>
CC: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
---
xen/arch/x86/hvm/svm/svm.c | 2 --
xen/arch/x86/include/asm/desc.h | 9 ---------
2 files changed, 11 deletions(-)
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 56cb2f61bb75..4d29ad3bc36a 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1614,8 +1614,6 @@ static int _svm_cpu_up(bool bsp)
/* Initialize OSVW bits to be used by guests */
svm_host_osvw_init();
- /* Minimal checking that enough CPU setup was done by now. */
- ASSERT(str() == TSS_SELECTOR);
svm_vmsave_pa(per_cpu(host_vmcb, cpu));
return 0;
diff --git a/xen/arch/x86/include/asm/desc.h b/xen/arch/x86/include/asm/desc.h
index 225a864c483e..a1e0807d97ed 100644
--- a/xen/arch/x86/include/asm/desc.h
+++ b/xen/arch/x86/include/asm/desc.h
@@ -238,15 +238,6 @@ static inline void ltr(unsigned int sel)
__asm__ __volatile__ ( "ltr %w0" :: "rm" (sel) : "memory" );
}
-static inline unsigned int str(void)
-{
- unsigned int sel;
-
- __asm__ ( "str %0" : "=r" (sel) );
-
- return sel;
-}
-
#endif /* !__ASSEMBLY__ */
#endif /* __ARCH_DESC_H */
--
2.30.2
|