From: Avi Kivity <avi@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>,
mtosatti@redhat.com, kvm@vger.kernel.org,
yoshikawa.takuya@oss.ntt.co.jp
Subject: Re: [PATCH 4/4] KVM: MMU: Split out the main body of walk_addr_generic()
Date: Sun, 12 Jun 2011 18:47:50 +0300 [thread overview]
Message-ID: <4DF4DFA6.40807@redhat.com> (raw)
In-Reply-To: <20110609141801.GE21100@elte.hu>
On 06/09/2011 05:18 PM, Ingo Molnar wrote:
> * Takuya Yoshikawa<takuya.yoshikawa@gmail.com> wrote:
>
> > +/*
> > + * do_walk() returns one of these.
> > + *
> > + * WALK_NEXT: Continue the walk loop.
> > + * WALK_DONE: Break from the walk loop.
> > + * WALK_RETRY: Retry walk.
> > + * WALK_NOT_PRESENT: Set PFERR_PRESENT_MASK and goto error.
> > + * WALK_RSVD_FAULT: Set PFERR_RSVD_MASK and goto error.
> > + * WALK_ERROR: Goto error.
> > + * WALK_ABORT: Return immediately.
>
> hm, this iterator turned out to be more complex than i thought it
> would become. Avi, are you still happy with that?
No - a lot of code is spent just communicating between the two
functions. Best to leave it in a single function.
> > + if ((walker->level == PT_PAGE_TABLE_LEVEL) ||
> > + ((walker->level == PT_DIRECTORY_LEVEL)&& is_large_pte(*pte)&&
> > + (PTTYPE == 64 || is_pse(vcpu))) ||
> > + ((walker->level == PT_PDPE_LEVEL)&& is_large_pte(*pte)&&
> > + (mmu->root_level == PT64_ROOT_LEVEL))) {
>
> This condition wants to move into a is-pte-large inline function.
Better, is_last_gpte(). We already have an is_last_spte().
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2011-06-12 15:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 13:59 [PATCH 0/4] KVM: MMU: Clean up walk_addr_generic() Takuya Yoshikawa
2011-06-09 14:01 ` [PATCH 1/4] KVM: MMU: Clean up the error handling of walk_addr_generic() Takuya Yoshikawa
2011-06-12 15:45 ` Avi Kivity
2011-06-09 14:02 ` [PATCH 2/4] KVM: MMU: Move some variables into the walk loop Takuya Yoshikawa
2011-06-09 14:03 ` [PATCH 3/4] KVM: MMU: Update walker->pt/pte_access directly Takuya Yoshikawa
2011-06-09 14:05 ` [PATCH 4/4] KVM: MMU: Split out the main body of walk_addr_generic() Takuya Yoshikawa
2011-06-09 14:18 ` Ingo Molnar
2011-06-12 15:47 ` Avi Kivity [this message]
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=4DF4DFA6.40807@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mtosatti@redhat.com \
--cc=takuya.yoshikawa@gmail.com \
--cc=yoshikawa.takuya@oss.ntt.co.jp \
/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