Message ID | 20240229063726.610065-19-xiaoyao.li@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | QEMU Guest memfd + QEMU TDX support | expand |
On 2/29/2024 2:36 PM, Xiaoyao Li wrote: > Due to the fact that Intel-PT virtualization support has been broken in > QEMU since Sapphire Rapids generation[1], below warning is triggered when > luanching TD guest: > > warning: host doesn't support requested feature: CPUID.07H:EBX.intel-pt [bit 25] > > Before Intel-pt is fixed in QEMU, just make Intel-PT unsupported for TD > guest, to avoid the confusing warning. I guess normal guest has same issue. Thanks Zhenzhong > > [1] https://lore.kernel.org/qemu-devel/20230531084311.3807277-1-xiaoyao.li@intel.com/ > > Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> > --- > Changes in v4: > - newly added patch; > --- > target/i386/kvm/tdx.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c > index 85d96140b450..239170142e4f 100644 > --- a/target/i386/kvm/tdx.c > +++ b/target/i386/kvm/tdx.c > @@ -292,6 +292,11 @@ void tdx_get_supported_cpuid(uint32_t function, uint32_t index, int reg, > if (function == 1 && reg == R_ECX && !enable_cpu_pm) { > *ret &= ~CPUID_EXT_MONITOR; > } > + > + /* QEMU Intel-pt support is broken, don't advertise Intel-PT */ > + if (function == 7 && reg == R_EBX) { > + *ret &= ~CPUID_7_0_EBX_INTEL_PT; > + } > } > > enum tdx_ioctl_level{
On 5/31/2024 5:27 PM, Duan, Zhenzhong wrote: > > On 2/29/2024 2:36 PM, Xiaoyao Li wrote: >> Due to the fact that Intel-PT virtualization support has been broken in >> QEMU since Sapphire Rapids generation[1], below warning is triggered when >> luanching TD guest: >> >> warning: host doesn't support requested feature: >> CPUID.07H:EBX.intel-pt [bit 25] >> >> Before Intel-pt is fixed in QEMU, just make Intel-PT unsupported for TD >> guest, to avoid the confusing warning. > > I guess normal guest has same issue. yeah, just the bug referenced by [1] > Thanks > > Zhenzhong > >> >> [1] >> https://lore.kernel.org/qemu-devel/20230531084311.3807277-1-xiaoyao.li@intel.com/ >> >> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> >> --- >> Changes in v4: >> - newly added patch; >> --- >> target/i386/kvm/tdx.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c >> index 85d96140b450..239170142e4f 100644 >> --- a/target/i386/kvm/tdx.c >> +++ b/target/i386/kvm/tdx.c >> @@ -292,6 +292,11 @@ void tdx_get_supported_cpuid(uint32_t function, >> uint32_t index, int reg, >> if (function == 1 && reg == R_ECX && !enable_cpu_pm) { >> *ret &= ~CPUID_EXT_MONITOR; >> } >> + >> + /* QEMU Intel-pt support is broken, don't advertise Intel-PT */ >> + if (function == 7 && reg == R_EBX) { >> + *ret &= ~CPUID_7_0_EBX_INTEL_PT; >> + } >> } >> enum tdx_ioctl_level{
diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c index 85d96140b450..239170142e4f 100644 --- a/target/i386/kvm/tdx.c +++ b/target/i386/kvm/tdx.c @@ -292,6 +292,11 @@ void tdx_get_supported_cpuid(uint32_t function, uint32_t index, int reg, if (function == 1 && reg == R_ECX && !enable_cpu_pm) { *ret &= ~CPUID_EXT_MONITOR; } + + /* QEMU Intel-pt support is broken, don't advertise Intel-PT */ + if (function == 7 && reg == R_EBX) { + *ret &= ~CPUID_7_0_EBX_INTEL_PT; + } } enum tdx_ioctl_level{
Due to the fact that Intel-PT virtualization support has been broken in QEMU since Sapphire Rapids generation[1], below warning is triggered when luanching TD guest: warning: host doesn't support requested feature: CPUID.07H:EBX.intel-pt [bit 25] Before Intel-pt is fixed in QEMU, just make Intel-PT unsupported for TD guest, to avoid the confusing warning. [1] https://lore.kernel.org/qemu-devel/20230531084311.3807277-1-xiaoyao.li@intel.com/ Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> --- Changes in v4: - newly added patch; --- target/i386/kvm/tdx.c | 5 +++++ 1 file changed, 5 insertions(+)