Re: [Qemu-devel] [PATCH 05/15] piix: create the HPET and RTC through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 15:54, Anthony Liguori wrote: > On 01/31/2012 08:49 AM, Jan Kiszka wrote: >> On 2012-01-31 15:43, Anthony Liguori wrote: >>> On 01/31/2012 08:26 AM, Jan Kiszka wrote: >>>> On 2012-01-26 20:00, Anthony Liguori wrote: >>>>> Signed-off-by:

Re: [Qemu-devel] [PATCH 14/15] i440fx: move bios loading to i440fx

2012-01-31 Thread Jan Kiszka
On 2012-01-31 15:57, Anthony Liguori wrote: > On 01/31/2012 08:53 AM, Jan Kiszka wrote: >> On 2012-01-31 15:50, Anthony Liguori wrote: >>> On 01/31/2012 08:38 AM, Jan Kiszka wrote: >>>> On 2012-01-26 20:00, Anthony Liguori wrote: >>&

Re: [Qemu-devel] [PATCH 05/15] piix: create the HPET and RTC through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 15:26, Jan Kiszka wrote: > Also note that the HPET is not a part of the PIIX, so composition is > wrong here. The RTC is again. Err, forgot my nonsense. The HPET is part of the PIIX. Dunno, I was somehow thinking of the IOAPIC while reading "HPET". Too few sleep,

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 15:58, Paolo Bonzini wrote: > On 01/31/2012 03:51 PM, Jan Kiszka wrote: >>>> >>>> BTW, this is yet another benefit of making structures public. You can >>>> take the >>>> address of a child and set link fields directly without ac

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 17:12, Anthony Liguori wrote: > On 01/31/2012 08:58 AM, Paolo Bonzini wrote: >> On 01/31/2012 03:51 PM, Jan Kiszka wrote: >>>>> >>>>> BTW, this is yet another benefit of making structures public. You can >>>>> take the >>

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 15:56, Anthony Liguori wrote: > On 01/31/2012 08:51 AM, Jan Kiszka wrote: >> On 2012-01-31 15:47, Anthony Liguori wrote: >>> On 01/31/2012 08:34 AM, Jan Kiszka wrote: >>>> On 2012-01-26 20:00, Anthony Liguori wrote: >>>>> @@ -548,6 +550,

Re: [Qemu-devel] [PATCH 06/15] piix: create i8254 through composition

2012-01-31 Thread Jan Kiszka
On 2012-01-31 17:49, Anthony Liguori wrote: > On 01/31/2012 10:42 AM, Jan Kiszka wrote: >> On 2012-01-31 15:56, Anthony Liguori wrote: >>> On 01/31/2012 08:51 AM, Jan Kiszka wrote: >>>> On 2012-01-31 15:47, Anthony Liguori wrote: >>>>> On 01/31/2012 08:

[Qemu-devel] [PATCH v3 1/7] i8254: Do not raise IRQ level on reset

2012-01-31 Thread Jan Kiszka
Avoid changing the IRQ level to high on reset as it may trigger spurious events. Instead, open-code the effects of pit_load_count(0) in the reset handler. Signed-off-by: Jan Kiszka --- hw/i8254.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hw/i8254.c b/hw

[Qemu-devel] [PATCH v3 0/7] pit, hpet, pcspk: fixes & preparation for KVM

2012-01-31 Thread Jan Kiszka
This is a preparatory series to allow the introduction of the KVM in-kernel PIT. It also fixes various bugs in the PIT and HPET code, see patches for details. Changes in V3: - rebased over master - tuned pic_init interface to avoid isa_get_irq(NULL, ...) Jan Kiszka (7): i8254: Do not raise

[Qemu-devel] [PATCH v3 5/7] i8254: Rework & fix interaction with HPET in legacy mode

2012-01-31 Thread Jan Kiszka
te is reconstructed on mode switch. Signed-off-by: Jan Kiszka --- hw/hpet.c | 38 -- hw/hpet_emul.h |3 +++ hw/i8254.c | 46 ++ hw/i8254.h |3 --- hw/pc.c| 15 --- 5 files change

[Qemu-devel] [PATCH v3 7/7] i8254: Factor out pit_get_channel_info

2012-01-31 Thread Jan Kiszka
KVM in-kernel PIT model. Signed-off-by: Jan Kiszka --- hw/i8254.c | 35 ++- hw/i8254.h | 12 hw/pcspk.c | 16 +++- 3 files changed, 29 insertions(+), 34 deletions(-) diff --git a/hw/i8254.c b/hw/i8254.c index 6412277..ff253bb 100644

[Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Jan Kiszka
Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance. Signed-off-by: Jan Kiszka --- arch_init.c|1 + hw/i82378.c|3 +- hw/mips_jazz.c |3 +- hw/pc.c|3 +- hw/pc.h|4 --- hw/pcspk.c

[Qemu-devel] [PATCH v3 4/7] i8254: Pass alternative IRQ output object on initialization

2012-01-31 Thread Jan Kiszka
e a generic GPIO output pin that is connected by the factory function. Signed-off-by: Jan Kiszka --- hw/alpha_dp264.c |2 +- hw/i82378.c|2 +- hw/i8254.c |4 +--- hw/i8254.h |6 -- hw/mips_fulong2e.c |2 +- hw/mips_jazz.c |2 +- hw/mips_malt

[Qemu-devel] [PATCH v3 3/7] i8254: Factor out interface header

2012-01-31 Thread Jan Kiszka
Move the public interface of the PIT into its own header file and update all users. Signed-off-by: Jan Kiszka --- hw/alpha_dp264.c |1 + hw/hpet.c |1 + hw/i82378.c|1 + hw/i8254.c |1 + hw/i8254.h | 54

[Qemu-devel] [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Jan Kiszka
In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ 8 but keeps track of the RTC output level and applies it when legacy mode is turned off again. This value has to be preserved across save/ restore as it cannot be reconstructed otherwise. Signed-off-by: Jan Kiszka --- hw

[Qemu-devel] [PATCH uq/master] kvm: Implement kvm_irqchip_in_kernel like kvm_enabled

2012-01-31 Thread Jan Kiszka
To both avoid that kvm_irqchip_in_kernel always has to be paired with kvm_enabled and that the former ends up in a function call, implement it like the latter. This means keeping the state in a global variable and defining kvm_irqchip_in_kernel as a preprocessor macro. Signed-off-by: Jan Kiszka

[Qemu-devel] [PATCH 0/4] uq/master: Introduce KVM PIT support

2012-01-31 Thread Jan Kiszka
ment kvm_irqchip_in_kernel http://thread.gmane.org/gmane.comp.emulators.qemu/134399 The series plus dependencies is also available at git://git.kiszka.org/qemu-kvm.git queues/kvm-pit Please review / merge. Jan Kiszka (4): i8254: Factor out base class for KVM reuse i8254: Open-code t

[Qemu-devel] [PATCH 3/4] kvm: Add kvm_has_pit_state2 helper

2012-01-31 Thread Jan Kiszka
To be used for in-kernel PIT emulation. Signed-off-by: Jan Kiszka --- kvm-all.c | 10 ++ kvm-stub.c |5 + kvm.h |1 + 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 3f2460f..8df5235 100644 --- a/kvm-all.c +++ b/kvm-all.c

[Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-01-31 Thread Jan Kiszka
parts. Signed-off-by: Jan Kiszka --- Makefile.objs |2 +- hw/i8254.c | 277 ++--- hw/i8254_common.c | 311 +++ hw/i8254_internal.h | 87 ++ 4 files changed, 434 insertions

[Qemu-devel] [PATCH 4/4] kvm: x86: Add user space part for in-kernel i8254

2012-01-31 Thread Jan Kiszka
f the host kernel (before 2.6.32), we may have to disable the HPET or lack sound output from the PC speaker. Signed-off-by: Jan Kiszka --- Makefile.target |2 +- hw/i8254.h | 11 +++ hw/kvm/i8254.c | 237 +++ hw/pc.c | 14 +++

[Qemu-devel] [PATCH 2/4] i8254: Open-code timer restore

2012-01-31 Thread Jan Kiszka
Same as for the APIC: To enable migration between accelerated and non-accelerated models, we need to arm the channel 0 timer only inside the emulated PIT model. The common code just saves/restores that timer to the the next_transition_time field. Signed-off-by: Jan Kiszka --- hw/i8254.c

Re: [Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-01-31 Thread Jan Kiszka
On 2012-01-31 22:40, Anthony Liguori wrote: > On 01/31/2012 12:46 PM, Jan Kiszka wrote: >> Applying the concept used for the *PICs once again: establish a base >> class for the i8254 that can be used both by the current user space >> emulation and the upcoming KVM in-kernel v

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Jan Kiszka
On 2012-01-31 21:49, Anthony Liguori wrote: > On 01/31/2012 11:41 AM, Jan Kiszka wrote: >> Convert the PC speaker device to a qdev ISA model. Move the public >> interface to a dedicated header file at this chance. >> >> Signed-off-by: Jan Kiszka > > Heh, I did t

Re: [Qemu-devel] [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Jan Kiszka
On 2012-01-31 22:02, Anthony Liguori wrote: > On 01/31/2012 11:41 AM, Jan Kiszka wrote: >> In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ >> 8 but keeps track of the RTC output level and applies it when legacy >> mode is turned off again. This valu

Re: [Qemu-devel] [PATCH v3 2/7] hpet: Save/restore cached RTC IRQ level

2012-01-31 Thread Jan Kiszka
On 2012-01-31 23:38, Anthony Liguori wrote: > On 01/31/2012 04:05 PM, Jan Kiszka wrote: >> On 2012-01-31 22:02, Anthony Liguori wrote: >>> On 01/31/2012 11:41 AM, Jan Kiszka wrote: >>>> In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ >>&g

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-01-31 Thread Jan Kiszka
On 2012-01-31 23:40, Anthony Liguori wrote: > On 01/31/2012 04:00 PM, Jan Kiszka wrote: >> On 2012-01-31 21:49, Anthony Liguori wrote: >>> On 01/31/2012 11:41 AM, Jan Kiszka wrote: >>>> Convert the PC speaker device to a qdev ISA model. Move the public >>>&g

Re: [Qemu-devel] [PATCH v3 6/7] pcspk: Convert to qdev

2012-02-01 Thread Jan Kiszka
On 2012-02-01 08:29, Paolo Bonzini wrote: > On 01/31/2012 09:49 PM, Anthony Liguori wrote: >>> >>> +DEFINE_PROP_HEX32("iobase", PCSpkState, iobase, -1), >>> +DEFINE_PROP_PTR("pit", PCSpkState, pit), >> >> Please don't introduce a pointer property here. They cannot be used in >> a

Re: [Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-02-01 Thread Jan Kiszka
On 2012-02-01 13:23, Paolo Bonzini wrote: > On 01/31/2012 10:49 PM, Jan Kiszka wrote: >>> Just make the methods that you want to override virtual with the default >>> implementation and then make a KVMPIT that inherits from the PIT and >>> then overrides whatever

Re: [Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-02-01 Thread Jan Kiszka
On 2012-02-01 13:55, Paolo Bonzini wrote: > On 02/01/2012 01:43 PM, Jan Kiszka wrote: >>> It looks good, besides the need to rebase to Anthony's "part 3" changes. >> Given that this part is not upstream and that the relevant conversion is >> scripted, I woul

Re: [Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-02-01 Thread Jan Kiszka
On 2012-02-01 14:10, Jan Kiszka wrote: > On 2012-02-01 13:55, Paolo Bonzini wrote: >> On 02/01/2012 01:43 PM, Jan Kiszka wrote: >>>> It looks good, besides the need to rebase to Anthony's "part 3" changes. >>> Given that this part is not upstream and

Re: [Qemu-devel] git bisect results: ec757c67c40a56492001487e69272f62144fd124 breaks windows boot in qemu-kvm

2012-02-01 Thread Jan Kiszka
On 2012-02-01 15:02, Erik Rull wrote: > > On February 1, 2012 at 2:40 PM Avi Kivity wrote: > >> On 02/01/2012 02:52 PM, Erik Rull wrote: >>> Hi all, >>> >>> first of all I'm a bit confused: >>> >>> What is the difference between qemu with command line option > --enable-kvm >>> and qemu-kvm? >>>

Re: [Qemu-devel] git bisect results: ec757c67c40a56492001487e69272f62144fd124 breaks windows boot in qemu-kvm

2012-02-01 Thread Jan Kiszka
On 2012-02-01 16:43, Erik Rull wrote: > On February 1, 2012 at 3:42 PM Jan Kiszka wrote: > >> On 2012-02-01 15:02, Erik Rull wrote: >>> >>> On February 1, 2012 at 2:40 PM Avi Kivity wrote: >>> >>>> On 02/01/2012 02:52 PM, Erik Rull wrote

Re: [Qemu-devel] git bisect results: ec757c67c40a56492001487e69272f62144fd124 breaks windows boot in qemu-kvm

2012-02-01 Thread Jan Kiszka
On 2012-02-01 13:52, Erik Rull wrote: > Hi all, > > first of all I'm a bit confused: > > What is the difference between qemu with command line option --enable-kvm > and qemu-kvm? > It seems to be a difference in code so far, from the performance point of > view it seems to be the same... > > No

[Qemu-devel] [PATCH v4 3/7] i8254: Factor out interface header

2012-02-01 Thread Jan Kiszka
Move the public interface of the PIT into its own header file and update all users. Signed-off-by: Jan Kiszka --- hw/alpha_dp264.c |1 + hw/hpet.c |1 + hw/i82378.c|1 + hw/i8254.c |1 + hw/i8254.h | 54

[Qemu-devel] [PATCH v4 0/7] pit, hpet, pcspk: fixes & preparation for KVM

2012-02-01 Thread Jan Kiszka
Changes in V4: - rebased over qom-upstream.13 - comment on rtc_irq_level clearing on reset - fix call to isa_register_ioport by passing the pcspk device Not changed: - PIT pointer property of pcspk (Paolo will port it together with other PROP_PTR users) CC: Paolo Bonzini Jan Kiszka (7

[Qemu-devel] [PATCH v4 6/7] pcspk: Convert to qdev

2012-02-01 Thread Jan Kiszka
Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance. CC: Paolo Bonzini Signed-off-by: Jan Kiszka --- arch_init.c|1 + hw/i82378.c|3 +- hw/mips_jazz.c |3 +- hw/pc.c|3 +- hw/pc.h|4

[Qemu-devel] [PATCH v4 4/7] i8254: Pass alternative IRQ output object on initialization

2012-02-01 Thread Jan Kiszka
e a generic GPIO output pin that is connected by the factory function. Signed-off-by: Jan Kiszka --- hw/alpha_dp264.c |2 +- hw/i82378.c|2 +- hw/i8254.c |4 +--- hw/i8254.h |6 -- hw/mips_fulong2e.c |2 +- hw/mips_jazz.c |2 +- hw/mips_malt

[Qemu-devel] [PATCH v4 7/7] i8254: Factor out pit_get_channel_info

2012-02-01 Thread Jan Kiszka
KVM in-kernel PIT model. Signed-off-by: Jan Kiszka --- hw/i8254.c | 35 ++- hw/i8254.h | 12 hw/pcspk.c | 16 +++- 3 files changed, 29 insertions(+), 34 deletions(-) diff --git a/hw/i8254.c b/hw/i8254.c index ac5432c..be39c55 100644

[Qemu-devel] [PATCH v4 5/7] i8254: Rework & fix interaction with HPET in legacy mode

2012-02-01 Thread Jan Kiszka
te is reconstructed on mode switch. Signed-off-by: Jan Kiszka --- hw/hpet.c | 38 -- hw/hpet_emul.h |3 +++ hw/i8254.c | 46 ++ hw/i8254.h |3 --- hw/pc.c| 15 --- 5 files change

[Qemu-devel] [PATCH v4 1/7] i8254: Do not raise IRQ level on reset

2012-02-01 Thread Jan Kiszka
Avoid changing the IRQ level to high on reset as it may trigger spurious events. Instead, open-code the effects of pit_load_count(0) in the reset handler. Signed-off-by: Jan Kiszka --- hw/i8254.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hw/i8254.c b/hw

[Qemu-devel] [PATCH v4 2/7] hpet: Save/restore cached RTC IRQ level

2012-02-01 Thread Jan Kiszka
rtc_irq_level won't survive a vmload without a hpet/rtc_irq_level subsection, add an explicit clearing to the reset handler. Signed-off-by: Jan Kiszka --- hw/hpet.c | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/hw/hpet.c b/hw/hpet.c index b6

Re: [Qemu-devel] git bisect results: ec757c67c40a56492001487e69272f62144fd124 breaks windows boot in qemu-kvm

2012-02-02 Thread Jan Kiszka
On 2012-02-02 14:18, Erik Rull wrote: > > On February 1, 2012 at 11:05 PM Erik Rull wrote: > >> Jan Kiszka wrote: >>> On 2012-02-01 13:52, Erik Rull wrote: >>>> Hi all, >>>> >>>> first of all I'm a bit confused: >>>>

Re: [Qemu-devel] git bisect results: ec757c67c40a56492001487e69272f62144fd124 breaks windows boot in qemu-kvm

2012-02-02 Thread Jan Kiszka
On 2012-02-02 15:07, Erik Rull wrote: > > On February 2, 2012 at 2:21 PM Jan Kiszka wrote: > >> On 2012-02-02 14:18, Erik Rull wrote: >>> >>> On February 1, 2012 at 11:05 PM Erik Rull > wrote: >>> >>>> Jan Kiszka wrote: &g

[Qemu-devel] [PATCH] usb: Resolve warnings about unassigned bus on usb device creation

2012-02-02 Thread Jan Kiszka
. Signed-off-by: Jan Kiszka --- hw/usb-bt.c |4 ++-- hw/usb-bus.c| 18 -- hw/usb-msd.c|4 ++-- hw/usb-net.c|4 ++-- hw/usb-serial.c |8 hw/usb.h|7 --- usb-bsd.c |4 ++-- usb-linux.c |4 ++-- vl.c

[Qemu-devel] [PATCH] memory-region: Report if region is read-only on info mtree

2012-02-03 Thread Jan Kiszka
Helpful to understand guest configurations of things like the i440FX's PAM. Signed-off-by: Jan Kiszka --- memory.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/memory.c b/memory.c index ee4c98a..ea4adda 100644 --- a/memory.c +++ b/memory.c @@ -1608,23 +16

[Qemu-devel] [PATCH] KVM: Fix breakages of QOM conversion

2012-02-03 Thread Jan Kiszka
From: Jan Kiszka KVM APIC and PIC require instance sizes. Signed-off-by: Jan Kiszka --- hw/kvm/apic.c |1 + hw/kvm/i8259.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/kvm/apic.c b/hw/kvm/apic.c index 89e33b0..dfc2ab3 100644 --- a/hw/kvm/apic.c +++ b/hw/kvm

[Qemu-devel] [PATCH v2] usb: Resolve warnings about unassigned bus on usb device creation

2012-02-03 Thread Jan Kiszka
From: Jan Kiszka When creating an USB device the old way, there is no way to specify the target bus. Thus the warning issued by usb_create makes no sense and rather confuses our users. Resolve this by passing a bus reference to the usbdevice_init handler and letting those handlers forward it to

Re: [Qemu-devel] [PATCH] memory-region: Report if region is read-only on info mtree

2012-02-04 Thread Jan Kiszka
On 2012-02-04 13:12, Blue Swirl wrote: > On Fri, Feb 3, 2012 at 12:02, Jan Kiszka wrote: >> Helpful to understand guest configurations of things like the i440FX's >> PAM. >> >> Signed-off-by: Jan Kiszka >> --- >> memory.c |6 -- >&

Re: [Qemu-devel] [PATCH] memory-region: Report if region is read-only on info mtree

2012-02-04 Thread Jan Kiszka
On 2012-02-04 13:32, Blue Swirl wrote: > On Sat, Feb 4, 2012 at 12:23, Jan Kiszka wrote: >> On 2012-02-04 13:12, Blue Swirl wrote: >>> On Fri, Feb 3, 2012 at 12:02, Jan Kiszka wrote: >>>> Helpful to understand guest configurations of things like the i440FX'

[Qemu-devel] [PATCH v2] memory-region: Report if region is read-only or write-only on info mtree

2012-02-04 Thread Jan Kiszka
From: Jan Kiszka Helpful to understand guest configurations of things like the i440FX's PAM or the state of ROM devices. Signed-off-by: Jan Kiszka --- Changes in v2: - encode R and W separately - print ROMD memory region state as well memory.c | 14 +++--- 1 files change

[Qemu-devel] [PATCH] cfi02: Fix lazy ROMD switching - once again

2012-02-04 Thread Jan Kiszka
The conversion to memory regions broke lazy ROMD switching by forgetting to update the rom_mode state variable. Signed-off-by: Jan Kiszka --- hw/pflash_cfi02.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pflash_cfi02.c b/hw/pflash_cfi02.c index a9e88b9..2ca0fd4

[Qemu-devel] [PATCH v3] memory-region: Report if region is read-only or write-only on info mtree

2012-02-04 Thread Jan Kiszka
From: Jan Kiszka Helpful to understand guest configurations of things like the i440FX's PAM or the state of ROM devices. Signed-off-by: Jan Kiszka --- Changes in v3: - refactored writable condition (which DO makes sense as a ROM device is either in ROM or in write mode. It's re

Re: [Qemu-devel] [PATCH 0/6] VGA patches

2012-02-04 Thread Jan Kiszka
On 2012-02-04 14:15, Blue Swirl wrote: > On Sun, Jan 29, 2012 at 19:12, Blue Swirl wrote: >> Patch 1 has been sent several times, though the logic has been copied >> from flawed implementations before. >> >> Other patches should be trivial. > > Pushed. I compared vga.o object files with codiff an

Re: [Qemu-devel] [PATCH] Fix memory dirty getting API change fallout

2012-02-04 Thread Jan Kiszka
On 2012-02-04 18:39, Blue Swirl wrote: > Fix confusion in length calculation in commit > cd7a45c95ecf2404810f3c6becb7cb83c5010ad8. > > Reported-by: Jan Kiszka > Signed-off-by: Blue Swirl > --- > hw/framebuffer.c |2 +- > hw/sm501.c |4 ++-- > hw/vga.c

[Qemu-devel] [PATCH 1/4] i8254: Factor out base class for KVM reuse

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka Applying the concept used for the *PICs once again: establish a base class for the i8254 that can be used both by the current user space emulation and the upcoming KVM in-kernel version. We share most of the public interface of the i8254, specifically to the pcspk, vmstate

[Qemu-devel] [PATCH 4/4] kvm: x86: Add user space part for in-kernel i8254

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka This provides the required user space stubs to enable the in-kernel i8254 emulation of KVM. The in-kernel model supports lost tick compensation according to the "delay" policy. This is enabled by default and can be switched off via a device property. Depending on t

[Qemu-devel] [PATCH 3/4] kvm: Add kvm_has_pit_state2 helper

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka To be used for in-kernel PIT emulation. Signed-off-by: Jan Kiszka --- kvm-all.c | 10 ++ kvm-stub.c |5 + kvm.h |1 + 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index c4babda..bddf922 100644 --- a/kvm

[Qemu-devel] [PATCH 2/4] i8254: Open-code timer restore

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka Same as for the APIC: To enable migration between accelerated and non-accelerated models, we need to arm the channel 0 timer only inside the emulated PIT model. The common code just saves/restores that timer to the the next_transition_time field. Signed-off-by: Jan Kiszka

[Qemu-devel] [PATCH 0/4] uq/master: Introduce KVM PIT support

2012-02-05 Thread Jan Kiszka
git://git.kiszka.org/qemu-kvm.git queues/kvm-pit Please review / merge. Jan Kiszka (4): i8254: Factor out base class for KVM reuse i8254: Open-code timer restore kvm: Add kvm_has_pit_state2 helper kvm: x86: Add user space part for in-kernel i8254 Makefile.objs |2 +- Makefile.ta

Re: [Qemu-devel] [PATCH 2/4] i8254: Open-code timer restore

2012-02-05 Thread Jan Kiszka
On 2012-02-05 12:23, Paolo Bonzini wrote: > On 02/05/2012 11:46 AM, Jan Kiszka wrote: >> diff --git a/hw/i8254_common.c b/hw/i8254_common.c >> index 0601d88..b60fbda 100644 >> --- a/hw/i8254_common.c >> +++ b/hw/i8254_common.c >> @@ -234,9 +234,8 @@ static i

[Qemu-devel] [PATCH uq/master] apic: Fix legacy vmstate loading for KVM

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka Also in case of loading pre-vmstate machines, we also need to open-code the reading of the timer expires value and instead call the post_load callback to apply it (or not). This fixes loading of legacy states into the KVM APIC. Reported-by: Paolo Bonzini Signed-off-by: Jan

[Qemu-devel] [PATCH 2/4 v3] i8254: Open-code timer restore

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka Same as for the APIC: To enable migration between accelerated and non-accelerated models, we need to arm the channel 0 timer only inside the emulated PIT model. The common code just saves/restores that timer to the the next_transition_time field. Signed-off-by: Jan Kiszka

[Qemu-devel] [PATCH 0/6] uq/master: TPR access optimization for Windows guests

2012-02-05 Thread Jan Kiszka
/gmane.comp.emulators.qemu/134844 It is based on upstream commit cb437e48ab (before the VGA breakage). The series plus dependencies is also available at git://git.kiszka.org/qemu-kvm.git queues/kvm-tpr Please review carefully. Jan Kiszka (6): target-i386: Add infrastructure for reporting TPR MMIO accesses

[Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka This enables acceleration for MMIO-based TPR registers accesses of 32-bit Windows guest systems. It is mostly useful with KVM enabled, either on older Intel CPUs (without flexpriority feature, can also be manually disabled for testing) or any current AMD processor. The approach

[Qemu-devel] [PATCH 4/6] kvmvapic: Simplify mp/up_set_tpr

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka The CH registers is only written, never read. So we can remove these operations and, in case of up_set_tpr, also the ECX push/pop. Signed-off-by: Jan Kiszka --- pc-bios/optionrom/kvmvapic.S |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/pc-bios

[Qemu-devel] [PATCH 2/6] kvmvapic: Add option ROM

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka This imports and builds the original VAPIC option ROM of qemu-kvm. Its interaction with QEMU is described in the commit that introduces the corresponding device model. Signed-off-by: Jan Kiszka --- .gitignore |1 + Makefile |2

[Qemu-devel] [PATCH 5/6] optionsrom: Reserve space for checksum

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka Always add a byte before the final 512-bytes alignment to reserve the space for the ROM checksum. Signed-off-by: Jan Kiszka --- pc-bios/optionrom/optionrom.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/pc-bios/optionrom/optionrom.h b/pc-bios

[Qemu-devel] [PATCH 1/6] target-i386: Add infrastructure for reporting TPR MMIO accesses

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka This will allow the APIC core to file a TPR access report. Depending on the accelerator and kernel irqchip mode, it will either be delivered right away or queued for later reporting. In TCG mode, we can restart the triggering instruction and can therefore forward the event

[Qemu-devel] [PATCH 6/6] kvmvapic: Use optionrom helpers

2012-02-05 Thread Jan Kiszka
From: Jan Kiszka Use OPTION_ROM_START/END from the common header file, add comment to init code. Signed-off-by: Jan Kiszka --- pc-bios/optionrom/kvmvapic.S | 18 -- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pc-bios/optionrom/kvmvapic.S b/pc-bios

Re: [Qemu-devel] [PATCH 3/4] kvm: Add kvm_has_pit_state2 helper

2012-02-05 Thread Jan Kiszka
On 2012-02-05 21:03, Juan Quintela wrote: > Jan Kiszka wrote: >> From: Jan Kiszka >> >> To be used for in-kernel PIT emulation. > > > >> +int pit_state2; > > This is used as a bool. > >> int xsave, xcrs; >>

[Qemu-devel] [PATCH] vga: Fix full updates in graphic mode

2012-02-07 Thread Jan Kiszka
This fixes the regression introduced by cd7a45c95e: We lost the or'ing with the full_update flag. Signed-off-by: Jan Kiszka --- Applies on top of the other related fix: http://thread.gmane.org/gmane.comp.emulators.qemu/134958 hw/vga.c |5 +++-- 1 files changed, 3 insertions(

Re: [Qemu-devel] [RFC] Next gen kvm api

2012-02-07 Thread Jan Kiszka
On 2012-02-07 17:02, Avi Kivity wrote: > On 02/07/2012 05:17 PM, Anthony Liguori wrote: >> On 02/07/2012 06:03 AM, Avi Kivity wrote: >>> On 02/06/2012 09:11 PM, Anthony Liguori wrote: I'm not so sure. ioeventfds and a future mmio-over-socketpair have to put the kthread to sleep

Re: [Qemu-devel] [RFC] Next gen kvm api

2012-02-07 Thread Jan Kiszka
On 2012-02-07 17:21, Anthony Liguori wrote: > On 02/07/2012 10:18 AM, Jan Kiszka wrote: >> On 2012-02-07 17:02, Avi Kivity wrote: >>> On 02/07/2012 05:17 PM, Anthony Liguori wrote: >>>> On 02/07/2012 06:03 AM, Avi Kivity wrote: >>>>> On 02/06/2012 09:11

Re: [Qemu-devel] [PATCH 1/6] memory: change dirty getting API to take a size

2012-02-07 Thread Jan Kiszka
On 2012-02-08 08:19, Evgeny Voevodin wrote: > On 01/29/2012 11:13 PM, Blue Swirl wrote: >> Instead of each device knowing or guessing the guest page size, >> just pass the desired size of dirtied memory area. >> >> Signed-off-by: Blue Swirl >> --- >> arch_init.c |7 --- >> exec-obso

[Qemu-devel] [PATCH] slirp: Prevent sending ICMP error replies to source-only addresses

2012-02-08 Thread Jan Kiszka
This triggered the related assert in arp_table_search. Signed-off-by: Jan Kiszka --- slirp/ip_icmp.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c index 4b43994..5dbf21d 100644 --- a/slirp/ip_icmp.c +++ b/slirp/ip_icmp.c @@ -262,6

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread Jan Kiszka
Looks like the subject would warmly welcome a "kvm:" tag. On 2012-02-09 05:22, David Gibson wrote: > In kvm-all.c we store an ioctl cmd number in the irqchip_inject_ioctl field > of KVMState, which has type 'int'. This seems to make sense since the > ioctl() man page says that the cmd parameter h

[Qemu-devel] subpages with memory region aliases (was: [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests)

2012-02-09 Thread Jan Kiszka
Avi, Before I forget: On 2012-02-05 13:39, Jan Kiszka wrote: > +static void vapic_map_rom_writable(VAPICROMState *s) > +{ > +target_phys_addr_t rom_paddr = s->rom_state_paddr & ROM_BLOCK_MASK; > +MemoryRegionSection section; > +MemoryRegion *as; > +size_t

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread Jan Kiszka
On 2012-02-09 10:58, David Gibson wrote: > On Thu, Feb 09, 2012 at 09:30:09AM +0100, Jan Kiszka wrote: >> Looks like the subject would warmly welcome a "kvm:" tag. >> >> On 2012-02-09 05:22, David Gibson wrote: > [snip] >> >> What about naming the p

Re: [Qemu-devel] [Qemu-trivial] [PATCH] memory-region: Report if region is read-only on info mtree

2012-02-09 Thread Jan Kiszka
On 2012-02-09 09:35, Stefan Hajnoczi wrote: > On Sat, Feb 04, 2012 at 03:51:43PM +0100, Jan Kiszka wrote: >> On 2012-02-04 13:32, Blue Swirl wrote: >>> On Sat, Feb 4, 2012 at 12:23, Jan Kiszka wrote: >>>> On 2012-02-04 13:12, Blue Swirl wrote: >>>>> On

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread Jan Kiszka
On 2012-02-09 13:07, Paul Brook wrote: What about naming the problem instead: /* Comparison with IOCTL macros on 32-bit hosts requires unsigned. */ >>> >>> Just once, it would be nice to post something to this list and get a >>> substantive comment _before_ the bitching about minutia

Re: [Qemu-devel] subpages with memory region aliases

2012-02-09 Thread Jan Kiszka
On 2012-02-09 10:32, Avi Kivity wrote: > On 02/09/2012 10:35 AM, Jan Kiszka wrote: >> Avi, >> >> Before I forget: >> >> On 2012-02-05 13:39, Jan Kiszka wrote: >>> +static void vapic_map_rom_writable(VAPICROMState *s) >>> +{ >>

Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests

2012-02-09 Thread Jan Kiszka
On 2012-02-09 16:18, Avi Kivity wrote: > On 02/05/2012 02:39 PM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> This enables acceleration for MMIO-based TPR registers accesses of >> 32-bit Windows guest systems. It is mostly useful with KVM enabled, >> ei

Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests

2012-02-09 Thread Jan Kiszka
On 2012-02-09 17:00, Avi Kivity wrote: > On 02/09/2012 05:39 PM, Jan Kiszka wrote: >> On 2012-02-09 16:18, Avi Kivity wrote: >>> On 02/05/2012 02:39 PM, Jan Kiszka wrote: >>>> From: Jan Kiszka >>>> >>>> This enables acceleration for MMIO-bas

Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests

2012-02-09 Thread Jan Kiszka
On 2012-02-09 17:47, Avi Kivity wrote: > On 02/09/2012 06:32 PM, Jan Kiszka wrote: >>>> >>>> We need to patch the causing instruction, so we have to know where it >>>> starts. Or what do you mean? >>> >>> Just don't deal with

Re: [Qemu-devel] [PATCH 3/6] kvmvapic: Introduce TPR access optimization for Windows guests

2012-02-09 Thread Jan Kiszka
On 2012-02-09 18:20, Paolo Bonzini wrote: > On 02/09/2012 05:32 PM, Jan Kiszka wrote: >> > I mean just check kpcr.self. >> >> Yes, clear, but that means that Windows must have initialized FS.base to >> point to the KPCR also in UP mode. Is that really the case? E.g.

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread Jan Kiszka
On 2012-02-10 07:43, David Gibson wrote: > On Thu, Feb 09, 2012 at 11:06:57AM +0100, Jan Kiszka wrote: >> On 2012-02-09 10:58, David Gibson wrote: >>> On Thu, Feb 09, 2012 at 09:30:09AM +0100, Jan Kiszka wrote: >>>> Looks like the subject would warmly welcome a "

[Qemu-devel] [PULL] slirp: cleanups & fixes

2012-02-10 Thread Jan Kiszka
The following changes since commit 57c83dacfe179bf061b8fa79d9553ebabe4d2ff4: make: Remove duplicate use of GLIB_CFLAGS (2012-02-09 20:44:38 +0400) are available in the git repository at: git://git.kiszka.org/qemu.git queues/slirp Jan Kiszka (1): slirp: Prevent sending ICMP error

Re: [Qemu-devel] [PATCH v3 6/6] qemu_calculate_timeout: increase minimum timeout to 1h

2012-02-10 Thread Jan Kiszka
On 2012-02-10 12:18, Paolo Bonzini wrote: > On 02/10/2012 12:19 PM, Stefano Stabellini wrote: >> I think you are right and the right thing to do would be blocking >> indefinitely. >> However if slirp doesn't support it, we could have a timeout of 1000 if >> CONFIG_SLIRP, otherwise block indefinitel

[Qemu-devel] [PATCH v2 0/8] uq/master: TPR access optimization for Windows guests

2012-02-10 Thread Jan Kiszka
variations for a table-driven approach) - dropped smp_cpus == 1 special case from get_kpcr_number - fixed comment why R/W ROM alias has to be page-aligned The series is also available at git://git.kiszka.org/qemu-kvm.git queues/kvm-tpr Please review/apply. CC: Paolo Bonzini Jan Kiszka

[Qemu-devel] [PATCH v2 7/8] optionsrom: Reserve space for checksum

2012-02-10 Thread Jan Kiszka
Always add a byte before the final 512-bytes alignment to reserve the space for the ROM checksum. Signed-off-by: Jan Kiszka --- pc-bios/optionrom/optionrom.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/pc-bios/optionrom/optionrom.h b/pc-bios/optionrom/optionrom.h

[Qemu-devel] [PATCH v2 6/8] kvmvapic: Simplify mp/up_set_tpr

2012-02-10 Thread Jan Kiszka
The CH registers is only written, never read. So we can remove these operations and, in case of up_set_tpr, also the ECX push/pop. Signed-off-by: Jan Kiszka --- pc-bios/optionrom/kvmvapic.S |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/pc-bios/optionrom

[Qemu-devel] [PATCH v2 4/8] kvmvapic: Add option ROM

2012-02-10 Thread Jan Kiszka
This imports and builds the original VAPIC option ROM of qemu-kvm. Its interaction with QEMU is described in the commit that introduces the corresponding device model. Signed-off-by: Jan Kiszka --- .gitignore |1 + Makefile |2 +- pc-bios/optionrom

[Qemu-devel] [PATCH v2 5/8] kvmvapic: Introduce TPR access optimization for Windows guests

2012-02-10 Thread Jan Kiszka
-by: Jan Kiszka --- Makefile.target|3 +- hw/apic.c | 126 - hw/apic_common.c | 64 +- hw/apic_internal.h | 27 ++ hw/kvm/apic.c | 32 +++ hw/kvmvapic.c | 774 6 files changed, 1012 insertions

[Qemu-devel] [PATCH v2 3/8] target-i386: Add infrastructure for reporting TPR MMIO accesses

2012-02-10 Thread Jan Kiszka
precise information. Signed-off-by: Jan Kiszka --- cpu-all.h|3 ++- hw/apic.h|2 ++ hw/apic_common.c |4 target-i386/cpu.h|9 + target-i386/helper.c | 19 +++ target-i386/kvm.c| 24 ++-- 6 files

[Qemu-devel] [PATCH v2 8/8] kvmvapic: Use optionrom helpers

2012-02-10 Thread Jan Kiszka
Use OPTION_ROM_START/END from the common header file, add comment to init code. Signed-off-by: Jan Kiszka --- pc-bios/optionrom/kvmvapic.S | 18 -- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pc-bios/optionrom/kvmvapic.S b/pc-bios/optionrom/kvmvapic.S index

[Qemu-devel] [PATCH v2 2/8] Allow to use pause_all_vcpus from VCPU context

2012-02-10 Thread Jan Kiszka
to wait for the whole gang. CC: Paolo Bonzini Signed-off-by: Jan Kiszka --- cpus.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index d0c8340..5adfc6b 100644 --- a/cpus.c +++ b/cpus.c @@ -870,6 +870,18 @@ void pause_all_vcpus(void

[Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-10 Thread Jan Kiszka
As we have thread-local cpu_single_env now and KVM uses exactly one thread per VCPU, we can drop the cpu_single_env updates from the loop and initialize this variable only once during setup. Signed-off-by: Jan Kiszka --- cpus.c|1 + kvm-all.c |5 - 2 files changed, 1 insertions

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 11:02, Blue Swirl wrote: > On Fri, Feb 10, 2012 at 18:31, Jan Kiszka wrote: >> As we have thread-local cpu_single_env now and KVM uses exactly one >> thread per VCPU, we can drop the cpu_single_env updates from the loop >> and initialize this variable only once

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 12:25, Blue Swirl wrote: > On Sat, Feb 11, 2012 at 10:06, Jan Kiszka wrote: >> On 2012-02-11 11:02, Blue Swirl wrote: >>> On Fri, Feb 10, 2012 at 18:31, Jan Kiszka wrote: >>>> As we have thread-local cpu_single_env now and KVM uses exactly one >>

Re: [Qemu-devel] [PATCH v2 1/8] kvm: Set cpu_single_env only once

2012-02-11 Thread Jan Kiszka
On 2012-02-11 12:49, Andreas Färber wrote: > Am 11.02.2012 12:25, schrieb Blue Swirl: >> I think using cpu_single_env is an indication of a problem, like poor >> code, layering violation or poor API (vmport). What is your use case? > > I couldn't spot any in this series. Jan, note that any new use

<    1   2   3   4   5   6   7   8   9   10   >