Skip to content

Commit c8875a7

Browse files
committed
Merge tag 'rolling-lts/wsl/5.15.90.3' into linux-msft-wsl-5.15.y
Linux rolling-lts/wsl/5.15.90.3
2 parents 4aeb777 + df38460 commit c8875a7

File tree

16 files changed

+919
-181
lines changed

16 files changed

+919
-181
lines changed

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,27 @@ PAGE_SIZE multiple when read back.
12001200
high limit is used and monitored properly, this limit's
12011201
utility is limited to providing the final safety net.
12021202

1203+
memory.reclaim
1204+
A write-only nested-keyed file which exists for all cgroups.
1205+
1206+
This is a simple interface to trigger memory reclaim in the
1207+
target cgroup.
1208+
1209+
This file accepts a single key, the number of bytes to reclaim.
1210+
No nested keys are currently supported.
1211+
1212+
Example::
1213+
1214+
echo "1G" > memory.reclaim
1215+
1216+
The interface can be later extended with nested keys to
1217+
configure the reclaim behavior. For example, specify the
1218+
type of memory to reclaim from (anon, file, ..).
1219+
1220+
Please note that the kernel can over or under reclaim from
1221+
the target cgroup. If less bytes are reclaimed than the
1222+
specified amount, -EAGAIN is returned.
1223+
12031224
memory.oom.group
12041225
A read-write single value file which exists on non-root
12051226
cgroups. The default value is "0".

MSFT-Merge/log

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
Name SHA1
22
---- ----
3-
config/wsl a1edb1f45f33bee0960a1c82de4737227a8a5e72
3+
config/wsl efdbd7684bb9625e93871b347d3c7327fc9a63ac
44
feature/arm64-hyperv-hypercall-interface/5.15 3e314b48254cb9c3eeac699356ac605193b4b6fa
55
feature/arm64-hyperv-synthetic-clocks-timers/5.15 59db35e760b9bacc8596a3660a12420f1fa5318f
6-
feature/dxgkrnl/5.15 411a9171ae715efe3817a05a1802f9367c04df33
6+
feature/dxgkrnl/5.15 26d29d8377a78f1b0014f6c9ba6df9ed5763f885
77
feature/hvlite_virtio_pmem/5.15 9194f84de8a58bc1a83125054286d649e35054be
88
feature/page-reporting/5.15 ad427234defd6cdfdc0c21ca5b64ef589b82a421
99
feature/vpci/5.15 d19bb684cca000b65a3b001964a3cc820cbbf9b5
10+
feature/memory-reclaim/5.15 fed46d1f99d22a5a9efd06da0bf5baf6a04045d8
1011
fix/vsock/5.15 c9e883dfbd7be1194e53133d888b435b277e2e5b
1112
product/wsl/readme/5.15 0e1ddcfdc9986e1bf420a3663011abd79752c642
1213
product/wsl/security/5.15 ab2488a9f10a3b83b958103c9b3ed728eb57c564

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
VERSION = 5
33
PATCHLEVEL = 15
44
SUBLEVEL = 90
5-
EXTRAVERSION = .1
5+
EXTRAVERSION = .3
66
NAME = Trick or Treat
77

88
# *DOCUMENTATION*

arch/arm64/configs/config-wsl-arm64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Automatically generated file; DO NOT EDIT.
3-
# Linux/arm64 5.15.83.1 Kernel Configuration
3+
# Linux/arm64 5.15.90.1 Kernel Configuration
44
#
55
CONFIG_CC_VERSION_TEXT="aarch64-msft-linux-gcc (GCC) 9.3.0"
66
CONFIG_CC_IS_GCC=y
@@ -1768,7 +1768,7 @@ CONFIG_BLK_DEV_BSG=y
17681768
# CONFIG_CHR_DEV_SCH is not set
17691769
# CONFIG_SCSI_CONSTANTS is not set
17701770
# CONFIG_SCSI_LOGGING is not set
1771-
# CONFIG_SCSI_SCAN_ASYNC is not set
1771+
CONFIG_SCSI_SCAN_ASYNC=y
17721772

17731773
#
17741774
# SCSI Transports

arch/x86/configs/config-wsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Automatically generated file; DO NOT EDIT.
3-
# Linux/x86 5.15.83.1 Kernel Configuration
3+
# Linux/x86 5.15.90.1 Kernel Configuration
44
#
55
CONFIG_CC_VERSION_TEXT="x86_64-msft-linux-gcc (GCC) 9.3.0"
66
CONFIG_CC_IS_GCC=y
@@ -1777,7 +1777,7 @@ CONFIG_BLK_DEV_BSG=y
17771777
# CONFIG_CHR_DEV_SCH is not set
17781778
# CONFIG_SCSI_CONSTANTS is not set
17791779
# CONFIG_SCSI_LOGGING is not set
1780-
# CONFIG_SCSI_SCAN_ASYNC is not set
1780+
CONFIG_SCSI_SCAN_ASYNC=y
17811781

17821782
#
17831783
# SCSI Transports

drivers/hv/dxgkrnl/dxgadapter.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,7 @@ struct dxgprocess_adapter *dxgprocess_adapter_create(struct dxgprocess *process,
10251025
}
10261026
return adapter_info;
10271027
cleanup:
1028-
if (adapter_info)
1029-
kfree(adapter_info);
1028+
kfree(adapter_info);
10301029
return NULL;
10311030
}
10321031

@@ -1233,10 +1232,8 @@ struct dxgsyncobject *dxgsyncobject_create(struct dxgprocess *process,
12331232
DXG_TRACE("Syncobj created: %p", syncobj);
12341233
return syncobj;
12351234
cleanup:
1236-
if (syncobj->host_event)
1237-
kfree(syncobj->host_event);
1238-
if (syncobj)
1239-
kfree(syncobj);
1235+
kfree(syncobj->host_event);
1236+
kfree(syncobj);
12401237
return NULL;
12411238
}
12421239

@@ -1316,8 +1313,7 @@ void dxgsyncobject_release(struct kref *refcount)
13161313
kref_put(&syncobj->shared_owner->ssyncobj_kref,
13171314
dxgsharedsyncobj_release);
13181315
}
1319-
if (syncobj->host_event)
1320-
kfree(syncobj->host_event);
1316+
kfree(syncobj->host_event);
13211317
kfree(syncobj);
13221318
}
13231319

drivers/hv/dxgkrnl/dxgkrnl.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ struct dxghwqueue;
4747
* Driver private data.
4848
* A single /dev/dxg device is created per virtual machine.
4949
*/
50-
struct dxgdriver{
50+
struct dxgdriver {
5151
struct dxgglobal *dxgglobal;
52-
struct device *dxgdev;
53-
struct pci_driver pci_drv;
52+
struct device *dxgdev;
53+
struct pci_driver pci_drv;
5454
struct hv_driver vmbus_drv;
5555
};
5656
extern struct dxgdriver dxgdrv;
@@ -386,6 +386,8 @@ struct dxgprocess {
386386
struct list_head plistentry;
387387
pid_t pid;
388388
pid_t tgid;
389+
pid_t vpid; /* pdi from the current namespace */
390+
struct pid_namespace *nspid; /* namespace id */
389391
/* how many time the process was opened */
390392
struct kref process_kref;
391393
/* protects the object memory */
@@ -478,6 +480,7 @@ struct dxgadapter {
478480
struct winluid luid; /* VM bus channel luid */
479481
u16 device_description[80];
480482
u16 device_instance_id[WIN_MAX_PATH];
483+
bool compute_only;
481484
bool stopping_adapter;
482485
};
483486

@@ -954,7 +957,8 @@ int dxgvmb_send_query_alloc_residency(struct dxgprocess *process,
954957
*args);
955958
int dxgvmb_send_escape(struct dxgprocess *process,
956959
struct dxgadapter *adapter,
957-
struct d3dkmt_escape *args);
960+
struct d3dkmt_escape *args,
961+
bool user_mode);
958962
int dxgvmb_send_query_vidmem_info(struct dxgprocess *process,
959963
struct dxgadapter *adapter,
960964
struct d3dkmt_queryvideomemoryinfo *args,
@@ -984,14 +988,19 @@ int dxgvmb_send_get_stdalloc_data(struct dxgdevice *device,
984988
void *prive_alloc_data,
985989
u32 *res_priv_data_size,
986990
void *priv_res_data);
987-
int dxgvmb_send_query_statistics(struct dxgprocess *process,
991+
int dxgvmb_send_query_statistics(struct d3dkmthandle host_process_handle,
988992
struct dxgadapter *adapter,
989993
struct d3dkmt_querystatistics *args);
990994
int dxgvmb_send_async_msg(struct dxgvmbuschannel *channel,
991995
void *command,
992996
u32 cmd_size);
993997
int dxgvmb_send_share_object_with_host(struct dxgprocess *process,
994998
struct d3dkmt_shareobjectwithhost *args);
999+
int dxgvmb_send_invalidate_cache(struct dxgprocess *process,
1000+
struct dxgadapter *adapter,
1001+
struct d3dkmt_invalidatecache *args);
1002+
int dxgvmb_send_is_feature_enabled(struct dxgadapter *adapter,
1003+
struct d3dkmt_isfeatureenabled *args);
9951004

9961005
void signal_host_cpu_event(struct dxghostevent *eventhdr);
9971006
int ntstatus2int(struct ntstatus status);

drivers/hv/dxgkrnl/dxgmodule.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#define PCI_VENDOR_ID_MICROSOFT 0x1414
2222
#define PCI_DEVICE_ID_VIRTUAL_RENDER 0x008E
23+
#define PCI_DEVICE_ID_COMPUTE_ACCELERATOR 0x008A
2324

2425
#undef pr_fmt
2526
#define pr_fmt(fmt) "dxgk: " fmt
@@ -270,6 +271,8 @@ int dxgglobal_create_adapter(struct pci_dev *dev, guid_t *guid,
270271

271272
adapter->adapter_state = DXGADAPTER_STATE_WAITING_VMBUS;
272273
adapter->host_vgpu_luid = host_vgpu_luid;
274+
if (dev->device == PCI_DEVICE_ID_COMPUTE_ACCELERATOR)
275+
adapter->compute_only = true;
273276
kref_init(&adapter->adapter_kref);
274277
init_rwsem(&adapter->core_lock);
275278
mutex_init(&adapter->device_creation_lock);
@@ -622,6 +625,12 @@ static struct pci_device_id dxg_pci_id_table[] = {
622625
.subvendor = PCI_ANY_ID,
623626
.subdevice = PCI_ANY_ID
624627
},
628+
{
629+
.vendor = PCI_VENDOR_ID_MICROSOFT,
630+
.device = PCI_DEVICE_ID_COMPUTE_ACCELERATOR,
631+
.subvendor = PCI_ANY_ID,
632+
.subdevice = PCI_ANY_ID
633+
},
625634
{ 0 }
626635
};
627636

@@ -962,4 +971,4 @@ module_exit(dxg_drv_exit);
962971

963972
MODULE_LICENSE("GPL");
964973
MODULE_DESCRIPTION("Microsoft Dxgkrnl virtual compute device Driver");
965-
MODULE_VERSION("2.0.1");
974+
MODULE_VERSION("2.0.2");

drivers/hv/dxgkrnl/dxgprocess.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
*/
1313

1414
#include "dxgkrnl.h"
15+
#include "linux/sched.h"
16+
#include <linux/pid_namespace.h>
1517

1618
#undef dev_fmt
1719
#define dev_fmt(fmt) "dxgk: " fmt
@@ -31,6 +33,8 @@ struct dxgprocess *dxgprocess_create(void)
3133
DXG_TRACE("new dxgprocess created");
3234
process->pid = current->pid;
3335
process->tgid = current->tgid;
36+
process->vpid = task_pid_vnr(current);
37+
process->nspid = task_active_pid_ns(current);
3438
ret = dxgvmb_send_create_process(process);
3539
if (ret < 0) {
3640
DXG_TRACE("send_create_process failed");

0 commit comments

Comments
 (0)