Re: KVM guest 100% cpu lock up

2013-04-01 Thread Phil Daws
Froze again :( would it be worth upgrading to a new kernel on the host instead of using the stock once from CentOS 6.4 ? I am not overcommitting memory of the machine so believe that is ruled out. I installed watchdog on the guest as-well to reboot it this happened again but that did not work :(

[PATCH v2 1/6] KVM: MMU: retain more available bits on mmio spte

2013-04-01 Thread Xiao Guangrong
Let mmio spte only use bit62 and bit63 on upper 32 bits, then bit 52 ~ bit 61 can be used for other purposes Signed-off-by: Xiao Guangrong --- arch/x86/kvm/vmx.c |4 ++-- arch/x86/kvm/x86.c |8 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/a

[PATCH v2 2/6] KVM: MMU: store generation-number into mmio spte

2013-04-01 Thread Xiao Guangrong
Store the generation-number into bit3 ~ bit11 and bit52 ~ bit61, totally 19 bits can be used, it should be enough for nearly all most common cases In this patch, the generation-number is always 0, it will be changed in the later patch Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c

[PATCH v2 6/6] KVM: MMU: init kvm generation close to mmio wrap-around value

2013-04-01 Thread Xiao Guangrong
Then it has chance to trigger mmio generation number wrap-around Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/mmu.c |8 virt/kvm/kvm_main.c |6 ++ 3 files changed, 15 insertions(+), 0 deletions(-) diff --g

[PATCH v2 5/6] KVM: MMU: add tracepoint for check_mmio_spte

2013-04-01 Thread Xiao Guangrong
It is useful for debug mmio spte invalidation Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |9 +++-- arch/x86/kvm/mmutrace.h | 24 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 1020152

[PATCH v2 0/6] KVM: MMU: fast invalid all mmio sptes

2013-04-01 Thread Xiao Guangrong
Changelog in v2: - rename kvm_mmu_invalid_mmio_spte to kvm_mmu_invalid_mmio_sptes - use kvm->memslots->generation as kvm global generation-number - fix comment and codestyle - init kvm generation close to mmio wrap-around value - keep kvm_mmu_zap_mmio_sptes The current way is holding hot

[PATCH v2 3/6] KVM: MMU: make return value of mmio page fault handler more readable

2013-04-01 Thread Xiao Guangrong
Define some meaningful names instead of raw code Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 15 +-- arch/x86/kvm/mmu.h | 14 ++ arch/x86/kvm/vmx.c |4 ++-- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/k

[PATCH v2 4/6] KVM: MMU: fast invalid all mmio sptes

2013-04-01 Thread Xiao Guangrong
This patch tries to introduce a very simple and scale way to invalid all mmio sptes - it need not walk any shadow pages and hold mmu-lock KVM maintains a global mmio invalid generation-number which is stored in kvm->memslots.generation and every mmio spte stores the current global generation-numbe

KVM call agenda for 2013-04-02

2013-04-01 Thread Juan Quintela
Hi Please send in any agenda topics you are interested in. Later, Juan. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [virt-test][PATCH 5/7] virt: Update Cartesian config unittest named variants

2013-04-01 Thread Eduardo Habkost
I will start by reviewing the test code, so we can agree on expected syntax/behavior, before reviewing the implementation: On Fri, Mar 29, 2013 at 06:14:08PM +0100, Jiří Župka wrote: > Signed-off-by: Jiří Župka > --- > virttest/cartesian_config_unittest.py | 79 > +++

Re: [virt-test][PATCH 4/7] virt: Adds named variants to Cartesian config.

2013-04-01 Thread Eduardo Habkost
Sorry for not reading the commit message before my previous reply. Now I see the origin of the ">" syntax. On Fri, Mar 29, 2013 at 06:14:07PM +0100, Jiří Župka wrote: [...] > > For filtering of named variants is used character ">" because there was > problem with conflict with = in expression key

Re: [virt-test][PATCH 6/7] virt: Adds possibility filter defaults variant from variants

2013-04-01 Thread Eduardo Habkost
On Fri, Mar 29, 2013 at 06:14:09PM +0100, Jiří Župka wrote: > If default variant is not filtered by only or no filters then > only default variant is chosen. This behavior was used for optimizing > of speed of Cartesian config. > If variants don't have default variant then everything works as usual

Re: Best way to busy-wait for a virtio queue?

2013-04-01 Thread Eric Northup
On Fri, Mar 29, 2013 at 4:12 PM, H. Peter Anvin wrote: > > Is there any preferred way to busy-wait on a virtio event? As in: the > guest doesn't have anything useful to do until something is plopped down > on the virtio queue, but would like to proceed as quickly as possible > after that. Passin

[PATCH 1/9] linux-headers: Update to v3.9-rc2

2013-04-01 Thread Alex Williamson
Unedited scripts/update-linux-headers.sh run against v3.9-rc2 tag Signed-off-by: Alex Williamson --- linux-headers/linux/vfio.h |9 + 1 file changed, 9 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index f787b72..e094121 100644 --- a/linux-header

[PATCH 2/9] vfio-pci: Generalize PCI config mangling

2013-04-01 Thread Alex Williamson
Kernel-side vfio virtualizes all of config space, but some parts are unique to Qemu. For instance we may or may not expose the ROM BAR, Qemu manages MSI/MSIX, and Qemu manages the multi-function bit so that single function devices can appear as multi-function and vica versa. Generalize this into a

[PATCH 3/9] vfio-pci: Add PCIe capability mangling based on bus type

2013-04-01 Thread Alex Williamson
Windows seems to pay particular interest to the PCIe header type of devices and will fail to load drivers if we attach Endpoint devices or Legacy Endpoint devices to the Root Complex. We can use pci_bus_is_express and pci_bus_is_root to determine the bus type and mangle the type appropriately: *

[PATCH 5/9] qemu vfio-pci: Graphics device quirks

2013-04-01 Thread Alex Williamson
Graphics cards have a number of different backdoors. Some of these are alternative ways to get PCI BAR addresses, some of them are complete mirrors of PCI config space available through MMIO and I/O port access. These quirks cover a number of ATI Radeon and Nvidia devices. On the ATI/AMD side, t

[PATCH 6/9] vfio-pci: Add extra debugging

2013-04-01 Thread Alex Williamson
Often when debugging it's useful to be able to disable bypass paths so no interactions with the device are missed. Add some extra debug options to do this. Also add device info on read/write BAR accesses, which is useful when debugging more than one assigned device. A couple DPRINTFs also had re

[PATCH 7/9] vfio-pci: Move devices to D0 on reset

2013-04-01 Thread Alex Williamson
Guests may leave devices in a low power state at reboot, but we expect devices to be woken up for the next boot. Make this happen. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index

[GIT PULL 0/9] vfio-pci updates & VGA support

2013-04-01 Thread Alex Williamson
Hi Anthony, The following changes since commit 174d4d215fb49b4d43196e62f22c2533431b260e: tcg/mips: Implement muls2_i32 (2013-04-01 18:49:17 +0200) are available in the git repository at: git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-20130401.0 for you to fetch changes up t

[PATCH 8/9] vfio: Add bootindex support

2013-04-01 Thread Alex Williamson
Signed-off-by: Alex Williamson --- hw/vfio_pci.c |5 + 1 file changed, 5 insertions(+) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index d310730..0d2a445 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -30,6 +30,7 @@ #include "qemu/event_notifier.h" #include "exec/address-spaces.h" #

[PATCH 9/9] vfio: cleanup includes

2013-04-01 Thread Alex Williamson
Starting to get messy, put the back in alphabetical order. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 0d2a445..693a9ff 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -19,

[PATCH 4/9] qemu vfio-pci: Add support for VGA MMIO and I/O port access

2013-04-01 Thread Alex Williamson
Most VGA cards need some kind of quirk to fully operate since they hide backdoors to get to other registers outside of PCI config space within the registers, but this provides the base infrastructure. If we could identity map PCI resources for assigned devices we would need a lot fewer quirks. To

[RFC PATCH v2 0/6] device control and in-kernel MPIC

2013-04-01 Thread Scott Wood
v2 addresses some requested changes, such as the use of a file descriptor instead of an ad-hoc handle array, and the use of an enableable IRQ-type-specific capability to bind the vcpu to a particular MPIC device (among other things, this allows the notifier patch to go away). Some other requested

[RFC PATCH v2 3/6] kvm/ppc/mpic: remove some obviously unneeded code

2013-04-01 Thread Scott Wood
Remove some parts of the code that are obviously QEMU or Raven specific before fixing style issues, to reduce the style issues that need to be fixed. Signed-off-by: Scott Wood --- arch/powerpc/kvm/mpic.c | 344 --- 1 file changed, 344 deletions(-) di

[RFC PATCH v2 5/6] kvm/ppc/mpic: in-kernel MPIC emulation

2013-04-01 Thread Scott Wood
Hook the MPIC code up to the KVM interfaces, add locking, etc. TODO: irqfd support, split up into multiple patches, KVM_IRQ_LINE support Signed-off-by: Scott Wood --- Documentation/virtual/kvm/devices/mpic.txt | 37 ++ arch/powerpc/include/asm/kvm_host.h|8 +- arch/powerpc/include

[RFC PATCH v2 2/6] kvm/ppc/mpic: import hw/openpic.c from QEMU

2013-04-01 Thread Scott Wood
This is QEMU's hw/openpic.c from commit abd8d4a4d6dfea7ddea72f095f993e1de941614e ("Update version for 1.4.0-rc0"), run through Lindent with no other changes to ease merging future changes between Linux and QEMU. Remaining style issues (including those introduced by Lindent) will be fixed in a late

[RFC PATCH v2 4/6] kvm/ppc/mpic: adapt to kernel style and environment

2013-04-01 Thread Scott Wood
Remove braces that Linux style doesn't permit, remove space after '*' that Lindent added, keep error/debug strings contiguous, etc. Substitute type names, debug prints, etc. Signed-off-by: Scott Wood --- arch/powerpc/kvm/mpic.c | 445 ++- 1 file chan

[RFC PATCH v2 6/6] kvm/ppc/mpic: add KVM_CAP_IRQ_MPIC

2013-04-01 Thread Scott Wood
Enabling this capability connects the vcpu to the designated in-kernel MPIC. Using explicit connections between vcpus and irqchips allows for flexibility, but the main benefit at the moment is that it simplifies the code -- KVM doesn't need vm-global state to remember which MPIC object is associat

[RFC PATCH v2 1/6] kvm: add device control API

2013-04-01 Thread Scott Wood
Currently, devices that are emulated inside KVM are configured in a hardcoded manner based on an assumption that any given architecture only has one way to do it. If there's any need to access device state, it is done through inflexible one-purpose-only IOCTLs (e.g. KVM_GET/SET_LAPIC). Defining n

Re: [PATCH V2 2/2] tcm_vhost: Use vq->private_data to indicate if the endpoint is setup

2013-04-01 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Rusty's currently doing some reorgs of -net let's delay > cleanups there to avoid stepping on each other's toys. > Let's focus on scsi here. > E.g. any chance framing assumptions can be fixed in 3.10? I am waiting for your removal of the dma-compelete ordering stuff

Re: [PATCH 2/3] virtio-pci: Add virtio_queue_valid checks ahead of virtio_queue_get_num

2013-04-01 Thread Nicholas A. Bellinger
On Sun, 2013-03-31 at 10:37 +0300, Michael S. Tsirkin wrote: > On Fri, Mar 29, 2013 at 04:33:11AM +, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch adds a number of virtio_queue_valid() checks to virtio-pci > > ahead of virtio_queue_get_num() usage in order to sk

Re: [PATCH 3/3] vhost: Check+skip uninitialized VQs in vhost_verify_ring_mappings

2013-04-01 Thread Nicholas A. Bellinger
On Sun, 2013-03-31 at 10:45 +0300, Michael S. Tsirkin wrote: > On Fri, Mar 29, 2013 at 04:33:12AM +, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > With the virtio_queue_valid() checks in place to skip uninitialized VQs > > within virtio-pci code, go ahead and skip the same

Re: [PATCH 0/3] virtio/vhost: Add checks for uninitialized VQs

2013-04-01 Thread Nicholas A. Bellinger
On Sun, 2013-03-31 at 10:46 +0300, Michael S. Tsirkin wrote: > On Fri, Mar 29, 2013 at 04:33:09AM +, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > Hi folks, > > > > This series adds a virtio_queue_valid() for use by virtio-pci code in > > order to prevent opreations upon

[PATCH-v2 0/3] virtio/vhost: Add checks for uninitialized VQs

2013-04-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi folks, This series adds a virtio_queue_valid() for use by virtio-pci code in order to prevent opreations upon uninitialized VQs, which is currently expected to occur during seabios setup of virtio-scsi with in-flight vhost-scsi-pci device code. On the vhost side, it

[PATCH-v2 1/3] virtio: add API to check that ring is setup

2013-04-01 Thread Nicholas A. Bellinger
From: Michael S. Tsirkin virtio scsi makes it legal to only setup a subset of rings. The only way to detect the ring is setup seems to be to check whether PA was written to. Add API to do this, and teach code to use it instead of checking hardware queue size. (nab: use .vring.desc instead of .

[PATCH-v2 2/3] virtio-pci: Add virtio_queue_valid checks ahead of virtio_queue_get_num

2013-04-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a number of virtio_queue_valid() checks to virtio-pci ahead of virtio_queue_get_num() usage in order to skip operation upon the detection of an uninitialized VQ. There is one exception in virtio_ioport_read():VIRTIO_PCI_QUEUE_NUM, where virtio_queue_get_n

[PATCH-v2 3/3] vhost: Skip uninitialized VQs in vhost_virtqueue_[start,stop]

2013-04-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds virtio_queue_valid() checks in vhost_virtqueue_start() and vhost_virtqueue_stop() to avoid uninitialized VQs during vhost-scsi-pci seabios operation, where we currently expect only the request VQ to have been initialized before virtio-scsi LLD guest hand-o

Re: [PATCH V3 WIP 3/3] disable vhost_verify_ring_mappings check

2013-04-01 Thread Nicholas A. Bellinger
On Fri, 2013-03-29 at 09:14 +0100, Paolo Bonzini wrote: > Il 29/03/2013 03:53, Nicholas A. Bellinger ha scritto: > > On Thu, 2013-03-28 at 06:13 -0400, Paolo Bonzini wrote: > >>> I think it's the right thing to do, but maybe not the right place > >>> to do this, need to reset after all IO is done,

Re: Virtualbox svga card in KVM

2013-04-01 Thread Sriram Murthy
Hi,     I am looking into hw/vga.c and hw/vga-pci.c as a starting point in my effort to get vbox svga card into kvm.     However, given my very basic understanding of VGA/SVGA standards, can somebody throw some light on the inner workings of the std vga card in kvm?     Also, are there any good

Re: [Qemu-devel] [PATCH 0/5] vhost-scsi: Add support for host virtualized target

2013-04-01 Thread Wenchao Xia
Hi, Nicholas Have this serial been merged to qemu 1.4? If not, I am rebasing it to upstream, hope no one else is working on that. > From: Nicholas Bellinger > > Hello Anthony & Co, > > This is the fourth installment to add host virtualized target support for > the mainline tcm_vhost fabric dr

Re: [Qemu-devel] [PATCH 0/5] vhost-scsi: Add support for host virtualized target

2013-04-01 Thread Nicholas A. Bellinger
Hello Wenchao, On Tue, 2013-04-02 at 11:28 +0800, Wenchao Xia wrote: > Hi, Nicholas > Have this serial been merged to qemu 1.4? Not just yet. Asias, MST, Paolo and myself have been working recently on the series for qemu 1.4. > If not, I am rebasing it to > upstream, hope no one else is work