From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Date: Tue, 14 Dec 2010 17:53:49 +0000 Subject: Re: re-writing on powerpc Message-Id: <4D07AF2D.2090703@mentor.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org On 12/14/2010 12:48 AM, Avi Kivity wrote: > On 12/13/2010 07:17 PM, Hollis Blanchard wrote: >>> Rewriting is dangerous if the guest is unaware of it. As soon as it >>> is made aware of it, it might as well actually do it in the best way >>> that suits it. >> >> Can you list some examples of dangerous scenarios? >> Perhaps I should rephrase... any real-world dangerous scenarios? :) I was hoping you could share some traps you've hit with Linux or Windows on x86. > - guest checksums own kernel pages For runtime intrusion detection? Such guests can simply not ask the hypervisor to enable the rewriting feature. > - clever compiler reuses code for constant pool Not sure what you mean here. Anyways I think clever compilers are irrelevant, since a compiler will not ordinarily emit a supervisor-mode instruction. The hypervisor has no need to patch normal user-mode instructions. > - guest patches itself (a la linux alternatives), surprised when it > sees a different instruction PowerPC Linux does patch itself, which is a write-only operation. > - guest jits own kernel code (like Singularity), gets confused when it > reads back something it didn't write This is getting really hypothetical, but why would a JIT need to read the generated code? Hollis Blanchard Mentor Graphics, Embedded Systems Division