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: Tue, 30 Dec 2008 15:48:58 -0200 [thread overview]
Message-ID: <20081230175034.215911602@localhost.localdomain> (raw)
In-Reply-To: 20081230174857.883810441@localhost.localdomain
[-- Attachment #1: libkvm-pit-no-reinject --]
[-- Type: text/plain, Size: 1271 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,23 @@ int kvm_create_pit(kvm_context_t kvm)
return 0;
}
+int kvm_pit_reinject_control(kvm_context_t kvm, int reinject)
+{
+#ifdef KVM_CAP_PIT_REINJECT_CONTROL
+ int r;
+ struct kvm_pit_reinject_control control;
+
+ control.reinject = reinject;
+
+ r = ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_PIT_REINJECT_CONTROL);
+ if (r > 0) {
+ r = ioctl(kvm->vm_fd, KVM_PIT_REINJECT_CONTROL, &control);
+ return r;
+ }
+#endif
+ return -ENOSYS;
+}
+
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
@@ -646,6 +646,8 @@ int kvm_get_pit(kvm_context_t kvm, struc
int kvm_set_pit(kvm_context_t kvm, struct kvm_pit_state *s);
#endif
+int kvm_pit_reinject_control(kvm_context_t kvm, int reinject);
+
#endif
#ifdef KVM_CAP_VAPIC
--
next prev parent reply other threads:[~2008-12-30 18:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-30 17:48 [patch 0/2] QEMU/KVM: PIT interrupt reinjection control support (v2) Marcelo Tosatti
2008-12-30 17:48 ` Marcelo Tosatti [this message]
2008-12-31 9:53 ` [patch 1/2] libkvm: pit not reinject support Avi Kivity
2008-12-30 17:48 ` [patch 2/2] QEMU/KVM: provide an option to disable in-kernel PIT int reinjection Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2008-12-29 17:42 [patch 0/2] QEMU/KVM: PIT no interrupt reinjection support Marcelo Tosatti
2008-12-29 17:42 ` [patch 1/2] libkvm: pit not reinject support Marcelo Tosatti
2008-12-30 10:09 ` 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=20081230175034.215911602@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.