a31...@redhat.com
Suggested-by: Oleg Nesterov
Tested-by: Andy Lavr
v1: https://lkml.kernel.org/r/20200817220425.9389-10-ebied...@xmission.com
Signed-off-by: Eric W. Biederman
---
fs/proc/fd.c | 17 +
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/fs/proc/fd.c b/fs/proc/f
As a companion to lookup_fd_rcu implement task_lookup_fd_rcu for
querying an arbitrary process about a specific file.
Acked-by: Christian Brauner
v1: https://lkml.kernel.org/r/20200818103713.aw46m7vprsy4vlve@wittgenstein
Signed-off-by: "Eric W. Biederman"
---
fs/file.c
t->files.
[1] f869e8a7f753 ("expose a low-level variant of fd_install() for binder")
[2] 44d8047f1d87 ("binder: use standard functions to allocate fds")
Acked-by: Christian Brauner
v1:https://lkml.kernel.org/r/20200817220425.9389-14-ebied...@xmission.com
Signed-off-by: "Eric W. Bied
and fget_light remove get_files_struct
so that it does not gain any new users.
[1] https://lkml.kernel.org/r/20180915160423.ga31...@redhat.com
Suggested-by: Oleg Nesterov
Acked-by: Christian Brauner
v1: https://lkml.kernel.org/r/20200817220425.9389-13-ebied...@xmission.com
Signed-off-by: "E
t;files.
[1] 483ce1d4b8c3 ("take descriptor-related part of close() to file.c")
[2] 44d8047f1d87 ("binder: use standard functions to allocate fds")
Acked-by: Christian Brauner
v1: https://lkml.kernel.org/r/20200817220425.9389-17-ebied...@xmission.com
Signed-off-by: &qu
.
Further this causes alloc_fd to take all of the same arguments as
__alloc_fd except for the files_struct argument.
Acked-by: Christian Brauner
v1: https://lkml.kernel.org/r/20200817220425.9389-15-ebied...@xmission.com
Signed-off-by: "Eric W. Biederman"
---
fs/file.c | 9 +
1 file
und of
discussion of this set of changes[1].
[1]
https://lkml.kernel.org/r/CAHk-=wj8BQbgJFLa+J0e=iT-1qpmCRTbPAJ8gd6MJQ=kbrp...@mail.gmail.com
Signed-off-by: "Eric W. Biederman"
---
Documentation/filesystems/files.rst | 6 +++---
fs/file.c | 4 ++--
]
https://lkml.kernel.org/r/CAHk-=wj8BQbgJFLa+J0e=iT-1qpmCRTbPAJ8gd6MJQ=kbrp...@mail.gmail.com
Signed-off-by: "Eric W. Biederman"
---
Documentation/filesystems/files.rst | 6 +++---
arch/powerpc/platforms/cell/spufs/coredump.c | 2 +-
fs/notify/dnotify/dnotify.c
.
[1] https://lkml.kernel.org/r/20180915160423.ga31...@redhat.com
Suggested-by: Oleg Nesterov
v1: https://lkml.kernel.org/r/20200817220425.9389-8-ebied...@xmission.com
Signed-off-by: "Eric W. Biederman"
---
fs/proc/fd.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletion
il.com
Signed-off-by: "Eric W. Biederman"
---
fs/file.c | 2 +-
fs/locks.c | 14 --
fs/proc/fd.c| 2 +-
include/linux/fdtable.h | 7 +++
4 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/fs/file.c b/fs/file.c
in
of this set of changes[1].
[1]
https://lkml.kernel.org/r/CAHk-=wj8BQbgJFLa+J0e=iT-1qpmCRTbPAJ8gd6MJQ=kbrp...@mail.gmail.com
Signed-off-by: "Eric W. Biederman"
---
fs/file.c | 2 +-
include/linux/fdtable.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff
in fget_light having to fallback to fget reducing
performance.
Suggested-by: Oleg Nesterov
Reviewed-by: Cyrill Gorcunov
v1: https://lkml.kernel.org/r/20200817220425.9389-4-ebied...@xmission.com
Signed-off-by: "Eric W. Biederman"
---
kernel/kcmp.c | 20
1 file
/20180915160423.ga31...@redhat.com
Suggested-by: Oleg Nesterov
v1: https://lkml.kernel.org/r/20200817220425.9389-5-ebied...@xmission.com
Signed-off-by: "Eric W. Biederman"
---
kernel/bpf/syscall.c | 20 +++-
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/kernel/bpf
/r/20200817220425.9389-2-ebied...@xmission.com
Signed-off-by: "Eric W. Biederman"
---
fs/coredump.c | 5 +
fs/exec.c | 5 +
include/linux/fdtable.h | 2 +-
kernel/fork.c | 12 ++--
4 files changed, 9 insertions(+), 15 deletions(-)
Now that exec no longer needs to restore the previous value of current->files
on error there are no more callers of reset_files_struct so remove it.
Acked-by: Christian Brauner
v1: https://lkml.kernel.org/r/20200817220425.9389-3-ebied...@xmission.com
Signed-off-by: "Eric W. Biederman&q
23.21964-1-jlay...@kernel.org
[16] https://lkml.kernel.org/r/20180914105310.6454-1-jlay...@kernel.org
[17] https://lkml.kernel.org/r/87a7ohs5ow@xmission.com
[18] https://lkml.kernel.org/r/87pn8c1uj6.fsf...@x220.int.ebiederm.org
Acked-by: Christian Brauner
v1: https://lkml.kernel.org/r/202008
On Mon, Oct 26, 2020 at 09:33:54AM -0700, Eric Biggers wrote:
> On Tue, Oct 06, 2020 at 08:51:45PM -0700, Eric Biggers wrote:
> > On Fri, Sep 18, 2020 at 02:57:05PM -0700, Eric Biggers wrote:
> > > On Fri, Sep 18, 2020 at 04:42:07PM -0400, Theodore Y. Ts'o wrote:
> >
>
On Mon, Oct 26, 2020 at 09:34:03AM -0700, Eric Biggers wrote:
> On Tue, Oct 06, 2020 at 08:50:58PM -0700, Eric Biggers wrote:
> > On Tue, Sep 15, 2020 at 09:36:52PM -0700, Eric Biggers wrote:
> > > From: Eric Biggers
> > >
> > > Remove some dead code
On Mon, Oct 26, 2020 at 09:33:43AM -0700, Eric Biggers wrote:
> On Tue, Oct 06, 2020 at 08:50:21PM -0700, Eric Biggers wrote:
> > On Tue, Sep 15, 2020 at 09:19:08PM -0700, Eric Biggers wrote:
> > > From: Eric Biggers
> > >
> > > The RNDRESEEDCRNG ioctl reseeds
On Wed, Nov 11, 2020 at 09:19:37AM +0100, Ard Biesheuvel wrote:
> (+ Eric)
>
> On Thu, 5 Nov 2020 at 16:29, Ard Biesheuvel wrote:
> >
> > When reseeding the CRNG periodically, arch_get_random_seed_long() is
> > called to obtain entropy from an architec
the performance of this hardware to ARMv8 CE? I thought
that QCE (at least on other SoCs) isn't very useful because ARMv8 CE is faster.
- Eric
gt; from thge syncookie. Instead of returning the existing socket in
> tcp_(v4|v6)_syn_recv_sock and continue the protocol state machine
> execution, tcp_(v4|v6)_syn_recv_sock signals that already exists a
> socket, and tells tcp_(v4|v6)_rcv to lookup the socket again in the
Hi Jacob,
On 11/18/20 5:19 PM, Jacob Pan wrote:
> Hi Eric,
>
> On Wed, 18 Nov 2020 12:21:37 +0100, Eric Auger
> wrote:
>
>> In virtualization use case, when a guest is assigned
>> a PCI host device, protected by a virtual IOMMU on the guest,
>> the
to force a checkpoint when a new
> file is fsync'ed, store the dirhash on-disk appended to i_name.
>
> This patch incorporates work by Eric Biggers
> and Jaegeuk Kim .
>
> Co-developed-by: Eric Biggers
> Signed-off-by: Eric Biggers
> Signed-off-by: Daniel Rosenberg
d be
removed too.
Otherwise this patch looks good; feel free to add:
Acked-by: Eric Biggers
- Eric
ings consistent.
Otherwise, please feel free to add:
Reviewed-by: Eric Biggers
- Eric
On 11/17/20 10:40 AM, Kuniyuki Iwashima wrote:
> The SO_REUSEPORT option allows sockets to listen on the same port and to
> accept connections evenly. However, there is a defect in the current
> implementation. When a SYN packet is received, the connection is tied to a
> listening socket.
In preparation for vSVA, let's accept userspace provided configs
with more than one CD. We check the max CD against the host iommu
capability and also the format (linear versus 2 level).
Signed-off-by: Eric Auger
Signed-off-by: Shameer Kolothum
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
When a stage 1 related fault event is read from the event queue,
let's propagate it to potential external fault listeners, ie. users
who registered a fault handler.
Signed-off-by: Eric Auger
---
v8 -> v9:
- adapt to the removal of IOMMU_FAULT_UNRECOV_PERM_VALID:
only l
In order to cascade guest CFGI_CD, let's add PASID cache invalidation
per PASID.
Signed-off-by: Eric Auger
---
v12 -> v13:
- Fix !(info->flags & IOMMU_INV_PASID_FLAGS_PASID) check
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 16 +---
1 file changed, 13 insert
The bind/unbind_guest_msi() callbacks check the domain
is NESTED and redirect to the dma-iommu implementation.
Signed-off-by: Eric Auger
---
v6 -> v7:
- remove device handle argument
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 43 +
1 file changed, 43 inserti
into the correct
physical doorbell. So let's forbid this situation.
Signed-off-by: Eric Auger
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 41 +
1 file changed, 41 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
Nested mode currently is not compatible with HW MSI reserved regions.
Indeed MSI transactions targeting this MSI doorbells bypass the SMMU.
Let's check nested mode is not attempted in such configuration.
Signed-off-by: Eric Auger
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 23
With nested stage support, soon we will need to invalidate
S1 contexts and ranges tagged with an unmanaged asid, this
latter being managed by the guest. So let's introduce 2 helpers
that allow to invalidate with externally managed ASIDs
Signed-off-by: Eric Auger
---
drivers/iommu/arm/arm-smmu
On attach_pasid_table() we program STE S1 related info set
by the guest into the actual physical STEs. At minimum
we need to program the context descriptor GPA and compute
whether the stage1 is translated/bypassed or aborted.
Signed-off-by: Eric Auger
---
v7 -> v8:
- remove smmu->features
Implement domain-selective and page-selective IOTLB invalidations.
Signed-off-by: Eric Auger
---
v7 -> v8:
- ASID based invalidation using iommu_inv_pasid_info
- check ARCHID/PASID flags in addr based invalidation
- use __arm_smmu_tlb_inv_context and __arm_smmu_tlb_inv_range_nosync
v6 -&
ectly mapped through both stages.
Nested mode is not compatible with HW MSI regions as in that
case gDB and hDB should have a 1-1 mapping. This check will
be done when attaching each device to the IOMMU domain.
Signed-off-by: Eric Auger
---
v10 -> v11:
- fix compilation if !CONFIG_IOMMU_DMA
v7 -
From: Jean-Philippe Brucker
When handling faults from the event or PRI queue, we need to find the
struct device associated to a SID. Add a rb_tree to keep track of SIDs.
Signed-off-by: Jean-Philippe Brucker
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 161
mode, only stage 2 is "finalized" as the host does
not own/configure the stage 1 context descriptor; guest does.
Signed-off-by: Eric Auger
---
v10 -> v11:
- Fix an issue reported by Shameer when switching from with vSMMU
to without vSMMU. Despite the spec does not seem to menti
quot;set" field
will be set when the guest passes the pasid table.
Signed-off-by: Eric Auger
---
v12 -> v13:
- does not dynamically allocate s1-cfg and s2_cfg anymore. Add
the set field
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 43 +
drivers/iommu/arm/arm-smm
nd similarly
a single virtual doorbell mapping gets registered (1 single
virtual doorbell is used on guest as well).
Signed-off-by: Eric Auger
---
v7 -> v8:
- dummy iommu_unbind_guest_msi turned into a void function
v6 -> v7:
- remove the device handle parameter.
- Add comments say
.
A generic iommu_pasid_table_config struct is introduced in
a new iommu.h uapi header. This is going to be used by the VFIO
user API.
Signed-off-by: Jean-Philippe Brucker
Signed-off-by: Liu, Yi L
Signed-off-by: Ashok Raj
Signed-off-by: Jacob Pan
Signed-off-by: Eric Auger
---
v12 ->
Regards
Eric
This series can be found at:
https://github.com/eauger/linux/tree/5.10-rc4-2stage-v13
(including the VFIO part in his last version: v11)
The series includes a patch from Jean-Philippe. It is better to
review the original patch:
[PATCH v8 2/9] iommu/arm-smmu-v3: Maintain a SID->dev
Hi Vikas,
On 11/17/20 5:36 PM, Vikas Gupta wrote:
> Hi Eric,
>
> On Tue, Nov 17, 2020 at 1:55 PM Auger Eric wrote:
>>
>> Hi Vikas,
>>
>> On 11/17/20 9:05 AM, Auger Eric wrote:
>>> Hi Vikas,
>>>
>>> On 11/17/20 7:25 AM, Vikas Gupta wr
if (res < 0)
> > > + return ERR_PTR(res);
> > > + else if (res)
> > > + goto found;
> > > + }
> >
> > Overly long line here. Also 'else if' is unnecess
dy added to the ext4/encrypt and ext4/encrypt_1k
exclusion lists by xfstests-bld commit 02e4bfe628b4.
- Eric
when using direct I/O on unencrypted files).
Actually the position in the file the I/O is targeting must be fs-block aligned
too, not just the length of the I/O.
It's only the pointer to the user data buffer that no longer needs to be
fs-block aligned (this changed between v6 and v7).
- Eric
un, 1);
> + sg_idx = 0;
> + du_filled = 0;
This is leaking a bounce page if crypto_skcipher_encrypt() fails. This can be
fixed either by keeping the 'i++' that was on the error path before, or by
moving the i++ in the for statement to just below to where the bounce page was
successfully allocated.
- Eric
before?
> diff --git a/block/bounce.c b/block/bounce.c
> index 162a6eee8999..b15224799008 100644
> --- a/block/bounce.c
> +++ b/block/bounce.c
> @@ -295,6 +295,7 @@ static void __blk_queue_bounce(struct request_queue *q,
> struct bio **bio_orig,
> bool bounce = false;
> int sectors = 0;
> bool passthrough = bio_is_passthrough(*bio_orig);
> + unsigned int bio_sectors_alignment;
>
> bio_for_each_segment(from, *bio_orig, iter) {
> if (i++ < BIO_MAX_PAGES)
> @@ -305,6 +306,9 @@ static void __blk_queue_bounce(struct request_queue *q,
> struct bio **bio_orig,
> if (!bounce)
> return;
>
> + bio_sectors_alignment = blk_crypto_bio_sectors_alignment(bio);
> + sectors = round_down(sectors, bio_sectors_alignment);
> +
This can be one line:
sectors = round_down(sectors, blk_crypto_bio_sectors_alignment(bio));
- Eric
lities general debug facilities so that
they can be used for cases other than crash dump. The crash dump kernel
would always enable them because it can assume that the hardware is
very likely in a wonky state.
Eric
b6cded: "ext4: use generic casefolding support").
- Eric
to force a checkpoint when a new
> file is fsync'ed, store the dirhash on-disk appended to i_name.
>
> This patch incorporates work by Eric Biggers
> and Jaegeuk Kim .
>
> Co-developed-by: Eric Biggers
> Signed-off-by: Eric Biggers
> Signed-off-by:
On Tue, Nov 17, 2020 at 10:16:49AM -0800, Eric Biggers wrote:
>
> Here's a suggestion which I think explains it a lot better. It's still
> possible
> I'm misunderstanding something, though, so please check it carefully:
>
> /**
> * generic_set_encrypted_ci_d_ops - hel
On Tue, Nov 17, 2020 at 04:03:14AM +, Daniel Rosenberg wrote:
> diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
> index a8f7a43f031b..df2c66ca370e 100644
> --- a/include/linux/fscrypt.h
> +++ b/include/linux/fscrypt.h
> @@ -741,8 +741,9 @@ static inline int
On Tue, Nov 17, 2020 at 04:03:13AM +, Daniel Rosenberg wrote:
>
> Currently the casefolding dentry operation are always set if the
> filesystem defines an encoding because the features is toggleable on
> empty directories. Since we don't know what set of functions we'll
> eventually need, and
edistributor TYPER last bit
> computation")
> Reported-by: Keqian Zhu
> Signed-off-by: Zenghui Yu
Given the state of last bit, it looks sensible atm.
Reviewed-by: Eric Auger
Thanks
Eric
> ---
>
> This may be the easiest way to fix the issue and to get the fix backporte
; algorithms on sdm845.The patch series has been tested using the kernel
> crypto testing module tcrypto.ko.
Did you do this testing with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled?
Do all tests pass with it enabled?
- Eric
Hi Shameer,
On 11/17/20 12:39 PM, Shameerali Kolothum Thodi wrote:
> Hi Eric,
>
>> -Original Message-----
>> From: Eric Auger [mailto:eric.au...@redhat.com]
>> Sent: 16 November 2020 10:43
>> To: eric.auger@gmail.com; eric.au...@redhat.com;
>> io.
D in the region, so we can never compute the address of the RD
> even if the base address is set.
>
> Let's drop the reporting of Last for userspace for now, as it never
> worked. If you post a patch addressing that quickly, I'll get it to
> Paolo by the end of the week (there's
On 11/17/20 8:29 AM, Ricardo Dias wrote:
> When the TCP stack is in SYN flood mode, the server child socket is
> created from the SYN cookie received in a TCP packet with the ACK flag
> set.
>
...
>
> @@ -1374,6 +1381,13 @@ static struct sock *tcp_v6_syn_recv_sock(const struct
> sock *sk,
D in the region, so we can never compute the address of the RD
> even if the base address is set.
>
> Let's drop the reporting of Last for userspace for now, as it never
> worked. If you post a patch addressing that quickly, I'll get it to
> Paolo by the end of the week (there's another fix that needs merging).
>
> Eric: do we have any test covering the userspace API?
No, there are no KVM selftests for that yet.
Thanks
Eric
>
> Thanks,
>
> M.
Hi Shameer,
On 5/13/20 5:57 PM, Shameerali Kolothum Thodi wrote:
> Hi Eric,
>
>> -Original Message-
>> From: Auger Eric [mailto:eric.au...@redhat.com]
>> Sent: 13 May 2020 14:29
>> To: Shameerali Kolothum Thodi ;
>> Zhangfei Gao ; eric.auger
Hi Vikas,
On 11/17/20 9:05 AM, Auger Eric wrote:
> Hi Vikas,
>
> On 11/17/20 7:25 AM, Vikas Gupta wrote:
>> Hi Eric,
>>
>> On Mon, Nov 16, 2020 at 6:44 PM Auger Eric wrote:
>>>
>>> Hi Vikas,
>>>
>>> On 11/13/20 6:24 PM, Vikas Gupta
Hi Vikas,
On 11/17/20 7:25 AM, Vikas Gupta wrote:
> Hi Eric,
>
> On Mon, Nov 16, 2020 at 6:44 PM Auger Eric wrote:
>>
>> Hi Vikas,
>>
>> On 11/13/20 6:24 PM, Vikas Gupta wrote:
>>> Hi Eric,
>>>
>>> On Fri, Nov 13, 2020 at 12:10 AM Au
rstand. How is this different from just not specifying the
compress_extension mount option? And how can a file have compression both
enabled and disabled at the same time?
- Eric
are. Systems where people care about kdump the most.
Eric
ed
> callbacks in the PCI hotplug add/del path to update this information).
>
> [a]
> https://lore.kernel.org/lkml/1588812129-8596-1-git-send-email-anthony.yzn...@oracle.com/
>
> Below, inline reply to Eric's last message.
>
>
> On 15/11/2020 17:46, Eric W. Bi
Hi Vikas,
On 11/13/20 6:24 PM, Vikas Gupta wrote:
> Hi Eric,
>
> On Fri, Nov 13, 2020 at 12:10 AM Auger Eric wrote:
>>
>> Hi Vikas,
>>
>> On 11/12/20 6:58 PM, Vikas Gupta wrote:
>>> This RFC adds support for MSI for platform devices.
>>&g
The VFIO API was enhanced to support nested stage control: a bunch of
new iotcls, one DMA FAULT region and an associated specific IRQ.
Let's document the process to follow to set up nested mode.
Signed-off-by: Eric Auger
---
v11 -> v12:
s/VFIO_REGION_INFO_CAP_PRODUCER_FA
When the userspace increments the head of the page response
buffer ring, let's push the response into the iommu layer.
This is done through a workqueue that pops the responses from
the ring buffer and increment the tail.
Signed-off-by: Eric Auger
---
drivers/vfio/pci/vfio_pci.c | 40
In preparation for vSVA, let's register a DMA fault response region,
where the userspace will push the page responses and increment the
head of the buffer. The kernel will pop those responses and inject them
on iommu side.
Signed-off-by: Eric Auger
---
drivers/vfio/pci/vfio_pci.c | 114
Add a new IRQ type/subtype to get notification on nested
stage DMA faults.
Signed-off-by: Eric Auger
---
include/uapi/linux/vfio.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index 0e2bfbeccd08..1e5c82f9d14d 100644
--- a/include
Register an IOMMU fault handler which records faults in
the DMA FAULT region ring buffer. In a subsequent patch, we
will add the signaling of a specific eventfd to allow the
userspace to be notified whenever a new fault as shown up.
Signed-off-by: Eric Auger
---
v11 -> v12:
- t
is detected at physical level. Also two specific regions allow to
- expose the fault records to the user space and
- inject page responses.
This latter functionality is not exercised in this series
but is provided as a POC for further vSVA activities (Shameer's input).
Best Regards
Eric
The DMA FAULT region contains the fault ring buffer.
There is benefit to let the userspace mmap this area.
Expose this mmappable area through a sparse mmap entry
and implement the mmap operation.
Signed-off-by: Eric Auger
---
v8 -> v9:
- remove unused index local varia
From: "Liu, Yi L"
This patch adds an VFIO_IOMMU_SET_PASID_TABLE ioctl
which aims to pass the virtual iommu guest configuration
to the host. This latter takes the form of the so-called
PASID table.
Signed-off-by: Jacob Pan
Signed-off-by: Liu, Yi L
Signed-off-by: Eric Auger
---
, entry size). At the moment the region is dimensionned
for 512 fault records.
Signed-off-by: Eric Auger
---
v11 -> v12:
- set fault_pages to NULL after free
- check new_tail >= header->nb_entries (Zenghui)
v10 -> v11:
- rename vfio_pci_init_dma_fault_region into
vfio_pci_dma_fault
This patch adds the VFIO_IOMMU_SET_MSI_BINDING ioctl which aim
to (un)register the guest MSI binding to the host. This latter
then can use those stage 1 bindings to build a nested stage
binding targeting the physical MSIs.
Signed-off-by: Eric Auger
---
v10 -> v11:
- renamed ustr
DATE ioctl with aims
at propagating guest stage1 IOMMU cache invalidations to the host.
Signed-off-by: Liu, Yi L
Signed-off-by: Eric Auger
---
v10 -> v11:
- renamed ustruct into cache_inv
v8 -> v9:
- change the ioctl ID
v6 -> v7:
- Use iommu_capsule struct
- renamed vfio_iommu_for_each_d
From: Tina Zhang
Caps the number of irqs with fixed indexes and uses capability chains
to chain device specific irqs.
Signed-off-by: Tina Zhang
Signed-off-by: Eric Auger
[Eric: Put cap_offset at the end of the vfio_irq_info struct,
remove GFX IRQ at the moment and remove any reference
Implement IRQ capability chain infrastructure. All interrupt
indexes beyond VFIO_PCI_NUM_IRQS are handled as extended
interrupts. They are registered with a specific type/subtype
and supported flags.
Signed-off-by: Eric Auger
---
drivers/vfio/pci/vfio_pci.c | 99
Register the VFIO_IRQ_TYPE_NESTED/VFIO_IRQ_SUBTYPE_DMA_FAULT
IRQ that allows to signal a nested mode DMA fault.
Signed-off-by: Eric Auger
---
v10 -> v11:
- the irq now is registered in vfio_pci_dma_fault_init()
in case the domain is nested
---
drivers/vfio/pci/vfio_pci.c |
On 11/13/20 8:09 PM, Ricardo Dias wrote:
> When the TCP stack is in SYN flood mode, the server child socket is
> created from the SYN cookie received in a TCP packet with the ACK flag
> set.
>
> The child socket is created when the server receives the first TCP
> packet with a valid SYN cookie
In preparation for vSVA, let's accept userspace provided configs
with more than one CD. We check the max CD against the host iommu
capability and also the format (linear versus 2 level).
Signed-off-by: Eric Auger
Signed-off-by: Shameer Kolothum
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
When a stage 1 related fault event is read from the event queue,
let's propagate it to potential external fault listeners, ie. users
who registered a fault handler.
Signed-off-by: Eric Auger
---
v8 -> v9:
- adapt to the removal of IOMMU_FAULT_UNRECOV_PERM_VALID:
only l
-by: Eric Auger
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 83 -
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 6 +-
2 files changed, 48 insertions(+), 41 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
Nested mode currently is not compatible with HW MSI reserved regions.
Indeed MSI transactions targeting this MSI doorbells bypass the SMMU.
Let's check nested mode is not attempted in such configuration.
Signed-off-by: Eric Auger
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 23
On attach_pasid_table() we program STE S1 related info set
by the guest into the actual physical STEs. At minimum
we need to program the context descriptor GPA and compute
whether the stage1 is translated/bypassed or aborted.
Signed-off-by: Eric Auger
---
v7 -> v8:
- remove smmu->features
When handling faults from the event or PRI queue, we need to find the
struct device associated to a SID. Add a rb_tree to keep track of SIDs.
Signed-off-by: Eric Auger
Signed-off-by: Jean-Philippe Brucker
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 99 +
drivers/iommu
The bind/unbind_guest_msi() callbacks check the domain
is NESTED and redirect to the dma-iommu implementation.
Signed-off-by: Eric Auger
---
v6 -> v7:
- remove device handle argument
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 43 +
1 file changed, 43 inserti
Regards
Eric
This series can be found at:
https://github.com/eauger/linux/tree/5.10-rc4-2stage-v12
(including the VFIO part)
The series includes a patch from Jean-Philippe. It is better to
review the original patch:
[PATCH v8 2/9] iommu/arm-smmu-v3: Maintain a SID->device structure
The VFIO ser
into the correct
physical doorbell. So let's forbid this situation.
Signed-off-by: Eric Auger
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 41 +
1 file changed, 41 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
In order to cascade guest CFGI_CD, let's add PASID cache invalidation
per PASID.
Signed-off-by: Eric Auger
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
b/drivers
.
In nested mode, only stage 2 is "finalized" as the host does
not own/configure the stage 1 context descriptor; guest does.
Signed-off-by: Eric Auger
---
v10 -> v11:
- Fix an issue reported by Shameer when switching from with vSMMU
to without vSMMU. Despite the spec does not seem to menti
With nested stage support, soon we will need to invalidate
S1 contexts and ranges tagged with an unmanaged asid, this
latter being managed by the guest. So let's introduce 2 helpers
that allow to invalidate with externally managed ASIDs
Signed-off-by: Eric Auger
---
drivers/iommu/arm/arm-smmu
Implement domain-selective and page-selective IOTLB invalidations.
Signed-off-by: Eric Auger
---
v7 -> v8:
- ASID based invalidation using iommu_inv_pasid_info
- check ARCHID/PASID flags in addr based invalidation
- use __arm_smmu_tlb_inv_context and __arm_smmu_tlb_inv_range_nosync
v6 -&
nd similarly
a single virtual doorbell mapping gets registered (1 single
virtual doorbell is used on guest as well).
Signed-off-by: Eric Auger
---
v7 -> v8:
- dummy iommu_unbind_guest_msi turned into a void function
v6 -> v7:
- remove the device handle parameter.
- Add comments say
ectly mapped through both stages.
Nested mode is not compatible with HW MSI regions as in that
case gDB and hDB should have a 1-1 mapping. This check will
be done when attaching each device to the IOMMU domain.
Signed-off-by: Eric Auger
---
v10 -> v11:
- fix compilation if !CONFIG_IOMMU_DMA
v7 -
.
A generic iommu_pasid_table_config struct is introduced in
a new iommu.h uapi header. This is going to be used by the VFIO
user API.
Signed-off-by: Jean-Philippe Brucker
Signed-off-by: Liu, Yi L
Signed-off-by: Ashok Raj
Signed-off-by: Jacob Pan
Signed-off-by: Eric Auger
---
v11 ->
On 9/21/20 7:55 PM, Minchan Kim wrote:
> On Mon, Sep 21, 2020 at 07:56:33AM +0100, Christoph Hellwig wrote:
>> On Mon, Aug 31, 2020 at 05:06:33PM -0700, Minchan Kim wrote:
>>> There is usecase that System Management Software(SMS) want to give a
>>> memory hint like MADV_[COLD|PAGEEOUT] to other
801 - 900 of 29763 matches
Mail list logo