qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] best way to implement a "memclear" type instruction in TCG?
@ 2014-01-22 18:58 Peter Maydell
  2014-01-22 19:06 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2014-01-22 18:58 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Richard Henderson

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-27 16:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 18:58 [Qemu-devel] best way to implement a "memclear" type instruction in TCG? Peter Maydell
2014-01-22 19:06 ` Richard Henderson
2014-01-22 19:24   ` Xin Tong
2014-01-22 19:30     ` Peter Maydell
2014-02-27 16:23   ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).