Skip to content
Snippets Groups Projects
  1. Feb 10, 2023
  2. Feb 03, 2023
    • Dmitrii Bundin's avatar
      scripts/gdb: add mm introspection utils · e36903b0
      Dmitrii Bundin authored
      This command provides a way to traverse the entire page hierarchy by a
      given virtual address on x86.  In addition to qemu's commands info
      tlb/info mem it provides the complete information about the paging
      structure for an arbitrary virtual address.  It supports 4KB/2MB/1GB and 5
      level paging.
      
      Here is an example output for 2MB success translation:
      
      (gdb) translate-vm address
      cr3:
          cr3 binary data                0x1085be003
          next entry physical address   0x1085be000
          ---
          bit  3          page level write through       False
          bit  4          page level cache disabled      False
      level 4:
          entry address                  0xffff8881085be7f8
          page entry binary data         0x800000010ac83067
          next entry physical address   0x10ac83000
          ---
          bit  0          entry present                  True
          bit  1          read/write access allowed      True
          bit  2          user access allowed            True
          bit  3          page level write through       False
          bit  4          page level cache disabled      False
          bit  5          entry has been accessed        True
          bit  7          page size                      False
          bit  11         restart to ordinary            False
          bit  63         execute disable                True
      level 3:
          entry address                  0xffff88810ac83a48
          page entry binary data         0x101af7067
          next entry physical address   0x101af7000
          ---
          bit  0          entry present                  True
          bit  1          read/write access allowed      True
          bit  2          user access allowed            True
          bit  3          page level write through       False
          bit  4          page level cache disabled      False
          bit  5          entry has been accessed        True
          bit  7          page size                      False
          bit  11         restart to ordinary            False
          bit  63         execute disable                False
      level 2:
          entry address                  0xffff888101af7368
          page entry binary data         0x80000001634008e7
          page size                      2MB
          page physical address         0x163400000
          ---
          bit  0          entry present                  True
          bit  1          read/write access allowed      True
          bit  2          user access allowed            True
          bit  3          page level write through       False
          bit  4          page level cache disabled      False
          bit  5          entry has been accessed        True
          bit  7          page size                      True
          bit  6          page dirty                     True
          bit  8          global translation             False
          bit  11         restart to ordinary            True
          bit  12         pat                            False
          bits (59, 62)   protection key                 0
          bit  63         execute disable                True
      
      [dmitrii.bundin.a@gmail.com: add SPDX line, other tweaks]
        Link: https://lkml.kernel.org/r/20230113175151.22278-1-dmitrii.bundin.a@gmail.com
      [akpm@linux-foundation.org: s/physicall/physical/]
      Link: https://lkml.kernel.org/r/20230102171014.31408-1-dmitrii.bundin.a@gmail.com
      
      
      Signed-off-by: default avatarDmitrii Bundin <dmitrii.bundin.a@gmail.com>
      Acked by: Mike Rapoport (IBM) <rppt@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jan Kiszka <jan.kiszka@siemens.com>
      Cc: Kieran Bingham <kbingham@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      e36903b0
  3. Jul 30, 2022
  4. Jul 21, 2022
  5. Jun 11, 2022
  6. Dec 16, 2021
  7. Nov 09, 2021
  8. May 07, 2021
  9. Feb 26, 2021
  10. Feb 16, 2021
  11. Oct 16, 2020
  12. Sep 22, 2020
  13. Sep 15, 2020
    • John Ogness's avatar
      printk: ringbuffer: add finalization/extension support · 4cfc7258
      John Ogness authored
      
      Add support for extending the newest data block. For this, introduce
      a new finalization state (desc_finalized) denoting a committed
      descriptor that cannot be extended.
      
      Until a record is finalized, a writer can reopen that record to
      append new data. Reopening a record means transitioning from the
      desc_committed state back to the desc_reserved state.
      
      A writer can explicitly finalize a record if there is no intention
      of extending it. Also, records are automatically finalized when a
      new record is reserved. This relieves writers of needing to
      explicitly finalize while also making such records available to
      readers sooner. (Readers can only traverse finalized records.)
      
      Four new memory barrier pairs are introduced. Two of them are
      insignificant additions (data_realloc:A/desc_read:D and
      data_realloc:A/data_push_tail:B) because they are alternate path
      memory barriers that exactly match the purpose, pairing, and
      context of the two existing memory barrier pairs they provide an
      alternate path for. The other two new memory barrier pairs are
      significant additions:
      
      desc_reopen_last:A / _prb_commit:B - When reopening a descriptor,
          ensure the state transitions back to desc_reserved before
          fully trusting the descriptor data.
      
      _prb_commit:B / desc_reserve:D - When committing a descriptor,
          ensure the state transitions to desc_committed before checking
          the head ID to see if the descriptor needs to be finalized.
      
      Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      Link: https://lore.kernel.org/r/20200914123354.832-6-john.ogness@linutronix.de
      4cfc7258
    • John Ogness's avatar
      printk: ringbuffer: change representation of states · 10dcb06d
      John Ogness authored
      
      Rather than deriving the state by evaluating bits within the flags
      area of the state variable, assign the states explicit values and
      set those values in the flags area. Introduce macros to make it
      simple to read and write state values for the state variable.
      
      Although the functionality is preserved, the binary representation
      for the states is changed.
      
      Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
      Link: https://lore.kernel.org/r/20200914123354.832-5-john.ogness@linutronix.de
      10dcb06d
  14. Sep 08, 2020
  15. Aug 12, 2020
  16. Jul 24, 2020
  17. Jul 09, 2020
  18. May 08, 2020
  19. Mar 25, 2020
  20. Nov 06, 2019
  21. Oct 19, 2019
  22. Sep 26, 2019
  23. Jul 17, 2019
  24. Jul 10, 2019
  25. Jun 02, 2019
  26. May 21, 2019
  27. May 15, 2019
Loading