Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm into next
Pull KVM updates from Paolo Bonzini: "At over 200 commits, covering almost all supported architectures, this was a pretty active cycle for KVM. Changes include: - a lot of s390 changes: optimizations, support for migration, GDB support and more - ARM changes are pretty small: support for the PSCI 0.2 hypercall interface on both the guest and the host (the latter acked by Catalin) - initial POWER8 and little-endian host support - support for running u-boot on embedded POWER targets - pretty large changes to MIPS too, completing the userspace interface and improving the handling of virtualized timer hardware - for x86, a larger set of changes is scheduled for 3.17. Still, we have a few emulator bugfixes and support for running nested fully-virtualized Xen guests (para-virtualized Xen guests have always worked). And some optimizations too. The only missing architecture here is ia64. It's not a coincidence that support for KVM on ia64 is scheduled for removal in 3.17" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (203 commits) KVM: add missing cleanup_srcu_struct KVM: PPC: Book3S PR: Rework SLB switching code KVM: PPC: Book3S PR: Use SLB entry 0 KVM: PPC: Book3S HV: Fix machine check delivery to guest KVM: PPC: Book3S HV: Work around POWER8 performance monitor bugs KVM: PPC: Book3S HV: Make sure we don't miss dirty pages KVM: PPC: Book3S HV: Fix dirty map for hugepages KVM: PPC: Book3S HV: Put huge-page HPTEs in rmap chain for base address KVM: PPC: Book3S HV: Fix check for running inside guest in global_invalidates() KVM: PPC: Book3S: Move KVM_REG_PPC_WORT to an unused register number KVM: PPC: Book3S: Add ONE_REG register names that were missed KVM: PPC: Add CAP to indicate hcall fixes KVM: PPC: MPIC: Reset IRQ source private members KVM: PPC: Graciously fail broken LE hypercalls PPC: ePAPR: Fix hypercall on LE guest KVM: PPC: BOOK3S: Remove open coded make_dsisr in alignment handler KVM: PPC: BOOK3S: Always use the saved DAR value PPC: KVM: Make NX bit available with magic page KVM: PPC: Disable NX for old magic page using guests KVM: PPC: BOOK3S: HV: Add mixed page-size support for guest ...
Šī revīzija ir iekļauta:
@@ -25,14 +25,13 @@
|
||||
#include <asm/cputable.h>
|
||||
#include <asm/emulated_ops.h>
|
||||
#include <asm/switch_to.h>
|
||||
#include <asm/disassemble.h>
|
||||
|
||||
struct aligninfo {
|
||||
unsigned char len;
|
||||
unsigned char flags;
|
||||
};
|
||||
|
||||
#define IS_XFORM(inst) (((inst) >> 26) == 31)
|
||||
#define IS_DSFORM(inst) (((inst) >> 26) >= 56)
|
||||
|
||||
#define INVALID { 0, 0 }
|
||||
|
||||
@@ -191,37 +190,6 @@ static struct aligninfo aligninfo[128] = {
|
||||
INVALID, /* 11 1 1111 */
|
||||
};
|
||||
|
||||
/*
|
||||
* Create a DSISR value from the instruction
|
||||
*/
|
||||
static inline unsigned make_dsisr(unsigned instr)
|
||||
{
|
||||
unsigned dsisr;
|
||||
|
||||
|
||||
/* bits 6:15 --> 22:31 */
|
||||
dsisr = (instr & 0x03ff0000) >> 16;
|
||||
|
||||
if (IS_XFORM(instr)) {
|
||||
/* bits 29:30 --> 15:16 */
|
||||
dsisr |= (instr & 0x00000006) << 14;
|
||||
/* bit 25 --> 17 */
|
||||
dsisr |= (instr & 0x00000040) << 8;
|
||||
/* bits 21:24 --> 18:21 */
|
||||
dsisr |= (instr & 0x00000780) << 3;
|
||||
} else {
|
||||
/* bit 5 --> 17 */
|
||||
dsisr |= (instr & 0x04000000) >> 12;
|
||||
/* bits 1: 4 --> 18:21 */
|
||||
dsisr |= (instr & 0x78000000) >> 17;
|
||||
/* bits 30:31 --> 12:13 */
|
||||
if (IS_DSFORM(instr))
|
||||
dsisr |= (instr & 0x00000003) << 18;
|
||||
}
|
||||
|
||||
return dsisr;
|
||||
}
|
||||
|
||||
/*
|
||||
* The dcbz (data cache block zero) instruction
|
||||
* gives an alignment fault if used on non-cacheable
|
||||
|
@@ -54,6 +54,7 @@
|
||||
#endif
|
||||
#if defined(CONFIG_KVM) && defined(CONFIG_PPC_BOOK3S)
|
||||
#include <asm/kvm_book3s.h>
|
||||
#include <asm/kvm_ppc.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC32
|
||||
@@ -445,7 +446,9 @@ int main(void)
|
||||
DEFINE(VCPU_XER, offsetof(struct kvm_vcpu, arch.xer));
|
||||
DEFINE(VCPU_CTR, offsetof(struct kvm_vcpu, arch.ctr));
|
||||
DEFINE(VCPU_LR, offsetof(struct kvm_vcpu, arch.lr));
|
||||
#ifdef CONFIG_PPC_BOOK3S
|
||||
DEFINE(VCPU_TAR, offsetof(struct kvm_vcpu, arch.tar));
|
||||
#endif
|
||||
DEFINE(VCPU_CR, offsetof(struct kvm_vcpu, arch.cr));
|
||||
DEFINE(VCPU_PC, offsetof(struct kvm_vcpu, arch.pc));
|
||||
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
|
||||
@@ -467,6 +470,9 @@ int main(void)
|
||||
DEFINE(VCPU_SHARED, offsetof(struct kvm_vcpu, arch.shared));
|
||||
DEFINE(VCPU_SHARED_MSR, offsetof(struct kvm_vcpu_arch_shared, msr));
|
||||
DEFINE(VCPU_SHADOW_MSR, offsetof(struct kvm_vcpu, arch.shadow_msr));
|
||||
#if defined(CONFIG_PPC_BOOK3S_64) && defined(CONFIG_KVM_BOOK3S_PR_POSSIBLE)
|
||||
DEFINE(VCPU_SHAREDBE, offsetof(struct kvm_vcpu, arch.shared_big_endian));
|
||||
#endif
|
||||
|
||||
DEFINE(VCPU_SHARED_MAS0, offsetof(struct kvm_vcpu_arch_shared, mas0));
|
||||
DEFINE(VCPU_SHARED_MAS1, offsetof(struct kvm_vcpu_arch_shared, mas1));
|
||||
@@ -493,7 +499,6 @@ int main(void)
|
||||
DEFINE(VCPU_DAR, offsetof(struct kvm_vcpu, arch.shregs.dar));
|
||||
DEFINE(VCPU_VPA, offsetof(struct kvm_vcpu, arch.vpa.pinned_addr));
|
||||
DEFINE(VCPU_VPA_DIRTY, offsetof(struct kvm_vcpu, arch.vpa.dirty));
|
||||
DEFINE(VCPU_INTR_MSR, offsetof(struct kvm_vcpu, arch.intr_msr));
|
||||
#endif
|
||||
#ifdef CONFIG_PPC_BOOK3S
|
||||
DEFINE(VCPU_VCPUID, offsetof(struct kvm_vcpu, vcpu_id));
|
||||
@@ -528,11 +533,13 @@ int main(void)
|
||||
DEFINE(VCPU_SLB_NR, offsetof(struct kvm_vcpu, arch.slb_nr));
|
||||
DEFINE(VCPU_FAULT_DSISR, offsetof(struct kvm_vcpu, arch.fault_dsisr));
|
||||
DEFINE(VCPU_FAULT_DAR, offsetof(struct kvm_vcpu, arch.fault_dar));
|
||||
DEFINE(VCPU_INTR_MSR, offsetof(struct kvm_vcpu, arch.intr_msr));
|
||||
DEFINE(VCPU_LAST_INST, offsetof(struct kvm_vcpu, arch.last_inst));
|
||||
DEFINE(VCPU_TRAP, offsetof(struct kvm_vcpu, arch.trap));
|
||||
DEFINE(VCPU_CFAR, offsetof(struct kvm_vcpu, arch.cfar));
|
||||
DEFINE(VCPU_PPR, offsetof(struct kvm_vcpu, arch.ppr));
|
||||
DEFINE(VCPU_FSCR, offsetof(struct kvm_vcpu, arch.fscr));
|
||||
DEFINE(VCPU_SHADOW_FSCR, offsetof(struct kvm_vcpu, arch.shadow_fscr));
|
||||
DEFINE(VCPU_PSPB, offsetof(struct kvm_vcpu, arch.pspb));
|
||||
DEFINE(VCPU_EBBHR, offsetof(struct kvm_vcpu, arch.ebbhr));
|
||||
DEFINE(VCPU_EBBRR, offsetof(struct kvm_vcpu, arch.ebbrr));
|
||||
@@ -614,6 +621,7 @@ int main(void)
|
||||
#ifdef CONFIG_PPC64
|
||||
SVCPU_FIELD(SVCPU_SLB, slb);
|
||||
SVCPU_FIELD(SVCPU_SLB_MAX, slb_max);
|
||||
SVCPU_FIELD(SVCPU_SHADOW_FSCR, shadow_fscr);
|
||||
#endif
|
||||
|
||||
HSTATE_FIELD(HSTATE_HOST_R1, host_r1);
|
||||
@@ -649,6 +657,7 @@ int main(void)
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
HSTATE_FIELD(HSTATE_CFAR, cfar);
|
||||
HSTATE_FIELD(HSTATE_PPR, ppr);
|
||||
HSTATE_FIELD(HSTATE_HOST_FSCR, host_fscr);
|
||||
#endif /* CONFIG_PPC_BOOK3S_64 */
|
||||
|
||||
#else /* CONFIG_PPC_BOOK3S */
|
||||
|
@@ -47,9 +47,10 @@ static int __init early_init_dt_scan_epapr(unsigned long node,
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < (len / 4); i++) {
|
||||
patch_instruction(epapr_hypercall_start + i, insts[i]);
|
||||
u32 inst = be32_to_cpu(insts[i]);
|
||||
patch_instruction(epapr_hypercall_start + i, inst);
|
||||
#if !defined(CONFIG_64BIT) || defined(CONFIG_PPC_BOOK3E_64)
|
||||
patch_instruction(epapr_ev_idle_start + i, insts[i]);
|
||||
patch_instruction(epapr_ev_idle_start + i, inst);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -417,7 +417,7 @@ static void kvm_map_magic_page(void *data)
|
||||
ulong out[8];
|
||||
|
||||
in[0] = KVM_MAGIC_PAGE;
|
||||
in[1] = KVM_MAGIC_PAGE;
|
||||
in[1] = KVM_MAGIC_PAGE | MAGIC_PAGE_FLAG_NOT_MAPPED_NX;
|
||||
|
||||
epapr_hypercall(in, out, KVM_HCALL_TOKEN(KVM_HC_PPC_MAP_MAGIC_PAGE));
|
||||
|
||||
|
@@ -98,6 +98,9 @@ static inline void free_lppacas(void) { }
|
||||
/*
|
||||
* 3 persistent SLBs are registered here. The buffer will be zero
|
||||
* initially, hence will all be invaild until we actually write them.
|
||||
*
|
||||
* If you make the number of persistent SLB entries dynamic, please also
|
||||
* update PR KVM to flush and restore them accordingly.
|
||||
*/
|
||||
static struct slb_shadow *slb_shadow;
|
||||
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user