From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH RFC V3 1/5] xen: Emulate with no writes Date: Thu, 24 Jul 2014 14:40:56 +0300 Message-ID: <53D0F0C8.5010507@bitdefender.com> References: <1406118884-16628-1-git-send-email-rcojocaru@bitdefender.com> <20140724112042.GG1817@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140724112042.GG1817@deinos.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: kevin.tian@intel.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, Ian.Jackson@eu.citrix.com, eddie.dong@intel.com, xen-devel@lists.xen.org, JBeulich@suse.com, andres@lagarcavilla.org, jun.nakajima@intel.com, andrew.cooper3@citrix.com List-Id: xen-devel@lists.xenproject.org On 07/24/2014 02:20 PM, Tim Deegan wrote: > Hi, > > At 15:34 +0300 on 23 Jul (1406126080), Razvan Cojocaru wrote: >> +static const struct x86_emulate_ops hvm_emulate_ops_no_write = { >> + .read = hvmemul_read, >> + .insn_fetch = hvmemul_insn_fetch, >> + .write = hvmemul_write_discard, >> + .cmpxchg = hvmemul_cmpxchg, >> + .rep_ins = hvmemul_rep_ins, >> + .rep_outs = hvmemul_rep_outs, >> + .rep_movs = hvmemul_rep_movs, > > If you want to discard all writes from this guest instruction, you'll > also need modified versions of the rep_ins, rep_movs and cmpxchg > handlers. Noted, thanks. >> + .read_segment = hvmemul_read_segment, >> + .write_segment = hvmemul_write_segment, >> + .read_io = hvmemul_read_io, >> + .write_io = hvmemul_write_io, >> + .read_cr = hvmemul_read_cr, >> + .write_cr = hvmemul_write_cr, >> + .read_msr = hvmemul_read_msr, >> + .write_msr = hvmemul_write_msr, >> + .wbinvd = hvmemul_wbinvd, >> + .cpuid = hvmemul_cpuid, >> + .inject_hw_exception = hvmemul_inject_hw_exception, >> + .inject_sw_interrupt = hvmemul_inject_sw_interrupt, > > Do you care about injecting exceptions (stack updates &c)? Yes, those should work. Thanks, Razvan Cojocaru