Re: [PATCH 1/5] x86/boot/compressed/64: Introduce sev_status

2020-10-20 Thread Joerg Roedel
On Mon, Oct 19, 2020 at 05:59:25PM -0700, Sean Christopherson wrote: > On Mon, Oct 19, 2020 at 05:11:17PM +0200, Joerg Roedel wrote: > > + push%rax > > + push%rcx > > There's no need to save/restore RAX and RCX, they are callee save. This > function is only c

Re: [PATCH 3/5] x86/boot/compressed/64: Check SEV encryption in 64-bit boot-path

2020-10-20 Thread Joerg Roedel
On Mon, Oct 19, 2020 at 05:22:47PM -0400, Arvind Sankar wrote: > The boot cpu also enables CR4.PGE -- that code is shared between boot > and secondary cpus. The boot cpu jumps to the first "1" label below, > just before the call to sev_verify_cbit you're adding. You are right, in the real kernel

Re: [PATCH 3/5] x86/boot/compressed/64: Check SEV encryption in 64-bit boot-path

2020-10-20 Thread Joerg Roedel
On Mon, Oct 19, 2020 at 05:31:06PM -0400, Arvind Sankar wrote: > Is it possible to take advantage of this to make the check independent > of the original page tables? i.e. switch to the new pagetables, then > write into .data or .bss the opcodes for a function that does > movabs $imm64,

Re: [PATCH 3/5] x86/boot/compressed/64: Check SEV encryption in 64-bit boot-path

2020-10-19 Thread Joerg Roedel
On Mon, Oct 19, 2020 at 01:54:47PM -0400, Arvind Sankar wrote: > Also, isn't it possible that the initial page tables we're running on > have already been messed with and have the C-bit in the wrong location, > so that this write happens decrypted? The code assumes that the page-table it is

Re: [PATCH 3/5] x86/boot/compressed/64: Check SEV encryption in 64-bit boot-path

2020-10-19 Thread Joerg Roedel
Hi Arvind, On Mon, Oct 19, 2020 at 01:00:08PM -0400, Arvind Sankar wrote: > On Mon, Oct 19, 2020 at 05:11:19PM +0200, Joerg Roedel wrote: > > + > > + /* Store value to memory and keep it in %r10 */ > > + movq%r10, sev_check_data(%rip) > > + > > Do

[git pull] IOMMU Fixes for Linux since iommu-updates-v5.10

2020-10-19 Thread Joerg Roedel
Hi Linus, The following changes since commit 7e3c3883c381aeda903778d7e99fc4cd523be610: Merge branches 'arm/allwinner', 'arm/mediatek', 'arm/renesas', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/amd', 'x86/vt-d' and 'core' into next (2020-10-07 11:51:59 +0200) are available in the

[PATCH 1/5] x86/boot/compressed/64: Introduce sev_status

2020-10-19 Thread Joerg Roedel
From: Joerg Roedel Introduce sev_status and initialize it together with sme_me_mask to have an indicator which SEV features are enabled. Signed-off-by: Joerg Roedel --- arch/x86/boot/compressed/mem_encrypt.S | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

[PATCH 0/5] x86/sev-es: Mitigate some HV attack vectors

2020-10-19 Thread Joerg Roedel
From: Joerg Roedel Hi, here are some enhancements to the SEV(-ES) code in the Linux kernel to self-protect it against some newly detected hypervisor attacks. There are 3 attacks addressed here: 1) Hypervisor does not present the SEV-enabled bit via CPUID 2) The Hypervisor

[PATCH 3/5] x86/boot/compressed/64: Check SEV encryption in 64-bit boot-path

2020-10-19 Thread Joerg Roedel
From: Joerg Roedel Check whether the hypervisor reported the correct C-bit when running as an SEV guest. Using a wrong C-bit position could be used to leak sensitive data from the guest to the hypervisor. The check function is in arch/x86/kernel/sev_verify_cbit.S so that it can be re-used

[PATCH 5/5] x86/sev-es: Do not support MMIO to/from encrypted memory

2020-10-19 Thread Joerg Roedel
From: Joerg Roedel MMIO memory is usually not mapped encrypted, so there is no reason to support emulated MMIO when it is mapped encrypted. This prevents a possible hypervisor attack where it maps a RAM page as an MMIO page in the nested page-table, so that any guest access to it will trigger

[PATCH 2/5] x86/boot/compressed/64: Add CPUID sanity check to early #VC handler

2020-10-19 Thread Joerg Roedel
From: Joerg Roedel The early #VC handler which doesn't have a GHCB can only handle CPUID exit codes. It is needed by the early boot code to handle #VC exceptions raised in verify_cpu() and to get the position of the C bit. But the CPUID information comes from the hypervisor, which is untrusted

[PATCH 4/5] x86/head/64: Check SEV encryption before switching to kernel page-table

