[PATCH V3 3/3] vdpa_sim: flush workers on suspend

2024-05-20 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Add a lock to enforce ordering between clearing running, flushing, and posting new work in vdpasim_kick_vq. It must be a spin lock because vdpasim_kick_vq may be reached va eventfd_write. Signed-off-by: Steve Sistare --- drivers

[PATCH V3 2/3] vduse: suspend

2024-05-20 Thread Steve Sistare
Support the suspend operation. There is little to do, except flush to guarantee no workers are running when suspend returns. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_user/vduse_dev.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/vdpa/vdpa_user

[PATCH V3 0/3] flush workers on suspend

2024-05-20 Thread Steve Sistare
uspend) - call vhost_dev_flush unconditionally in "vhost-vdpa: flush workers on suspend" Changes in v3: - rewrote vdpa_sim patch Steve Sistare (3): vhost-vdpa: flush workers on suspend vduse: suspend vdpa_sim: flush workers on suspend drivers/vdpa/vdpa_sim/vdpa_sim.c | 16

[PATCH V3 1/3] vhost-vdpa: flush workers on suspend

2024-05-20 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Fixes: f345a0143b4d ("vhost-vdpa: uAPI to suspend the device") Signed-off-by: Steve Sistare Acked-by: Eugenio Pérez --- drivers/vhost/vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/vhost/vdpa.c

[PATCH V2] vdpa: skip suspend/resume ops if not DRIVER_OK

2024-02-13 Thread Steve Sistare
If a vdpa device is not in state DRIVER_OK, then there is no driver state to preserve, so no need to call the suspend and resume driver ops. Suggested-by: Eugenio Perez Martin " Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH V2 2/3] vduse: suspend

2024-02-12 Thread Steve Sistare
Support the suspend operation. There is little to do, except flush to guarantee no workers are running when suspend returns. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_user/vduse_dev.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/vdpa/vdpa_user

[PATCH V2 1/3] vhost-vdpa: flush workers on suspend

2024-02-12 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index bc4a51e4638b..a3b986c24805 100644 --- a/drivers/vhost/vdpa.c +++ b

[PATCH V2 0/3] flush workers on suspend

2024-02-12 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns, for vdpa, vpa_sim, and vduse. (mlx5 already does so, via the path mlx5_vdpa_suspend -> unregister_link_notifier -> flush_workqueue.) Steve Sistare (3): vhost-vdpa: flush workers on suspend vduse: suspend vdpa_sim:

[PATCH V2 3/3] vdpa_sim: flush workers on suspend

2024-02-12 Thread Steve Sistare
Flush to guarantee no workers are running when suspend returns. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index be2925d0d283

[PATCH V1] vdpa: suspend and resume require DRIVER_OK

2024-02-09 Thread Steve Sistare
Calling suspend or resume requires VIRTIO_CONFIG_S_DRIVER_OK, for all vdpa devices. Suggested-by: Eugenio Perez Martin " Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index bc4a51e

[PATCH V2] vdpa_sim: reset must not run

2024-02-09 Thread Steve Sistare
vdpasim_do_reset sets running to true, which is wrong, as it allows vdpasim_kick_vq to post work requests before the device has been configured. To fix, do not set running until VIRTIO_CONFIG_S_DRIVER_OK is set. Fixes: 0c89e2a3a9d0 ("vdpa_sim: Implement suspend vdpa op") Signed-off

[PATCH V1] vdpa_sim: reset must not run

2024-01-17 Thread Steve Sistare
vdpasim_do_reset sets running to true, which is wrong, as it allows vdpasim_kick_vq to post work requests before the device has been configured. To fix, do not set running until VIRTIO_CONFIG_S_FEATURES_OK is set. Fixes: 0c89e2a3a9d0 ("vdpa_sim: Implement suspend vdpa op") Signed-off

[RFC V1 12/13] vdpa_sim: new owner capability

2024-01-10 Thread Steve Sistare
The vdpa_sim device supports ownership transfer to a new process, so advertise VHOST_BACKEND_F_NEW_OWNER. User virtual addresses are used by the software iommu, so VHOST_IOTLB_REMAP is required after VHOST_NEW_OWNER, so advertise VHOST_BACKEND_F_IOTLB_REMAP. Signed-off-by: Steve Sistare

[RFC V1 13/13] vduse: new owner capability

2024-01-10 Thread Steve Sistare
The vduse device supports ownership transfer to a new process, so advertise VHOST_BACKEND_F_NEW_OWNER. User virtual addresses are used by the software iommu, so VHOST_IOTLB_REMAP is required after VHOST_NEW_OWNER, so advertise VHOST_BACKEND_F_IOTLB_REMAP. Signed-off-by: Steve Sistare

[RFC V1 07/13] vhost-vdpa: flush workers on suspend

2024-01-10 Thread Steve Sistare
in between. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 8fe1562d24af..9673e8e20d11 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -591,10 +591,14 @@ static long

[RFC V1 04/13] vhost-vdpa: VHOST_BACKEND_F_NEW_OWNER

2024-01-10 Thread Steve Sistare
Add the VHOST_BACKEND_F_NEW_OWNER backend capability, which indicates that VHOST_NEW_OWNER is supported. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 7 ++- include/uapi/linux/vhost_types.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers

[RFC V1 11/13] vdpa/mlx5: new owner capability

2024-01-10 Thread Steve Sistare
-by: Steve Sistare --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 26ba7da6b410..26f24fb0e160 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5

[RFC V1 10/13] vdpa_sim: flush workers on suspend

2024-01-10 Thread Steve Sistare
in between. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index 6304cb0b4770..8734834983cb 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b

[RFC V1 09/13] vdpa_sim: reset must not run

2024-01-10 Thread Steve Sistare
vdpasim_do_reset sets running to true, which is wrong, as it allows vdpasim_kick_vq to post work requests before the device has been configured. To fix, do not set running until VIRTIO_CONFIG_S_FEATURES_OK is set. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- 1

[RFC V1 05/13] vhost-vdpa: VHOST_IOTLB_REMAP

2024-01-10 Thread Steve Sistare
mapped. The user must suspend the device before the old address is invalidated, and cannot resume it until after VHOST_IOTLB_REMAP is called, but this requirement is not enforced by the API. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 34

