On 23/08/2015 11:53, Sebastian Schütte wrote:
>> What version of SeaBIOS?
> 1.8.2 stable, from the Arch repo
>> Can you try cherry-picking commit 5492830370171b6a4ede8a3bfba687a8d0f25fa5?
> Tried that, but it doesn't seem to make a difference.
>> If that fails, can you trace the execution of the VM until the beginning
>> of the Linux kernel boot (http://www.linux-kvm.org/page/Tracing) and
>> send it compressed to me by email?
> I have attached a trace up to the point when the Windows bootloader
> kicks in. I could still set up a Linux VM if you think its trace would
> be more helpful, though.

No, it seems to be in the BIOS.  Please try this:

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 74d825716f4f..f8f69cffecbf 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -882,7 +882,8 @@ static u8 fallback_mtrr_type(int mtrr)
        case MTRR_TYPE_WRTHROUGH:
                return MTRR_TYPE_UNCACHABLE;
        case MTRR_TYPE_WRPROT:
-               return MTRR_TYPE_UC_MINUS;
+               /* Assume it's backed by RAM in the host.  */
+               return MTRR_TYPE_WRBACK;
        default:
                BUG();
        }
@@ -3054,6 +3055,7 @@ static int cr_interception(struct vcpu_svm *svm)
        if (cr >= 16) { /* mov to cr */
                cr -= 16;
                val = kvm_register_read(&svm->vcpu, reg);
+               trace_kvm_cr_write(cr, val);
                switch (cr) {
                case 0:
                        if (!check_selective_cr0_intercepted(svm, val))


This is a bit of a hack, but it can be enough for a test.  For a
real patch one would make mtrr2protval bidimensional, accessing it
like "return mtrr2protval[is_mmio][mtrr]" in svm_get_mt_mask.
Then you can return MTRR_TYPE_UC_MINUS if is_mmio, and
MTRR_TYPE_WRBACK if !is_mmio.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to