Merge tag 'kvm-3.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM updates from Marcelo Tosatti: "KVM updates for the 3.9 merge window, including x86 real mode emulation fixes, stronger memory slot interface restrictions, mmu_lock spinlock hold time reduction, improved handling of large page faults on shadow, initial APICv HW acceleration support, s390 channel IO based virtio, amongst others" * tag 'kvm-3.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (143 commits) Revert "KVM: MMU: lazily drop large spte" x86: pvclock kvm: align allocation size to page size KVM: nVMX: Remove redundant get_vmcs12 from nested_vmx_exit_handled_msr x86 emulator: fix parity calculation for AAD instruction KVM: PPC: BookE: Handle alignment interrupts booke: Added DBCR4 SPR number KVM: PPC: booke: Allow multiple exception types KVM: PPC: booke: use vcpu reference from thread_struct KVM: Remove user_alloc from struct kvm_memory_slot KVM: VMX: disable apicv by default KVM: s390: Fix handling of iscs. KVM: MMU: cleanup __direct_map KVM: MMU: remove pt_access in mmu_set_spte KVM: MMU: cleanup mapping-level KVM: MMU: lazily drop large spte KVM: VMX: cleanup vmx_set_cr0(). KVM: VMX: add missing exit names to VMX_EXIT_REASONS array KVM: VMX: disable SMEP feature when guest is in non-paging mode KVM: Remove duplicate text in api.txt Revert "KVM: MMU: split kvm_mmu_free_page" ...
This commit is contained in:
@@ -421,6 +421,26 @@ static void kvm_extint_handler(struct ext_code ext_code,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* For s390-virtio, we expect a page above main storage containing
|
||||
* the virtio configuration. Try to actually load from this area
|
||||
* in order to figure out if the host provides this page.
|
||||
*/
|
||||
static int __init test_devices_support(unsigned long addr)
|
||||
{
|
||||
int ret = -EIO;
|
||||
|
||||
asm volatile(
|
||||
"0: lura 0,%1\n"
|
||||
"1: xgr %0,%0\n"
|
||||
"2:\n"
|
||||
EX_TABLE(0b,2b)
|
||||
EX_TABLE(1b,2b)
|
||||
: "+d" (ret)
|
||||
: "a" (addr)
|
||||
: "0", "cc");
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
* Init function for virtio
|
||||
* devices are in a single page above top of "normal" mem
|
||||
@@ -432,21 +452,23 @@ static int __init kvm_devices_init(void)
|
||||
if (!MACHINE_IS_KVM)
|
||||
return -ENODEV;
|
||||
|
||||
if (test_devices_support(real_memory_size) < 0)
|
||||
return -ENODEV;
|
||||
|
||||
rc = vmem_add_mapping(real_memory_size, PAGE_SIZE);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
kvm_devices = (void *) real_memory_size;
|
||||
|
||||
kvm_root = root_device_register("kvm_s390");
|
||||
if (IS_ERR(kvm_root)) {
|
||||
rc = PTR_ERR(kvm_root);
|
||||
printk(KERN_ERR "Could not register kvm_s390 root device");
|
||||
vmem_remove_mapping(real_memory_size, PAGE_SIZE);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = vmem_add_mapping(real_memory_size, PAGE_SIZE);
|
||||
if (rc) {
|
||||
root_device_unregister(kvm_root);
|
||||
return rc;
|
||||
}
|
||||
|
||||
kvm_devices = (void *) real_memory_size;
|
||||
|
||||
INIT_WORK(&hotplug_work, hotplug_devices);
|
||||
|
||||
service_subclass_irq_register();
|
||||
|
Reference in New Issue
Block a user