Re: [PATCH v2] target/i386: Fix physical address truncation

2023-12-22 Thread Paolo Bonzini
On Fri, Dec 22, 2023 at 5:16 PM Paolo Bonzini wrote: > > On Fri, Dec 22, 2023 at 10:04 AM Paolo Bonzini wrote: > > > If the extension is not needed, then the a20 mask isn't either. > > > > I think it is. The extension is not needed because the masking is > > applied by either TCG (e.g. in

Re: [PATCH v2] target/i386: Fix physical address truncation

2023-12-22 Thread Paolo Bonzini
On Fri, Dec 22, 2023 at 10:04 AM Paolo Bonzini wrote: > > If the extension is not needed, then the a20 mask isn't either. > > I think it is. The extension is not needed because the masking is > applied by either TCG (e.g. in gen_lea_v_seg_dest or gen_add_A0_im) or > mmu_translate(); but the a20

Re: [PATCH v2] target/i386: Fix physical address truncation

2023-12-22 Thread Paolo Bonzini
On Thu, Dec 21, 2023 at 10:33 PM Richard Henderson wrote: > > On 12/22/23 02:49, Michael Brown wrote: > > The address translation logic in get_physical_address() will currently > > truncate physical addresses to 32 bits unless long mode is enabled. > > This is incorrect when using physical

Re: [PATCH v2] target/i386: Fix physical address truncation

2023-12-21 Thread Richard Henderson
On 12/22/23 02:49, Michael Brown wrote: The address translation logic in get_physical_address() will currently truncate physical addresses to 32 bits unless long mode is enabled. This is incorrect when using physical address extensions (PAE) outside of long mode, with the result that a 32-bit

Re: [PATCH v2] target/i386: Fix physical address truncation

2023-12-21 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH v2] target/i386: Fix physical address truncation

2023-12-21 Thread Michael Brown
The address translation logic in get_physical_address() will currently truncate physical addresses to 32 bits unless long mode is enabled. This is incorrect when using physical address extensions (PAE) outside of long mode, with the result that a 32-bit operating system using PAE to access memory