On 9/14/2023 9:55 AM, Sean Christopherson wrote:
Introduce a "version 2" of KVM_SET_USER_MEMORY_REGION so that additional
information can be supplied without setting userspace up to fail. The
padding in the new kvm_userspace_memory_region2 structure will be used to
pass a file descriptor in addi
On Wed, Sep 13, 2023 at 06:55:09PM -0700, Sean Christopherson wrote:
> From: Chao Peng
>
> In confidential computing usages, whether a page is private or shared is
> necessary information for KVM to perform operations like page fault
> handling, page zapping etc. There are other potential use cas
Christophe Leroy writes:
> Le 15/09/2023 à 02:43, Michael Ellerman a écrit :
>> Christophe Leroy writes:
>>> It used to be impossible to select CONFIG_CPM2 without selecting
>>> CONFIG_FSL_SOC at the same time because CONFIG_CPM2 was dependent
>>> on CONFIG_8260 and CONFIG_8260 was selecting CONF
On Fri, Sep 15, 2023 at 9:38 AM Shengjiu Wang wrote:
>
> The devm_clk_get() can return -EPROBE_DEFER error,
> modify the error code to be -EINVAL is not correct, which
> cause the -EPROBE_DEFER error is not correctly handled.
>
> This patch is to fix the return error code.
>
> Fixes: b86ef5367761
Sohil Mehta writes:
> commit c35559f94ebc ("x86/shstk: Introduce map_shadow_stack syscall")
> recently added support for map_shadow_stack() but it is limited to x86
> only for now. There is a possibility that other architectures (namely,
> arm64 and RISC-V), that are implementing equivalent suppor
On Thu, 14 Sep 2023, John Ogness wrote:
> When a serial port is used for kernel console output, then all
> modifications to the UART registers which are done from other contexts,
> e.g. getty, termios, are interference points for the kernel console.
>
> So far this has been ignored and the printk
On Wed, Aug 30, 2023 at 09:49:11AM -0400, Danny Tsen wrote:
> Improve AES/XTS performance of 6-way unrolling for PowerPC up
> to 17% with tcrypt. This is done by using one instruction,
> vpermxor, to replace xor and vsldoi.
>
> The same changes were applied to OpenSSL code and a pull request was
Thanks Herbert.
-Danny
On 9/15/23 5:41 AM, Herbert Xu wrote:
On Wed, Aug 30, 2023 at 09:49:11AM -0400, Danny Tsen wrote:
Improve AES/XTS performance of 6-way unrolling for PowerPC up
to 17% with tcrypt. This is done by using one instruction,
vpermxor, to replace xor and vsldoi.
The same chan
On Thu, Sep 14 2023 at 20:01, Maciej W. Rozycki wrote:
> On Thu, 14 Sep 2023, John Ogness wrote:
>
>> Patches 2-74 switch all uart port locking call sites to use the new
>> wrappers. These patches were automatically generated using coccinelle.
>
> Hmm, no need to do this for drivers/tty/serial/zs
Danny Tsen writes:
> Improve AES/XTS performance of 6-way unrolling for PowerPC up
> to 17% with tcrypt. This is done by using one instruction,
> vpermxor, to replace xor and vsldoi.
>
> The same changes were applied to OpenSSL code and a pull request was
> submitted.
https://github.com/openssl/
On Fri, Sep 15, 2023, Yan Zhao wrote:
> On Wed, Sep 13, 2023 at 06:55:16PM -0700, Sean Christopherson wrote:
>
> > +static void kvm_mmu_prepare_memory_fault_exit(struct kvm_vcpu *vcpu,
> > + struct kvm_page_fault *fault)
> > +{
> > + kvm_prepare_memory
allnoconfig gcc
arc allyesconfig gcc
arc defconfig gcc
arc randconfig-001-20230915 gcc
arm allmodconfig gcc
arm
Still waiting for the CCLA to send to Openssl.
Thanks.
-Danny
On 9/15/23 8:29 AM, Michael Ellerman wrote:
Danny Tsen writes:
Improve AES/XTS performance of 6-way unrolling for PowerPC up
to 17% with tcrypt. This is done by using one instruction,
vpermxor, to replace xor and vsldoi.
The sam
Hi Athira,
On Thu, Sep 14, 2023 at 10:02:04PM +0530, Athira Rajeev wrote:
+struct dt_node *dt_find_by_name_before_addr(struct dt_node *root, const char
*name)
+{
+ struct dt_node *child, *match;
+ char *child_node = NULL;
+
+ list_for_each(&root->children, child, list) {
+
On Thu, Sep 14, 2023 at 1:39 PM John Ogness wrote:
> Converted with coccinelle. No functional change.
>
> Signed-off-by: Thomas Gleixner
> ---
> drivers/tty/serial/ucc_uart.c | 4 ++--
Acked-by: Timur Tabi
On Fri, 15 Sep 2023 14:02:11 +0800, Shengjiu Wang wrote:
> The devm_clk_get() can return -EPROBE_DEFER error,
> modify the error code to be -EINVAL is not correct, which
> cause the -EPROBE_DEFER error is not correctly handled.
>
> This patch is to fix the return error code.
>
>
> [...]
Applied
> On 15-Sep-2023, at 8:00 PM, Reza Arbab wrote:
>
> Hi Athira,
>
> On Thu, Sep 14, 2023 at 10:02:04PM +0530, Athira Rajeev wrote:
>> +struct dt_node *dt_find_by_name_before_addr(struct dt_node *root, const
>> char *name)
>> +{
>> + struct dt_node *child, *match;
>> + char *child_node = NULL
Difference layerscape chip have not difference exit_from_l2() method.
Using function pointer for ls1028. It prepare for other layerscape
suspend/resume support.
Signed-off-by: Frank Li
---
drivers/pci/controller/dwc/pci-layerscape.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
d
ls1021a add suspend/resume support.
Signed-off-by: Frank Li
---
drivers/pci/controller/dwc/pci-layerscape.c | 88 -
1 file changed, 87 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pci-layerscape.c
b/drivers/pci/controller/dwc/pci-layerscape.c
index 2
ls1043a add suspend/resume support.
Signed-off-by: Frank Li
---
drivers/pci/controller/dwc/pci-layerscape.c | 91 -
1 file changed, 90 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pci-layerscape.c
b/drivers/pci/controller/dwc/pci-layerscape.c
index b
If, for any reason, the open-coded arithmetic causes a wraparound,
the protection that `struct_size()` adds against potential integer
overflows is defeated. Fix this by hardening call to `struct_size()`
with `size_add()`.
Fixes: 3f1071ec39f7 ("net: spider_net: Use struct_size() helper")
Signed-off
On Fri, Sep 15, 2023 at 01:25:36PM -0600, Gustavo A. R. Silva wrote:
> If, for any reason, the open-coded arithmetic causes a wraparound,
> the protection that `struct_size()` adds against potential integer
> overflows is defeated. Fix this by hardening call to `struct_size()`
> with `size_add()`.
On Fri, Sep 15, 2023, Xiaoyao Li wrote:
> On 9/14/2023 9:54 AM, Sean Christopherson wrote:
> > Rework and rename "struct kvm_hva_range" into "kvm_mmu_notifier_range" so
> > that the structure can be used to handle notifications that operate on gfn
> > context, i.e. that aren't tied to a host virtua
On 9/15/23 14:25, Gustavo A. R. Silva wrote:
> If, for any reason, the open-coded arithmetic causes a wraparound,
> the protection that `struct_size()` adds against potential integer
> overflows is defeated. Fix this by hardening call to `struct_size()`
> with `size_add()`.
>
> Fixes: 3f1071ec39f7
This is a borderline RFC series to hide KVM's internals from the rest of
the kernel, where "internals" means data structures, enums, #defines,
APIs, etc. that are intended to be KVM-only, but are exposed everywhere
due to kvm_host.h (and other headers) living in the global include paths.
The motiv
Wrap the helpers for getting references to KVM instances with a check on
CONFIG_KVM being enabled, not on CONFIG_HAVE_KVM being defined. PPC does
NOT select HAVE_KVM, despite obviously supporting KVM, and guarding code
to get references to KVM based on whether or not the architecture supports
KVM
Move the definitions of vfio_device_get_kvm_safe() and vfio_device_put_kvm()
down in vfio_main.c to colocate them with other KVM-specific functions,
e.g. to allow wrapping them all with a single CONFIG_KVM check.
Signed-off-by: Sean Christopherson
---
drivers/vfio/vfio_main.c | 104 +
Hide vfio_file_set_kvm() and its unique helpers if KVM is not enabled,
nothing else in the kernel (or out of the kernel) should be using a
KVM specific helper.
Signed-off-by: Sean Christopherson
---
drivers/vfio/vfio_main.c | 2 +-
include/linux/vfio.h | 2 ++
2 files changed, 3 insertions(+
Add a struct to hold the KVM assets need to manage and pass along KVM
references to VFIO devices. Providing a common struct deduplicates the
group vs. iommufd code, and will make it easier to rework the attachment
logic so that VFIO doesn't have to do a symbol lookup to retrieve the
get/put helper
Explicitly pass KVM's get/put helpers to VFIO when attaching a VM to
VFIO instead of having VFIO do a symbol lookup back into KVM. Having both
KVM and VFIO do symbol lookups increases the overall complexity and places
an unnecessary dependency on KVM (from VFIO) without adding any value.
Signed-o
Drop KVM's KVM_VFIO Kconfig, and instead compile in VFIO support if
and only if VFIO itself is enabled. Similar to the recent change to have
VFIO stop looking at HAVE_KVM, compiling in support for talking to VFIO
just because the architecture supports VFIO is nonsensical.
This fixes a bug where R
Wrap all of the IDT-related code that deals with KVM in CONFIG_KVM instead
of CONFIG_HAVE_KVM. x86 always "has" KVM, i.e. checking CONFIG_HAVE_KVM
is pointless.
Alternatively, the #ifdefs could simply be deleted, but the only potential
value is in printing the number of posted interrupts that end
Now that nothing in x86 or architecture agnostic code consumes HAVE_KVM,
stop selecting it in x86. This is one of several steps towards deleting
HAVE_KVM from the common KVM Kconfig.
Signed-off-by: Sean Christopherson
---
arch/x86/Kconfig | 1 -
arch/x86/kvm/Kconfig | 2 --
2 files changed,
Now that nothing in arm64 or architecture agnostic code consumes HAVE_KVM,
stop selecting it in arm64. This is one of several steps towards deleting
HAVE_KVM from the common KVM Kconfig.
Signed-off-by: Sean Christopherson
---
arch/arm64/Kconfig | 1 -
arch/arm64/kvm/Kconfig | 1 -
2 files c
Now that nothing in s390 or architecture agnostic code consumes HAVE_KVM,
stop selecting it in s390. This is one of several steps towards deleting
HAVE_KVM from the common KVM Kconfig.
Signed-off-by: Sean Christopherson
---
arch/s390/Kconfig | 1 -
arch/s390/kvm/Kconfig | 1 -
2 files chang
Now that MIPS is the sole remaining user of HAVE_KVM, make HAVE_KVM a
MIPS-only Kconfig. Because most architectures unconditionally support
virtualization, advertising to the kernel at-large that an arch has KVM
just led to a bunch of useless and misguided #ifdefs.
Signed-off-by: Sean Christopher
From: Anish Ghulati
Move arm_hypercalls.h and arm_psci.h into arch/arm64/kvm now that KVM
no longer supports 32-bit ARM, i.e. now that there's no reason to make
the hypercall and PSCI APIs "public".
Signed-off-by: Anish Ghulati
[sean: squash into one patch, write changelog]
Signed-off-by: Sean
Include include/uapi/linux/kvm.h and include/linux/kvm_types.h in ARM's
public arm_arch_timer.h and arm_pmu.h headers to get forward declarations
of things like "struct kvm_vcpu" and "struct kvm_device_attr", which are
referenced but never declared (neither file includes *any* KVM headers).
The mi
Move kvm/arm_{arch_timer,pmu,vgic}.h to arch/arm64/include/asm and drop
the "arm" prefix from all file names. Now that KVM no longer supports
32-bit ARM, there is no reason to expose ARM specific headers to other
architectures beyond arm64.
Signed-off-by: Sean Christopherson
---
.../arm64/inclu
Move iodev.h, the last remaining holdout in include/kvm, to the standard
include/linux directory as kvm_iodev.h and delete include/kvm.
Signed-off-by: Sean Christopherson
---
MAINTAINERS| 1 -
arch/arm64/include/asm/kvm_vgic.h | 2 +-
arch/arm64/kvm/vgic/
Don't add virt/kvm to KVM MIPS' include path, the headers in virt/kvm are
intended to be used only by other code in virt/kvm, i.e. are "private" to
the core KVM code. It's not clear that MIPS *ever* included a header from
virt/kvm, i.e. odds are good the "-Ivirt/kvm" was copied from a different
ar
Don't add virt/kvm to KVM PPC's include path, the headers in virt/kvm are
intended to be used only by other code in virt/kvm, i.e. are "private" to
the core KVM code. It's not clear that PPC *ever* included a header from
virt/kvm, i.e. odds are good the "-Ivirt/kvm" was copied from a different
arc
Don't add virt/kvm to KVM s390's include path, the headers in virt/kvm are
intended to be used only by other code in virt/kvm, i.e. are "private" to
the core KVM code. It's not clear that s390 *ever* included a header from
virt/kvm, i.e. odds are good the "-Ivirt/kvm" was copied from a x86's
Makef
Standardize KVM's include paths across all architectures by declaring
the KVM-specific includes in the common Makefile.kvm. Having common KVM
"own" the included paths reduces the temptation to unnecessarily add
virt/kvm to arch include paths, and conversely if allowing arch code to
grab headers fr
Have perf define a struct for getting guest PEBS data from KVM instead of
poking into the kvm_pmu structure. Passing in an entire "struct kvm_pmu"
_as an opaque pointer_ to get at three fields is silly, especially since
one of the fields exists purely to convey information to perf, i.e. isn't
used
Drop the "struct kvm_vcpu" parameter from
arch_xfer_to_guest_mode_handle_work() as a preparatory step towards
removing the vCPU parameter from xfer_to_guest_mode_work() as well.
Signed-off-by: Sean Christopherson
---
include/linux/entry-kvm.h | 7 ++-
kernel/entry/kvm.c| 2 +-
2 file
Move KVM's morphing of pending signals into exits to userspace into KVM
proper, and drop the @vcpu param from xfer_to_guest_mode_handle_work().
How KVM responds to -EINTR is a detail that really belongs in KVM itself,
and removing the non-KVM call to kvm_handle_signal_exit() will allow
hiding said
Move a variety of "public" symbols in arm64's kvm_host.h, i.e. symbols and
functions that are used by non-KVM code, towards the top of the header.
This will allow hiding the "private" code in kvm_host.h, i.e. the stuff
that is intended to be KVM-internal, with a minimal amount of #ifdeffery.
Signe
xics_wake_cpu() is provided by core PPC code, not by KVM. Move its
declaration out of kvm_ppc.h and into xics.h.
Signed-off-by: Sean Christopherson
---
arch/powerpc/include/asm/kvm_ppc.h | 2 --
arch/powerpc/include/asm/xics.h| 3 +++
2 files changed, 3 insertions(+), 2 deletions(-)
diff -
Move all declarations and definitions in kvm_ppc.h that are consumed by
things other than KVM to the top of the file. This will allow wrapping
the parts of kvm_ppc.h that are intended only for KVM, i.e. are intended
to be "private" to KVM, with an #ifdef to hide KVM's internal details from
the ker
Wrap all KVM internal APIs, data structures, values, etc. in public
headers with "#ifdef __KVM__" to effectively hide KVM's internal details
from other subsystems and the kernel at-large. Hiding KVM details for
all architectures will, in the very distant future, allow loading a new
(or old) KVM mo
On Fri, 15 Sep 2023, Thomas Gleixner wrote:
> >> Patches 2-74 switch all uart port locking call sites to use the new
> >> wrappers. These patches were automatically generated using coccinelle.
> >
> > Hmm, no need to do this for drivers/tty/serial/zs.c?
>
> zs.c does not use port lock at all. It
52 matches
Mail list logo