2020-10-19 Thread Joerg Roedel
From: Joerg Roedel When SEV is enabled the kernel requests the C-Bit position again from the hypervisor to built its own page-table. Since the hypervisor is an untrusted source the C-bit position needs to be verified before the kernel page-table is used. Call the sev_verify_cbit() function

Re: [PATCH next] iommu: intel: don't dereference iommu_device if IOMMU_API is not built

2020-10-19 Thread Joerg Roedel
On Tue, Oct 13, 2020 at 09:30:55AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Since commit c40c1018 ("iommu/vt-d: Gracefully handle DMAR units > with no supported address widths") dmar.c needs struct iommu_device to > be selected. We can drop this dependency by not

Re: [git pull] IOMMU Updates for Linux v5.10

2020-10-15 Thread Joerg Roedel
On Wed, Oct 14, 2020 at 12:15:55PM -0700, Linus Torvalds wrote: > As a result, "git show" doesn't ever really understand the notion of a > "merge conflict", and all it shows is really "whee, this end result > looks like neither side" as a kind of pseudo-conflict diff. Ah okay, that makes sense.

Re: [PATCH next] iommu: intel: don't dereference iommu_device if IOMMU_API is not built

2020-10-14 Thread Joerg Roedel
On Wed, Oct 14, 2020 at 03:25:08PM +0800, Lu Baolu wrote: > I suppose Joerg will pick this up. I guess you don't need to resend it > unless Joerg asks you to do. Yes, will pick this up soon, no need to re-send. Thanks, Joerg

[git pull] IOMMU Updates for Linux v5.10

2020-10-13 Thread Joerg Roedel
-smmu-v3: Seize private ASID iommu/arm-smmu-v3: Check for SVA features iommu/arm-smmu-v3: Add SVA device feature Joerg Roedel (3): iommu/sun50i: Fix set-but-not-used variable warning Merge tag 'arm-smmu-updates' of git://git.kernel.org/.../will/linux into arm/smmu Merge

Re: [PATCH] x86/boot/64: Initialize 5-level paging variables earlier

2020-10-13 Thread Joerg Roedel
t also a nice cleanup of the 5level-paging initialization code. Reviewed-by: Joerg Roedel Tested-by: Joerg Roedel

Re: [GIT PULL] x86/mm changes for v5.10

2020-10-13 Thread Joerg Roedel
On Mon, Oct 12, 2020 at 03:07:45PM -0700, Linus Torvalds wrote: > On Mon, Oct 12, 2020 at 10:24 AM Ingo Molnar wrote: > > > > Do not sync vmalloc/ioremap mappings on x86-64 kernels. > > > > Hopefully now without the bugs! > > Let's hope so. > > If this turns out to work this time, can we do a

Re: [PATCH v2 5/5] x86/head/64: Disable stack protection for head$(BITS).o

2020-10-09 Thread Joerg Roedel
-47,6 +47,8 @@ endif > # non-deterministic coverage. > KCOV_INSTRUMENT := n > > +CFLAGS_head$(BITS).o += -fno-stack-protector > + > CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace > > obj-y:= process_$(BITS).o signal.o > -- > 2.26.2 Reviewed-by: Joerg Roedel

Re: [PATCH v2 4/5] x86/boot/64: Explicitly map boot_params and command line

2020-10-09 Thread Joerg Roedel
* Map them explicitly here in case the compressed kernel does not > + * touch them, or does not touch all the pages covering them. >*/ > add_identity_map((unsigned long)_head, (unsigned long)_end); > + add_identity_map((unsigned long)boot_params, (unsigned > long)(boot_params + 1)); > + cmdline = get_cmd_line_ptr(); > + add_identity_map(cmdline, cmdline + COMMAND_LINE_SIZE); > + > + /* Load the new page-table. */ > write_cr3(top_level_pgt); > } Reviewed-by: Joerg Roedel

Re: [PATCH v2 3/5] x86/boot/64: Show original faulting address in case of error

2020-10-09 Thread Joerg Roedel
aulting address. >*/ > + address &= PMD_MASK; > + end= address + PMD_SIZE; > + > add_identity_map(address, end); > } Reviewed-by: Joerg Roedel

Re: [PATCH 4/5] x86/boot/64: Explicitly map boot_params and command line

2020-10-08 Thread Joerg Roedel
On Wed, Oct 07, 2020 at 03:53:50PM -0400, Arvind Sankar wrote: > This is fragile, as boot_params and the command line mappings are > required for the main kernel. If EARLY_PRINTK and RANDOMIZE_BASE are > disabled, a QEMU/OVMF boot never accesses the command line in the > decompressor stub, and so

Re: [PATCH 4/5] x86/boot/64: Explicitly map boot_params and command line

2020-10-08 Thread Joerg Roedel
touched (and thus mapped) before jumping to the uncompressed kernel image. Otherwise no one will remember why those need to be pre-mapped in a couple of years. With that change and the add_identity_map() call adjusted: Reviewed-by: Joerg Roedel

