[PATCH] KVM: x86 emulator: re-implementing 'mov AL,moffs' instruction decoding

2010-07-06 Thread Wei Yongjun
This patch change to use DstAcc for decoding 'mov AL, moffs' and introduced SrcAcc for decoding 'mov moffs, AL'. Signed-off-by: Wei Yongjun --- arch/x86/kvm/emulate.c | 30 +++--- 1 files changed, 23 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/a

Re: [PATCH 5/6] KVM: x86 emulator: fix 'mov AL,moffs' instruction decoding

2010-07-06 Thread Wei Yongjun
> On 07/06/2010 11:53 AM, Wei Yongjun wrote: > >> 'mov AL,moffs' do not need decode dest operand and >> 'mov moffs,AL' do not need decode source operand. >> >> >> @@ -177,8 +177,8 @@ static u32 opcode_table[256] = { >> 0, 0, SrcImmFAddr | No64, 0, >> ImplicitOps | Stack, ImplicitOps |

Alt SeaBIOS SSDT cpu hotplug

2010-07-06 Thread Kevin O'Connor
Hi, I've been playing with the cpu hotplug SSDT changes. Attached is a proposal for an alternative method of adding ACPI support. The idea is to continue to build a dynamic SSDT based on CountCPUs and MaxCountCPUs. The dynamic SSDT entries just call methods in the main DSDT. This is completely

Re: [PATCH 0/2] Fix walk_addr() page fault error codes

2010-07-06 Thread Xiao Guangrong
Avi Kivity wrote: > This patchset fixes bugs in page fault error code generation. With the > patches > applied, the access.flat unit test now passes with no errors on shadow, npt, > and ept. > > Avi Kivity (2): > KVM: MMU: Only indicate a fetch fault in page fault error code if nx > is e

Re: [PATCH v5 8/9] KVM: MMU: combine guest pte read between fetch and pte prefetch

2010-07-06 Thread Xiao Guangrong
Marcelo Tosatti wrote: >> - >> -first_pte_gpa = gfn_to_gpa(sp->gfn) + >> -(offset + i) * sizeof(pt_element_t); >> - >> -if (kvm_read_guest_atomic(vcpu->kvm, first_pte_gpa, gptep, >> -sizeof(gptep)) < 0) >> -retur

Re: [PATCH v5 8/9] KVM: MMU: combine guest pte read between fetch and pte prefetch

2010-07-06 Thread Marcelo Tosatti
On Tue, Jul 06, 2010 at 06:51:06PM +0800, Xiao Guangrong wrote: > Combine guest pte read between guest pte check in the fetch path and pte > prefetch > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/paging_tmpl.h | 69 ++- > 1 files changed, 42 in

Re: [PATCH] KVM: VMX: Fix host MSR_KERNEL_GS_BASE corruption

2010-07-06 Thread Marcelo Tosatti
On Tue, Jul 06, 2010 at 11:36:01AM +0300, Avi Kivity wrote: > enter_lmode() and exit_lmode() modify the guest's EFER.LMA before calling > vmx_set_efer(). However, the latter function depends on the value of EFER.LMA > to determine whether MSR_KERNEL_GS_BASE needs reloading, via > vmx_load_host_sta

[PATCH] test: Add rmap_chain.flat to unittests config file

2010-07-06 Thread Lucas Meneghel Rodrigues
So it can get executed automatically by KVM autotest. Signed-off-by: Lucas Meneghel Rodrigues --- kvm/test/x86/unittests.cfg |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kvm/test/x86/unittests.cfg b/kvm/test/x86/unittests.cfg index 4a40989..f39c5bd 100644 --- a/kvm/

[PATCH v4 11/12] Let host know whether the guest can handle async PF in non-userspace context.

2010-07-06 Thread Gleb Natapov
If guest can detect that it runs in non-preemptable context it can handle async PFs at any time, so let host know that it can send async PF even if guest cpu is not in userspace. Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/include/asm/kvm_para.h |1 + a

[PATCH v4 12/12] Send async PF when guest is not in userspace too.

2010-07-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- arch/x86/kvm/mmu.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 95a0a8b..297f399 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2280,7 +2280,13 @@ static bool can_do_asy

[PATCH v4 02/12] Add PV MSR to enable asynchronous page faults delivery.

2010-07-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_host.h |3 ++ arch/x86/include/asm/kvm_para.h |4 +++ arch/x86/kvm/x86.c | 49 +- include/linux/kvm.h |1 + 4 files changed, 55 insertions(+), 2 deletions(-) diff

[PATCH v4 05/12] Export __get_user_pages_fast.

2010-07-06 Thread Gleb Natapov
KVM will use it to try and find a page without falling back to slow gup. That is why get_user_pages_fast() is not enough. Signed-off-by: Gleb Natapov --- arch/x86/mm/gup.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c index 738e65

[PATCH v4 03/12] Add async PF initialization to PV guest.

2010-07-06 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_para.h |5 arch/x86/kernel/kvm.c | 49 +++ arch/x86/kernel/smpboot.c |3 ++ include/linux/kvm_para.h|2 + 4 files changed, 59 insertions(+), 0 deletions(-) dif

[PATCH v4 01/12] Move kvm_smp_prepare_boot_cpu() from kvmclock.c to kvm.c.

2010-07-06 Thread Gleb Natapov
Async PF also needs to hook into smp_prepare_boot_cpu so move the hook into generic code. Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_para.h |1 + arch/x86/kernel/kvm.c | 11 +++ arch/x86/kernel/kvmclock.c | 13 + 3 files changed, 13 insert

[PATCH v4 04/12] Provide special async page fault handler when async PF capability is detected

2010-07-06 Thread Gleb Natapov
When async PF capability is detected hook up special page fault handler that will handle async page fault events and bypass other page faults to regular page fault handler. Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_para.h |3 + arch/x86/include/asm/traps.h|1 + arch/x8

[PATCH v4 06/12] Add get_user_pages() variant that fails if major fault is required.

2010-07-06 Thread Gleb Natapov
This patch add get_user_pages() variant that only succeeds if getting a reference to a page doesn't require major fault. Reviewed-by: Rik van Riel Signed-off-by: Gleb Natapov --- fs/ncpfs/mmap.c|2 ++ include/linux/mm.h |5 + mm/filemap.c |3 +++ mm/memory.c|

[PATCH v4 09/12] Retry fault before vmentry

2010-07-06 Thread Gleb Natapov
When page is swapped in it is mapped into guest memory only after guest tries to access it again and generate another fault. To save this fault we can map it immediately since we know that guest is going to access the page. Signed-off-by: Gleb Natapov --- arch/x86/include/asm/kvm_host.h |7 +

[PATCH v4 00/12] KVM: Add host swap event notifications for PV guest

2010-07-06 Thread Gleb Natapov
KVM virtualizes guest memory by means of shadow pages or HW assistance like NPT/EPT. Not all memory used by a guest is mapped into the guest address space or even present in a host memory at any given time. When vcpu tries to access memory page that is not mapped into the guest address space KVM is

[PATCH v4 08/12] Inject asynchronous page fault into a guest if page is swapped out.

2010-07-06 Thread Gleb Natapov
If guest access swapped out memory do not swap it in from vcpu thread context. Setup slow work to do swapping and send async page fault to a guest. Allow async page fault injection only when guest is in user mode since otherwise guest may be in non-sleepable context and will not be able to resched

[PATCH v4 07/12] Maintain memslot version number

2010-07-06 Thread Gleb Natapov
Code that depends on particular memslot layout can track changes and adjust to new layout. Signed-off-by: Gleb Natapov --- include/linux/kvm_host.h |1 + virt/kvm/kvm_main.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux

[PATCH v4 10/12] Handle async PF in non preemptable context

2010-07-06 Thread Gleb Natapov
If async page fault is received by idle task or when preemp_count is not zero guest cannot reschedule, so do sti; hlt and wait for page to be ready. vcpu can still process interrupts while it waits for the page to be ready. Signed-off-by: Gleb Natapov --- arch/x86/kernel/kvm.c | 36 +++

Re: random crash in post_kvm_run()

2010-07-06 Thread BuraphaLinux Server
On 7/6/10, Avi Kivity wrote: > On 07/06/2010 10:46 AM, Avi Kivity wrote: >> >> I'll investigate further. >> > > Patch posted. Hello Avi Kitty, I spent the day getting things ready for you to log in, but was amazed to find you already had a patch ready for testing, which was good news. I wasn't

Re: [Qemu-devel] KVM Call agenda for July 6th

2010-07-06 Thread Anthony Liguori
On 07/06/2010 10:27 AM, Kevin Wolf wrote: Any chance to get the next series (Split ide-drive and scsi-disk qdevs, and more) as well? 1-3/8 are bug fixes, and 4/8 removes unreliable information from info block; wanted in .13. 5-8/8 could be punted to .14. If it's purely bug fixes, I think

Re: [Qemu-devel] KVM call minutes for July 6

2010-07-06 Thread Cam Macdonell
On Tue, Jul 6, 2010 at 8:46 AM, Juan Quintela wrote: > > Today was a short call as Anthony didn't attend. > > - Jes reminded people that Linux Plumbers deadline is July 19th > - Qemu 0.13 (from the agenda, we didn't discuss it without Anthony). > > List of patches missing commit/comment/review fro

Re: [Qemu-devel] KVM Call agenda for July 6th

2010-07-06 Thread Kevin Wolf
Am 06.07.2010 17:19, schrieb Markus Armbruster: > Kevin Wolf writes: > >> Am 06.07.2010 15:53, schrieb Anthony Liguori: >>> On 07/06/2010 08:37 AM, Kevin Wolf wrote: Am 06.07.2010 15:26, schrieb Anthony Liguori: > On 07/05/2010 09:05 AM, Luiz Capitulino wrote: > >>

Re: [Qemu-devel] KVM Call agenda for July 6th

2010-07-06 Thread Markus Armbruster
Kevin Wolf writes: > Am 06.07.2010 15:53, schrieb Anthony Liguori: >> On 07/06/2010 08:37 AM, Kevin Wolf wrote: >>> Am 06.07.2010 15:26, schrieb Anthony Liguori: >>> On 07/05/2010 09:05 AM, Luiz Capitulino wrote: > On Mon, 05 Jul 2010 14:45:23 +0200 > Juan Quintela w

Re: [PATCH 2/2] KVM: Prevent internal slots from being COWed

2010-07-06 Thread Avi Kivity
On 07/06/2010 05:45 PM, Andrea Arcangeli wrote: Ouch, corrected and applied. I think I tracked down the corruption during swapping with THP enabled to this bug. The real bug is that the mmu notifier fires (it's not like fork isn't covered by the mmu notifier) but KVM ignores it and keeps

