So the address of a page to be invalidated is known at compile time? Really?iansjack wrote:From the Intel manualSo, sensible or not, it is the virtual address that the page maps to. (Well, you can use any virtual address within the page so it would be more accurate to say "a virtual address".)Invalidates (flushes) the translation lookaside buffer (TLB) entry specified with the source operand. The source operand is a memory address. The processor determines the page that contains that address and flushes the TLB entry for that page.
INVLPG doesn't work but reloading CR3 does
Re: INVLPG doesn't work but reloading CR3 does
Re: INVLPG doesn't work but reloading CR3 does
I can't imagine why you'd think that, but it's a point that you'll have to argue with the Intel engineers.
Re: INVLPG doesn't work but reloading CR3 does
It is only means you don't understand what are yu talking about.So the address of a page to be invalidated is known at compile time? Really?
I'd like Intel notation so I'll give you example with Intel notation:
mov eax, [0x12345678] ; load value from address 0x12345678
mov eax, [esi] ; load value from address which is stored in esi register.
Same for INVLPG. So the address of a page to be invalidated is known at compile time ?
Re: INVLPG doesn't work but reloading CR3 does
?stlw wrote:The virtual address you want to invalidate in the TLB
It's the address that specifies location where the address to be invalidated is stored. Not the address itself, that's what I was trying to say.
OK, so there's no need for additional brackets or '*' in my inline assembly. It works, just not in bochs.
Re: INVLPG doesn't work but reloading CR3 does
I am trying to explain you but you don't listenfilipadamer wrote:?stlw wrote:The virtual address you want to invalidate in the TLB
It's the address that specifies location where the address to be invalidated is stored. Not the address itself, that's what I was trying to say.
OK, so there's no need for additional brackets or '*' in my inline assembly. It works, just not in bochs.
Now let's try to explain in C-language terms.
"It's the address that specifies location where the address to be invalidated is stored" in C-language means:
address 0x12345678
char *location = (char*) 0x12345678;
char **p = &location;
invlpg p;
It is over-indirection.
I suggest you to open Intel Software Developers Manual Volume 2, Chapter 2 )instruction format) and read how x86 instructions are encoded and what do they mean. You could see in Bochs (which provides also disasm) what you actually encoded in your sources. You could also use Bochs debugger functions to see what memory location yuor invlpg trying to invalidate. But looks like you don't care to debug, you here to complain ...
Re: INVLPG doesn't work but reloading CR3 does
I do understand how does it work. I was just confused by your post where you said that
It's solved about 17 posts ago.
What does the ModRM following the INVLPG contain?
but it doesn't contain the address itself, it only references on where is it stored.The virtual address you want to invalidate in the TLB
It's solved about 17 posts ago.
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: INVLPG doesn't work but reloading CR3 does
ModRM contains the address itself. Or, in other words, a way in which the processor can compute the address. invlpg [eax] - the address to invalidate is in eax, while you are saying that the address of the address is in eax...
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
Re: INVLPG doesn't work but reloading CR3 does
I understand it in that correct way. No '()'/'*' are needed - that's the point.Griwes wrote:ModRM contains the address itself. Or, in other words, a way in which the processor can compute the address. invlpg [eax] - the address to invalidate is in eax, while you are saying that the address of the address is in eax...
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: INVLPG doesn't work but reloading CR3 does
Then stop saying something different, please.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations