<feed xmlns='http://www.w3.org/2005/Atom'>
<title>yuzu/src/common/host_memory.cpp, branch main</title>
<subtitle>Nintendo Switch emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/'/>
<entry>
<title>common: Enhance memory mapping safety and debugging</title>
<updated>2025-05-11T15:24:19+00:00</updated>
<author>
<name>Zephyron</name>
<email>zephyron@citron-emu.org</email>
</author>
<published>2025-02-09T05:40:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=7eb31a0157e73ff9b711809a59351e02e8aa8820'/>
<id>7eb31a0157e73ff9b711809a59351e02e8aa8820</id>
<content type='text'>
- Reduce max_memory_size from 512GB to 1GB for safer allocation limits
- Add memory operation logging for debugging purposes
- Implement MapMemory() with additional safety checks and large allocation handling
- Add validation checks for memory mappings
- Introduce chunked allocation strategy for large memory requests
- Add detailed error logging for memory operations
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Reduce max_memory_size from 512GB to 1GB for safer allocation limits
- Add memory operation logging for debugging purposes
- Implement MapMemory() with additional safety checks and large allocation handling
- Add validation checks for memory mappings
- Introduce chunked allocation strategy for large memory requests
- Add detailed error logging for memory operations
</pre>
</div>
</content>
</entry>
<entry>
<title>common: improve host memory mapping validation</title>
<updated>2025-05-11T13:54:45+00:00</updated>
<author>
<name>Zephyron</name>
<email>zephyron@citron-emu.org</email>
</author>
<published>2025-02-08T09:32:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=c4ff123a3e50ffc5538ecdc3ab4f418bd2427db6'/>
<id>c4ff123a3e50ffc5538ecdc3ab4f418bd2427db6</id>
<content type='text'>
- Add maximum memory size limit of 512GB (Overkill)
- Implement additional safety checks for memory mapping:
  * Validate non-zero addresses
  * Verify address alignment
  * Add length validation against maximum size
- Remove redundant assertion for host_offset alignment
- Remove potentially problematic mapping verification
- Improve error logging for invalid mapping attempts

These changes enhance memory safety by adding proper bounds
checking and validation before performing memory mappings,
while removing a potentially problematic post-mapping
verification step.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add maximum memory size limit of 512GB (Overkill)
- Implement additional safety checks for memory mapping:
  * Validate non-zero addresses
  * Verify address alignment
  * Add length validation against maximum size
- Remove redundant assertion for host_offset alignment
- Remove potentially problematic mapping verification
- Improve error logging for invalid mapping attempts

These changes enhance memory safety by adding proper bounds
checking and validation before performing memory mappings,
while removing a potentially problematic post-mapping
verification step.
</pre>
</div>
</content>
</entry>
<entry>
<title>vulkan: Fix parameter naming consistency for Android compilation</title>
<updated>2025-05-11T13:54:45+00:00</updated>
<author>
<name>Zephyron</name>
<email>zephyron@citron-emu.org</email>
</author>
<published>2025-02-02T02:06:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=2bce10f740c69c7bf843144d3328dc9537d0c2bb'/>
<id>2bce10f740c69c7bf843144d3328dc9537d0c2bb</id>
<content type='text'>
Renames 'size' parameter to 'length' in IsValidMapping() methods to avoid
conflicts with Android NDK macros that define 'size'. This fixes compilation
issues on Android platforms where the 'size' macro is defined.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Renames 'size' parameter to 'length' in IsValidMapping() methods to avoid
conflicts with Android NDK macros that define 'size'. This fixes compilation
issues on Android platforms where the 'size' macro is defined.
</pre>
</div>
</content>
</entry>
<entry>
<title>common/nvdrv: improve memory validation and error handling</title>
<updated>2025-05-11T13:54:45+00:00</updated>
<author>
<name>Zephyron</name>
<email>zephyron@citron-emu.org</email>
</author>
<published>2025-02-01T11:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=66703870b5333a85deb4d34e30f3c45a657ec788'/>
<id>66703870b5333a85deb4d34e30f3c45a657ec788</id>
<content type='text'>
Implements several improvements to memory handling and validation:

- host_memory: Add IsValidMapping() and IsDirectMappingEnabled() methods to
  validate memory access
- host_memory: Fix virtual base offset calculation to use proper pointer
  arithmetic
- host_memory: Add size field to track allocation size
- nvhost_ctrl_gpu: Return InvalidState instead of InvalidValue for TPC mask
  buffer size validation
- Update copyright year for citron

The changes improve memory safety by adding explicit validation checks and
fixing pointer arithmetic in the virtual memory implementation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implements several improvements to memory handling and validation:

- host_memory: Add IsValidMapping() and IsDirectMappingEnabled() methods to
  validate memory access
- host_memory: Fix virtual base offset calculation to use proper pointer
  arithmetic
- host_memory: Add size field to track allocation size
- nvhost_ctrl_gpu: Return InvalidState instead of InvalidValue for TPC mask
  buffer size validation
- Update copyright year for citron

