Re: [PATCH V3] Guest stop notification

2011-12-03 Thread Jan Kiszka
On 2011-12-02 22:27, Eric B Munson wrote: > On Fri, 02 Dec 2011, Jan Kiszka wrote: > >> On 2011-12-02 20:19, Eric B Munson wrote: >>> Often when a guest is stopped from the qemu console, it will report spurious >>> soft lockup warnings on resume. There are kernel patches being discussed >>> that

Re: [PATCH 3/5 V4] Add ioctl for KVM_GUEST_STOPPED

2011-12-03 Thread Sasha Levin
On Tue, 2011-11-29 at 16:35 -0500, Eric B Munson wrote: > > Now that we have a flag that will tell the guest it was suspended, > create an interface for that communication using a KVM ioctl. > > Signed-off-by: Eric B Munson Can it be documented in api.txt as well? -- Sasha. -- To unsubscri

[RFC][PATCH 03/16] apic: Stop timer on reset

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka All LVTs are masked on reset, so the timer becomes ineffective. Letting it tick nevertheless is harmless, but will at least create a spurious trace event. Signed-off-by: Jan Kiszka --- hw/apic.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/apic.

[RFC][PATCH 02/16] kvm: Move kvmclock into hw/kvm folder

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka More KVM-specific devices will come, so let's start with moving the kvmclock into a dedicated folder. Signed-off-by: Jan Kiszka --- Makefile.target|4 ++-- configure |1 + hw/{kvmclock.c => kvm/clock.c} | 10 +- hw/{kvmclo

[RFC][PATCH 10/16] memory: Introduce memory_region_init_reservation

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka Introduce a memory region type that can reserve I/O space. Such regions are useful for modeling I/O that is only handled outside of QEMU, i.e. in the context of an accelerator like KVM. Any access to such a region from QEMU is a bug and will be reported as such. Signed-off-by: J

[RFC][PATCH 05/16] apic: Open-code timer save/restore

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka To enable migration between accelerated and non-accelerated APIC models, we will need to handle the timer saving and restoring specially and can no longer rely on the automatics of VMSTATE_TIMER. Specifically, accelerated model will not start any QEMUTimer. This patch therefore

[RFC][PATCH 00/16] uq/master: Introduce basic irqchip support

2011-12-03 Thread Jan Kiszka
Some weeks back I posted my MSI rework for qemu-kvm that shall once help integrating those bits into upstream. After that I wondered how a rewritten in-kernel irqchip model could look like and make use of this. But then I realized that there is actually no technical need to role out a first version

[RFC][PATCH 09/16] ioapic: Factor out core for KVM reuse

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka KVM will share the IOAPICState, the vmstate, the reset logic and certain init parts with the user space model. Signed-off-by: Jan Kiszka --- Makefile.target |2 +- hw/ioapic.c | 108 - hw/ioapic_common.c |

[RFC][PATCH 06/16] i8259: Factor out core for KVM reuse

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka Analogously to the APIC, we will reuse some parts of the user space i8259 model for KVM. In this case it is the PicState, vmstate description, a reset core and some init bits. Signed-off-by: Jan Kiszka --- Makefile.objs |2 +- hw/i8259.c | 78 +

[RFC][PATCH 04/16] apic: Factor out core for KVM reuse

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka The KVM in-kernel APIC model will reuse parts of the user space model, namely the vmstate, reset handling, IRQ coalescing tracker, some init steps and the base and tpr set/get routines. For the latter, we also prepare set callbacks as KVM will override those. Signed-off-by: Jan

[RFC][PATCH 07/16] ioapic: Convert to memory API

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka This maintains the old imprecise access size handling. Signed-off-by: Jan Kiszka --- hw/ioapic.c | 28 +++- 1 files changed, 11 insertions(+), 17 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 61991d7..56b1612 100644 --- a/hw/ioapic.c +++

[RFC][PATCH 01/16] msi: Generalize msix_supported to msi_supported

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka Rename msix_supported to msi_supported and control MSI and MSI-X activation this way. That was likely to original intention for this flag, but MSI support came after MSI-X. Signed-off-by: Jan Kiszka --- hw/msi.c |8 hw/msi.h |2 ++ hw/msix.c |9 -

[RFC][PATCH 08/16] ioapic: Reject non-dword accesses to IOWIN register

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka Aligns the model with the spec. Signed-off-by: Jan Kiszka --- hw/ioapic.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index 56b1612..eb75766 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -208,6 +208,9 @@ ioapic_mem_re

[RFC][PATCH 16/16] kvm: Arm in-kernel irqchip support

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka Make the basic in-kernel irqchip support selectable via -machine ...,kernel_irqchip=on. Leave it off by default until it can fully replace user space models. Signed-off-by: Jan Kiszka --- qemu-config.c |4 qemu-options.hx |5 - 2 files changed, 8 insertions(

[RFC][PATCH 13/16] kvm: x86: Add user space part for in-kernel APIC

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka This introduces the alternative APIC model 'kvm-apic' which makes use of KVM's in-kernel device model. MSI is not yet supported, so we disable this when the in-kernel model is in use. Signed-off-by: Jan Kiszka --- Makefile.target |2 +- hw/kvm/apic.c | 147 +

[RFC][PATCH 14/16] kvm: x86: Add user space part for in-kernel i8259

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka Introduce the alternative 'kvm-i8259' device model that exploits KVM in-kernel acceleration. The PIIX3 initialization code is furthermore extended by KVM specific IRQ route setup. Moreover, GSI injection differs in KVM mode from the user space model. As we can dispatch ISA-range

[RFC][PATCH 11/16] kvm: Introduce core services for in-kernel irqchip support

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka Add the basic infrastructure to active in-kernel irqchip support, inject interrupts into these models, and maintain IRQ routes. Routing is optional and depends on the host arch supporting KVM_CAP_IRQ_ROUTING. When it's not available on x86, we loose the HPET as we can't route GS

[RFC][PATCH 12/16] kvm: x86: Establish IRQ0 override control

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka KVM is forced to disable the IRQ0 override when we run with in-kernel irqchip but without IRQ routing support of the kernel. Set the fwcfg value correspondingly. This aligns us with qemu-kvm. Signed-off-by: Jan Kiszka --- hw/pc.c|3 ++- kvm-all.c |5 + kvm-stu

[RFC][PATCH 15/16] kvm: x86: Add user space part for in-kernel IOAPIC

2011-12-03 Thread Jan Kiszka
From: Jan Kiszka This introduces the KVM-accelerated IOAPIC model 'kvm-ioapic' and extends the IRQ routing setup by the 0->2 redirection when needed. The kvm-ioapic model has a property that allows to define its GSI base for injecting interrupts into the kernel model. This will allow to disentan

Re: [Qemu-devel] [PATCH V3] Guest stop notification

2011-12-03 Thread Marcelo Tosatti
On Sat, Dec 03, 2011 at 10:06:56AM +0100, Jan Kiszka wrote: > On 2011-12-02 22:27, Eric B Munson wrote: > > On Fri, 02 Dec 2011, Jan Kiszka wrote: > > > >> On 2011-12-02 20:19, Eric B Munson wrote: > >>> Often when a guest is stopped from the qemu console, it will report > >>> spurious > >>> soft

Re: [Qemu-devel] [PATCH V3] Guest stop notification

2011-12-03 Thread Jan Kiszka
On 2011-12-03 12:19, Marcelo Tosatti wrote: > On Sat, Dec 03, 2011 at 10:06:56AM +0100, Jan Kiszka wrote: >> On 2011-12-02 22:27, Eric B Munson wrote: >>> On Fri, 02 Dec 2011, Jan Kiszka wrote: >>> On 2011-12-02 20:19, Eric B Munson wrote: > Often when a guest is stopped from the qemu cons

Re: [Qemu-devel] [PATCH V3] Guest stop notification

2011-12-03 Thread Marcelo Tosatti
On Sat, Dec 03, 2011 at 12:25:37PM +0100, Jan Kiszka wrote: > On 2011-12-03 12:19, Marcelo Tosatti wrote: > > On Sat, Dec 03, 2011 at 10:06:56AM +0100, Jan Kiszka wrote: > >> On 2011-12-02 22:27, Eric B Munson wrote: > >>> On Fri, 02 Dec 2011, Jan Kiszka wrote: > >>> > On 2011-12-02 20:19, Eri

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-12-03 Thread Sasha Levin
On Fri, 2011-12-02 at 11:16 +1030, Rusty Russell wrote: > On Thu, 1 Dec 2011 12:26:42 +0200, "Michael S. Tsirkin" > wrote: > > On Thu, Dec 01, 2011 at 10:09:37AM +0200, Sasha Levin wrote: > > > On Thu, 2011-12-01 at 09:58 +0200, Michael S. Tsirkin wrote: > > > > We'll presumably need some logic t

Re: [Qemu-devel] [RFC][PATCH 02/16] kvm: Move kvmclock into hw/kvm folder

2011-12-03 Thread Andreas Färber
Am 03.12.2011 12:17, schrieb Jan Kiszka: > From: Jan Kiszka > > More KVM-specific devices will come, so let's start with moving the > kvmclock into a dedicated folder. > > Signed-off-by: Jan Kiszka > --- > diff --git a/Makefile.target b/Makefile.target > index 1e90df7..3a9e95d 100644 > --- a/M

RE: Is it possible to have SDL without X?

2011-12-03 Thread Matt Graham
> Date: Wed, 30 Nov 2011 13:23:36 -0600 > From: i...@theiggy.com > To: mattgraha...@hotmail.com > CC: kvm@vger.kernel.org > Subject: Re: Is it possible to have SDL without X? > > On 11/29/2011 9:29 PM, Matt Graham wrote: > > Hello, > > > > Can a guest with SDL graphics run on a host without X? I g

Re: [Qemu-devel] [RFC][PATCH 02/16] kvm: Move kvmclock into hw/kvm folder

2011-12-03 Thread Jan Kiszka
On 2011-12-03 20:00, Andreas Färber wrote: > Am 03.12.2011 12:17, schrieb Jan Kiszka: >> From: Jan Kiszka >> >> More KVM-specific devices will come, so let's start with moving the >> kvmclock into a dedicated folder. >> >> Signed-off-by: Jan Kiszka >> --- > >> diff --git a/Makefile.target b/Make