[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/7] accel/kvm: Let kvm_check_extension use global KVM state
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 1/7] accel/kvm: Let kvm_check_extension use global KVM state |
Date: |
Tue, 23 Jun 2020 12:50:46 +0200 |
As KVM supported extentions those should be the same for
all VMs, it is safe to directly use the global kvm_state
in kvm_check_extension().
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
accel/kvm/kvm-all.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index f24d7da783..934a7d6b24 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -913,7 +913,7 @@ int kvm_check_extension(KVMState *s, unsigned int extension)
{
int ret;
- ret = kvm_ioctl(s, KVM_CHECK_EXTENSION, extension);
+ ret = kvm_ioctl(kvm_state, KVM_CHECK_EXTENSION, extension);
if (ret < 0) {
ret = 0;
}
--
2.21.3
- [PATCH 0/7] accel/kvm: Simplify few functions that can use global kvm_state, Philippe Mathieu-Daudé, 2020/06/23
- [PATCH 1/7] accel/kvm: Let kvm_check_extension use global KVM state,
Philippe Mathieu-Daudé <=
- [PATCH 2/7] accel/kvm: Simplify kvm_check_extension(), Philippe Mathieu-Daudé, 2020/06/23
- [PATCH 3/7] accel/kvm: Simplify kvm_check_extension_list(), Philippe Mathieu-Daudé, 2020/06/23
- [RFC PATCH 4/7] accel/kvm: Simplify kvm_set_sigmask_len(), Philippe Mathieu-Daudé, 2020/06/23
- [PATCH 5/7] target/i386/kvm: Simplify get_para_features(), Philippe Mathieu-Daudé, 2020/06/23
- [RFC PATCH 6/7] target/i386/kvm: Simplify kvm_get_mce_cap_supported(), Philippe Mathieu-Daudé, 2020/06/23
- [RFC PATCH 7/7] target/i386/kvm: Simplify kvm_get_supported_[feature]_msrs(), Philippe Mathieu-Daudé, 2020/06/23