Re: kvm: emulation failure

2009-06-21 Thread Ram Pai
On Mon, 2009-06-22 at 13:12 +0800, Sheng Yang wrote: > On Saturday 20 June 2009 03:23:40 Ram Pai wrote: > > I see this problem with a x86 sles10 guest running on x86_64 intel host. > > If the guest is reset abruptly and rebooted, some where > > before grub sequence it hangs and the following messag

Re: [KVM_AUTOTEST] unattended installs take 2

2009-06-21 Thread Michael Goldish
- "Lucas Meneghel Rodrigues" wrote: > On Thu, 2009-06-18 at 17:50 -0400, David Huff wrote: > > Second pass at the unattended install test. Both Linux and Windows > guests are > > working however currently it just uses the existing boot test and > extends > > timeouts. We still need a good

Re: [PATCH] kvm: device-assignment: Add PCI option ROM support

2009-06-21 Thread Yang, Sheng
On Friday 19 June 2009 21:44:40 Alex Williamson wrote: > On Fri, 2009-06-19 at 15:27 +0800, Yang, Sheng wrote: > > On Friday 19 June 2009 00:28:41 Alex Williamson wrote: > > > The one oddity I noticed is that even when the enable bit is clear, the > > > guest can read the ROM. I don't know that th

Re: kvm: emulation failure

2009-06-21 Thread Sheng Yang
On Saturday 20 June 2009 03:23:40 Ram Pai wrote: > I see this problem with a x86 sles10 guest running on x86_64 intel host. > If the guest is reset abruptly and rebooted, some where > before grub sequence it hangs and the following message is seen in the > logs > > emulation failed (pagetable) rip

Re: [KVM_AUTOTEST] unattended installs take 2

2009-06-21 Thread Lucas Meneghel Rodrigues
On Thu, 2009-06-18 at 17:50 -0400, David Huff wrote: > Second pass at the unattended install test. Both Linux and Windows guests are > working however currently it just uses the existing boot test and extends > timeouts. We still need a good way of determining if an unattended install > completed

Re: [Qemu-devel] [PATCHv6 00/12] qemu: MSI-X support

2009-06-21 Thread Isaku Yamahata
On Sun, Jun 21, 2009 at 07:44:57PM +0300, Michael S. Tsirkin wrote: > This uses the mask table patch that I posted previously, and which is > included in the series. That patch has been slightly updated due > to mask -> wmask rename. Isaku Yamahata, maybe you want to > update your patch series with

Re: How to debug a triple fault at startup?

2009-06-21 Thread Michael Crawford
I'm not completely certain, but I think I get a GPF whenever trying to output text to the screen once interrupts have been enabled. That is, before calling int 0x19, I can use printf from within rombios.c, and my messages appear. But from anywhere within the int19 code, they don't. I definitely

Re: [PATCH 3/3] eventfd: add internal reference counting to fix notifier race conditions

2009-06-21 Thread Davide Libenzi
On Sun, 21 Jun 2009, Gregory Haskins wrote: > This looks great, Davide. I am fairly certain I can now solve the races > and even implement Michael's DEASSIGN feature with this patch in place. > I will actually fire it up tomorrow when I am back in the office and > give it a spin, but I do not sp

KVM-84 restoring from saved snapshot looses keyboard/mouse

2009-06-21 Thread jd
Hi I am saving a snapshot using migrate "exec: gzip -c > /tmp/cent_105.snapshot.xm" and restoring it using the following option on the command line -incoming "exec: gzip -c -d /tmp/cent_105.snapshot.xm" Now the snapshot seems to be restored.. as I can get to the display of the

Re: How to debug a triple fault at startup?

2009-06-21 Thread Michael Crawford
On Sun, Jun 21, 2009 at 9:02 AM, Michael Crawford wrote: > I get as far as the "Press F12 for a boot menu", and then the guest > reboots.  I have gotten as far as figuring out that there is a triple > fault in my guest's code, but I don't know why. > > Can anyone give me a clue as to how to debug i

Re: Checking guest memory pages changes from host userspace

2009-06-21 Thread Avi Kivity
On 06/21/2009 09:46 PM, Alexander Graf wrote: You can use the dirty memory logging API. vga uses this to track which regions of the screen have changed, and live migration uses it to allow the guest to proceed while copying its memory to the other node. It works exactly by write protecting gu

KVM-84 unknown migration protocol

2009-06-21 Thread jd
Hi I am on Ubuntu 9.04 with kvm-84. When I try to do migrate with file option it gives unknown migration protocol. Is this broken. I did find some conversation about it not being in upstream..etc. But could not find a resolution. Can someone please confirm that this is not expected to

Re: Checking guest memory pages changes from host userspace

2009-06-21 Thread Alexander Graf
On 21.06.2009, at 17:51, Avi Kivity wrote: On 06/19/2009 09:09 PM, Passera, Pablo R wrote: Hi list, I need to monitor some guest memory pages. I need to know if the information in these pages was changed. For this, I was thinking to mark the guest memory pages in some way (like

Re: [PATCH 3/3] eventfd: add internal reference counting to fix notifier race conditions

2009-06-21 Thread Gregory Haskins
Davide Libenzi wrote: > On Sat, 20 Jun 2009, Gregory Haskins wrote: > > >> Davide Libenzi wrote: >> >>> On Sat, 20 Jun 2009, Davide Libenzi wrote: >>> >>> >>> On Sat, 20 Jun 2009, Davide Libenzi wrote: > How about the one below? > >

[PATCHv2 RFC] qemu/msix: remove msix_supported safety flag

2009-06-21 Thread Michael S. Tsirkin
Don't add an option for platforms to disable MSI-X in all devices. Paul Brook will find and fix all platforms that have broken MSI-X emulation. Signed-off-by: Michael S. Tsirkin --- This patch on top of my msix series v6 is a bit tongue in cheek: it shows what can be done and Paul seems to think

Re: [PATCH 3/3] eventfd: add internal reference counting to fix notifier race conditions

2009-06-21 Thread Davide Libenzi
On Sat, 20 Jun 2009, Gregory Haskins wrote: > Davide Libenzi wrote: > > On Sat, 20 Jun 2009, Davide Libenzi wrote: > > > > > >> On Sat, 20 Jun 2009, Davide Libenzi wrote: > >> > >> > >>> How about the one below? > >>> > >> Maybe with an interface that can be undone w/out a file* :)

[PATCHv6 12/12] qemu/net: flag to control the number of vectors a nic has

2009-06-21 Thread Michael S. Tsirkin
Add an option to specify the number of MSI-X vectors for PCI NIC cards. This can also be used to disable MSI-X, for compatibility with old qemu. This option currently only affects virtio cards. Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c |5 - net.c | 18 +++

[PATCHv6 11/12] qemu/net: request 3 vectors in virtio-net

2009-06-21 Thread Michael S. Tsirkin
Request up to 3 vectors in virtio-net. Actual bindings might supply less. Signed-off-by: Michael S. Tsirkin --- hw/virtio-net.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index d584287..c8dabbe 100644 --- a/hw/virtio-net.c +++ b/hw/

[PATCHv6 10/12] qemu/pci: add pci_get/set_byte

2009-06-21 Thread Michael S. Tsirkin
Add pci_get/set_byte to keep *_word and *_long access functions company. They are unused for now. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 03b0a70..52b66b3 100644 --- a/hw/pci.h +

[PATCHv6 09/12] qemu/virtio: virtio save/load bindings

2009-06-21 Thread Michael S. Tsirkin
Implement bindings for virtio save/load. Use them in virtio pci. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 46 +- hw/virtio.c | 33 - hw/virtio.h |4 3 files changed, 65 insertions(+),

[PATCHv6 08/12] qemu/virtio: MSI-X support in virtio PCI

2009-06-21 Thread Michael S. Tsirkin
This enables actual support for MSI-X in virtio PCI. First user will be virtio-net. Signed-off-by: Michael S. Tsirkin --- hw/virtio-pci.c | 152 -- rules.mak |2 +- 2 files changed, 113 insertions(+), 41 deletions(-) diff --git a/hw

