Re: [PATCH 4/4] dont trim the guest's hypervisor CPUID bit in KVM if the guest requests it

2009-06-24 Thread Avi Kivity
On 06/24/2009 01:44 PM, Andre Przywara wrote: Signed-off-by: Andre Przywara --- arch/x86/kvm/x86.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index e6e61ee..6ad0f93 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @

Re: [PATCH 3/4] ignore PCI ECS I/O enablement

2009-06-24 Thread Avi Kivity
On 06/24/2009 01:44 PM, Andre Przywara wrote: Linux guests will try to enable access to the extended PCI config space via the I/O ports 0xCF8/0xCFC on AMD Fam10h CPU. Since we (currently?) don't use ECS, simply ignore this write attempt. diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index

Re: [PATCH 1/4] ignore AMDs HWCR register access to set the FFDIS bit

2009-06-24 Thread Avi Kivity
On 06/24/2009 01:44 PM, Andre Przywara wrote: Linux tries to disable the flush filter on all AMD K8 CPUs. Since KVM does not handle the needed MSR, the injected #GP will panic the Linux kernel. Ignore setting of the HWCR.FFDIS bit in this MSR to let Linux boot with an AMD K8 family guest CPU.

Re: [Qemu-devel] Re: [PATCH 2/2] introduce -cpu host target

2009-06-24 Thread Avi Kivity
On 06/24/2009 08:37 PM, Filip Navara wrote: On Wed, Jun 24, 2009 at 11:54 AM, Avi Kivity wrote: On 06/23/2009 12:47 AM, Andre Przywara wrote: Should we ignore unhandled MSRs like QEMU or Xen do? Ignoring unhandled msrs is dangerous. If a write has some effect the guest

Re: [Qemu-devel] KVMs default CPU type

2009-06-25 Thread Avi Kivity
On 06/25/2009 11:11 AM, Andre Przywara wrote: I think we should go away from using qemu64 as a default for KVM. In my opinion we should target -cpu host as KVM's default, while in parallel create a -cpu migrate type (still fiddling with the CPUID details of that), which takes over the qemu64 ro

[ANNOUNCE] kvm-86 release

2009-06-25 Thread Avi Kivity
Many fixes, performance improvements, a preview of irqfd, but all of these pale in comparison to qemu-system-x86_64 -m 1024 -cdrom http://example.com/livecd.iso yes, no need for tedious downloading any more. Changes from kvm-86: - merge qemu upstream (Mark McLoughlin, me) - tune and view

Re: [ANNOUNCE] kvm-87 release

2009-06-25 Thread Avi Kivity
On 06/25/2009 12:21 PM, Avi Kivity wrote: Many fixes, performance improvements, a preview of irqfd, but all of these pale in comparison to That was kvm-87 released, not a kvm-86 rerun. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the

Re: [PATCH] introduce module parameter for ignoring unknown MSRs accesses

2009-06-25 Thread Avi Kivity
On 06/25/2009 01:36 PM, Andre Przywara wrote: KVM will inject a #GP into the guest if that tries to access unhandled MSRs. This will crash many guests. Although it would be the correct way to actually handle these MSRs, we introduce a runtime switchable module param called "ignore_msrs" (defaults

Re: [PATCH] kvm-kmod: Fix condition for native_read_msr_safe wrapping

2009-06-25 Thread Avi Kivity
On 06/25/2009 11:24 AM, Jan Kiszka wrote: For i386, native_read_msr_safe was already introduced in 2.6.22. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord..

Device assignment hotplug broken

2009-06-25 Thread Avi Kivity
The impact of the hotplug changes on device assignment were too difficult for me to fix up during the merge, so I disabled it temporarily. Please take a look at qemu-kvm.git commit a3b371477e3. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.

Re: [PATCH] kvm-kmod: Fix tracepoint warnings against OpenSUSE's 2.6.27

2009-06-28 Thread Avi Kivity
On 06/25/2009 03:47 PM, Jan Kiszka wrote: OpenSUSE's 2.6.27 already includes tracepoints and generates a lot of warnings regarding redefinition of tracepoint_synchronize_unregister. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this

Re: [PATCH] Fix ppc-softmmu build

2009-06-28 Thread Avi Kivity
On 06/24/2009 10:25 PM, Anthony Liguori wrote: This gets ppc-softmmu building when KVM is not enabled. It may be enough to get it working with KVM enabled but I haven't checked. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this li

Re: [PATCH] Use upstream guard for kvm support in ppcemb-softmmu

2009-06-28 Thread Avi Kivity
On 06/24/2009 11:13 PM, Anthony Liguori wrote: ppcemb-softmmu uses upstream KVM support so put an appropriate guard around it. This fixes the non-KVM ppcemb-softmmu build. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: sen

Re: KVM-87 compile failed

