Re: [PATCH V2 0/2] kvm tools: PPC64 basic support
On Wed, 2011-12-14 at 08:35 +0200, Sasha Levin wrote: > > In that case, KVM_CAP_IOEVENTFD is simply not set, so we're better off > checking the cap dynamically instead of having it defined statically > in the makefile. > > I'll send a short patch that does that. Indeed, and in general, even if it was set, a failure of the ioctl could be handled gracefully by switching to not using it from the generic code without an arch override. Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2 0/2] kvm tools: PPC64 basic support
On Wed, 2011-12-14 at 11:34 +1100, Matt Evans wrote: > On 13/12/11 21:23, Sasha Levin wrote: > > On Tue, 2011-12-13 at 18:00 +1100, Matt Evans wrote: > >> The second patch is a small fix for generic virtio code (now that we have a > >> PPC build) which removes reliance on ioeventfds for PPC, which doesn't > >> provide > >> them. > > > > Hm... ioeventfds are located in the generic code and should be available > > on all archs (it doesn't use any arch specific code at all afaik). > > > > Why don't they work on ppc? > > > > Well, there are two problems: you're right that it's generic code, but it's > configurable and CONFIG_HAVE_KVM_EVENTFD isn't set for PPC KVM (thus the ioctl > fails). That's probably off because ioevents won't work anyway-- the > in-kernel > MMIO exit route isn't wired up to kvm_io_bus_read/write() yet. (It looks like > KVM_IRQFD will also fail, which virtio-pci /would/ use if I supported MSIs, > which I currently don't.) > > Yes, this can be fixed, but relying on it means that virtio on kvmtool/PPC > won't > work on today's kernels. :( In that case, KVM_CAP_IOEVENTFD is simply not set, so we're better off checking the cap dynamically instead of having it defined statically in the makefile. I'll send a short patch that does that. -- Sasha. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2 0/2] kvm tools: PPC64 basic support
On 13/12/11 21:23, Sasha Levin wrote: > On Tue, 2011-12-13 at 18:00 +1100, Matt Evans wrote: >> The second patch is a small fix for generic virtio code (now that we have a >> PPC build) which removes reliance on ioeventfds for PPC, which doesn't >> provide >> them. > > Hm... ioeventfds are located in the generic code and should be available > on all archs (it doesn't use any arch specific code at all afaik). > > Why don't they work on ppc? > Well, there are two problems: you're right that it's generic code, but it's configurable and CONFIG_HAVE_KVM_EVENTFD isn't set for PPC KVM (thus the ioctl fails). That's probably off because ioevents won't work anyway-- the in-kernel MMIO exit route isn't wired up to kvm_io_bus_read/write() yet. (It looks like KVM_IRQFD will also fail, which virtio-pci /would/ use if I supported MSIs, which I currently don't.) Yes, this can be fixed, but relying on it means that virtio on kvmtool/PPC won't work on today's kernels. :( Cheers, Matt -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2 0/2] kvm tools: PPC64 basic support
On Tue, 2011-12-13 at 18:00 +1100, Matt Evans wrote: > The second patch is a small fix for generic virtio code (now that we have a > PPC build) which removes reliance on ioeventfds for PPC, which doesn't provide > them. Hm... ioeventfds are located in the generic code and should be available on all archs (it doesn't use any arch specific code at all afaik). Why don't they work on ppc? -- Sasha. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V2 0/2] kvm tools: PPC64 basic support
These two patches build on the previous "split out arch-specific" work. The first adds a PPC64 build, basic CPU support, guest RAM mapping (using hugepages), flat kernel loading and all required arch-specific definitions & structures. With patches to date, this should build PPC but not necessarily run much. Subsequent patches add support to emulate an SPAPR-esque machine. This patch does not include any code borrowed from outside kvmtool. The second patch is a small fix for generic virtio code (now that we have a PPC build) which removes reliance on ioeventfds for PPC, which doesn't provide them. Matt Evans (2): kvm tools: Add initial SPAPR PPC64 architecture support kvm tools: Make virtio-pci's ioeventfd__add_event() fall back gracefully if ioeventfds unavailable tools/kvm/Makefile | 10 + tools/kvm/include/kvm/ioeventfd.h|3 +- tools/kvm/ioeventfd.c| 12 +- tools/kvm/kvm.c |3 + tools/kvm/powerpc/include/kvm/barrier.h |6 + tools/kvm/powerpc/include/kvm/kvm-arch.h | 72 tools/kvm/powerpc/include/kvm/kvm-cpu-arch.h | 66 tools/kvm/powerpc/ioport.c | 18 ++ tools/kvm/powerpc/irq.c | 40 + tools/kvm/powerpc/kvm-cpu.c | 233 ++ tools/kvm/powerpc/kvm.c | 187 + tools/kvm/virtio/pci.c | 13 ++- 12 files changed, 658 insertions(+), 5 deletions(-) create mode 100644 tools/kvm/powerpc/include/kvm/barrier.h create mode 100644 tools/kvm/powerpc/include/kvm/kvm-arch.h create mode 100644 tools/kvm/powerpc/include/kvm/kvm-cpu-arch.h create mode 100644 tools/kvm/powerpc/ioport.c create mode 100644 tools/kvm/powerpc/irq.c create mode 100644 tools/kvm/powerpc/kvm-cpu.c create mode 100644 tools/kvm/powerpc/kvm.c -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html