[PATCHv6 06/12] qemu/apic: minimal MSI/MSI-X implementation for PC

2009-06-21 Thread Michael S. Tsirkin
Implement MSI support in APIC. Note that MSI and MMIO APIC registers are at the same memory location, but actually not on the global bus: MSI is on PCI bus, APIC is connected directly to the CPU. We map them on the global bus at the same address which happens to work because MSI registers are reser

[PATCHv6 07/12] qemu/virtio: virtio support for many interrupt vectors

2009-06-21 Thread Michael S. Tsirkin
Extend virtio to support many interrupt vectors, and rearrange code in preparation for multi-vector support (mostly move reset out to bindings, because we will have to reset the vectors in transport-specific code). Actual bindings in pci, and use in net, to follow. Load and save are not connected t

[PATCHv6 05/12] qemu/pci: MSI-X support functions

2009-06-21 Thread Michael S. Tsirkin
Add functions implementing MSI-X support. First user will be virtio-pci. Note that platform must set a flag to declare MSI supported: this is a safety measure to avoid breaking platforms which should support MSI-X but currently lack this in the interrupt controller emulation. For PC this will be se

[PATCHv6 04/12] qemu/pci: check constant registers on load

2009-06-21 Thread Michael S. Tsirkin
Add "cmask" table of constant register masks: if a bit is not writeable and is set in cmask table, this bit is checked on load. An attempt to load an image that would change such a register causes load to fail. Use this table to make sure that load does not modify registers that guest can not chan

[PATCHv6 03/12] qemu/pci: add routines to manage PCI capabilities

2009-06-21 Thread Michael S. Tsirkin
Add routines to manage PCI capability list. First user will be MSI-X. Signed-off-by: Michael S. Tsirkin --- hw/pci.c | 74 +- hw/pci.h | 18 ++- 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/hw/pci.c b/

[PATCHv6 02/12] qemu/pci: helper routines for pci access

2009-06-21 Thread Michael S. Tsirkin
Add inline routines for convenient access to pci devices with correct (little) endianness. Will be used by MSI-X support. Signed-off-by: Michael S. Tsirkin --- hw/pci.h | 30 +++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/hw/pci.h b/hw/pci.h inde

[PATCHv6 01/12] qemu/pci: make default_write_config use mask table

2009-06-21 Thread Michael S. Tsirkin
Change much of hw/pci to use symbolic constants and a table-driven design: add a mask table with writable bits set and readonly bits unset. Detect change by comparing original and new registers. This makes it easy to support capabilities where read-only/writeable bit layout differs between devices

[PATCHv6 00/12] qemu: MSI-X support

2009-06-21 Thread Michael S. Tsirkin
Here is the port of MSI-X support patches to upstream qemu. Please comment or commit. This patchset adds generic support for MSI-X, adds implementation in APIC, and uses MSI-X in virtio-net. Changelog: - since v5 make sure that load does not modify registers that guest can not change replace

How to debug a triple fault at startup?

2009-06-21 Thread Michael Crawford
Greetings, I just subscribed. I get as far as the "Press F12 for a boot menu", and then the guest reboots. I have gotten as far as figuring out that there is a triple fault in my guest's code, but I don't know why. Can anyone give me a clue as to how to debug it? I am able to attach gdb to the

Re: Checking guest memory pages changes from host userspace

2009-06-21 Thread Avi Kivity
On 06/19/2009 09:09 PM, Passera, Pablo R wrote: Hi list, I need to monitor some guest memory pages. I need to know if the information in these pages was changed. For this, I was thinking to mark the guest memory pages in some way (like write protecting them) so a page fault is generat

Re: [KVM PATCH v7 2/2] KVM: add iosignalfd support

2009-06-21 Thread Avi Kivity
On 06/18/2009 05:09 PM, Gregory Haskins wrote: Avi Kivity wrote: On 06/18/2009 03:09 PM, Gregory Haskins wrote: +config KVM_MAX_IOSIGNALFD_ITEMS +int "Maximum IOSIGNALFD items per address" +depends on KVM +default "32" +---help--- + This option influences the maxi

