qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] Various questions about TCG implementation, DRM patches dealing wi


From: Catherine A. Frederick
Subject: [RFC] Various questions about TCG implementation, DRM patches dealing with pointers over guest-host barrier.
Date: Sun, 17 May 2020 19:05:17 -0400
User-agent: Mozilla/5.0 (X11; Linux ppc64le; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]