On Tue, 10 Sep 2019 20:15:19 +0200
Thomas Huth wrote:
Hi,
> On 05/09/2019 19.15, Andre Przywara wrote:
> > The ARM architecture requires all accesses to device memory to be
> > naturally aligned[1][2]. Normal memory does not have this strict
> > requirement, and in fact many systems do ignore un
On 11/09/2019 10.16, Andre Przywara wrote:
> On Tue, 10 Sep 2019 20:15:19 +0200
> Thomas Huth wrote:
>
> Hi,
>
>> On 05/09/2019 19.15, Andre Przywara wrote:
>>> The ARM architecture requires all accesses to device memory to be
>>> naturally aligned[1][2]. Normal memory does not have this strict
On 05/09/2019 19.15, Andre Przywara wrote:
> The ARM architecture requires all accesses to device memory to be
> naturally aligned[1][2]. Normal memory does not have this strict
> requirement, and in fact many systems do ignore unaligned accesses
> (by the means of clearing the A bit in SCTLR and a
On Wed, 11 Sep 2019 03:33:36 +0100,
Zenghui Yu wrote:
>
> EC is the bits [31:26] of ESR_ELx on arm64 (HSR on arm). Print the
> hex value with its exact width (8).
>
> Signed-off-by: Zenghui Yu
> ---
> virt/kvm/arm/trace.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
Hi Marc,
On 2019/9/11 16:31, Marc Zyngier wrote:
On Wed, 11 Sep 2019 03:33:36 +0100,
Zenghui Yu wrote:
EC is the bits [31:26] of ESR_ELx on arm64 (HSR on arm). Print the
hex value with its exact width (8).
Signed-off-by: Zenghui Yu
---
virt/kvm/arm/trace.h | 2 +-
1 file changed, 1 inser
On Wed, 11 Sep 2019 10:19:05 +0100,
Zenghui Yu wrote:
>
> Hi Marc,
>
> On 2019/9/11 16:31, Marc Zyngier wrote:
> > On Wed, 11 Sep 2019 03:33:36 +0100,
> > Zenghui Yu wrote:
> >>
> >> EC is the bits [31:26] of ESR_ELx on arm64 (HSR on arm). Print the
> >> hex value with its exact width (8).
> >
On Wed, 11 Sep 2019 03:33:35 +0100,
Zenghui Yu wrote:
>
> Commit 49dfe94fe5ad ("KVM: arm/arm64: Fix TRACE_INCLUDE_PATH") fixes
> TRACE_INCLUDE_PATH to the correct relative path to the define_trace.h
> and explains why did the old one work.
>
> The same fix should be applied to virt/kvm/arm/vgic/
The end goal of this series is to dynamically size the memslot array so
that KVM allocates memory based on the number of memslots in use, as
opposed to unconditionally allocating memory for the maximum number of
memslots. On x86, each memslot consumes 88 bytes, and so with 2 address
spaces of 512
Remove kvm_arch_create_memslot() now that all arch implementations are
effectively nops. Explicitly free an allocated-but-unused dirty bitmap
instead of relying on kvm_free_memslot() now that setting a memslot can
no longer fail after arch code has allocated memory. In practice
this was already t
Rework kvm_get_dirty_log() so that it "returns" the associated memslot
on success. A future patch will rework memslot handling such that
id_to_memslot() can return NULL, returning the memslot makes it more
obvious that the validity of the memslot has been verified, i.e.
precludes the need to add v
Now that all callers of kvm_free_memslot() pass NULL for @dont, remove
the param from the top-level routine and all arch's implementations.
No functional change intended.
Signed-off-by: Sean Christopherson
---
arch/mips/include/asm/kvm_host.h | 2 +-
arch/powerpc/include/asm/kvm_ppc.h
Reinstall the old memslots if preparing the new memory region fails
after invalidating a to-be-{re}moved memslot.
Remove the superfluous 'old_memslots' variable so that it's somewhat
clear that the error handling path needs to free the unused memslots,
not simply the 'old' memslots.
Fixes: bc6678
Replace a big pile o' gotos with returns to make it more obvious what
error code is being returned, and to prepare for refactoring the
functional, i.e. post-checks, portion of __kvm_set_memory_region().
Signed-off-by: Sean Christopherson
---
virt/kvm/kvm_main.c | 40 ++---
Move the implementations of KVM_GET_DIRTY_LOG and KVM_CLEAR_DIRTY_LOG
for CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT into common KVM code.
The arch specific implemenations are extremely similar, differing
only in whether the dirty log needs to be sync'd from hardware (x86)
and how the TLBs are flushe
Move memslot deletion into its own routine so that the success path for
other memslot updates does not need to use kvm_free_memslot(), i.e. can
explicitly destroy the dirty bitmap when necessary. This paves the way
for dropping @dont from kvm_free_memslot(), i.e. all callers now pass
NULL for @don
Split out the core functionality of setting a memslot into a separate
helper in preparation for moving memslot deletion into its own routine.
Signed-off-by: Sean Christopherson
---
virt/kvm/kvm_main.c | 106 ++--
1 file changed, 63 insertions(+), 43 deleti
Now that the memslot logic doesn't assume memslots are always non-NULL,
dynamically size the array of memslots instead of unconditionally
allocating memory for the maximum number of memslots.
Note, because a to-be-deleted memslot must first be invalidated, the
array size cannot be immediately redu
Allocate the various metadata structures associated with a memslot
during during kvm_arch_prepare_memory_region(), which paves the way for
removing kvm_arch_create_memslot() altogether. Moving x86's memory
allocation only changes the order of kernel memory allocations between
x86 and common KVM co
Allocate the rmap array during kvm_arch_prepare_memory_region() to pave
the way for removing kvm_arch_create_memslot() altogether. Moving PPC's
memory allocation only changes the order of kernel memory allocations
between PPC and common KVM code.
No functional change intended.
Signed-off-by: Sea
Refactor memslot handling to treat the number of used slots as the de
facto size of the memslot array, e.g. return NULL from id_to_memslot()
when an invalid index is provided instead of relying on npages==0 to
detect an invalid memslot. Rework the sorting and walking of memslots
in advance of dyna
Clean up __kvm_set_memory_region() to achieve several goals:
- Remove local variables that serve no real purpose
- Improve the readability of the code
- Better show the relationship between the 'old' and 'new' memslot
- Prepare for dynamically sizing memslots.
Note, using 'tmp' to hold th
21 matches
Mail list logo