IP Library › Granted Patent US 10,318,436
Granted Patent B2
US 10,318,436 · App. 15/658,819 · Granted Jun 11, 2019

Precise invalidation of virtually tagged caches

Inventors: William McAvoy (Raleigh, NC); Brian Stempel (Raleigh, NC); Spencer Williams (Raleigh, NC); Robert Douglas Clancy (Cary, NC); Michael Scott McIlvaine (Raleigh, NC); Thomas Philip Speier (Wake Forest, NC)
Assignee: QUALCOMM Incorporated
G06F12/1045G06F12/0891G06F12/0895G06F12/1063G06F2212/1024G06F2212/152G06F2212/452G06F2212/60G06F2212/608G06F2212/683
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,318,436
App. No.
15/658,819
Granted
Jun 11, 2019
Kind
B2
Abstract

A translation lookaside buffer (TLB) index valid bit is set in a first line of a virtually indexed, virtually tagged (VIVT) cache. The first line of the VIVT cache is associated with a first TLB entry which stores a virtual address to physical address translation for the first cache line. The TLB index valid bit of the first line is cleared upon determining that the translation is no longer stored in the first TLB entry. An indication of a received invalidation instruction is stored. When a context synchronization instruction is received, the first line of the VIVT cache is cleared based on the TLB index valid bit being cleared and the stored indication of the invalidate instruction.

Claims (95)

1. A method, comprising:

setting a translation lookaside buffer (TLB) index valid bit in a first line of a virtually indexed virtually tagged (VIVT) cache, wherein the first line of the VIVT cache is associated with a first TLB entry which comprises a virtual address to physical address translation for the first cache line;

upon determining that the translation for the first cache line is no longer in the first TLB entry, clearing the TLB index valid bit in the first line of the VIVT cache;

responsive to receiving a translation invalidate instruction for the virtual address, storing an indication of the invalidate instruction; and

responsive to receiving a context synchronization instruction, invalidating the first line of the VIVT cache based on the TLB index valid bit being cleared and the stored indication of the invalidate instruction.

2. The method of claim 1 , wherein the indication is stored in a first entry of an invalidate vector, wherein the first entry is of a plurality of entries in the invalidate vector and corresponds to TLB entries that have been evicted and replaced, wherein the indication stored in the first entry specifies that an invalidate instruction is pending.

3. The method of claim 2 , further comprising:

responsive to receiving the context synchronization instruction, determining that the first entry of the invalidate vector indicates that an invalidate instruction is pending.

4. The method of claim 3 , further comprising:

invalidating each line of the VIVT cache having a TLB index valid bit that has been cleared.

5. The method of claim 4 , further comprising:

responsive to receiving the invalidate instruction for the virtual address, translating the virtual address to the physical address;

referencing the TLB with the translated physical address;

determining that the TLB does not include an entry matching the translated physical address; and

storing the indication in the first entry of the invalidate vector.

6. The method of claim 1 , further comprising prior to setting the TLB index valid bit of the first line of the VIVT cache:

detecting a miss for the first line of VIVT cache in the VIVT cache;

performing a translation page table walk to receive the translation for the first cache line;

storing, in the first TLB entry, the translation for the first cache line;

receiving the data for the first line of the VIVT cache; and

filling the first line of the VIVT cache with the received data, wherein the TLB index valid bit of the first line of the VIVT cache is set while filling the first line of the VIVT cache with the received data, and wherein the first line of the VIVT cache is associated with the first TLB entry while filling the first line of the VIVT cache with the received data.

7. The method of claim 1 , wherein the determining that the translation for the first cache line is no longer in the first TLB entry is based on determining that the translation for the first cache line in the first TLB entry was evicted and replaced with a different translation.

8. The method of claim 1 , wherein the VIVT cache is an instruction cache that is visible to software as a physically indexed physically tagged (PIPT) cache.

9. A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform an operation comprising:

setting a translation lookaside buffer (TLB) index valid bit in a first line of a virtually indexed virtually tagged (VIVT) cache, wherein the first line of the VIVT cache is associated with a first TLB entry which comprises a virtual address to physical address translation for the first cache line;