2009-06-28 Thread Avi Kivity
On 06/26/2009 08:40 AM, g...@schrodinger.com wrote: Hi, Compiling KVM-87 failed with following error: make -C /lib/modules/2.6.29-gentoo-r5/build M=`pwd` \ LINUXINCLUDE="-I`pwd`/include -Iinclude \ -Iarch/x86/include -I`pwd`/include-compat \ -

Re: [PATCH] Move x86 specific code from qemu-kvm.c to qemu-kvm-x86.c

2009-06-28 Thread Avi Kivity
On 06/25/2009 03:20 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: [PATCH] Use cpu_is_bsp() to check for bsp cpu.

2009-06-28 Thread Avi Kivity
On 06/25/2009 03:20 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: [PATCH] Add kvm_set_boot_cpu_id() API.

2009-06-28 Thread Avi Kivity
On 06/25/2009 03:21 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov Why is it needed? (good changelog material). } - + +kvm_set_boot_cpu_id(0); You're not testing for failure. Doesn't matter here because it's the default, but then you can omit the call entirely. -

Re: [PATCH] Add kvm_set_boot_cpu_id() API.

2009-06-28 Thread Avi Kivity
On 06/28/2009 12:33 PM, Gleb Natapov wrote: On Sun, Jun 28, 2009 at 12:29:26PM +0300, Avi Kivity wrote: On 06/25/2009 03:21 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov Why is it needed? (good changelog material). OK. Well, why

Re: guest gettimeofday behavior

2009-06-28 Thread Avi Kivity
On 06/25/2009 04:25 PM, Eran Rom wrote: Hi All, Am a newbie (to kvm, linux kernel, git, etc.) so apologize in advance for missing/inaccurate info. I am experiencing inconsistent behavior of guest gettimeofday, described below. I have seen prior reference to the problem, however, it was not clear

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

2009-06-28 Thread Avi Kivity
On 06/25/2009 04:59 PM, Gregory Haskins wrote: Gregory Haskins wrote: (Applies to kvm.git/master:4631e094) The following is the latest attempt to fix the races in irqfd/eventfd, as well as restore DEASSIGN support. For more details, please read the patch headers. This series has been test

Re: [PATCH] kvm: remove in_range from kvm_io_device

2009-06-28 Thread Avi Kivity
On 06/25/2009 04:19 PM, Gregory Haskins wrote: Indeed. I will put something together. We should consider merging the io_bus cleanup I have for deregister support ASAP as well. If it makes things easier, we can also introduce a rwsem as an intermediary step. -- error compiling committe

Re: [KVM PATCH v5 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-06-28 Thread Avi Kivity
On 06/28/2009 04:18 PM, Michael S. Tsirkin wrote: that could be the case, as we have, for example: static struct file_operations kvm_vm_fops = { .release= kvm_vm_release, .unlocked_ioctl = kvm_vm_ioctl, .compat_ioctl = kvm_vm_ioctl, .mmap

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

2009-06-28 Thread Avi Kivity
On 06/28/2009 03:59 PM, Gregory Haskins wrote: I agree that we want POLLHUP support, it's better than holding on to the eventfd. But I think we can make it even cleaner by merging it with deassign. Basically, when we get POLLHUP, we launch a slow_work (or something) that does a regular deassign

[GIT PULL] KVM fixes for 2.6.31-rc1

2009-06-28 Thread Avi Kivity
ah (1): KVM: Ignore reads to K7 EVNTSEL MSRs Avi Kivity (2): KVM: MMU: Allow 4K ptes with bit 7 (PAT) set KVM: VMX: Handle vmx instruction vmexits Christian Borntraeger (1): KVM: s390: Allow stfle instruction in the guest Izik Eidus (1): KVM: Fix dirty bit tracking for slots

Re: [PATCH] Only compile KVM support for matching CPU types

2009-06-28 Thread Avi Kivity
On 06/25/2009 01:40 AM, Anthony Liguori wrote: Applied, thanks. I don't know why this is disabled for qemu-kvm.git. It was disabled before qemu.git got reworked here, IIRC. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "un

Re: BUG: using smp_processor_id() in preemptible

2009-06-28 Thread Avi Kivity
On 06/24/2009 05:15 PM, Johannes Berg wrote: Hi, I'm trying to run a test environment in kvm (because uml doesn't have lockdep), and am running into the following problems: 1) I get the $subject warning a lot, when starting kvm: [85763.262707] BUG: using smp_processor_id() in preemptible [0

Re: slow guest performance with build load, looking for ideas

2009-06-28 Thread Avi Kivity
On 06/19/2009 02:07 AM, Erik Jacobson wrote: Hello. I'll top-post since the quoted text is just for reference. Sorry the follow-up testing took so long. We're very low on 5500/Nehalem resources at the moment and I had to track down lots of stuff before getting to the test. I ran some tests on

Re: [patch 0/3] remove old KVMTRACE support code

2009-06-28 Thread Avi Kivity
On 06/18/2009 05:47 PM, Marcelo Tosatti wrote: Applied 1 and 2. I folded trace-arch.h into trace.h because trace-arch.h gave me grief on x86. Patch 3 likely will not apply since there were many changes in that area; I'll hack it enough so it builds. We could probably remove arch/powerpc/kvm

Re: tracepoint undefined symbols?

2009-06-28 Thread Avi Kivity
On 06/28/2009 06:50 PM, Xavier Gnata wrote: Hi, I'm trying to compile kvm-87 on 2.6.30-10-generic #12-Ubuntu SMP. I get: WARNING: "__tracepoint_kvm_pio" [/usr/local/src/kvm-87/kvm/kernel/x86/kvm.ko] undefined! WARNING: "__tracepoint_kvm_cpuid" [/usr/local/src/kvm-87/kvm/kernel/x86/

Re: slow guest performance with build load, looking for ideas

2009-06-28 Thread Avi Kivity
On 06/28/2009 10:05 PM, Erik Jacobson wrote: * In some of the timing runs on this system, the "real time" reported by the time command was off by 10 to 11 times. Issues were found in the messages file that seemed to relate to this including HUGE time adjustments by NTP and kern

Re: [PATCHv2] kvm: remove in_range and switch to rwsem for iobus

2009-06-29 Thread Avi Kivity
On 06/28/2009 10:34 PM, Michael S. Tsirkin wrote: This changes bus accesses to use high-level kvm_io_bus_read/kvm_io_bus_write functions, which utilize read/write semaphore intead of mutex. in_range now becomes unused so it is removed from device ops in favor of read/write callbacks performing r

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Avi Kivity
On 06/29/2009 11:32 AM, Johannes Berg wrote: On Sun, 2009-06-28 at 17:11 +0300, Avi Kivity wrote: 1) I get the $subject warning a lot, when starting kvm: [85763.262707] BUG: using smp_processor_id() in preemptible [] code: kvm/13877 [85763.262719] caller is kvm_write_guest_time

