Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
4c07b0a4
Commit
4c07b0a4
authored
Dec 20, 2009
by
Avi Kivity
Committed by
Marcelo Tosatti
Mar 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KVM: Remove ifdefs from mmu notifier initialization
Signed-off-by:
Avi Kivity
<
avi@redhat.com
>
parent
3f0852e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
virt/kvm/kvm_main.c
virt/kvm/kvm_main.c
+15
-5
No files found.
virt/kvm/kvm_main.c
View file @
4c07b0a4
...
@@ -341,6 +341,20 @@ static const struct mmu_notifier_ops kvm_mmu_notifier_ops = {
...
@@ -341,6 +341,20 @@ static const struct mmu_notifier_ops kvm_mmu_notifier_ops = {
.
change_pte
=
kvm_mmu_notifier_change_pte
,
.
change_pte
=
kvm_mmu_notifier_change_pte
,
.
release
=
kvm_mmu_notifier_release
,
.
release
=
kvm_mmu_notifier_release
,
};
};
static
int
kvm_init_mmu_notifier
(
struct
kvm
*
kvm
)
{
kvm
->
mmu_notifier
.
ops
=
&
kvm_mmu_notifier_ops
;
return
mmu_notifier_register
(
&
kvm
->
mmu_notifier
,
current
->
mm
);
}
#else
/* !(CONFIG_MMU_NOTIFIER && KVM_ARCH_WANT_MMU_NOTIFIER) */
static
int
kvm_init_mmu_notifier
(
struct
kvm
*
kvm
)
{
return
0
;
}
#endif
/* CONFIG_MMU_NOTIFIER && KVM_ARCH_WANT_MMU_NOTIFIER */
#endif
/* CONFIG_MMU_NOTIFIER && KVM_ARCH_WANT_MMU_NOTIFIER */
static
struct
kvm
*
kvm_create_vm
(
void
)
static
struct
kvm
*
kvm_create_vm
(
void
)
...
@@ -373,11 +387,7 @@ static struct kvm *kvm_create_vm(void)
...
@@ -373,11 +387,7 @@ static struct kvm *kvm_create_vm(void)
(
struct
kvm_coalesced_mmio_ring
*
)
page_address
(
page
);
(
struct
kvm_coalesced_mmio_ring
*
)
page_address
(
page
);
#endif
#endif
#if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER)
r
=
kvm_init_mmu_notifier
(
kvm
);
kvm
->
mmu_notifier
.
ops
=
&
kvm_mmu_notifier_ops
;
r
=
mmu_notifier_register
(
&
kvm
->
mmu_notifier
,
current
->
mm
);
#endif
if
(
r
)
{
if
(
r
)
{
#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
#ifdef KVM_COALESCED_MMIO_PAGE_OFFSET
put_page
(
page
);
put_page
(
page
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment