-
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: 215682 b: refs/heads/master c: 2a342ed h: refs/heads/master v: v3
- Loading branch information
Alexander Graf
authored and
Avi Kivity
committed
Oct 24, 2010
1 parent
8099598
commit b105a9c
Showing
9 changed files
with
234 additions
and
5 deletions.
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: a73a9599e03eef1324d5aeecaebc1b339d2e1664 | ||
refs/heads/master: 2a342ed57756ad5d8af5456959433884367e5ab2 |
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
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,68 @@ | ||
/* | ||
* Copyright (C) 2010 SUSE Linux Products GmbH. All rights reserved. | ||
* | ||
* Authors: | ||
* Alexander Graf <agraf@suse.de> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License, version 2, as | ||
* published by the Free Software Foundation. | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include <linux/kvm_host.h> | ||
#include <linux/init.h> | ||
#include <linux/kvm_para.h> | ||
#include <linux/slab.h> | ||
#include <linux/of.h> | ||
|
||
#include <asm/reg.h> | ||
#include <asm/kvm_ppc.h> | ||
#include <asm/sections.h> | ||
#include <asm/cacheflush.h> | ||
#include <asm/disassemble.h> | ||
|
||
unsigned long kvm_hypercall(unsigned long *in, | ||
unsigned long *out, | ||
unsigned long nr) | ||
{ | ||
unsigned long register r0 asm("r0"); | ||
unsigned long register r3 asm("r3") = in[0]; | ||
unsigned long register r4 asm("r4") = in[1]; | ||
unsigned long register r5 asm("r5") = in[2]; | ||
unsigned long register r6 asm("r6") = in[3]; | ||
unsigned long register r7 asm("r7") = in[4]; | ||
unsigned long register r8 asm("r8") = in[5]; | ||
unsigned long register r9 asm("r9") = in[6]; | ||
unsigned long register r10 asm("r10") = in[7]; | ||
unsigned long register r11 asm("r11") = nr; | ||
unsigned long register r12 asm("r12"); | ||
|
||
asm volatile("bl kvm_hypercall_start" | ||
: "=r"(r0), "=r"(r3), "=r"(r4), "=r"(r5), "=r"(r6), | ||
"=r"(r7), "=r"(r8), "=r"(r9), "=r"(r10), "=r"(r11), | ||
"=r"(r12) | ||
: "r"(r3), "r"(r4), "r"(r5), "r"(r6), "r"(r7), "r"(r8), | ||
"r"(r9), "r"(r10), "r"(r11) | ||
: "memory", "cc", "xer", "ctr", "lr"); | ||
|
||
out[0] = r4; | ||
out[1] = r5; | ||
out[2] = r6; | ||
out[3] = r7; | ||
out[4] = r8; | ||
out[5] = r9; | ||
out[6] = r10; | ||
out[7] = r11; | ||
|
||
return r3; | ||
} | ||
EXPORT_SYMBOL_GPL(kvm_hypercall); |
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
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