[PATCH] Fix segfault after device assignment hot remove

2010-05-06 Thread Alex Williamson
We keep a qlist of assigned devices for irq updates, but we forgot to remove entries from it if they're hot unplugged. This makes assigned_dev_update_irqs() a timebomb that goes off when the guest is rebooted. Signed-off-by: Alex Williamson alex.william...@redhat.com --- diff --git a/hw/device

[PATCH] pci: cleanly backout of pci_qdev_init()

2010-05-10 Thread Alex Williamson
'. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/pci.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index f167436..3d3560e 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -625,6 +625,14 @@ static PCIDevice

Re: [Qemu-devel] [PATCH] pci: cleanly backout of pci_qdev_init()

2010-05-11 Thread Alex Williamson
On Tue, 2010-05-11 at 21:17 +0300, Blue Swirl wrote: On 5/10/10, Alex Williamson alex.william...@redhat.com wrote: hw/pci.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index f167436..3d3560e 100644 --- a/hw/pci.c

[PATCH v2] pci: cleanly backout of pci_qdev_init()

2010-05-11 Thread Alex Williamson
'. Signed-off-by: Alex Williamson alex.william...@redhat.com --- v2: Remove extraneous return from do_pci_unregister_device()( hw/pci.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index f167436..3ca5f09 100644 --- a/hw/pci.c +++ b/hw

[PATCH] kvm: remove CAP_SYS_RAWIO requirement from kvm_vm_ioctl_assign_irq

2010-05-12 Thread Alex Williamson
Remove this check in an effort to allow kvm guests to run without root privileges. This capability check doesn't seem to add any security since the device needs to have already been added via the assign device ioctl and the io actually occurs through the pci sysfs interface. Signed-off-by: Alex

Re: [PATCH] kvm: remove CAP_SYS_RAWIO requirement from kvm_vm_ioctl_assign_irq

2010-05-13 Thread Alex Williamson
On Thu, 2010-05-13 at 15:06 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: Remove this check in an effort to allow kvm guests to run without root privileges. This capability check doesn't seem to add any security since the device needs to have already been

Re: [PATCH qemu-kvm] device-assignment: add config fd qdev property

2010-05-19 Thread Alex Williamson
the capability check to compare against privileges from when the file was opened. Signed-off-by: Chris Wright chr...@redhat.com --- hw/device-assignment.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) Acked-by: Alex Williamson alex.william...@redhat.com

[PATCH] device-assignment: Don't use libpci

2010-05-20 Thread Alex Williamson
We've already got an open fd for PCI config space for the device, we might as well use it. This also makes sure that if we're making use of a privileged file descriptor opened for us, we use it for all accesses to the device. Signed-off-by: Alex Williamson alex.william...@redhat.com

Re: [PATCH qemu-kvm 1/2] device-assignment: use stdint types

2010-05-20 Thread Alex Williamson
On Thu, 2010-05-20 at 17:25 -0700, Chris Wright wrote: Use stdint types to avoid extra reliance on pci/pci.h header. Cc: Alex Williamson alex.william...@redhat.com Signed-off-by: Chris Wright chr...@redhat.com --- hw/device-assignment.c |6 +++--- 1 files changed, 3 insertions(+), 3

Re: [PATCH qemu-kvm 2/2] device-assignment: Don't use libpci

2010-05-20 Thread Alex Williamson
On Thu, 2010-05-20 at 17:27 -0700, Chris Wright wrote: From: Alex Williamson alex.william...@redhat.com We've already got an open fd for PCI config space for the device, we might as well use it. This also makes sure that if we're making use of a privileged file descriptor opened for us, we

Re: [PATCH qemu-kvm] device-assignment: add config fd qdev property

2010-05-24 Thread Alex Williamson
the capability check to compare against privileges from when the file was opened. We need to make configfd be a string option so that we can pass a descriptor from libvirt for the hotplug case. Here's a rework. Signed-off-by: Chris Wright chr...@redhat.com Signed-off-by: Alex Williamson

[PATCH] device-assignment: don't truncate MSIX capabilities table size

2010-05-25 Thread Alex Williamson
PCI_MSIX_TABSIZE is 0x07ff Reported-by: Juan Quintela quint...@redhat.com Signed-off-by: Alex Williamson alex.william...@redhat.com --- Applies on top of: [PATCH qemu-kvm 1/2] device-assignment: use stdint types [PATCH qemu-kvm 2/2] device-assignment: Don't use libpci hw/device-assignment.c

Re: [PATCH] device-assignment: don't truncate MSIX capabilities table size

2010-05-25 Thread Alex Williamson
On Tue, 2010-05-25 at 16:09 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: PCI_MSIX_TABSIZE is 0x07ff while not an issue now, i think that only works for little endian Yep. This is consistent with rest of the device assignment code though, so I suspect

[PATCH] pc: push setting default cpu_model down a level

2010-06-01 Thread Alex Williamson
Not that CPU hotplug currently works, but if you make the mistake of trying it on a VM started without specifying a -cpu value, you hit a segfault from trying to strdup(NULL) in cpu_x86_find_by_name(). Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/pc.c | 16

Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers

2010-06-01 Thread Alex Williamson
On Tue, 2010-06-01 at 13:28 +0300, Avi Kivity wrote: On 06/01/2010 12:55 PM, Michael S. Tsirkin wrote: It can't program the iommu. What the patch proposes is that userspace tells vfio about the needed mappings, and vfio programs the iommu. There seems to be some

[PATCH] acpi_piix4: save gpe and pci hotplug slot status

2010-06-02 Thread Alex Williamson
PCI hotplug currently doesn't work after a migration because we don't migrate the enable bits of the GPE state. Pull hotplug structs into vmstate. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/acpi_piix4.c | 29 - 1 files changed, 28 insertions

Re: Problem booting guest with Linux 2.6.3x

2009-10-06 Thread Alex Williamson
On Tue, Oct 6, 2009 at 8:24 PM, Daniel Bareiro daniel-lis...@gmx.net wrote: root  (hd0,1)  Filesystem type is ext2fs, partition type 0x83 kernel  /boot/vmlinuz-2.6.31.2-dgb root=/dev/hda2 ro quiet console=tty0 console =ttyS0,38400n8   [Linux-bzImage, setup=0x3600, size=0x203480] initrd  

[PATCH] bios: Makefile ACPI DSDT generation

2008-06-18 Thread Alex Williamson
. This generates the same ASL after the preprocessor as current code. BTW, isn't \_PR.PRU \_PR.PRD too small for hotplug'ing more than 8 CPUs? Let me know what you think. Thanks, Alex kvm: bios: generate cpu and pci hotplug objects at compile time Signed-off-by: Alex Williamson [EMAIL PROTECTED

[PATCH] kvm: external module: fix anon_inode build for 2.6.26

2008-07-18 Thread Alex Williamson
Hi Avi, Commit 330f89ee1c19172b7b0dea739b912afc265bd755 doesn't build on 2.6.26 for some obvious undefined variables. Looks like a cut-n-paste error. Patch below. Thanks, Alex Signed-off-by: Alex Williamson [EMAIL PROTECTED] -- diff --git a/kernel/anon_inodes.c b/kernel/anon_inodes.c

[PATCH 0/5] bios: 4G updates

2008-09-23 Thread Alex Williamson
fully understand the implications of hotplug memory for this scenario. Let me know if there are comments. Thanks, Alex -- Alex Williamson HP Open Source Linux Org. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL

[PATCH 1/5] bios: rename memory extent variables

2008-09-23 Thread Alex Williamson
kvm: bios: rename memory extent variables These better reflect what they actually store Signed-off-by: Alex Williamson [EMAIL PROTECTED] --- bios/rombios32.c | 39 --- 1 files changed, 20 insertions(+), 19 deletions(-) diff --git a/bios/rombios32.c b/bios

[PATCH 2/5] bios: reformat ram_probe() to match the surrounding code

2008-09-23 Thread Alex Williamson
kvm: bios: reformat ram_probe() to match the surrounding code Also fixes mem_top to always report the top of memory. Signed-off-by: Alex Williamson [EMAIL PROTECTED] --- bios/rombios32.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/bios

[PATCH 3/5] bios: update SMBIOS table to report memory above 4G

2008-09-23 Thread Alex Williamson
kvm: bios: update SMBIOS table to report memory above 4G Signed-off-by: Alex Williamson [EMAIL PROTECTED] --- bios/rombios32.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bios/rombios32.c b/bios/rombios32.c index 4821ec4..c515d4a 100755 --- a/bios/rombios32.c

[PATCH 4/5] bios: fix SMBIOS end address range reporting

2008-09-23 Thread Alex Williamson
kvm: bios: fix SMBIOS end address range reporting The -1 seems to be in the wrong place here. Signed-off-by: Alex Williamson [EMAIL PROTECTED] --- bios/rombios32.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bios/rombios32.c b/bios/rombios32.c index c515d4a

[PATCH 5/5] bios: switch MTRRs to cover only the PCI range and default to WB

2008-09-23 Thread Alex Williamson
kvm: bios: switch MTRRs to cover only the PCI range and default to WB This matches how some bare metal machines report MTRRs and avoids the problem of running out of MTRRs to cover all of RAM. Signed-off-by: Alex Williamson [EMAIL PROTECTED] --- bios/rombios32.c | 24

Re: [PATCH 0/5] bios: 4G updates

2008-09-24 Thread Alex Williamson
? If not, I'll just merge these patches. I'll take a look. It seemed like they added support for putting the ACPI processor objects in an SSDT last I checked, but the AML for their processors is fairly trivial. I'll see if there's anything else worthwhile. Thanks, Alex -- Alex Williamson

Re: [kvm] Re: [PATCH 0/5] bios: 4G updates

2008-09-25 Thread Alex Williamson
On Wed, 2008-09-24 at 10:17 -0600, Alex Williamson wrote: On Wed, 2008-09-24 at 14:07 +0300, Avi Kivity wrote: The patches all look good, however renaming and reformatting will lead to merge headaches later on. We haven't been good at working with bochs bios upstream. Can you

[PATCH 0/4] bios: 4G updates (take2)

2008-09-25 Thread Alex Williamson
for MMIO Thanks, Alex -- Alex Williamson HP Open Source Linux Org. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/4] kvm: bios: cleanup/consolidate above 4G memory parsing

