login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
27
Re: [PATCH 12/22] KVM: MMU: Implement nested gva_to_gpa functions
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Avi Kivity
Subject:
Re: [PATCH 12/22] KVM: MMU: Implement nested gva_to_gpa functions
Date: Tuesday, April 27, 2010 - 5:37 am
On 04/27/2010 01:38 PM, Joerg Roedel wrote:
quoted text
> This patch adds the functions to do a nested l2_gva to > l1_gpa page table walk. > > Signed-off-by: Joerg Roedel<joerg.roedel@amd.com> > --- > arch/x86/include/asm/kvm_host.h | 4 ++++ > arch/x86/kvm/mmu.c | 8 ++++++++ > arch/x86/kvm/paging_tmpl.h | 31 +++++++++++++++++++++++++++++++ > 3 files changed, 43 insertions(+), 0 deletions(-) > > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > index ccdbd2f..3cbfb51 100644 > --- a/arch/x86/include/asm/kvm_host.h > +++ b/arch/x86/include/asm/kvm_host.h > @@ -287,6 +287,10 @@ struct kvm_vcpu_arch { > bool tpr_access_reporting; > > struct kvm_mmu mmu; > + > + /* Used for two dimensional paging emulation */ > + struct kvm_mmu nested_mmu; > + > /* only needed in kvm_pv_mmu_op() path, but it's hot so > * put it here to avoid allocation */ > struct kvm_pv_mmu_op_buffer mmu_op_buffer; > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > index 4e0bfdb..8bd40b5 100644 > --- a/arch/x86/kvm/mmu.c > +++ b/arch/x86/kvm/mmu.c > @@ -2144,6 +2144,14 @@ static gpa_t nonpaging_gva_to_gpa(struct kvm_vcpu *vcpu, gva_t vaddr, > return vaddr; > } > > +static gpa_t nonpaging_gva_to_gpa_nested(struct kvm_vcpu *vcpu, gva_t vaddr, > + u32 access, u32 *error) > +{ > + if (error) > + *error = 0; >
Why allow error == NULL?
quoted text
> > +static gpa_t FNAME(gva_to_gpa_nested)(struct kvm_vcpu *vcpu, gva_t vaddr, > + u32 access, u32 *error) > +{ > + struct guest_walker walker; > + gpa_t gpa = UNMAPPED_GVA; > + int r; > + > + r = FNAME(walk_addr_nested)(&walker, vcpu, vaddr, > + !!(access& PFERR_WRITE_MASK), > + !!(access& PFERR_USER_MASK), > + !!(access& PFERR_FETCH_MASK)); >
Those !! are unneeded. -- error compiling committee.c: too many arguments to function --
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 0/22] Nested Paging support for Nested SVM v2
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 01/22] KVM: MMU: Check for root_level instead of lo ...
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 03/22] KVM: MMU: Make set_cr3 a function pointer in ...
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 07/22] KVM: SVM: Implement MMU helper functions for ...
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 09/22] KVM: MMU: Let is_rsvd_bits_set take mmu cont ...
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 11/22] KVM: MMU: Add infrastructure for two-level p ...
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 13/22] KVM: X86: Add kvm_read_guest_page_tdp function
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 14/22] KVM: MMU: Make walk_addr_generic capable for ...
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 16/22] KVM: MMU: Track page fault data in struct vcpu
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 19/22] KVM: MMU: Introduce init_kvm_nested_mmu()
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 20/22] KVM: SVM: Initialize Nested Nested MMU conte ...
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
[PATCH 21/22] KVM: SVM: Report Nested Paging support to us ...
, Joerg Roedel
, (Tue Apr 27, 3:38 am)
Re: [PATCH 02/22] KVM: MMU: Make tdp_enabled a mmu-context ...
, Avi Kivity
, (Tue Apr 27, 5:06 am)
Re: [PATCH 11/22] KVM: MMU: Add infrastructure for two-lev ...
, Avi Kivity
, (Tue Apr 27, 5:34 am)
Re: [PATCH 12/22] KVM: MMU: Implement nested gva_to_gpa fu ...
, Avi Kivity
, (Tue Apr 27, 5:37 am)
Re: [PATCH 13/22] KVM: X86: Add kvm_read_guest_page_tdp fu ...
, Avi Kivity
, (Tue Apr 27, 5:42 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Avi Kivity
, (Tue Apr 27, 5:58 am)
Re: [PATCH 20/22] KVM: SVM: Initialize Nested Nested MMU c ...
, Avi Kivity
, (Tue Apr 27, 6:01 am)
Re: [PATCH 0/22] Nested Paging support for Nested SVM v2
, Avi Kivity
, (Tue Apr 27, 6:03 am)
Re: [PATCH 13/22] KVM: X86: Add kvm_read_guest_page_tdp fu ...
, Joerg Roedel
, (Tue Apr 27, 6:10 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Joerg Roedel
, (Tue Apr 27, 6:28 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Avi Kivity
, (Tue Apr 27, 6:37 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Joerg Roedel
, (Tue Apr 27, 6:57 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Avi Kivity
, (Tue Apr 27, 9:02 am)
Re: [PATCH 11/22] KVM: MMU: Add infrastructure for two-lev ...
, Joerg Roedel
, (Wed Apr 28, 3:52 am)
Re: [PATCH 11/22] KVM: MMU: Add infrastructure for two-lev ...
, Joerg Roedel
, (Wed Apr 28, 4:03 am)
Re: [PATCH 11/22] KVM: MMU: Add infrastructure for two-lev ...
, Avi Kivity
, (Wed Apr 28, 4:09 am)
Re: [PATCH 11/22] KVM: MMU: Add infrastructure for two-lev ...
, Avi Kivity
, (Wed Apr 28, 4:24 am)
Re: [PATCH 12/22] KVM: MMU: Implement nested gva_to_gpa fu ...
, Joerg Roedel
, (Wed Apr 28, 7:20 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Joerg Roedel
, (Mon May 3, 9:32 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Avi Kivity
, (Tue May 4, 12:53 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Roedel, Joerg
, (Tue May 4, 2:11 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Avi Kivity
, (Tue May 4, 2:20 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Roedel, Joerg
, (Tue May 4, 2:37 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Avi Kivity
, (Tue May 4, 2:45 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Avi Kivity
, (Tue May 4, 2:50 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Roedel, Joerg
, (Tue May 4, 5:00 am)
Re: [PATCH 16/22] KVM: MMU: Track page fault data in struc ...
, Avi Kivity
, (Tue May 4, 5:04 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 20/36] Driver core: Call device_pm_add() after bus_add_device() in device_a...
Oleg Nesterov
Re: init's children list is long and slows reaping children.
kogiidena
[PATCH 1/1] leds: LED Bitpattern Trigger
Stefan Richter
Re: [patch 00/04] RFC: Staging tree (drivers/staging)
David Miller
Re: [Ksummit-2008-discuss] Fixing the Kernel Janitors project
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Christian Stimming
git-gui: Fix broken revert confirmation.
Junio C Hamano
Re: git-svnimport
Anuj Gakhar
Git Architecture Question
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
linux-netdev
:
Gerrit Renker
v2 [PATCH 1/4] dccp: Limit feature negotiation to connection setup phase
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
[ARM] dma: use new dmabounce_sync_for_xxx() for dma_sync_single_xxx()
Linux Kernel Mailing List
MIPS: Cavium: Remove unused watchdog code.
Linux Kernel Mailing List
V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
openbsd-misc
:
Christophe Rioux
Implementation example of snmp
Ryan McBride
Re: Packets Per Second Limit?
Nick Holland
Re: booting openbsd on eee without cd-rom
Bryan Irvine
Re: OpenBSD 4.7 Released, May 19 2010
Jacob Yocom-Piatt
Re: Same shit all over again
Colocation donated by:
Syndicate