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

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


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Mon, 04 Aug 2014 17:25:32 +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: Mon, 04 Aug 2014 14:25:45 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=jHSDdtZ36l+N4CeBYCMN8dYEto9eYXjIvBlpdTqttaOKkv1js88FpKG3S16FtOzOqMESXtFkjv7pDAlSSU5XvPm4kf5teiymZcKSLN32P5UAM8qrPhuRiE8PA9rNsnXqz//VlOuh3k3YbklOst/SNAFH2UdjxNE+cDDyBzsrK1iwN2Fv0WK+qmuXr1KGJAnkCq1GDEzO/APOGxJUWYlALK+JaS6jBtJAovkpA2Ih6fHx46Xa04yJGb61tQRLx+Hcex8/GcdmAoEPBnOojExi7f6KFgOpvEIVP4qhR+ejycNHJjGctb6Lb6FOEuza3ZAmeNOmBTm/6+Nwl7tuxoQEww==; 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/04/2014 05:09 PM, Jan Beulich wrote:
>>>> On 04.08.14 at 13:30, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
>> --- a/xen/arch/x86/hvm/emulate.c
>> +++ b/xen/arch/x86/hvm/emulate.c
>> @@ -688,6 +688,51 @@ static int hvmemul_write(
>>      return X86EMUL_OKAY;
>>  }
>>  
>> +static int hvmemul_write_discard(
>> +    enum x86_segment seg,
>> +    unsigned long offset,
>> +    void *p_data,
>> +    unsigned int bytes,
>> +    struct x86_emulate_ctxt *ctxt)
>> +{
>> +    /* Discarding the write. */
>> +    return X86EMUL_OKAY;
>> +}
> 
> While this one is okay, ...
> 
>> +static int hvmemul_rep_ins_discard(
>> +    uint16_t src_port,
>> +    enum x86_segment dst_seg,
>> +    unsigned long dst_offset,
>> +    unsigned int bytes_per_rep,
>> +    unsigned long *reps,
>> +    struct x86_emulate_ctxt *ctxt)
>> +{
>> +    return X86EMUL_OKAY;
>> +}
>> +
>> +static int hvmemul_rep_movs_discard(
>> +   enum x86_segment src_seg,
>> +   unsigned long src_offset,
>> +   enum x86_segment dst_seg,
>> +   unsigned long dst_offset,
>> +   unsigned int bytes_per_rep,
>> +   unsigned long *reps,
>> +   struct x86_emulate_ctxt *ctxt)
>> +{
>> +    return X86EMUL_OKAY;
>> +}
> 
> ... these don't seem to be: I don't think you can just drop the other
> half of the operation (i.e. the port or MMIO read).

It's been suggested here:

http://lists.xen.org/archives/html/xen-devel/2014-07/msg03088.html

that we should use modified versions of the rep_ins, rep_movs and
cmpxchg handlers if we want to make sure absolutely no writes will
happen. Then again, perhaps the modification were supposed to be more
subtle than just doing nothing in the handler?


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