Re: [PATCH] Use upstream QEMU apic init/sipi handling

2009-06-29 Thread Avi Kivity
On 06/28/2009 06:46 PM, Gleb Natapov wrote: Remove KVM specific init/sipi handling from hw/apic.c. Now when upstream QEMU handles init/sipi in a cpu loop KVM can do the same. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list:

Re: [PATCH 1/3 v2] Add Directed EOI support to APIC emulation

2009-06-29 Thread Avi Kivity
On 06/28/2009 03:15 PM, Gleb Natapov wrote: Directed EOI is specified by x2APIC, but is available even when lapic is in xAPIC mode. #define APIC_LVT_NUM 6 /* 14 is the version for Xeon and Pentium 8.4.8*/ -#define APIC_VERSION (0x14UL | ((APIC_LVT_NUM - 1)<

Re: [PATCH 2/3 v2] x2APIC interface to local apic

2009-06-29 Thread Avi Kivity
On 06/28/2009 03:15 PM, Gleb Natapov wrote: This patch implements MSR interface to a local apic as defines by x2APIC Intel specification. @@ -269,7 +275,12 @@ int kvm_apic_match_physical_addr(struct kvm_lapic *apic, u16 dest) int kvm_apic_match_logical_addr(struct kvm_lapic *apic, u8 mda) {

Re: [PATCHv2] kvm: remove in_range and switch to rwsem for iobus

2009-06-29 Thread Avi Kivity
On 06/29/2009 12:23 PM, Michael S. Tsirkin wrote: On Mon, Jun 29, 2009 at 11:37:00AM +0300, Avi Kivity wrote: On 06/28/2009 10:34 PM, Michael S. Tsirkin wrote: This changes bus accesses to use high-level kvm_io_bus_read/kvm_io_bus_write functions, which utilize read/write semaphore

Re: [PATCH 1/3 v2] Add Directed EOI support to APIC emulation

2009-06-29 Thread Avi Kivity
On 06/29/2009 12:29 PM, Gleb Natapov wrote: On Mon, Jun 29, 2009 at 12:18:28PM +0300, Avi Kivity wrote: On 06/28/2009 03:15 PM, Gleb Natapov wrote: Directed EOI is specified by x2APIC, but is available even when lapic is in xAPIC mode. #define APIC_LVT_NUM 6

Re: [PATCHv2] kvm: remove in_range and switch to rwsem for iobus

2009-06-29 Thread Avi Kivity
On 06/29/2009 12:41 PM, Michael S. Tsirkin wrote: On Mon, Jun 29, 2009 at 11:37:00AM +0300, Avi Kivity wrote: On 06/28/2009 10:34 PM, Michael S. Tsirkin wrote: This changes bus accesses to use high-level kvm_io_bus_read/kvm_io_bus_write functions, which utilize read/write semaphore

Re: [PATCH 2/3 v2] x2APIC interface to local apic

2009-06-29 Thread Avi Kivity
On 06/29/2009 12:51 PM, Gleb Natapov wrote: On Mon, Jun 29, 2009 at 12:42:02PM +0300, Avi Kivity wrote: On 06/28/2009 03:15 PM, Gleb Natapov wrote: This patch implements MSR interface to a local apic as defines by x2APIC Intel specification. @@ -269,7 +275,12 @@ int

Re: [PATCHv2] kvm: remove in_range and switch to rwsem for iobus

2009-06-29 Thread Avi Kivity
On 06/29/2009 12:51 PM, Michael S. Tsirkin wrote: We can convert it to rcu indepenently of other things protected by slots_lock; no need to do everything at the same time. Yes but once we merge locks, it will be harder to split them out. I know I can now do grep bus_lock and find all plac

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Avi Kivity
On 06/29/2009 12:54 PM, Johannes Berg wrote: On Mon, 2009-06-29 at 12:08 +0300, Avi Kivity wrote: You can see where it hangs using the monitor 'info registers' and 'x/30i $eip' commands. not much luck since it doesn't hang at a specific instructi

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Avi Kivity
On 06/29/2009 12:57 PM, Johannes Berg wrote: It's actually panic'ed because it ran out of memory, but didn't print that to my vga/console/curses/... And if I add -m 512 it works just fine. Seems the default is too small for me... But why would qemu/kvm have different defaults? Both

Re: [PATCH 1/3 v2] Add Directed EOI support to APIC emulation

2009-06-29 Thread Avi Kivity
On 06/29/2009 12:52 PM, Gleb Natapov wrote: We're changing something that the guests sees. Suppose the guest has a bug in directed EOI, just upgrading kvm will cause it to trigger. If we make it dependent on x2apic (or something else that needs to be selected by the user), we maintain compatibi

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Avi Kivity
On 06/29/2009 01:00 PM, Johannes Berg wrote: Also make sure you boot with the bios provided by qemu-kvm, not some random qemu. I, uh, have no idea how to ensure that -- I'm simply using the debian kvm package. That should be a good way to ensure it. What version is it? -- error c

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Avi Kivity
On 06/29/2009 01:06 PM, Johannes Berg wrote: And if I add -m 512 it works just fine. Seems the default is too small for me... But why would qemu/kvm have different defaults? Both are 128 MB. Strange. And certainly Linux should boot in 128 MB. If I boot with -m 512 I get this:

Re: [PATCHv2] kvm: remove in_range and switch to rwsem for iobus

2009-06-29 Thread Avi Kivity
On 06/29/2009 01:06 PM, Michael S. Tsirkin wrote: 2. if I do it before in_range removal it's a lot of churn: one of the reasons for code reorg is so that there are less places to change locking. I don't think you really need to change anything. slots_lock is already taken (except whe

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Avi Kivity
On 06/29/2009 01:18 PM, Johannes Berg wrote: If I boot with -m 512 I get this: root@(none):~# free total used free sharedbuffers cached Mem:378608 25196 353412 0 1012 8692 -/+ buffers/cache: 15492 363116 Swap:

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Avi Kivity
On 06/29/2009 01:32 PM, Johannes Berg wrote: Do you really have a 100MB kernel? Hmm. Maybe? text data bss dec hex filename 5635486 5482828 84287488954058025afc6ea vmlinux -rwxr-xr-x 1 johannes johannes 86242879 2009-06-29 11:31

Re: BUG: using smp_processor_id() in preemptible

2009-06-29 Thread Avi Kivity
On 06/29/2009 01:55 PM, Johannes Berg wrote: I had MAXSMP configured, which makes it 4096, but if I turn off MAXSMP and make NR_CPUS 8, then I get text data bss dechex filename 5594521 2562924 127262722088371713ea905 vmlinux 12MB bs

Re: KVM: init bsp_vcpu before kvm_arch_vcpu_init

2009-06-29 Thread Avi Kivity
On 06/17/2009 04:07 PM, Marcelo Tosatti wrote: KVM: use vcpu_id instead of bsp_vcpu pointer in kvm_vcpu_is_bsp Change kvm_vcpu_is_bsp to use vcpu_id instead of bsp_vcpu pointer, which is only initialized at the end of kvm_vm_ioctl_create_vcpu. Applied, thanks. -- error compiling committee.

Re: [PATCHv3 0/4] kvm: locking and API rework for iosignalfd

2009-06-29 Thread Avi Kivity
On 06/29/2009 03:08 PM, Michael S. Tsirkin wrote: This series switches kvm_io_device to slots_lock from kvm->lock mutex, and uses that to rework io bus API. This takes less locks on data path, and uses less lines of code. These changes will also be useful to serve as basis for Greg's iosignalfd w

Problems on AMD laptops

2009-06-29 Thread Avi Kivity
kerneloops.org shows tons of oopses on amd, see http://www.kerneloops.org/oops.php?number=79008. I suspect this has to do with resuming a laptop while a guest is running. Can anyone confirm or deny? -- error compiling committee.c: too many arguments to function -- To unsubscribe from this l

[PATCH] Warn if a qcow (not qcow2) file is opened

2009-06-29 Thread Avi Kivity
The qcow block driver format is no longer maintained and likely contains serious data corruptors. Urge users to stay away for it, and advertise the new and improved replacement. Signed-off-by: Avi Kivity --- block/qcow.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff

Re: [PATCHv2] kvm: remove in_range and switch to rwsem for iobus

2009-06-29 Thread Avi Kivity
On 06/29/2009 05:06 PM, Marcelo Tosatti wrote: On Sun, Jun 28, 2009 at 10:34:25PM +0300, Michael S. Tsirkin wrote: This changes bus accesses to use high-level kvm_io_bus_read/kvm_io_bus_write functions, which utilize read/write semaphore intead of mutex. in_range now becomes unused so it is

Re: Problems on AMD laptops

2009-06-29 Thread Avi Kivity
On 06/29/2009 05:39 PM, Joerg Roedel wrote: On Mon, Jun 29, 2009 at 04:41:17PM +0300, Avi Kivity wrote: kerneloops.org shows tons of oopses on amd, see http://www.kerneloops.org/oops.php?number=79008. I suspect this has to do with resuming a laptop while a guest is running. Can anyone

Re: VGA pass-through

2009-06-29 Thread Avi Kivity
On 06/30/2009 09:16 AM, Han, Weidong wrote: Subash Kalbarga wrote: Hi I am using kvm-86 on 2.6.28 and I am able to pass through most of my PCI devices successfully. However, I do not see even the KVM BIOS output if I pass through my VGA adapter. I am doing -vga none, -nographic and -pcidevi

Re: guest gettimeofday behavior

2009-06-29 Thread Avi Kivity
On 06/29/2009 10:11 PM, Eran Rom wrote: Nevertheless, the tsc clock is not reliable, the host can scale it, or go into deep sleep state. indeed my current clock source is tsc You won't get accurate timing with tsc. So either use newer kernel with kvmclock (pv) or change the clock

Re: [PATCH] add KVM module parameters documentation

2009-06-30 Thread Avi Kivity
On 06/30/2009 03:54 PM, Andre Przywara wrote: Signed-off-by: Andre Przywara diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index d77fbd8..097ea9f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -57,6 +5

Re: [Qemu-devel] [PATCH] Warn if a qcow (not qcow2) file is opened

2009-06-30 Thread Avi Kivity
On 06/30/2009 04:32 PM, Anthony Liguori wrote: Kevin Wolf wrote: Avi Kivity schrieb: The qcow block driver format is no longer maintained and likely contains serious data corruptors. Urge users to stay away for it, and advertise the new and improved replacement. Signed-off-by: Avi Kivity

Re: Newbie, struggling with graphics and qemu monitor

2009-06-30 Thread Avi Kivity
On 06/30/2009 06:35 PM, Michael Jinks wrote: Hi List. I'm taking my first look at KVM, using version 85, on a Gentoo system with kernel release 2.6.29. The gist of my problem right now is that I can't figure out how to access the monitor, and I've tried various things with no luck so far. My f

Re: [PATCH v3] enable x2APIC without interrupt remapping under KVM

2009-06-30 Thread Avi Kivity
On 06/30/2009 07:44 PM, Eric W. Biederman wrote: To support that seriously you need interrupt remapping. Can you explain why? Because ioapics don't fully function according to spec, and the interrupt code on the hotplug path is a horrible terrible broken hack for ioapics. It is

Re: [PATCH v4] enable x2APIC without interrupt remapping under KVM

2009-06-30 Thread Avi Kivity
On 06/30/2009 08:00 PM, Eric W. Biederman wrote: Gleb Natapov writes: On Tue, Jun 30, 2009 at 12:18:19AM -0700, Yinghai Lu wrote: how about kexec second kernel in KVM ? x2apic_preenabled will be set in second kernel. By the way anybody knows why kexec does not use BIOS re

Re: [PATCH v3] enable x2APIC without interrupt remapping under KVM

2009-06-30 Thread Avi Kivity
On 06/30/2009 10:08 PM, Eric W. Biederman wrote: Can you elaborate? For kvm guests, the hardware is reasonably will implemented and if not we will fix it. We need not cripple a feature just because some hardware is broken. The short version is I don't know what work arounds we will ulti

Re: pci_stub and kvm

2009-07-01 Thread Avi Kivity
On 07/01/2009 07:18 AM, Yinghai Lu wrote: [ 1966.343286] [ 1966.343288] === [ 1966.356756] [ INFO: possible circular locking dependency detected ] [ 1966.356759] 2.6.31-rc1-tip-00978-g99123e5-dirty #438 [ 1966.356761] ---

Re: [PATCHv5 0/6] kvm: locking and API rework for iosignalfd

2009-07-01 Thread Avi Kivity
On 06/29/2009 10:23 PM, Michael S. Tsirkin wrote: This series switches kvm_io_device to slots_lock from kvm->lock mutex, and uses that to rework io bus API. This takes less locks on data path, and uses less lines of code. These changes will also be useful to serve as basis for Greg's iosignalfd w

Re: [PATCH] KVM: fix lock imbalance

2009-07-01 Thread Avi Kivity
On 06/29/2009 07:05 PM, Jiri Slaby wrote: There is a missing unlock on one fail path in ioapic_mmio_write, fix that. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message t

Re: [PATCH] KVM: Fix IA32e Windows can't boot issue

2009-07-01 Thread Avi Kivity
On 07/01/2009 11:07 AM, Sheng Yang wrote: One typo in commit: "KVM: convert custom marker based tracing to event traces" caused: set_cr8: #GP, reserved bits 0x7f when try to boot up IA32e Windows guest. One value has been written to R8 instead of specific register, then the value of specific r

Re: [PATCH v3] enable x2APIC without interrupt remapping under KVM

2009-07-01 Thread Avi Kivity
On 06/30/2009 10:36 PM, Eric W. Biederman wrote: The short version is I don't know what work arounds we will ultimately decide to deploy to work with real hardware. I have been seriously contemplating causing a cpu hot-unplug request to fail if we are in ioapic mode and we have irqs routed to th

Re: Newbie, struggling with graphics and qemu monitor

2009-07-01 Thread Avi Kivity
On 06/30/2009 09:33 PM, Michael Jinks wrote: In an attempt to get past unrelated interference I just set up an X session with only an xterm, used that to launch VNC connecting to my KVM test host, and tried to launch my test guest again. Same behavior: Ctl-Alt patterns are ignored, as are any ot

Re: [KVM PATCH v7 0/5] irqfd fixes and enhancements

2009-07-01 Thread Avi Kivity
On 06/29/2009 09:28 PM, Gregory Haskins wrote: (Applies to kvm.git/master:4631e094) The following is the latest attempt to fix the races in irqfd/eventfd, as well as restore DEASSIGN support. For more details, please read the patch headers. I've restored the slow-work variant of the logic as a

Re: Exception handling between QEMU and KVM

2009-07-01 Thread Avi Kivity
On 07/01/2009 06:28 AM, Christoffer Dall wrote: Hi all. We are still working on our ARM port of KVM and we are managing to let the guest decompress the kernel image and run from relocated address and we can support enabling MMU before this. Howver, to debug relocated micro-hypervisor for except

Re: KVM and 32-bit hosts -- still supposed to work?

2009-07-01 Thread Avi Kivity
On 07/01/2009 08:57 AM, Duck wrote: I'm on 32-bit Linux, kernel 2.6.27.7-smp. When I moved from kvm-83 to kvm-87 plus kvm-kmod-devel-87, my Linux host VMs ran fine. But my XP0 host simply ran too slowly to be useable at all, and my Windows 7 host wouldn't boot -- just crashed and restarted earl

Re: BUG Report: "config KVM" selects PREEMPT_NOTIFIERS, but it should also select PREEMPT (Vanilla Kernel 2.6.30)

2009-07-01 Thread Avi Kivity
On 06/29/2009 06:18 PM, Walther Maldonado wrote: Good day, Today when attempting to compile and install the KVM module (kernel 2.6.30), inserting the module would error with a number of unresolved symbols such as preempt_notifier_register() not found. Some code-browsing revealed that, even th

Re: [KVM PATCH v6 3/4] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-07-01 Thread Avi Kivity
On 06/29/2009 07:52 PM, Gregory Haskins wrote: One idea I had to make it even clearer was to have a shutdown list of irqfds per-kvm, together with the items list, and make work_struct for shutdown global, not per-irqfd. We can then unconditionally do list_move + schedule_work to shut down a

Re: [PATCH] qemu-kvm: fix KVMs GET_SUPPORTED_CPUID feature usage

2009-07-01 Thread Avi Kivity
On 06/25/2009 04:12 PM, Andre Przywara wrote: If we want to trim the user provided CPUID bits for KVM to be not greater than that of the host, we should a) not remove the bits _after_ we sent them to the kernel and b) not do the bitmangling on the original values while sending a copy This fixes

