-
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.
Merge branch 'for-upstream' of git://github.com/agraf/linux-2.6 into …
…next Alex says: "Changes this time include: - Generalize KVM_GUEST support to overall ePAPR code - Fix reset for Book3S HV - Fix machine check deferral when CONFIG_KVM_GUEST=y - Add support for BookE register DECAR" * 'for-upstream' of git://github.com/agraf/linux-2.6: KVM: PPC: Not optimizing MSR_CE and MSR_ME with paravirt. KVM: PPC: booke: Added DECAR support KVM: PPC: Book3S HV: Make the guest hash table size configurable KVM: PPC: Factor out guest epapr initialization Signed-off-by: Avi Kivity <avi@redhat.com>
- Loading branch information
Showing
21 changed files
with
306 additions
and
92 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
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
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,25 @@ | ||
/* | ||
* Copyright (C) 2012 Freescale Semiconductor, Inc. | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include <linux/threads.h> | ||
#include <asm/reg.h> | ||
#include <asm/page.h> | ||
#include <asm/cputable.h> | ||
#include <asm/thread_info.h> | ||
#include <asm/ppc_asm.h> | ||
#include <asm/asm-offsets.h> | ||
|
||
/* Hypercall entry point. Will be patched with device tree instructions. */ | ||
.global epapr_hypercall_start | ||
epapr_hypercall_start: | ||
li r3, -1 | ||
nop | ||
nop | ||
nop | ||
blr |
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 @@ | ||
/* | ||
* ePAPR para-virtualization support. | ||
* | ||
* 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. | ||
* | ||
* Copyright (C) 2012 Freescale Semiconductor, Inc. | ||
*/ | ||
|
||
#include <linux/of.h> | ||
#include <asm/epapr_hcalls.h> | ||
#include <asm/cacheflush.h> | ||
#include <asm/code-patching.h> | ||
|
||
bool epapr_paravirt_enabled; | ||
|
||
static int __init epapr_paravirt_init(void) | ||
{ | ||
struct device_node *hyper_node; | ||
const u32 *insts; | ||
int len, i; | ||
|
||
hyper_node = of_find_node_by_path("/hypervisor"); | ||
if (!hyper_node) | ||
return -ENODEV; | ||
|
||
insts = of_get_property(hyper_node, "hcall-instructions", &len); | ||
if (!insts) | ||
return -ENODEV; | ||
|
||
if (len % 4 || len > (4 * 4)) | ||
return -ENODEV; | ||
|
||
for (i = 0; i < (len / 4); i++) | ||
patch_instruction(epapr_hypercall_start + i, insts[i]); | ||
|
||
epapr_paravirt_enabled = true; | ||
|
||
return 0; | ||
} | ||
|
||
early_initcall(epapr_paravirt_init); |
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
Oops, something went wrong.