[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86emul: fix SYSENTER/SYSCALL switching into 64-bit mode
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Wed, 10 Feb 2021 20:26:04 +0000
- 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-SenderADCheck; bh=lP5KMHlh5fAjRnXf9xvgb7P9qjltwPFN2giLnMpQCbw=; b=DDrPS0DYHWeKQVBcJKZcKypJ2g/9xLhExpnfZHk4R18SClTxSRyUQxkDLu+5Saa/0AEfkrFGSBj3MoNChgcMeaVUfWE+CrWIlPI3aU94qjC4SFr+5IilP1Foy9LA1d+CQhjo6PBEHAZ/FIUdVJ06gTQFQ9iRZUSs2TNAiiy+gBI64Zqc7npcg18Hp30emjWlnVyygNbnZT36+9XsnxZjwqMcizf6cf9j1NWev+v3glZhhWiyADodu1crJ3Tjwr+Anm1U/79R0ci8kGnSxsLK4Pia03HSRvbxTf+jTpWQ6EADRHJWKj5LurYvydhRuBlcPa1rhBzy3Y2bJfKz+Q8ZyQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kq0/HGKT94QBvJ2iOKa79Q2jE/5bIjCx2mwd8LkXBCX8zGVEGIip9kz2JR3QkXgkA+3QHuMBuOSP1/MvfR3a2L1yH/TYYg+9mF6QqvED1PL4wWgG0g4grLHlP1qPCZ1YA5Pyg9251I7oJjIVSmcjLXp3HJ3WW2Wkl/jhHblmIsBLAJsyuK6oMzfFT2vqxC9JnMhvfOipUji2ZNXnC98g04dX/jaidnH6IfUPb9918ZcrDF9+2umvkfSi4KRxrh8nnAKajLRxzeKt6UvW2iB/SlHdpF+8FaWwmG1aGScp8YXm40STCirlzlP4aSgVVkxaCfsMaiu2IFwhDmIowAFDTw==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 10 Feb 2021 20:26:46 +0000
- Ironport-sdr: DBHDTUI4HcDm5gOJojwfNs+OMAz+pM3QPKtfn1JzQOLz1GRDq18rPAIDhf+G9psVj7oR6g2fSk rEYqhOgGRtQIIrD+vgxpfNl2d98/8owlIP0W5nGySjB9+lII8CcVsQuBRADQUctePrwtcWfx7e uhM6SpjFBaZvxfPUDkzJUjKWMgjoRucEtN4UR7ZKxBPzjbaQ6b6GNk2tX736pMO9uRsl74C+DO Q58u7/PzOmTkjRo6FY5KyH5rXsc5hwat46yUBTLwQIhGmRWCSxvmkujFAy6zfUCvJTtRHLDhO2 0j0=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 10/02/2021 14:18, Jan Beulich wrote:
> On 10.02.2021 15:02, Andrew Cooper wrote:
>> On 10/02/2021 13:54, Jan Beulich wrote:
>>> Just like considered in the post-description
>>> remark, we could drop the conditional part from sysexit's
>>> setting of _regs.r(ip), and _then_ we would indeed need a
>>> respective change there, for the truncation to happen at
>>> complete_insn:.
>> I think it would look odd changing just rip and not rsp truncation.
> Yes, this was another consideration of mine as well. But it
> is a fact that we treat rip and rsp differently in this
> regard. Perhaps generated code overall could benefit from
> treating rsp more like rip, but this would need careful
> looking at all the involved pieces - especially in cases
> where the updated stack pointer gets further used we may
> not be able to defer the truncation to complete_insn:.
There are other differences. rip gets updated on every instruction,
while rsp does not. We also have instructions with (possibly multiple)
rsp-relative memory references which need truncating individually to get
proper behaviour.
~Andrew
|