lkml.org 
[lkml]   [2022]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v10 105/108] KVM: TDX: Add methods to ignore accesses to CPU state
Date
On Sat, 2022-10-29 at 23:23 -0700, isaku.yamahata@intel.com wrote:
> +static u8 vt_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio)
> +{
> + if (is_td_vcpu(vcpu)) {
> + if (is_mmio)
> + return MTRR_TYPE_UNCACHABLE << VMX_EPT_MT_EPTE_SHIFT;
> + return  MTRR_TYPE_WRBACK << VMX_EPT_MT_EPTE_SHIFT;
> + }
> +
> + return vmx_get_mt_mask(vcpu, gfn, is_mmio);
> +}

So you are returning WB for _ALL_ guest memory, including shared. Wouldn't this
break MTRR handling for shared memory? For instance, IIUC we can still support
assigning a device to a TDX guest while the VT-d doesn't support coherent
memory, in which case guest's MTRR/PAT are honored. I think this should also
apply to TDX guest's shared memory?

\
 
 \ /
  Last update: 2022-12-14 12:45    [W:1.479 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site