Repository navigation
Release object token around field writes in do_store - #376
eternalcomet wants to merge 1 commit into
Conversation
|
Thank you @eternalcomet! Nice test. I want to think a bit more about the locking. Clearly keeping an interpreter-wide lock through all of this tree is bad: But if we release the lock I think that exposes us to the possibility of two threads writing to the same variable at once (or a read + concurrent write), which could be unsound. |
Co-authored-by: 朝倉水希 <mizuk1@mzk1.dev>
2000fa7 to
0061651
Compare
|
The field access still needs the object token. I changed the fix so the token is released only while resolving a PCI device's This follows ACPICA's region setup, which exits the interpreter around The trade-offs are that a concurrent Field reads don't take the token on The full test suite passes, including |
When a field targets a
PCI_Configoperation region, resolving_SEG,_BBN, or_ADRcan execute AML and re-enterdo_store.The fix resolves those addresses before taking
object_token, caches the result on each region, then reacquires the token for the field access. Preserve read-modify-write and the two-step BankField/IndexField accesses remain serialized. This follows ACPICA's region setup (evregion.c).The address cache makes later changes to
_ADRtake effect only for a new region, and a concurrentCopyObjectcan leave an in-flight store targeting the field it cloned. The cache is a private field onOpRegion, so this is a semver change for7.0.0-pre1.The full test suite passes, including
test_region_in_pci_device_with_method_adr.