login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
November
»
17
Re: [PATCH v2 5/6] KVM: MMU: remove 'clear_unsync' parameter
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Marcelo Tosatti
Subject:
Re: [PATCH v2 5/6] KVM: MMU: remove 'clear_unsync' parameter
Date: Wednesday, November 17, 2010 - 9:49 am
On Wed, Nov 17, 2010 at 12:13:17PM +0800, Xiao Guangrong wrote:
quoted text
> Remove it since we can jude it by sp->unsync > > Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> > --- > arch/x86/include/asm/kvm_host.h | 2 +- > arch/x86/kvm/mmu.c | 8 ++++---- > arch/x86/kvm/paging_tmpl.h | 5 ++--- > 3 files changed, 7 insertions(+), 8 deletions(-) > > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index b04c0fa..ce8c1e4 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -250,7 +250,7 @@ struct kvm_mmu { > void (*prefetch_page)(struct kvm_vcpu *vcpu, > struct kvm_mmu_page *page); > int (*sync_page)(struct kvm_vcpu *vcpu, > - struct kvm_mmu_page *sp, bool clear_unsync); > + struct kvm_mmu_page *sp); > void (*invlpg)(struct kvm_vcpu *vcpu, gva_t gva); > hpa_t root_hpa; > int root_level; > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > index c4531a3..0668f4b 100644 > --- a/arch/x86/kvm/mmu.c > +++ b/arch/x86/kvm/mmu.c > @@ -1162,7 +1162,7 @@ static void nonpaging_prefetch_page(struct kvm_vcpu *vcpu, > } > > static int nonpaging_sync_page(struct kvm_vcpu *vcpu, > - struct kvm_mmu_page *sp, bool clear_unsync) > + struct kvm_mmu_page *sp) > { > return 1; > } > @@ -1292,7 +1292,7 @@ static int __kvm_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, > if (clear_unsync) > kvm_unlink_unsync_page(vcpu->kvm, sp); > > - if (vcpu->arch.mmu.sync_page(vcpu, sp, clear_unsync)) { > + if (vcpu->arch.mmu.sync_page(vcpu, sp)) { > kvm_mmu_prepare_zap_page(vcpu->kvm, sp, invalid_list); > return 1; > } > @@ -1333,12 +1333,12 @@ static void kvm_sync_pages(struct kvm_vcpu *vcpu, gfn_t gfn) > continue; > > WARN_ON(s->role.level != PT_PAGE_TABLE_LEVEL); > + kvm_unlink_unsync_page(vcpu->kvm, s); > if ((s->role.cr4_pae != !!is_pae(vcpu)) || > - (vcpu->arch.mmu.sync_page(vcpu, s, true))) { > + (vcpu->arch.mmu.sync_page(vcpu, s))) { > kvm_mmu_prepare_zap_page(vcpu->kvm, s, &invalid_list); > continue; > } > - kvm_unlink_unsync_page(vcpu->kvm, s); > flush = true; > } > > diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h > index 57619ed..60f00db 100644 > --- a/arch/x86/kvm/paging_tmpl.h > +++ b/arch/x86/kvm/paging_tmpl.h > @@ -740,8 +740,7 @@ static void FNAME(prefetch_page)(struct kvm_vcpu *vcpu, > * - The spte has a reference to the struct page, so the pfn for a given gfn > * can't change unless all sptes pointing to it are nuked first. > */ > -static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, > - bool clear_unsync) > +static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp) > { > int i, offset, nr_present; > bool host_writable; > @@ -781,7 +780,7 @@ static int FNAME(sync_page)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, > u64 nonpresent; > > if (rsvd_bits_set || is_present_gpte(gpte) || > - !clear_unsync) > + sp->unsync) > nonpresent = shadow_trap_nonpresent_pte; > else > nonpresent = shadow_notrap_nonpresent_pte;
Its better to keep this explicit as a parameter. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH v2 1/6] KVM: MMU: fix forgot flush vcpu tlbs
, Xiao Guangrong
, (Tue Nov 16, 9:10 pm)
[PATCH v2 2/6] KVM: MMU: don't drop spte if overwrite it f ...
, Xiao Guangrong
, (Tue Nov 16, 9:10 pm)
[PATCH v2 3/6] KVM: MMU: don't mark spte notrap if reserve ...
, Xiao Guangrong
, (Tue Nov 16, 9:11 pm)
[PATCH v2 4/6] KVM: MMU: rename 'reset_host_protection' to ...
, Xiao Guangrong
, (Tue Nov 16, 9:12 pm)
[PATCH v2 5/6] KVM: MMU: remove 'clear_unsync' parameter
, Xiao Guangrong
, (Tue Nov 16, 9:13 pm)
[PATCH v2 6/6] KVM: MMU: cleanup update_pte, pte_prefetch ...
, Xiao Guangrong
, (Tue Nov 16, 9:13 pm)
Re: [PATCH v2 1/6] KVM: MMU: fix forgot flush vcpu tlbs
, Marcelo Tosatti
, (Wed Nov 17, 8:29 am)
Re: [PATCH v2 2/6] KVM: MMU: don't drop spte if overwrite ...
, Marcelo Tosatti
, (Wed Nov 17, 8:42 am)
Re: [PATCH v2 3/6] KVM: MMU: don't mark spte notrap if res ...
, Marcelo Tosatti
, (Wed Nov 17, 8:56 am)
Re: [PATCH v2 2/6] KVM: MMU: don't drop spte if overwrite ...
, Avi Kivity
, (Wed Nov 17, 8:57 am)
Re: [PATCH v2 4/6] KVM: MMU: rename 'reset_host_protection ...
, Marcelo Tosatti
, (Wed Nov 17, 8:58 am)
Re: [PATCH v2 1/6] KVM: MMU: fix forgot flush vcpu tlbs
, Avi Kivity
, (Wed Nov 17, 9:26 am)
Re: [PATCH v2 5/6] KVM: MMU: remove 'clear_unsync' parameter
, Marcelo Tosatti
, (Wed Nov 17, 9:49 am)
Re: [PATCH v2 6/6] KVM: MMU: cleanup update_pte, pte_prefe ...
, Marcelo Tosatti
, (Wed Nov 17, 9:55 am)
Re: [PATCH v2 1/6] KVM: MMU: fix forgot flush vcpu tlbs
, Marcelo Tosatti
, (Wed Nov 17, 10:36 am)
Re: [PATCH v2 2/6] KVM: MMU: don't drop spte if overwrite ...
, Xiao Guangrong
, (Thu Nov 18, 12:12 am)
Re: [PATCH v2 1/6] KVM: MMU: fix forgot flush vcpu tlbs
, Xiao Guangrong
, (Thu Nov 18, 12:17 am)
Re: [PATCH v2 1/6] KVM: MMU: fix forgot flush vcpu tlbs
, Avi Kivity
, (Thu Nov 18, 2:32 am)
Re: [PATCH v2 2/6] KVM: MMU: don't drop spte if overwrite ...
, Marcelo Tosatti
, (Thu Nov 18, 8:32 am)
Re: [PATCH v2 5/6] KVM: MMU: remove 'clear_unsync' parameter
, Marcelo Tosatti
, (Thu Nov 18, 8:43 am)
Re: [PATCH v2 2/6] KVM: MMU: don't drop spte if overwrite ...
, Avi Kivity
, (Thu Nov 18, 9:41 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Michael Trimarchi
Re: [PATCH] VFS: make file->f_pos access atomic on 32bit arch
Miklos Szeredi
[patch 14/15] vfs: more path_permission() conversions
Serge E. Hallyn
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
Bernd Schmidt
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Takashi Iwai
[PATCH 2/2] input: Add LED support to Synaptics device
git
:
Junio C Hamano
Re: mingw, windows, crlf/lf, and git
Eyvind Bernhardsen
Re: Where has "git ls-remote" reference pattern matching gone?
Shawn O. Pearce
Re: Switching from CVS to GIT
Todd Zullinger
Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters
Santi Béjar
Re: How to use git-fmt-merge-msg?
linux-netdev
:
Ramkrishna Vepa
[net-2.6 PATCH 1/10] Neterion: New driver: Driver help file
Mark Anthony
invitation / inquiry
Ingo Molnar
Re: [PATCH 08/16] dma-debug: add core checking functions
David Miller
Re: [PATCH 1/3] f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Sascha Hauer
[PATCH 03/12] fec: do not typedef struct types
git-commits-head
:
Linux Kernel Mailing List
amba: struct device - replace bus_id with dev_name(), dev_set_name()
Linux Kernel Mailing List
MIPS: Yosemite: Convert SMP startup lock to arch spinlock.
Linux Kernel Mailing List
ARM: S5PC100: IRQ and timer
Linux Kernel Mailing List
davinci: edma: clear interrupt status for interrupt enabled channels only
Linux Kernel Mailing List
x86, mm, kprobes: fault.c, simplify notify_page_fault()
openbsd-misc
:
Daniel A. Ramaley
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Matthias Kilian
Re: can't get vesa @ 1280x800 or nv
Tobias Ulmer
Re: Problem after upgrade 4.5 to 4.6: ERR M
Philip Guenther
Re: SIGCHLD and libpthread.so
J.C. Roberts
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Colocation donated by:
Syndicate