The changes improve memory safety by adding explicit validation checks and
fixing pointer arithmetic in the virtual memory implementation.
</pre>
</div>
</content>
</entry>
<entry>
<title>nvdrv: Add GetTpcMasks2 support and improve memory mapping validation</title>
<updated>2025-05-11T13:54:45+00:00</updated>
<author>
<name>Zephyron</name>
<email>zephyron@citron-emu.org</email>
</author>
<published>2025-02-01T09:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=8c66caeb5ee9bcec08245e346f1abc921fc94859'/>
<id>8c66caeb5ee9bcec08245e346f1abc921fc94859</id>
<content type='text'>
This commit makes two main changes:

1. Adds support for GetTpcMasks2 (ioctl 0x13) in nvhost_ctrl_gpu:
- Implements new GetTpcMasks2 method to handle TPC mask queries
- Adds IoctlGetTpcMasks structure to store mask parameters
- Returns conservative single TPC configuration for compatibility

2. Enhances memory mapping validation in HostMemory:
- Adds verification check after memory mapping operations
- Improves error handling for direct mapped address enabling
- Adds logging for mapping and direct address failures

Additional changes:
- Updates copyright headers to include citron Emulator Project
- Improves error handling and validation in several paths
- Adds debug logging for TPC mask operations

This improves GPU virtualization support and memory mapping reliability.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit makes two main changes:

1. Adds support for GetTpcMasks2 (ioctl 0x13) in nvhost_ctrl_gpu:
- Implements new GetTpcMasks2 method to handle TPC mask queries
- Adds IoctlGetTpcMasks structure to store mask parameters
- Returns conservative single TPC configuration for compatibility

2. Enhances memory mapping validation in HostMemory:
- Adds verification check after memory mapping operations
- Improves error handling for direct mapped address enabling
- Adds logging for mapping and direct address failures

Additional changes:
- Updates copyright headers to include citron Emulator Project
- Improves error handling and validation in several paths
- Adds debug logging for TPC mask operations

This improves GPU virtualization support and memory mapping reliability.
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Improve error handling in host memory management</title>
<updated>2025-05-11T13:54:45+00:00</updated>
<author>
<name>Zephyron</name>
<email>zephyron@citron-emu.org</email>
</author>
<published>2025-02-01T01:45:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=8565c47b5f6b2988fca3655d4d9a42276ce3b8f1'/>
<id>8565c47b5f6b2988fca3655d4d9a42276ce3b8f1</id>
<content type='text'>
Add proper error handling and recovery mechanisms for memory mapping
operations instead of using assertions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add proper error handling and recovery mechanisms for memory mapping
operations instead of using assertions.
</pre>
</div>
</content>
</entry>
<entry>
<title>scope_exit: Make constexpr</title>
<updated>2024-02-19T15:00:46+00:00</updated>
<author>
<name>FearlessTobi</name>
<email>thm.frey@gmail.com</email>
</author>
<published>2024-02-19T15:00:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=310c1f50beb77fc5c6f9075029973161d4e51a4a'/>
<id>310c1f50beb77fc5c6f9075029973161d4e51a4a</id>
<content type='text'>
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: track separate heap allocation for linux</title>
<updated>2023-12-26T04:30:56+00:00</updated>
<author>
<name>Liam</name>
<email>byteslice@airmail.cc</email>
</author>
<published>2023-12-26T04:21:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=ddda76f9b0d16e8a6fbc92db9e26f25843b647ed'/>
<id>ddda76f9b0d16e8a6fbc92db9e26f25843b647ed</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>common: use memory holepunching when clearing memory</title>
<updated>2023-12-15T04:44:33+00:00</updated>
<author>
<name>Liam</name>
<email>byteslice@airmail.cc</email>
</author>
<published>2023-12-13T20:32:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=8ad5f2c50648c333c3c46f89533e200a39bf6ca8'/>
<id>8ad5f2c50648c333c3c46f89533e200a39bf6ca8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>host_memory: move MAP_ALIGNED_SUPER attempt after 448d4815dece</title>
<updated>2023-12-01T23:25:50+00:00</updated>
<author>
<name>Jan Beich</name>
<email>jbeich@FreeBSD.org</email>
</author>
<published>2023-12-01T23:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/yuzu/commit/?id=01d3e250ab41622742ccb5bf93819ae364a65310'/>
<id>01d3e250ab41622742ccb5bf93819ae364a65310</id>
<content type='text'>
src/common/host_memory.cpp:410:14: error: unused function 'ChooseVirtualBase' [-Werror,-Wunused-function]
  410 | static void* ChooseVirtualBase(size_t virtual_size) {
      |              ^~~~~~~~~~~~~~~~~
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
src/common/host_memory.cpp:410:14: error: unused function 'ChooseVirtualBase' [-Werror,-Wunused-function]
  410 | static void* ChooseVirtualBase(size_t virtual_size) {
      |              ^~~~~~~~~~~~~~~~~
</pre>
</div>
</content>
</entry>
</feed>