Re: [PATCH 3/4] ignore PCI ECS I/O enablement

2009-07-01 Thread Avi Kivity
On 06/24/2009 04:37 PM, Andre Przywara wrote: Linux guests will try to enable access to the extended PCI config space via the I/O ports 0xCF8/0xCFC on AMD Fam10h CPU. Since we (currently?) don't use ECS, simply ignore write and read attempts. Applied, thanks. -- error compiling committee.c

Re: Newbie, struggling with graphics and qemu monitor

2009-07-01 Thread Avi Kivity
On 07/01/2009 04:56 PM, Michael Jinks wrote: (Thanks Avi, and all. Sorry if my questions are basic. More of them below.) On Wed, Jul 1, 2009 at 3:43 AM, Avi Kivity wrote: On 06/30/2009 09:33 PM, Michael Jinks wrote: I've looked but haven't found any way to attach

Re: Exception handling between QEMU and KVM

2009-07-01 Thread Avi Kivity
On 07/01/2009 04:59 PM, Christoffer Dall wrote: OK, my question is this: If I want to tell QEMU to quit from within the KVM_RUN ioctl in a way that causes QEMU to exit gracefully (e.g. free any allocated memory etc.) what is the way to do that? Have KVM_RUN return -ESOMETHING, qemu should

Re: KVM and 32-bit hosts -- still supposed to work?

