[COMMIT master] remove unused function kvm_sync_vcpus()

2010-08-22 Thread Avi Kivity
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu-kvm.h b/qemu-kvm.h index 6dd3a01..bb66b21 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -921,11 +921,6 @@ int handle_tpr_access(void *opaque,

[COMMIT master] make kvm_mutex_*lock static

2010-08-22 Thread Avi Kivity
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/qemu-kvm.c b/qemu-kvm.c index 4f7cf6d..c9818de 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1826,13 +1826,13 @@ int kvm_set_irq(int irq, int level, int

[COMMIT master] KVM: x86 emulator: fix INTn emulation not pushing EFLAGS and CS

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com emulate_push() only schedules a push; it doesn't actually push anything. Call writeback() to flush out the write. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ac13831..ed985a9 100644 ---

[COMMIT master] KVM: x86 emulator: add CBW/CWDE/CDQE instruction emulation

2010-08-22 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Add CBW/CWDE/CDQE instruction emulation.(opcode 0x98) Used by FreeBSD's boot loader. Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[COMMIT master] KVM: x86 emulator: implement SCAS (opcodes AE, AF)

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ed985a9..729853a 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2312,7 +2312,7 @@ static struct opcode opcode_table[256] = {

[COMMIT master] KVM: x86 emulator: fix REPZ/REPNZ termination condition

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com EFLAGS.ZF needs to be checked after each iteration, not before. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 729853a..4372dc5 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@

[COMMIT master] KVM: x86 emulator: Use a register for ____emulate_2op() destination

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Most x86 two operand instructions allow the destination to be a memory operand, but IMUL (for example) requires that the destination be a register. Change emulate_2op() to take a register for both source and destination so we can invoke IMUL. Signed-off-by:

[COMMIT master] KVM: x86 emulator: implement RET imm16 (opcode C2)

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 9147633..656afaa 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2250,6 +2250,21 @@ static int em_call_far(struct x86_emulate_ctxt

[COMMIT master] KVM: x86 emulator: implement DAS (opcode 2F)

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index f6f93b9..d84baca 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2176,6 +2176,45 @@ static int em_push(struct x86_emulate_ctxt *ctxt)

[COMMIT master] KVM: x86 emulator: implement IMUL REG, R/M, imm8 (opcode 6B)

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 656afaa..879d458 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2265,6 +2265,15 @@ static int em_ret_near_imm(struct

[COMMIT master] KVM: x86 emulator: implement IMUL REG, R/M (opcode 0F AF)

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 879d458..ee78206 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2265,15 +2265,22 @@ static int em_ret_near_imm(struct

[COMMIT master] KVM: x86 emulator: add SrcImmU16 operand type

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Used for RET NEAR instructions. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 3bc5154..9147633 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -72,6 +72,7 @@ #define SrcImmFAddr

[COMMIT master] KVM: x86 emulator: pass destination type to ____emulate_2op()

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com We'll need it later so we can use a register for the destination. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index c37fb01..49bfcc7 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@

[COMMIT master] KVM: x86 emulator: remove SrcImplicit

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Useless. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ee78206..58e5dee 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -58,7 +58,6 @@ #define DstMask (71) /* Source operand

[COMMIT master] KVM: x86 emulator: implement CWD (opcode 99)

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 7d5f674..3b35e13 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2281,6 +2281,18 @@ static int em_imul_3op(struct x86_emulate_ctxt

[COMMIT master] KVM: x86 emulator: consolidate immediate decode into a function

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 634088b..4aad8d0 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2542,6 +2542,55 @@ static struct opcode twobyte_table[256] = {

[COMMIT master] KVM: x86 emulator: add Src2Imm decoding

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Needed for 3-operand IMUL. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 4aad8d0..07898ca 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -95,6 +95,7 @@ #define Src2CL (129)

[COMMIT master] KVM: x86 emulator: implement IMUL REG, R/M, IMM (opcode 69)

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 07898ca..7d5f674 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2403,7 +2403,8 @@ static struct opcode opcode_table[256] = {

[COMMIT master] Test for REPE/SCAS with ZF initially clear

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com REPE tests ZF after the string instruction is executed. Try it with ZF initially clear to make sure. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/emulator.c b/x86/emulator.c index 04adce7..d30ca8e 100644 --- a/x86/emulator.c +++ b/x86/emulator.c

[COMMIT master] Add real mode test for cbw/cwde instruction

2010-08-22 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index 35f6a16..0b90cc3 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -1194,6 +1194,32 @@ void test_idiv()

[COMMIT master] Test RET IMM instruction

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index 42b6760..60c6212 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -627,6 +627,7 @@ void test_call(void) ret\n\t

[COMMIT master] Load flags register before running real-mode test

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index ccf3645..c15e532 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -78,6 +78,7 @@ static void exec_in_big_real_mode(const struct regs *inregs, and $-2,

[COMMIT master] Add DAS test

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com test 1024 combinations of AL, CF and AF. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index c15e532..7c358f9 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -1263,6 +1263,289 @@ void test_loopcc(void)

[COMMIT master] Add test for cwd/cdq/cqo instruction

2010-08-22 Thread Avi Kivity
From: Mohammed Gamal m.gamal...@gmail.com Signed-off-by: Mohammed Gamal m.gamal...@gmail.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index 7c358f9..77fc1e1 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -1546,6 +1546,63 @@ static void

[COMMIT master] Introduce report() function for realmode test to simplify result reporting

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index 11019a8..72550bc 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -138,6 +138,13 @@ int regs_equal(const struct regs *r1, const struct regs *r2, int ignore)

[COMMIT master] Simplify exec_in_big_real_mode() calling convention

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Instead of passing both the address and size of the instruction to be executed, pass the address of a descriptor containing both. The label denoting the end of the instruction is eliminated, reducing aliases which confuse objdump. Signed-off-by: Avi Kivity

[COMMIT master] realmode: make inregs, outregs global

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com This removes a lot of parameter passing. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index 72550bc..0852043 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -59,9 +59,9 @@ struct insn_desc { u16 len; };

[COMMIT master] KVM: replace x86 kvm n_free_mmu_pages with n_used_mmu_pages

2010-08-22 Thread Avi Kivity
From: Dave Hansen d...@linux.vnet.ibm.com Doing this makes the code much more readable. That's borne out by the fact that this patch removes code. used also happens to be the number that we need to return back to the slab code when our shrinker gets called. Keeping this value as opposed to

[COMMIT master] realmode: fold register comparison test into report()

2010-08-22 Thread Avi Kivity
From: Avi Kivity a...@redhat.com This makes is easier to test registers. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/x86/realmode.c b/x86/realmode.c index 50eaa5e..b69e474 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -138,8 +138,11 @@ int regs_equal(int ignore) return

[COMMIT master] KVM: abstract kvm x86 mmu-n_free_mmu_pages

2010-08-22 Thread Avi Kivity
From: Dave Hansen d...@linux.vnet.ibm.com free is a poor name for this value. In this context, it means, the number of mmu pages which this kvm instance should be able to allocate. But free implies much more that the objects are there and ready for use. available is a much better description,

[COMMIT master] KVM: create aggregate kvm_total_used_mmu_pages value

2010-08-22 Thread Avi Kivity
From: Dave Hansen d...@linux.vnet.ibm.com Of slab shrinkers, the VM code says: * Note that 'shrink' will be passed nr_to_scan == 0 when the VM is * querying the cache size, so a fastpath for that case is appropriate. and it *means* it. Look at how it calls the shrinkers: nr_before =

[COMMIT master] KVM: rename x86 kvm-arch.n_alloc_mmu_pages

2010-08-22 Thread Avi Kivity
From: Dave Hansen d...@linux.vnet.ibm.com arch.n_alloc_mmu_pages is a poor choice of name. This value truly means, the number of pages which _may_ be allocated. But, reading the name, n_alloc_mmu_pages implies the number of allocated mmu pages, which is dead wrong. It's really the high

Re: [PATCH] block: Make BSG detection more sane in hdev_open()

2010-08-22 Thread Christoph Hellwig
On Sat, Aug 21, 2010 at 04:01:15PM -0700, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Greetings hch, tomo and Co, What tree is this against? I can't see any specificc BSG support in qemu. Even more I think all this in the wrong place. The only reason SG_IO

Re: [PATCH v2] KVM: x86 emulator: add LDS/LES/LFS/LGS/LSS instruction emulation

2010-08-22 Thread Avi Kivity
On 08/20/2010 06:17 AM, Wei Yongjun wrote: Add LDS/LES/LFS/LGS/LSS instruction emulation. (opcode 0xc4, 0xc5, 0x0f 0xb2, 0x0f 0xb4~0xb5) The patch looks good, but did I miss the test cases? -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list:

Re: vhost-net unreleased?

2010-08-22 Thread Avi Kivity
On 08/19/2010 11:19 PM, John Bellessa wrote: vhost-net will be supported by qemu-kvm 0.13 which is on track for release soon. snip list trailer I'm a little confused. The vhost-net page (http://www.linux-kvm.org/page/VhostNet) indicates that it is fully functional. Could you clarify

Re: [BUG?] can not writeback more then 8 bytes memory

2010-08-22 Thread Avi Kivity
On 08/20/2010 12:12 PM, Wei Yongjun wrote: Hi all: I have the following patch to SIDT emulation instruction, but it does not work because we can not writeback more then 8 bytes memory, the SIDT under PROTO64 is 10 bytes. I change the code to write twice, first time write limit, then write

Re: Receiving delayed packets from RTL8139 card in KVM

2010-08-22 Thread Avi Kivity
On 08/20/2010 04:01 AM, Karthik Vadambacheri Manian wrote: Hi All, I am running a light weight kernel named kitten in QEMU-KVM which uses LWIP (Light Weight TCP/IP) stack for networking. I am trying to fine tune this LWIP but I am now facing an issue regarding delayed packet reception.

Re: [PATCH non-atomic-injection] x86 emulator: Add cwd/cdq/cqo instruction (opcode 0x99)

2010-08-22 Thread Avi Kivity
On 08/19/2010 05:25 PM, Mohammed Gamal wrote: Signed-off-by: Mohammed Gamalm.gamal...@gmail.com --- arch/x86/kvm/emulate.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ee4bb69..fddf76d 100644

[PATCH 01/14] KVM: x86 emulator: pass destination type to ____emulate_2op()

2010-08-22 Thread Avi Kivity
We'll need it later so we can use a register for the destination. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index c37fb01..49bfcc7 100644

[PATCH 03/14] KVM: x86 emulator: implement DAS (opcode 2F)

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 37 - 1 files changed, 36 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index f6f93b9..4cbc884 100644 --- a/arch/x86/kvm/emulate.c +++

[PATCH 02/14] KVM: x86 emulator: Use a register for ____emulate_2op() destination

2010-08-22 Thread Avi Kivity
Most x86 two operand instructions allow the destination to be a memory operand, but IMUL (for example) requires that the destination be a register. Change emulate_2op() to take a register for both source and destination so we can invoke IMUL. Signed-off-by: Avi Kivity a...@redhat.com ---

[PATCH 07/14] KVM: x86 emulator: implement IMUL REG, R/M, imm8 (opcode 6B)

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 6ef4b22..ae72835 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@

[PATCH 13/14] KVM: x86 emulator: implement IMUL REG, R/M, IMM (opcode 69)

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 3365511..d4ec010 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2398,7

[PATCH 00/14] More instruction emulations

2010-08-22 Thread Avi Kivity
Add a bunch of instructions to the emulator. These are sufficient to make the BIOS boot. Avi Kivity (14): KVM: x86 emulator: pass destination type to emulate_2op() KVM: x86 emulator: Use a register for emulate_2op() destination KVM: x86 emulator: implement DAS (opcode 2F) KVM:

[PATCH 08/14] KVM: x86 emulator: implement IMUL REG, R/M (opcode 0F AF)

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index ae72835..7574d1e 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@

[PATCH 09/14] KVM: x86 emulator: remove SrcImplicit

2010-08-22 Thread Avi Kivity
Useless. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 7574d1e..e83b9fc 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@

[PATCH 10/14] KVM: x86 emulator: implement RDTSC (opcode 0F 31)

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index e83b9fc..09bec0c 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c

[PATCH 06/14] KVM: x86 emulator: implement RET imm16 (opcode C2)

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 67e8eed..6ef4b22 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c

[PATCH 05/14] KVM: x86 emulator: add SrcImmU16 operand type

2010-08-22 Thread Avi Kivity
Used for RET NEAR instructions. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 34c4196..67e8eed 100644 --- a/arch/x86/kvm/emulate.c +++

[PATCH 12/14] KVM: x86 emulator: add Src2Imm decoding

2010-08-22 Thread Avi Kivity
Needed for 3-operand IMUL. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 3cf9c02..3365511 100644 --- a/arch/x86/kvm/emulate.c +++

[PATCH 14/14] KVM: x86 emulator: implement CWD (opcode 99)

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 15 ++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index d4ec010..f512ba7 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@

[PATCH 6/6] Test RET IMM instruction

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index 42b6760..60c6212 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -627,6 +627,7 @@ void test_call(void)

[PATCH 11/14] KVM: x86 emulator: consolidate immediate decode into a function

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 109 1 files changed, 64 insertions(+), 45 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 09bec0c..3cf9c02 100644 --- a/arch/x86/kvm/emulate.c

[PATCH 5/6] Test CALL FAR R/M instrucion (opcode FF /3)

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index 77fc1e1..42b6760 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -604,10 +604,14 @@ void test_io(void)

[PATCH 2/6] Add DAS test

2010-08-22 Thread Avi Kivity
test 1024 combinations of AL, CF and AF. Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c | 284 1 files changed, 284 insertions(+), 0 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index c15e532..7c358f9 100644

[PATCH 04/14] KVM: x86 emulator: implement CALL FAR (FF /3)

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c | 37 - 1 files changed, 36 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 4cbc884..34c4196 100644 --- a/arch/x86/kvm/emulate.c +++

[PATCH 4/6] Add test for cwd/cdq/cqo instruction

2010-08-22 Thread Avi Kivity
From: Mohammed Gamal m.gamal...@gmail.com Signed-off-by: Mohammed Gamal m.gamal...@gmail.com Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c | 58 1 files changed, 58 insertions(+), 0 deletions(-) diff --git

[PATCH 0/6] Some more emulator tests

2010-08-22 Thread Avi Kivity
Add emulator tests for recently implemented instructions: DAS IMUL (several variants) CALL FAR r/m RET imm16 Avi Kivity (5): Load flags register before running real-mode test Add DAS test Add IMUL tests Test CALL FAR R/M instrucion (opcode FF /3) Test RET IMM instruction

[PATCH 1/6] Load flags register before running real-mode test

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index ccf3645..c15e532 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -78,6 +78,7 @@ static void exec_in_big_real_mode(const

Re: [PATCH 03/14] KVM: x86 emulator: implement DAS (opcode 2F)

2010-08-22 Thread Avi Kivity
On 08/22/2010 03:18 PM, Avi Kivity wrote: Signed-off-by: Avi Kivitya...@redhat.com --- arch/x86/kvm/emulate.c | 37 - 1 files changed, 36 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index f6f93b9..4cbc884

[PATCH 0/5] Realmode unit-tests clean up

2010-08-22 Thread Avi Kivity
This patch set cleans up the real mode unit tests and makes it significantly easier to add and review new tests. Avi Kivity (5): Simplify exec_in_big_real_mode() calling convention Introduce report() function for realmode test to simplify result reporting realmode: make inregs, outregs

[PATCH 4/5] realmode: fix esp in long jump test

2010-08-22 Thread Avi Kivity
esp needs to point at the end of the stack, or it will corrupt memory. Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index 5c62ec4..50eaa5e 100644 --- a/x86/realmode.c +++

[PATCH 2/5] Introduce report() function for realmode test to simplify result reporting

2010-08-22 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c | 585 +++- 1 files changed, 198 insertions(+), 387 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index 183eb06..ef424dd 100644 --- a/x86/realmode.c +++ b/x86/realmode.c

[PATCH 3/5] realmode: make inregs, outregs global

2010-08-22 Thread Avi Kivity
This removes a lot of parameter passing. Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c | 430 +--- 1 files changed, 221 insertions(+), 209 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index ef424dd..5c62ec4 100644

[PATCH 1/5] Simplify exec_in_big_real_mode() calling convention

2010-08-22 Thread Avi Kivity
Instead of passing both the address and size of the instruction to be executed, pass the address of a descriptor containing both. The label denoting the end of the instruction is eliminated, reducing aliases which confuse objdump. Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c |

[PATCH 5/5] realmode: fold register comparison test into report()

2010-08-22 Thread Avi Kivity
This makes is easier to test registers. Signed-off-by: Avi Kivity a...@redhat.com --- x86/realmode.c | 301 +--- 1 files changed, 113 insertions(+), 188 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index 50eaa5e..b69e474 100644

Re: [PATCH 0/4 v2] kvm: rework KVM mmu_shrink() code

2010-08-22 Thread Avi Kivity
On 08/20/2010 04:10 AM, Tim Pepper wrote: The following series is the four patches Dave Hansen had queued for test as mentioned last week in the thread: [PATCH] kvm: make mmu_shrink() fit shrinker's requirement Last week just before leaving for vacation Dave had noted in that thread that

Re: [PATCH 13/26] KVM: PPC: Add feature bitmap for magic page

2010-08-22 Thread Avi Kivity
On 08/17/2010 04:57 PM, Alexander Graf wrote: We will soon add SR PV support to the shared page, so we need some infrastructure that allows the guest to query for features KVM exports. This patch adds a second return value to the magic mapping that indicated to the guest which features are

Re: [PATCH 00/26] KVM: PPC: Mid-August patch queue

2010-08-22 Thread Avi Kivity
On 08/17/2010 04:57 PM, Alexander Graf wrote: Howdy, This is my local patch queue with stuff that has accumulated over the last weeks on KVM for PPC with some last minute fixes, speedups and debugging help that I needed for the KVM Forum ;-). The highlights of this set are: - Converted

[GIT PULL] KVM fixes for 2.6.36-rc1

2010-08-22 Thread Avi Kivity
Linus, please pull from rb: git://git.kernel.org/pub/scm/virt/kvm/kvm.git kvm-updates/2.6.36 to get a few regression fixes for KVM: Xiao Guangrong (1): KVM: PIT: free irq source id in handling error path Xiaotian Feng (2): KVM: fix poison overwritten caused by using wrong

[PATCH] lsi53c895a: Fix breakage v0.12.5 merge for SGL passthrough qemu-kvm.git tree

2010-08-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Greetings hch, Paul and other lsi53c895a folks, This patch merges the remaining changes from upstream v0.12.5 for hw/lsi53c895a.c to function with the existing SGL passthrough code. This includes the following: *) conversion of

Re: [PATCH] block: Make BSG detection more sane in hdev_open()

2010-08-22 Thread Nicholas A. Bellinger
On Sun, 2010-08-22 at 10:31 +0200, Christoph Hellwig wrote: On Sat, Aug 21, 2010 at 04:01:15PM -0700, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Greetings hch, tomo and Co, What tree is this against? I can't see any specificc BSG support in qemu. The

[PATCH 1/2] PCI: define max devices number on PCIBus as PCIBus_MAX_DEVICES in pci.h

2010-08-22 Thread Ken CC
Signed-off-by: Ken CC ken.c...@gmail.com --- hw/pci.c |2 +- hw/pci.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index a98d6f3..a09fbac 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -44,7 +44,7 @@ struct PCIBus { pci_hotplug_fn hotplug;

[PATCH] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-22 Thread Ken CC
Check before trying subindexing. Signed-off-by: Ken CC ken.c...@gmail.com --- hw/pci.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index a09fbac..f6f00c6 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -675,6 +675,10 @@ static PCIDevice

[PATCH 2/2] pci init: Check if devfn exceeding the max devices number supported on bus

2010-08-22 Thread Ken CC
Check before trying subindexing. Signed-off-by: Ken CC ken.c...@gmail.com --- hw/pci.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index a09fbac..f6f00c6 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -675,6 +675,10 @@ static PCIDevice

Re: [PATCH 13/26] KVM: PPC: Add feature bitmap for magic page

2010-08-22 Thread Avi Kivity
On 08/17/2010 04:57 PM, Alexander Graf wrote: We will soon add SR PV support to the shared page, so we need some infrastructure that allows the guest to query for features KVM exports. This patch adds a second return value to the magic mapping that indicated to the guest which features are

Re: [PATCH 00/26] KVM: PPC: Mid-August patch queue

2010-08-22 Thread Avi Kivity
On 08/17/2010 04:57 PM, Alexander Graf wrote: Howdy, This is my local patch queue with stuff that has accumulated over the last weeks on KVM for PPC with some last minute fixes, speedups and debugging help that I needed for the KVM Forum ;-). The highlights of this set are: - Converted

Re: [PATCH] powerpc: remove fpscr use from [kvm_]cvt_{fd,df}

2010-08-22 Thread Michael Neuling
Neither lfs nor stfs touch the fpscr, so remove the restore/save of it around them. Do some 32 bit processors need this? In 32 bit before the merge, we use to have code that did: #if defined(CONFIG_4xx) || defined(CONFIG_E500) #define cvt_fd without save/restore fpscr #else #define