[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] best way to implement a "memclear" type instruction in TCG?
From: |
Peter Maydell |
Subject: |
[Qemu-devel] best way to implement a "memclear" type instruction in TCG? |
Date: |
Wed, 22 Jan 2014 18:58:49 +0000 |
One of the instructions I need to implement for AArch64 is "DC ZVA",
which is basically "clear the block of memory at this address to zeroes".
What's the best way in a TCG frontend to implement this sort of thing?
The block is a fixed size (implementation-dependent, but less than 2K).
The instruction has to behave like a set of stores for the purposes of
access faults, watchpoints, and so on. Obviously one way to implement
this would be to emit TCG ops for a store-and-loop, but that means we're
doing a TLB walk for every 64 bytes we write. Is there a better approach?
In theory we could just find the pointer to the memory QEMU is backing
the guest RAM with and call memset on it...
thanks
-- PMM
- [Qemu-devel] best way to implement a "memclear" type instruction in TCG?,
Peter Maydell <=