upon determining that the translation for the first cache line is no longer in the first TLB entry, clearing the TLB index valid bit in the first line of the VIVT cache;

responsive to receiving a translation invalidate instruction for the virtual address, storing an indication of the invalidate instruction; and

responsive to receiving a context synchronization instruction, invalidating the first line of the VIVT cache based on the TLB index valid bit being cleared and the stored indication of the invalidate instruction.

10. The non-transitory computer-readable medium of claim 9 , wherein the indication is stored in a first entry of an invalidate vector, wherein the first entry is of a plurality of entries in the invalidate vector and corresponds to TLB entries that have been evicted and replaced, wherein the indication stored in the first entry specifies that an invalidate instruction is pending.

11. The non-transitory computer-readable medium of claim 10 , the operation further comprising:

responsive to receiving the context synchronization instruction, determining that the first entry of the invalidate vector indicates that an invalidate instruction is pending.

12. The non-transitory computer-readable medium of claim 11 , the operation further comprising:

invalidating each line of the VIVT cache having a TLB index valid bit that has been cleared.

13. The non-transitory computer-readable medium of claim 12 , the operation further comprising:

responsive to receiving the invalidate instruction for the virtual address, translating the virtual address to the physical address;

referencing the TLB with the translated physical address;

determining that the TLB does not include an entry matching the translated physical address; and

storing the indication in the first entry of the invalidate vector.

14. The non-transitory computer-readable medium of claim 9 , the operation further comprising prior to setting the TLB index valid bit of the first line of the VIVT cache:

detecting a miss for the first line of VIVT cache in the VIVT cache;

performing a translation page table walk to receive the translation for the first cache line;

storing, in the first TLB entry, the translation for the first cache line;

receiving the data for the first line of the VIVT cache; and

filling the first line of the VIVT cache with the received data, wherein the TLB index valid bit of the first line of the VIVT cache is set while filling the first line of the VIVT cache with the received data, and wherein the first line of the VIVT cache is associated with the first TLB entry while filling the first line of the VIVT cache with the received data.

15. The non-transitory computer-readable medium of claim 9 , wherein the determining that the translation for the first cache line is no longer in the first TLB entry is based on determining that the translation for the first cache line in the first TLB entry was evicted and replaced with a different translation.

16. The non-transitory computer-readable medium of claim 9 , wherein the VIVT cache is an instruction cache that is visible to software as a physically indexed physically tagged (PIPT) cache.

17. An apparatus, comprising:

a translation lookaside buffer (TLB);

a virtually indexed virtually tagged (VIVT) cache; and

logic configured to perform an operation comprising:

setting an index valid bit in a first line of the VIVT cache, wherein the first line of the VIVT cache is associated with a first TLB entry which comprises a virtual address to physical address translation for the first cache line;

upon determining that the translation for the first cache line is no longer in the first TLB entry, clearing the TLB index valid bit in the first line of the VIVT cache;

responsive to receiving a translation invalidate instruction for the virtual address, storing an indication of the invalidate instruction; and

responsive to receiving a context synchronization instruction, invalidating the first line of the VIVT cache based on the TLB index valid bit being cleared and the stored indication of the invalidate instruction.

18. The apparatus of claim 17 , further comprising an invalidate vector, wherein the indication is stored in a first entry of the invalidate vector, wherein the first entry is of a plurality of entries in the invalidate vector and corresponds to TLB entries that have been evicted and replaced, wherein the indication stored in the first entry specifies that an invalidate instruction is pending.

19. The apparatus of claim 18 , the operation further comprising:

responsive to receiving the context synchronization instruction, determining that the first entry of the invalidate vector indicates that an invalidate instruction is pending.

20. The apparatus of claim 19 , the operation further comprising:

invalidating each line of the VIVT cache having a TLB index valid bit that has been cleared.

21. The apparatus of claim 20 , the operation further comprising:

responsive to receiving the invalidate instruction for the virtual address, translating the virtual address to the physical address;