[RFC V1 06/13] vhost-vdpa: VHOST_BACKEND_F_IOTLB_REMAP

2024-01-10 Thread Steve Sistare
the feature during negotiation does not negate this requirement. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 8 +++- include/uapi/linux/vhost_types.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index

[RFC V1 08/13] vduse: flush workers on suspend

2024-01-10 Thread Steve Sistare
in between. Signed-off-by: Steve Sistare --- drivers/vdpa/vdpa_user/vduse_dev.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c index 0ddd4b8abecb..6b25457a037d 100644 --- a/drivers/vdpa/vdpa_user

[RFC V1 03/13] vhost-vdpa: VHOST_NEW_OWNER

2024-01-10 Thread Steve Sistare
Add an ioctl to transfer file descriptor ownership and pinned memory accounting from one process to another. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 37 + drivers/vhost/vhost.c | 15 +++ drivers/vhost/vhost.h | 1

[RFC V1 00/13] vdpa live update

2024-01-10 Thread Steve Sistare
write(fd, {VHOST_IOTLB_REMAP, new_addr}) ioctl(fd, VHOST_VDPA_SET_STATUS, ACKNOWLEDGE | DRIVER | FEATURES_OK | DRIVER_OK) Steve Sistare (13): vhost-vdpa: count pinned memory vhost-vdpa: pass mm to bind vhost-vdpa: VHOST_NEW_OWNER vhost-vdpa: VHOST_BACKEND_F_NEW_OWNER vhost

[RFC V1 02/13] vhost-vdpa: pass mm to bind

2024-01-10 Thread Steve Sistare
Pass the target mm to vhost_vdpa_bind_mm. No functional change. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 10fb95bcca1a..2269988d6d33 100644 --- a/drivers

[RFC V1 01/13] vhost-vdpa: count pinned memory

2024-01-10 Thread Steve Sistare
Remember the count of pinned memory for the device. Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index da7ec77cdaff..10fb95bcca1a 100644 --- a/drivers/vhost/vdpa.c

Re: [PATCH v2] cifs: remove unnecessary copies of tcon->crfid.fid

2021-04-19 Thread Steve French
ll come up regarding cached_fid > refcount and cifsFileInfo refcount going out of sync otherwise. > > Cheers, > -- > Aurélien Aptel / SUSE Labs Samba Team > GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 > SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE > GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München) > -- Thanks, Steve

Re: [PATCH] perf/x86/intel/uncore: Remove uncore extra PCI dev HSWEP_PCI_PCU_3

2021-04-19 Thread Steve Wahl
Tested-by: Steve Wahl On Thu, Apr 15, 2021 at 02:22:43PM -0700, kan.li...@linux.intel.com wrote: > From: Kan Liang > > There may be a kernel panic on the Haswell server and the Broadwell > server, if the snbep_pci2phy_map_init() return error. > > The uncore_extra_pci_d

Re: [PATCH v13 00/12] Add AMD SEV guest live migration support

2021-04-16 Thread Steve Rutherford
s series need to disable the MSR during kvm_pv_guest_cpu_reboot()? I _think_ going into blackout during the window after restart, but before the MSR is explicitly reenabled, would cause corruption. The historical shared pages could be re-allocated as non-shared pages during restart. Steve

Re: [PATCH] x86/platform/uv: Fix inconsistent indenting

2021-04-16 Thread Steve Wahl
Reviewed-by: Steve Wahl On Fri, Apr 16, 2021 at 06:10:40PM +0800, Yang Li wrote: > Kernel test robot throws below warning -> > > smatch warnings: > arch/x86/kernel/apic/x2apic_uv_x.c:111 early_get_pnodeid() warn: > inconsistent indenting > > Reported-by: Abaci Robot

[PATCH] perf/x86/intel/uncore: Avoid null dereferences (uncore_extra_pci_dev)

2021-04-15 Thread Steve Wahl
snbep_pci2phy_map_init if BIOS doesn't supply pcibus_to_node information. Fixes: 9a7832ce3d92 ("perf/x86/intel/uncore: With > 8 nodes, get pci bus die id from NUMA info") Signed-off-by: Steve Wahl --- arch/x86/events/intel/uncore_snbep.c | 10 +++--- 1 file changed, 7 insertions(+), 3 delet

Re: [PATCH] locking/qrwlock: Fix ordering in queued_write_lock_slowpath

2021-04-15 Thread Steve Capper
rably annotated a bit like Peter's example to show the READ_ONCE() being speculated. I can confirm that this patch fixes a problem observed in ep_scan_ready_list(.) whereby ovflist appeared to change when the write lock was held. So please feel free to add: Tested-by: Steve Capper Also, I have

Re: [PATCH v12 13/13] x86/kvm: Add kexec support for SEV Live Migration.

2021-04-13 Thread Steve Rutherford
On Tue, Apr 13, 2021 at 4:47 AM Ashish Kalra wrote: > > On Mon, Apr 12, 2021 at 07:25:03PM -0700, Steve Rutherford wrote: > > On Mon, Apr 12, 2021 at 6:48 PM Ashish Kalra wrote: > > > > > > On Mon, Apr 12, 2021 at 06:23:32PM -0700, Steve Rutherford wrote: > >

Re: [PATCH v12 13/13] x86/kvm: Add kexec support for SEV Live Migration.

2021-04-12 Thread Steve Rutherford
On Mon, Apr 12, 2021 at 6:48 PM Ashish Kalra wrote: > > On Mon, Apr 12, 2021 at 06:23:32PM -0700, Steve Rutherford wrote: > > On Mon, Apr 12, 2021 at 5:22 PM Steve Rutherford > > wrote: > > > > > > On Mon, Apr 12, 2021 at 12:48 PM Ashish Kalra > > &

Re: [PATCH v12 13/13] x86/kvm: Add kexec support for SEV Live Migration.

2021-04-12 Thread Steve Rutherford
On Mon, Apr 12, 2021 at 5:22 PM Steve Rutherford wrote: > > On Mon, Apr 12, 2021 at 12:48 PM Ashish Kalra wrote: > > > > From: Ashish Kalra > > > > Reset the host's shared pages list related to kernel > > specific page encryption status settings before w