2008-09-25 Thread Alex Williamson
kvm: bios: cleanup/consolidate above 4G memory parsing Signed-off-by: Alex Williamson [EMAIL PROTECTED] --- bios/rombios32.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bios/rombios32.c b/bios/rombios32.c index c57e967..07c858c 100755 --- a/bios

[PATCH 3/4] kvm: bios: fix SMBIOS end address range reporting

2008-09-25 Thread Alex Williamson
kvm: bios: fix SMBIOS end address range reporting The -1 seems to be in the wrong place here. Signed-off-by: Alex Williamson [EMAIL PROTECTED] --- bios/rombios32.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bios/rombios32.c b/bios/rombios32.c index be4c25f

[PATCH 4/4] kvm: bios: switch MTRRs to cover only the PCI range and default to WB

2008-09-25 Thread Alex Williamson
kvm: bios: switch MTRRs to cover only the PCI range and default to WB This matches how some bare metal machines report MTRRs and avoids the problem of running out of MTRRs to cover all of RAM. Signed-off-by: Alex Williamson [EMAIL PROTECTED] --- bios/rombios32.c | 24

Re: [kvm] [PATCH 1/4] kvm: bios: cleanup/consolidate above 4G memory parsing

2008-09-30 Thread Alex Williamson
kvm: bios: cleanup/consolidate above 4G memory parsing Signed-off-by: Alex Williamson [EMAIL PROTECTED] --- Updated for current HEAD after bochs bios re-base. The rest of the patches in this series still apply cleanly. bios/rombios32.c | 17 + 1 files changed, 9 insertions

Re: [kvm] Re: [PATCH 0/5] bios: 4G updates

2008-09-30 Thread Alex Williamson
a patch to better follow the SDM when changing the MTRRs, but the first 3 patches are independent of that. Thanks, Alex -- Alex Williamson HP Open Source Linux Org. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL

Re: [kvm] Re: [PATCH 0/5] bios: 4G updates

2008-10-13 Thread Alex Williamson
to increase the bios reserved region to 1MB I can boot to the EFI shell, but KVM is missing some emulation to boot Linux (works with --no-kvm, maybe an ff 6f opcode?). I haven't had a chance to debug it further. Thanks, Alex Increase BIOS memory region to 1MB Signed-off-by: Alex Williamson [EMAIL

Re: [kvm] [patch 00/13] out of sync shadow v3

2008-10-14 Thread Alex Williamson
-x86_64 -L /usr/local/kvm/share/qemu -drive file=/dev/VM/Debian,if=ide,index=0 -m 512 -net nic -net user -vnc :1 Thanks, Alex -- Alex Williamson HP Open Source Linux Org. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL

Re: [kvm] [patch 00/13] out of sync shadow v3

2008-10-14 Thread Alex Williamson
On Tue, 2008-10-14 at 12:37 -0600, Alex Williamson wrote: I'm seeing problems with this using a Debian Lenny guest, it gets glibc realloc errors in the init scripts/initramfs. Using -no-kvm or setting oos_shadow=0 works around the problem. I also confirmed it was introduced in commit

Re: [kvm] [patch 00/13] out of sync shadow v3

2008-10-14 Thread Alex Williamson
try http://article.gmane.org/gmane.comp.emulators.kvm.devel/23044 Hi Marcelo, Much better, that fixes it. Thanks for the pointer, Alex -- Alex Williamson HP Open Source Linux Org. -- To unsubscribe from this list: send the line unsubscribe kvm in the body

[PATCH] e1000 VLAN offload emulation

2008-11-19 Thread Alex Williamson
for a guest on a bridge (not user mode networking). The only caveat beyond that is that you need to make sure the host NIC isn't doing it's own tagging, stripping, or filtering. This generally means the host NIC on the bridge should not be part of a VLAN. Thanks, Alex Signed-off-by: Alex Williamson

Re: [PATCH] e1000 VLAN offload emulation

2008-11-21 Thread Alex Williamson
rebase against QEMU and resubmit. Hi Anthony, Thanks for reviewing. Here's a new one, created and tested against qemu 5765. Thanks, Alex e1000: Add VLAN tagging/stripping/filtering offload emulation Signed-off-by: Alex Williamson [EMAIL PROTECTED] -- diff --git a/hw/e1000.c b/hw/e1000.c index

Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state

2011-01-18 Thread Alex Williamson
On Tue, 2011-01-18 at 16:54 +0100, Jan Kiszka wrote: On 2011-01-18 16:48, Anthony Liguori wrote: On 01/18/2011 09:43 AM, Jan Kiszka wrote: On 2011-01-18 16:04, Anthony Liguori wrote: On 01/18/2011 08:28 AM, Jan Kiszka wrote: On 2011-01-12 11:31, Jan Kiszka wrote:

Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state

2011-01-18 Thread Alex Williamson
On Tue, 2011-01-18 at 18:08 +0100, Jan Kiszka wrote: On 2011-01-18 18:02, Alex Williamson wrote: On Tue, 2011-01-18 at 16:54 +0100, Jan Kiszka wrote: On 2011-01-18 16:48, Anthony Liguori wrote: On 01/18/2011 09:43 AM, Jan Kiszka wrote: On 2011-01-18 16:04, Anthony Liguori wrote

Re: [PATCH] vhost: force vhost off for non-MSI guests

2011-01-20 Thread Alex Williamson
On Thu, 2011-01-20 at 17:35 +0200, Michael S. Tsirkin wrote: When MSI is off, each interrupt needs to be bounced through the io thread when it's set/cleared, so vhost-net causes more context switches and higher CPU utilization than userspace virtio which handles networking in the same thread.

Re: [Qemu-devel] [PATCH] vhost: force vhost off for non-MSI guests

2011-01-20 Thread Alex Williamson
On Thu, 2011-01-20 at 18:23 -0600, Anthony Liguori wrote: On 01/20/2011 10:07 AM, Michael S. Tsirkin wrote: On Thu, Jan 20, 2011 at 09:43:57AM -0600, Anthony Liguori wrote: On 01/20/2011 09:35 AM, Michael S. Tsirkin wrote: When MSI is off, each interrupt needs to be bounced

Re: [Qemu-devel] [PATCH] vhost: force vhost off for non-MSI guests

2011-01-21 Thread Alex Williamson
On Fri, 2011-01-21 at 11:55 +0200, Michael S. Tsirkin wrote: On Thu, Jan 20, 2011 at 06:35:46PM -0700, Alex Williamson wrote: On Thu, 2011-01-20 at 18:23 -0600, Anthony Liguori wrote: On 01/20/2011 10:07 AM, Michael S. Tsirkin wrote: On Thu, Jan 20, 2011 at 09:43:57AM -0600, Anthony

[RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-21 Thread Alex Williamson
with the solution in this series, it doesn't provide any guarantees whether a cpu_register_physical_memory() will succeed, only slightly better educated guesses. Are there better ideas how we could solve this? Thanks, Alex --- Alex Williamson (2): device-assignment: Count required kvm memory slots

[RFC PATCH 1/2] kvm: Allow querying free slots

2011-01-21 Thread Alex Williamson
to successfully map memory. Signed-off-by: Alex Williamson alex.william...@redhat.com --- kvm-all.c | 16 kvm.h |2 ++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 2f203dd..4fe3631 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -96,6

[RFC PATCH 2/2] device-assignment: Count required kvm memory slots

2011-01-21 Thread Alex Williamson
. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 59 +++- hw/device-assignment.h |3 ++ 2 files changed, 61 insertions(+), 1 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index e97f565

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-24 Thread Alex Williamson
On Mon, 2011-01-24 at 15:16 +0100, Jan Kiszka wrote: On 2011-01-24 10:32, Marcelo Tosatti wrote: On Fri, Jan 21, 2011 at 04:48:02PM -0700, Alex Williamson wrote: When doing device assignment, we use cpu_register_physical_memory() to directly map the qemu mmap of the device resource

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-24 Thread Alex Williamson
On Mon, 2011-01-24 at 08:44 -0700, Alex Williamson wrote: I'll look at how we might be able to allocate slots on demand. Thanks, Here's a first cut just to see if this looks agreeable. This allows the slot array to grow on demand. This works with current userspace, as well as userspace

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Alex Williamson
On Tue, 2011-01-25 at 08:36 +0100, Jan Kiszka wrote: On 2011-01-25 06:37, Alex Williamson wrote: On Mon, 2011-01-24 at 08:44 -0700, Alex Williamson wrote: I'll look at how we might be able to allocate slots on demand. Thanks, Here's a first cut just to see if this looks agreeable

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Alex Williamson
On Tue, 2011-01-25 at 12:20 +0200, Avi Kivity wrote: On 01/24/2011 11:32 AM, Marcelo Tosatti wrote: On Fri, Jan 21, 2011 at 04:48:02PM -0700, Alex Williamson wrote: When doing device assignment, we use cpu_register_physical_memory() to directly map the qemu mmap of the device resource

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Alex Williamson
On Tue, 2011-01-25 at 12:23 +0200, Avi Kivity wrote: On 01/25/2011 07:37 AM, Alex Williamson wrote: On Mon, 2011-01-24 at 08:44 -0700, Alex Williamson wrote: I'll look at how we might be able to allocate slots on demand. Thanks, Here's a first cut just to see if this looks

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Alex Williamson
On Tue, 2011-01-25 at 19:11 +0200, Avi Kivity wrote: On 01/25/2011 04:57 PM, Alex Williamson wrote: On Tue, 2011-01-25 at 12:23 +0200, Avi Kivity wrote: On 01/25/2011 07:37 AM, Alex Williamson wrote: On Mon, 2011-01-24 at 08:44 -0700, Alex Williamson wrote: I'll look at how

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-01-25 Thread Alex Williamson
On Tue, 2011-01-25 at 17:35 +0100, Jan Kiszka wrote: On 2011-01-25 15:53, Avi Kivity wrote: On 01/25/2011 04:41 PM, Alex Williamson wrote: kvm: Allow memory slot array to grow on demand Remove fixed KVM_MEMORY_SLOTS limit, allowing the slot array to grow

Re: Graphics pass-through

2011-01-25 Thread Alex Williamson
2011/1/25 Prasad Joshi prasadjoshi...@gmail.com: Hello, This is to announce that, we have been able to pass-through a ATI Radeon RV370 FireGL V3100 to Ubuntu VM. This card was attached to a separate monitor, after passing-through the Keyboard and Mouse everything worked as normal. The

Re: Graphics pass-through

2011-01-27 Thread Alex Williamson
On Thu, 2011-01-27 at 12:56 +0100, André Weidemann wrote: Hi Alex, On 26.01.2011 06:12, Alex Williamson wrote: So while your initial results are promising, my guess is that you're using card specific drivers and still need to consider some of the harder problems with generic support

Re: Graphics pass-through

2011-01-28 Thread Alex Williamson
On Fri, 2011-01-28 at 18:29 +0100, André Weidemann wrote: Hi Alex, On 28.01.2011 01:45, Alex Williamson wrote: Do you mind sharing these patches? Attached. Thank you for attaching the patch. Unfortunately it does not apply to current clone of the qemu-kvm git repository. The file

Re: [PATCHv2] vhost: force vhost off for non-MSI guests

2011-01-31 Thread Alex Williamson
On Mon, 2011-01-31 at 23:19 +0200, Michael S. Tsirkin wrote: When MSI is off, each interrupt needs to be bounced through the io thread when it's set/cleared, so vhost-net causes more context switches and higher CPU utilization than userspace virtio which handles networking in the same thread.

Re: [PATCHv2] vhost: force vhost off for non-MSI guests

2011-01-31 Thread Alex Williamson
On Tue, 2011-02-01 at 00:02 +0200, Michael S. Tsirkin wrote: On Mon, Jan 31, 2011 at 02:47:34PM -0700, Alex Williamson wrote: On Mon, 2011-01-31 at 23:19 +0200, Michael S. Tsirkin wrote: When MSI is off, each interrupt needs to be bounced through the io thread when it's set/cleared, so

Re: [PATCHv3 0.14] vhost: force vhost off for non-MSI guests

2011-02-01 Thread Alex Williamson
On Tue, 2011-02-01 at 22:13 +0200, Michael S. Tsirkin wrote: When MSI is off, each interrupt needs to be bounced through the io thread when it's set/cleared, so vhost-net causes more context switches and higher CPU utilization than userspace virtio which handles networking in the same thread.

Re: [PATCH 11/15] kvm: Remove unneeded memory slot reservation

2011-02-07 Thread Alex Williamson
. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Alex Williamson alex.william...@redhat.com --- kvm-all.c |4 1 files changed, 0 insertions(+), 4 deletions(-) Acked-by: Alex Williamson alex.william...@redhat.com diff --git a/kvm-all.c b/kvm-all.c index 802c6b8..14b6c1e

Re: PCI Passthrough, error: The driver 'pci-stub' is occupying your device 0000:08:06.2

2011-02-14 Thread Alex Williamson
On Sat, 2011-02-12 at 16:04 +, James Neave wrote: On Tue, Feb 8, 2011 at 10:17 AM, James Neave robo...@gmail.com wrote: On Tue, Feb 8, 2011 at 9:59 AM, Kenni Lund ke...@kelu.dk wrote: 2011/2/7 Daniel P. Berrange berra...@redhat.com: On Sat, Feb 05, 2011 at 04:34:01PM +, James Neave

Re: KVM Test report, kernel a685b38... qemu 671d89d...

2011-02-16 Thread Alex Williamson
On Wed, 2011-02-16 at 11:10 +0200, Avi Kivity wrote: On 02/16/2011 11:05 AM, Hao, Xudong wrote: Hi, all, This is KVM test result against kvm.git a685b38e272587e644fedd37269ddb82df21c052, and qemu-kvm.git 671d89d6411655bb4f8058ce6eb86bb0bb8ec978. Currently qemu-kvm can build

Re: KVM Test report, kernel a685b38... qemu 671d89d...

2011-02-16 Thread Alex Williamson
On Wed, 2011-02-16 at 08:01 -0700, Alex Williamson wrote: On Wed, 2011-02-16 at 11:10 +0200, Avi Kivity wrote: On 02/16/2011 11:05 AM, Hao, Xudong wrote: Hi, all, This is KVM test result against kvm.git a685b38e272587e644fedd37269ddb82df21c052, and qemu-kvm.git

Re: Passthrough of 2 PCI devices works 80% (Kernel 2.6.37, Debian Squeeze, Win7 VM)

2011-02-16 Thread Alex Williamson
On Tue, 2011-02-15 at 20:57 +, Da Powah wrote: Hi, i`ve got a question about pci passthrogh of 2 pci devices (2x DVB-S2 PCI cards with Saa7146 PCI Bridge from Technotrend: S2-3200). I am using squeeze with a 2.6.37 selfcompiled Kernel. I want to passthrough both devices to a virtual

Re: PCI Passthrough, error: The driver 'pci-stub' is occupying your device 0000:08:06.2

2011-02-21 Thread Alex Williamson
On Mon, 2011-02-21 at 20:31 +, James Neave wrote: On Mon, Feb 14, 2011 at 5:48 PM, Alex Williamson alex.william...@redhat.com wrote: On Sat, 2011-02-12 at 16:04 +, James Neave wrote: On Tue, Feb 8, 2011 at 10:17 AM, James Neave robo...@gmail.com wrote: On Tue, Feb 8, 2011 at 9:59

Re: [PATCH 4/7] KVM: sort memslots and use binary search to search the right slot

2011-02-22 Thread Alex Williamson
On Tue, 2011-02-22 at 16:25 +0200, Avi Kivity wrote: On 02/22/2011 10:12 AM, Xiao Guangrong wrote: Sort memslots then search the slot with binary search to speed up the slot searching I'm not sure if a binary search is the right algorithm here. It introduces a lot of branches which

[RFC PATCH 0/3] Weight-balanced binary tree + KVM growable memory slots using wbtree

2011-02-22 Thread Alex Williamson
that generates output for dot. You can copy the output to a file and run: dot -Tpdf foo.dot foo.pdf to generate a nice diagram of the tree currently in use. I'll follow-up with a few examples. Thanks, Alex --- Alex Williamson (3): kvm: Use weight-balanced tree for memory slot

[RFC PATCH 1/3] Weight-balanced tree

2011-02-22 Thread Alex Williamson
Signed-off-by: Alex Williamson alex.william...@redhat.com --- include/linux/wbtree.h | 55 lib/Makefile |3 + lib/wbtree.c | 170 3 files changed, 227 insertions(+), 1 deletions(-) create mode 100644

[RFC PATCH 2/3] kvm: Allow memory slot array to grow on demand

2011-02-22 Thread Alex Williamson
off the array when it's replaces is straight forward. x86 also keeps a bitmap of slots used by a kvm_mmu_page, which requires a shadow tlb flush whenever we increase the number of slots. This forces the pages to be rebuilt with the new bitmap size. Signed-off-by: Alex Williamson alex.william

[RFC PATCH 3/3] kvm: Use weight-balanced tree for memory slot management

2011-02-22 Thread Alex Williamson
Rather than search linearly through an unordered slot array, we can embed a tree node into each element. We can still do RCU tree updates by applying the pointer offset to each element in the new copy of the tree. Signed-off-by: Alex Williamson alex.william...@redhat.com --- include/linux

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-22 Thread Alex Williamson
On Sun, 2011-01-30 at 13:11 +0800, Sheng Yang wrote: Then we can support mask bit operation of assigned devices now. Looks pretty good overall. A few comments below. It seems like we should be able to hook this into vfio with a small stub in kvm. We just need to be able to communicate

Re: [RFC PATCH 0/3] Weight-balanced binary tree + KVM growable memory slots using wbtree

2011-02-22 Thread Alex Williamson
On Tue, 2011-02-22 at 11:54 -0700, Alex Williamson wrote: This series introduces a new weight-balanced binary tree (wbtree) for general use. It's largely leveraged from the rbtree, copying it's rotate functions, while introducing different rebalance and erase functions. This tree

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-23 Thread Alex Williamson
On Wed, 2011-02-23 at 14:59 +0800, Sheng Yang wrote: On Wednesday 23 February 2011 08:19:21 Alex Williamson wrote: On Sun, 2011-01-30 at 13:11 +0800, Sheng Yang wrote: +static int msix_table_mmio_read(struct kvm_io_device *this, gpa_t addr, int len, +void

Re: [RFC PATCH 1/3] Weight-balanced tree

2011-02-23 Thread Alex Williamson
On Wed, 2011-02-23 at 15:09 +0200, Avi Kivity wrote: On 02/22/2011 08:55 PM, Alex Williamson wrote: Signed-off-by: Alex Williamsonalex.william...@redhat.com --- include/linux/wbtree.h | 55 lib/Makefile |3 + lib/wbtree.c | 170

Re: [RFC PATCH 0/3] Weight-balanced binary tree + KVM growable memory slots using wbtree

2011-02-23 Thread Alex Williamson
On Wed, 2011-02-23 at 15:12 +0200, Avi Kivity wrote: On 02/22/2011 08:54 PM, Alex Williamson wrote: This series introduces a new weight-balanced binary tree (wbtree) for general use. It's largely leveraged from the rbtree, copying it's rotate functions, while introducing different

Re: [PATCH 2/3] KVM: Emulate MSI-X table in kernel

2011-02-23 Thread Alex Williamson
On Wed, 2011-02-23 at 20:39 +0200, Michael S. Tsirkin wrote: On Wed, Feb 23, 2011 at 09:34:19AM -0700, Alex Williamson wrote: On Wed, 2011-02-23 at 14:59 +0800, Sheng Yang wrote: On Wednesday 23 February 2011 08:19:21 Alex Williamson wrote: On Sun, 2011-01-30 at 13:11 +0800, Sheng Yang

Re: [RFC PATCH 1/3] Weight-balanced tree

2011-02-23 Thread Alex Williamson
On Wed, 2011-02-23 at 19:08 +0200, Avi Kivity wrote: On 02/23/2011 07:02 PM, Alex Williamson wrote: obj-$(CONFIG_WEIGHT_BALANCED_TREE) += wbtree.o then kvm can select it, and the impact on non-kvm kernels is removed. Then we'd have issues trying to build an external kvm module

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-02-23 Thread Alex Williamson
On Mon, 2011-01-31 at 17:18 -0200, Marcelo Tosatti wrote: On Mon, Jan 24, 2011 at 10:37:56PM -0700, Alex Williamson wrote: On Mon, 2011-01-24 at 08:44 -0700, Alex Williamson wrote: I'll look at how we might be able to allocate slots on demand. Thanks, Here's a first cut just to see

Re: [RFC PATCH 0/3] Weight-balanced binary tree + KVM growable memory slots using wbtree

2011-02-24 Thread Alex Williamson
On Thu, 2011-02-24 at 12:06 +0200, Avi Kivity wrote: On 02/23/2011 09:28 PM, Alex Williamson wrote: I had forgotten about1M mem, so actually the slot configuration was: 0:1M 1: 1M - 3.5G 2: 4G+ I stacked the deck in favor of the static array (0: 4G+, 1: 1M-3.5G, 2: 1M), and got

Re: [RFC PATCH 2/3] kvm: Allow memory slot array to grow on demand

2011-02-24 Thread Alex Williamson
On Thu, 2011-02-24 at 12:39 +0200, Avi Kivity wrote: On 02/22/2011 08:55 PM, Alex Williamson wrote: Remove fixed KVM_MEMORY_SLOTS limit, allowing the slot array to grow on demand. Private slots are now allocated at the front instead of the end. Only x86 seems to use private slots, so

Re: [RFC PATCH 0/2] Expose available KVM free memory slot count to help avoid aborts

2011-02-24 Thread Alex Williamson
On Thu, 2011-02-24 at 14:34 +0200, Avi Kivity wrote: On 02/23/2011 11:46 PM, Alex Williamson wrote: But kvm_arch_flush_shadow() takes mmu_lock currently, so that needs fixing. Hmm, I tried to follow the example in the !npages path just above this that does: rcu_assign_pointer

Re: [PATCH 0/3] device-assigment: cleanup

2011-02-24 Thread Alex Williamson
-by: Alex Williamson alex.william...@redhat.com -- 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: [RFC PATCH 0/3] Weight-balanced binary tree + KVM growable memory slots using wbtree

2011-02-28 Thread Alex Williamson
On Sun, 2011-02-27 at 11:54 +0200, Avi Kivity wrote: On 02/24/2011 07:35 PM, Alex Williamson wrote: On Thu, 2011-02-24 at 12:06 +0200, Avi Kivity wrote: On 02/23/2011 09:28 PM, Alex Williamson wrote: I had forgotten about1M mem, so actually the slot configuration was: 0:1M

Re: [RFC PATCH 0/3] Weight-balanced binary tree + KVM growable memory slots using wbtree

2011-03-01 Thread Alex Williamson
On Tue, 2011-03-01 at 17:03 +0200, Avi Kivity wrote: On 03/01/2011 01:04 AM, Alex Williamson wrote: The original problem that brought this on was scaling. The re-ordered array still has O(N) scaling while the tree should have ~O(logN) (note that it currently doesn't

Re: [Qemu-devel] [PATCH] vhost: force vhost off for non-MSI guests

2011-03-14 Thread Alex Williamson
On Mon, 2011-03-14 at 21:00 +0200, Michael S. Tsirkin wrote: On Mon, Mar 14, 2011 at 10:35:08PM +0530, rukhsana ansari wrote: Seeking clarification to the original question I posted: This maybe a novice question - Would appreciate it if you can you provide a pointer to

Re: [PATCH] device-assignment: Reset device on system reset

2011-03-17 Thread Alex Williamson
On Thu, 2011-03-17 at 14:12 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: static void reset_assigned_device(DeviceState *dev) { -PCIDevice *d = DO_UPCAST(PCIDevice, qdev, dev); +PCIDevice *pci_dev = DO_UPCAST(PCIDevice, qdev, dev

[stable,master] [PATCH] qemu-kvm: Don't break device assignment INTx

2011-03-23 Thread Alex Williamson
don't work. This mostly reverts that commit, but makes pci.o conditional on CONFIG_PCI, which hopefully addresses the original intent of the change. Fixes: https://bugs.launchpad.net/qemu/+bug/730441 Reported-by: Yongjie Ren yongjie@intel.com Signed-off-by: Alex Williamson alex.william

[stable, master][PATCH v2] qemu-kvm: Don't break device assignment INTx

2011-03-24 Thread Alex Williamson
don't work. This mostly reverts that commit, but makes pci.o conditional on CONFIG_PCI, which hopefully addresses the original intent of the change. Fixes: https://bugs.launchpad.net/qemu/+bug/730441 Reported-by: Yongjie Ren yongjie@intel.com Signed-off-by: Alex Williamson alex.william

Re: [PATCH] device-assignment: move irqs update to piix emulation

2011-03-27 Thread Alex Williamson
On Sun, 2011-03-27 at 23:22 +0400, Konstantin Khlebnikov wrote: Move assigned devices irq reroute hook from generic pci code to piix emulation. Actually without this patch this hook had never worked, because pci.c not include config.h and CONFIG_KVM_DEVICE_ASSIGNMENT there always undefined.

Re: Biweekly KVM Test report, kernel a3e2cba1... qemu 2c9bb5d4...

2011-04-04 Thread Alex Williamson
On Sun, 2011-04-03 at 11:43 +0300, Avi Kivity wrote: On 04/02/2011 01:14 PM, Ren, Yongjie wrote: Hi All, This is KVM test result against kvm.git a3e2cba1e702cfe15e2ebb20a75b88f02c834d3f based on kernel 2.6.38+, and qemu-kvm.git 2c9bb5d4e5ae3b12ad71bd6a0c1b32003661f53a. We found 1

Re: Slow PXE boot in qemu.git (fast in qemu-kvm.git)

2011-04-11 Thread Alex Williamson
On Mon, 2011-04-11 at 15:35 -0300, Luiz Capitulino wrote: On Fri, 08 Apr 2011 19:50:57 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 04/08/2011 06:25 PM, Luiz Capitulino wrote: Hi there, Summary: - PXE boot in qemu.git (HEAD f124a41) is quite slow, more than 5

Re: Slow PXE boot in qemu.git (fast in qemu-kvm.git)

2011-04-11 Thread Alex Williamson
On Mon, 2011-04-11 at 22:04 +0200, Jan Kiszka wrote: On 2011-04-11 21:15, Luiz Capitulino wrote: On Mon, 11 Apr 2011 13:00:32 -0600 Alex Williamson alex.william...@redhat.com wrote: On Mon, 2011-04-11 at 15:35 -0300, Luiz Capitulino wrote: On Fri, 08 Apr 2011 19:50:57 -0500 Anthony

Re: Biweekly KVM Test report, kernel 7a7ada1b... qemu df85c051...

2011-04-12 Thread Alex Williamson
does not touch. So we better save/restore the assigned device across guest usage. Acked-by: Alex Williamson alex.william...@redhat.com Acked-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa

Re: Biweekly KVM Test report, kernel 7a7ada1b... qemu df85c051...

2011-04-12 Thread Alex Williamson
On Tue, 2011-04-12 at 23:02 +0200, Jan Kiszka wrote: On 2011-04-12 20:22, Alex Williamson wrote: On Tue, 2011-04-12 at 11:02 +0300, Avi Kivity wrote: On 04/12/2011 10:48 AM, Ren, Yongjie wrote: Hi All, This is KVM test result against kvm.git 7a7ada1bfb958d2ad722d0df9299f1b0136ec1d4

[PATCH 0/2] Store and load PCI device saved state across function resets

2011-04-15 Thread Alex Williamson
adds a mechanism to pull the saved state off into an opaue buffer, which can be reloaded into the device at a later point. Thanks, Alex --- Alex Williamson (2): KVM: Use pci_store/load_saved_state() around VM device usage PCI: Add interfaces to store and load the device saved state

[PATCH 1/2] PCI: Add interfaces to store and load the device saved state

2011-04-15 Thread Alex Williamson
can't just manually call save and restore. Add generic interfaces for the saved state to be stored into a buffer and reloaded back into struct pci_dev at a later time. Signed-off-by: Alex Williamson alex.william...@redhat.com --- drivers/pci/pci.c | 94

[PATCH 2/2] KVM: Use pci_store/load_saved_state() around VM device usage

2011-04-15 Thread Alex Williamson
Store the device saved state so that we can reload the device back to the original state when it's unassigned. This has the benefit that the state survives across pci_reset_function() calls via the PCI sysfs reset interface while the VM is using the device. Signed-off-by: Alex Williamson

Re: [PATCH 2/2] KVM: Use pci_store/load_saved_state() around VM device usage

2011-04-15 Thread Alex Williamson
On Fri, 2011-04-15 at 22:03 +0200, Jan Kiszka wrote: On 2011-04-15 21:54, Alex Williamson wrote: Store the device saved state so that we can reload the device back to the original state when it's unassigned. This has the benefit that the state survives across pci_reset_function() calls via

Re: [PATCH 2/2] KVM: Use pci_store/load_saved_state() around VM device usage

2011-04-18 Thread Alex Williamson
On Sun, 2011-04-17 at 12:25 +0300, Avi Kivity wrote: On 04/15/2011 10:54 PM, Alex Williamson wrote: Store the device saved state so that we can reload the device back to the original state when it's unassigned. This has the benefit that the state survives across pci_reset_function() calls

  1   2   3   4   5   6   7   8   9   10   >