KVM: How does is PAT emulation supposed to work?

2015-04-12 Thread Jan Kiszka
Hi all, while digging into the PAT topic for Jailhouse, I also wondered how KVM deals with it. And I'm still not getting it complete - or there is a bug: KVM intercepts all guest writes to the PAT MSR and instead keeps the guest value in vcpu-arch.pat. But, besides returning that value back on

Re: [PATCH v3] kvm: mmu: lazy collapse small sptes into large sptes

2015-04-12 Thread Xiao Guangrong
On 04/11/2015 02:05 AM, Andres Lagar-Cavilla wrote: On Fri, Apr 3, 2015 at 12:40 AM, Wanpeng Li wanpeng...@linux.intel.com wrote: There are two scenarios for the requirement of collapsing small sptes into large sptes. - dirty logging tracks sptes in 4k granularity, so large sptes are split,

Re: XP machine freeze

2015-04-12 Thread Brad Campbell
On 31/03/15 05:11, Paolo Bonzini wrote: On 22/03/2015 16:31, Brad Campbell wrote: No help I'm afraid, but at least I can conclusively say that 3.16 is good, and 3.17 is bad. Can you try more specifically around the first KVM pull request? That would be between c9b88e958182 (presumed good)

[Qemu-devel][PATCH 1/2] target-i386: disable LINT0 after reset

2015-04-12 Thread Nadav Amit
Due to old Seabios bug, QEMU reenable LINT0 after reset. This bug is long gone and therefore this hack is no longer needed. Since it violates the specifications, it is removed. Signed-off-by: Nadav Amit na...@cs.technion.ac.il --- hw/intc/apic_common.c | 9 - 1 file changed, 9

[Qemu-devel][PATCH 0/2] target-i386: disable LINT0 after reset and init

2015-04-12 Thread Nadav Amit
LINT0 is currently reenabled after reset to circumvent old seabios bug, which violates x86 specifications. This patch-set handles this issue, by removing the old hack from qemu and reporting to kvm that this quirk is no longer needed. In addition, we disable another kvm quirk that clears CD and

[Qemu-devel][PATCH 2/2] target-i386: kvm: Disable KVM quirks

2015-04-12 Thread Nadav Amit
KVM has quirks to overcome legacy QEMU bugs that are already resolved. Using a new KVM feature for disabling these quirks. Signed-off-by: Nadav Amit na...@cs.technion.ac.il --- linux-headers/asm-x86/kvm.h | 4 linux-headers/linux/kvm.h | 1 + target-i386/kvm.c | 8 3

[PATCH] KVM: x86: Fix MSR_IA32_BNDCFGS in msrs_to_save

2015-04-12 Thread Nadav Amit
kvm_init_msr_list is currently called before hardware_setup. As a result, vmx_mpx_supported always returns false when kvm_init_msr_list checks whether to save MSR_IA32_BNDCFGS. Move kvm_init_msr_list after vmx_hardware_setup is called to fix this issue. Signed-off-by: Nadav Amit

Re: x86: Question regarding the reset value of LINT0

2015-04-12 Thread Nadav Amit
Paolo Bonzini pbonz...@redhat.com wrote: On 09/04/2015 21:17, Bandan Das wrote: Excluding (1) all of the other issues are related to the VM BIOS. Perhaps KVM should somehow realize which VM BIOS runs? (yes, it sounds just as bad.) How about renaming the toggle Avi mentioned above to

[PATCH] KVM: x86: Support for disabling quirks

2015-04-12 Thread Nadav Amit
Introducing KVM_CAP_DISABLE_QUIRKS for disabling x86 quirks that were previous created in order to overcome QEMU issues. Those issue were mostly result of invalid VM BIOS. Currently there are two quirks that can be disabled: 1. KVM_QUIRK_LINT0_REENABLED - LINT0 was enabled after boot 2.