2009-07-01 Thread Avi Kivity
On 07/01/2009 02:38 PM, Alexander Graf wrote: kvm is supported on 32-bit hosts. Unfortunately since moving to kvm-autotest I no longer test on 32-bit, I'll try to improve the situation there. If someone has spare cycles and can run kvm-autotest on their hardware, that would improve kvm quali

Re: [PATCH] Update registers after INIT/SIPI

2009-07-01 Thread Avi Kivity
On 07/01/2009 06:48 PM, Gleb Natapov wrote: Load updated register into kernel after INIT/SIPI. Otherwise vcpu starts at the wrong address after SIPI. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscrib

Re: [Autotest] [KVM-AUTOTEST PATCH] Adding iperf test

2009-07-01 Thread Avi Kivity
On 07/01/2009 07:18 PM, Martin Bligh wrote: On Wed, Jul 1, 2009 at 8:57 AM, Lucas Meneghel Rodrigues wrote: On Wed, 2009-07-01 at 14:43 +0300, Alexey Eremenko wrote: LMR: me too, hate putting binaries in source tree, but the alternative option is to provide separate *.tar.bz2 for al

Re: slow guest performance with build load, looking for ideas

2009-07-01 Thread Avi Kivity
On 07/02/2009 12:41 AM, Erik Jacobson wrote: I wanted to post in to the thread the lastest test run. Avi Kivity provided some ideas to try. I had mixed luck. I'd like to try this again if we have any thoughts on the vpid/ept issue, or any other ideas for drilling down on this. Avi K

