Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1181153
| From | Xiao Guangrong <guangrong.xiao@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/4] KVM: SVM: use NPT page attributes |
| Date | 2015-07-10 03:30 +0200 |
| Message-ID | <pKvix-7Kt-1@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <pJBq1-6gd-5@gated-at.bofh.it> <pJQIq-7xL-9@gated-at.bofh.it> <pJVI7-24h-31@gated-at.bofh.it> <pK9UJ-2Sw-5@gated-at.bofh.it> <pKlMd-1Mu-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/09/2015 11:18 PM, Paolo Bonzini wrote:
>
>
> On 09/07/2015 04:30, Xiao Guangrong wrote:
>>>>> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
>>>>> index 602b974a60a6..0f125c1860ec 100644
>>>>> --- a/arch/x86/kvm/svm.c
>>>>> +++ b/arch/x86/kvm/svm.c
>>>>> @@ -1085,6 +1085,47 @@ static u64 svm_compute_tsc_offset(struct
>>>>> kvm_vcpu *vcpu, u64 target_tsc)
>>>>> return target_tsc - tsc;
>>>>> }
>>>>>
>>>>> +static void svm_set_guest_pat(struct vcpu_svm *svm, u64 *g_pat)
>>>>> +{
>>>>> + struct kvm_vcpu *vcpu = &svm->vcpu;
>>>>> +
>>>>> + /* Unlike Intel, AMD takes the guest's CR0.CD into account.
>>>>
>>>> I noticed this code in svm_set_cr0():
>>>>
>>>> if (!(vcpu->kvm->arch.disabled_quirks & KVM_QUIRK_CD_NW_CLEARED))
>>>> cr0 &= ~(X86_CR0_CD | X86_CR0_NW);
>>>>
>>>> gCR0.CD is hidden to CPU if KVM_QUIRK_CD_NW_CLEARED is not set and looks
>>>> like it is the normal case after grepping Qemu code.
>
> Hi Xiao,
>
> yes, this is correct. QEMU still does not have support for disabling
> "quirks", so gCR0.CD is currently hidden on SVM. I would like to
> include this series in 4.2, while for 4.3 I will disable the quirk above
> altogether (it is superseded by the way PAT is forced to all-WB).
>
That plan sounds good to me.
You will drop disabled_quirks completely or just enable it in Qemu? :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 2/4] KVM: SVM: use NPT page attributes Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2015-07-10 03:30 +0200
csiph-web