Re: [PATCH v12 12/13] x86/kvm: Add guest support for detecting and enabling SEV Live Migration feature.

2021-04-12 Thread Steve Rutherford
oted using EFI, enable Live migration support. > +*/ > + if (!efi_enabled(EFI_BOOT)) > + wrmsrl(MSR_KVM_SEV_LIVE_MIGRATION, > + KVM_SEV_LIVE_MIGRATION_ENABLED); > + } else { > + pr_info("KVM enable live migration feature > unsupported\n"); I might be misunderstanding this, but I'm not sure this log message is correct: isn't the intention that the late initcall will be the one to check if this should be enabled later in this case? I have a similar question above about the log message after "!efi_enabled(EFI_RUNTIME_SERVICES)": shouldn't that avoid logging if !efi_enabled(EFI_BOOT) (since the wrmsl call already had been made here?) > + } > +} > + > void __init mem_encrypt_free_decrypted_mem(void) > { > unsigned long vaddr, vaddr_end, npages; > -- > 2.17.1 > Other than these: Reviewed-by: Steve Rutherford

Re: [PATCH v12 13/13] x86/kvm: Add kexec support for SEV Live Migration.

2021-04-12 Thread Steve Rutherford
er CPU servicing a device request (while the reboot is pending for that CPU)? Seems like you could run into a scenario where you have hypercalls racing. Calling this on every core isn't free, but it is an easy way to avoid this race. You could also count cores, and have only last core do the job, but that

Re: [PATCH v12 08/13] KVM: X86: Introduce KVM_HC_PAGE_ENC_STATUS hypercall

2021-04-12 Thread Steve Rutherford
e_userspace_io = complete_hypercall_exit; > + return 0; > + } > default: > ret = -KVM_ENOSYS; > break; > diff --git a/include/uapi/linux/kvm_para.h b/include/uapi/linux/kvm_para.h > index 8b86609849b9..847b83b75dc8 100644 > --- a/include/uapi/linux/kvm_para.h > +++ b/include/uapi/linux/kvm_para.h > @@ -29,6 +29,7 @@ > #define KVM_HC_CLOCK_PAIRING 9 > #define KVM_HC_SEND_IPI10 > #define KVM_HC_SCHED_YIELD 11 > +#define KVM_HC_PAGE_ENC_STATUS 12 > > /* > * hypercalls use architecture specific > -- > 2.17.1 > Reviewed-by: Steve Rutherford

Re: [PATCH v12 06/13] KVM: SVM: Add KVM_SEV_RECEIVE_FINISH command

2021-04-12 Thread Steve Rutherford
Paolo Bonzini > Cc: Joerg Roedel > Cc: Borislav Petkov > Cc: Tom Lendacky > Cc: x...@kernel.org > Cc: k...@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Reviewed-by: Steve Rutherford > Signed-off-by: Brijesh Singh > Signed-off-by: Ashish Kalra > --- > .

Re: [PATCH v12 09/13] mm: x86: Invoke hypercall when page encryption status is changed

2021-04-12 Thread Steve Rutherford
667..3576b583ac65 100644 > --- a/arch/x86/mm/pat/set_memory.c > +++ b/arch/x86/mm/pat/set_memory.c > @@ -27,6 +27,7 @@ > #include > #include > #include > +#include > > #include "../mm_internal.h" > > @@ -2012,6 +2013,12 @@ static int __set_memory_enc_dec(unsigned long addr, > int numpages, bool enc) > */ > cpa_flush(, 0); > > + /* Notify hypervisor that a given memory range is mapped encrypted > +* or decrypted. The hypervisor will use this information during the > +* VM migration. > +*/ > + page_encryption_changed(addr, numpages, enc); > + > return ret; > } > > -- > 2.17.1 > Reviewed-by: Steve Rutherford

Re: [PATCH v12 05/13] KVM: SVM: Add KVM_SEV_RECEIVE_UPDATE_DATA command

2021-04-12 Thread Steve Rutherford
out; > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h > index 29c25e641a0c..3a656d43fc6c 100644 > --- a/include/uapi/linux/kvm.h > +++ b/include/uapi/linux/kvm.h > @@ -1759,6 +1759,15 @@ struct kvm_sev_receive_start { > __u32 session_len; > }; > > +struct kvm_sev_receive_update_data { > + __u64 hdr_uaddr; > + __u32 hdr_len; > + __u64 guest_uaddr; > + __u32 guest_len; > + __u64 trans_uaddr; > + __u32 trans_len; > +}; > + > #define KVM_DEV_ASSIGN_ENABLE_IOMMU(1 << 0) > #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) > #define KVM_DEV_ASSIGN_MASK_INTX (1 << 2) > -- > 2.17.1 > Reviewed-by: Steve Rutherford

Re: [PATCH v12 04/13] KVM: SVM: Add support for KVM_SEV_RECEIVE_START command

2021-04-12 Thread Steve Rutherford
r = -EINVAL; > goto out; > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h > index d45af34c31be..29c25e641a0c 100644 > --- a/include/uapi/linux/kvm.h > +++ b/include/uapi/linux/kvm.h > @@ -1750,6 +1750,15 @@ struct kvm_sev_send_update_data { > __u32 trans_len; > }; > > +struct kvm_sev_receive_start { > + __u32 handle; > + __u32 policy; > + __u64 pdh_uaddr; > + __u32 pdh_len; > + __u64 session_uaddr; > + __u32 session_len; > +}; > + > #define KVM_DEV_ASSIGN_ENABLE_IOMMU(1 << 0) > #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) > #define KVM_DEV_ASSIGN_MASK_INTX (1 << 2) > -- > 2.17.1 > Reviewed-by: Steve Rutherford

Re: [PATCH v12 11/13] EFI: Introduce the new AMD Memory Encryption GUID.

2021-04-12 Thread Steve Rutherford
M GUIDs */ > #define DELLEMC_EFI_RCI2_TABLE_GUIDEFI_GUID(0x2d9f28a2, 0xa886, > 0x456a, 0x97, 0xa8, 0xf1, 0x1e, 0xf2, 0x4f, 0xf4, 0x55) > +#define MEM_ENCRYPT_GUID EFI_GUID(0x0cf29b71, 0x9e51, > 0x433a, 0xa3, 0xb7, 0x81, 0xf3, 0xab, 0x16, 0xb8, 0x75) >

