-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 93824 b: refs/heads/master c: 0cf1bfd h: refs/heads/master v: v3
- Loading branch information
Marcelo Tosatti
authored and
Avi Kivity
committed
Apr 27, 2008
1 parent
b18bb34
commit 8b4d735
Showing
7 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: a28e4f5a621289fe0d9c8a461b0c256f9e17f3bc | ||
refs/heads/master: 0cf1bfd2737f41e59f974a61eab11af206d2042a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* KVM paravirt_ops implementation | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (C) 2007, Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | ||
* Copyright IBM Corporation, 2007 | ||
* Authors: Anthony Liguori <aliguori@us.ibm.com> | ||
*/ | ||
|
||
#include <linux/module.h> | ||
#include <linux/kernel.h> | ||
#include <linux/kvm_para.h> | ||
#include <linux/cpu.h> | ||
#include <linux/mm.h> | ||
|
||
/* | ||
* No need for any "IO delay" on KVM | ||
*/ | ||
static void kvm_io_delay(void) | ||
{ | ||
} | ||
|
||
static void paravirt_ops_setup(void) | ||
{ | ||
pv_info.name = "KVM"; | ||
pv_info.paravirt_enabled = 1; | ||
|
||
if (kvm_para_has_feature(KVM_FEATURE_NOP_IO_DELAY)) | ||
pv_cpu_ops.io_delay = kvm_io_delay; | ||
|
||
} | ||
|
||
void __init kvm_guest_init(void) | ||
{ | ||
if (!kvm_para_available()) | ||
return; | ||
|
||
paravirt_ops_setup(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters