From: "Jan Beulich" <JBeulich@suse.com>
To: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: kevin.tian@intel.com, ian.campbell@citrix.com,
stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
eddie.dong@intel.com, xen-devel@lists.xen.org,
jun.nakajima@intel.com, ian.jackson@eu.citrix.com
Subject: Re: [PATCH RFC V4 1/5] xen: Emulate with no writes
Date: Mon, 04 Aug 2014 15:42:39 +0100 [thread overview]
Message-ID: <53DFB7FF0200007800029197@mail.emea.novell.com> (raw)
In-Reply-To: <53DF97DC.8010402@bitdefender.com>
>>> On 04.08.14 at 16:25, <rcojocaru@bitdefender.com> wrote:
> On 08/04/2014 05:09 PM, Jan Beulich wrote:
>>>>> On 04.08.14 at 13:30, <rcojocaru@bitdefender.com> 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?
That's what I'm trying to hint at.
Jan
next prev parent reply other threads:[~2014-08-04 14:42 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 11:30 [PATCH RFC V4 1/5] xen: Emulate with no writes Razvan Cojocaru
2014-08-04 11:30 ` [PATCH RFC V4 2/5] xen: Optimize introspection access to guest state Razvan Cojocaru
2014-08-04 14:16 ` Jan Beulich
2014-08-04 14:43 ` Razvan Cojocaru
2014-08-04 11:30 ` [PATCH RFC V4 3/5] xen: Force-enable relevant MSR events; optimize the number of sent MSR events Razvan Cojocaru
2014-08-04 11:30 ` [PATCH RFC V4 4/5] xen, libxc: Request page fault injection via libxc Razvan Cojocaru
2014-08-04 11:51 ` Ian Campbell
2014-08-04 14:26 ` Jan Beulich
2014-08-04 15:00 ` Razvan Cojocaru
2014-08-04 15:20 ` Jan Beulich
2014-08-05 8:09 ` Razvan Cojocaru
2014-08-05 8:39 ` Jan Beulich
2014-08-05 8:48 ` Razvan Cojocaru
2014-08-05 9:59 ` Razvan Cojocaru
2014-08-04 15:11 ` Razvan Cojocaru
2014-08-04 15:21 ` Jan Beulich
[not found] ` <53DFA537.70105@bitdefender.com>
2014-08-04 15:23 ` Razvan Cojocaru
2014-08-04 11:30 ` [PATCH RFC V4 5/5] xen: Handle resumed instruction based on previous mem_event reply Razvan Cojocaru
2014-08-04 14:33 ` Jan Beulich
2014-08-06 14:00 ` Razvan Cojocaru
2014-08-04 14:09 ` [PATCH RFC V4 1/5] xen: Emulate with no writes Jan Beulich
2014-08-04 14:25 ` Razvan Cojocaru
2014-08-04 14:42 ` Jan Beulich [this message]
2014-08-05 15:16 ` Razvan Cojocaru
2014-08-05 15:27 ` Razvan Cojocaru
2014-08-05 15:43 ` Jan Beulich
2014-08-06 8:42 ` Razvan Cojocaru
2014-08-06 8:50 ` Jan Beulich
2014-08-28 11:53 ` Tim Deegan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53DFB7FF0200007800029197@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=eddie.dong@intel.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=rcojocaru@bitdefender.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).