Re: [Autotest] [KVM-AUTOTEST PATCH] Adding iperf test

2009-07-02 Thread Avi Kivity
On 07/01/2009 08:16 PM, Martin Bligh wrote: Is KVM x86_64 only? It's x86-64, i386, ia64, s390, and powerpc 44x/e500 only. OK, then it's difficult to see using binaries? Can we not compile these on the system at use time (see the client/deps directory for other stuff we do this f

Re: slow guest performance with build load, looking for ideas

2009-07-02 Thread Avi Kivity
On 07/02/2009 08:48 AM, Avi Kivity wrote: HOST time (make -j12&& make -j12 modules) with no guest running real6m50.936s user29m12.051s sys5m50.867s 35 minutes cpu run on 7 minutes real time, so scaling 1:

Re: target-i386/kvm.c vs. qemu-kvm-x86.c

2009-07-02 Thread Avi Kivity
On 07/02/2009 01:05 PM, Andre Przywara wrote: Hi, the lastest qemu -> qemu-kvm sync pulled the kvm_trim_features() function from QEMU's target-i386/kvm.c into the qemu-kvm tree, where it is already defined in qemu-kvm-x86.c (which does not exist in qemu.git). AFAICS qemu-kvm only uses the las

Re: [PATCH] Fix KVM CPU check in configure

2009-07-02 Thread Avi Kivity
On 06/29/2009 07:21 PM, Jan Kiszka wrote: Signed-off-by: Jan Kiszka --- Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo in

Re: [PATCH 1/2] KVM/PPC: Fix PPC KVM e500_tlb.c build error

2009-07-02 Thread Avi Kivity
On 07/02/2009 06:09 AM, Liu Yu-B13201 wrote: This fix is already accepted in kvm.git What about the other? Is it needed? -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@

Re: [PATCH] qemu-kvm: fix typo in configure

2009-07-02 Thread Avi Kivity
On 07/01/2009 02:27 PM, Michael S. Tsirkin wrote: Kill extra \). Also escape ! for clarity and bourne shell compatibility. I applied a similar fix from Jan. # Make sure the target and host cpus are compatible -if test ! \( "$target_cpu" = "$cpu" -o \ +if test \! \( "$target_cpu" = "$cp

Re: [PATCH] Fix up device assignment hotplug and re-enable it

2009-07-02 Thread Avi Kivity
On 07/01/2009 07:22 PM, Markus Armbruster wrote: Disabled in merge commit a3b371477e3. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org M

Re: [PATCH] Fix up ipf.c for recent merges

2009-07-02 Thread Avi Kivity
On 07/01/2009 07:24 PM, Markus Armbruster wrote: Commit 42f0a928 merged support for addr=... in option argument of -net nic, but failed to update ipf_init1(). Commit 7a8f3ed9 merged support for addr=... in option argument of -drive if=virtio, but failed to update ipf_init1(). Untested. Ap

Re: [PATCH] qemu-kvm: fix migration with virtio-net

2009-07-02 Thread Avi Kivity
On 07/02/2009 03:20 PM, Michael S. Tsirkin wrote: Fix up loadvm versioning logic: vnet header should be checked for any version>= 7, not just for version 7. Without this patch, migration is broken on qemu-kvm. Note that qemu.git gets it right. Applied, thanks. -- error compiling committee

Re: [KVM PATCH v8 3/3] KVM: create irqfd-cleanup-wq on demand

2009-07-02 Thread Avi Kivity
On 07/01/2009 07:09 PM, Gregory Haskins wrote: We currently create this wq on module_init, which may be wasteful if the host never creates a guest that uses irqfd. This patch changes the algorithm so that the workqueue is only created when at least one guest is using irqfd. The queue is cleaned

