Re: [Qemu-devel] [PATCH] This patch is used to move some struct definition, like QEMUTimer, QEMUClock, from .c to .h.

2012-02-05 Thread Richard Yang
On Sat, Feb 04, 2012 at 10:22:09AM +, Blue Swirl wrote: >On Tue, Jan 31, 2012 at 06:56, Wei Yang wrote: >> Tested on i386 platform. >> >> Signed-off-by: Wei Yang > >Nack. Definitions should reside in files where they are used, only in >header files when they are used by multiple sources. > Tha

Re: [Qemu-devel] [QEMU] net: adapt dump to support the new syntax

2012-02-05 Thread Paolo Bonzini
On 01/24/2012 11:42 AM, Stefan Hajnoczi wrote: I refactored the network subsystem to drop the "VLAN" concept a while back but never got around to submitting the patches: http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/vlan-hub This branch completely removes the "VLAN" feature. Instea

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; >> int many_ioeventfds; >> int irqchip_inject_ioctl; >> @@ -954,6

[Qemu-devel] [PATCH] Add missing const attributes for MemoryRegionOps

2012-02-05 Thread Stefan Weil
Most MemoryRegionOps already had the const attribute. This patch adds it to the remaining ones. Signed-off-by: Stefan Weil --- hw/cuda.c |2 +- hw/ide/ahci.c |4 ++-- hw/ide/cmd646.c|6 +++--- hw/ide/macio.c |2 +- hw/ide/piix.c |2 +- hw/ide/via.c

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

2012-02-05 Thread Juan Quintela
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; > int many_ioeventfds; > int irqchip_inject_ioctl; > @@ -954,6 +955,10 @@ int kvm_init(void) > s->xcrs = kvm_check_extens

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

2012-02-05 Thread Anthony Liguori
On 02/05/2012 03:51 AM, Gleb Natapov wrote: On Sun, Feb 05, 2012 at 11:44:43AM +0200, Avi Kivity wrote: On 02/05/2012 11:37 AM, Gleb Natapov wrote: On Thu, Feb 02, 2012 at 06:09:54PM +0200, Avi Kivity wrote: Device model Currently kvm virtualizes or emulates a set of x86 cores, wi

Re: [Qemu-devel] [PATCH] w32: Fix build with new net bridge code

2012-02-05 Thread Corey Bryant
On 02/04/2012 03:24 AM, Stefan Weil wrote: Commit a7c36ee4920ea3acc227a0248dd161693f207357 added code for a net bridge and explicitly said that "this is very Linux centric". Indeed, compilation failed for w32, so the bridge code is now conditional. Hosts which don't support it can simply remov

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

2012-02-05 Thread Avi Kivity
On 02/05/2012 12:58 PM, Gleb Natapov wrote: > > > > > > > Reduced performance is what I mean. Obviously old guests will continue > > > working. > > > > I'm not happy about it either. > > > It is not only about old guests either. In RHEL we pretend to not > support HPET because when some guests

[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/optionro

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

2012-02-05 Thread Avi Kivity
On 02/03/2012 12:13 AM, Rob Earhart wrote: > On Thu, Feb 2, 2012 at 8:09 AM, Avi Kivity > wrote: > > The kvm api has been accumulating cruft for several years now. > This is > due to feature creep, fixing mistakes, experience gained by the > maintainers and

[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 direc

[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/opti

[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 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/o

[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 0/6] uq/master: TPR access optimization for Windows guests

2012-02-05 Thread Jan Kiszka
And yet another qemu-kvm piece: Windows 32-bit guests make heavy use of the MMIO-based TPR register. On older Intel CPUs and current AMDs, this causes significant KVM vmexit rates as the register needs to be trapped by the hypervisor. This series introduces a workaround for this hardware limitatio

[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 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 Kisz

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 int pit_load_old(QEMUFile *f, void *opaque

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

2012-02-05 Thread Paolo Bonzini
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 int pit_load_old(QEMUFile *f, void *opaque, int version_id) qemu_get_8s(f,&s->gate);

Re: [Qemu-devel] [PATCH 2/6] qdev-property: Make bit property parsing stricter

2012-02-05 Thread Stefan Hajnoczi
On Fri, Jan 27, 2012 at 11:09:21AM +0100, Andreas Färber wrote: > Am 27.01.2012 08:27, schrieb Stefan Hajnoczi: > > From: Jan Kiszka > > > > By using strncasecmp, we allow for arbitrary characters after the > > "on"/"off" string. Fix this by switching to strcasecmp. > > > > Reviewed-by: Andreas

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

2012-02-05 Thread Gleb Natapov
On Sun, Feb 05, 2012 at 11:56:21AM +0200, Avi Kivity wrote: > On 02/05/2012 11:51 AM, Gleb Natapov wrote: > > On Sun, Feb 05, 2012 at 11:44:43AM +0200, Avi Kivity wrote: > > > On 02/05/2012 11:37 AM, Gleb Natapov wrote: > > > > On Thu, Feb 02, 2012 at 06:09:54PM +0200, Avi Kivity wrote: > > > > > D

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

2012-02-05 Thread Jan Kiszka
This adds another piece of qemu-kvm to upstream: The accelerated in-kernel model of the i8254. It does this in the same fashion as the interrupt controllers were already introduced. And it even has one bug less than qemu-kvm: PC speaker output still works with KVM acceleration enabled. Changes in

[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 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-all.c

[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 the feature se

[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, reset

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

2012-02-05 Thread Avi Kivity
On 02/05/2012 11:51 AM, Gleb Natapov wrote: > On Sun, Feb 05, 2012 at 11:44:43AM +0200, Avi Kivity wrote: > > On 02/05/2012 11:37 AM, Gleb Natapov wrote: > > > On Thu, Feb 02, 2012 at 06:09:54PM +0200, Avi Kivity wrote: > > > > Device model > > > > > > > > Currently kvm virtualizes or

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

2012-02-05 Thread Gleb Natapov
On Sun, Feb 05, 2012 at 11:44:43AM +0200, Avi Kivity wrote: > On 02/05/2012 11:37 AM, Gleb Natapov wrote: > > On Thu, Feb 02, 2012 at 06:09:54PM +0200, Avi Kivity wrote: > > > Device model > > > > > > Currently kvm virtualizes or emulates a set of x86 cores, with or > > > without local

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

2012-02-05 Thread Avi Kivity
On 02/05/2012 11:37 AM, Gleb Natapov wrote: > On Thu, Feb 02, 2012 at 06:09:54PM +0200, Avi Kivity wrote: > > Device model > > > > Currently kvm virtualizes or emulates a set of x86 cores, with or > > without local APICs, a 24-input IOAPIC, a PIC, a PIT, and a number of > > PCI devices

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

2012-02-05 Thread Gleb Natapov
On Thu, Feb 02, 2012 at 06:09:54PM +0200, Avi Kivity wrote: > Device model > > Currently kvm virtualizes or emulates a set of x86 cores, with or > without local APICs, a 24-input IOAPIC, a PIC, a PIT, and a number of > PCI devices assigned from the host. The API allows emulating the l

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

2012-02-05 Thread Avi Kivity
On 02/03/2012 04:09 AM, Anthony Liguori wrote: > >> Note: this may cause a regression for older guests >> that don't support MSI or kvmclock. Device assignment will be done >> using VFIO, that is, without direct kvm involvement. >> >> Local APICs will be mandatory, but it will be possible to hide