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

Re: [Xen-devel] [PATCH RFC V7 1/5] xen: Emulate with no writes


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Tue, 26 Aug 2014 17:01:49 +0300
  • Cc: kevin.tian@xxxxxxxxx, ian.campbell@xxxxxxxxxx, stefano.stabellini@xxxxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, eddie.dong@xxxxxxxxx, xen-devel@xxxxxxxxxxxxx, jun.nakajima@xxxxxxxxx, ian.jackson@xxxxxxxxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Tue, 26 Aug 2014 14:01:41 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=UDGgE5MBBLdWni8Il424hgCSSJ3j/tQPu+VgnS1Z5EX34bSYaCIwv5/kFA1Ri1NhLPCly9FoSgoELFJWmzSPvXG1LRhiNuAwEa425mvc1SunWcvBDSvn9YBZHWa1BEYTR01PxO0kx8ehT6AQW2yBeue7tzUaMkFu/BmLCHBqdkTR0x3CD6xq075ZLPi+b/pqFY17q3mp9T9vLPzK72yDac3vzy8Q7f90he3GS3kflf5V6sqkybeEVjQXNDdrMIctClqlAOwoJAtzF/SZ0eUr5C8df1NkfZNszX7r25qmoSaTMqKxNVAUwZcms1Efr5QG5M54F7P3fPSGmS8thssX7A==; h=Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 08/26/2014 04:56 PM, Jan Beulich wrote:
>>>> On 13.08.14 at 17:28, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
>> +void hvm_emulate_one_full(bool_t nowrite, unsigned int trapnr,
>> +    unsigned int errcode)
>> +{
>> +    struct hvm_emulate_ctxt ctx = {{ 0 }};
>> +    int rc;
>> +
>> +    hvm_emulate_prepare(&ctx, guest_cpu_user_regs());
>> +
>> +    if ( nowrite )
>> +        rc = hvm_emulate_one_no_write(&ctx);
>> +    else
>> +        rc = hvm_emulate_one(&ctx);
>> +
>> +    switch ( rc )
>> +    {
>> +    case X86EMUL_UNHANDLEABLE:
>> +        gdprintk(XENLOG_DEBUG, "Emulation failed @ %04x:%lx: "
>> +               "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
>> +               hvmemul_get_seg_reg(x86_seg_cs, &ctx)->sel,
>> +               ctx.insn_buf_eip,
>> +               ctx.insn_buf[0], ctx.insn_buf[1],
>> +               ctx.insn_buf[2], ctx.insn_buf[3],
>> +               ctx.insn_buf[4], ctx.insn_buf[5],
>> +               ctx.insn_buf[6], ctx.insn_buf[7],
>> +               ctx.insn_buf[8], ctx.insn_buf[9]);
>> +        hvm_inject_hw_exception(trapnr, errcode);
>> +        break;
>> +    case X86EMUL_EXCEPTION:
>> +        if ( ctx.exn_pending )
>> +            hvm_inject_hw_exception(ctx.exn_vector, ctx.exn_error_code);
>> +        break;
> 
> Shouldn't you act on X86EMUL_RETRY here? Or at least not fall through
> to the writeback below?

Thanks for the review, I did initially loop around hvm_emulate_one()
until rc != X86EMUL_RETRY, but I've been told that that might block
against time calibration rendezvous points.

I'll avoid the fallthrough in the next version of the series.


Thanks,
Razvan Cojocaru

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.