lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db6e522a-1b2c-47ab-8e33-b2e3d9b81c4f@linux.intel.com>
Date: Tue, 10 Dec 2024 10:34:04 +0800
From: Binbin Wu <binbin.wu@...ux.intel.com>
To: Chao Gao <chao.gao@...el.com>
Cc: pbonzini@...hat.com, seanjc@...gle.com, kvm@...r.kernel.org,
 rick.p.edgecombe@...el.com, kai.huang@...el.com, adrian.hunter@...el.com,
 reinette.chatre@...el.com, xiaoyao.li@...el.com,
 tony.lindgren@...ux.intel.com, isaku.yamahata@...el.com,
 yan.y.zhao@...el.com, michael.roth@....com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] KVM: TDX: Add a place holder for handler of TDX
 hypercalls (TDG.VP.VMCALL)



On 12/9/2024 7:28 PM, Chao Gao wrote:
[...]
>>
>> #define VMX_EXIT_REASONS \
>> 	{ EXIT_REASON_EXCEPTION_NMI,         "EXCEPTION_NMI" }, \
>> @@ -155,7 +156,8 @@
>> 	{ EXIT_REASON_UMWAIT,                "UMWAIT" }, \
>> 	{ EXIT_REASON_TPAUSE,                "TPAUSE" }, \
>> 	{ EXIT_REASON_BUS_LOCK,              "BUS_LOCK" }, \
>> -	{ EXIT_REASON_NOTIFY,                "NOTIFY" }
>> +	{ EXIT_REASON_NOTIFY,                "NOTIFY" }, \
>> +	{ EXIT_REASON_TDCALL,                "TDCALL" }
> Side topic:
> Strictly speaking, TDCALL vm-exit handling can happen for normal VMs.
Oh, yes. TDX CPU architectural specification, TDCALL in VMX non-root mode
causes VM exit with exit reason TDCALL. So, normal VM could exit with TDCALL.

> so, KVM may
> need to handle it by injecting #UD. Of course, it is not necessary for this series.
Currently, the handling of TDCALL for VMX VMs will return to userspace
with KVM_EXIT_INTERNAL_ERROR + KVM_INTERNAL_ERROR_UNEXPECTED_EXIT_REASON.
Since it's not an expected VM Exit reason for normal VMs, maybe it doesn't
worth a dedicated handler?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