kvm: release: merge from trunk
........
r4323 | avi | 2007-01-24 15:27:48 +0200 (Wed, 24 Jan 2007) | 8 lines
kvm: fix gva_to_gpa()
gva_to_gpa() needs to be updated to the new walk_addr() calling convention,
otherwise it may oops under some circumstances.
use the opportunity to remove all the code duplication in gva_to_gpa(), which
essentially repeats the calculations in walk_addr().
........
r4324 | vitalye | 2007-01-24 15:30:38 +0200 (Wed, 24 Jan 2007) | 1 line
testing:#0
........
r4325 | odedr | 2007-01-24 15:34:09 +0200 (Wed, 24 Jan 2007) | 1 line
test commit #0
........
r4326 | odedr | 2007-01-24 15:34:31 +0200 (Wed, 24 Jan 2007) | 1 line
test commit #0
........
r4327 | vitalye | 2007-01-24 15:36:29 +0200 (Wed, 24 Jan 2007) | 1 line
test remove #0
........
r4328 | avi | 2007-01-24 15:54:36 +0200 (Wed, 24 Jan 2007) | 4 lines
kvm: vmx: handle triple faults by returning EXIT_REASON_SHUTDOWN to userspace
just like svm.
........
r4329 | dor | 2007-01-25 11:45:36 +0200 (Thu, 25 Jan 2007) | 9 lines
From Markus Rechberger <markus.rechberger@amd.com>:
This patch is a sync with the latest apic code in the qemu repository, this fixes a system crash after linux tries to set up apic after the first reboot.
Signed-off-by: Markus Rechberger <markus.rechberger@amd.com>
I only changed the apic version_id the register_vmsave so the apic_timer will be serialized.
After the change the apic timer works after vm save/load cycle.
Was also sent to Qemu devel list.
........
r4330 | dor | 2007-01-25 14:58:29 +0200 (Thu, 25 Jan 2007) | 2 lines
Remove forgotten printf
........
r4331 | itaish | 2007-01-25 17:07:49 +0200 (Thu, 25 Jan 2007) | 6 lines
Hypercall hardware registers added.
Pci interrupt added.
hp_reset function added.
Transmitted messages (from guest to qemu) are now first accumulated and than sent to the vmchannel as one packet.
hp_ioport_read handles some status registers.
........
r4332 | itaish | 2007-01-25 17:18:00 +0200 (Thu, 25 Jan 2007) | 1 line
Missed a semicolon
........
r4333 | avi | 2007-01-28 11:54:38 +0200 (Sun, 28 Jan 2007) | 8 lines
kvm: fix asm constraint for lldt instruction
From: S.Çağlar Onur <caglar@pardus.org.tr>
lldt does not accept immediate operands, which "g" allows.
Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
........
r4334 | uri | 2007-01-28 12:35:16 +0200 (Sun, 28 Jan 2007) | 6 lines
qemu migration: send number-of-pages once in the header (#152)
If done in migration_ram_send, when the memory it to be sent a few times (only
dirty pages after the first round) the number-of-pages would be sent
a few times too.
........
r4335 | uri | 2007-01-28 13:35:38 +0200 (Sun, 28 Jan 2007) | 7 lines
qemu migration: add param to migration_ram_send() to send the whole ram (#152)
While online, only chunks (some pages) of ram would be sent.
While offline, the whole ram is to be transferred.
Also removed a redundant if, covered by the for below it.
........
r4336 | avi | 2007-01-28 13:47:10 +0200 (Sun, 28 Jan 2007) | 5 lines
kvm: implement smp_call_function_single() for external modules
older kernels don't export smp_call_function_single(), so fake one for
external module users.
........
r4337 | avi | 2007-01-28 13:50:41 +0200 (Sun, 28 Jan 2007) | 5 lines
kvm: add a global list of all virtual machines
this will allow us to iterate over all vcpus and see which cpus they are
running on.
........
r4338 | avi | 2007-01-28 13:56:13 +0200 (Sun, 28 Jan 2007) | 8 lines
kvm: vmx: add vcpu_clear()
like the inline code it replaces, this function decaches the vmcs from the cpu
it last executed on. in addition:
- vcpu_clear() works if the last cpu is also the cpu we're running on
- it is faster on larger smps by virtue of using smp_call_function_single()
........
r4339 | uri | 2007-01-28 14:03:35 +0200 (Sun, 28 Jan 2007) | 6 lines
qemu migration: send ram in phase 1 only for online migration (#152)
For offline migration we need to send the whole ram on phase 3 anyways.
Also, after a chunk of pages is sent let the guest run (yield "migration cpu").
Also, for now, if kvm kernel modules are used, make it an offline migration.
........
r4340 | avi | 2007-01-28 14:09:51 +0200 (Sun, 28 Jan 2007) | 6 lines
kvm: cpu hotplug support
on hotplug, we execute the hardware extension enable sequence.
on unplug, we decache any vcpus that last ran on the exiting cpu, and
execute the hardware extension disable sequence.
........
r4341 | avi | 2007-01-28 14:17:46 +0200 (Sun, 28 Jan 2007) | 5 lines
kvm: host suspend/resume support
add the necessary callbacks to suspend and resume a host running kvm. this
is just a repeat of the cpu hotplug/unplug work.
........
r4342 | uri | 2007-01-28 14:37:09 +0200 (Sun, 28 Jan 2007) | 4 lines
qemu migration: mark all pages as dirty on phase 1, and send only dirty pages
Also skip special address range (from 0xa0000 to 0xc0000) only if kvm_allowed.
........
r4343 | uri | 2007-01-28 14:51:57 +0200 (Sun, 28 Jan 2007) | 5 lines
qemu migration: use special marker to indicate end of ram transfer (#152)
Also, when receiving a page, get the page number only if that special marker
was not received.
........
r4344 | avi | 2007-01-28 15:01:55 +0200 (Sun, 28 Jan 2007) | 6 lines
kvm: fix what looks like an obvious typo in the file drivers/kvm/svm.c
From: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
........
r4345 | uri | 2007-01-28 15:09:22 +0200 (Sun, 28 Jan 2007) | 7 lines
qemu migration: add ram_save/ram_load to QEMUFile (#152)
As a part of QEMUFile, the "appropriate" ram_save/ram_load function is called:
- When saving/loading to/from a file the whole ram is saved/loaded
- When migrating, only send/recv dirty pages (for offline migration
all the ram pages are dirty).
........
r4346 | uri | 2007-01-28 15:41:11 +0200 (Sun, 28 Jan 2007) | 4 lines
qemu migration: let the user know if offline migration is done while online requested (#152)
Also add missing curly braces (forgotten in rev 4339)
........
r4347 | itaish | 2007-01-28 19:07:56 +0200 (Sun, 28 Jan 2007) | 1 line
txbuffer use a static buffer
........
r4348 | avi | 2007-01-29 13:47:30 +0200 (Mon, 29 Jan 2007) | 6 lines
kvm: fix mmu going crazy of guest sets cr0.wp == 0
the kvm mmu relies on cr0.wp being set even if the guest does not set it. the
vmx code correctly forces cr0.wp at all times, the svm code does not, so it
can't boot solaris without this patch.
........
r4349 | avi | 2007-01-29 14:02:45 +0200 (Mon, 29 Jan 2007) | 2 lines
kvm: mmu testsuite: start testsuite at the beginning
........
r4350 | avi | 2007-01-29 14:05:18 +0200 (Mon, 29 Jan 2007) | 4 lines
kvm: svm: hack initial cpu csbase to be consistent with intel
this allows us to run the mmu testsuite on amd.
........
r4351 | dor | 2007-01-29 14:43:53 +0200 (Mon, 29 Jan 2007) | 6 lines
Apic synchonization - the right way:
Instead of sync the cr8 only for 64bit mode while exiting to qemu from kvm, do it in the other direction too (qemu -> kvm).
This way it can always be done even if the cr8 is unsued, thus on qemu->kvm the cr8 is copied to the tpr and on qemu->kvm the tpr is copied to cr8.
Thanks for Yaniv Kamay for the idea.
........
r4352 | avi | 2007-01-29 15:57:51 +0200 (Mon, 29 Jan 2007) | 2 lines
kvm: workaround for 2.6.20 and below with !CONFIG_HOTPLUG_CPU
........
r4353 | dor | 2007-01-29 16:08:27 +0200 (Mon, 29 Jan 2007) | 7 lines
Add Linux hypercall driver.
It's a device that will match the emulation in Qemu.
The motivation is to have a communication channel between the host and the guest.
The driver uses PCI in order to be loaded automatically by the OS.
Soon a balloon driver will be added and will use this mechanism.
........
r4354 | dor | 2007-01-29 16:12:35 +0200 (Mon, 29 Jan 2007) | 2 lines
Run dos2unix on the file
........
r4355 | avi | 2007-01-29 17:26:35 +0200 (Mon, 29 Jan 2007) | 4 lines
kvm: vmx: reload ds and es even in 64-bit mode
or 32-bit userspace will get confused.
........
r4356 | avi | 2007-01-29 17:36:06 +0200 (Mon, 29 Jan 2007) | 4 lines
kvm: fix mismatch between 32-bit and 64-bit abi
unfortunately requiring a version bump.
........
r4357 | dor | 2007-01-30 09:58:06 +0200 (Tue, 30 Jan 2007) | 4 lines
Change the API version to 3.
Thanks for Gregory Haskins for pointing it out.
........
r4358 | itaish | 2007-01-30 13:57:32 +0200 (Tue, 30 Jan 2007) | 1 line
Longer hypercall messages support, from 0x50 to 0xE0
........
r4359 | avi | 2007-01-30 14:37:51 +0200 (Tue, 30 Jan 2007) | 4 lines
kvm: web: remove
wiki forever.
........
r4360 | avi | 2007-01-30 14:58:40 +0200 (Tue, 30 Jan 2007) | 12 lines
kvm: fix vcpu_clear() bug
From: Ingo Molnar <mingo@elte.hu>
if vcpu_clear() is called on a not yet run vcpu then vcpu->cpu will be
-1. Check this case and dont call smp_call_function_single(-1).
this patch fixes the crash i reported earlier and -trunk now works fine
on a 32-bit SMP host.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
........
r4361 | avi | 2007-01-30 14:59:57 +0200 (Tue, 30 Jan 2007) | 11 lines
kvm: fix vcpu freeing bug
From: Ingo Molnar <mingo@elte.hu>
vcpu_load() can return NULL and it sometimes does in failure paths (for
example when the userspace ABI version is too old) - causing a
preemption count underflow in the ->vcpu_free() later on. So check for
NULL.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
........
r4362 | avi | 2007-01-30 15:01:29 +0200 (Tue, 30 Jan 2007) | 9 lines
kvm: qemu: fix configure defaults
From: Ingo Molnar <mingo@elte.hu>
i always found it weird that the Qemu version that comes with KVM has
kqemu enabled on x86 and x86_64 by default but not KVM ;-) Fix this.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
........
r4363 | avi | 2007-01-30 15:40:35 +0200 (Tue, 30 Jan 2007) | 2 lines
kvm: fix compat register_cpu_notifier() stub
........
r4364 | avi | 2007-01-30 16:43:20 +0200 (Tue, 30 Jan 2007) | 28 lines
kvm: vmx: Fix register constraint in launch code
From: Herbert Xu <herbert@gondor.apana.org.au>
Both "=r" and "=g" breaks my build on i386:
$ make
CC [M] drivers/kvm/vmx.o
{standard input}: Assembler messages:
{standard input}:3318: Error: bad register name `%sil'
make[1]: *** [drivers/kvm/vmx.o] Error 1
make: *** [_module_drivers/kvm] Error 2
The reason is that setbe requires an 8-bit register but "=r" does not
constrain the target register to be one that has an 8-bit version on
i386.
According to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10153
the correct constraint is "=q".
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[pulled from git]
........
23 files changed: