diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/qemu-kvm/65-kvm.rules | 2 | ||||
-rw-r--r-- | system/qemu-kvm/README | 2 | ||||
-rw-r--r-- | system/qemu-kvm/patches/deprecate-time-drift-fix.patch | 150 | ||||
-rw-r--r-- | system/qemu-kvm/patches/fixup_udev_rules.patch | 7 | ||||
-rw-r--r-- | system/qemu-kvm/qemu-kvm.SlackBuild | 38 | ||||
-rw-r--r-- | system/qemu-kvm/qemu-kvm.info | 6 |
6 files changed, 27 insertions, 178 deletions
diff --git a/system/qemu-kvm/65-kvm.rules b/system/qemu-kvm/65-kvm.rules new file mode 100644 index 0000000000000..3c11863c57109 --- /dev/null +++ b/system/qemu-kvm/65-kvm.rules @@ -0,0 +1,2 @@ +KERNEL=="kvm", GROUP="@GROUP@", MODE="0660" +KERNEL=="vhost-net", GROUP="@GROUP@", MODE="0660" diff --git a/system/qemu-kvm/README b/system/qemu-kvm/README index 13a421d7bc70f..a2eed4379483d 100644 --- a/system/qemu-kvm/README +++ b/system/qemu-kvm/README @@ -22,4 +22,4 @@ different group, then run the SlackBuild like this: Don't forget to load the 'kvm-intel' or 'kvm-amd' module (depending on your processor) prior to running 'qemu-kvm'. -spice is an optional dependency. +spice and usbredir are optional dependencies. diff --git a/system/qemu-kvm/patches/deprecate-time-drift-fix.patch b/system/qemu-kvm/patches/deprecate-time-drift-fix.patch deleted file mode 100644 index 56def2d391a1f..0000000000000 --- a/system/qemu-kvm/patches/deprecate-time-drift-fix.patch +++ /dev/null @@ -1,150 +0,0 @@ -From d527b774878defc27f317cdde19b5c54fd0d5666 Mon Sep 17 00:00:00 2001 -From: Jan Kiszka <jan.kiszka@siemens.com> -Date: Sun, 15 Jan 2012 12:06:12 +0100 -Subject: [PATCH] qemu-kvm: Deprecate time drift fix - -Remove this divergence from upstream. It is practically unused today as -the default mode is in-kernel irqchip. We keep the command line switch -for now, adding a warning that there is no effect anymore. - -The feature can be reintroduced to upstream once we have IRQ paths with -feedback support. - -Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> -Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> ---- - hw/i8254.c | 28 ++-------------------------- - hw/i8259.c | 17 ----------------- - qemu-options.hx | 4 ++-- - vl.c | 4 ++-- - 4 files changed, 6 insertions(+), 47 deletions(-) - -diff --git a/hw/i8254.c b/hw/i8254.c -index d73a5f2..50ecceb 100644 ---- a/hw/i8254.c -+++ b/hw/i8254.c -@@ -347,11 +347,6 @@ static uint32_t pit_ioport_read(void *opaque, uint32_t addr) - return ret; - } - --/* global counters for time-drift fix */ --int64_t timer_acks=0, timer_interrupts=0, timer_ints_to_push=0; -- --extern int time_drift_fix; -- - static void pit_irq_timer_update(PITChannelState *s, int64_t current_time) - { - int64_t expire_time; -@@ -362,35 +357,16 @@ static void pit_irq_timer_update(PITChannelState *s, int64_t current_time) - expire_time = pit_get_next_transition_time(s, current_time); - irq_level = pit_get_out1(s, current_time); - qemu_set_irq(s->irq, irq_level); -- if (time_drift_fix && irq_level==1) { -- /* FIXME: fine tune timer_max_fix (max fix per tick). -- * Should it be 1 (double time), 2 , 4, 10 ? -- * Currently setting it to 5% of PIT-ticks-per-second (per PIT-tick) -- */ -- const long pit_ticks_per_sec = (s->count>0) ? (PIT_FREQ/s->count) : 0; -- const long timer_max_fix = pit_ticks_per_sec/20; -- const long delta = timer_interrupts - timer_acks; -- const long max_delta = pit_ticks_per_sec * 60; /* one minute */ -- if ((delta > max_delta) && (pit_ticks_per_sec > 0)) { -- printf("time drift is too long, %ld seconds were lost\n", delta/pit_ticks_per_sec); -- timer_acks = timer_interrupts; -- timer_ints_to_push = 0; -- } else if (delta > 0) { -- timer_ints_to_push = MIN(delta, timer_max_fix); -- } -- timer_interrupts++; -- } - #ifdef DEBUG_PIT - printf("irq_level=%d next_delay=%f\n", - irq_level, - (double)(expire_time - current_time) / get_ticks_per_sec()); - #endif - s->next_transition_time = expire_time; -- if (expire_time != -1) { -+ if (expire_time != -1) - qemu_mod_timer(s->irq_timer, expire_time); -- } else { -+ else - qemu_del_timer(s->irq_timer); -- } - } - - static void pit_irq_timer(void *opaque) -diff --git a/hw/i8259.c b/hw/i8259.c -index 7e17071..0632ea2 100644 ---- a/hw/i8259.c -+++ b/hw/i8259.c -@@ -210,9 +210,6 @@ static void pic_intack(PicState *s, int irq) - pic_update_irq(s); - } - --extern int time_drift_fix; --extern int64_t timer_acks, timer_ints_to_push; -- - int pic_read_irq(PicState *s) - { - int irq, irq2, intno; -@@ -232,20 +229,6 @@ int pic_read_irq(PicState *s) - intno = s->irq_base + irq; - } - pic_intack(s, irq); -- -- /* FIXME: limit to x86, or better, to platforms where irq0 is the -- * timer interrupts. */ -- -- if (time_drift_fix && s->master && irq == 0) { -- timer_acks++; -- if (timer_ints_to_push > 0) { -- timer_ints_to_push--; -- /* simulate an edge irq0, like the one generated by i8254 */ -- pic_set_irq(s, 0, 0); -- pic_set_irq(s, 0, 1); -- } -- } -- - } else { - /* spurious IRQ on host controller */ - irq = 7; -diff --git a/qemu-options.hx b/qemu-options.hx -index c645f87..d567ba3 100644 ---- a/qemu-options.hx -+++ b/qemu-options.hx -@@ -2633,8 +2633,8 @@ DEF("no-kvm-pit-reinjection", 0, QEMU_OPTION_no_kvm_pit_reinjection, - "-no-kvm-pit-reinjection\n" - " disable KVM kernel mode PIT interrupt reinjection\n", - QEMU_ARCH_I386) --DEF("tdf", 0, QEMU_OPTION_tdf, -- "-tdf enable guest time drift compensation\n", QEMU_ARCH_ALL) -+HXCOMM -tdf is deprecated and ignored today -+DEF("tdf", 0, QEMU_OPTION_tdf, "", QEMU_ARCH_ALL) - DEF("kvm-shadow-memory", HAS_ARG, QEMU_OPTION_kvm_shadow_memory, - "-kvm-shadow-memory MEGABYTES\n" - " allocate MEGABYTES for kvm mmu shadowing\n", -diff --git a/vl.c b/vl.c -index c009eb8..1a77de1 100644 ---- a/vl.c -+++ b/vl.c -@@ -222,7 +222,6 @@ const char *watchdog; - QEMUOptionRom option_rom[MAX_OPTION_ROMS]; - int nb_option_roms; - int semihosting_enabled = 0; --int time_drift_fix = 0; - unsigned int kvm_shadow_memory = 0; - int old_param = 0; - const char *qemu_name; -@@ -2955,7 +2954,8 @@ int main(int argc, char **argv, char **envp) - semihosting_enabled = 1; - break; - case QEMU_OPTION_tdf: -- time_drift_fix = 1; -+ fprintf(stderr, "Warning: user space PIT time drift fix " -+ "is no longer supported.\n"); - break; - case QEMU_OPTION_kvm_shadow_memory: - kvm_shadow_memory = (int64_t)atoi(optarg) * 1024 * 1024 / 4096; --- -1.7.6.5 - diff --git a/system/qemu-kvm/patches/fixup_udev_rules.patch b/system/qemu-kvm/patches/fixup_udev_rules.patch deleted file mode 100644 index 5af11df08d810..0000000000000 --- a/system/qemu-kvm/patches/fixup_udev_rules.patch +++ /dev/null @@ -1,7 +0,0 @@ -diff -Nur qemu-kvm-1.0.orig/kvm/scripts/65-kvm.rules qemu-kvm-1.0/kvm/scripts/65-kvm.rules ---- qemu-kvm-1.0.orig/kvm/scripts/65-kvm.rules 2011-12-04 04:38:06.000000000 -0600 -+++ qemu-kvm-1.0/kvm/scripts/65-kvm.rules 2012-02-21 19:22:48.449351958 -0600 -@@ -1 +1,2 @@ --KERNEL=="kvm", NAME="%k", GROUP="kvm", MODE="0660" -+KERNEL=="kvm", GROUP="@GROUP@", MODE="0660" -+KERNEL=="vhost-net", GROUP="@GROUP@", MODE="0660" diff --git a/system/qemu-kvm/qemu-kvm.SlackBuild b/system/qemu-kvm/qemu-kvm.SlackBuild index e5f6b7f898e7b..dcaddee738db6 100644 --- a/system/qemu-kvm/qemu-kvm.SlackBuild +++ b/system/qemu-kvm/qemu-kvm.SlackBuild @@ -22,7 +22,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=qemu-kvm -VERSION=${VERSION:-1.0.1} +VERSION=${VERSION:-1.1.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -70,24 +70,23 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Fixup udev rules file to remove NAME="%k" and allow use of a different group -patch -p1 < $CWD/patches/fixup_udev_rules.patch - -# Fix build on recent kernels -patch -p1 < $CWD/patches/deprecate-time-drift-fix.patch - -# Disable debug (hardcoded) and remove double CFLAGS -sed -i "s|^CFLAGS=\"-g\ |CFLAGS=\"|" configure -sed -i "s|^LDFLAGS=\"-g\ |LDFLAGS=\"|" configure +# Remove double CFLAGS sed -i "s|^\ \ CFLAGS=\"-O2\ | CFLAGS=\"|" configure -# check if spice support is enabled +# check if spice is there if pkg-config --exists spice-server ; then with_spice="--enable-spice" else with_spice="--disable-spice" fi +# check if usbredir is there +if pkg-config --exists libusbredirhost ; then + with_usbredir="--enable-usb-redir" +else + with_usbredir="--disable-usb-redir" +fi + # The script builds only the 32/64 bit x86 compatible Linux Target CPU emulator. # If you need to emulate other available architectures you should install the # "qemu" package, not the "qemu-kvm" package. This package will only be useful @@ -101,8 +100,11 @@ CFLAGS="$SLKCFLAGS" \ --enable-mixemu \ --audio-drv-list=alsa,oss,sdl,esd \ --enable-system \ + --with-confsuffix=/qemu-kvm \ + --disable-debug-info \ --target-list="x86_64-softmmu" \ - $with_spice + $with_spice \ + $with_usbredir make V=1 \ OS_CFLAGS="$SLKCFLAGS" \ @@ -117,12 +119,11 @@ make install \ # regular "qemu" package won't overwrite it. mv $PKG/usr/bin/qemu-system-x86_64 $PKG/usr/bin/qemu-kvm -# Copy a missed binary -cp -a kvm/kvm_stat $PKG/usr/bin/ +# Copy some missed binaries +cp -a scripts/kvm/{kvm_stat,kvm_flightrecorder,vmxcap} $PKG/usr/bin/ mkdir -p $PKG/lib/udev/rules.d/ -sed "s/@GROUP@/$KVMGROUP/" kvm/scripts/65-kvm.rules \ - > $PKG/lib/udev/rules.d/65-kvm.rules +sed "s/@GROUP@/$KVMGROUP/" $CWD/65-kvm.rules > $PKG/lib/udev/rules.d/65-kvm.rules find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -132,7 +133,10 @@ find $PKG/usr/man -type f -exec chmod 0644 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a kvm/scripts $PKG/usr/doc/$PRGNAM-$VERSION/ +mv $PKG/usr/share/doc/qemu/* $PKG/usr/doc/$PRGNAM-$VERSION +rm -fR $PKG/usr/share/doc +cp -a Changelog COPYING* HACKING LICENSE README TODO docs/* \ + $PKG/usr/doc/$PRGNAM-$VERSION/ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/system/qemu-kvm/qemu-kvm.info b/system/qemu-kvm/qemu-kvm.info index e5fbe707a275f..57d4b3a97b78a 100644 --- a/system/qemu-kvm/qemu-kvm.info +++ b/system/qemu-kvm/qemu-kvm.info @@ -1,8 +1,8 @@ PRGNAM="qemu-kvm" -VERSION="1.0.1" +VERSION="1.1.1" HOMEPAGE="http://www.linux-kvm.org/page/Main_Page" -DOWNLOAD="http://downloads.sourceforge.net/kvm/qemu-kvm-1.0.1.tar.gz" -MD5SUM="f23711fb9f3c70f802829b109ba9aa27" +DOWNLOAD="http://downloads.sourceforge.net/kvm/qemu-kvm-1.1.1.tar.gz" +MD5SUM="f8f5629b00f48192cc0467e1d31c4dd2" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" |