Re: [PATCH v12 10/13] KVM: x86: Introduce new KVM_FEATURE_SEV_LIVE_MIGRATION feature & Custom MSR.

2021-04-12 Thread Steve Rutherford
OLL_CONTROL) | > (1 << KVM_FEATURE_PV_SCHED_YIELD) | > - (1 << KVM_FEATURE_ASYNC_PF_INT); > +(1 << KVM_FEATURE_ASYNC_PF_INT) | > +(1 << KVM_FEATURE_SEV_LIVE_MIGRATION); > > if (sched_info_on()) > entry->eax |= (1 << KVM_FEATURE_STEAL_TIME); > -- > 2.17.1 > Reviewed-by: Steve Rutherford

Re: [PATCH v12 03/13] KVM: SVM: Add KVM_SEV_SEND_FINISH command

2021-04-12 Thread Steve Rutherford
r = sev_send_update_data(kvm, _cmd); > break; > + case KVM_SEV_SEND_FINISH: > + r = sev_send_finish(kvm, _cmd); > + break; > default: > r = -EINVAL; > goto out; > -- > 2.17.1 > Reviewed-by: Steve Rutherford

Re: [PATCH v2] KVM: SVM: Add support for KVM_SEV_SEND_CANCEL command

2021-04-12 Thread Steve Rutherford
On Sun, Apr 11, 2021 at 1:56 AM kernel test robot wrote: > > Hi Steve, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on kvm/queue] > [also build test ERROR on vhost/linux-next cryptodev/master linux/master > linus/master v5.12-rc6

[PATCH v3] KVM: SVM: Add support for KVM_SEV_SEND_CANCEL command

2021-04-12 Thread Steve Rutherford
After completion of SEND_START, but before SEND_FINISH, the source VMM can issue the SEND_CANCEL command to stop a migration. This is necessary so that a cancelled migration can restart with a new target later. Reviewed-by: Nathan Tempelman Reviewed-by: Brijesh Singh Signed-off-by: Steve

Re: [PATCH] fs: cifs: Fix spelling of 'security'

2021-04-09 Thread Steve French
> -* descriptor parameters, and secuirty descriptor itself > +* descriptor parameters, and security descriptor itself > */ > secdesclen = max_t(u32, secdesclen, DEFAULT_SEC_DESC_LEN); > pnntsd = kmalloc(secdesclen, GFP_KERNEL); > -- > 1.9.1 > > -- Thanks, Steve

[PATCH v2] KVM: SVM: Add support for KVM_SEV_SEND_CANCEL command

2021-04-09 Thread Steve Rutherford
After completion of SEND_START, but before SEND_FINISH, the source VMM can issue the SEND_CANCEL command to stop a migration. This is necessary so that a cancelled migration can restart with a new target later. Reviewed-by: Nathan Tempelman Reviewed-by: Brijesh Singh Signed-off-by: Steve

Re: [RFC v2] KVM: x86: Support KVM VMs sharing SEV context

2021-04-09 Thread Steve Rutherford
ow the VMM to inject any more firmware or do > > any more attestations. > > I think Steve is suggesting to just change the RIP of the mirror VM, > which would work for SEV but not SEV-ES (the RAM migration helper won't > *suffice* for SEV-ES, but perhaps you could use the PSP to m

Re: [PATCH][next] cifs: cifspdu.h: Replace one-element array with flexible-array member

2021-04-08 Thread Steve French
es of the struct, looks OK (we don't allocate it > > directly, we use memory from the small/big buff pools). > > Awesome. :) > > > Reviewed-by: Aurelien Aptel > > Thank you, Aurelien. > -- > Gustavo -- Thanks, Steve

Re: [PATCH] cifs: Remove useless variable

2021-04-08 Thread Steve French
ver NULL */ > - nmode = *pnmode; > nacl_base = (char *)pndacl; > nsize = sizeof(struct cifs_acl); > > -- > 1.8.3.1 > -- Thanks, Steve

Re: [PATCH] fs: cifs: Remove repeated struct declaration

2021-04-08 Thread Steve French
@@ struct cifs_readdata { > struct page **pages; > }; > > -struct cifs_writedata; > - > /* asynchronous write support */ > struct cifs_writedata { > struct kref refcount; > -- > 2.25.1 > -- Thanks, Steve

[GIT PULL] SMB3 Fixes

2021-04-08 Thread Steve French
(-) -- Thanks, Steve

Re: [PATCH] KVM: SVM: Add support for KVM_SEV_SEND_CANCEL command

2021-04-08 Thread Steve Rutherford
On Thu, Apr 8, 2021 at 3:27 PM Brijesh Singh wrote: > > > On 4/1/21 8:44 PM, Steve Rutherford wrote: > > After completion of SEND_START, but before SEND_FINISH, the source VMM can > > issue the SEND_CANCEL command to stop a migration. This is necessary so > > tha

Re: [RFC v2] KVM: x86: Support KVM VMs sharing SEV context

2021-04-08 Thread Steve Rutherford
On Thu, Apr 8, 2021 at 2:15 PM James Bottomley wrote: > > On Thu, 2021-04-08 at 12:48 -0700, Steve Rutherford wrote: > > On Thu, Apr 8, 2021 at 10:43 AM James Bottomley > > wrote: > > > On Fri, 2021-04-02 at 16:20 +0200, Paolo Bonzini wrote: > > > >

Re: [RFC v2] KVM: x86: Support KVM VMs sharing SEV context

2021-04-08 Thread Steve Rutherford
t strictly necessary to modify OVMF to make SEV VMs live migrate. If we were to modify OVMF, we would contribute those changes upstream. Thanks, Steve

Re: linux-next: Signed-off-by missing for commit in the cifs tree

2021-04-08 Thread Steve French
fixed - (a tmp branch was accidentally pushed) On Thu, Apr 8, 2021 at 7:07 AM Stephen Rothwell wrote: > > Hi all, > > Commit > > e67fcb31fb0e ("stuff") > > is missing a Signed-off-by from its author and comitter. > > -- > Cheers, > Stephen Rothwell -- Thanks, Steve

Re: [PATCH] cifs: escape spaces in share names

2021-04-07 Thread Steve French
vname, '/'); > - seq_puts(m, devname); > + /* escape all spaces in share names */ > + seq_escape(m, devname, " "); > kfree(devname); > } > return 0; > -- > 2.31.1 > -- Thanks, Steve From 1ee4

Re: [PATCH v11 08/13] KVM: X86: Introduce KVM_HC_PAGE_ENC_STATUS hypercall

2021-04-06 Thread Steve Rutherford
> > > I see the following in Documentation/virt/kvm/api.rst : > .. > .. > /* KVM_EXIT_HYPERCALL */ > struct { > __u64 nr; > __u64 args[6]; > __u64 ret; >

Re: [PATCH v11 10/13] KVM: x86: Introduce new KVM_FEATURE_SEV_LIVE_MIGRATION feature & Custom MSR.

2021-04-06 Thread Steve Rutherford
On Tue, Apr 6, 2021 at 7:00 AM Ashish Kalra wrote: > > Hello Paolo, > > On Tue, Apr 06, 2021 at 03:47:59PM +0200, Paolo Bonzini wrote: > > On 06/04/21 15:26, Ashish Kalra wrote: > > > > It's a little unintuitive to see KVM_MSR_RET_FILTERED here, since > > > > userspace can make this happen on its

Re: [PATCH v11 00/13] Add AMD SEV guest live migration support

2021-04-05 Thread Steve Rutherford
On Mon, Apr 5, 2021 at 7:20 AM Ashish Kalra wrote: > > From: Ashish Kalra > > The series add support for AMD SEV guest live migration commands. To protect > the > confidentiality of an SEV protected guest memory while in transit we need to > use the SEV commands defined in SEV API spec [1]. > >

Re: [PATCH v11 10/13] KVM: x86: Introduce new KVM_FEATURE_SEV_LIVE_MIGRATION feature & Custom MSR.

2021-04-05 Thread Steve Rutherford
if (!guest_cpuid_has(vcpu, KVM_FEATURE_SEV_LIVE_MIGRATION)) > + return 1; > + > + /* > +* Let userspace handle the MSR using MSR filters. > +*/ > + return KVM_MSR_RET_FILTERED; It's a little unintuitive to see KVM_MSR_RET_FILTERED here, since userspace can make this happen on its own without having an entry in this switch statement (by setting it in the msr filter bitmaps). When using MSR filters, I would only expect to get MSR filter exits for MSRs I specifically asked for. Not a huge deal, just a little unintuitive. I'm not sure other options are much better (you could put KVM_MSR_RET_INVALID, or you could just not have these entries in svm_{get,set}_msr). --Steve

Re: [PATCH v11 08/13] KVM: X86: Introduce KVM_HC_PAGE_ENC_STATUS hypercall

2021-04-05 Thread Steve Rutherford
c_status_hc = NULL, > > .msr_filter_changed = vmx_msr_filter_changed, > .complete_emulated_msr = kvm_complete_insn_gp, > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index f7d12fca397b..ef5c77d59651 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -8273,6 +8273,18 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu) > kvm_sched_yield(vcpu->kvm, a0); > ret = 0; > break; > + case KVM_HC_PAGE_ENC_STATUS: { > + int r; > + > + ret = -KVM_ENOSYS; > + if (kvm_x86_ops.page_enc_status_hc) { > + r = kvm_x86_ops.page_enc_status_hc(vcpu, a0, a1, a2); > + if (r >= 0) > + return r; > + ret = r; Style nit: Why not just set ret, and return ret if ret >=0? This looks good. I just had a few nitpicks. Reviewed-by: Steve Rutherford

Re: [PATCH v11 00/13] Add AMD SEV guest live migration support

2021-04-05 Thread Steve Rutherford
On Mon, Apr 5, 2021 at 8:17 AM Peter Gonda wrote: > > Could this patch set include support for the SEND_CANCEL command? > That's separate from this patchset. I sent up an implementation last week.

[PATCH] ASoC: max98390: Add support for tx slot configuration.

2021-04-05 Thread Steve Lee
Update voltage/current tx slot configuration support. Signed-off-by: Steve Lee --- sound/soc/codecs/max98390.c | 62 + sound/soc/codecs/max98390.h | 2 ++ 2 files changed, 64 insertions(+) diff --git a/sound/soc/codecs/max98390.c b/sound/soc/codecs

RE: [EXTERNAL] Re: [PATCH] ASoC: max98390: Add controls for tx path

2021-04-02 Thread Steve Lee
> -Original Message- > From: Mark Brown > Sent: Saturday, April 3, 2021 12:23 AM > To: Steve Lee > Cc: lgirdw...@gmail.com; pe...@perex.cz; ti...@suse.com; > ckee...@opensource.cirrus.com; ge...@linux-m68k.org; > r...@opensource.wolfsonmicro.com; shumi...@realtek.co

Re: [PATCH] fs: cifs: Remove unnecessary struct declaration

2021-04-02 Thread Steve French
+1283,6 @@ struct cifs_aio_ctx { > booldirect_io; > }; > > -struct cifs_readdata; > - > /* asynchronous read support */ > struct cifs_readdata { > struct kref refcount; > -- > 2.25.1 > -- Thanks, Steve

[PATCH] ASoC: max98390: Add controls for tx path

2021-04-01 Thread Steve Lee
Add controls for tx source. Signed-off-by: Steve Lee --- sound/soc/codecs/max98390.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/codecs/max98390.c b/sound/soc/codecs/max98390.c index bb736c44e68a..163093959da8 100644 --- a/sound/soc/codecs/max98390.c +++ b/sound/soc

[PATCH] KVM: SVM: Add support for KVM_SEV_SEND_CANCEL command

2021-04-01 Thread Steve Rutherford
After completion of SEND_START, but before SEND_FINISH, the source VMM can issue the SEND_CANCEL command to stop a migration. This is necessary so that a cancelled migration can restart with a new target later. Signed-off-by: Steve Rutherford --- .../virt/kvm/amd-memory-encryption.rst

Re: [PATCH v10 10/16] KVM: x86: Introduce KVM_GET_SHARED_PAGES_LIST ioctl

2021-04-01 Thread Steve Rutherford
On Fri, Mar 19, 2021 at 11:00 AM Ashish Kalra wrote: > > On Thu, Mar 11, 2021 at 12:48:07PM -0800, Steve Rutherford wrote: > > On Thu, Mar 11, 2021 at 10:15 AM Ashish Kalra wrote: > > > > > > On Wed, Mar 03, 2021 at 06:54:41PM +, Will Deacon wrote: > > >

[GIT PULL] CIFS/SMB3 Fixes

2021-03-27 Thread Steve French
POSIX Shyam Prasad N (2): cifs: Adjust key sizes and key generation routines for AES256 encryption cifs: Fix chmod with modefromsid when an older ACE already exists. Steve French (1): smb3: fix cached file size problems in duplicate extents (reflink) Vincent Whitchurch (1

Re: [PATCH v3] cifs: Silently ignore unknown oplock break handle

2021-03-25 Thread Steve French
0644 > > --- a/fs/cifs/smb2misc.c > > +++ b/fs/cifs/smb2misc.c > > @@ -754,8 +754,8 @@ smb2_is_valid_oplock_break(char *buffer, struct > > TCP_Server_Info *server) > > } > > } > > spin_unlock(_tcp_ses_lock); > > - cifs_dbg(FYI, "Can not process oplock break for non-existent > > connection\n"); > > - return false; > > + cifs_dbg(FYI, "No file id matched, oplock break ignored\n"); > > + return true; > > } > > > > void > > > -- Thanks, Steve

[GIT PULL] CIFS/SMB3 Fixes

2021-03-20 Thread Steve French
): cifs: update new ACE pointer after populate_new_aces. Steve French (1): cifs: fix allocation size on newly created files Vincent Whitchurch (1): cifs: Fix preauth hash corruption fs/cifs/cifs_swn.c | 2 +- fs/cifs/cifsacl.c| 9 ++--- fs/cifs/fs_context.c | 6

[GIT PULL] CIFS/SMB3 Fixes

2021-03-20 Thread Steve French
): cifs: update new ACE pointer after populate_new_aces. Steve French (1): cifs: fix allocation size on newly created files Vincent Whitchurch (1): cifs: Fix preauth hash corruption fs/cifs/cifs_swn.c | 2 +- fs/cifs/cifsacl.c| 9 ++--- fs/cifs/fs_context.c | 6

Re: [PATCH] fs/cifs/: fix misspellings using codespell tool

2021-03-18 Thread Steve French
* Calls to this function must be protected by cifs_swnreg_idr_mutex. > * TODO Try to avoid memory allocations > */ > static struct cifs_swn_reg *cifs_find_swn_reg(struct cifs_tcon *tcon) > -- > 2.25.1 > -- Thanks, Steve

Re: [PATCH] misc/sgi-xp: use NULL instead of using plain integer as pointer

2021-03-17 Thread Steve Wahl
Reviewed-by: Steve Wahl On Tue, Mar 16, 2021 at 04:57:21PM +0800, Yang Li wrote: > This fixes the following sparse warnings: > drivers/misc/sgi-xp/xpc_main.c:210:23: warning: Using plain integer as > NULL pointer > > Reported-by: Abaci Robot > Signed-off-by: Yang Li > --

Re: linux-next: Signed-off-by missing for commits in the cifsd tree

2021-03-16 Thread Steve French
the issue of change the directory to the file") > 608b7bb0e414 ("cifsd: fix potential use after free in > ksmbd_vfs_set_init_posix_acl()") > a53327ff87b2 ("cifsd: fix memleak in ksmbd_vfs_set_init_posix_acl()") > a98dbc20cbdb ("cifsd: Add missing path_put() calls in smb2_open()") > ca46f5254981 ("cifsd: Fix error handling in __ksmbd_vfs_rename") > bb932cbbc781 ("cifsd: Do not print timestamp after processing Maximum > Access CreateContext") > 76cd471c09e7 ("cifsd: add v4 dos attribute structure") > f2b993deb1cd ("cifsd: fix random failure from smb2.create.multi") > 01a8bf060081 ("cifsd: fix smb2.lease.statopen3 in smbtorture") > 534cf891fdd8 ("cifsd: Remove call to ksmbd_revert_fsids() in > ksmbd_vfs_mkdir()") > 3a1bb9e2ccc3 ("cifsd: Make sure ksmbd_override_fsids() is called with > DurableOpens") > d69623ac1609 ("cifsd: Add missing dput() in process_query_dir_entries()") > 7caaa1dc0f84 ("cifsd: Fix incorrect error handling in smb2_open()") > > are missing a Signed-off-by from their committer. > > One of the issues with rebasing ... > > -- > Cheers, > Stephen Rothwell -- Thanks, Steve

Re: [PATCH v10 10/16] KVM: x86: Introduce KVM_GET_SHARED_PAGES_LIST ioctl

2021-03-11 Thread Steve Rutherford
son wrote: > > > > On Fri, Feb 26, 2021, Ashish Kalra wrote: > > > > > On Thu, Feb 25, 2021 at 02:59:27PM -0800, Steve Rutherford wrote: > > > > > > On Thu, Feb 25, 2021 at 12:20 PM Ashish Kalra > > > > > > wrote: > > &g

Re: [PATCH v10 10/16] KVM: x86: Introduce KVM_GET_SHARED_PAGES_LIST ioctl

2021-03-09 Thread Steve Rutherford
On Tue, Mar 9, 2021 at 7:42 PM Kalra, Ashish wrote: > > > > > On Mar 9, 2021, at 3:22 AM, Steve Rutherford wrote: > > > > On Mon, Mar 8, 2021 at 1:11 PM Brijesh Singh wrote: > >> > >> > >>> On 3/8/21 1:51 PM, Sean Christopher

[GIT PULL] cifs fixes

2021-03-09 Thread Steve French
| 4 ++-- 11 files changed, 36 insertions(+), 36 deletions(-) -- Thanks, Steve

Re: [PATCH v10 10/16] KVM: x86: Introduce KVM_GET_SHARED_PAGES_LIST ioctl

2021-03-08 Thread Steve Rutherford
>>> > >>> Moving the non-KVM x86 folks to bcc, I don't they care about KVM details > >>> at this > >>> point. > >>> > >>> On Fri, Feb 26, 2021, Ashish Kalra wrote: > >>>> On Thu, Feb 25, 2021 at 02:59:27PM -0800,

Re: [PATCH v10 10/16] KVM: x86: Introduce KVM_GET_SHARED_PAGES_LIST ioctl

2021-03-08 Thread Steve Rutherford
cc, I don't they care about KVM details > > > at this > > > point. > > > > > > On Fri, Feb 26, 2021, Ashish Kalra wrote: > > > > On Thu, Feb 25, 2021 at 02:59:27PM -0800, Steve Rutherford wrote: > > > > > On Thu, Feb 25, 2021 at 12:20 PM

Re: [PATCH] copy_file_range.2: Kernel v5.12 updates

2021-02-28 Thread Steve French
On Sun, Feb 28, 2021 at 1:36 AM Amir Goldstein wrote: > > On Sun, Feb 28, 2021 at 1:08 AM Steve French wrote: > > > > On Fri, Feb 26, 2021 at 11:43 PM Amir Goldstein wrote: > > > > > > On Sat, Feb 27, 2021 at 12:19 AM Alejandro Colomar (man-pages) > >

Re: [PATCH] copy_file_range.2: Kernel v5.12 updates

2021-02-27 Thread Steve French
s mount file copy today, which is far more efficient (having the server do the copy for us) rather than sending large reads/writes back and forth over the network from the client. In the future I am hoping that use case becomes even more common over SMB3 as cloud servers improve. > > > You may refer the reader to VERSIONS section where it will say which > > > filesystems support cross-fs copy as of kernel version XXX (i.e. cifs and > > > nfs). > > > > > >> .SH VERSIONS > > >> The > > >> .BR copy_file_range () > > >> @@ -202,6 +205,11 @@ Applications should target the behaviour and > > >> requirements of 5.3 kernels. > > >> .PP > > >> First support for cross-filesystem copies was introduced in Linux 5.3. > > >> Older kernels will return -EXDEV when cross-filesystem copies are > > >> attempted. > > >> +.PP > > >> +After Linux 5.12, support for copies between different filesystems was > > >> dropped. > > >> +However, individual filesystems may still provide > > >> +.BR copy_file_range () > > >> +implementations that allow copies across different devices. Yes - this could be very important, especially for cifs (smb3) going forward. -- Thanks, Steve

Current mainline

2021-02-26 Thread Steve French
trace 03e19399d00180a1 ]--- [ 287.702539] [ cut here ] -- Thanks, Steve

