public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: kvm@vger.kernel.org
Cc: avi@redhat.com, sheng@linux.intel.com,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: [patch 1/2] libkvm: pit not reinject support
Date: Mon, 29 Dec 2008 15:42:34 -0200	[thread overview]
Message-ID: <20081229174406.057184458@localhost.localdomain> (raw)
In-Reply-To: 20081229174233.165653613@localhost.localdomain

[-- Attachment #1: libkvm-pit-no-reinject --]
[-- Type: text/plain, Size: 1064 bytes --]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

Index: kvm-userspace.pit/libkvm/libkvm-x86.c
===================================================================
--- kvm-userspace.pit.orig/libkvm/libkvm-x86.c
+++ kvm-userspace.pit/libkvm/libkvm-x86.c
@@ -75,6 +75,20 @@ int kvm_create_pit(kvm_context_t kvm)
 	return 0;
 }
 
+int kvm_pit_no_reinjection(kvm_context_t kvm)
+{
+#ifdef KVM_CAP_PIT_NO_REINJECT
+    int r;
+
+    r = ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_PIT_NO_REINJECT);
+    if (r > 0) {
+        r = ioctl(kvm->vm_fd, KVM_PIT_NO_REINJECT);
+        return r;
+    }
+#endif
+    return -1;
+}
+
 int kvm_arch_create(kvm_context_t kvm, unsigned long phys_mem_bytes,
  			void **vm_mem)
 {
Index: kvm-userspace.pit/libkvm/libkvm.h
===================================================================
--- kvm-userspace.pit.orig/libkvm/libkvm.h
+++ kvm-userspace.pit/libkvm/libkvm.h
@@ -648,6 +648,8 @@ int kvm_set_pit(kvm_context_t kvm, struc
 
 #endif
 
+int kvm_pit_no_reinjection(kvm_context_t kvm);
+
 #ifdef KVM_CAP_VAPIC
 
 /*!

-- 


  reply	other threads:[~2008-12-29 17:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29 17:42 [patch 0/2] QEMU/KVM: PIT no interrupt reinjection support Marcelo Tosatti
2008-12-29 17:42 ` Marcelo Tosatti [this message]
2008-12-30 10:09   ` [patch 1/2] libkvm: pit not reinject support Avi Kivity
2008-12-29 17:42 ` [patch 2/2] QEMU/KVM: provide an option to disable in-kernel PIT int reinjection Marcelo Tosatti
2008-12-30  3:28   ` Sheng Yang
2008-12-30 10:10   ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2008-12-30 17:48 [patch 0/2] QEMU/KVM: PIT interrupt reinjection control support (v2) Marcelo Tosatti
2008-12-30 17:48 ` [patch 1/2] libkvm: pit not reinject support Marcelo Tosatti
2008-12-31  9:53   ` Avi Kivity

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=20081229174406.057184458@localhost.localdomain \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng@linux.intel.com \
    /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