From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Cornelia Huck <cohuck@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
kvm@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 21/27] docs: kvm: Convert locking.txt to ReST format
Date: Mon, 10 Feb 2020 06:58:06 +0100 [thread overview]
Message-ID: <20200210065806.00b4f634@infradead.org> (raw)
In-Reply-To: <20200207094803.152f0c9b.cohuck@redhat.com>
Em Fri, 7 Feb 2020 09:48:03 +0100
Cornelia Huck <cohuck@redhat.com> escreveu:
> On Fri, 7 Feb 2020 07:24:09 +0100
> Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
>
> > >
> > > >
> > > > Would be nicer but this is acceptable too I think. Especially, the
> > > > monospaced font allows breaking the table and keeping the parts aligned.
> >
> > I couldn't resist trying to use a table ;-)
> >
> > The following patch does that. IMO, it looks nice on both text and html
> > outputs.
>
> Now that I see this, I think this version is actually more readable
> than the existing text.
Yes, that was my feeling too: even for one reading the text version,
it looked clearer on my eyes.
>
> >
> > Cheers,
> > Mauro
> >
> > diff --git a/Documentation/virt/kvm/locking.rst b/Documentation/virt/kvm/locking.rst
> > index 428cb3412ecc..c02291beac3f 100644
> > --- a/Documentation/virt/kvm/locking.rst
> > +++ b/Documentation/virt/kvm/locking.rst
> > @@ -59,30 +59,39 @@ The mapping from gfn to pfn may be changed since we can only ensure the pfn
> > is not changed during cmpxchg. This is a ABA problem, for example, below case
> > will happen:
> >
> > -At the beginning::
> > -
> > - gpte = gfn1
> > - gfn1 is mapped to pfn1 on host
> > - spte is the shadow page table entry corresponding with gpte and
> > - spte = pfn1
> > -
> > - VCPU 0 VCPU0
> > -
> > -on fast page fault path::
> > -
> > - old_spte = *spte;
> > - pfn1 is swapped out:
> > - spte = 0;
> > -
> > - pfn1 is re-alloced for gfn2.
> > -
> > - gpte is changed to point to
> > - gfn2 by the guest:
> > - spte = pfn1;
> > -
> > - if (cmpxchg(spte, old_spte, old_spte+W)
> > - mark_page_dirty(vcpu->kvm, gfn1)
> > - OOPS!!!
> > ++------------------------------------------------------------------------+
> > +| At the beginning:: |
> > +| |
> > +| gpte = gfn1 |
> > +| gfn1 is mapped to pfn1 on host |
> > +| spte is the shadow page table entry corresponding with gpte and |
> > +| spte = pfn1 |
> > ++------------------------------------------------------------------------+
> > +| On fast page fault path: |
> > ++------------------------------------+-----------------------------------+
> > +| CPU 0: | CPU 1: |
> > ++------------------------------------+-----------------------------------+
> > +| :: | |
>
> The '::' directives look a bit like leftover christmas decorations,
> but it's not really distracting, and on the plus side, we'll get nice
> html formatting.
Yes the only downside are those extra "::". The alternatives to it that
would produce a similar look and feel would be a lot worse.
>
> > +| | |
> > +| old_spte = *spte; | |
> > ++------------------------------------+-----------------------------------+
> > +| | pfn1 is swapped out:: |
> > +| | |
> > +| | spte = 0; |
> > +| | |
> > +| | pfn1 is re-alloced for gfn2. |
> > +| | |
> > +| | gpte is changed to point to |
> > +| | gfn2 by the guest:: |
> > +| | |
> > +| | spte = pfn1; |
> > ++------------------------------------+-----------------------------------+
> > +| :: |
> > +| |
> > +| if (cmpxchg(spte, old_spte, old_spte+W) |
> > +| mark_page_dirty(vcpu->kvm, gfn1) |
> > +| OOPS!!! |
> > ++------------------------------------------------------------------------+
> >
> > We dirty-log for gfn1, that means gfn2 is lost in dirty-bitmap.
> >
>
> So I'd like to cast my vote for this version :)
>
Ok. I'm submitting version 3 with this version.
Regards,
Mauro
Cheers,
Mauro
next prev parent reply other threads:[~2020-02-10 5:58 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 14:49 [PATCH v2 00/27] docs: virt: manually convert text documents to ReST format Mauro Carvalho Chehab
2020-02-06 14:49 ` [PATCH v2 01/27] docs: kvm: add arm/pvtime.rst to index.rst Mauro Carvalho Chehab
2020-02-06 14:49 ` [PATCH v2 02/27] docs: virt: convert UML documentation to ReST Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 03/27] docs: virt: user_mode_linux.rst: update compiling instructions Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 04/27] docs: virt: user_mode_linux.rst: fix URL references Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 05/27] docs: virt: convert halt-polling.txt to ReST format Mauro Carvalho Chehab
2020-02-06 15:41 ` Cornelia Huck
2020-02-06 14:50 ` [PATCH v2 06/27] docs: virt: Convert msr.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 07/27] docs: kvm: devices/arm-vgic-its.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 08/27] docs: kvm: devices/arm-vgit-v3.txt to ReST Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 09/27] docs: kvm: convert devices/arm-vgit.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 10/27] docs: kvm: convert devices/mpic.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 11/27] docs: kvm: convert devices/s390_flic.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 12/27] docs: kvm: convert devices/vcpu.txt " Mauro Carvalho Chehab
2020-02-06 15:47 ` Cornelia Huck
2020-02-06 14:50 ` [PATCH v2 13/27] " Mauro Carvalho Chehab
2020-02-06 15:54 ` Cornelia Huck
2020-02-06 14:50 ` [PATCH v2 14/27] docs: kvm: convert devices/vm.txt " Mauro Carvalho Chehab
2020-02-06 15:57 ` Cornelia Huck
2020-02-06 14:50 ` [PATCH v2 15/27] docs: kvm: convert devices/xics.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 16/27] docs: kvm: convert devices/xive.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 17/27] docs: kvm: Convert api.txt to ReST format Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 18/27] docs: kvm: convert arm/hyp-abi.txt to ReST Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 19/27] docs: kvm: arm/psci.txt: convert " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 20/27] docs: kvm: Convert hypercalls.txt to ReST format Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 21/27] docs: kvm: Convert locking.txt " Mauro Carvalho Chehab
2020-02-06 16:11 ` Cornelia Huck
2020-02-06 21:57 ` Paolo Bonzini
2020-02-06 22:47 ` Mauro Carvalho Chehab
2020-02-06 23:13 ` Paolo Bonzini
2020-02-07 6:24 ` Mauro Carvalho Chehab
2020-02-07 8:48 ` Cornelia Huck
2020-02-10 5:58 ` Mauro Carvalho Chehab [this message]
2020-02-06 14:50 ` [PATCH v2 22/27] docs: kvm: Convert mmu.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 23/27] docs: kvm: Convert nested-vmx.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 24/27] docs: kvm: Convert ppc-pv.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 25/27] docs: kvm: Convert s390-diag.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 26/27] docs: kvm: Convert timekeeping.txt " Mauro Carvalho Chehab
2020-02-06 14:50 ` [PATCH v2 27/27] docs: kvm: review-checklist.txt: rename to ReST Mauro Carvalho Chehab
2020-02-06 16:13 ` Cornelia Huck
2020-02-06 15:18 ` [PATCH v2 00/27] docs: virt: manually convert text documents to ReST format Paolo Bonzini
2020-02-06 16:17 ` Cornelia Huck
2020-02-06 16:21 ` Mauro Carvalho Chehab
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=20200210065806.00b4f634@infradead.org \
--to=mchehab@infradead.org \
--cc=cohuck@redhat.com \
--cc=corbet@lwn.net \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=pbonzini@redhat.com \
/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).