public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: kvm@vger.kernel.org
Cc: avi@redhat.com
Subject: [PATCH 1/9] use coalesced_mmio field from qemu upstream
Date: Wed, 29 Jul 2009 13:49:11 -0400	[thread overview]
Message-ID: <1248889759-25063-2-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1248889759-25063-1-git-send-email-glommer@redhat.com>

remove it from kvm_context too. Besides it all,
helps catching any missing conversion

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 qemu-kvm.c |   14 ++++++--------
 qemu-kvm.h |    2 --
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 352e4cd..8c36eac 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -976,9 +976,9 @@ again:
 	post_kvm_run(kvm, env);
 
 #if defined(KVM_CAP_COALESCED_MMIO)
-	if (kvm->coalesced_mmio) {
+	if (kvm_state->coalesced_mmio) {
 	        struct kvm_coalesced_mmio_ring *ring = (void *)run +
-						kvm->coalesced_mmio * PAGE_SIZE;
+						kvm_state->coalesced_mmio * PAGE_SIZE;
 		while (ring->first != ring->last) {
 			kvm_mmio_write(kvm->opaque,
 				 ring->coalesced_mmio[ring->first].phys_addr,
@@ -1113,11 +1113,11 @@ int kvm_inject_nmi(kvm_vcpu_context_t vcpu)
 int kvm_init_coalesced_mmio(kvm_context_t kvm)
 {
 	int r = 0;
-	kvm->coalesced_mmio = 0;
+	kvm_state->coalesced_mmio = 0;
 #ifdef KVM_CAP_COALESCED_MMIO
 	r = kvm_ioctl(kvm_state, KVM_CHECK_EXTENSION, KVM_CAP_COALESCED_MMIO);
 	if (r > 0) {
-		kvm->coalesced_mmio = r;
+		kvm_state->coalesced_mmio = r;
 		return 0;
 	}
 #endif
@@ -1127,11 +1127,10 @@ int kvm_init_coalesced_mmio(kvm_context_t kvm)
 int kvm_coalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size)
 {
 #ifdef KVM_CAP_COALESCED_MMIO
-	kvm_context_t kvm = kvm_context;
 	struct kvm_coalesced_mmio_zone zone;
 	int r;
 
-	if (kvm->coalesced_mmio) {
+	if (kvm_state->coalesced_mmio) {
 
 		zone.addr = addr;
 		zone.size = size;
@@ -1150,11 +1149,10 @@ int kvm_coalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size)
 int kvm_uncoalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size)
 {
 #ifdef KVM_CAP_COALESCED_MMIO
-	kvm_context_t kvm = kvm_context;
 	struct kvm_coalesced_mmio_zone zone;
 	int r;
 
-	if (kvm->coalesced_mmio) {
+	if (kvm_state->coalesced_mmio) {
 
 		zone.addr = addr;
 		zone.size = size;
diff --git a/qemu-kvm.h b/qemu-kvm.h
index 40a7a2f..8dfdf6b 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -61,8 +61,6 @@ struct kvm_context {
 	int irqchip_inject_ioctl;
 	/// do not create in-kernel pit if set
 	int no_pit_creation;
-	/// in-kernel coalesced mmio
-	int coalesced_mmio;
 #ifdef KVM_CAP_IRQ_ROUTING
 	struct kvm_irq_routing *irq_routes;
 	int nr_allocated_irq_routes;
-- 
1.6.2.2


  reply	other threads:[~2009-07-29 17:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29 17:49 [PATCH 0/9] (Almost) get rid of kvm vcpu structure Glauber Costa
2009-07-29 17:49 ` Glauber Costa [this message]
2009-07-29 17:49   ` [PATCH 2/9] remove kvm_mmio_read and kvm_mmio_write Glauber Costa
2009-07-29 17:49     ` [PATCH 3/9] put env inside vcpu_context Glauber Costa
2009-07-29 17:49       ` [PATCH 4/9] remove opaque field from kvm_context Glauber Costa
2009-07-29 17:49         ` [PATCH 5/9] remove fd from vcpu_context Glauber Costa
2009-07-29 17:49           ` [PATCH 6/9] remove run from vcpu context Glauber Costa
2009-07-29 17:49             ` [PATCH 7/9] remove kvm_context from vcpu_context Glauber Costa
2009-07-29 17:49               ` [PATCH 8/9] use kvm_vcpu_ioctl Glauber Costa
2009-07-29 17:49                 ` [PATCH 9/9] remove id from vcpu context Glauber Costa
2009-08-03 13:12     ` [PATCH 2/9] remove kvm_mmio_read and kvm_mmio_write 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=1248889759-25063-2-git-send-email-glommer@redhat.com \
    --to=glommer@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.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