Re: [patch] move _PR to SSDT v2

2009-06-21 Thread Avi Kivity
On 06/18/2009 03:39 PM, Jes Sorensen wrote: On 06/16/2009 11:50 AM, Gleb Natapov wrote: Works for me with windows XP/7, but can you add a comment in DSDT where _GRE.L02 should be why it is missing and where to find it. Avi, Are you happy with the last version of the SSDT patch? I have more pi

Re: [KVM PATCH 0/4] irqfd fixes/enhancements

2009-06-21 Thread Avi Kivity
On 06/18/2009 08:44 PM, Gregory Haskins wrote: (Applies to kvm.git/master:c27b64a0) The following series represents my queue of fixes for issues in irqfd, which include enhancements to eventfd. This is a respin of the patches originally proposed yesterday, called "[KVM-RFC PATCH 0/2] eventfd en

Re: [patch] qemu-kvm introduce -maxcpus argument

2009-06-21 Thread Avi Kivity
On 06/19/2009 04:59 PM, Jes Sorensen wrote: Hi, This one introduces a -maxcpus setting, allowing the user to specify the maximum number of vCPUs the system can have, as discussed with Gleb earlier in the week. Patch looks good. There is nothing kvm-specific about it, so please send it to qe

Re: [patch] qemu-kvm introduce -maxcpus argument

2009-06-21 Thread Avi Kivity
On 06/19/2009 05:23 PM, Jes Sorensen wrote: libvirt currently does fd = open("/dev/kvm") r = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_NR_VCPUS); to figure out what the maximum allowed vCPUs will be for KVM, and currently it is returning 16 IIRC. Interesting, this will need to be add

Re: [PATCH -tip][KVM] x86: kvm/x86_emulate.c toggle_interruptibility() should be static

2009-06-21 Thread Avi Kivity
On 06/18/2009 02:23 PM, Jaswinder Singh Rajput wrote: toggle_interruptibility() is used only by same file, it should be static. Fixed following sparse warning : arch/x86/kvm/x86_emulate.c:1364:6: warning: symbol 'toggle_interruptibility' was not declared. Should it be static? Applied,

Re: [PATCH v2] qemu-kvm: x86: Fix CPU initialization

2009-06-21 Thread Avi Kivity
On 06/19/2009 08:17 PM, Jan Kiszka wrote: Jan Kiszka wrote: Fix regression in CPU initialization caused by merge a5b526135d and try to avoid this in the future by dropping qemu-kvm specific pc_new_cpu. If such refactoring is desired, it should go through upstream first. F...ine. I'll

Re: [PATCH 0/5 v2] Further cleanups to qemu-kvm.c

2009-06-21 Thread Avi Kivity
On 06/21/2009 01:01 PM, Avi Kivity wrote: On 06/18/2009 10:37 PM, Glauber Costa wrote: Avi, This is the patch set that should be applied. It is comprised of 4 patches. It however, depends on "[PATCH 1/5] get rid of target-i386/libkvm.c", so I'm sending it again, since it does not seem to be al

Re: enable sysenter on 32bit guests

2009-06-21 Thread Avi Kivity
On 06/18/2009 08:38 PM, Andrea Arcangeli wrote: From: Andrea Arcangeli model=2 is not existent when vendor is intel and an errata of P6 says that any model<= 2 when family is 6 lack sap feature, so windows and linux 32bit guests disable sap in software and slowdown for no good reason when runnin

Re: [PATCH 0/5 v2] Further cleanups to qemu-kvm.c

2009-06-21 Thread Avi Kivity
On 06/18/2009 10:37 PM, Glauber Costa wrote: Avi, This is the patch set that should be applied. It is comprised of 4 patches. It however, depends on "[PATCH 1/5] get rid of target-i386/libkvm.c", so I'm sending it again, since it does not seem to be already applied by you. Applied all, th