[PATCH v1 1/1] target/i386: Save/restore the nested flag of an exception

2025-07-23 Thread Xin Li (Intel)
during VM context save/restore and live migration. Signed-off-by: Xin Li (Intel) --- linux-headers/asm-x86/kvm.h | 4 +++- linux-headers/linux/kvm.h | 1 + target/i386/cpu.c | 1 + target/i386/cpu.h | 1 + target/i386/kvm/kvm.c

[PATCH v1 0/3] target/i386: Add the immediate form MSR access instruction support

2025-01-03 Thread Xin Li (Intel)
advertised through bit 5 of CPUID.7.1.ECX, which needs to be added as a new CPU feature word. WRMSRNS doesn't become a required feature for FERD, and Linux has removed the dependency, as such remove the dependency from Qemu. Xin Li (Intel) (3): target/i386: Remove FRED dependency on WR

[PATCH v1 1/3] target/i386: Remove FRED dependency on WRMSRNS

2025-01-03 Thread Xin Li (Intel)
WRMSRNS doesn't become a required feature for FERD, and Linux has removed the dependency, as such remove it from Qemu. Signed-off-by: Xin Li (Intel) --- target/i386/cpu.c | 4 1 file changed, 4 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 0b639848cd..8a122

[PATCH v1 2/3] target/i386: Add a new CPU feature word for CPUID.7.1.ECX

2025-01-03 Thread Xin Li (Intel)
The immediate form of MSR access instructions will use this new CPU feature word. Signed-off-by: Xin Li (Intel) --- target/i386/cpu.c | 23 ++- target/i386/cpu.h | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c

[PATCH v1 3/3] target/i386: Add the immediate form MSR access instruction support

2025-01-03 Thread Xin Li (Intel)
The immediate form of MSR access instructions are primarily motivated by performance, not code size: by having the MSR number in an immediate, it is available *much* earlier in the pipeline, which allows the hardware much more leeway about how a particular MSR is handled. Signed-off-by: Xin Li

[PATCH v1 0/3] target/i386: Add nested FRED support

2024-08-07 Thread Xin Li (Intel)
This patch set adds nested FRED support to allow KVM to run a nested guest with FRED enabled. Lei Wang (1): target/i386: Raise the highest index value used for any VMCS encoding Xin Li (Intel) (2): target/i386: Delete duplicated macro definition CR4_FRED_MASK target/i386: Add VMX control

[PATCH v1 3/3] target/i386: Raise the highest index value used for any VMCS encoding

2024-08-07 Thread Xin Li (Intel)
the VMCS field encoding of Secondary VM-exit controls, 0x44, is larger than any existing index value, raise the highest index value used for any VMCS encoding to 0x44. Co-developed-by: Xin Li Signed-off-by: Xin Li Signed-off-by: Lei Wang Signed-off-by: Xin Li (Intel) --- target/i386/cpu.h

[PATCH v1 1/3] target/i386: Delete duplicated macro definition CR4_FRED_MASK

2024-08-07 Thread Xin Li (Intel)
Macro CR4_FRED_MASK is defined twice, delete one. Signed-off-by: Xin Li (Intel) --- target/i386/cpu.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index c6cc035df3..118ef9cb68 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -267,12

[PATCH v1 2/3] target/i386: Add VMX control bits for nested FRED support

2024-08-07 Thread Xin Li (Intel)
Add definitions of 1) VM-exit activate secondary controls bit 2) VM-entry load FRED bit which are required to enable nested FRED. Reviewed-by: Zhao Liu Signed-off-by: Xin Li (Intel) --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386

[PATCH v1 1/1] target/i386: Add VMX entry load FRED control name to VMX feature words

2024-07-07 Thread Xin Li (Intel)
As VMX entry load FRED control is required to enable FRED in nested VMX, add it to VMX feature words. Signed-off-by: Xin Li (Intel) --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index c05765eeaf..84a09c19cf 100644

[PATCH v1 1/1] target/i386: Delete a duplicated macro definition CR4_FRED_MASK

2024-07-02 Thread Xin Li (Intel)
Macro CR4_FRED_MASK is defined twice due to a merge incident, delete one. Signed-off-by: Xin Li (Intel) --- target/i386/cpu.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 29daf37048..b73685a745 100644 --- a/target/i386/cpu.h +++ b/target