Re: [KVM PATCH v8 1/3] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-07-02 Thread Avi Kivity
On 07/02/2009 05:27 PM, Gregory Haskins wrote: Please split the eventfd.c hunk into a separate patch. When preparing the 2.6.32 submission, I'll fold that into the patch into its antipatch and they'll disappear. Ok, but note that that means I should probably split 1/3 back out into

Re: [KVM PATCH v8 1/3] KVM: Fix races in irqfd using new eventfd_kref_get interface

2009-07-02 Thread Avi Kivity
On 07/01/2009 07:09 PM, Gregory Haskins wrote: eventfd currently emits a POLLHUP wakeup on f_ops->release() to generate a "release" callback. This lets eventfd clients know if the eventfd is about to go away and is very useful particularly for in-kernel clients. However, until recently it is no

Re: [KVM PATCH v9 0/5] irqfd fixes and enhancements

2009-07-02 Thread Avi Kivity
On 07/02/2009 06:37 PM, Gregory Haskins wrote: (Applies to kvm.git/master:1f9050fd) The following is the latest attempt to fix the races in irqfd/eventfd, as well as restore DEASSIGN support. For more details, please read the patch headers. As always, this series has been tested against the kv

Re: [PATCH v5] enable x2APIC without interrupt remapping under KVM

2009-07-04 Thread Avi Kivity
On 07/03/2009 11:29 AM, Ingo Molnar wrote: Now, since this affects core x86 APIC code non-trivially so should submitted to and go via the x86 tree. (Can prepare a special branch with just this change if KVM tree wants/needs to pull it before v2.6.32.) The kvm tree won't depend on this chang

Re: [PATCH] qemu-kvm: remove "KVM misreports CPUID" hack

2009-07-04 Thread Avi Kivity
On 07/03/2009 03:23 PM, Andre Przywara wrote: This should be no longer necessary. Effectively reverts 143eb2bd043e82bcf353cf82d33c127f06411d82. Signed-off-by: Andre Przywara --- kvm/libkvm/libkvm-x86.c |9 - qemu-kvm-x86.c |9 - 2 files changed, 0 insertions(

Re: [RFC] allow multi-core guests: introduce cores= option to -cpu

2009-07-04 Thread Avi Kivity
On 07/03/2009 05:41 PM, Andre Przywara wrote: Hi, currently SMP guests happen to see vCPUs as different sockets. Some guests (Windows comes to mind) have license restrictions and refuse to run on multi-socket machines. So lets introduce a "cores=" parameter to the -cpu option to let the user s

Re: [PATCH v5] enable x2APIC without interrupt remapping under KVM

2009-07-04 Thread Avi Kivity
On 07/05/2009 03:22 AM, Eric W. Biederman wrote: Gleb Natapov writes: Therefore I don't see the point of supporting one without the other. x2apic provide us with other benefits as commit message explains, and doesn't add any problems that we don't have now already. If this

Re: Using MSR Load/Store Areas

2009-07-05 Thread Avi Kivity
On 07/04/2009 12:42 AM, Sehrawat Nipun wrote: Hi Everyone, I am trying to use the MSR load and store areas in vmx. I did following: 1. Setting vm_entry_msr_load_count: vmcs_write32(VM_ENTRY_MSR_LOAD_COUNT, 1); 2. Setting up vm_entry_msr_load_addr : static struct page *vmx_msr_load; Then in

<    1   2   3   4   5   6   7   8   9   10   >