Re: [PATCH 3/5] x86/boot/64: Change add_identity_map() to take size for ease of use

2020-10-08 Thread Joerg Roedel
On Wed, Oct 07, 2020 at 03:53:49PM -0400, Arvind Sankar wrote: > Change back the arguments of add_identity_map() to (start, size) instead > of (start, end). This reverts > > 21cf2372618e ("x86/boot/compressed/64: Change add_identity_map() to take > start and end") > > since we will soon have

Re: [PATCH 2/5] x86/boot: Move get_cmd_line_ptr() and COMMAND_LINE_SIZE into misc.h

2020-10-08 Thread Joerg Roedel
#include > > @@ -70,6 +74,15 @@ static inline void debug_puthex(unsigned long value) > #endif > > /* cmdline.c */ > +static inline > +unsigned long get_cmd_line_ptr(void) > +{ > + unsigned long cmd_line_ptr = boot_params->hdr.cmd_line_ptr; > + > + cmd_line_ptr |= (u64)boot_params->ext_cmd_line_ptr << 32; > + > + return cmd_line_ptr; > +} > int cmdline_find_option(const char *option, char *buffer, int bufsize); > int cmdline_find_option_bool(const char *option); Reviewed-by: Joerg Roedel

Re: [PATCH 1/5] x86/boot: Initialize boot_params in startup code

2020-10-08 Thread Joerg Roedel
ame applies to the 64bit version of this. With that changed: Reviewed-by: Joerg Roedel

Re: [PATCH 5/5] x86/head/64: Disable stack protection for head$(BITS).o

2020-10-08 Thread Joerg Roedel
On Wed, Oct 07, 2020 at 03:53:51PM -0400, Arvind Sankar wrote: > On 64-bit, the startup_64_setup_env() function added in > 866b556efa12 ("x86/head/64: Install startup GDT") > has stack protection enabled because of set_bringup_idt_handler(). > > At this point, %gs is not yet initialized, and

Re: [PATCH 2/3] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance

2020-10-08 Thread Joerg Roedel
On Tue, Oct 06, 2020 at 08:23:06AM +0100, Christoph Hellwig wrote: > If people want to use the "raw" IOMMU API with not cache coherent > devices we'll need a cache maintainance API that goes along with it. > It could either be formally part of the IOMMU API or be separate. The IOMMU-API does not

Re: [Bug 209321] DMAR: [DMA Read] Request device [03:00.0] PASID ffffffff fault addr fffd3000 [fault reason 06] PTE Read access is not set

2020-10-08 Thread Joerg Roedel
Hi Bjorn, On Wed, Oct 07, 2020 at 10:43:14AM -0500, Bjorn Helgaas wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=209321 > > Not much detail in the bugzilla yet, but apparently this started in > v5.8.0-rc1: > > DMAR: [DMA Read] Request device [03:00.0] PASID fault addr >

[git pull] IOMMU Fixes for Linux v5.9-rc7

2020-10-01 Thread Joerg Roedel
Hi Linus, The following changes since commit ba4f184e126b751d1bffad5897f263108befc780: Linux 5.9-rc6 (2020-09-20 16:33:55 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v5.9-rc7 for you to fetch changes up to

Re: [PATCH 00/13] iommu: amd: Add Generic IO Page Table Framework Support

2020-10-01 Thread Joerg Roedel
On Thu, Oct 01, 2020 at 09:51:51PM +0700, Suravee Suthikulpanit wrote: > Sure. Let me send out v2 for this with some more clean up. Great, while at it please also change the "iommu: amd:" subjects to "iommu/amd:". Thanks, Joerg

Re: [PATCH 00/13] iommu: amd: Add Generic IO Page Table Framework Support

2020-10-01 Thread Joerg Roedel
On Thu, Sep 24, 2020 at 05:50:37PM +0700, Suravee Suthikulpanit wrote: > > > On 9/24/20 5:34 PM, Joerg Roedel wrote: > > Hi Suravee, > > > > On Wed, Sep 23, 2020 at 10:14:29AM +, Suravee Suthikulpanit wrote: > > > The framework allows call

Re: [PATCH 1/1] iommu/vt-d: Fix lockdep splat in iommu_flush_dev_iotlb()

2020-10-01 Thread Joerg Roedel
On Sun, Sep 27, 2020 at 02:24:28PM +0800, Lu Baolu wrote: > drivers/iommu/intel/iommu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied for v5.9, thanks.

Re: [PATCH v12 0/6] IOMMU user API enhancement

2020-10-01 Thread Joerg Roedel
Hi Jacob, On Mon, Sep 28, 2020 at 11:40:53AM -0700, Jacob Pan wrote: > Just wondering if you will be able to take this for v5.10? There hasn't > been any material changes since we last discussed in LPC. We have VFIO and > other vSVA patches depending on it. Queued for v5.10 now, thanks.

Re: [GIT PULL] iommu/arm-smmu: Updates for 5.10

2020-10-01 Thread Joerg Roedel
On Wed, Sep 30, 2020 at 09:05:23AM +0100, Will Deacon wrote: > The following changes since commit f75aef392f869018f78cfedf3c320a6b3fcfda6b: > > Linux 5.9-rc3 (2020-08-30 16:01:54 -0700) > > are available in the Git repository at: > >

Re: [PATCH v4 0/7] Convert the intel iommu driver to the dma-iommu api

2020-10-01 Thread Joerg Roedel
Hi Baolu, On Tue, Sep 29, 2020 at 08:11:35AM +0800, Lu Baolu wrote: > I have no preference. It depends on which patch goes first. Let the > maintainers help here. No preference on my side, except that it is too late for this now to make it into v5.10. Besides that I let the decission up to you

Re: [PATCH] x86/sev-es: Use GHCB accessor for setting the MMIO scratch buffer

2020-09-25 Thread Joerg Roedel
c enum es_result vc_do_mmio(struct ghcb *ghcb, > struct es_em_ctxt *ctxt, > /* Can never be greater than 8 */ > exit_info_2 = bytes; > > - ghcb->save.sw_scratch = ghcb_pa + offsetof(struct ghcb, shared_buffer); > + ghcb_set_sw_scratch(ghcb, ghcb_pa + of

Re: [PATCH v2 0/3] amd : iommu : Initial IOMMU support for SNP

2020-09-24 Thread Joerg Roedel
On Wed, Sep 23, 2020 at 12:13:44PM +, Suravee Suthikulpanit wrote: > Suravee Suthikulpanit (3): > iommu: amd: Use 4K page for completion wait write-back semaphore > iommu: amd: Add support for RMP_PAGE_FAULT and RMP_HW_ERR > iommu: amd: Re-purpose Exclusion range registers to support SNP

Re: [PATCH 00/13] iommu: amd: Add Generic IO Page Table Framework Support

2020-09-24 Thread Joerg Roedel
Hi Suravee, On Wed, Sep 23, 2020 at 10:14:29AM +, Suravee Suthikulpanit wrote: > The framework allows callable implementation of IO page table. > This allows AMD IOMMU driver to switch between different types > of AMD IOMMU page tables (e.g. v1 vs. v2). Is there a reason you created your own

Re: [PATCH 0/3] iommu/tegra-smmu: Some small fixes

2020-09-24 Thread Joerg Roedel
On Fri, Sep 11, 2020 at 12:16:40AM -0700, Nicolin Chen wrote: > These are a series of small fixes for tegra-smmu driver. > They might not be critial bugs as current mainline does > not enable a lot of clients, but be nicer to have since > we are going to enable the DMA domain for other clients >

Re: arm-smmu 5000000.iommu: Cannot accommodate DMA offset for IOMMU page tables

2020-09-24 Thread Joerg Roedel
On Thu, Sep 24, 2020 at 10:36:47AM +0100, Robin Murphy wrote: > Yes, the issue was introduced by one of the changes in "dma-mapping: > introduce DMA range map, supplanting dma_pfn_offset", so it only existed in > the dma-mapping/for-next branch anyway. Okay, alright then.

Re: [PATCH v5 0/5] iommu aux-domain APIs extensions

2020-09-24 Thread Joerg Roedel
On Tue, Sep 22, 2020 at 02:10:37PM +0800, Lu Baolu wrote: > Hi Jorge and Alex, > > A description of this patch series could be found here. > > https://lore.kernel.org/linux-iommu/20200901033422.22249-1-baolu...@linux.intel.com/ Hmm, I am wondering if we can avoid all this hassle and special

Re: arm-smmu 5000000.iommu: Cannot accommodate DMA offset for IOMMU page tables

2020-09-24 Thread Joerg Roedel
Hi Robin, On Thu, Sep 24, 2020 at 10:08:46AM +0100, Robin Murphy wrote: > This should be fixed by > https://lore.kernel.org/linux-iommu/daedc9364a19dc07487e4d07b8768b1e5934abd4.1600700881.git.robin.mur...@arm.com/T/#u > (already in linux-next). Thanks! The question remains why this goes through

Re: kdump boot failing with IVRS checksum failure

2020-09-24 Thread Joerg Roedel
Hi Jerry, On Mon, Sep 21, 2020 at 11:56:42AM -0700, Jerry Snitselaar wrote: > We are seeing a kdump kernel boot failure in test on an HP DL325 Gen10 > and it was tracked down to 387caf0b759a ("iommu/amd: Treat per-device > exclusion ranges as r/w unity-mapped regions"). Reproduced on 5.9-rc5 >

Re: [PATCH] Revert "iommu/amd: Treat per-device exclusion ranges as r/w unity-mapped regions"

2020-09-24 Thread Joerg Roedel
On Wed, Sep 23, 2020 at 10:26:55AM +0800, Baoquan He wrote: > A regression failure of kdump kernel boot was reported on a HPE system. > Bisect points at commit 387caf0b759ac43 ("iommu/amd: Treat per-device > exclusion ranges as r/w unity-mapped regions") as criminal. Reverting it > fix the

Re: arm-smmu 5000000.iommu: Cannot accommodate DMA offset for IOMMU page tables

2020-09-24 Thread Joerg Roedel
Adding Will and Robin. On Mon, Sep 21, 2020 at 06:50:40PM +0530, Naresh Kamboju wrote: > arm64 Freescale Layerscape 2088A RDB Board boot failed with linux-next > 5.9.0-rc5-next-20200921 kernel tag version. The kernel warning and then > kernel panic happened. > > Reported-by: Naresh Kamboju >

Re: [PATCH] iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate()

2020-09-24 Thread Joerg Roedel
On Fri, Sep 18, 2020 at 05:27:59PM +0200, Marek Szyprowski wrote: > Hi > > On 18.09.2020 03:13, Yu Kuai wrote: > > if of_find_device_by_node() succeed, exynos_iommu_of_xlate() doesn't have > > a corresponding put_device(). Thus add put_device() to fix the exception > > handling for this function

Re: [PATCH v9 3/7] iommu/uapi: Introduce enum type for PASID data format

2020-09-24 Thread Joerg Roedel
Hi Jacob, On Fri, Sep 18, 2020 at 10:11:08AM -0700, Jacob Pan wrote: > On Fri, 18 Sep 2020 11:44:50 +0200, Joerg Roedel wrote: > > > On Fri, Sep 11, 2020 at 02:57:52PM -0700, Jacob Pan wrote: > > > There can be multiple vendor-specific PASID data formats used in

Re: [PATCH] Handle init_iova_flush_queue failure in dma-iommu path

2020-09-18 Thread Joerg Roedel
On Thu, Sep 10, 2020 at 01:25:38PM +0100, Tom Murphy wrote: > init_iova_flush_queue can fail if we run out of memory. Fall back to noflush > queue if it fails. > > Signed-off-by: Tom Murphy > --- > drivers/iommu/dma-iommu.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-)

[git pull] IOMMU Fixes for Linux v5.9-rc5

2020-09-18 Thread Joerg Roedel
Hi Linus, The following changes since commit 856deb866d16e29bd65952e0289066f6078af773: Linux 5.9-rc5 (2020-09-13 16:06:00 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v5.9-rc5 for you to fetch changes up to

Re: [PATCH v9 0/7] IOMMU user API enhancement

2020-09-18 Thread Joerg Roedel
Hi Jacob, On Fri, Sep 11, 2020 at 02:57:49PM -0700, Jacob Pan wrote: > IOMMU user API header was introduced to support nested DMA translation and > related fault handling. The current UAPI data structures consist of three > areas that cover the interactions between host kernel and guest: > -

Re: [PATCH v9 3/7] iommu/uapi: Introduce enum type for PASID data format

2020-09-18 Thread Joerg Roedel
On Fri, Sep 11, 2020 at 02:57:52PM -0700, Jacob Pan wrote: > There can be multiple vendor-specific PASID data formats used in UAPI > structures. This patch adds enum type with a last entry which makes > range checking much easier. But it also makes it much easier to screw up the numbers (which

Re: [PATCH 2/3] iommu: amd: Add support for RMP_PAGE_FAULT and RMP_HW_ERR

2020-09-18 Thread Joerg Roedel
Hi Suravee, On Wed, Sep 16, 2020 at 01:55:48PM +, Suravee Suthikulpanit wrote: > +static void amd_iommu_report_rmp_hw_error(volatile u32 *event) > +{ > + struct pci_dev *pdev; > + struct iommu_dev_data *dev_data = NULL; > + int devid = (event[0] >> EVENT_DEVID_SHIFT) &

Re: [PATCH v2] iommu/amd: Restore IRTE.RemapEn bit for amd_iommu_activate_guest_mode

2020-09-18 Thread Joerg Roedel
On Wed, Sep 16, 2020 at 11:17:20AM +, Suravee Suthikulpanit wrote: > Commit e52d58d54a32 ("iommu/amd: Use cmpxchg_double() when updating > 128-bit IRTE") removed an assumption that modify_irte_ga always set > the valid bit, which requires the callers to set the appropriate value > for the

Re: [PATCH RFC v1 04/18] iommu/hyperv: don't setup IRQ remapping when running as root

2020-09-18 Thread Joerg Roedel
d, 2 insertions(+), 1 deletion(-) Acked-by: Joerg Roedel

Re: [RESEND][PATCH 0/2] iommu/tegra-smmu: Fix TLB line for Tegra210

2020-09-18 Thread Joerg Roedel
On Thu, Sep 17, 2020 at 04:31:53AM -0700, Nicolin Chen wrote: > These two patches fix ACTIVE_TLB_LINES field setting in tegra-smmu > driver for Tegra210 platforms. > > This resend in series groups two previous seperate changes that're > corelated, being pointed out by Thierry. Also adding his

Re: [PATCH] iommu: fsl_pamu: Replace use of kzfree with kfree_sensitive

2020-09-18 Thread Joerg Roedel
On Fri, Sep 11, 2020 at 02:53:25PM +0100, Alex Dewar wrote: > kzfree() is effectively deprecated as of commit 453431a54934 ("mm, > treewide: rename kzfree() to kfree_sensitive()") and is now simply an > alias for kfree_sensitive(). So just replace it with kfree_sensitive(). > > Signed-off-by:

Re: [PATCH] Handle init_iova_flush_queue failure in dma-iommu path

2020-09-18 Thread Joerg Roedel
On Thu, Sep 10, 2020 at 01:25:38PM +0100, Tom Murphy wrote: > init_iova_flush_queue can fail if we run out of memory. Fall back to noflush > queue if it fails. > > Signed-off-by: Tom Murphy > --- > drivers/iommu/dma-iommu.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >

Re: [PATCH] iommu/amd: Add prefetch iommu pages command build function

2020-09-18 Thread Joerg Roedel
On Sat, Sep 05, 2020 at 03:14:20PM +0800, Wesley Sheng wrote: > +static void build_pf_iommu_pages(struct iommu_cmd *cmd, u64 address, > + u16 devid, int pfcnt, bool size, > + bool inv) > +{ > + memset(cmd, 0,

Re: [PATCH] iommu: Kconfig: Update help description for IPMMU_VMSA config

2020-09-18 Thread Joerg Roedel
On Fri, Sep 11, 2020 at 11:19:12AM +0100, Lad Prabhakar wrote: > ipmmu-vmsa driver is also used on Renesas RZ/G{1,2} Soc's, update the > same to reflect the help description for IPMMU_VMSA config. > > Signed-off-by: Lad Prabhakar > Reviewed-by: Chris Paterson > --- > drivers/iommu/Kconfig | 2

Re: [PATCH] iommu/amd: Fix potential @entry null deref

2020-09-18 Thread Joerg Roedel
On Thu, Sep 10, 2020 at 06:16:21PM +0100, Joao Martins wrote: > After commit 26e495f34107 ("iommu/amd: Restore IRTE.RemapEn bit after > programming IRTE"), smatch warns: > > drivers/iommu/amd/iommu.c:3870 amd_iommu_deactivate_guest_mode() > warn: variable dereferenced before check

Re: [PATCH v4 1/3] dt-bindings: iommu: Add binding for MediaTek MT8167 IOMMU

2020-09-18 Thread Joerg Roedel
On Mon, Sep 07, 2020 at 12:16:47PM +0200, Fabien Parent wrote: > This commit adds IOMMU binding documentation and larb port definitions > for the MT8167 SoC. > > Signed-off-by: Fabien Parent > Acked-by: Rob Herring > --- > > V4: > * Added path to mt8167 larb header file > * Added

Re: [PATCH v2 1/2] iommu/iova: Retry from last rb tree node if iova search fails

2020-09-18 Thread Joerg Roedel
On Mon, Sep 14, 2020 at 10:20:55AM +0530, Vijayanand Jitta wrote: > ping ? Robin needs to have a look first. Regards, Joerg

Re: [PATCH v8 0/9] x86: tag application address space for devices

2020-09-16 Thread Joerg Roedel
xstate: Add supervisor PASID state for ENQCMD feature For the IOMMU bits: Acked-by: Joerg Roedel

Re: [PATCH tip] KVM: nSVM: avoid freeing uninitialized pointers in svm_set_nested_state()

2020-09-14 Thread Joerg Roedel
resses-Coverity: ("Uninitialized pointer read") > Reported-by: Dan Carpenter > Reported-by: Joerg Roedel > Reported-by: Colin King > Signed-off-by: Vitaly Kuznetsov Acked-by: Joerg Roedel

Re: [PATCH -tip] KVM: SVM: nested: Initialize on-stack pointers in svm_set_nested_state()

2020-09-14 Thread Joerg Roedel
Hi Vitaly, On Mon, Sep 14, 2020 at 02:04:27PM +0200, Vitaly Kuznetsov wrote: > this was previously reported by Colin: > https://lore.kernel.org/kvm/2020090730.24238-1-colin.k...@canonical.com/ > > the fix itself looks good, however, I had an alternative suggestion on how > to fix this: >

[PATCH -tip] KVM: SVM: nested: Initialize on-stack pointers in svm_set_nested_state()

2020-09-14 Thread Joerg Roedel
From: Joerg Roedel The save and ctl pointers need to be initialized to NULL because there is a way through the function in which there is no memory allocated for the pointers but where they are freed in the end. This involves the 'goto out_set_gif' before the memory for the pointers

[tip: x86/seves] x86/sev-es: Adjust #VC IST Stack on entering NMI handler

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 315562c9af3d583502b35c4b223a08d95ce69864 Gitweb: https://git.kernel.org/tip/315562c9af3d583502b35c4b223a08d95ce69864 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:44 +02:00 Committer

[tip: x86/seves] x86/sev-es: Handle MMIO String Instructions

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 0118b604c2c94c6e34982015cfa7891af4764786 Gitweb: https://git.kernel.org/tip/0118b604c2c94c6e34982015cfa7891af4764786 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:51 +02:00 Committer

[tip: x86/seves] x86/smpboot: Load TSS and getcpu GDT entry before loading IDT

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 520d030852b4c9babfce9a79d8b5320b6b5545e6 Gitweb: https://git.kernel.org/tip/520d030852b4c9babfce9a79d8b5320b6b5545e6 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:16:08 +02:00 Committer

[tip: x86/seves] x86/sev-es: Add SEV-ES Feature Detection

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: b57de6cd16395be1ebdaa9b489ffbf462bb585c4 Gitweb: https://git.kernel.org/tip/b57de6cd16395be1ebdaa9b489ffbf462bb585c4 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:37 +02:00 Committer

[tip: x86/seves] x86/head/64: Switch to initial stack earlier

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 3add38cb96a1ae7d152db69ab4329e809c2af2d4 Gitweb: https://git.kernel.org/tip/3add38cb96a1ae7d152db69ab4329e809c2af2d4 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:33 +02:00 Committer

[tip: x86/seves] x86/sev-es: Allocate and map an IST stack for #VC handler

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 02772fb9b68e6a72a5e17f994048df832fe2b15e Gitweb: https://git.kernel.org/tip/02772fb9b68e6a72a5e17f994048df832fe2b15e Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:43 +02:00 Committer

[tip: x86/seves] x86/sev-es: Setup GHCB-based boot #VC handler

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 1aa9aa8ee517e0443b06e816a4fd2d15f2113615 Gitweb: https://git.kernel.org/tip/1aa9aa8ee517e0443b06e816a4fd2d15f2113615 Author:Joerg Roedel AuthorDate:Tue, 08 Sep 2020 14:38:16 +02:00 Committer

[tip: x86/seves] x86/head/64: Load segment registers earlier

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 7b99819dfb60268cc1c75f83c949bc4a09221bea Gitweb: https://git.kernel.org/tip/7b99819dfb60268cc1c75f83c949bc4a09221bea Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:32 +02:00 Committer

[tip: x86/seves] x86/idt: Make IDT init functions static inlines

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 097ee5b778b8970e1c2ed3ca1631b297d90acd61 Gitweb: https://git.kernel.org/tip/097ee5b778b8970e1c2ed3ca1631b297d90acd61 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:35 +02:00 Committer

[tip: x86/seves] x86/sev-es: Handle #DB Events

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: cb1ad3ecea959593400dfac4f027dbc005e62c39 Gitweb: https://git.kernel.org/tip/cb1ad3ecea959593400dfac4f027dbc005e62c39 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:16:02 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Setup a GHCB-based VC Exception handler

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 597cfe48212a3f110ab0f918bf59791f453e65b7 Gitweb: https://git.kernel.org/tip/597cfe48212a3f110ab0f918bf59791f453e65b7 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:24 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Add set_page_en/decrypted() helpers

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: c81d60029a1393183d2125fcb4b64831629b8864 Gitweb: https://git.kernel.org/tip/c81d60029a1393183d2125fcb4b64831629b8864 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:23 +02:00 Committer

[tip: x86/seves] x86/head/64: Install startup GDT

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 866b556efa1295934ed0bc20c2f208c93a873fb0 Gitweb: https://git.kernel.org/tip/866b556efa1295934ed0bc20c2f208c93a873fb0 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:30 +02:00 Committer

[tip: x86/seves] x86/paravirt: Allow hypervisor-specific VMMCALL handling under SEV-ES

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: f6a9f8a45810d2914ea422ff39bfe2e0251c50f2 Gitweb: https://git.kernel.org/tip/f6a9f8a45810d2914ea422ff39bfe2e0251c50f2 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:16:03 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Call set_sev_encryption_mask() earlier

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: c2a0304a286f386e45cea3f4b0617f0813de67fd Gitweb: https://git.kernel.org/tip/c2a0304a286f386e45cea3f4b0617f0813de67fd Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:21 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Check return value of kernel_ident_mapping_init()

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 4b3fdca64a7e8ad90c87cad1fbc6991471f48dc7 Gitweb: https://git.kernel.org/tip/4b3fdca64a7e8ad90c87cad1fbc6991471f48dc7 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:22 +02:00 Committer

[tip: x86/seves] x86/sev-es: Wire up existing #VC exit-code handlers

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: d3529bb73f76d0ec8aafaca505226fa0971c1dc9 Gitweb: https://git.kernel.org/tip/d3529bb73f76d0ec8aafaca505226fa0971c1dc9 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:48 +02:00 Committer

[tip: x86/seves] x86/sev-es: Handle instruction fetches from user-space

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 5e3427a7bc432ed2e5de394ac30f160cc6c37a1f Gitweb: https://git.kernel.org/tip/5e3427a7bc432ed2e5de394ac30f160cc6c37a1f Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:49 +02:00 Committer

[tip: x86/seves] x86/insn: Add insn_has_rep_prefix() helper

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 5901781a11175a5e5ee91746ec8627f18d47eebd Gitweb: https://git.kernel.org/tip/5901781a11175a5e5ee91746ec8627f18d47eebd Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:12 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Don't pre-map memory in KASLR code

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 8570978ea030757839747aa9944ea576708be3d4 Gitweb: https://git.kernel.org/tip/8570978ea030757839747aa9944ea576708be3d4 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:18 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Disable red-zone usage

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 6ba0efa46047936afa81460489cfd24bc95dd863 Gitweb: https://git.kernel.org/tip/6ba0efa46047936afa81460489cfd24bc95dd863 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:13 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Change add_identity_map() to take start and end

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 21cf2372618ef167d8c4ae04880fb873b55b2daa Gitweb: https://git.kernel.org/tip/21cf2372618ef167d8c4ae04880fb873b55b2daa Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:19 +02:00 Committer

[tip: x86/seves] x86/insn: Add insn_get_modrm_reg_off()

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 7af1bd822dd45a669fc178a35cc8183922333d56 Gitweb: https://git.kernel.org/tip/7af1bd822dd45a669fc178a35cc8183922333d56 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:11 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Add stage1 #VC handler

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 29dcc60f6a19fb0aaee97bd1ae2ed8a7dc6f0cfe Gitweb: https://git.kernel.org/tip/29dcc60f6a19fb0aaee97bd1ae2ed8a7dc6f0cfe Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:20 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Add page-fault handler

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 8b0d3b3b41ab6f14f1ce6d4a6b1c5f60b825123f Gitweb: https://git.kernel.org/tip/8b0d3b3b41ab6f14f1ce6d4a6b1c5f60b825123f Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:16 +02:00 Committer

[tip: x86/seves] x86/umip: Factor out instruction fetch

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 172b75e56b08846e6fb07a88e5685ce4e24f4620 Gitweb: https://git.kernel.org/tip/172b75e56b08846e6fb07a88e5685ce4e24f4620 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:09 +02:00 Committer

[tip: x86/seves] x86/boot/compressed/64: Add IDT Infrastructure

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 64e682638eb51070ba6044535b250aad43c5564e Gitweb: https://git.kernel.org/tip/64e682638eb51070ba6044535b250aad43c5564e Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:14 +02:00 Committer

[tip: x86/seves] x86/umip: Factor out instruction decoding

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 172639d79977ca7b5ce6f84f6606262f4081718f Gitweb: https://git.kernel.org/tip/172639d79977ca7b5ce6f84f6606262f4081718f Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:10 +02:00 Committer

[tip: x86/seves] x86/sev-es: Compile early handler code into kernel image

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: f980f9c31a923e9040dee0bc679a5f5b09e61f40 Gitweb: https://git.kernel.org/tip/f980f9c31a923e9040dee0bc679a5f5b09e61f40 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:39 +02:00 Committer

[tip: x86/seves] x86/insn: Make inat-tables.c suitable for pre-decompression code

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 05a2ae7c033ee30f25fbed3ceed549a5cac398a9 Gitweb: https://git.kernel.org/tip/05a2ae7c033ee30f25fbed3ceed549a5cac398a9 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:08 +02:00 Committer

[tip: x86/seves] x86/traps: Move pf error codes to

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 05a2fdf3230306daee1def019b8f52cd06bd2e48 Gitweb: https://git.kernel.org/tip/05a2fdf3230306daee1def019b8f52cd06bd2e48 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:07 +02:00 Committer

[tip: x86/seves] x86/entry/64: Add entry code for #VC handler

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: a13644f3a53de4e95a7bce6459f834e832ea44c5 Gitweb: https://git.kernel.org/tip/a13644f3a53de4e95a7bce6459f834e832ea44c5 Author:Joerg Roedel AuthorDate:Mon, 07 Sep 2020 15:15:46 +02:00 Committer

[tip: x86/seves] x86/sev-es: Setup an early #VC handler

2020-09-10 Thread tip-bot2 for Joerg Roedel
The following commit has been merged into the x86/seves branch of tip: Commit-ID: 74d8d9d531b4cc945a9f75aa2fc21d99ca5a9fe3 Gitweb: https://git.kernel.org/tip/74d8d9d531b4cc945a9f75aa2fc21d99ca5a9fe3 Author:Joerg Roedel AuthorDate:Tue, 08 Sep 2020 14:35:17 +02:00 Committer

<    1   2   3   4   5   6   7   8   9   10   >