On Mon, 25 Apr 2022 12:44:39 +0100,
Alexandru Elisei wrote:
>
> The ESR_EL{1,2} registers were originally 32-bit, then were extended to
> 64-bit with the upper 32 bits RES0, and in ARM DDI 0487H.a the FEAT_LS64
> feature was added which now makes use of the upper bits. This series aims
> to teach
On Wed, 27 Apr 2022 18:13:32 +0100, Will Deacon wrote:
> When pKVM is enabled, host memory accesses are translated by an identity
> mapping at stage-2, which is populated lazily in response to synchronous
> exceptions from 64-bit EL1 and EL0.
>
> Extend this handling to cover exceptions originatin
On Mon, 25 Apr 2022 15:55:30 +0100, Alexandru Elisei wrote:
> kvm->arch.arm_pmu is set when userspace attempts to set the first PMU
> attribute. As certain attributes are mandatory, arm_pmu ends up always
> being set to a valid arm_pmu, otherwise KVM will refuse to run the VCPU.
> However, this onl
On Wed, 20 Apr 2022 14:42:51 -0700, Kalesh Singh wrote:
> This is v8 of the nVHE hypervisor stack enhancements. This version is based
> on 5.18-rc3.
>
> Previous versions can be found at:
> v7: https://lore.kernel.org/r/20220408200349.1529080-1-kaleshsi...@google.com/
> v6: https://lore.kernel.org
On Thu, 28 Apr 2022 17:07:21 +0100,
Alexandru Elisei wrote:
>
> Hi,
>
> On Thu, Apr 28, 2022 at 04:22:58PM +0100, Marc Zyngier wrote:
> > On Thu, 28 Apr 2022 09:46:21 +0100,
> > Alexandru Elisei wrote:
> > >
> > > Hi,
> > >
> > > On Wed, Apr 27, 2022 at 11:04:34PM +0100, Marc Zyngier wrote:
>
Hi,
On Thu, Apr 28, 2022 at 04:22:58PM +0100, Marc Zyngier wrote:
> On Thu, 28 Apr 2022 09:46:21 +0100,
> Alexandru Elisei wrote:
> >
> > Hi,
> >
> > On Wed, Apr 27, 2022 at 11:04:34PM +0100, Marc Zyngier wrote:
> > > When taking a translation fault for an IPA that is outside of
> > > the range
We know at user configuration time if the firmware address is outside
RAM, validate the address in kvm__arch_validate_cfg() before creating
the VM.
Signed-off-by: Alexandru Elisei
---
arm/kvm.c | 36 ++--
1 file changed, 14 insertions(+), 22 deletions(-)
diff --g
It makes little sense for the user to specify the firmware address when
loading a kernel instead of a firmware image. Treat it as an error.
Signed-off-by: Alexandru Elisei
---
arm/aarch32/kvm.c | 2 +-
arm/aarch64/kvm.c | 2 +-
arm/include/arm-common/kvm-arch.h |
Allow the user to specify the RAM base address by using -m/--mem size@addr
command line argument. The base address must be above 2GB, as to not
overlap with the MMIO I/O region.
Signed-off-by: Alexandru Elisei
---
arm/aarch64/include/kvm/kvm-arch.h | 2 ++
arm/aarch64/kvm.c |
The arm and arm64 permit the user to specify the load address, in RAM, for
the firmware image. Make it possible to use the standard size specifiers
(B/K/M/G/P/T) when doing so.
Signed-off-by: Alexandru Elisei
---
arm/include/arm-common/kvm-config-arch.h | 7 +--
arm/kvm.c
Add a new function, kvm__arch_default_ram_address(), which returns the
default address for guest RAM for each architecture.
Signed-off-by: Alexandru Elisei
---
arm/aarch32/kvm.c | 5 +
arm/aarch64/kvm.c | 5 +
include/kvm/kvm.h | 1 +
mips/kvm.c| 5 +
powerpc/kvm.c | 5 ++
From: Julien Grall
RAM initialization is unnecessarily split between kvm__init_ram() and
kvm__arch_init(). Move all code related to RAM initialization to
kvm__init_ram(), making the code easier to follow and to modify.
One thing to note is that the initialization order is slightly altered:
kvm__
From: Julien Grall
The kvm struct already contains a pointer to the configuration, which
contains both hugetlbfs_path and ram_size, so is it not necessary to pass
them as arguments to kvm__arch_init().
Signed-off-by: Julien Grall
Signed-off-by: Alexandru Elisei
---
arm/kvm.c | 7 -
For 64-bit guests, kvmtool exists with an error in kvm__get_vm_type() if
the memory size is larger than what KVM supports. For 32-bit guests, the
RAM size is silently rounded down to ARM_LOMAP_MAX_MEMORY in
kvm__arch_init().
Be consistent and exit with an error when the user has configured the
wro
For 32-bit guests, the maximum memory size is represented by the define
ARM_LOMAP_MAX_MEMORY, which ARM_MAX_MEMORY() returns.
For 64-bit guests, the RAM size is checked against the maximum allowed
by KVM in kvm__get_vm_type().
There are no users left for the ARM_MAX_MEMORY() macro, remove it.
Si
From: Suzuki K Poulose
Allow the user to use the standard B (bytes), K (kilobytes), M (megabytes),
G (gigabytes), T (terabytes) and P (petabytes) suffixes for memory size.
When none are specified, the default is megabytes.
Also raise an error if the guest specifies 0 as the memory size, instead
The ARM_HIMAP_MAX_MEMORY() is a remnant of a time when KVM only supported
40 bits if IPA. There are no users left for this macro, remove it.
Signed-off-by: Alexandru Elisei
---
arm/include/arm-common/kvm-arch.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arm/include/arm-common/kvm-arch.h
Architectures are free to set their own command line options. Add an
architecture specific hook to validate these options.
For now, the hook does nothing, but it will be used in later patches.
Signed-off-by: Alexandru Elisei
---
Makefile | 3 ++-
arm/aarch32/kvm.c | 5 +
arm/aarch6
host_ram_size() uses sysconf() to calculate the available ram, and
sysconf() can fail. When that happens, host_ram_size() returns 0. kvmtool
warns the user when the configured VM ram size exceeds the size of the
host's memory, but doesn't take into account that host_ram_size() can
return 0. If the
The user can specify the virtual machine memory size in MB, which is saved
in cfg->ram_size. kvmtool validates it against the host memory size,
converted from bytes to MB. ram_size is then converted to bytes, and this
is how it is used throughout the rest of kvmtool.
To avoid any confusion about t
The series can be found at [1]. It is loosely based on the patches that
allow the user to define the VM memory layout (RAM + MMIO) [2]. I've
cherry-picked a handful of patches from that series, the rest I wrote from
scratch since there have been several changes to the way guest memory is
handled. I
The help text for the -m/--mem argument states that the guest memory size
is in MiB (mebibyte). MiB is the same thing as MB (megabyte), and indeed
this is how MB is used throughout kvmtool.
Replace MiB with MB, so people don't get the wrong idea and start
believing that for kvmtool a MB is 10^6 by
On Thu, 28 Apr 2022 09:46:21 +0100,
Alexandru Elisei wrote:
>
> Hi,
>
> On Wed, Apr 27, 2022 at 11:04:34PM +0100, Marc Zyngier wrote:
> > When taking a translation fault for an IPA that is outside of
> > the range defined by the hypervisor (between the HW PARange and
> > the IPA range), we stupi
On Tue, Apr 19, 2022 at 12:22:08PM +0100, Mark Brown wrote:
> This series provides initial support for the ARMv9 Scalable Matrix
> Extension (SME). SME takes the approach used for vectors in SVE and
> extends this to provide architectural support for matrix operations. A
> more detailed overview
On Wed, Apr 27, 2022 at 06:14:31PM +0100, Mark Brown wrote:
> On Wed, Apr 27, 2022 at 01:08:58PM -0400, Qian Cai wrote:
> > On Tue, Apr 19, 2022 at 12:22:08PM +0100, Mark Brown wrote:
>
> > > but not SVE, SME is an ARMv9 feature and SVE is mandatory for ARMv9.
> > > The code attempts to handle any
There are a few cases in the nVHE code where we take the absolute
address of a symbol via a literal pool entry, and subsequently translate
it to another address space (PA, kimg VA, kernel linear VA, etc).
Originally, this literal was needed because we relied on a different
translation for absolute
When a sysreg table entry is out-of-order, KVM attempts to print the
address of the table:
[0.143911] kvm [1]: sys_reg table (ptrval) out of order (1)
Printing the name of the table instead of a pointer is more helpful in this
case. The message has also been slightly tweaked to be poi
To emulate a register access, KVM uses a table of registers sorted by
register encoding to speed up queries using binary search.
When Linux boots, KVM checks that the table is sorted and uses a BUG_ON()
statement to let the user know if it's not. The unfortunate side effect is
that an unsorted sys
These are two small improvements to how KVM handles an out-of-order
sys_reg_desc table. These should only affect KVM developers, as the end
user should never see an error caused by an unsorted sys_reg_desc table.
Changes in v2:
* Tweaked how the error is detected and propagated in kvm_arch_init()
On Tue, Apr 19, 2022 at 12:22:12PM +0100, Mark Brown wrote:
> +* There are a number of optional SME features, presence of these is reported
> + through AT_HWCAP2 through:
> +
> + HWCAP2_SME_I16I64
> + HWCAP2_SME_F64F64
> + HWCAP2_SME_I8I32
> + HWCAP2_SME_F16F32
> + HWCAP2_SME_B
Hi,
On Wed, Apr 27, 2022 at 11:04:34PM +0100, Marc Zyngier wrote:
> When taking a translation fault for an IPA that is outside of
> the range defined by the hypervisor (between the HW PARange and
> the IPA range), we stupidly treat it as an IO and forward the access
> to userspace. Of course, user
31 matches
Mail list logo