Re: [PATCH V4 3/7] kvm tools: Add SPAPR PPC64 hcall rtascall structure

2012-01-31 Thread Pekka Enberg
On Tue, Jan 31, 2012 at 8:34 AM, Matt Evans m...@ozlabs.org wrote: +#define DEBUG_SPAPR_HCALLS I suppose this shouldn't be defined by default? +#ifdef DEBUG_SPAPR_HCALLS +#define hcall_dprintf(fmt, ...) \ +    do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) +#else +#define

Re: [PATCH] kvm tools: Repair running on non ioeventfd-capable platforms

2012-01-31 Thread Pekka Enberg
On Tue, Jan 31, 2012 at 8:30 AM, Matt Evans m...@ozlabs.org wrote: Commit d3923126a24212f1e746a84a575dadbd9f259418 added a bunch of nice error checking around ioevent__init() but the init may gracefully fail if ioevents simply aren't supported (PPC64 KVM). This commit adds a new return code

Re: [PATCH V4 0/7] Add initial SPAPR PPC64 architecture support

2012-01-31 Thread Pekka Enberg
On Tue, Jan 31, 2012 at 8:34 AM, Matt Evans m...@ozlabs.org wrote: This series adds support for a PPC64 platform, SPAPR, on top of the previous more general PPC64 CPU support.  This platform is paravirtualised, with most of the MMU hypercalls being dealt with in the kernel.  Userland needs to

Re: [PATCH 4/4 v3] KVM: Introduce kvm_memory_slot::arch and move lpage_info into it

2012-01-31 Thread Avi Kivity
On 01/31/2012 03:17 AM, Takuya Yoshikawa wrote: Added s390 and ppc developers to Cc, (2012/01/30 14:35), Takuya Yoshikawa wrote: Some members of kvm_memory_slot are not used by every architecture. This patch is the first step to make this difference clear by introducing

Re: [PATCH 4/4 v3] KVM: Introduce kvm_memory_slot::arch and move lpage_info into it

2012-01-31 Thread Takuya Yoshikawa
(2012/01/31 18:18), Avi Kivity wrote: On 01/31/2012 03:17 AM, Takuya Yoshikawa wrote: Added s390 and ppc developers to Cc, (2012/01/30 14:35), Takuya Yoshikawa wrote: Some members of kvm_memory_slot are not used by every architecture. This patch is the first step to make this difference

Re: [PATCH v2 3/3] KVM: x86 emulator: Allow PM/VM86 switch during task switch

2012-01-31 Thread Gleb Natapov
On Mon, Jan 30, 2012 at 04:26:06PM +0100, Kevin Wolf wrote: Would that be enough or would we have to avoid clearing it in all other places as well? Where would it be initialised if it's not enough? Maybe vmx_vcpu_reset(). Do all CPL changes go through set_cr0/segment/rflags/cpl? I

[Bug 42563] rhel5u5 guest panic when booting up

2012-01-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42563 --- Comment #8 from Gleb g...@redhat.com 2012-01-31 09:39:50 --- (In reply to comment #7) (In reply to comment #6) (In reply to comment #5) (In reply to comment #4) Yes. With 'ignore_msrs=y' added when loading kvm module,

[Bug 42563] rhel5u5 guest panic when booting up

2012-01-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42563 Jay Ren yongjie@intel.com changed: What|Removed |Added Status|NEW |RESOLVED

[Bug 42563] rhel5u5 guest panic when booting up

2012-01-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42563 Jay Ren yongjie@intel.com changed: What|Removed |Added Status|RESOLVED|VERIFIED --

[Bug 42563] rhel5u5 guest panic when booting up

2012-01-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42563 Jay Ren yongjie@intel.com changed: What|Removed |Added Status|VERIFIED|CLOSED --- Comment #9

Re: [PATCH V4 2/7] kvm tools: Generate SPAPR PPC64 guest device tree

