From: Takuya Yoshikawa
Avoid two step jump to the error handling part. This eliminates the use
of the variables present and rsvd_fault.
We also use the const type qualifier to show that write/user/fetch_fault
do not change in the function.
Both of these were suggested by Ingo Molnar.
Cc
From: Takuya Yoshikawa
The current name does not explain the meaning well. So give it a better
name "retry_walk" to show that we are trying the walk again.
This was suggested by Ingo Molnar.
Cc: Ingo Molnar
Signed-off-by: Takuya Yoshikawa
---
v2-v3: only changelog update
ar
From: Takuya Yoshikawa
Suggested by Ingo and Avi.
Cc: Ingo Molnar
Signed-off-by: Takuya Yoshikawa
---
v2-v3: dropped set_accessed_bit()
arch/x86/kvm/paging_tmpl.h | 26 +++---
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h b
This is the v4 of my walk_addr_generic() cleanup.
Changelog v3-v4: fixed v3's reversed present mask.
This time, I have tested the patch set with kvm-unit-tests/x86/access.flat.
npt=0
---
enabling apic
starting test
run
1572866 tests, 0 failures
---
npt=1
---
enabling apic
starting test
run
From: Takuya Yoshikawa
Avoid two step jump to the error handling part. This eliminates the use
of the variables present and rsvd_fault.
We also use the const type qualifier to show that write/user/fetch_fault
do not change in the function.
Both of these were suggested by Ingo Molnar.
Cc
From: Takuya Yoshikawa
The current name does not explain the meaning well. So give it a better
name "retry_walk" to show that we are trying the walk again.
This was suggested by Ingo Molnar.
Cc: Ingo Molnar
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/paging_tmpl.h |6
From: Takuya Yoshikawa
Suggested by Ingo and Avi.
Cc: Ingo Molnar
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/paging_tmpl.h | 26 +++---
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index
Passed emulator.flat test:
SUMMARY: 88 tests, 0 failures
Takuya
--
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/majordomo-info.html
From: Takuya Yoshikawa
Instead of passing ctxt->_eip from insn_fetch() call sites, get it from
ctxt in do_insn_fetch_byte(). This is done by replacing the argument
_eip of insn_fetch() with _ctxt, which should be better than letting the
macro use ctxt silently in its body.
Though this chan
From: Takuya Yoshikawa
_type is enough to know the size.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 44 ++--
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index
From: Takuya Yoshikawa
Fetching the instruction which was to be executed by the guest cannot
fail normally. So compiler should always predict that it will succeed.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff
From: Takuya Yoshikawa
Return EMULATION_OK/FAILED consistently. Also treat instruction fetch
errors, not restricted to X86EMUL_UNHANDLEABLE, as EMULATION_FAILED;
although this cannot happen in practice, the current logic will continue
the emulation even if the decoder fails to fetch the
On Sun, 31 Jul 2011 11:48:40 +0300
Avi Kivity wrote:
> On 07/30/2011 12:03 PM, Takuya Yoshikawa wrote:
> > From: Takuya Yoshikawa
> >
> > Return EMULATION_OK/FAILED consistently. Also treat instruction fetch
> > errors, not restricted to X86EMUL_UNHANDLEABLE, as EMU
On Thu, 12 Jul 2012 02:02:24 +0100
"Vinod, Chegu" wrote:
> There have been some recent fixes (from Juan) that are supposed to honor the
> user requested downtime. I am in the middle of redoing some of my
> experiments...and will share when they are ready (in about 3-4 days).
> Initial observa
On Thu, 5 Jul 2012 23:05:46 +0900
Takuya Yoshikawa wrote:
> On Thu, 5 Jul 2012 14:50:00 +0300
> Gleb Natapov wrote:
>
> > > Note that "if (!nr_to_scan--)" check is removed since we do not try to
> > > free mmu pages from more than one VM.
> > >
On Thu, 5 Jul 2012 10:08:07 -0300
Marcelo Tosatti wrote:
> Neat.
>
> Andrea can you please ACK?
>
ping
--
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/majordomo-info.html
On Wed, 18 Jul 2012 17:52:46 -0300
Marcelo Tosatti wrote:
> Can't understand, can you please expand more clearly?
I think mmu pages are not worth freeing under usual memory pressure,
especially when we have EPT/NPT on.
What's happening:
shrink_slab() vainly calls mmu_shrink() with the default
On Thu, 26 Jul 2012 11:56:15 +0300
Avi Kivity wrote:
> Since my comments are better done as a separate patch, I applied all
> three patches. Thanks!
Is this patch really safe for all architectures?
IS_ERR_VALUE() casts -MAX_ERRNO to unsigned long and then does comparison.
Isn't it possible to
On Thu, 26 Jul 2012 17:35:13 +0800
Xiao Guangrong wrote:
> > Is this patch really safe for all architectures?
> >
> > IS_ERR_VALUE() casts -MAX_ERRNO to unsigned long and then does comparison.
> > Isn't it possible to conflict with valid pfns?
> >
>
> See IS_ERR_VALUE():
>
> #define IS_ERR_VA
tions?
Takuya Yoshikawa (3):
KVM: Stop checking rmap to see if slot is being created
KVM: MMU: Use gfn_to_rmap() instead of directly reading rmap array
KVM: Push rmap into kvm_arch_memory_slot
arch/powerpc/include/asm/kvm_host.h |1 +
arch/powerpc/kvm/book3s_64_mmu_hv.c |6 ++--
arch/po
Instead, check npages consistently. This helps to make rmap
architecture specific in a later patch.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/x86.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b6379e5..701dbd4
This helps to make rmap architecture specific in a later patch.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/mmu.c |3 ++-
arch/x86/kvm/mmu_audit.c |4 +---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index a9a2052
Two reasons:
- x86 can integrate rmap and rmap_pde and remove heuristics in
__gfn_to_rmap().
- Some architectures do not need rmap.
Since rmap is one of the most memory consuming stuff in KVM, ppc'd
better restrict the allocation to Book3S HV.
Signed-off-by: Takuya Yoshikawa
Cc:
y for big-endian
case, than the generic __set_bit_le(), it should not be a problem to
use the latter since both maintainers prefer it.
Ben Hutchings (1):
sfc: Use standard __{clear,set}_bit_le() functions
Takuya Yoshikawa (4):
drivers/net/ethernet/dec/tulip: Use standard __set_bit_le() fun
From: Ben Hutchings
There are now standard functions for dealing with little-endian bit
arrays, so use them instead of our own implementations.
Signed-off-by: Ben Hutchings
Signed-off-by: Takuya Yoshikawa
---
drivers/net/ethernet/sfc/efx.c|4 ++--
drivers/net/ethernet/sfc
From: Takuya Yoshikawa
To introduce generic set_bit_le() later, we remove our own definition
and use a proper non-atomic bitops function: __set_bit_le().
Signed-off-by: Takuya Yoshikawa
Acked-by: Grant Grundler
---
drivers/net/ethernet/dec/tulip/de2104x.c|7 ++-
drivers/net
From: Takuya Yoshikawa
Needed to replace test_and_set_bit_le() in virt/kvm/kvm_main.c which is
being used for this missing function.
Signed-off-by: Takuya Yoshikawa
Acked-by: Arnd Bergmann
---
include/asm-generic/bitops/le.h | 10 ++
1 files changed, 10 insertions(+), 0 deletions
From: Takuya Yoshikawa
Needed to replace test_and_set_bit_le() in virt/kvm/kvm_main.c which is
being used for this missing function.
Signed-off-by: Takuya Yoshikawa
Acked-by: Benjamin Herrenschmidt
---
arch/powerpc/include/asm/bitops.h | 10 ++
1 files changed, 10 insertions(+), 0
From: Takuya Yoshikawa
Now that we have defined generic set_bit_le() we do not need to use
test_and_set_bit_le() for atomically setting a bit.
Signed-off-by: Takuya Yoshikawa
Cc: Avi Kivity
Cc: Marcelo Tosatti
---
virt/kvm/kvm_main.c |3 +--
1 files changed, 1 insertions(+), 2 deletions
On Tue, 7 Aug 2012 12:57:13 +0200
Alexander Graf wrote:
> +struct kvm_memory_slot *hva_to_memslot(struct kvm *kvm, hva_t hva)
> +{
> + struct kvm_memslots *slots = kvm_memslots(kvm);
> + struct kvm_memory_slot *memslot;
> +
> + kvm_for_each_memslot(memslot, slots)
> + if
On Thu, 9 Aug 2012 22:25:32 -0300
Marcelo Tosatti wrote:
> I'll send a patch to flush per memslot in the next days, you can work
> out the PPC details in the meantime.
Are you going to implement that using slot_bitmap?
Since I'm now converting kvm_mmu_slot_remove_write_access() to
rmap based pr
mmu pages as before.
Note that "if (!nr_to_scan--)" check is removed since we do not try to
free mmu pages from more than one VM.
Signed-off-by: Takuya Yoshikawa
Cc: Gleb Natapov
---
This patch just recovers the original behaviour and is not related
to how to improve mmu_shrink() f
On Mon, 13 Aug 2012 19:15:23 -0300
Marcelo Tosatti wrote:
> On Fri, Aug 10, 2012 at 05:16:12PM +0900, Takuya Yoshikawa wrote:
> > The following commit changed mmu_shrink() so that it would skip VMs
> > whose n_used_mmu_pages was not zero and try to free pages from others:
&g
On Tue, 14 Aug 2012 12:17:12 -0300
Marcelo Tosatti wrote:
> - if (kvm->arch.n_used_mmu_pages > 0) {
> - if (!nr_to_scan--)
> - break;
-- (*1)
> + if (!kvm->arch.n_used_mmu_pages)
> continue;
ved in the future.
Signed-off-by: Takuya Yoshikawa
Cc: Gleb Natapov
---
arch/x86/kvm/mmu.c | 13 +
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 9651c2c..5e4b255 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm
On Thu, 23 Aug 2012 15:42:49 +0800
Gavin Shan wrote:
> The build error was caused by that builtin functions are calling
> the functions implemented in modules. That was introduced by the
> following commit.
>
> commit 4d8b81abc47b83a1939e59df2fdb0e98dfe0eedd
>
> The patches fix that to convert
Alex, what do you think about this?
On Thu, 23 Aug 2012 16:35:15 +0800
Gavin Shan wrote:
> On Thu, Aug 23, 2012 at 05:24:00PM +0900, Takuya Yoshikawa wrote:
> >On Thu, 23 Aug 2012 15:42:49 +0800
> >Gavin Shan wrote:
> >
> >> The build error was caused by that
loop and then use __fls() if found. When
nothing found, we are out of the loop, so we can just return -1.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/lapic.c | 18 ++
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm
On Fri, 24 Aug 2012 15:54:59 -0300
Marcelo Tosatti wrote:
> Other arches do not need this.
>
> Signed-off-by: Marcelo Tosatti
>
> Index: kvm/arch/x86/kvm/x86.c
> ===
> --- kvm.orig/arch/x86/kvm/x86.c
> +++ kvm/arch/x86/kvm/x86.c
>
On Mon, 27 Aug 2012 16:06:01 -0300
Marcelo Tosatti wrote:
> > Any explanation why (old.base_gfn != new.base_gfn) case can be
> > omitted?
>
> (old.base_gfn != new.base_gfn) check covers the cases
>
> 1. old.base_gfn = 0, new.base_gfn = !0 (slot creation)
>
> and
>
> x != 0, y != 0, x != y.
>
On Mon, 27 Aug 2012 17:25:42 -0300
Marcelo Tosatti wrote:
> On Fri, Aug 24, 2012 at 06:15:49PM +0900, Takuya Yoshikawa wrote:
> > Although returning -1 should be likely according to the likely(),
> > the ASSERT in apic_find_highest_irr() will be triggered in such a case.
> &g
On Thu, 30 Aug 2012 01:51:20 +0300
"Michael S. Tsirkin" wrote:
> This text:
> + if (likely(!word_offset && !word[0]))
> + return -1;
> is a left-over from the original implementation.
>
> There we did a ton of gratitious calls to interrupt
> injection so it was important to s
On Thu, 30 Aug 2012 09:37:02 +0300
"Michael S. Tsirkin" wrote:
> After staring at your code for a while it does appear to
> do the right thing, and looks cleaner than what
> we have now. commit log could be clearer.
> It should state something like:
>
>
> Clean up code in find_highest_vector:
>
On Thu, 30 Aug 2012 13:10:33 +0300
"Michael S. Tsirkin" wrote:
> > OK, I'll do these on top of this patch.
>
> Tweaking these 5 lines for readability across multiple
> patches is just not worth it.
> As long as we do random cleanups of this function it's probably easier
> to just do them all in
, to iterate over the register array to make
the code clearer.
Note that we actually confirmed that the likely() did wrong predictions
by inserting debug code.
Signed-off-by: Takuya Yoshikawa
Cc: Michael S. Tsirkin
---
arch/x86/kvm/lapic.c | 35 +++
1 files
On Thu, 30 Aug 2012 16:21:31 +0300
"Michael S. Tsirkin" wrote:
> > +static u32 apic_read_reg(int reg_off, void *bitmap)
> > +{
> > + return *((u32 *)(bitmap + reg_off));
> > +}
> > +
>
> Contrast with apic_set_reg which gets apic,
> add fact that all callers invoke REG_POS and you will
> see
68S / del_from_rr
--
Takuya Yoshikawa
--
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/majordomo-info.html
Vivek Goyal wrote:
> So you are using both RHEL 6.0 in both host and guest kernel? Can you
> reproduce the same issue with upstream kernels? How easily/frequently
> you can reproduce this with RHEL6.0 host.
Guests were CentOS6.0.
I have only RHEL6.0 and RHEL6.1 test results now.
I want to try s
On Tue, 13 Sep 2011 10:45:40 +0300
Avi Kivity wrote:
> Simplifies further generalization of decode.
>
> Signed-off-by: Avi Kivity
> ---
> arch/x86/include/asm/kvm_emulate.h |2 ++
> arch/x86/kvm/emulate.c | 34 +-
> 2 files changed, 19 insertio
On Wed, 14 Sep 2011 14:37:21 +0300
Avi Kivity wrote:
> > Once the emulator context gets stablized, some comments will be nice
> > to know which ones are supposed to be accessed from outside of the
> > emulator, and which ones are only for the emulator internal usage.
> >
> > Practically, knowing
This is a revised version of my previous work. I hope that
the patches are more self explanatory than before.
Thanks,
Takuya
--
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.o
Remove redundant checks and use is_large_pte() macro.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/mmu.c |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index a9b3a32..973f254 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86
.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/mmu.c | 26 +-
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 973f254..fa71085 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -958,23 +958,29
before when the ratio of
dirty pages are low and was not worse even when the ratio was near the
criterion.
Note that the locking for this write protection becomes fine grained.
The reason why this is safe is descripted in the comments.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/include/asm
Needed for the next patch which uses this number to decide how to write
protect a slot.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/x86.c |9 +++--
include/linux/kvm_host.h |1 +
virt/kvm/kvm_main.c |4 +++-
3 files changed, 7 insertions(+), 7 deletions(-)
diff
(2011/11/14 19:22), Avi Kivity wrote:
+ *
+ * Generally speaking, if there are not so many dirty pages compared to the
+ * number of shadow pages, we should use the latter.
+ *
+ * Note that letting others write into a page marked dirty in the old bitmap
+ * by using the remaining tlb entry is n
(2011/11/14 19:25), Avi Kivity wrote:
On 11/14/2011 11:20 AM, Takuya Yoshikawa wrote:
This is a revised version of my previous work. I hope that
the patches are more self explanatory than before.
It looks good. I'll let Marcelo (or anyone else?) review it as well
before applying.
D
Adding qemu-devel ML to CC.
Your question should have been sent to qemu-devel ML because the logic
is implemented in QEMU, not KVM.
(2011/11/11 1:35), Oliver Hookins wrote:
Hi,
I am performing some benchmarks on KVM migration on two different types of VM.
One has 4GB RAM and the other 32GB. Mo
(2011/11/14 21:39), Avi Kivity wrote:
There was a patchset from Peter Zijlstra that converted mmu notifiers to
be preemptible, with that, we can convert the mmu spinlock to a mutex,
I'll see what happened to it.
Interesting!
There is a third method of doing write protection, and that is by
wr
Adding qemu-devel to Cc.
(2011/11/14 21:39), Avi Kivity wrote:
On 11/14/2011 12:56 PM, Takuya Yoshikawa wrote:
(2011/11/14 19:25), Avi Kivity wrote:
On 11/14/2011 11:20 AM, Takuya Yoshikawa wrote:
This is a revised version of my previous work. I hope that
the patches are more self
(2011/11/20 20:21), Avi Kivity wrote:
On 11/18/2011 11:18 AM, Xiao Guangrong wrote:
index bb8728e..10524c0 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -307,6 +307,10 @@ static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm
*kvm, int i)
(vcpup = kvm_get_
(2011/11/21 17:34), Avi Kivity wrote:
Do you have any preference for the arguments ordering?
I think placing the target one, memslot in this case, first is
conventional in
the kernel code, except when we want to place "kvm" or something like
that.
But in kvm code, there seems to be some differe
This patch set eats the remaining spaghetti in the emulator and
cleans up the large plate.
After this, only trivial cases will be there.
Passed emulator.flat test:
SUMMARY: 90 tests, 0 failures
Thanks,
Takuya
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
th
IN : E4, E5, EC, ED
OUT: E6, E7, EE, EF
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 54 ---
1 files changed, 28 insertions(+), 26 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 8547958..8ba4ea8
BT : 0F A3
BTS: 0F AB
BTR: 0F B3
BTC: 0F BB
Group 8: 0F BA
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 77 +++
1 files changed, 38 insertions(+), 39 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index
CALL: E8
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 18 ++
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 7a9ce6d..6b7a03b 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
MOV: 0F 22 (move to control registers)
MOV: 0F 23 (move to debug registers)
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 52 +++
1 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm
WRMSR: 0F 30
RDMSR: 0F 32
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 52
1 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 7fe5ed1..906c5eb 100644
--- a/arch
CMPXCHG: 0F B0, 0F B1
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 37 +++--
1 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 906c5eb..799000d 100644
--- a/arch/x86/kvm
BSF: 0F BC
BSR: 0F BD
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 60
1 files changed, 35 insertions(+), 25 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 799000d..4cd3313 100644
--- a/arch/x86
From: Takuya Yoshikawa
INSB : 6C
INSW/INSD : 6D
OUTSB : 6E
OUTSW/OUTSD: 6F
The I/O port address is read from the DX register when we decode the
operand because we see the SrcDX/DstDX flag is set.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 14 ++
1
(2011/11/24 18:40), Xiao Guangrong wrote:
...
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3521,7 +3521,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
if (log->slot>= KVM_MEMORY_SLOTS)
goto out;
- memslot =&kvm->memslots->memslots[log->slot];
+
(2011/11/24 19:15), Takuya Yoshikawa wrote:
(2011/11/24 18:40), Xiao Guangrong wrote:
You can eliminate this if you use old_slot and new_slot for the two memory
slots.
Or old_bitmap and new_bitmap. Anyway, calling id_to_memslot() for getting the
same slot twice is not good, IMO
Made when I was reading mmu code.
Takuya
BTW, is threre any good way to test large page functionality?
--
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/majordomo-info.html
There is only one user of it and for_each_set_bit() does the same.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/mmu.c |7 +--
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d737443..09da963 100644
--- a/arch/x86/kvm/mmu.c
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/mmu.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 09da963..5e761ff 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1803,6 +1803,7 @@ static void
on is_large_pte()
check result.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/mmu.c | 35 +--
arch/x86/kvm/paging_tmpl.h |4 ++--
2 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index
From: Takuya Yoshikawa
Access to this page is mostly done through the regs member which holds
the address to this page. The exceptions are in vmx_vcpu_reset() and
kvm_free_lapic() and these both can easily be converted to using regs.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/lapic.c
This patch is the last part of a work which tries to split
x86_emulate_insn() into a few meaningful functions: removes unnecessary
goto statements based on the former two patches.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 18 --
1 files changed, 4 insertions
This patch is the second part of a work which tries to split
x86_emulate_insn() into a few meaningful functions: just encapsulates
the switch statement for the two byte instruction emulation as
emulate_twobyte_insn().
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 286
rc set to X86EMUL_UNHANDLEABLE will result in
returning EMULATION_FAILED which is defined as -1.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 179 +++-
1 files changed, 100 insertions(+), 79 deletions(-)
diff --git a/arch/x86/kvm
On Thu, 10 Mar 2011 11:05:38 +0200
Avi Kivity wrote:
> On 03/10/2011 09:35 AM, Takuya Yoshikawa wrote:
> > x86_emulate_insn() is too long and has many confusing goto statements.
> >
> > This patch is the first part of a work which tries to split it into
> > a few
On Thu, 10 Mar 2011 11:27:30 +0200
Avi Kivity wrote:
> On 03/10/2011 11:26 AM, Takuya Yoshikawa wrote:
> I don't know if anyone is working on it, so feel free to send patches!
Yes, I'm interested in it. So I will take a look and try!
I was doing some live migration tests
This work will continue until we can remove the ugly switch statements.
But I want to do this with enough care not to insert extra errors.
-- For me, this is a good opportunity to read SDM well.
So the whole work will be done in a step by step manner!
Thanks,
Takuya
--
To unsubscribe from th
From: Takuya Yoshikawa
ADD, OR, ADC, SBB, AND, SUB, XOR, CMP are converted using a new macro
I6ALU(_f, _e).
CMPS, SCAS will be converted later.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 151
1 files changed, 88 insertions
From: Takuya Yoshikawa
PUSH ES/CS/SS/DS/FS/GS and POP ES/SS/DS/FS/GS are converted.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 111 +++-
1 files changed, 72 insertions(+), 39 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b
From: Takuya Yoshikawa
POP is converted. RET will be converted later.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 16 ++--
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index fcc49ef..8295c50
From: Takuya Yoshikawa
PUSHA and POPA are converted.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 19 ---
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 8295c50..4e16a55 100644
--- a/arch
From: Takuya Yoshikawa
PUSHF and POPF are converted.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c | 32 +---
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 4e16a55..60182d3
emulate_2op_SrcV("cmp", c->src, c->dst, ctxt->eflags);
> And here?
What is the difference of CMPS and SCAS?
>
> > + break;
> > case 0xc0 ... 0xc1:
> > emulate_grp2(ctxt);
> > break;
> > --
> &g
On Tue, 15 Mar 2011 11:35:07 +0200
Gleb Natapov wrote:
> > > Why not call em_cmp() here?
> >
> > I thought that I needed to check of
> > c->dst.type = OP_NONE; /* Disable writeback. */
> > later.
> >
> I mean call em_cmp() after c->dst.type = OP_NONE line, not replacing it.
I see the point
On Tue, 22 Mar 2011 14:53:21 +0200
Avi Kivity wrote:
>
> I prefer to have the patchset fully updated, even if it takes a while.
> Good luck with the recovery!
Things already got back as usual, thanks.
I had expected much longer time.
BTW, is it better to wait until rc1 is released when we se
On Tue, 22 Mar 2011 14:55:57 +0200
Avi Kivity wrote:
> > @@ -2337,10 +2401,20 @@ static int em_mov(struct x86_emulate_ctxt *ctxt)
> > #define D6ALU(_f) D2bv((_f) | DstMem | SrcReg | ModRM),
> > \
> > D2bv(((_f) | DstReg | SrcMem | ModRM)& ~Lock), \
> >
On Tue, 22 Mar 2011 15:03:11 +0200
Avi Kivity wrote:
> > +static int em_push_es(struct x86_emulate_ctxt *ctxt)
> > +{
> > + emulate_push_sreg(ctxt, ctxt->ops, VCPU_SREG_ES);
> > + return X86EMUL_CONTINUE;
> > +}
>
> I thought of adding generic sreg decoding, so we can use
> em_push()/em_pop
On Tue, 22 Mar 2011 15:06:33 +0200
Avi Kivity wrote:
> > POP is converted. RET will be converted later.
>
> There is also POP r/m (8F /0); could be done later.
>
OK, I'll recheck.
I want to put related things into one patch if possible.
Takuya
--
To unsubscribe from this list: send the line
On Tue, 22 Mar 2011 15:07:20 +0200
Avi Kivity wrote:
> > +static int em_pusha(struct x86_emulate_ctxt *ctxt)
> > +{
> > + return emulate_pusha(ctxt, ctxt->ops);
> > +}
> > +
>
> You can simply rename/update emulate_pusha/emulate_popa, since they have
> no other callers.
>
I intentionally le
From: Takuya Yoshikawa
This stops "CMP r/m, reg" to write back the data into memory.
Pointed out by Avi.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/emulate.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emula
From: Takuya Yoshikawa
Recently, emulate_push family functions started to call writeback()
during their emulation. This clearly shows that the usual writeback()
which is done at the end of x86_emulate_insn() cannot cover all cases.
Furthermore, suppressing writeback by changing dst operand
Takuya Yoshikawa wrote:
> @@ -1265,22 +1263,19 @@ int emulate_int_real(struct x86_emulate_ctxt *ctxt,
>
> /* TODO: Add limit checks */
> c->src.val = ctxt->eflags;
> - emulate_push(ctxt, ops);
> - rc = writeback(ctxt, ops);
> + rc = emulate_
ce operand" terminology. But it seemed not worth
it now.
Takuya
--
Takuya Yoshikawa
--
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/majordomo-info.html
1 - 100 of 946 matches
Mail list logo