![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package kvm for openSUSE:Factory checked in at Mon Sep 19 22:54:34 CEST 2011. -------- --- kvm/kvm.changes 2011-08-26 00:25:05.000000000 +0200 +++ /mounts/work_src_done/STABLE/kvm/kvm.changes 2011-09-16 00:44:48.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Sep 15 19:47:54 UTC 2011 - brogers@suse.com + +- take advantage of Transparent Huge Pages on host +- include sgabios.bin + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- kvm-qemu-preXX-ui-avoid-deprecated-gnutls_-_set_priority-functions.patch New: ---- kvm-qemu-madvise-hugepages.patch kvm-qemu-preXX-qemu_vmalloc-align-properly-for-transparent-hugepag.patch kvm-qemu-preXX-vns-tls-don-t-use-depricated-gnutls-functions.patch sgabios.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kvm.spec ++++++ --- /var/tmp/diff_new_pack.K1q41Y/_old 2011-09-19 22:54:24.000000000 +0200 +++ /var/tmp/diff_new_pack.K1q41Y/_new 2011-09-19 22:54:24.000000000 +0200 @@ -25,10 +25,12 @@ %define bios_id seabios-git-8e30147 %define pxe_rom_id ipxe-git-149b502 %define vgabios_id vgabios-0.6c +# sgabios comes from: http://sgabios.googlecode.com/svn/trunk, Rev 8 +%define sgabios_id sgabios # note that this list doesn't include the ipxe roms since they get handled # individually and not as a group -%define firmware_files {bios.bin vgabios.bin vgabios-cirrus.bin vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin optionrom/extboot.bin optionrom/linuxboot.bin optionrom/multiboot.bin optionrom/vapic.bin} +%define firmware_files {bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin optionrom/extboot.bin optionrom/linuxboot.bin optionrom/multiboot.bin optionrom/vapic.bin} ExclusiveArch: %ix86 x86_64 ia64 s390x @@ -96,6 +98,7 @@ Source7: %{pxe_rom_id}.tar.bz2 Source8: bcc-0.16.17-2.i486.rpm Source9: %{vgabios_id}.tar.bz2 +Source10: %{sgabios_id}.tar.bz2 # common and X86 patches Patch01: ipxe-rom-settings.patch Patch02: seabios-sanitize-version.patch @@ -112,7 +115,9 @@ Patch101: kvm-qemu-preXX-dictzip2.patch Patch102: kvm-qemu-preXX-report-default-mac-used.patch Patch103: kvm-qemu-preXX-console.patch -Patch104: kvm-qemu-preXX-ui-avoid-deprecated-gnutls_-_set_priority-functions.patch +Patch104: kvm-qemu-preXX-vns-tls-don-t-use-depricated-gnutls-functions.patch +Patch105: kvm-qemu-preXX-qemu_vmalloc-align-properly-for-transparent-hugepag.patch +Patch106: kvm-qemu-madvise-hugepages.patch Patch155: qemu-kvm-common-code-fixes-for-s390-build.patch @@ -178,7 +183,7 @@ %setup -q -T -D -n %{pxe_rom_id} -b 7 %patch01 -p1 %endif -%setup -q -n qemu-%{name}-%{package_true_version} -a 6 -a 9 +%setup -q -n qemu-%{name}-%{package_true_version} -a 6 -a 9 -a 10 %if %{build_fw_from_source} #ensure that we only end up with the ones we built for i in %firmware_files @@ -201,6 +206,8 @@ %patch102 -p1 %patch103 -p1 %patch104 -p1 +%patch105 -p1 +%patch106 -p1 %patch155 -p1 @@ -300,6 +307,10 @@ make -C roms/seabios %{?jobs:-j%jobs} cp roms/seabios/out/bios.bin pc-bios/bios.bin +make -C roms/sgabios +#make -C roms/sgabios %{?jobs:-j%jobs} +cp roms/sgabios/sgabios.bin pc-bios/sgabios.bin + make -C roms/vgabios %{?jobs:-j%jobs} cp roms/vgabios/VGABIOS-lgpl-latest.bin pc-bios/vgabios.bin cp roms/vgabios/VGABIOS-lgpl-latest.cirrus.bin pc-bios/vgabios-cirrus.bin ++++++ kvm-qemu-madvise-hugepages.patch ++++++ Index: qemu-kvm-0.15.0/exec.c =================================================================== --- qemu-kvm-0.15.0.orig/exec.c +++ qemu-kvm-0.15.0/exec.c @@ -2942,6 +2942,9 @@ ram_addr_t qemu_ram_alloc_from_ptr(Devic new_block->host = qemu_vmalloc(size); qemu_madvise(new_block->host, size, QEMU_MADV_MERGEABLE); qemu_madvise(new_block->host, size, QEMU_MADV_DONTFORK); +#ifdef MADV_HUGEPAGE + qemu_madvise(new_block->host, size, MADV_HUGEPAGE); +#endif } #else fprintf(stderr, "-mem-path option unsupported\n"); @@ -2970,6 +2973,9 @@ ram_addr_t qemu_ram_alloc_from_ptr(Devic #endif qemu_madvise(new_block->host, size, QEMU_MADV_MERGEABLE); qemu_madvise(new_block->host, size, QEMU_MADV_DONTFORK); +#ifdef MADV_HUGEPAGE + qemu_madvise(new_block->host, size, MADV_HUGEPAGE); +#endif } } new_block->length = size; ++++++ kvm-qemu-preXX-qemu_vmalloc-align-properly-for-transparent-hugepag.patch ++++++
From 36b586284e678da28df3af9fd0907d2b16f9311c Mon Sep 17 00:00:00 2001 From: Avi Kivity <avi@redhat.com> Date: Mon, 5 Sep 2011 11:07:05 +0300 Subject: [PATCH] qemu_vmalloc: align properly for transparent hugepages and KVM
To make good use of transparent hugepages, KVM requires that guest-physical and host-virtual addresses share the low 21 bits (as opposed to just the low 12 bits normally required). Adjust qemu_vmalloc() to honor that requirement. Ignore it for small regions to avoid fragmentation. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- oslib-posix.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) Index: qemu-kvm-0.15.0/oslib-posix.c =================================================================== --- qemu-kvm-0.15.0.orig/oslib-posix.c +++ qemu-kvm-0.15.0/oslib-posix.c @@ -35,6 +35,13 @@ extern int daemon(int, int); #endif +#if defined(__linux__) && defined(__x86_64__) + /* Use 2MB alignment so transparent hugepages can be used by KVM */ +# define QEMU_VMALLOC_ALIGN (512 * 4096) +#else +# define QEMU_VMALLOC_ALIGN getpagesize() +#endif + #include "config-host.h" #include "sysemu.h" #include "trace.h" @@ -80,7 +87,12 @@ void *qemu_memalign(size_t alignment, si void *qemu_vmalloc(size_t size) { #ifndef __ia64__ - return qemu_memalign(getpagesize(), size); + size_t align = QEMU_VMALLOC_ALIGN; + + if (size < align) { + align = getpagesize(); + } + return qemu_memalign(align, size); #else return qemu_memalign(65536, size); #endif ++++++ kvm-qemu-preXX-vns-tls-don-t-use-depricated-gnutls-functions.patch ++++++
From f40d55081667a716312b9a8b6e13835c4074f56b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann <kraxel@redhat.com> Date: Wed, 7 Sep 2011 17:52:10 +0200 Subject: [PATCH] vns/tls: don't use depricated gnutls functions
Avoid using deprecated gnutls functions with recent gnutls versions. Fixes build failure on Fedora 16. Keep the old way for compatibility with old installations such as RHEL-5 (gnutls 1.4.x). Based on a patch from Raghavendra D Prabhu <raghu.prabhu13@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- ui/vnc-tls.c | 68 +++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 49 insertions(+), 19 deletions(-) diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c index 2e2456e..ffbd172 100644 --- a/ui/vnc-tls.c +++ b/ui/vnc-tls.c @@ -283,13 +283,57 @@ int vnc_tls_validate_certificate(struct VncState *vs) return 0; } +#if defined(GNUTLS_VERSION_NUMBER) && \ + GNUTLS_VERSION_NUMBER >= 0x020200 /* 2.2.0 */ + +static int vnc_set_gnutls_priority(gnutls_session_t s, int x509) +{ + const char *priority = x509 ? "NORMAL" : "NORMAL:+ANON-DH"; + int rc; + + rc = gnutls_priority_set_direct(s, priority, NULL); + if (rc != GNUTLS_E_SUCCESS) { + return -1; + } + return 0; +} + +#else + +static int vnc_set_gnutls_priority(gnutls_session_t s, int x509) +{ + static const int cert_types[] = { GNUTLS_CRT_X509, 0 }; + static const int protocols[] = { + GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 + }; + static const int kx_anon[] = { GNUTLS_KX_ANON_DH, 0 }; + static const int kx_x509[] = { + GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, + GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, 0 + }; + int rc; + + rc = gnutls_kx_set_priority(s, x509 ? kx_x509 : kx_anon); + if (rc != GNUTLS_E_SUCCESS) { + return -1; + } + + rc = gnutls_certificate_type_set_priority(s, cert_types); + if (rc != GNUTLS_E_SUCCESS) { + return -1; + } + + rc = gnutls_protocol_set_priority(s, protocols); + if (rc != GNUTLS_E_SUCCESS) { + return -1; + } + return 0; +} + +#endif int vnc_tls_client_setup(struct VncState *vs, int needX509Creds) { - static const int cert_type_priority[] = { GNUTLS_CRT_X509, 0 }; - static const int protocol_priority[]= { GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 }; - static const int kx_anon[] = {GNUTLS_KX_ANON_DH, 0}; - static const int kx_x509[] = {GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, 0}; VNC_DEBUG("Do TLS setup\n"); if (vnc_tls_initialize() < 0) { @@ -310,21 +354,7 @@ int vnc_tls_client_setup(struct VncState *vs, return -1; } - if (gnutls_kx_set_priority(vs->tls.session, needX509Creds ? kx_x509 : kx_anon) < 0) { - gnutls_deinit(vs->tls.session); - vs->tls.session = NULL; - vnc_client_error(vs); - return -1; - } - - if (gnutls_certificate_type_set_priority(vs->tls.session, cert_type_priority) < 0) { - gnutls_deinit(vs->tls.session); - vs->tls.session = NULL; - vnc_client_error(vs); - return -1; - } - - if (gnutls_protocol_set_priority(vs->tls.session, protocol_priority) < 0) { + if (vnc_set_gnutls_priority(vs->tls.session, needX509Creds) < 0) { gnutls_deinit(vs->tls.session); vs->tls.session = NULL; vnc_client_error(vs); -- 1.6.0.2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org