KVM call minutes for July 6

2010-07-06 Thread Juan Quintela
Today was a short call as Anthony didn't attend. - Jes reminded people that Linux Plumbers deadline is July 19th - Qemu 0.13 (from the agenda, we didn't discuss it without Anthony). List of patches missing commit/comment/review from Anthony. We decided to send to the list an initial list, and a

Re: [PATCH 2/2] KVM: Prevent internal slots from being COWed

2010-07-06 Thread Andrea Arcangeli
On Tue, Jun 22, 2010 at 02:17:44PM +0300, Avi Kivity wrote: > On 06/21/2010 11:23 PM, Marcelo Tosatti wrote: > > On Mon, Jun 21, 2010 at 11:18:13AM +0300, Avi Kivity wrote: > > > >> If a process with a memory slot is COWed, the page will change its address > >> (despite having an elevated refer

Re: [Qemu-devel] KVM Call agenda for July 6th

2010-07-06 Thread Kevin Wolf
Am 06.07.2010 15:53, schrieb Anthony Liguori: > On 07/06/2010 08:37 AM, Kevin Wolf wrote: >> Am 06.07.2010 15:26, schrieb Anthony Liguori: >> >>> On 07/05/2010 09:05 AM, Luiz Capitulino wrote: >>> On Mon, 05 Jul 2010 14:45:23 +0200 Juan Quintela wrote: >

Re: [Qemu-devel] KVM Call agenda for July 6th

2010-07-06 Thread Alex Williamson
On Tue, 2010-07-06 at 08:26 -0500, Anthony Liguori wrote: > On 07/05/2010 11:52 PM, Alex Williamson wrote: > > On Mon, 2010-07-05 at 11:05 -0300, Luiz Capitulino wrote: > > > >> On Mon, 05 Jul 2010 14:45:23 +0200 > >> Juan Quintela wrote: > >> > >> > >>> Please send in any agenda items y

Re: [Qemu-devel] KVM Call agenda for July 6th

2010-07-06 Thread Anthony Liguori
On 07/06/2010 08:37 AM, Kevin Wolf wrote: Am 06.07.2010 15:26, schrieb Anthony Liguori: On 07/05/2010 09:05 AM, Luiz Capitulino wrote: On Mon, 05 Jul 2010 14:45:23 +0200 Juan Quintela wrote: Please send in any agenda items you are interested in covering. - 0.1

[PATCH 2/2] KVM: MMU: Keep going on permission error

2010-07-06 Thread Avi Kivity
Real hardware disregards permission errors when computing page fault error code bit 0 (page present). Do the same. Signed-off-by: Avi Kivity --- arch/x86/kvm/paging_tmpl.h | 50 +-- 1 files changed, 29 insertions(+), 21 deletions(-) diff --git a/arch/x

[PATCH 0/2] Fix walk_addr() page fault error codes

2010-07-06 Thread Avi Kivity
This patchset fixes bugs in page fault error code generation. With the patches applied, the access.flat unit test now passes with no errors on shadow, npt, and ept. Avi Kivity (2): KVM: MMU: Only indicate a fetch fault in page fault error code if nx is enabled KVM: MMU: Keep going on perm

[PATCH 1/2] KVM: MMU: Only indicate a fetch fault in page fault error code if nx is enabled

2010-07-06 Thread Avi Kivity
Bit 4 of the page fault error code is set only if EFER.NX is set. Signed-off-by: Avi Kivity --- arch/x86/kvm/paging_tmpl.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index dfb2720..56c7f4f 100644 --- a/arch/x8

Re: [Qemu-devel] KVM Call agenda for July 6th

2010-07-06 Thread Kevin Wolf
Am 06.07.2010 15:26, schrieb Anthony Liguori: > On 07/05/2010 09:05 AM, Luiz Capitulino wrote: >> On Mon, 05 Jul 2010 14:45:23 +0200 >> Juan Quintela wrote: >> >> >>> Please send in any agenda items you are interested in covering. >>> >> - 0.13 release >> > > I was hoping to do -rc0

Re: KVM Call agenda for July 6th

2010-07-06 Thread Anthony Liguori
On 07/05/2010 07:45 AM, Juan Quintela wrote: Please send in any agenda items you are interested in covering. If we have a lack of agenda items I'll cancel the week's call. I've got a lot to catch up on after the mini-holiday so I'd rather skip the call unless there's a pressing agenda ite

Re: [Qemu-devel] KVM Call agenda for July 6th

2010-07-06 Thread Anthony Liguori
On 07/05/2010 11:52 PM, Alex Williamson wrote: On Mon, 2010-07-05 at 11:05 -0300, Luiz Capitulino wrote: On Mon, 05 Jul 2010 14:45:23 +0200 Juan Quintela wrote: Please send in any agenda items you are interested in covering. - 0.13 release - migration + hotplug fixes

Re: [Qemu-devel] KVM Call agenda for July 6th

2010-07-06 Thread Anthony Liguori
On 07/05/2010 09:05 AM, Luiz Capitulino wrote: On Mon, 05 Jul 2010 14:45:23 +0200 Juan Quintela wrote: Please send in any agenda items you are interested in covering. - 0.13 release I was hoping to do -rc0 before the holiday but that didn't happen so I'm working on it now. F

Re: [PATCH 5/6] KVM: x86 emulator: fix 'mov AL,moffs' instruction decoding

2010-07-06 Thread Avi Kivity
On 07/06/2010 11:53 AM, Wei Yongjun wrote: > 'mov AL,moffs' do not need decode dest operand and > 'mov moffs,AL' do not need decode source operand. > > > @@ -177,8 +177,8 @@ static u32 opcode_table[256] = { > 0, 0, SrcImmFAddr | No64, 0, > ImplicitOps | Stack, ImplicitOps | Stack, 0, 0,

Re: [PATCH v5 4/9] KVM: MMU: introduce gfn_to_pfn_atomic() function

2010-07-06 Thread Xiao Guangrong
Gleb Natapov wrote: >> +} >> >> if (unlikely(npages != 1)) { >> struct vm_area_struct *vma; >> >> +if (atomic) >> +goto return_bad_page; >> + > You are skipping hwpoison test and sometimes you will return bad_page > for something that ret

Re: [PATCH v5 4/9] KVM: MMU: introduce gfn_to_pfn_atomic() function

2010-07-06 Thread Gleb Natapov
On Tue, Jul 06, 2010 at 06:47:47PM +0800, Xiao Guangrong wrote: > Introduce gfn_to_pfn_atomic(), it's the fast path and can used in atomic > context, the later patch will use it > > Signed-off-by: Xiao Guangrong > --- > include/linux/kvm_host.h |1 + > virt/kvm/kvm_main.c | 32 +++

[PATCH v5 9/9] KVM: MMU: trace pte prefetch

2010-07-06 Thread Xiao Guangrong
Trace pte prefetch, it can help us to improve the prefetch's performance Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 40 ++-- arch/x86/kvm/mmutrace.h| 33 + arch/x86/kvm/paging_tmpl.h | 23 ++

[PATCH v5 8/9] KVM: MMU: combine guest pte read between fetch and pte prefetch

2010-07-06 Thread Xiao Guangrong
Combine guest pte read between guest pte check in the fetch path and pte prefetch Signed-off-by: Xiao Guangrong --- arch/x86/kvm/paging_tmpl.h | 69 ++- 1 files changed, 42 insertions(+), 27 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x

[PATCH v5 7/9] KVM: MMU: prefetch ptes when intercepted guest #PF

2010-07-06 Thread Xiao Guangrong
Support prefetch ptes when intercept guest #PF, avoid to #PF by later access If we meet any failure in the prefetch path, we will exit it and not try other ptes to avoid become heavy path Will do: fix dirty bit tracking in the speculative path Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu

[PATCH v5 6/9] KVM: MMU: introduce pte_prefetch_topup_memory_cache()

2010-07-06 Thread Xiao Guangrong
Introduce this function to topup prefetch cache Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 25 + 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 3dcd55d..cda4587 100644 --- a/arch/x86/kvm/mmu.c ++

[PATCH v5 5/9] KVM: MMU: introduce gfn_to_page_many_atomic() function

2010-07-06 Thread Xiao Guangrong
This function not only return the gfn's page but also the page number after @gfn in the slot Signed-off-by: Xiao Guangrong --- include/linux/kvm_host.h |2 ++ virt/kvm/kvm_main.c | 29 - 2 files changed, 30 insertions(+), 1 deletions(-) diff --git a/includ

[PATCH v5 4/9] KVM: MMU: introduce gfn_to_pfn_atomic() function

2010-07-06 Thread Xiao Guangrong
Introduce gfn_to_pfn_atomic(), it's the fast path and can used in atomic context, the later patch will use it Signed-off-by: Xiao Guangrong --- include/linux/kvm_host.h |1 + virt/kvm/kvm_main.c | 32 +--- 2 files changed, 26 insertions(+), 7 deletions(-)

[PATCH v5 3/9] export __get_user_pages_fast() function

2010-07-06 Thread Xiao Guangrong
This function is used by KVM to pin process's page in the atomic context. Define the 'weak' function to avoid other architecture not support it Acked-by: Nick Piggin Signed-off-by: Xiao Guangrong --- mm/util.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git

[PATCH v5 2/9] KVM: MMU: fix race between 'walk_addr' and 'fetch'

2010-07-06 Thread Xiao Guangrong
'walk_addr' is out of mmu_lock's protection, so while we handle 'fetch', then guest's mapping has modifited by other vcpu's write path, such as invlpg, pte_write and other fetch path Fixed by checking all level's mapping Signed-off-by: Xiao Guangrong --- arch/x86/kvm/paging_tmpl.h | 73 ++

[PATCH v5 1/9] KVM: MMU: fix forgot reserved bits check in speculative path

2010-07-06 Thread Xiao Guangrong
In the speculative path, we should check guest pte's reserved bits just as the real processor does Reported-by: Marcelo Tosatti Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |3 +++ arch/x86/kvm/paging_tmpl.h |3 ++- 2 files changed, 5 insertions(+), 1 deletions(-) diff

RE: [PATCH 8/24] Hold a vmcs02 for each vmcs12

2010-07-06 Thread Dong, Eddie
> +/* Allocate an L0 VMCS (vmcs02) for the current L1 VMCS (vmcs12), if > one + * does not already exist. The allocation is done in L0 memory, > so to avoid + * denial-of-service attack by guests, we limit the > number of concurrently- + * allocated vmcss. A well-behaving L1 will > VMCLEAR unused v

[ kvm-Bugs-2124690 ] external modules dont support seperate linux output dir

2010-07-06 Thread SourceForge.net
Bugs item #2124690, was opened at 2008-09-23 16:38 Message generated for change (Comment added) made by jessorensen You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2124690&group_id=180599 Please note that this message will contain a full copy of the comme

Re: [PATCH 1/6] KVM: x86 emulator: fix 'mov sreg,rm16' instruction decoding

2010-07-06 Thread Avi Kivity
On 07/06/2010 11:49 AM, Wei Yongjun wrote: > Memory reads for 'mov sreg,rm16' should be 16 bits only. > > Applied all 6, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord

[PATCH 6/6] KVM: x86 emulator: fix cli/sti instruction emulation

2010-07-06 Thread Wei Yongjun
If IOPL check fail, the cli/sti emulate GP and then we should skip writeback since the default write OP is OP_REG. Signed-off-by: Wei Yongjun --- arch/x86/kvm/emulate.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate

[PATCH 5/6] KVM: x86 emulator: fix 'mov AL,moffs' instruction decoding

2010-07-06 Thread Wei Yongjun
'mov AL,moffs' do not need decode dest operand and 'mov moffs,AL' do not need decode source operand. Signed-off-by: Wei Yongjun --- arch/x86/kvm/emulate.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 8337567..d4

[PATCH 4/6] KVM: x86 emulator: fix 'mov rm,sreg' instruction decoding

2010-07-06 Thread Wei Yongjun
The source operand of 'mov rm,sreg' is segment register, not general-purpose register, so remove SrcReg from decoding. Signed-off-by: Wei Yongjun --- arch/x86/kvm/emulate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c i

[PATCH 3/6] KVM: x86 emulator: fix 'and AL,imm8' instruction decoding

2010-07-06 Thread Wei Yongjun
'and AL,imm8' should be mask as ByteOp, otherwise the dest operand length will no correct and we may fill the full EAX when writeback. Signed-off-by: Wei Yongjun --- arch/x86/kvm/emulate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86

[PATCH 2/6] KVM: x86 emulator: fix the comment of out instruction

2010-07-06 Thread Wei Yongjun
Fix the comment of out instruction, using the same style as the other instructions. Signed-off-by: Wei Yongjun --- arch/x86/kvm/emulate.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index d842a7d..ad8d7cd 100644 ---

[PATCH 1/6] KVM: x86 emulator: fix 'mov sreg,rm16' instruction decoding

2010-07-06 Thread Wei Yongjun
Memory reads for 'mov sreg,rm16' should be 16 bits only. Signed-off-by: Wei Yongjun --- arch/x86/kvm/emulate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index e8bdddc..d842a7d 100644 --- a/arch/x86/kvm/emulate.c +++

Re: random crash in post_kvm_run()

2010-07-06 Thread Avi Kivity
On 07/06/2010 10:46 AM, Avi Kivity wrote: I'll investigate further. Patch posted. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at ht

[PATCH] KVM: VMX: Fix host MSR_KERNEL_GS_BASE corruption

2010-07-06 Thread Avi Kivity
enter_lmode() and exit_lmode() modify the guest's EFER.LMA before calling vmx_set_efer(). However, the latter function depends on the value of EFER.LMA to determine whether MSR_KERNEL_GS_BASE needs reloading, via vmx_load_host_state(). With EFER.LMA changing under its feet, it took the wrong choi

Re: random crash in post_kvm_run()

2010-07-06 Thread Avi Kivity
On 07/05/2010 10:42 AM, Avi Kivity wrote: Please don't top-post. On 07/03/2010 05:23 PM, BuraphaLinux Server wrote: Ok, I kept going like you said. Here is what it said: $git bisect good 44ea2b1758d88ad822e65b1c4c21ca6164494e27 is the first bad commit commit 44ea2b1758d88ad822e65b1c4c21ca616

Re: [patch 3/3] kvm test: long rmap chains

2010-07-06 Thread Avi Kivity
On 07/05/2010 09:16 PM, Marcelo Tosatti wrote: test long rmap chains + +int main (void) +{ +int i; +int nr_pages; +void *target_page, *virt_addr; + +setup_vm(); + +nr_pages = inl(0xd1) / PAGE_SIZE; +nr_pages -= 1000; No need to depend on the number of physical pages

Re: [patch 0/3] [RESEND] kvm test: test rmap chains

2010-07-06 Thread Avi Kivity
On 07/05/2010 09:16 PM, Marcelo Tosatti wrote: Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/m