* [PATCH 0/2] Use coalescing region from upstream
@ 2009-07-24 18:01 Glauber Costa
2009-07-24 18:01 ` [PATCH 1/2] use coalesced_mmio field from qemu upstream Glauber Costa
2009-07-29 12:05 ` [PATCH 0/2] Use coalescing region " Avi Kivity
0 siblings, 2 replies; 4+ messages in thread
From: Glauber Costa @ 2009-07-24 18:01 UTC (permalink / raw)
To: kvm; +Cc: avi
Marcelo,
these two patches move the control of coalescing regions to upstream code.
Note the first one won't apply in your tip. I'm assuming you have already
applied the ones who remove some pit/irqchip related variables in kvm_context
thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] use coalesced_mmio field from qemu upstream
2009-07-24 18:01 [PATCH 0/2] Use coalescing region from upstream Glauber Costa
@ 2009-07-24 18:01 ` Glauber Costa
2009-07-24 18:01 ` [PATCH 2/2] use coalesce memory regions functions from upstream Glauber Costa
2009-07-29 12:05 ` [PATCH 0/2] Use coalescing region " Avi Kivity
1 sibling, 1 reply; 4+ messages in thread
From: Glauber Costa @ 2009-07-24 18:01 UTC (permalink / raw)
To: kvm; +Cc: avi
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 b9164ee..c1454fd 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1026,9 +1026,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,
@@ -1164,11 +1164,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
@@ -1178,11 +1178,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;
@@ -1201,11 +1200,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 1e5d89a..0de546f 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -61,8 +61,6 @@ struct kvm_context {
int irqchip_inject_ioctl;
/// in-kernel pit status
int pit_in_kernel;
- /// 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] use coalesce memory regions functions from upstream
2009-07-24 18:01 ` [PATCH 1/2] use coalesced_mmio field from qemu upstream Glauber Costa
@ 2009-07-24 18:01 ` Glauber Costa
0 siblings, 0 replies; 4+ messages in thread
From: Glauber Costa @ 2009-07-24 18:01 UTC (permalink / raw)
To: kvm; +Cc: avi
Delete ours, they do the same thing.
Signed-off-by: Glauber Costa <glommer@redhat.com>
---
kvm-all.c | 2 +-
qemu-kvm.c | 45 ---------------------------------------------
2 files changed, 1 insertions(+), 46 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 157b968..e798496 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -344,6 +344,7 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
return ret;
}
+#endif
int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
{
@@ -383,7 +384,6 @@ int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
return ret;
}
-#endif
int kvm_check_extension(KVMState *s, unsigned int extension)
{
int ret;
diff --git a/qemu-kvm.c b/qemu-kvm.c
index c1454fd..23bd61a 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1175,51 +1175,6 @@ int kvm_init_coalesced_mmio(kvm_context_t kvm)
return r;
}
-int kvm_coalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size)
-{
-#ifdef KVM_CAP_COALESCED_MMIO
- struct kvm_coalesced_mmio_zone zone;
- int r;
-
- if (kvm_state->coalesced_mmio) {
-
- zone.addr = addr;
- zone.size = size;
-
- r = kvm_vm_ioctl(kvm_state, KVM_REGISTER_COALESCED_MMIO, &zone);
- if (r < 0) {
- perror("kvm_register_coalesced_mmio_zone");
- return r;
- }
- return 0;
- }
-#endif
- return -ENOSYS;
-}
-
-int kvm_uncoalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size)
-{
-#ifdef KVM_CAP_COALESCED_MMIO
- struct kvm_coalesced_mmio_zone zone;
- int r;
-
- if (kvm_state->coalesced_mmio) {
-
- zone.addr = addr;
- zone.size = size;
-
- r = kvm_vm_ioctl(kvm_state, KVM_UNREGISTER_COALESCED_MMIO, &zone);
- if (r < 0) {
- perror("kvm_unregister_coalesced_mmio_zone");
- return r;
- }
- DPRINTF("Unregistered coalesced mmio region for %llx (%lx)\n", addr, size);
- return 0;
- }
-#endif
- return -ENOSYS;
-}
-
#ifdef KVM_CAP_DEVICE_ASSIGNMENT
int kvm_assign_pci_device(kvm_context_t kvm,
struct kvm_assigned_pci_dev *assigned_dev)
--
1.6.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Use coalescing region from upstream
2009-07-24 18:01 [PATCH 0/2] Use coalescing region from upstream Glauber Costa
2009-07-24 18:01 ` [PATCH 1/2] use coalesced_mmio field from qemu upstream Glauber Costa
@ 2009-07-29 12:05 ` Avi Kivity
1 sibling, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2009-07-29 12:05 UTC (permalink / raw)
To: Glauber Costa; +Cc: kvm
On 07/24/2009 09:01 PM, Glauber Costa wrote:
> Marcelo,
>
> these two patches move the control of coalescing regions to upstream code.
> Note the first one won't apply in your tip. I'm assuming you have already
> applied the ones who remove some pit/irqchip related variables in kvm_context
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-29 12:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-24 18:01 [PATCH 0/2] Use coalescing region from upstream Glauber Costa
2009-07-24 18:01 ` [PATCH 1/2] use coalesced_mmio field from qemu upstream Glauber Costa
2009-07-24 18:01 ` [PATCH 2/2] use coalesce memory regions functions from upstream Glauber Costa
2009-07-29 12:05 ` [PATCH 0/2] Use coalescing region " Avi Kivity
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.