qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: farmdve <farmdve@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Question regarding self-modifying code.
Date: Thu, 14 Jan 2016 10:27:52 +0000	[thread overview]
Message-ID: <CAFEAcA_RpVKEoyrJzEwZyYTXLUu77j3UwhyKEM4xr=JQiA45Cw@mail.gmail.com> (raw)
In-Reply-To: <CAHGme8u-dmUqCGKUPsurYvmvzRSLyXtgM1R2FQ7Wnc5aCBQjkg@mail.gmail.com>

On 14 January 2016 at 10:15, farmdve <farmdve@gmail.com> wrote:
> Sorry about that. Somehow Google decided it should reply to you, rather than
> the mailing list. It was an honest mistake.
>
> Original question is below
>
>
> I am unable to get this part here if (!(tb_end <= start || tb_start >= end))
> in tb_invalidate_phys_page_range
>
> What would happen if code forward modifies itself, but that condition
> evaluates to true?

If that condition is true, then the TB we're looking at (as we
iterate through every TB we know about) is not in fact overlapping
with the page that the guest just modified, and so is not affected
by the write...

> Then this piece here won't get executed

...and so it is correct that we don't need to do anything for this TB.

thanks
-- PMM

  reply	other threads:[~2016-01-14 10:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13 16:45 [Qemu-devel] Question regarding self-modifying code farmdve
2016-01-13 17:18 ` Peter Maydell
     [not found]   ` <CAHGme8sE+hOQwS+neP5A_-S-pyLg_YhdE1jT7W+nL7mi0BHi2A@mail.gmail.com>
     [not found]     ` <CAFEAcA_EiFu0Okn5AEkeauO=ndfti-+CcCbr850iogQojJ5QAg@mail.gmail.com>
2016-01-14 10:15       ` farmdve
2016-01-14 10:27         ` Peter Maydell [this message]
     [not found]           ` <CAHGme8sPAEea6rTKYiypTE+_2Sp5RiNDTo22gNOBy2fppsduBw@mail.gmail.com>
2016-01-14 14:29             ` farmdve
2016-01-14 14:36               ` Peter Maydell
2016-01-14 15:12                 ` farmdve

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='CAFEAcA_RpVKEoyrJzEwZyYTXLUu77j3UwhyKEM4xr=JQiA45Cw@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=farmdve@gmail.com \
    --cc=qemu-devel@nongnu.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).