2012-01-31 Thread Matt Evans
On 31 Jan 2012, at 18:59, Pekka Enberg wrote: On Tue, Jan 31, 2012 at 8:34 AM, Matt Evans m...@ozlabs.org wrote: +static struct cpu_info cpu_power7_info = { + POWER7, + power7_page_sizes_prop, sizeof(power7_page_sizes_prop), + power7_segment_sizes_prop,

Re: [PATCH V4 3/7] kvm tools: Add SPAPR PPC64 hcall rtascall structure

2012-01-31 Thread Matt Evans
On 31 Jan 2012, at 19:11, Pekka Enberg wrote: On Tue, Jan 31, 2012 at 8:34 AM, Matt Evans m...@ozlabs.org wrote: +#define DEBUG_SPAPR_HCALLS I suppose this shouldn't be defined by default? Well, I had a bit of a debate about it. I left it on as it is actually interesting whilst

Re: [PATCH v2 3/3] KVM: x86 emulator: Allow PM/VM86 switch during task switch

2012-01-31 Thread Avi Kivity
On 01/31/2012 11:37 AM, Gleb Natapov wrote: On Mon, Jan 30, 2012 at 04:26:06PM +0100, Kevin Wolf wrote: Would that be enough or would we have to avoid clearing it in all other places as well? Where would it be initialised if it's not enough? Maybe vmx_vcpu_reset(). Do all CPL

Increase KVMSlots size

2012-01-31 Thread Bhushan Bharat-R65777
Hi All, In my development I came across the state where I need more than 32 kvmslots QEMU/kvm-all.c: cut struct KVMState { KVMSlot slots[32]; cut Followings are the solution I thought of: Solution 1: Increase the slot to 64 in both KVM and QEMU. I think this will also

[VT-d reboot problems] Re: [PATCH] x86 / reboot: Blacklist Dell OptiPlex 990 known to require PCI reboot

2012-01-31 Thread Ingo Molnar
(added KVM folks to the Cc:) * Bastien ROUCARIES roucaries.bast...@gmail.com wrote: Ping^2 Bastien On Mon, Jan 23, 2012 at 11:28 AM, Bastien ROUCARIES roucaries.bast...@gmail.com wrote: On Mon, Jan 16, 2012 at 8:21 PM, H. Peter Anvin h...@zytor.com wrote: On 01/16/2012 03:27 AM,

Re: VMXON region vs VMCS region?

2012-01-31 Thread Orit Wasserman
On 01/31/2012 05:35 AM, Zhi Yong Wu wrote: HI, Can anyone let me know know the difference between VMXON region and VMCS region? relationship? There is no relationship between them: VMXON region is created per logical processor and used by it for VMX ops. VMCS region is created for each

Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-31 Thread Avi Kivity
On 01/28/2012 04:21 PM, Alex Williamson wrote: To date we've only exposed BARs as 32bit even if the device physically supports 64bit BARs. Enable 64bit BARs to be exposed as such in the guest, which may free up MMIO below 4G should the guest choose to use it. This adds a new mem64= option

Re: [PATCH 4/4 v3] KVM: Introduce kvm_memory_slot::arch and move lpage_info into it

2012-01-31 Thread Takuya Yoshikawa
Christian Borntraeger borntrae...@de.ibm.com wrote: Some members of kvm_memory_slot are not used by every architecture. This patch is the first step to make this difference clear by introducing kvm_memory_slot::arch; lpage_info is moved into it. Patch series seems to work on s390.

Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-31 Thread Jan Kiszka
On 2012-01-31 13:40, Avi Kivity wrote: On 01/28/2012 04:21 PM, Alex Williamson wrote: To date we've only exposed BARs as 32bit even if the device physically supports 64bit BARs. Enable 64bit BARs to be exposed as such in the guest, which may free up MMIO below 4G should the guest choose to

Re: [PATCH 3/9] pci-assign: Update MSI-X MMIO to Memory API

2012-01-31 Thread Avi Kivity
On 01/28/2012 04:21 PM, Alex Williamson wrote: Stop using compatibility mode and at the same time fix available access sizes. The PCI spec indicates that the MSI-X table may only be accessed as DWORD or QWORD. static const MemoryRegionOps msix_mmio_ops = { -.old_mmio = { -

Re: [PATCH 9/9] pci-assign: Update MSI-X config based on table writes

2012-01-31 Thread Avi Kivity
On 01/28/2012 04:22 PM, Alex Williamson wrote: We currently only update MSI-X configuration with the enable bit in PCI config space is toggled. This is pretty sketchy and part of the reason for the odd checks for vector data is to guess whether the guest is going to use the vector so we can

Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-31 Thread Avi Kivity
On 01/31/2012 02:45 PM, Jan Kiszka wrote: On 2012-01-31 13:40, Avi Kivity wrote: On 01/28/2012 04:21 PM, Alex Williamson wrote: To date we've only exposed BARs as 32bit even if the device physically supports 64bit BARs. Enable 64bit BARs to be exposed as such in the guest, which may free

Re: [PATCH 0/9] pci-assign: 64bit MMIO + better MSI-X table support

2012-01-31 Thread Avi Kivity
On 01/30/2012 03:44 PM, Alex Williamson wrote: On Mon, 2012-01-30 at 11:11 +0100, Jan Kiszka wrote: On 2012-01-28 15:21, Alex Williamson wrote: Patch 1 2 here are independent of the rest, but I include them here to avoid conflicts. The first patch enables exposing MMIO BARs as their

Re: [PATCH 0/9] pci-assign: 64bit MMIO + better MSI-X table support

2012-01-31 Thread Jan Kiszka
On 2012-01-31 13:52, Avi Kivity wrote: On 01/30/2012 03:44 PM, Alex Williamson wrote: On Mon, 2012-01-30 at 11:11 +0100, Jan Kiszka wrote: On 2012-01-28 15:21, Alex Williamson wrote: Patch 1 2 here are independent of the rest, but I include them here to avoid conflicts. The first patch

Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-31 Thread Jan Kiszka
On 2012-01-31 13:51, Avi Kivity wrote: On 01/31/2012 02:45 PM, Jan Kiszka wrote: On 2012-01-31 13:40, Avi Kivity wrote: On 01/28/2012 04:21 PM, Alex Williamson wrote: To date we've only exposed BARs as 32bit even if the device physically supports 64bit BARs. Enable 64bit BARs to be exposed

Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-31 Thread Avi Kivity
On 01/31/2012 02:57 PM, Jan Kiszka wrote: Seems fine, but do we really need the option? If it doesn't work we should treat it as an ordinary but and fix it. So far it's against the architecture of the emulated system: our current chipset predates 64 bit PCI. Then it should be

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Andreas Färber
Am 31.01.2012 00:53, schrieb Anthony Liguori: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any agenda items you are interested in covering. VMState: Anthony specifically said that VMState were not affected by QOM and that patches

Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-31 Thread Jan Kiszka
On 2012-01-31 14:10, Avi Kivity wrote: On 01/31/2012 02:57 PM, Jan Kiszka wrote: Seems fine, but do we really need the option? If it doesn't work we should treat it as an ordinary but and fix it. So far it's against the architecture of the emulated system: our current chipset predates 64

Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-31 Thread Avi Kivity
On 01/31/2012 03:21 PM, Jan Kiszka wrote: On 2012-01-31 14:10, Avi Kivity wrote: On 01/31/2012 02:57 PM, Jan Kiszka wrote: Seems fine, but do we really need the option? If it doesn't work we should treat it as an ordinary but and fix it. So far it's against the architecture of the

Re: [PATCH] kvm tools: Repair running on non ioeventfd-capable platforms

2012-01-31 Thread Sasha Levin
On Tue, 2012-01-31 at 17:30 +1100, Matt Evans wrote: Commit d3923126a24212f1e746a84a575dadbd9f259418 added a bunch of nice error checking around ioevent__init() but the init may gracefully fail if ioevents simply aren't supported (PPC64 KVM). This commit adds a new return code for the init

Re: [RFC][PATCH] srcu: Implement call_srcu()

2012-01-31 Thread Avi Kivity
On 01/31/2012 03:32 PM, Peter Zijlstra wrote: Subject: srcu: Implement call_srcu() From: Peter Zijlstra a.p.zijls...@chello.nl Date: Mon Jan 30 23:20:49 CET 2012 Implement call_srcu() by using a state machine driven by call_rcu_sched() and timer callbacks. The state machine is a direct

Re: [RFC][PATCH] srcu: Implement call_srcu()

2012-01-31 Thread Peter Zijlstra
On Tue, 2012-01-31 at 15:47 +0200, Avi Kivity wrote: They really need to return quickly to userspace, and they really need to perform some operation between rcu_assign_pointer() and returning, so no. Bugger :/ Compile tested only!! :-) How much did synchronize_srcu_expedited()

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Anthony Liguori
On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any agenda items you are interested in covering. QOM roadmap update: * Series 3/4 is on the list. - Please officially designate a merge date (Friday?). - To make review sensible, I ask

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Mitsyanko Igor
On 01/31/2012 05:15 PM, Andreas Färber wrote: Am 31.01.2012 00:53, schrieb Anthony Liguori: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any agenda items you are interested in covering. VMState: Anthony specifically said that

Kernel bug?

2012-01-31 Thread Bram De Wilde
Hi, We are setting up a ubuntu / openstack / KVM based private cloud. Of the 3 servers involved in this configuration 1 has been crashing frequently over the last month. Since it is the only server responsible for the virtualization (so the only one running kvm virtual machines) my guess was

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Avi Kivity
On 01/31/2012 03:59 PM, Anthony Liguori wrote: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any agenda items you are interested in covering. QOM roadmap update: * Series 3/4 is on the list. - Please officially designate a merge

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Anthony Liguori
On 01/31/2012 07:15 AM, Andreas Färber wrote: Am 31.01.2012 00:53, schrieb Anthony Liguori: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any agenda items you are interested in covering. VMState: Anthony specifically said that

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Anthony Liguori
On 01/31/2012 08:09 AM, Avi Kivity wrote: On 01/31/2012 03:59 PM, Anthony Liguori wrote: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any agenda items you are interested in covering. QOM roadmap update: * Series 3/4 is on the list.

Re: Kernel bug?

2012-01-31 Thread Avi Kivity
On 01/31/2012 04:06 PM, Bram De Wilde wrote: Hi, We are setting up a ubuntu / openstack / KVM based private cloud. Of the 3 servers involved in this configuration 1 has been crashing frequently over the last month. Since it is the only server responsible for the virtualization (so the only

Re: [Android-virt] [PATCH v5 00/13] KVM/ARM Implementation

2012-01-31 Thread Antonios Motakis
On 01/30/2012 11:46 PM, Peter Maydell wrote: On 20 January 2012 02:59, Christoffer Dall c.d...@virtualopensystems.com wrote: There's a new list of issues available at: https://github.com/virtualopensystems/linux-kvm-arm/issues Thanks for putting this up. Here's a couple more for you :-) *

[KVM-Autotest][PATCH 1/5] virt: Check illegal instruction code

2012-01-31 Thread Jiří Župka
Add a check on the base VM class for illegal instruction code executed by the VM. That check is performed on the serial console output. Signed-off-by: Jiří Župka jzu...@redhat.com --- client/virt/virt_vm.py | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-)

[KVM-Autotest][PATCH 2/5] virt: Add aliases to class Flag.

2012-01-31 Thread Jiří Župka
The patch solve problem with doubled name of cpuflags sse4_1, sse4.1 etc. in cpuflag test. Signed-off-by: Jiří Župka jzu...@redhat.com --- client/virt/virt_utils.py | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/virt/virt_utils.py

[KVM-Autotest][PATCH 3/5] kvm test: Introduce multi_host.srv

2012-01-31 Thread Jiří Župka
We had migration_control.srv which worked with old version of kvm config files (tests.cfg, subtest.cfg, etc..). Because config files were changed this control code stopped working. This patch repairs this problem and renames the file to the more correct and generic name multi-host.srv. Also,

[KVM-Autotest][PATCH 5/5] kvm test: Add multihost migration support to cpuflag test

2012-01-31 Thread Jiří Župka
Signed-off-by: Jiří Župka jzu...@redhat.com --- client/tests/kvm/tests/cpuflags.py | 284 +++- client/virt/subtests.cfg.sample| 17 ++- 2 files changed, 263 insertions(+), 38 deletions(-) diff --git a/client/tests/kvm/tests/cpuflags.py

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Avi Kivity
On 01/31/2012 04:17 PM, Anthony Liguori wrote: On 01/31/2012 08:09 AM, Avi Kivity wrote: On 01/31/2012 03:59 PM, Anthony Liguori wrote: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any agenda items you are interested in covering.

Re: KVM call agenda for tuesday 31

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 08:12:29AM -0600, Anthony Liguori wrote: On 01/31/2012 07:15 AM, Andreas Färber wrote: Am 31.01.2012 00:53, schrieb Anthony Liguori: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any agenda items you are

Re: KVM call agenda for tuesday 31

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 05:04:48PM +0200, Michael S. Tsirkin wrote: On Tue, Jan 31, 2012 at 08:12:29AM -0600, Anthony Liguori wrote: On 01/31/2012 07:15 AM, Andreas Färber wrote: Am 31.01.2012 00:53, schrieb Anthony Liguori: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Paolo Bonzini
On 01/31/2012 03:12 PM, Anthony Liguori wrote: Don't use VMState. Just open code a save/restore function. VMState is too limited in how it handles complex data structures. I really believe the only long term solution we're going to get to here is something that uses a builder interface (like

[PATCH 3/4 V11] Add ioctl for KVMCLOCK_GUEST_STOPPED

2012-01-31 Thread Eric B Munson
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 emun...@mgebm.net Cc: mi...@redhat.com Cc: h...@zytor.com Cc: ry...@linux.vnet.ibm.com Cc: aligu...@us.ibm.com Cc: mtosa...@redhat.com Cc:

[PATCH 1/4 V11] Add flag to indicate that a vm was stopped by the host

2012-01-31 Thread Eric B Munson
This flag will be used to check if the vm was stopped by the host when a soft lockup was detected. The host will set the flag when it stops the guest. On resume, the guest will check this flag if a soft lockup is detected and skip issuing the warning. Signed-off-by: Eric B Munson

[PATCH 4/4 V11] Add check for suspended vm in softlockup detector

2012-01-31 Thread Eric B Munson
A suspended VM can cause spurious soft lockup warnings. To avoid these, the watchdog now checks if the kernel knows it was stopped by the host and skips the warning if so. When the watchdog is reset successfully, clear the guest paused flag. Signed-off-by: Eric B Munson emun...@mgebm.net Cc:

[PATCH 2/4 V11] Add functions to check if the host has stopped the vm

2012-01-31 Thread Eric B Munson
When a host stops or suspends a VM it will set a flag to show this. The watchdog will use these functions to determine if a softlockup is real, or the result of a suspended VM. Signed-off-by: Eric B Munson emun...@mgebm.net asm-generic changes Acked-by: Arnd Bergmann a...@arndb.de Cc:

[PATCH 0/4 V11] Avoid soft lockup message when KVM is stopped by host

2012-01-31 Thread Eric B Munson
Changes from V10: Return ioctl to per vcpu instead of per vm Changes from V9: Use kvm_for_each_vcpu to iterate online vcpu's Changes from V8: Make KVM_GUEST_PAUSED a per vm ioctl instead of per vcpu Changes from V7: Define KVM_CAP_GUEST_PAUSED and support check Call mark_page_dirty () after

Re: [PATCH] reset edge sense circuit of i8259 on init

2012-01-31 Thread Gleb Natapov
On Tue, Jan 24, 2012 at 03:06:05PM +0200, Gleb Natapov wrote: The spec says that during initialization The edge sense circuit is reset which means that following initialization an interrupt request (IR) input must make a low-to-high transition to generate an interrupt, but currently if edge

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-01-31 Thread Andreas Färber
Am 31.01.2012 14:59, schrieb Anthony Liguori: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any agenda items you are interested in covering. QOM roadmap update: * Series 3/4 is on the list. - Please officially designate a merge

[Bug 42703] New: random hangs on virtualization host

2012-01-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42703 Summary: random hangs on virtualization host Product: Virtualization Version: unspecified Kernel Version: 3.0.0-16 Platform: All OS/Version: Linux Tree: Mainline

[Bug 42703] random hangs on virtualization host

2012-01-31 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42703 Avi Kivity a...@redhat.com changed: What|Removed |Added CC||a...@redhat.com

Re: performance trouble

2012-01-31 Thread David Cure
Le Mon, Jan 30, 2012 at 07:21:20PM +0200, Avi Kivity ecrivait : Start with top and vmstat to see if the cpu or I/O are the bottleneck with top at the kvm layer, the VM take 50% of CPU (the physical box have 16 real cores-not HT- : AMD Opteron 6134). one result of vmstat :

Re: performance trouble

2012-01-31 Thread Avi Kivity
What's up with the cc list? On 01/31/2012 07:15 PM, David Cure wrote: Le Mon, Jan 30, 2012 at 07:21:20PM +0200, Avi Kivity ecrivait : Start with top and vmstat to see if the cpu or I/O are the bottleneck with top at the kvm layer, the VM take 50% of CPU (the physical box have 16

[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 jan.kis...@siemens.com --- hw/i8254.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git

[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

[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 jan.kis...@siemens.com --- arch_init.c|1 + hw/i82378.c|3 +- hw/mips_jazz.c |3 +- hw/pc.c|3 +- hw/pc.h|

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

2012-01-31 Thread Jan Kiszka
HPET legacy emulation will require control over the PIT IRQ output. To enable this, add support for an alternative IRQ output object to the PIT factory function. If the isa_irq number is 0, this object will be used. This also removes the IRQ number property from the PIT class as we now use a

[PATCH v3 7/7] i8254: Factor out pit_get_channel_info

2012-01-31 Thread Jan Kiszka
Instead of providing 4 individual query functions for mode, gate, output and initial counter state, introduce a service that queries all information at once. This comes with tiny additional costs for pcspk_callback but with a much cleaner interface. Also, it will simplify the implementation of the

[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

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

2012-01-31 Thread Jan Kiszka
When the HPET enters legacy mode, the IRQ output of the PIT is suppressed and replaced by the HPET timer 0. But the current code to emulate this was broken in many ways. It reset the PIT state after re-enabling, it worked against a stale static PIT structure, and it did not properly saved/restored

[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 jan.kis...@siemens.com --- hw/alpha_dp264.c |1 + hw/hpet.c |1 + hw/i82378.c|1 + hw/i8254.c |1 + hw/i8254.h | 54

[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

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

2012-01-31 Thread 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 set of the host kernel

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

2012-01-31 Thread 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 and certain init

[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 jan.kis...@siemens.com --- 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 ---

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

2012-01-31 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. The

[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 jan.kis...@siemens.com

Re: [PATCH 6/9] pci-assign: Proper initialization for MSI-X table

2012-01-31 Thread Alex Williamson
On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:22:09AM -0700, Alex Williamson wrote: Per the PCI spec, all vectors should be masked at handoff. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 20

Re: [PATCH 6/9] pci-assign: Proper initialization for MSI-X table

2012-01-31 Thread Michael S. Tsirkin
On Sat, Jan 28, 2012 at 07:22:09AM -0700, Alex Williamson wrote: Per the PCI spec, all vectors should be masked at handoff. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 20 +++- 1 files changed, 19 insertions(+), 1 deletions(-)

Re: [PATCH 4/9] pci-assign: Use struct for MSI-X table

2012-01-31 Thread Michael S. Tsirkin
On Sat, Jan 28, 2012 at 07:21:58AM -0700, Alex Williamson wrote: This makes access much easier. Signed-off-by: Alex Williamson alex.william...@redhat.com Yes but this also makes it easier to forget to handle endian-ness. How about using pci_get/pci_set instead? ---

Re: [PATCH v2] KVM: Fix assigned device MSI-X entry setting leak

2012-01-31 Thread Michael S. Tsirkin
On Mon, Jan 30, 2012 at 02:05:54PM -0700, Alex Williamson wrote: We need to prioritize our matching when setting MSI-X vector entries. Unused entries should only be used if we don't find an exact match or else we risk duplicating entries. This was causing an ENOSPC return when trying to mask

Re: [PATCH 6/9] pci-assign: Proper initialization for MSI-X table

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 12:07:39PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:22:09AM -0700, Alex Williamson wrote: Per the PCI spec, all vectors should be masked at handoff. Signed-off-by: Alex Williamson

Re: [PATCH 6/9] pci-assign: Proper initialization for MSI-X table

2012-01-31 Thread Jan Kiszka
On 2012-01-31 20:12, Michael S. Tsirkin wrote: On Tue, Jan 31, 2012 at 12:07:39PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:22:09AM -0700, Alex Williamson wrote: Per the PCI spec, all vectors should be masked at

Re: [PATCH 4/9] pci-assign: Use struct for MSI-X table

2012-01-31 Thread Alex Williamson
On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:21:58AM -0700, Alex Williamson wrote: This makes access much easier. Signed-off-by: Alex Williamson alex.william...@redhat.com Yes but this also makes it easier to forget to handle endian-ness. How

Re: [PATCH 4/9] pci-assign: Use struct for MSI-X table

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 12:05:49PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:21:58AM -0700, Alex Williamson wrote: This makes access much easier. Signed-off-by: Alex Williamson alex.william...@redhat.com

Re: Increase KVMSlots size

2012-01-31 Thread Marcelo Tosatti
On Tue, Jan 31, 2012 at 11:47:32AM +, Bhushan Bharat-R65777 wrote: Hi All, In my development I came across the state where I need more than 32 kvmslots QEMU/kvm-all.c: cut struct KVMState { KVMSlot slots[32]; cut Followings are the solution I thought of:

Re: [PATCH 5/9] pci-assign: Only calculate maximum MSI-X vector entries once

2012-01-31 Thread Michael S. Tsirkin
On Sat, Jan 28, 2012 at 07:22:04AM -0700, Alex Williamson wrote: Signed-off-by: Alex Williamson alex.william...@redhat.com --- Why? Optimization? hw/device-assignment.c | 17 +++-- hw/device-assignment.h |1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff

Re: [PATCH 6/9] pci-assign: Proper initialization for MSI-X table

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 08:16:31PM +0100, Jan Kiszka wrote: On 2012-01-31 20:12, Michael S. Tsirkin wrote: On Tue, Jan 31, 2012 at 12:07:39PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:22:09AM -0700, Alex Williamson

Re: [PATCH 5/9] pci-assign: Only calculate maximum MSI-X vector entries once

2012-01-31 Thread Alex Williamson
On Tue, 2012-01-31 at 22:18 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:22:04AM -0700, Alex Williamson wrote: Signed-off-by: Alex Williamson alex.william...@redhat.com --- Why? Optimization? Because in 6/9 we'd have to calculate it again for resetting the msix table and in

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

2012-01-31 Thread Anthony Liguori
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 Kiszkajan.kis...@siemens.com Heh, I did this too more or less the same way. Some comments below: ---

Re: [PATCH 5/9] pci-assign: Only calculate maximum MSI-X vector entries once

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 01:31:59PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 22:18 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:22:04AM -0700, Alex Williamson wrote: Signed-off-by: Alex Williamson alex.william...@redhat.com --- Why? Optimization? Because

Re: [PATCH 6/9] pci-assign: Proper initialization for MSI-X table

2012-01-31 Thread Alex Williamson
On Tue, 2012-01-31 at 22:19 +0200, Michael S. Tsirkin wrote: On Tue, Jan 31, 2012 at 08:16:31PM +0100, Jan Kiszka wrote: On 2012-01-31 20:12, Michael S. Tsirkin wrote: On Tue, Jan 31, 2012 at 12:07:39PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin

Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-31 Thread Alex Williamson
On Tue, 2012-01-31 at 15:33 +0200, Avi Kivity wrote: On 01/31/2012 03:21 PM, Jan Kiszka wrote: On 2012-01-31 14:10, Avi Kivity wrote: On 01/31/2012 02:57 PM, Jan Kiszka wrote: Seems fine, but do we really need the option? If it doesn't work we should treat it as an ordinary but and

Re: [PATCH 3/9] pci-assign: Update MSI-X MMIO to Memory API

2012-01-31 Thread Alex Williamson
On Tue, 2012-01-31 at 14:45 +0200, Avi Kivity wrote: On 01/28/2012 04:21 PM, Alex Williamson wrote: Stop using compatibility mode and at the same time fix available access sizes. The PCI spec indicates that the MSI-X table may only be accessed as DWORD or QWORD. static const

Re: [PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 02:08:38PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 15:33 +0200, Avi Kivity wrote: On 01/31/2012 03:21 PM, Jan Kiszka wrote: On 2012-01-31 14:10, Avi Kivity wrote: On 01/31/2012 02:57 PM, Jan Kiszka wrote: Seems fine, but do we really need the

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

2012-01-31 Thread Anthony Liguori
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 value has to be preserved across save/ restore as it cannot be reconstructed

Re: [PATCH 4/9] pci-assign: Use struct for MSI-X table

2012-01-31 Thread Alex Williamson
On Tue, 2012-01-31 at 22:00 +0200, Michael S. Tsirkin wrote: On Tue, Jan 31, 2012 at 12:05:49PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:21:58AM -0700, Alex Williamson wrote: This makes access much easier.

Re: [PATCH 4/9] pci-assign: Use struct for MSI-X table

2012-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2012 at 02:17:30PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 22:00 +0200, Michael S. Tsirkin wrote: On Tue, Jan 31, 2012 at 12:05:49PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 19:40 +0200, Michael S. Tsirkin wrote: On Sat, Jan 28, 2012 at 07:21:58AM

Re: [PATCH 4/9] pci-assign: Use struct for MSI-X table

2012-01-31 Thread Alex Williamson
On Tue, 2012-01-31 at 23:24 +0200, Michael S. Tsirkin wrote: On Tue, Jan 31, 2012 at 02:17:30PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 22:00 +0200, Michael S. Tsirkin wrote: On Tue, Jan 31, 2012 at 12:05:49PM -0700, Alex Williamson wrote: On Tue, 2012-01-31 at 19:40 +0200,

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

2012-01-31 Thread Anthony Liguori
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 version. We share most of the public interface of the i8254, specifically to

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 version. We share most of the

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

2012-01-31 Thread Anthony Liguori
On 01/31/2012 03:49 PM, Jan Kiszka wrote: 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

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 Kiszkajan.kis...@siemens.com Heh, I did this too more or less the

Re: [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 value has to be preserved across

  1   2   >