i386/tdx: Set and check kernel_irqchip mode for TDX
KVM mandates kernel_irqchip to be split mode. Set it to split mode automatically when users don't provide an explicit value, otherwise check it to be the split mode. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250508150002.689633-39-xiaoyao.li@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e7ef60892c
commit
bb45580d84
1 changed files with 8 additions and 0 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "qapi/error.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "crypto/hash.h"
|
||||
#include "system/kvm_int.h"
|
||||
#include "system/runstate.h"
|
||||
#include "system/system.h"
|
||||
#include "system/ramblock.h"
|
||||
|
|
@ -388,6 +389,13 @@ static int tdx_kvm_init(ConfidentialGuestSupport *cgs, Error **errp)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (kvm_state->kernel_irqchip_split == ON_OFF_AUTO_AUTO) {
|
||||
kvm_state->kernel_irqchip_split = ON_OFF_AUTO_ON;
|
||||
} else if (kvm_state->kernel_irqchip_split != ON_OFF_AUTO_ON) {
|
||||
error_setg(errp, "TDX VM requires kernel_irqchip to be split");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!tdx_caps) {
|
||||
r = get_tdx_capabilities(errp);
|
||||
if (r) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue