From: Marcelo Tosatti <mtosatti@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org,
Lai Jiangshan <laijs@cn.fujitsu.com>
Subject: [Qemu-devel] [PATCH 02/31] kvm: convert kvm_ioctl(KVM_CHECK_EXTENSION) to kvm_check_extension()
Date: Mon, 24 Jan 2011 07:02:11 -0200 [thread overview]
Message-ID: <14a095184c6068c78e67f17c200cf00b4170f704.1295859760.git.mtosatti@redhat.com> (raw)
In-Reply-To: <cover.1295859760.git.mtosatti@redhat.com>
From: Lai Jiangshan <laijs@cn.fujitsu.com>
simple cleanup and use existing helper: kvm_check_extension().
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
kvm-all.c | 2 +-
target-i386/kvm.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 255b6fa..935c436 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -717,7 +717,7 @@ int kvm_init(int smp_cpus)
s->broken_set_mem_region = 1;
#ifdef KVM_CAP_JOIN_MEMORY_REGIONS_WORKS
- ret = kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_JOIN_MEMORY_REGIONS_WORKS);
+ ret = kvm_check_extension(s, KVM_CAP_JOIN_MEMORY_REGIONS_WORKS);
if (ret > 0) {
s->broken_set_mem_region = 0;
}
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 755f8c9..4004de7 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -187,7 +187,7 @@ static int kvm_get_mce_cap_supported(KVMState *s, uint64_t *mce_cap,
{
int r;
- r = kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_MCE);
+ r = kvm_check_extension(s, KVM_CAP_MCE);
if (r > 0) {
*max_banks = r;
return kvm_ioctl(s, KVM_X86_GET_MCE_CAP_SUPPORTED, mce_cap);
@@ -540,7 +540,7 @@ int kvm_arch_init(KVMState *s, int smp_cpus)
* versions of KVM just assumed that it would be at the end of physical
* memory but that doesn't work with more than 4GB of memory. We simply
* refuse to work with those older versions of KVM. */
- ret = kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_SET_TSS_ADDR);
+ ret = kvm_check_extension(s, KVM_CAP_SET_TSS_ADDR);
if (ret <= 0) {
fprintf(stderr, "kvm does not support KVM_CAP_SET_TSS_ADDR\n");
return ret;
--
1.7.2.3
next prev parent reply other threads:[~2011-01-24 9:05 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-24 9:02 [Qemu-devel] [PATCH 00/31] [PULL] qemu-kvm.git uq/master queue Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 01/31] kvm: Enable user space NMI injection for kvm guest Marcelo Tosatti
2011-01-24 9:02 ` Marcelo Tosatti [this message]
2011-01-24 9:02 ` [Qemu-devel] [PATCH 03/31] Clean up cpu_inject_x86_mce() Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 04/31] Add "broadcast" option for mce command Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 05/31] Add function for checking mca broadcast of CPU Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 06/31] kvm: introduce kvm_mce_in_progress Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 07/31] kvm: kvm_mce_inj_* subroutines for templated error injections Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 08/31] kvm: introduce kvm_inject_x86_mce_on Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 09/31] kvm: x86: Fix DPL write back of segment registers Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 10/31] kvm: x86: Remove obsolete SS.RPL/DPL aligment Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 11/31] kvm: x86: Prevent sign extension of DR7 in guest debugging mode Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 12/31] kvm: x86: Fix a few coding style violations Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 13/31] kvm: Fix " Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 14/31] kvm: x86: Swallow KVM_EXIT_SET_TPR Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 15/31] kvm: Stop on all fatal exit reasons Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 16/31] kvm: Improve reporting of fatal errors Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 17/31] x86: Optionally dump code bytes on cpu_dump_state Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 18/31] kvm: x86: Align kvm_arch_put_registers code with comment Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 19/31] kvm: x86: Prepare kvm_get_mp_state for in-kernel irqchip Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 20/31] kvm: x86: Remove redundant mp_state initialization Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 21/31] kvm: x86: Fix xcr0 reset mismerge Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 22/31] kvm: x86: Refactor msr_star/hsave_pa setup and checks Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 23/31] kvm: x86: Reset paravirtual MSRs Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 24/31] kvm: x86: Fix !CONFIG_KVM_PARA build Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 25/31] kvm: Drop smp_cpus argument from init functions Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 26/31] kvm: Consolidate must-have capability checks Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 27/31] kvm: x86: Rework identity map and TSS setup for larger BIOS sizes Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 28/31] kvm: Flush coalesced mmio buffer on IO window exits Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 29/31] kvm: Do not use qemu_fair_mutex Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 30/31] kvm: x86: Implicitly clear nmi_injected/pending on reset Marcelo Tosatti
2011-01-24 9:02 ` [Qemu-devel] [PATCH 31/31] kvm: x86: Only read/write MSR_KVM_ASYNC_PF_EN if supported Marcelo Tosatti
2011-02-17 20:00 ` [Qemu-devel] [PATCH 00/31] [PULL] qemu-kvm.git uq/master queue Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14a095184c6068c78e67f17c200cf00b4170f704.1295859760.git.mtosatti@redhat.com \
--to=mtosatti@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=laijs@cn.fujitsu.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).