[GIT PULL] CIFS/SMB3 Fixes

2021-02-25 Thread Steve French
. cifs: Fix cifsacl ACE mask for group and others. cifs: Retain old ACEs when converting between mode bits and ACL. cifs: Change SIDs in ACEs while transferring file ownership. cifs: If a corrupted DACL is returned by the server, bail out. Steve French (11): smb3

Re: [PATCH v10 10/16] KVM: x86: Introduce KVM_GET_SHARED_PAGES_LIST ioctl

2021-02-25 Thread Steve Rutherford
On Thu, Feb 25, 2021 at 2:59 PM Steve Rutherford wrote: > > On Thu, Feb 25, 2021 at 12:20 PM Ashish Kalra wrote: > > > > On Wed, Feb 24, 2021 at 10:22:33AM -0800, Sean Christopherson wrote: > > > On Wed, Feb 24, 2021, Ashish Kalra wrote: > > > > # S

Re: [PATCH v10 10/16] KVM: x86: Introduce KVM_GET_SHARED_PAGES_LIST ioctl

2021-02-25 Thread Steve Rutherford
ng the data! I am fine with both paths. Sean has stated an explicit desire for hypercall exiting, so I think that would be the current consensus. If we want to do hypercall exiting, this should be in a follow-up series where we implement something more generic, e.g. a hypercall exiting bitmap or hypercall exit list. If we are taking the hypercall exit route, we can drop the kvm side of the hypercall. Userspace could also handle the MSR using MSR filters (would need to confirm that). Then userspace could also be in control of the cpuid bit. Essentially, I think you could drop most of the host kernel work if there were generic support for hypercall exiting. Then userspace would be responsible for all of that. Thoughts on this? --Steve

