[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221216012951.GB527635@ls.amr.corp.intel.com>
Date: Thu, 15 Dec 2022 17:29:51 -0800
From: Isaku Yamahata <isaku.yamahata@...il.com>
To: Binbin Wu <binbin.wu@...ux.intel.com>
Cc: isaku.yamahata@...el.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, isaku.yamahata@...il.com,
Paolo Bonzini <pbonzini@...hat.com>, erdemaktas@...gle.com,
Sean Christopherson <seanjc@...gle.com>,
Sagi Shahar <sagis@...gle.com>,
David Matlack <dmatlack@...gle.com>
Subject: Re: [PATCH v10 098/108] KVM: TDX: Implement callbacks for MSR
operations for TDX
On Wed, Nov 23, 2022 at 10:25:11PM +0800,
Binbin Wu <binbin.wu@...ux.intel.com> wrote:
>
> On 10/30/2022 2:23 PM, isaku.yamahata@...el.com wrote:
> > From: Isaku Yamahata <isaku.yamahata@...el.com>
> >
> > Implements set_msr/get_msr/has_emulated_msr methods for TDX to handle
> > hypercall from guest TD for paravirtualized rdmsr and wrmsr. The TDX
> > module virtualizes MSRs. For some MSRs, it injects #VE to the guest TD
> > upon RDMSR or WRMSR. The exact list of such MSRs are defined in the spec.
>
> How does KVM handle the case that the userland wants to get the TD MSR list?
>
> KVM_GET_MSR_INDEX_LIST will return the global KVM MSR list, which is
> different from the TD version.
Do you mean user space VMM (e.g. qemu) by "the userland"?
There are three classes of MSRs virtualization.
- non-configurable: TDX module directly virtualizes it. VMM can't configure.
the value set by KVM_SET_MSR_INDEX_LIST is ignored.
- configurable: TDX module directly virtualizes it. VMM can configure at the
VM creation time.
the value set by KVM_SET_MSR_INDEX_LIST is used.
- #VE
VMM handles the MSR hypercall by guest TD issues. The value set by
KVM_SET_MSR_INDEX_LIST is used.
> > Upon #VE, the guest TD may execute hypercalls,
> > TDG.VP.VMCALL<INSTRUCTION.RDMSR> and TDG.VP.VMCALL<INSTRUCTION.WRMSR>,
> > which are defined in GHCI (Guest-Host Communication Interface) so that the
> > host VMM (e.g. KVM) can virtualizes
> can virtualize
Yes, will fix.
--
Isaku Yamahata <isaku.yamahata@...il.com>
Powered by blists - more mailing lists