From a3a6d375063ae75e731e0004284a96f13c22abc6 Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Sun, 31 May 2009 14:42:34 +0000 Subject: [PATCH] stable 0.10.5 --- .cvsignore | 2 +- qemu-dma-aio-cancellation1.patch | 96 ------------ qemu-dma-aio-cancellation2.patch | 137 ------------------ qemu-dma-aio-cancellation3.patch | 37 ----- qemu-dma-aio-cancellation4.patch | 81 ----------- qemu-fix-gcc.patch | 79 ---------- qemu-fix-load-linux.patch | 45 ------ qemu-roms-more-room-fix-vga-align.patch | 10 +- qemu-roms-more-room.patch | 25 ++-- ...im-cpu-features-not-supported-by-kvm.patch | 67 --------- qemu.spec | 43 +++--- sources | 2 +- 12 files changed, 39 insertions(+), 585 deletions(-) delete mode 100644 qemu-dma-aio-cancellation1.patch delete mode 100644 qemu-dma-aio-cancellation2.patch delete mode 100644 qemu-dma-aio-cancellation3.patch delete mode 100644 qemu-dma-aio-cancellation4.patch delete mode 100644 qemu-fix-gcc.patch delete mode 100644 qemu-fix-load-linux.patch delete mode 100644 qemu-trim-cpu-features-not-supported-by-kvm.patch diff --git a/.cvsignore b/.cvsignore index 97f3c02..464409d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -qemu-kvm-*.tar.gz +qemu-kvm-0.10.5.tar.gz diff --git a/qemu-dma-aio-cancellation1.patch b/qemu-dma-aio-cancellation1.patch deleted file mode 100644 index a8b57cd..0000000 --- a/qemu-dma-aio-cancellation1.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 3b92e958482155404cfd134a9608041eed69622a Mon Sep 17 00:00:00 2001 -From: Avi Kivity -Date: Fri, 20 Mar 2009 18:26:12 +0000 -Subject: [STABLE][PATCH 1/4] Use vectored aiocb storage to store vector translation state - -Now that we have a dedicated acb pool for vector translation acbs, we can -store the vector translation state in the acbs instead of in an external -structure. - -Signed-off-by: Avi Kivity - ---- - block.c | 29 ++++++++++++++--------------- - 1 files changed, 14 insertions(+), 15 deletions(-) - -diff --git a/block.c b/block.c -index b12318f..689ea37 100644 ---- a/block.c -+++ b/block.c -@@ -1332,31 +1332,32 @@ char *bdrv_snapshot_dump(char *buf, int buf_size, QEMUSnapshotInfo *sn) - /**************************************************************/ - /* async I/Os */ - --typedef struct VectorTranslationState { -+typedef struct VectorTranslationAIOCB { -+ BlockDriverAIOCB common; - QEMUIOVector *iov; - uint8_t *bounce; - int is_write; - BlockDriverAIOCB *aiocb; -- BlockDriverAIOCB *this_aiocb; --} VectorTranslationState; -+} VectorTranslationAIOCB; - --static void bdrv_aio_cancel_vector(BlockDriverAIOCB *acb) -+static void bdrv_aio_cancel_vector(BlockDriverAIOCB *_acb) - { -- VectorTranslationState *s = acb->opaque; -+ VectorTranslationAIOCB *acb -+ = container_of(_acb, VectorTranslationAIOCB, common); - -- bdrv_aio_cancel(s->aiocb); -+ bdrv_aio_cancel(acb->aiocb); - } - - static void bdrv_aio_rw_vector_cb(void *opaque, int ret) - { -- VectorTranslationState *s = opaque; -+ VectorTranslationAIOCB *s = (VectorTranslationAIOCB *)opaque; - - if (!s->is_write) { - qemu_iovec_from_buffer(s->iov, s->bounce, s->iov->size); - } - qemu_vfree(s->bounce); -- s->this_aiocb->cb(s->this_aiocb->opaque, ret); -- qemu_aio_release(s->this_aiocb); -+ s->common.cb(s->common.opaque, ret); -+ qemu_aio_release(s); - } - - static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs, -@@ -1368,11 +1369,9 @@ static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs, - int is_write) - - { -- VectorTranslationState *s = qemu_mallocz(sizeof(*s)); -- BlockDriverAIOCB *aiocb = qemu_aio_get_pool(&vectored_aio_pool, bs, -- cb, opaque); -+ VectorTranslationAIOCB *s = qemu_aio_get_pool(&vectored_aio_pool, bs, -+ cb, opaque); - -- s->this_aiocb = aiocb; - s->iov = iov; - s->bounce = qemu_memalign(512, nb_sectors * 512); - s->is_write = is_write; -@@ -1384,7 +1383,7 @@ static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs, - s->aiocb = bdrv_aio_read(bs, sector_num, s->bounce, nb_sectors, - bdrv_aio_rw_vector_cb, s); - } -- return aiocb; -+ return &s->common; - } - - BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num, -@@ -1560,7 +1559,7 @@ static int bdrv_write_em(BlockDriverState *bs, int64_t sector_num, - - void bdrv_init(void) - { -- aio_pool_init(&vectored_aio_pool, sizeof(BlockDriverAIOCB), -+ aio_pool_init(&vectored_aio_pool, sizeof(VectorTranslationAIOCB), - bdrv_aio_cancel_vector); - - bdrv_register(&bdrv_raw); --- -1.6.0.6 - diff --git a/qemu-dma-aio-cancellation2.patch b/qemu-dma-aio-cancellation2.patch deleted file mode 100644 index 33fbe38..0000000 --- a/qemu-dma-aio-cancellation2.patch +++ /dev/null @@ -1,137 +0,0 @@ -From b591f5930d0eaa93690c5a7acf95e4f5a3e04e06 Mon Sep 17 00:00:00 2001 -From: Avi Kivity -Date: Fri, 20 Mar 2009 18:26:16 +0000 -Subject: [STABLE][PATCH 2/4] Move block dma helpers aiocb to store dma state - -Use the dedicated dma aiocb to store intermediate state for dma block -transactions. - -Signed-off-by: Avi Kivity - ---- - dma-helpers.c | 37 ++++++++++++++++++++----------------- - 1 files changed, 20 insertions(+), 17 deletions(-) - -diff --git a/dma-helpers.c b/dma-helpers.c -index 19fa4f0..96a120c 100644 ---- a/dma-helpers.c -+++ b/dma-helpers.c -@@ -39,6 +39,7 @@ void qemu_sglist_destroy(QEMUSGList *qsg) - } - - typedef struct { -+ BlockDriverAIOCB common; - BlockDriverState *bs; - BlockDriverAIOCB *acb; - QEMUSGList *sg; -@@ -48,13 +49,13 @@ typedef struct { - target_phys_addr_t sg_cur_byte; - QEMUIOVector iov; - QEMUBH *bh; --} DMABlockState; -+} DMAAIOCB; - - static void dma_bdrv_cb(void *opaque, int ret); - - static void reschedule_dma(void *opaque) - { -- DMABlockState *dbs = (DMABlockState *)opaque; -+ DMAAIOCB *dbs = (DMAAIOCB *)opaque; - - qemu_bh_delete(dbs->bh); - dbs->bh = NULL; -@@ -63,7 +64,7 @@ static void reschedule_dma(void *opaque) - - static void continue_after_map_failure(void *opaque) - { -- DMABlockState *dbs = (DMABlockState *)opaque; -+ DMAAIOCB *dbs = (DMAAIOCB *)opaque; - - dbs->bh = qemu_bh_new(reschedule_dma, dbs); - qemu_bh_schedule(dbs->bh); -@@ -71,11 +72,12 @@ static void continue_after_map_failure(void *opaque) - - static void dma_bdrv_cb(void *opaque, int ret) - { -- DMABlockState *dbs = (DMABlockState *)opaque; -+ DMAAIOCB *dbs = (DMAAIOCB *)opaque; - target_phys_addr_t cur_addr, cur_len; - void *mem; - int i; - -+ dbs->acb = NULL; - dbs->sector_num += dbs->iov.size / 512; - for (i = 0; i < dbs->iov.niov; ++i) { - cpu_physical_memory_unmap(dbs->iov.iov[i].iov_base, -@@ -85,10 +87,9 @@ static void dma_bdrv_cb(void *opaque, int ret) - qemu_iovec_reset(&dbs->iov); - - if (dbs->sg_cur_index == dbs->sg->nsg || ret < 0) { -- dbs->acb->cb(dbs->acb->opaque, ret); -+ dbs->common.cb(dbs->common.opaque, ret); - qemu_iovec_destroy(&dbs->iov); -- qemu_aio_release(dbs->acb); -- qemu_free(dbs); -+ qemu_aio_release(dbs); - return; - } - -@@ -112,11 +113,11 @@ static void dma_bdrv_cb(void *opaque, int ret) - } - - if (dbs->is_write) { -- bdrv_aio_writev(dbs->bs, dbs->sector_num, &dbs->iov, -- dbs->iov.size / 512, dma_bdrv_cb, dbs); -+ dbs->acb = bdrv_aio_writev(dbs->bs, dbs->sector_num, &dbs->iov, -+ dbs->iov.size / 512, dma_bdrv_cb, dbs); - } else { -- bdrv_aio_readv(dbs->bs, dbs->sector_num, &dbs->iov, -- dbs->iov.size / 512, dma_bdrv_cb, dbs); -+ dbs->acb = bdrv_aio_readv(dbs->bs, dbs->sector_num, &dbs->iov, -+ dbs->iov.size / 512, dma_bdrv_cb, dbs); - } - } - -@@ -125,10 +126,10 @@ static BlockDriverAIOCB *dma_bdrv_io( - BlockDriverCompletionFunc *cb, void *opaque, - int is_write) - { -- DMABlockState *dbs = qemu_malloc(sizeof(*dbs)); -+ DMAAIOCB *dbs = qemu_aio_get_pool(&dma_aio_pool, bs, cb, opaque); - -+ dbs->acb = NULL; - dbs->bs = bs; -- dbs->acb = qemu_aio_get_pool(&dma_aio_pool, bs, cb, opaque); - dbs->sg = sg; - dbs->sector_num = sector_num; - dbs->sg_cur_index = 0; -@@ -137,7 +138,7 @@ static BlockDriverAIOCB *dma_bdrv_io( - dbs->bh = NULL; - qemu_iovec_init(&dbs->iov, sg->nsg); - dma_bdrv_cb(dbs, 0); -- return dbs->acb; -+ return &dbs->common; - } - - -@@ -157,12 +158,14 @@ BlockDriverAIOCB *dma_bdrv_write(BlockDriverState *bs, - - static void dma_aio_cancel(BlockDriverAIOCB *acb) - { -- DMABlockState *dbs = (DMABlockState *)acb->opaque; -+ DMAAIOCB *dbs = container_of(acb, DMAAIOCB, common); - -- bdrv_aio_cancel(dbs->acb); -+ if (dbs->acb) { -+ bdrv_aio_cancel(dbs->acb); -+ } - } - - void dma_helper_init(void) - { -- aio_pool_init(&dma_aio_pool, sizeof(BlockDriverAIOCB), dma_aio_cancel); -+ aio_pool_init(&dma_aio_pool, sizeof(DMAAIOCB), dma_aio_cancel); - } --- -1.6.0.6 - diff --git a/qemu-dma-aio-cancellation3.patch b/qemu-dma-aio-cancellation3.patch deleted file mode 100644 index 1fe1fd0..0000000 --- a/qemu-dma-aio-cancellation3.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 2df6efa1790a7a2894707257d2fe67b8d1cfb13a Mon Sep 17 00:00:00 2001 -From: Avi Kivity -Date: Sat, 28 Mar 2009 16:11:20 +0000 -Subject: [STABLE][PATCH 3/4] Fix vectored aio bounce handling immediate errors - -If a bounced vectored aio fails immediately (the inner aio submission -returning NULL) then the bounce handler erronously returns an aio -request which will never be completed (and which crashes when cancelled). - -Fix by detecting that the inner request has failed and propagating the -error. - -Signed-off-by: Avi Kivity - ---- - block.c | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) - -diff --git a/block.c b/block.c -index 689ea37..b68a8da 100644 ---- a/block.c -+++ b/block.c -@@ -1383,6 +1383,11 @@ static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs, - s->aiocb = bdrv_aio_read(bs, sector_num, s->bounce, nb_sectors, - bdrv_aio_rw_vector_cb, s); - } -+ if (!s->aiocb) { -+ qemu_vfree(s->bounce); -+ qemu_aio_release(s); -+ return NULL; -+ } - return &s->common; - } - --- -1.6.0.6 - diff --git a/qemu-dma-aio-cancellation4.patch b/qemu-dma-aio-cancellation4.patch deleted file mode 100644 index bb993eb..0000000 --- a/qemu-dma-aio-cancellation4.patch +++ /dev/null @@ -1,81 +0,0 @@ -From eaa874771bb83df639e2937884240a6b05622e3f Mon Sep 17 00:00:00 2001 -From: Avi Kivity -Date: Sat, 28 Mar 2009 16:11:25 +0000 -Subject: [STABLE][PATCH 4/4] Fix DMA API when handling an immediate error from block layer - -The block layer may signal an immediate error on an asynchronous request -by returning NULL. The DMA API did not handle this correctly, returning -an AIO request which would never complete (and which would crash if -cancelled). - -Fix by detecting the failure and propagating it. - -Signed-off-by: Avi Kivity - ---- - dma-helpers.c | 27 +++++++++++++++++++++------ - 1 files changed, 21 insertions(+), 6 deletions(-) - -diff --git a/dma-helpers.c b/dma-helpers.c -index 96a120c..1469e34 100644 ---- a/dma-helpers.c -+++ b/dma-helpers.c -@@ -70,20 +70,26 @@ static void continue_after_map_failure(void *opaque) - qemu_bh_schedule(dbs->bh); - } - --static void dma_bdrv_cb(void *opaque, int ret) -+static void dma_bdrv_unmap(DMAAIOCB *dbs) - { -- DMAAIOCB *dbs = (DMAAIOCB *)opaque; -- target_phys_addr_t cur_addr, cur_len; -- void *mem; - int i; - -- dbs->acb = NULL; -- dbs->sector_num += dbs->iov.size / 512; - for (i = 0; i < dbs->iov.niov; ++i) { - cpu_physical_memory_unmap(dbs->iov.iov[i].iov_base, - dbs->iov.iov[i].iov_len, !dbs->is_write, - dbs->iov.iov[i].iov_len); - } -+} -+ -+void dma_bdrv_cb(void *opaque, int ret) -+{ -+ DMAAIOCB *dbs = (DMAAIOCB *)opaque; -+ target_phys_addr_t cur_addr, cur_len; -+ void *mem; -+ -+ dbs->acb = NULL; -+ dbs->sector_num += dbs->iov.size / 512; -+ dma_bdrv_unmap(dbs); - qemu_iovec_reset(&dbs->iov); - - if (dbs->sg_cur_index == dbs->sg->nsg || ret < 0) { -@@ -119,6 +125,11 @@ static void dma_bdrv_cb(void *opaque, int ret) - dbs->acb = bdrv_aio_readv(dbs->bs, dbs->sector_num, &dbs->iov, - dbs->iov.size / 512, dma_bdrv_cb, dbs); - } -+ if (!dbs->acb) { -+ dma_bdrv_unmap(dbs); -+ qemu_iovec_destroy(&dbs->iov); -+ return; -+ } - } - - static BlockDriverAIOCB *dma_bdrv_io( -@@ -138,6 +149,10 @@ static BlockDriverAIOCB *dma_bdrv_io( - dbs->bh = NULL; - qemu_iovec_init(&dbs->iov, sg->nsg); - dma_bdrv_cb(dbs, 0); -+ if (!dbs->acb) { -+ qemu_aio_release(dbs); -+ return NULL; -+ } - return &dbs->common; - } - --- -1.6.0.6 - diff --git a/qemu-fix-gcc.patch b/qemu-fix-gcc.patch deleted file mode 100644 index fc5857f..0000000 --- a/qemu-fix-gcc.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 2ced1d80f01645885ac2e28107f724886eb1cd5a Mon Sep 17 00:00:00 2001 -From: Jochen Roth -Date: Thu, 12 Mar 2009 14:19:19 +0100 -Subject: [PATCH] kvm: testsuite: compile fix - avoid raw string literal - -This patch fixes compilation problems of kvm-userspace on current gcc -4.4 compilers which implement the following standard: -http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm - -Signed-off-by: Jochen Roth -Signed-off-by: Avi Kivity ---- - user/test/x86/apic.c | 32 ++++++++++++++++---------------- - user/test/x86/vmexit.c | 2 +- - 2 files changed, 17 insertions(+), 17 deletions(-) - -Index: qemu-kvm-0.10.4/kvm/user/test/x86/apic.c -=================================================================== ---- qemu-kvm-0.10.4.orig/kvm/user/test/x86/apic.c -+++ qemu-kvm-0.10.4/kvm/user/test/x86/apic.c -@@ -54,14 +54,14 @@ asm ( - "push %r9 \n\t" - "push %r8 \n\t" - #endif -- "push %"R"di \n\t" -- "push %"R"si \n\t" -- "push %"R"bp \n\t" -- "push %"R"sp \n\t" -- "push %"R"bx \n\t" -- "push %"R"dx \n\t" -- "push %"R"cx \n\t" -- "push %"R"ax \n\t" -+ "push %"R "di \n\t" -+ "push %"R "si \n\t" -+ "push %"R "bp \n\t" -+ "push %"R "sp \n\t" -+ "push %"R "bx \n\t" -+ "push %"R "dx \n\t" -+ "push %"R "cx \n\t" -+ "push %"R "ax \n\t" - #ifdef __x86_64__ - "mov %rsp, %rdi \n\t" - "callq *8*16(%rsp) \n\t" -@@ -70,14 +70,14 @@ asm ( - "calll *4+4*8(%esp) \n\t" - "add $4, %esp \n\t" - #endif -- "pop %"R"ax \n\t" -- "pop %"R"cx \n\t" -- "pop %"R"dx \n\t" -- "pop %"R"bx \n\t" -- "pop %"R"bp \n\t" -- "pop %"R"bp \n\t" -- "pop %"R"si \n\t" -- "pop %"R"di \n\t" -+ "pop %"R "ax \n\t" -+ "pop %"R "cx \n\t" -+ "pop %"R "dx \n\t" -+ "pop %"R "bx \n\t" -+ "pop %"R "bp \n\t" -+ "pop %"R "bp \n\t" -+ "pop %"R "si \n\t" -+ "pop %"R "di \n\t" - #ifdef __x86_64__ - "pop %r8 \n\t" - "pop %r9 \n\t" -Index: qemu-kvm-0.10.4/kvm/user/test/x86/vmexit.c -=================================================================== ---- qemu-kvm-0.10.4.orig/kvm/user/test/x86/vmexit.c -+++ qemu-kvm-0.10.4/kvm/user/test/x86/vmexit.c -@@ -31,7 +31,7 @@ int main() - - t1 = rdtsc(); - for (i = 0; i < N; ++i) -- asm volatile ("push %%"R"bx; cpuid; pop %%"R"bx" -+ asm volatile ("push %%"R "bx; cpuid; pop %%"R "bx" - : : : "eax", "ecx", "edx"); - t2 = rdtsc(); - printf("vmexit latency: %d\n", (int)((t2 - t1) / N)); diff --git a/qemu-fix-load-linux.patch b/qemu-fix-load-linux.patch deleted file mode 100644 index b0d4436..0000000 --- a/qemu-fix-load-linux.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7a53bcbef278b4191d5cb497ef2b81509a00f670 Mon Sep 17 00:00:00 2001 -From: Mark McLoughlin -Date: Wed, 13 May 2009 12:59:47 +0100 -Subject: [PATCH 1/1] Fix load_linux reset handling fix - -This fix on the stable branch: - - commit 2da1e398641d9fccf683645c808dee0d088f84cf - Author: Glauber Costa - Date: Fri May 8 02:22:13 2009 -0300 - - reset state for load_linux - -Caused -kernel to break. - -The problem is that we're passing the ROM's ram_addr_t to -load_linux() rather than its target_phys_addr_t. We also -need to register the memory before trying to write to -it. - -Signed-off-by: Mark McLoughlin ---- - hw/pc.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/hw/pc.c b/hw/pc.c -index 062c306..e69a1f7 100644 ---- a/hw/pc.c -+++ b/hw/pc.c -@@ -954,10 +954,10 @@ vga_bios_error: - offset = option_rom_start; - if (linux_boot) { - option_rom_offset = qemu_ram_alloc(TARGET_PAGE_SIZE); -- load_linux(option_rom_offset, -- kernel_filename, initrd_filename, kernel_cmdline); - cpu_register_physical_memory(option_rom_start, TARGET_PAGE_SIZE, - option_rom_offset); -+ load_linux(option_rom_start, -+ kernel_filename, initrd_filename, kernel_cmdline); - offset += TARGET_PAGE_SIZE; - } - --- -1.6.2.2 - diff --git a/qemu-roms-more-room-fix-vga-align.patch b/qemu-roms-more-room-fix-vga-align.patch index 38cb032..157a82e 100644 --- a/qemu-roms-more-room-fix-vga-align.patch +++ b/qemu-roms-more-room-fix-vga-align.patch @@ -18,10 +18,11 @@ Signed-off-by: Glauber Costa qemu/hw/pc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -diff -urp qemu-kvm-0.10.4.orig/hw/pc.c qemu-kvm-0.10.4/hw/pc.c ---- qemu-kvm-0.10.4.orig/hw/pc.c 2009-05-12 22:48:08.000000000 +0100 -+++ qemu-kvm-0.10.4/hw/pc.c 2009-05-12 22:48:46.000000000 +0100 -@@ -927,7 +927,7 @@ vga_bios_error: +Index: qemu-kvm-0.10.5/hw/pc.c +=================================================================== +--- qemu-kvm-0.10.5.orig/hw/pc.c ++++ qemu-kvm-0.10.5/hw/pc.c +@@ -925,7 +925,7 @@ vga_bios_error: exit(1); } /* Round up vga bios size to the next 2k boundary */ @@ -30,4 +31,3 @@ diff -urp qemu-kvm-0.10.4.orig/hw/pc.c qemu-kvm-0.10.4/hw/pc.c option_rom_start = 0xc0000 + vga_bios_size; /* setup basic memory access */ -Only in qemu-kvm-0.10.4/hw: pc.c.orig diff --git a/qemu-roms-more-room.patch b/qemu-roms-more-room.patch index d8c5984..3646388 100644 --- a/qemu-roms-more-room.patch +++ b/qemu-roms-more-room.patch @@ -31,10 +31,11 @@ git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6896 c046a42c-6fe2-441c-8c8 hw/pc.c | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) -diff -urp qemu-kvm-0.10.4.orig/hw/pc.c qemu-kvm-0.10.4/hw/pc.c ---- qemu-kvm-0.10.4.orig/hw/pc.c 2009-05-12 17:16:34.000000000 +0100 -+++ qemu-kvm-0.10.4/hw/pc.c 2009-05-12 22:46:38.000000000 +0100 -@@ -820,7 +820,7 @@ static void pc_init1(ram_addr_t ram_size +Index: qemu-kvm-0.10.5/hw/pc.c +=================================================================== +--- qemu-kvm-0.10.5.orig/hw/pc.c ++++ qemu-kvm-0.10.5/hw/pc.c +@@ -818,7 +818,7 @@ static void pc_init1(ram_addr_t ram_size { char buf[1024]; int ret, linux_boot, i; @@ -43,7 +44,7 @@ diff -urp qemu-kvm-0.10.4.orig/hw/pc.c qemu-kvm-0.10.4/hw/pc.c ram_addr_t below_4g_mem_size, above_4g_mem_size = 0; int bios_size, isa_bios_size, vga_bios_size; int pci_option_rom_offset; -@@ -832,6 +832,7 @@ static void pc_init1(ram_addr_t ram_size +@@ -830,6 +830,7 @@ static void pc_init1(ram_addr_t ram_size int index; BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; BlockDriverState *fd[MAX_FD]; @@ -51,7 +52,7 @@ diff -urp qemu-kvm-0.10.4.orig/hw/pc.c qemu-kvm-0.10.4/hw/pc.c if (ram_size >= 0xe0000000 ) { above_4g_mem_size = ram_size - 0xe0000000; -@@ -907,7 +908,7 @@ static void pc_init1(ram_addr_t ram_size +@@ -905,7 +906,7 @@ static void pc_init1(ram_addr_t ram_size exit(1); } @@ -60,7 +61,7 @@ diff -urp qemu-kvm-0.10.4.orig/hw/pc.c qemu-kvm-0.10.4/hw/pc.c /* VGA BIOS load */ if (cirrus_vga_enabled) { snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_CIRRUS_FILENAME); -@@ -925,12 +926,21 @@ vga_bios_error: +@@ -923,12 +924,21 @@ vga_bios_error: fprintf(stderr, "qemu: could not load VGA BIOS '%s'\n", buf); exit(1); } @@ -83,7 +84,7 @@ diff -urp qemu-kvm-0.10.4.orig/hw/pc.c qemu-kvm-0.10.4/hw/pc.c /* map the last 128KB of the BIOS in ISA space */ isa_bios_size = bios_size; if (isa_bios_size > (128 * 1024)) -@@ -951,14 +961,14 @@ vga_bios_error: +@@ -949,14 +959,14 @@ vga_bios_error: ram_addr_t option_rom_offset; int size, offset; @@ -91,17 +92,17 @@ diff -urp qemu-kvm-0.10.4.orig/hw/pc.c qemu-kvm-0.10.4/hw/pc.c + offset = option_rom_start; if (linux_boot) { option_rom_offset = qemu_ram_alloc(TARGET_PAGE_SIZE); - load_linux(option_rom_offset, - kernel_filename, initrd_filename, kernel_cmdline); - cpu_register_physical_memory(0xd0000, TARGET_PAGE_SIZE, + cpu_register_physical_memory(option_rom_start, TARGET_PAGE_SIZE, option_rom_offset); + load_linux(0xd0000, + kernel_filename, initrd_filename, kernel_cmdline, below_4g_mem_size); - offset = TARGET_PAGE_SIZE; + offset += TARGET_PAGE_SIZE; } for (i = 0; i < nb_option_roms; i++) { -@@ -968,13 +978,13 @@ vga_bios_error: +@@ -966,13 +976,13 @@ vga_bios_error: option_rom[i]); exit(1); } @@ -117,7 +118,7 @@ diff -urp qemu-kvm-0.10.4.orig/hw/pc.c qemu-kvm-0.10.4/hw/pc.c exit(1); } size = (size + 4095) & ~4095; -@@ -982,9 +992,8 @@ vga_bios_error: +@@ -980,9 +990,8 @@ vga_bios_error: initialization, and (optionally) marked readonly by the BIOS before INT 19h. See the PNPBIOS specification, appendix B. DDIM support is mandatory for proper PCI expansion ROM support. */ diff --git a/qemu-trim-cpu-features-not-supported-by-kvm.patch b/qemu-trim-cpu-features-not-supported-by-kvm.patch deleted file mode 100644 index d6b69bd..0000000 --- a/qemu-trim-cpu-features-not-supported-by-kvm.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 3b944bee95c6a5ee561acfc4c4d75d8cc971a567 Mon Sep 17 00:00:00 2001 -From: Avi Kivity -Date: Sun, 3 May 2009 17:04:04 +0300 -Subject: [PATCH STABLE 3/3] kvm: Trim cpu features not supported by kvm - -Remove cpu features that are not supported by kvm from the cpuid features -reported to the guest. - -Signed-off-by: Avi Kivity -Signed-off-by: Anthony Liguori -Signed-off-by: Glauber Costa ---- - target-i386/helper.c | 31 ++++++++++++++++++++++++++++++- - 1 files changed, 30 insertions(+), 1 deletions(-) - -diff --git a/target-i386/helper.c b/target-i386/helper.c -index 1433857..6af5d23 100644 ---- a/target-i386/helper.c -+++ b/target-i386/helper.c -@@ -93,6 +93,21 @@ static void add_flagname_to_bitmaps(char *flagname, uint32_t *features, - } - } - -+static void kvm_trim_features(uint32_t *features, uint32_t supported, -+ const char *names[]) -+{ -+ int i; -+ uint32_t mask; -+ -+ for (i = 0; i < 32; ++i) { -+ mask = 1U << i; -+ if ((*features & mask) && !(supported & mask)) { -+ printf("Processor feature %s not supported by kvm\n", names[i]); -+ *features &= ~mask; -+ } -+ } -+} -+ - typedef struct x86_def_t { - const char *name; - uint32_t level; -@@ -1672,7 +1687,21 @@ CPUX86State *cpu_x86_init(const char *cpu_model) - #ifdef USE_KQEMU - kqemu_init(env); - #endif -- if (kvm_enabled()) -+ if (kvm_enabled()) { - kvm_init_vcpu(env); -+ kvm_trim_features(&env->cpuid_features, -+ kvm_arch_get_supported_cpuid(env, 1, R_EDX), -+ feature_name); -+ kvm_trim_features(&env->cpuid_ext_features, -+ kvm_arch_get_supported_cpuid(env, 1, R_ECX), -+ ext_feature_name); -+ kvm_trim_features(&env->cpuid_ext2_features, -+ kvm_arch_get_supported_cpuid(env, 0x80000001, R_EDX), -+ ext2_feature_name); -+ kvm_trim_features(&env->cpuid_ext3_features, -+ kvm_arch_get_supported_cpuid(env, 0x80000001, R_ECX), -+ ext3_feature_name); -+ } -+ - return env; - } --- -1.5.6.6 - diff --git a/qemu.spec b/qemu.spec index 36ab40f..b869277 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,7 +1,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu -Version: 0.10.4 -Release: 5%{?dist} +Version: 0.10.5 +Release: 1%{?dist} # Epoch because we pushed a qemu-1.0 package Epoch: 2 License: GPLv2+ and LGPLv2+ and BSD @@ -23,19 +23,10 @@ Patch8: 08-vnc-acl-mgmt.patch Patch9: kvm-upstream-ppc.patch Patch10: qemu-fix-debuginfo.patch -Patch11: qemu-fix-gcc.patch -Patch12: qemu-roms-more-room.patch -Patch13: qemu-roms-more-room-fix-vga-align.patch -Patch14: qemu-bios-bigger-roms.patch -Patch15: qemu-kvm-fix-kerneldir-includes.patch -Patch16: qemu-fix-load-linux.patch -Patch17: qemu-dma-aio-cancellation1.patch -Patch18: qemu-dma-aio-cancellation2.patch -Patch19: qemu-dma-aio-cancellation3.patch -Patch20: qemu-dma-aio-cancellation4.patch -Patch21: qemu-make-x86-cpuid-feature-names-available-in-file-scope.patch -Patch22: qemu-fix-x86-feature-modifications-for-features-that-set.patch -Patch23: qemu-trim-cpu-features-not-supported-by-kvm.patch +Patch11: qemu-roms-more-room.patch +Patch12: qemu-roms-more-room-fix-vga-align.patch +Patch13: qemu-bios-bigger-roms.patch +Patch14: qemu-kvm-fix-kerneldir-includes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -231,15 +222,6 @@ such as kvmtrace and kvm_stat. %patch12 -p1 %patch13 -p1 %patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -#%patch22 -p1 -#%patch23 -p1 %build # systems like rhel build system does not have a recent enough linker so @@ -482,6 +464,19 @@ fi %{_mandir}/man1/qemu-img.1* %changelog +* Sun May 31 2009 Glauber Costa - 2:0.10.5-1 +- Update to 0.10.5, and remove already upstream patches + qemu-fix-gcc.patch + qemu-fix-load-linux.patch + qemu-dma-aio-cancellation1.patch + qemu-dma-aio-cancellation2.patch + qemu-dma-aio-cancellation3.patch + qemu-dma-aio-cancellation4.patch + + all cpuid trimming + + Conflicts: + qemu-roms-more-room.patch + * Mon May 18 2009 Glauber Costa - 2:0.10.4-5 - Backport cpuid trimming from upstream (#499596) diff --git a/sources b/sources index 963844c..5973caa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7b876a4899ed82517ca47898e59f215c qemu-kvm-0.10.4.tar.gz +e59ca20604ca8892d8f99b9fc5a159c1 qemu-kvm-0.10.5.tar.gz