kvm-userspace: move x86 specific calls introduced by device assignement to x86 files
PATCH 1/1 kvm-userspace: move x86 specific calls introduced by device assignement to x86 files
The device asignment patches added the x86 specific ioperm in qemu-kvm. This patch moves
qemu-kvm.c:kvm_do_ioperm()
to
qemu-kvm-x86.c:kvm_arch_do_ioperm()
The patch also changes the qemu-kvm header and the includes according to that.
---
[diffstat]
qemu-kvm-x86.c | 7 +++++++ qemu-kvm.c | 11 +++-------- qemu-kvm.h | 3 +++ 3 files changed, 13 insertions(+), 8 deletions(-)
[diff]
qemu/qemu-kvm-x86.c +7 -0
@@ -11,6 +11,7 @@#include <string.h> #include "hw/hw.h" +#include <sys/io.h> #include "qemu-kvm.h" #include <libkvm.h>
@@ -717,3 +718,9 @@ } } } + +void kvm_arch_do_ioperm (void *_data) +{ +struct ioperm_data *data = _data; +ioperm (data->start_port, data->num, data->turn_on); +}
qemu/qemu-kvm.c +3 -8
@@ -27,7 +27,6 @@#include <sys/utsname.h> #include <sys/syscall.h> #include <sys/mman.h> -#include <sys/io.h> #define bool _Bool#define false 0
@@ -1049,14 +1048,10 @@return kvm_unregister_coalesced_mmio (kvm_context, addr, size); } -static void kvm_do_ioperm (void *_data) -{ -struct ioperm_data *data = _data; -ioperm (data->start_port, data->num, data->turn_on); -} - +#ifdef USE_KVM_DEVICE_ASSIGNMENT void kvm_ioperm (CPUState *env,void *data) {if (kvm_enabled () && qemu_system_ready) -on_vcpu (env, kvm_do_ioperm, data); +on_vcpu (env, kvm_arch_do_ioperm, data); } +#endif
qemu/qemu-kvm.h +3 -0
@@ -93,7 +93,10 @@void qemu_kvm_system_reset_request (void ); +#ifdef USE_KVM_DEVICE_ASSIGNMENT void kvm_ioperm (CPUState *env,void *data); +void kvm_arch_do_ioperm (void *_data); +#endif #ifdef TARGET_PPC int handle_powerpc_dcr_read (int vcpu,uint32_t dcrn,uint32_t *data);
Quoted 6 lines · Ehrhardt Christian
The device asignment patches added the x86 specific ioperm in qemu-kvm. This patch moves
qemu-kvm.c:kvm_do_ioperm()
to
qemu-kvm-x86.c:kvm_arch_do_ioperm()
The patch also changes the qemu-kvm header and the includes according to that.
The important point here (which should probably be in the changelog) is that this patch fixes a PowerPC build break caused by "[PATCH] kvm:
qemu: support for assigning host PCI devices to guests".
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Avi Kivity
AppliedQuoted 8 lines · Ehrhardt Christian
The device asignment patches added the x86 specific ioperm in qemu-kvm. This patch moves
qemu-kvm.c:kvm_do_ioperm()
to
qemu-kvm-x86.c:kvm_arch_do_ioperm()
The patch also changes the qemu-kvm header and the includes according to that.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function
regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files)
Quoted 11 lines · Avi Kivity
Quoted 8 lines · Ehrhardt Christian
The device asignment patches added the x86 specific ioperm in qemu-kvm. This patch moves
qemu-kvm.c:kvm_do_ioperm()
to
qemu-kvm-x86.c:kvm_arch_do_ioperm()
The patch also changes the qemu-kvm header and the includes according to that.Applied, thanks.
Avi, do you have a quick regression test you run before pushing new patches? If so, we'd like to help you add PowerPC to that, if only to detect build breaks like this one.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Re: regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files)
Quoted 3 lines · Hollis Blanchard
Avi, do you have a quick regression test you run before pushing new patches? If so, we'd like to help you add PowerPC to that, if only to detect build breaks like this one
I have a fairly slow regression test for x86. I would really like to get at least build tests for the other archs. I actually have a ppc box I could use for it, just need to set it up in some corner and start testing.
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files)
Quoted 8 lines · Avi Kivity
Quoted 3 lines · Hollis Blanchard
Avi, do you have a quick regression test you run before pushing new patches? If so, we'd like to help you add PowerPC to that, if only to detect build breaks like this one
I have a fairly slow regression test for x86. I would really like to get at least build tests for the other archs. I actually have a ppc box I could use for it, just need to set it up in some corner and start testing.
Out of curiosity, do you run the slow x86 tests after every commit? After every batch of commits? Weekly?
Please let us know if we can help set up the PowerPC stuff; it's pretty important to us to avoid these sorts of problems in the future. We have tried to write fairly comprehensive build directions at
http://kvm.qumranet.com/kvmwiki/PowerPC_Source and runtime information at http://kvm.qumranet.com/kvmwiki/PowerPC_Run .
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Re: regression tests? (was Re: [PATCH] kvm-userspace: move x86 specific calls introduced by device assignement to x86 files)
Quoted 8 lines · Hollis Blanchard
Quoted 4 lines
I have a fairly slow regression test for x86. I would really like to get at least build tests for the other archs. I actually have a ppc box I could use for it, just need to set it up in some corner and start testing.
Out of curiosity, do you run the slow x86 tests after every commit? After every batch of commits? Weekly?
Depends on the changes. I certainly batch commits, and even pipeline (keep committing while the test is running, in the expectation that is succeeds). I don't batch qemu merges as they are more likely to fail one test or another.
Quoted 6 lines
Please let us know if we can help set up the PowerPC stuff; it's pretty important to us to avoid these sorts of problems in the future. We have tried to write fairly comprehensive build directions at
http://kvm.qumranet.com/kvmwiki/PowerPC_Source and runtime information at http://kvm.qumranet.com/kvmwiki/PowerPC_Run .
Thanks. I have to start by unpacking the box...
Signature · 1 line
error compiling committee.c: too many arguments to function