[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 4/7] accel/kvm: Simplify kvm_set_sigmask_len()
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 4/7] accel/kvm: Simplify kvm_set_sigmask_len() |
Date: |
Tue, 23 Jun 2020 12:50:49 +0200 |
The sigmask_len is a property of the accelerator, not the VM.
Simplify by directly using the global kvm_state, remove the
unnecessary KVMState* argument.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
include/sysemu/kvm.h | 2 +-
accel/kvm/kvm-all.c | 4 ++--
target/mips/kvm.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 3662641c99..44c1767a7f 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -469,7 +469,7 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *env,
uint32_t function,
uint64_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index);
-void kvm_set_sigmask_len(KVMState *s, unsigned int sigmask_len);
+void kvm_set_sigmask_len(unsigned int sigmask_len);
#if !defined(CONFIG_USER_ONLY)
int kvm_physical_memory_addr_from_host(KVMState *s, void *ram_addr,
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index afd14492a0..7b3f76f23d 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2240,9 +2240,9 @@ err:
return ret;
}
-void kvm_set_sigmask_len(KVMState *s, unsigned int sigmask_len)
+void kvm_set_sigmask_len(unsigned int sigmask_len)
{
- s->sigmask_len = sigmask_len;
+ kvm_state->sigmask_len = sigmask_len;
}
static void kvm_handle_io(uint16_t port, MemTxAttrs attrs, void *data, int
direction,
diff --git a/target/mips/kvm.c b/target/mips/kvm.c
index 0adfa70210..cc3e09bdef 100644
--- a/target/mips/kvm.c
+++ b/target/mips/kvm.c
@@ -48,7 +48,7 @@ unsigned long kvm_arch_vcpu_id(CPUState *cs)
int kvm_arch_init(MachineState *ms, KVMState *s)
{
/* MIPS has 128 signals */
- kvm_set_sigmask_len(s, 16);
+ kvm_set_sigmask_len(16);
kvm_mips_fpu_cap = kvm_check_extension(KVM_CAP_MIPS_FPU);
kvm_mips_msa_cap = kvm_check_extension(KVM_CAP_MIPS_MSA);
--
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é, 2020/06/23
- [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é <=
- [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