referencing the TLB with the translated physical address;

determining that the TLB does not include an entry matching the translated physical address; and

storing the indication in the first entry of the invalidate vector.

22. The apparatus of claim 17 , the operation further comprising prior to setting the TLB index valid bit of the first line of the VIVT cache:

detecting a miss for the first line of VIVT cache in the VIVT cache;

performing a translation page table walk to receive the translation for the first cache line;

storing, in the first TLB entry, the translation for the first cache line;

receiving the data for the first line of the VIVT cache; and

filling the first line of the VIVT cache with the received data, wherein the TLB index valid bit of the first line of the VIVT cache is set while filling the first line of the VIVT cache with the received data, and wherein the first line of the VIVT cache is associated with the first TLB entry while filling the first line of the VIVT cache with the received data.

23. The apparatus of claim 17 , wherein the determining that the translation for the first cache line is no longer in the first TLB entry is based on determining that the translation for the first cache line in the first TLB entry was evicted and replaced with a different translation.

24. The apparatus of claim 17 , wherein the VIVT cache is an instruction cache that is visible to software as a physically indexed physically tagged (PIPT) cache.

25. An apparatus, comprising:

a translation lookaside buffer (TLB);

a virtually indexed virtually tagged (VIVT) cache;

means for setting an index valid bit in a first line of the VIVT cache, wherein the first line of the VIVT cache is associated with a first TLB entry which comprises a virtual address to physical address translation for the first cache line;

upon determining that the translation for the first cache line is no longer in the first TLB entry, means for clearing the TLB index valid bit in the first line of the VIVT cache;

responsive to receiving a translation invalidate instruction for the virtual address, means for storing an indication of the invalidate instruction; and

responsive to receiving a context synchronization instruction, means for invalidating the first line of the VIVT cache based on the TLB index valid bit being cleared and the stored indication of the invalidate instruction.

26. The apparatus of claim 25 , further comprising an invalidate vector, wherein the indication is stored in a first entry of the invalidate vector, wherein the first entry is of a plurality of entries in the invalidate vector and corresponds to TLB entries that have been evicted and replaced, wherein the indication stored in the first entry specifies that an invalidate instruction is pending.

27. The apparatus of claim 26 , wherein the VIVT cache is an instruction cache that is visible to software as a physically indexed physically tagged (PIPT) cache, the apparatus further comprising:

responsive to receiving the context synchronization instruction, means for determining that the first entry of the invalidate vector indicates that an invalidate instruction is pending.

28. The apparatus of claim 27 , further comprising:

means for invalidating each line of the VIVT cache having a TLB index valid bit that has been cleared.

29. The apparatus of claim 28 , further comprising:

responsive to receiving the invalidate instruction for the virtual address, means for translating the virtual address to the physical address;

means for referencing the TLB with the translated physical address;

means for determining that the TLB does not include an entry matching the translated physical address; and

means for storing the indication in the first entry of the invalidate vector.

30. The apparatus of claim 25 , further comprising prior to setting the TLB index valid bit of the first line of the VIVT cache:

means for detecting a miss for the first line of VIVT cache in the VIVT cache;

means for performing a translation page table walk to receive the translation for the first cache line;

means for storing, in the first TLB entry, the translation for the first cache line;

means for receiving the data for the first line of the VIVT cache; and

means for filling the first line of the VIVT cache with the received data, wherein the TLB index valid bit of the first line of the VIVT cache is set while filling the first line of the VIVT cache with the received data, and wherein the first line of the VIVT cache is associated with the first TLB entry while filling the first line of the VIVT cache with the received data.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 9, 2017
From: MCAVOY, WILLIAM; STEMPEL, BRIAN; WILLIAMS, SPENCER; CLANCY, ROBERT DOUGLAS; MCILVAINE, MICHAEL SCOTT; SPEIER, THOMAS PHILIP
To: QUALCOMM INCORPORATED
Reel/Frame 043815/0722 →
Continuity (1)
Related Publication 20190034349A1 · Jan 31, 2019