qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Various questions about TCG implementation, DRM patches dealing with pointers over guest-host barrier.
@ 2020-05-17 23:05 Catherine A. Frederick
  2020-05-18 10:21 ` Peter Maydell
  2020-05-19 14:51 ` Richard Henderson
  0 siblings, 2 replies; 4+ messages in thread
From: Catherine A. Frederick @ 2020-05-17 23:05 UTC (permalink / raw)
  To: qemu-devel

Hi, I've been patching TCG for my own purposes recently and I was 
wondering a few things. That being:

- Is the TCG backend expected to handle bad cases for instructions? I 
was wondering as I found a situation where a very large shift constant 
reaches the backend and causes an illegal instruction to be generated. 
Is the frontend expected to clean this up, or is the backend supposed to 
be able to deal with these? I currently patched the bug via clipping the 
shift constant between 0 and 64.

- I've been implementing an instruction scheduler(list scheduler, with 
priority given to most successors) for TCG and currently if I replace 
instructions in s->ops(the TCG context) I get a crash later in 
tcg_reg_alloc_op, even if the instruction stream is identical. Is there 
anything else I need to move when I do this?

- Is insn_start necessary to have in order(and what does it do?)? These 
currently are serializing instructions in my scheduler and significantly 
limit my reordering as they create lots of dependencies every few 
instructions.

- Is it "okay" to use g2h and h2g directly in code in syscall.c? 
Currently it seems like TYPE_PTRVOID doesn't do this conversion, and as 
such, most of the calls made over the guest-host barrier made by DRM 
seem to fail spectacularly across bittedness lines. I think a more ideal 
solution would be implementing types that do this automatically, so I 
don't have to deal with the difference in struct size using macros, but 
in the short term I don't really have another option.

My last email didn't seem to reach you all, but here's to hoping this 
one does. Thanks!



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

end of thread, other threads:[~2020-05-19 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-17 23:05 [RFC] Various questions about TCG implementation, DRM patches dealing with pointers over guest-host barrier Catherine A. Frederick
2020-05-18 10:21 ` Peter Maydell
2020-05-18 10:52   ` Alex Bennée
2020-05-19 14:51 ` Richard Henderson

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).