From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcEdp-0000Nq-HK for qemu-devel@nongnu.org; Tue, 02 Feb 2010 04:01:49 -0500 Received: from [199.232.76.173] (port=34890 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcEdo-0000Mu-Po for qemu-devel@nongnu.org; Tue, 02 Feb 2010 04:01:48 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcEdl-0001wI-Bv for qemu-devel@nongnu.org; Tue, 02 Feb 2010 04:01:48 -0500 Received: from goliath.siemens.de ([192.35.17.28]:19148) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NcEdk-0001ss-JG for qemu-devel@nongnu.org; Tue, 02 Feb 2010 04:01:45 -0500 From: Jan Kiszka Date: Tue, 2 Feb 2010 09:18:46 +0100 Message-Id: Subject: [Qemu-devel] [PATCH 00/21] qemu-kvm: Hook cleanups and extended use of upstream code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity , Marcelo Tosatti Cc: Anthony Liguori , Glauber Costa , Alexander Graf , kvm@vger.kernel.org, qemu-devel@nongnu.org Let's start with the overall stats: 31 files changed, 274 insertions(+), 822 deletions(-) So this series drops far more than 500 lines of redundant code, moving qemu-kvm yet a bit closer to upstream. The other highlight is the simplification of synchronization between in-kernel and user space VCPU states. This area used to call a lot of problems in the past because it was tricky to get things right, specifically during the multi-threaded startup. The new approach pushes all the sync work around reset and vmsave/load into generic code, not only removing the burden from developers of, say, in-kernel APIC support, but also dropping most of our kvm-specific hooks, especially in the qemu-kvm tree. While I tested this on various VMs around, and things look good so far, I wouldn't be surprised if there are some regressions remaining, specifically in the non-x86 parts that I wasn't able to test or even build. Please have a careful look! Regarding the organization of the series: Patches prefixed with "KVM:" are for upstream, unmodified or with only minor adjustments. But I have a separate series against uq/master here that just needs final polishing and can then be rolled out as well. You can pull this series from git://git.kiszka.org/qemu-kvm.git queues/vcpu-state There are two more items on my to-do list, yet with medium prio: o switch kvm_arch_save/load_regs and sub-functions to upstream code o drop qemu-kvm's slot management in favor of upstream's implementation Jan Kiszka (21): qemu-kvm: Drop vmport changes KVM: Make vmport KVM-compatible qemu-kvm: Clean up register access API KVM: x86: Fix up misreported CPU features qemu-kvm: Use upstream kvm_enabled and cpu_synchronize_state qemu-kvm: Use upstream kvm_setup_guest_memory qemu-kvm: Use some more upstream prototypes qemu-kvm: Use upstream kvm_arch_get_supported_cpuid qemu-kvm: Use upstream kvm_pit_in_kernel KVM: Move and rename regs_modified KVM: Rework of guest debug state writing qemu-kvm: Use upstream kvm_vcpu_dirty qemu-kvm: Use upstream guest debug code qemu-kvm: Rework VCPU state writeback API qemu-kvm: Clean up mpstate synchronization KVM: x86: Restrict writeback of VCPU state qemu-kvm: Use VCPU event state for reset and vmsave/load qemu-kvm: Cleanup/fix TSC and PV clock writeback qemu-kvm: Clean up KVM's APIC hooks qemu-kvm: Move kvm_set_boot_cpu_id qemu-kvm: Bring qemu_init_vcpu back home cpu-defs.h | 2 +- exec.c | 17 -- hw/apic.c | 47 +----- hw/i8254.c | 6 +- hw/i8259.c | 2 +- hw/ioapic.c | 2 +- hw/msix.c | 3 +- hw/pc.c | 13 +-- hw/pcspk.c | 4 +- hw/piix_pci.c | 2 +- hw/ppc_newworld.c | 3 - hw/ppc_oldworld.c | 3 - hw/s390-virtio.c | 1 - hw/vmport.c | 14 +-- kvm-all.c | 51 +++--- kvm.h | 35 +++-- qemu-kvm-ia64.c | 6 +- qemu-kvm-x86.c | 415 +++++++++---------------------------------------- qemu-kvm.c | 159 +++---------------- qemu-kvm.h | 158 +------------------ savevm.c | 4 + sysemu.h | 4 + target-i386/cpu.h | 9 +- target-i386/helper.c | 2 + target-i386/kvm.c | 61 +++++-- target-i386/machine.c | 27 ---- target-ia64/machine.c | 5 +- target-ppc/kvm.c | 2 +- target-ppc/machine.c | 4 - target-s390x/kvm.c | 3 +- vl.c | 32 ++++- 31 files changed, 274 insertions(+), 822 deletions(-)