Re: [RFC] KVM: x86: Support KVM VMs sharing SEV context

2021-02-25 Thread Steve Rutherford
op() takes the kvm lock and that is the only way into the > sev_guest_init() function where sev->active is set. There are a few places that check sev->active which don't have the kvm lock, which is not problematic if we add in a few compiler barriers (ala irqchip_split et al). > > Thanks, > Tom Thanks, Steve

Re: [RFC] KVM: x86: Support KVM VMs sharing SEV context

2021-02-24 Thread Steve Rutherford
On Wed, Feb 24, 2021 at 9:37 AM Sean Christopherson wrote: > > + unsigned int asid; > > + int ret; > > + > > + if (!sev_guest(kvm)) > > + return -ENOTTY; > > + > > + mutex_lock(>lock); > > + > > + /* Mirrors of mirrors should work, but let's not get silly */ > > Do

Re: [RFC] KVM: x86: Support KVM VMs sharing SEV context

2021-02-24 Thread Steve Rutherford
On Wed, Feb 24, 2021 at 1:00 AM Nathan Tempelman wrote: > > @@ -1186,6 +1195,10 @@ int svm_register_enc_region(struct kvm *kvm, > if (!sev_guest(kvm)) > return -ENOTTY; > > + /* If kvm is mirroring encryption context it isn't responsible for it > */ > + if

Re: [EXTERNAL] re: cifs: Retain old ACEs when converting between mode bits and ACL.

2021-02-24 Thread Steve French
Add the RB from Rohith and merged into cifs-2.6.git for-next On Wed, Feb 24, 2021 at 10:58 AM Shyam Prasad N via samba-technical wrote: > > Hi Steve, > > Please accept this fix for the bug that Colin pointed out. > This can be hit if the server has a corrupted SD, or it got c

Re: [PATCH 00/33] Network fs helper library & fscache kiocb API [ver #3]

2021-02-23 Thread Steve French
On Tue, Feb 23, 2021 at 2:28 PM Matthew Wilcox wrote: > > On Mon, Feb 15, 2021 at 11:22:20PM -0600, Steve French wrote: > > On Mon, Feb 15, 2021 at 8:10 PM Matthew Wilcox wrote: > > > The switch from readpages to readahead does help in a couple of corner > > > ca

Re: [PATCH v2] vfs: prevent copy_file_range to copy across devices

2021-02-18 Thread Steve French
> > and I've been arguing against it since the patches were posted. > > Ok. I'm good with this v2 as well, but need to add the fallback to > do_splice_direct() > in nfsd_copy_file_range(), because this patch breaks it. Interestingly, for ksmbd (cifsd) looks like they already do splice not copy_file_range -- Thanks, Steve

Re: [PATCH v2] vfs: prevent copy_file_range to copy across devices

2021-02-16 Thread Steve French
On Tue, Feb 16, 2021 at 1:40 PM Amir Goldstein wrote: > > On Tue, Feb 16, 2021 at 9:31 PM Steve French wrote: > > > > On Tue, Feb 16, 2021 at 1:29 PM Anna Schumaker > > wrote: > > > > > > On Tue, Feb 16, 2021 at 2:22 PM Amir Goldstein wrote: > >

Re: [PATCH v2] vfs: prevent copy_file_range to copy across devices

2021-02-16 Thread Steve French
I don't understand the problem. > > > > > > > > What exactly is wrong with the code I suggested? > > > > Why should any filesystem be changed? > > > > > > > > Maybe I am missing something. > > > > > > Ok, I have to do a full brain reboot and start all over. > > > > > > Before that, I picked the code you suggested and tested it. I've mounted > > > a cephfs filesystem and used xfs_io to execute a 'copy_range' command > > > using /sys/kernel/debug/sched_features as source. The result was a > > > 0-sized file in cephfs. And the reason is thevfs_copy_file_range() > > > early exit in: > > > > > > if (len == 0) > > > return 0; > > > > > > 'len' is set in generic_copy_file_checks(). > > > > Good point.. I guess we will need to do all the checks earlier in > > generic_copy_file_checks() including the logic of: > > > > if (file_in->f_op->remap_file_range && > > file_inode(file_in)->i_sb == file_inode(file_out)->i_sb) > > > > > > > > > > This means that we're not solving the original problem anymore (probably > > > since v1 of this patch, haven't checked). > > > > > > Also, re-reading Trond's emails, I read: "... also disallowing the copy > > > from, say, an XFS formatted partition to an ext4 partition". Isn't that > > > *exactly* what we're trying to do here? I.e. _prevent_ these copies from > > > happening so that tracefs files can't be CFR'ed? > > > > > > > We want to address the report which means calls coming from > > copy_file_range() syscall. > > > > Trond's use case is vfs_copy_file_range() coming from nfsd. > > When he writes about copy from XFS to ext4, he means an > > NFS client is issuing server side copy (on same or different NFS mounts) > > and the NFS server is executing nfsd_copy_file_range() on a source > > file that happens to be on XFS and destination happens to be on ext4. > > NFS also supports a server-to-server copy where the destination server > mounts the source server and reads the data to be copied. Please don't > break that either :) This is a case we will eventually need to support for cifs (SMB3) as well. -- Thanks, Steve

Re: [PATCH 00/33] Network fs helper library & fscache kiocb API [ver #3]

2021-02-15 Thread Steve French
On Mon, Feb 15, 2021 at 8:10 PM Matthew Wilcox wrote: > > On Mon, Feb 15, 2021 at 06:40:27PM -0600, Steve French wrote: > > It could be good if netfs simplifies the problem experienced by > > network filesystems on Linux with readahead on large sequential reads > > - wh

Re: [PATCH 00/33] Network fs helper library & fscache kiocb API [ver #3]

2021-02-15 Thread Steve French
On Mon, Feb 15, 2021 at 8:10 PM Matthew Wilcox wrote: > > On Mon, Feb 15, 2021 at 06:40:27PM -0600, Steve French wrote: > > It could be good if netfs simplifies the problem experienced by > > network filesystems on Linux with readahead on large sequential reads > > - wh

Re: [PATCH 00/33] Network fs helper library & fscache kiocb API [ver #3]

2021-02-15 Thread Steve French
Makefile |5 + > > fs/netfs/internal.h | 97 +++ > > fs/netfs/read_helper.c| 1169 + > > fs/netfs/stats.c | 59 ++ > > fs/read_write.c |1 + > > include/linux/fs.h|1 + > > include/linux/fscache-cache.h |4 + > > include/linux/fscache.h | 40 +- > > include/linux/netfs.h | 195 ++ > > include/linux/pagemap.h |3 + > > include/net/af_rxrpc.h|2 +- > > include/trace/events/afs.h| 74 +-- > > include/trace/events/netfs.h | 201 ++ > > mm/filemap.c | 20 + > > mm/readahead.c| 70 ++ > > net/rxrpc/recvmsg.c |9 +- > > 47 files changed, 3473 insertions(+), 1550 deletions(-) > > create mode 100644 fs/cachefiles/rdwr2.c > > create mode 100644 fs/fscache/page2.c > > create mode 100644 fs/netfs/Kconfig > > create mode 100644 fs/netfs/Makefile > > create mode 100644 fs/netfs/internal.h > > create mode 100644 fs/netfs/read_helper.c > > create mode 100644 fs/netfs/stats.c > > create mode 100644 include/linux/netfs.h > > create mode 100644 include/trace/events/netfs.h > > > > > > Thanks David, > > I did an xfstests run on ceph with a kernel based on this and it seemed > to do fine. I'll plan to pull this into the ceph-client/testing branch > and run it through the ceph kclient test harness. There are only a few > differences from the last run we did, so I'm not expecting big changes, > but I'll keep you posted. > > -- > Jeff Layton > -- Thanks, Steve

  1   2   3   4   5   6   7   8   9   10   >