[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec60ba8e-3ed9-1d06-d8c2-4db9529daf93@intel.com>
Date: Tue, 12 Apr 2022 14:49:20 +0800
From: Xiaoyao Li <xiaoyao.li@...el.com>
To: isaku.yamahata@...el.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: isaku.yamahata@...il.com, Paolo Bonzini <pbonzini@...hat.com>,
Jim Mattson <jmattson@...gle.com>, erdemaktas@...gle.com,
Connor Kuehl <ckuehl@...hat.com>,
Sean Christopherson <seanjc@...gle.com>
Subject: Re: [RFC PATCH v5 102/104] KVM: TDX: Add methods to ignore accesses
to CPU state
On 3/5/2022 3:49 AM, isaku.yamahata@...el.com wrote:
> From: Sean Christopherson <sean.j.christopherson@...el.com>
>
> TDX protects TDX guest state from VMM. Implements to access methods for
> TDX guest state to ignore them or return zero.
>
...
> +void tdx_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg)
> +{
> + kvm_register_mark_available(vcpu, reg);
> + switch (reg) {
> + case VCPU_REGS_RSP:
> + case VCPU_REGS_RIP:
> + case VCPU_EXREG_PDPTR:
> + case VCPU_EXREG_CR0:
> + case VCPU_EXREG_CR3:
> + case VCPU_EXREG_CR4:
> + break;
> + default:
> + KVM_BUG_ON(1, vcpu->kvm);
> + break;
> + }
> +}
Isaku,
We missed one case that some GPRs are accessible by KVM/userspace for
TDVMCALL exit.
Powered by blists - more mailing lists