* [PATCH 4/5] iommu/mediatek: Fix M4Uv2 group refcounting
From: Robin Murphy @ 2016-11-09 12:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <3922e1f14d8ecb50440b2d9b0d1123f3c9307fc5.1478695557.git.robin.murphy@arm.com>
For each subsequent device assigned to the m4u_group after its initial
allocation, we need to take an additional reference.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
drivers/iommu/mtk_iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index b12c12d74c33..f5591f6aef49 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -410,6 +410,8 @@ static struct iommu_group *mtk_iommu_device_group(struct device *dev)
data->m4u_group = iommu_group_alloc();
if (IS_ERR(data->m4u_group))
dev_err(dev, "Failed to allocate M4U IOMMU group\n");
+ } else {
+ __iommu_group_get(data->m4u_group);
}
return data->m4u_group;
}
--
2.10.2.dirty
^ permalink raw reply related
* [PATCH 4/5] iommu/mediatek: Fix M4Uv2 group refcounting
From: Robin Murphy @ 2016-11-09 12:47 UTC (permalink / raw)
To: joro-zLv9SwRftAIdnm+yROfE0A
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
will.deacon-5wv7dgnIgG8,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <3922e1f14d8ecb50440b2d9b0d1123f3c9307fc5.1478695557.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
For each subsequent device assigned to the m4u_group after its initial
allocation, we need to take an additional reference.
Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
---
drivers/iommu/mtk_iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index b12c12d74c33..f5591f6aef49 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -410,6 +410,8 @@ static struct iommu_group *mtk_iommu_device_group(struct device *dev)
data->m4u_group = iommu_group_alloc();
if (IS_ERR(data->m4u_group))
dev_err(dev, "Failed to allocate M4U IOMMU group\n");
+ } else {
+ __iommu_group_get(data->m4u_group);
}
return data->m4u_group;
}
--
2.10.2.dirty
^ permalink raw reply related
* [PATCH 3/5] iommu/amd: Fix group refcounting
From: Robin Murphy @ 2016-11-09 12:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <3922e1f14d8ecb50440b2d9b0d1123f3c9307fc5.1478695557.git.robin.murphy@arm.com>
If acpihid_device_group() finds an existing group for the relevant
devid, it should be taking an additional reference on that group.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
drivers/iommu/amd_iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 754595ee11b6..4ef05691ceb1 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -373,6 +373,8 @@ static struct iommu_group *acpihid_device_group(struct device *dev)
if (!entry->group)
entry->group = generic_device_group(dev);
+ else
+ __iommu_group_get(entry->group);
return entry->group;
}
--
2.10.2.dirty
^ permalink raw reply related
* [PATCH 3/5] iommu/amd: Fix group refcounting
From: Robin Murphy @ 2016-11-09 12:47 UTC (permalink / raw)
To: joro-zLv9SwRftAIdnm+yROfE0A
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
will.deacon-5wv7dgnIgG8,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <3922e1f14d8ecb50440b2d9b0d1123f3c9307fc5.1478695557.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
If acpihid_device_group() finds an existing group for the relevant
devid, it should be taking an additional reference on that group.
Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
---
drivers/iommu/amd_iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 754595ee11b6..4ef05691ceb1 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -373,6 +373,8 @@ static struct iommu_group *acpihid_device_group(struct device *dev)
if (!entry->group)
entry->group = generic_device_group(dev);
+ else
+ __iommu_group_get(entry->group);
return entry->group;
}
--
2.10.2.dirty
^ permalink raw reply related
* [PATCH 2/5] iommu/arm-smmu: Fix group refcounting
From: Robin Murphy @ 2016-11-09 12:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <3922e1f14d8ecb50440b2d9b0d1123f3c9307fc5.1478695557.git.robin.murphy@arm.com>
When arm_smmu_device_group() finds an existing group due to Stream ID
aliasing, it should be taking an additional reference on that group.
Reported-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
drivers/iommu/arm-smmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 8f7281444551..9f760cfba4fa 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1478,7 +1478,7 @@ static struct iommu_group *arm_smmu_device_group(struct device *dev)
}
if (group)
- return group;
+ return __iommu_group_get(group);
if (dev_is_pci(dev))
group = pci_device_group(dev);
--
2.10.2.dirty
^ permalink raw reply related
* [PATCH 2/5] iommu/arm-smmu: Fix group refcounting
From: Robin Murphy @ 2016-11-09 12:47 UTC (permalink / raw)
To: joro-zLv9SwRftAIdnm+yROfE0A
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
will.deacon-5wv7dgnIgG8,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <3922e1f14d8ecb50440b2d9b0d1123f3c9307fc5.1478695557.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
When arm_smmu_device_group() finds an existing group due to Stream ID
aliasing, it should be taking an additional reference on that group.
Reported-by: Sricharan R <sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
---
drivers/iommu/arm-smmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 8f7281444551..9f760cfba4fa 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1478,7 +1478,7 @@ static struct iommu_group *arm_smmu_device_group(struct device *dev)
}
if (group)
- return group;
+ return __iommu_group_get(group);
if (dev_is_pci(dev))
group = pci_device_group(dev);
--
2.10.2.dirty
^ permalink raw reply related
* [PATCH 1/5] iommu: Allow taking a reference on a group directly
From: Robin Murphy @ 2016-11-09 12:47 UTC (permalink / raw)
To: linux-arm-kernel
iommu_group_get_for_dev() expects that the IOMMU driver's device_group
callback return a group with a reference held for the given device.
Whilst allocating a new group is fine, and pci_device_group() correctly
handles reusing an existing group, there is no general means for IOMMU
drivers doing their own group lookup to take additional references on an
existing group pointer without having to also store device pointers or
resort to elaborate trickery.
Add an IOMMU-driver-specific function to fill the hole.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
drivers/iommu/iommu.c | 14 ++++++++++++++
include/linux/iommu.h | 1 +
2 files changed, 15 insertions(+)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 9a2f1960873b..b0b052bc6bb5 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -552,6 +552,20 @@ struct iommu_group *iommu_group_get(struct device *dev)
EXPORT_SYMBOL_GPL(iommu_group_get);
/**
+ * __iommu_group_get - Increment reference on a group
+ * @group: the group to use, must not be NULL
+ *
+ * This function may be called by internal iommu driver group management
+ * when the context of a struct device pointer is not available. It is
+ * not for general use. Returns the given group for convenience.
+ */
+struct iommu_group *__iommu_group_get(struct iommu_group *group)
+{
+ kobject_get(group->devices_kobj);
+ return group;
+}
+
+/**
* iommu_group_put - Decrement group reference
* @group: the group to use
*
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 436dc21318af..3f5d3f9d2440 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -253,6 +253,7 @@ extern void iommu_group_remove_device(struct device *dev);
extern int iommu_group_for_each_dev(struct iommu_group *group, void *data,
int (*fn)(struct device *, void *));
extern struct iommu_group *iommu_group_get(struct device *dev);
+extern struct iommu_group *__iommu_group_get(struct iommu_group *group);
extern void iommu_group_put(struct iommu_group *group);
extern int iommu_group_register_notifier(struct iommu_group *group,
struct notifier_block *nb);
--
2.10.2.dirty
^ permalink raw reply related
* [PATCH 1/5] iommu: Allow taking a reference on a group directly
From: Robin Murphy @ 2016-11-09 12:47 UTC (permalink / raw)
To: joro-zLv9SwRftAIdnm+yROfE0A
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
will.deacon-5wv7dgnIgG8,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
iommu_group_get_for_dev() expects that the IOMMU driver's device_group
callback return a group with a reference held for the given device.
Whilst allocating a new group is fine, and pci_device_group() correctly
handles reusing an existing group, there is no general means for IOMMU
drivers doing their own group lookup to take additional references on an
existing group pointer without having to also store device pointers or
resort to elaborate trickery.
Add an IOMMU-driver-specific function to fill the hole.
Signed-off-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
---
drivers/iommu/iommu.c | 14 ++++++++++++++
include/linux/iommu.h | 1 +
2 files changed, 15 insertions(+)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 9a2f1960873b..b0b052bc6bb5 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -552,6 +552,20 @@ struct iommu_group *iommu_group_get(struct device *dev)
EXPORT_SYMBOL_GPL(iommu_group_get);
/**
+ * __iommu_group_get - Increment reference on a group
+ * @group: the group to use, must not be NULL
+ *
+ * This function may be called by internal iommu driver group management
+ * when the context of a struct device pointer is not available. It is
+ * not for general use. Returns the given group for convenience.
+ */
+struct iommu_group *__iommu_group_get(struct iommu_group *group)
+{
+ kobject_get(group->devices_kobj);
+ return group;
+}
+
+/**
* iommu_group_put - Decrement group reference
* @group: the group to use
*
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 436dc21318af..3f5d3f9d2440 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -253,6 +253,7 @@ extern void iommu_group_remove_device(struct device *dev);
extern int iommu_group_for_each_dev(struct iommu_group *group, void *data,
int (*fn)(struct device *, void *));
extern struct iommu_group *iommu_group_get(struct device *dev);
+extern struct iommu_group *__iommu_group_get(struct iommu_group *group);
extern void iommu_group_put(struct iommu_group *group);
extern int iommu_group_register_notifier(struct iommu_group *group,
struct notifier_block *nb);
--
2.10.2.dirty
^ permalink raw reply related
* [Qemu-devel] [PULL 1/1] ipxe: update to 20161108 snapshot
From: Gerd Hoffmann @ 2016-11-09 9:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
In-Reply-To: <1478682565-27496-1-git-send-email-kraxel@redhat.com>
git shortlog 04186319..b991c67c
===============================
Laszlo Ersek (3):
[efi] Install the HII config access protocol on a child of the SNP handle
[librm] Conditionalize the workaround for the Tivoli VMM's SSE garbling
[build] Disable TIVOLI_VMM_WORKAROUND in the qemu configuration
Lukas Grossar (1):
[intel] Add PCI device ID for I219-V/LM
Michael Brown (57):
[efi] Fix uninitialised data in HII IFR structures
[bios] Do not enable interrupts when printing to the console
[pxe] Disable interrupts on the PIC before starting NBP
[dhcp] Allow for variable encapsulation of architecture-specific options
[dhcpv6] Include RFC5970 client architecture options in DHCPv6 requests
[dhcpv6] Include vendor class identifier option in DHCPv6 requests
[dhcp] Automatically generate vendor class identifier string
[xfer] Send intf_close() if redirection fails
[downloader] Treat redirection failures as fatal
[iscsi] Treat redirection failures as fatal
[debug] Allow per-object runtime enabling/disabling of debug messages
[debug] Allow debug messages to be initially disabled at runtime
[libc] Allow assertions to be globally enabled or disabled
[profile] Allow profiling to be globally enabled or disabled
[rng] Check for functioning RTC interrupt
[acpi] Add support for ACPI power off
[acpi] Allow time for ACPI power off to take effect
[ipv4] Send gratuitous ARPs whenever a new IPv4 address is applied
[intel] Strip spurious VLAN tags received by virtual function NICs
[intel] Remove duplicate intelvf_mbox_queues() function
[ipv6] Perform SLAAC only during autoconfiguration
[settings] Create space for IPv6 in settings display order
[ipv6] Rename ipv6_scope to dhcpv6_scope
[settings] Correctly mortalise autovivified child settings blocks
[ipv6] Allow settings to comprise arbitrary subsets of NDP options
[ipv6] Expose IPv6 settings acquired through NDP
[dhcpv6] Expose IPv6 address setting acquired through DHCPv6
[ipv6] Expose IPv6 link-local address settings
[settings] Allow settings blocks to specify a sibling ordering
[ipv6] Match user expectations for IPv6 settings priorities
[ipv6] Create routing table based on IPv6 settings
[ipv6] Rename ipv6_scope to ipv6_settings_scope
[test] Update IPv6 tests to use okx()
[ipv6] Allow for multiple routers
[hyperv] Use instance UUID in device name
[crypto] Remove obsolete extern declaration for asn1_invalidate_cursor()
[crypto] Allow for parsing of partial ASN.1 cursors
[image] Add image_asn1() to extract ASN.1 objects from image
[crypto] Add DER image format
[crypto] Add PEM image format
[image] Use image_asn1() to extract data from CMS signature images
[build] Remove obsolete explicit object requirements
[crypto] Enable both DER and PEM formats by default
[build] Remove more obsolete explicit object requirements
[pixbuf] Enable PNG format by default
[crypto] Add image_x509() to extract X.509 certificates from image
[crypto] Generalise X.509 "valid" field to a "flags" field
[list] Add list_next_entry() and list_prev_entry()
[crypto] Expose certstore_del() to explicitly remove stored certificates
[crypto] Allow certificates to be marked as having been added explicitly
[crypto] Add certstat() to display basic certificate information
[cmdline] Add certificate management commands
[crypto] Mark permanent certificates as permanent
[efi] Mark AppleNetBoot.h as a native iPXE header
[efi] Update to current EDK2 headers
[efi] Add EFI_BLOCK_IO2_PROTOCOL header and GUID definition
[bzimage] Fix page alignment of initrd images
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
pc-bios/efi-e1000.rom | Bin 209408 -> 209920 bytes
pc-bios/efi-e1000e.rom | Bin 209408 -> 209920 bytes
pc-bios/efi-eepro100.rom | Bin 209920 -> 209920 bytes
pc-bios/efi-ne2k_pci.rom | Bin 208384 -> 208896 bytes
pc-bios/efi-pcnet.rom | Bin 208384 -> 208896 bytes
pc-bios/efi-rtl8139.rom | Bin 211456 -> 212480 bytes
pc-bios/efi-virtio.rom | Bin 211456 -> 212480 bytes
pc-bios/efi-vmxnet3.rom | Bin 205312 -> 206848 bytes
roms/ipxe | 2 +-
9 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc-bios/efi-e1000.rom b/pc-bios/efi-e1000.rom
index 4e61f9b..6759924 100644
Binary files a/pc-bios/efi-e1000.rom and b/pc-bios/efi-e1000.rom differ
diff --git a/pc-bios/efi-e1000e.rom b/pc-bios/efi-e1000e.rom
index 192a437..145896c 100644
Binary files a/pc-bios/efi-e1000e.rom and b/pc-bios/efi-e1000e.rom differ
diff --git a/pc-bios/efi-eepro100.rom b/pc-bios/efi-eepro100.rom
index 66c5226..ff2793f 100644
Binary files a/pc-bios/efi-eepro100.rom and b/pc-bios/efi-eepro100.rom differ
diff --git a/pc-bios/efi-ne2k_pci.rom b/pc-bios/efi-ne2k_pci.rom
index 8c3e5fd..c832ec0 100644
Binary files a/pc-bios/efi-ne2k_pci.rom and b/pc-bios/efi-ne2k_pci.rom differ
diff --git a/pc-bios/efi-pcnet.rom b/pc-bios/efi-pcnet.rom
index 802e225..4d803d3 100644
Binary files a/pc-bios/efi-pcnet.rom and b/pc-bios/efi-pcnet.rom differ
diff --git a/pc-bios/efi-rtl8139.rom b/pc-bios/efi-rtl8139.rom
index 8827181..83488cd 100644
Binary files a/pc-bios/efi-rtl8139.rom and b/pc-bios/efi-rtl8139.rom differ
diff --git a/pc-bios/efi-virtio.rom b/pc-bios/efi-virtio.rom
index 2fc0497..3563776 100644
Binary files a/pc-bios/efi-virtio.rom and b/pc-bios/efi-virtio.rom differ
diff --git a/pc-bios/efi-vmxnet3.rom b/pc-bios/efi-vmxnet3.rom
index 3d42635..e222752 100644
Binary files a/pc-bios/efi-vmxnet3.rom and b/pc-bios/efi-vmxnet3.rom differ
diff --git a/roms/ipxe b/roms/ipxe
index 0418631..b991c67 160000
--- a/roms/ipxe
+++ b/roms/ipxe
@@ -1 +1 @@
-Subproject commit 04186319181298083ef28695a8309028b26fe83c
+Subproject commit b991c67c1d91574ef22336cc3a5944d1e63230c9
--
1.8.3.1
^ permalink raw reply related
* [Qemu-devel] [PULL for-2.8 0/1] ipxe: update to 20161108 snapshot.
From: Gerd Hoffmann @ 2016-11-09 9:09 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
This rebases ipxe to latest master. ipxe qemu builds will not use
fxsave/fxrestore any more, which caused problems on older intel cpus
due to kvm not emulating these instructions.
Special thanks to Laszlo for pushing these patches to ipxe upstream,
they finally landed in ipxe master yesterday.
please pull,
Gerd
The following changes since commit 207faf24c58859f5240f66bf6decc33b87a1776e:
Merge remote-tracking branch 'pm215/tags/pull-target-arm-20161107' into staging (2016-11-07 14:02:15 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-ipxe-20161109-1
for you to fetch changes up to 129fa54c734f4dbaf8d3bb9ca47283a2add2e4dc:
ipxe: update to 20161108 snapshot (2016-11-09 09:49:33 +0100)
----------------------------------------------------------------
ipxe: update to 20161108 snapshot.
----------------------------------------------------------------
Gerd Hoffmann (1):
ipxe: update to 20161108 snapshot
pc-bios/efi-e1000.rom | Bin 209408 -> 209920 bytes
pc-bios/efi-e1000e.rom | Bin 209408 -> 209920 bytes
pc-bios/efi-eepro100.rom | Bin 209920 -> 209920 bytes
pc-bios/efi-ne2k_pci.rom | Bin 208384 -> 208896 bytes
pc-bios/efi-pcnet.rom | Bin 208384 -> 208896 bytes
pc-bios/efi-rtl8139.rom | Bin 211456 -> 212480 bytes
pc-bios/efi-virtio.rom | Bin 211456 -> 212480 bytes
pc-bios/efi-vmxnet3.rom | Bin 205312 -> 206848 bytes
roms/ipxe | 2 +-
9 files changed, 1 insertion(+), 1 deletion(-)
^ permalink raw reply
* ✓ Fi.CI.BAT: success for dev_priv cleanup continuation (rev3)
From: Patchwork @ 2016-11-09 12:45 UTC (permalink / raw)
To: Tvrtko Ursulin; +Cc: intel-gfx
In-Reply-To: <1478270568-7902-1-git-send-email-tvrtko.ursulin@linux.intel.com>
== Series Details ==
Series: dev_priv cleanup continuation (rev3)
URL : https://patchwork.freedesktop.org/series/14844/
State : success
== Summary ==
Series 14844v3 dev_priv cleanup continuation
https://patchwork.freedesktop.org/api/1.0/series/14844/revisions/3/mbox/
fi-bdw-5557u total:244 pass:229 dwarn:0 dfail:0 fail:0 skip:15
fi-bsw-n3050 total:244 pass:204 dwarn:0 dfail:0 fail:0 skip:40
fi-byt-j1900 total:244 pass:216 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-n2820 total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32
fi-hsw-4770 total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20
fi-hsw-4770r total:244 pass:224 dwarn:0 dfail:0 fail:0 skip:20
fi-ilk-650 total:244 pass:191 dwarn:0 dfail:0 fail:0 skip:53
fi-ivb-3520m total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22
fi-ivb-3770 total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22
fi-kbl-7200u total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22
fi-skl-6260u total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14
fi-skl-6700hq total:244 pass:223 dwarn:0 dfail:0 fail:0 skip:21
fi-skl-6700k total:244 pass:222 dwarn:1 dfail:0 fail:0 skip:21
fi-snb-2520m total:244 pass:212 dwarn:0 dfail:0 fail:0 skip:32
fi-snb-2600 total:244 pass:211 dwarn:0 dfail:0 fail:0 skip:33
972b631c86ecf25d43d16b3617672f481a5cbd08 drm-intel-nightly: 2016y-11m-09d-10h-46m-28s UTC integration manifest
afa7665 drm/i915: Convert i915_drv.c to INTEL_GEN
4ee340c drm/i915: Pass dev_priv to INTEL_INFO everywhere apart from the gen use
b15872b drm/i915: Further assorted dev_priv cleanups
2b8c634 drm/i915: More assorted dev_priv cleanups
0e86e55 drm/i915: Assorted dev_priv cleanups
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2942/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH v3 05/11] drm/i915/gen9+: Do not initialise active_crtcs for !modeset
From: Maarten Lankhorst @ 2016-11-09 12:45 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
In-Reply-To: <20161108141156.GM4617@intel.com>
Op 08-11-16 om 15:11 schreef Ville Syrjälä:
> On Tue, Nov 08, 2016 at 01:55:36PM +0100, Maarten Lankhorst wrote:
>> This is a hack and not needed. Use the right mask by checking
>> intel_state->modeset. This works for watermark sanitization too.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_pm.c | 38 +++++++++++++++-----------------------
>> 1 file changed, 15 insertions(+), 23 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>> index 02f52b52a03d..d38a46efcfed 100644
>> --- a/drivers/gpu/drm/i915/intel_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>> @@ -3089,26 +3089,22 @@ skl_ddb_get_pipe_allocation_limits(struct drm_device *dev,
>> struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
>> struct drm_i915_private *dev_priv = to_i915(dev);
>> struct drm_crtc *for_crtc = cstate->base.crtc;
>> - unsigned int pipe_size, ddb_size;
>> + unsigned int pipe_size, ddb_size, active_crtcs;
>> int nth_active_pipe;
>>
>> + if (intel_state->modeset)
>> + active_crtcs = intel_state->active_crtcs;
>> + else
>> + active_crtcs = dev_priv->active_crtcs;
> What's the story with the locking here?
if !modeset, 3 things can happen:
1. fastset, connection_mutex held, dev_priv->active_crtcs cannot change.
2. crtc disabled, active_crtcs is potentially garbage, but harmless since we don't write disabled wm's when the crtc is already disabled.
(same as what happens currently)
3. crtc enabled, dev_priv->active_crtcs is valid because ddb reallocation requires locking all active crtc's for reallocation,
which requires taking this lock for this crtc.
This wouldn't be valid for gen8-, but is valid because of skl reallocation requirements.
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* [Qemu-devel] [Bug 680758] Re: balloon only resizes by 2M
From: Thomas Huth @ 2016-11-09 12:32 UTC (permalink / raw)
To: qemu-devel
In-Reply-To: <20101124034709.25625.14961.malonedeb@gandwana.canonical.com>
Triaging old bug tickets ... can you still reproduce this issue with the
latest version of QEMU / the latest version of the balloon driver in the
guest?
** Changed in: qemu
Status: New => Incomplete
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/680758
Title:
balloon only resizes by 2M
Status in QEMU:
Incomplete
Bug description:
when in monitor and running balloon 512 from a 1024M VM, the vm
dropped the size to 1020 (this value changes), then every subsequent
request to balloon 512 will drop it by another 2M. The system was
running at above 60% RAM free when these requests were made. also
requesting to up the ram results in no change above 1024 (I'm guessing
this is intentional, but was unable to find any documentation)
Versions:
qemu-kvm 0.13.0
qemu-kvm.git b377474e589e5a1fe2abc7b13fafa8bad802637a
Qemu Command Line:
./x86_64-softmmu/qemu-system-x86_64 -drive
file=/var/machines/seven.base,if=virtio -net
nic,model=virtio,macaddr=02:00:00:00:00:01 -net tap,script=/etc/qemu
/qemu-ifup,downscript=/etc/qemu/qemu-ifdown -vga std -usb -usbdevice
tablet -rtc base=localtime,clock=host -watchdog i6300esb -balloon
virtio -m 1024 -no-quit -smp 2 -monitor stdio
Monitor Session:
QEMU 0.13.50 monitor - type 'help' for more information
(qemu) info balloon
balloon: actual=1024
(qemu) balloon 1536
(qemu) info balloon
balloon: actual=1024
(qemu) balloon 512
(qemu) info balloon
balloon: actual=1020
(qemu) info balloon
balloon: actual=1020
(qemu) balloon 512
(qemu) info balloon
balloon: actual=1018
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/680758/+subscriptions
^ permalink raw reply
* [Qemu-devel] [PATCH v2] vhost: Update 'ioeventfd_started' with host notifiers
From: Felipe Franciosi @ 2016-11-09 12:44 UTC (permalink / raw)
To: Paolo Bonzini, Stefan Hajnoczi, Michael S. Tsirkin
Cc: qemu-devel@nongnu.org, Felipe Franciosi
Following the recent refactor of virtio notfiers [1], more specifically
the patch that uses virtio_bus_set_host_notifier [2] by default, core
virtio code requires 'ioeventfd_started' to be set to true/false when
the host notifiers are configured. Because not all vhost devices were
update (eg. vhost-scsi) to use the new interface, this value is always
set to false.
When booting a guest with a vhost-scsi backend controller, SeaBIOS will
initially configure the device which sets all notifiers. The guest will
continue to boot fine until the kernel virtio-scsi driver reinitialises
the device causing a stop followed by another start. Since
ioeventfd_started was never set to true, the 'stop' operation triggered
by virtio_bus_set_host_notifier() will not result in a call to
virtio_pci_ioeventfd_assign(assign=false). This leaves the memory
regions with stale notifiers and results on the next start triggering
the following assertion:
kvm_mem_ioeventfd_add: error adding ioeventfd: File exists
Aborted
This patch updates ioeventfd_started whenever the notifiers are set or
cleared, fixing this issue.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
[1] http://lists.nongnu.org/archive/html/qemu-devel/2016-10/msg07748.html
[2] http://lists.nongnu.org/archive/html/qemu-devel/2016-10/msg07760.html
---
v1->v2:
- Update ioeventfd_started in vhost_dev_enable/disable_notifiers()
instead of vhost_scsi_start/stop().
- Reword the commit message accordingly.
---
hw/virtio/vhost.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 131f164..1290963 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1205,6 +1205,7 @@ int vhost_dev_enable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev)
goto fail_vq;
}
}
+ VIRTIO_BUS(qbus)->ioeventfd_started = true;
return 0;
fail_vq:
@@ -1239,6 +1240,7 @@ void vhost_dev_disable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev)
}
assert (r >= 0);
}
+ VIRTIO_BUS(qbus)->ioeventfd_started = false;
virtio_device_start_ioeventfd(vdev);
}
--
1.9.4
^ permalink raw reply related
* Re: [Qemu-devel] [PULL 0/1] Tracing patches
From: Stefan Hajnoczi @ 2016-11-09 12:44 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Peter Maydell
In-Reply-To: <1478629053-31709-1-git-send-email-stefanha@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]
On Tue, Nov 08, 2016 at 06:17:32PM +0000, Stefan Hajnoczi wrote:
> The following changes since commit 207faf24c58859f5240f66bf6decc33b87a1776e:
>
> Merge remote-tracking branch 'pm215/tags/pull-target-arm-20161107' into staging (2016-11-07 14:02:15 +0000)
>
> are available in the git repository at:
>
> git://github.com/stefanha/qemu.git tags/tracing-pull-request
>
> for you to fetch changes up to 3b0fc80dd8ed9bd1ac738898e4fbd70c4a618925:
>
> docs/tracing.txt: Update documentation of default backend (2016-11-08 18:16:48 +0000)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
>
> Peter Maydell (1):
> docs/tracing.txt: Update documentation of default backend
>
> docs/tracing.txt | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> --
> 2.7.4
>
>
Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply
* Re: [Qemu-devel] [PULL 0/3] Block patches
From: Stefan Hajnoczi @ 2016-11-09 12:44 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel, Peter Maydell
In-Reply-To: <1478628762-31050-1-git-send-email-stefanha@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
On Tue, Nov 08, 2016 at 06:12:39PM +0000, Stefan Hajnoczi wrote:
> The following changes since commit 207faf24c58859f5240f66bf6decc33b87a1776e:
>
> Merge remote-tracking branch 'pm215/tags/pull-target-arm-20161107' into staging (2016-11-07 14:02:15 +0000)
>
> are available in the git repository at:
>
> git://github.com/stefanha/qemu.git tags/block-pull-request
>
> for you to fetch changes up to 35dd66e23ce96283723de58e10d2877ae2be4a1b:
>
> aio-posix: simplify aio_epoll_update (2016-11-08 17:09:14 +0000)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
>
> Kevin Wolf (1):
> block: Don't mark node clean after failed flush
>
> Paolo Bonzini (2):
> aio-posix: avoid NULL pointer dereference in aio_epoll_update
> aio-posix: simplify aio_epoll_update
>
> aio-posix.c | 53 +++++++++++++++++---------------------
> block/io.c | 4 ++-
> tests/qemu-iotests/026.out | 22 ++++++++++++++++
> tests/qemu-iotests/026.out.nocache | 22 ++++++++++++++++
> tests/qemu-iotests/071.out | 2 ++
> 5 files changed, 73 insertions(+), 30 deletions(-)
>
> --
> 2.7.4
>
>
Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply
* [Bug 98657] New: Reproducible freeze when changing volume amplification in kodi
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2016-11-09 12:42 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 2341 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=98657
Bug ID: 98657
Summary: Reproducible freeze when changing volume amplification
in kodi
Product: xorg
Version: unspecified
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
Assignee: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Reporter: wolfgang.kde-zdKOYOBJ9IsPyMaTEpOvjQ@public.gmane.org
QA Contact: xorg-team-go0+a7rfsptAfugRpC6u6w@public.gmane.org
Sound goes out as Surround 5.1 over the HDMI cable on an Nvidia GT 630.
Volume amplification is at minimum 0dB - if I increase it, the screen freezes.
lspci:
01:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 630
Rev. 2] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev
a1)
Kubuntu 16.04.1 with self compiled standard kernel 4.8.6
kodi version 15.2
Xorg.0.log says:
[ 4.645] (II) Module nouveau: vendor="X.Org Foundation"
[ 4.645] compiled for 1.18.1, module version = 1.0.12
kern.log:
Nov 9 13:18:51 s5 kernel: [ 599.178480] nouveau 0000:01:00.0: fifo: PBDMA0:
00040000 [PBENTRY] ch 8 [003f902000 kodi.bin[2449]] subc 0 mthd 0000 data
00000000
Nov 9 13:18:51 s5 kernel: [ 599.178502] nouveau 0000:01:00.0: fifo: PBDMA0:
00040000 [PBENTRY] ch 8 [003f902000 kodi.bin[2449]] subc 0 mthd 0000 data
00000000
Nov 9 13:18:51 s5 kernel: [ 599.178515] nouveau 0000:01:00.0: gr: DATA_ERROR
0000000c [INVALID_BITFIELD] ch 8 [003f902000 kodi.bin[2449]] subc 0 class a197
mthd 114c data 05000000
Nov 9 13:18:51 s5 kernel: [ 599.178522] nouveau 0000:01:00.0: fifo: PBDMA0:
00040000 [PBENTRY] ch 8 [003f902000 kodi.bin[2449]] subc 0 mthd 0000 data
00000000
Nov 9 13:18:51 s5 kernel: [ 599.178533] nouveau 0000:01:00.0: gr: DATA_ERROR
00000003 [INVALID_OPERATION] ch 8 [003f902000 kodi.bin[2449]] subc 0 class a197
mthd 1158 data 3f800000
Nov 9 13:18:51 s5 kernel: [ 599.178540] nouveau 0000:01:00.0: fifo: PBDMA0:
00040000 [PBENTRY] ch 8 [003f902000 kodi.bin[2449]] subc 0 mthd 0000 data
00000000
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 3634 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply
* [PATCH v2 3/4] printk/btrfs: Handle more message headers
From: Petr Mladek @ 2016-11-09 12:41 UTC (permalink / raw)
To: Linus Torvalds
Cc: Joe Perches, Andrew Morton, Sergey Senozhatsky, Steven Rostedt,
Jason Wessel, Jaroslav Kysela, Takashi Iwai, Chris Mason,
Josef Bacik, David Sterba, linux-kernel, Petr Mladek
In-Reply-To: <1478695291-12169-1-git-send-email-pmladek@suse.com>
The commit 4bcc595ccd80decb4245096e ("printk: reinstate KERN_CONT for
printing continuation lines") allows to define more message headers
for a single message. The motivation is that continuous lines might
get mixed. Therefore it make sense to define the right log level
for every piece of a cont line.
The current btrfs_printk() macros do not support continuous lines
at the moment. But better be prepared for a custom messages and
avoid potential "lvl" buffer overflow.
This patch iterates over the entire message header. It is interested
only into the message level like the original code.
This patch also introduces PRINTK_MAX_SINGLE_HEADER_LEN. Three bytes
are enough for the message level header at the moment. But it used to
be three, see the commit 04d2c8c83d0e3ac5f ("printk: convert the format
for KERN_<LEVEL> to a 2 byte pattern").
Also I fixed the default ratelimit level. It looked very strange
when it was different from the default log level.
Signed-off-by: Petr Mladek <pmladek@suse.com>
---
fs/btrfs/super.c | 26 +++++++++++++++-----------
include/linux/printk.h | 2 ++
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 74ed5aae6cea..c083d84eaa32 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -202,27 +202,31 @@ void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function
void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...)
{
struct super_block *sb = fs_info->sb;
- char lvl[4];
+ char lvl[PRINTK_MAX_SINGLE_HEADER_LEN + 1];
struct va_format vaf;
va_list args;
- const char *type = logtypes[4];
+ const char *type = NULL;
int kern_level;
struct ratelimit_state *ratelimit;
va_start(args, fmt);
- kern_level = printk_get_level(fmt);
- if (kern_level) {
+ while ((kern_level = printk_get_level(fmt)) != 0) {
size_t size = printk_skip_level(fmt) - fmt;
- memcpy(lvl, fmt, size);
- lvl[size] = '\0';
+
+ if (kern_level >= '0' || kern_level <= '7') {
+ memcpy(lvl, fmt, size);
+ lvl[size] = '\0';
+ type = logtypes[kern_level - '0'];
+ ratelimit = &printk_limits[kern_level - '0'];
+ }
fmt += size;
- type = logtypes[kern_level - '0'];
- ratelimit = &printk_limits[kern_level - '0'];
- } else {
+ }
+
+ if (!type) {
*lvl = '\0';
- /* Default to debug output */
- ratelimit = &printk_limits[7];
+ type = logtypes[4];
+ ratelimit = &printk_limits[4];
}
vaf.fmt = fmt;
diff --git a/include/linux/printk.h b/include/linux/printk.h
index a0859e169bc3..afe8ccec1672 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -10,6 +10,8 @@
extern const char linux_banner[];
extern const char linux_proc_banner[];
+#define PRINTK_MAX_SINGLE_HEADER_LEN 2
+
static inline int printk_get_level(const char *buffer)
{
if (buffer[0] == KERN_SOH_ASCII && buffer[1]) {
--
1.8.5.6
^ permalink raw reply related
* Re: [PATCH] virtio: tx with can_push when VERSION_1 is set
From: Pierre Pfister (ppfister) @ 2016-11-09 12:42 UTC (permalink / raw)
To: Maxime Coquelin; +Cc: dev@dpdk.org
In-Reply-To: <46762894-5016-f634-c355-77af881685e6@redhat.com>
Hello Maxime,
Sorry for the late reply.
> Le 8 nov. 2016 à 10:44, Maxime Coquelin <maxime.coquelin@redhat.com> a écrit :
>
> Hi Pierre,
>
> On 11/08/2016 10:31 AM, Pierre Pfister (ppfister) wrote:
>> Current virtio driver advertises VERSION_1 support,
>> but does not handle device's VERSION_1 support when
>> sending packets (it looks for ANY_LAYOUT feature,
>> which is absent).
>>
>> This patch enables 'can_push' in tx path when VERSION_1
>> is advertised by the device.
>>
>> This significantly improves small packets forwarding rate
>> towards devices advertising VERSION_1 feature.
> I think it depends whether offloading is enabled or not.
> If no offloading enabled, I measured significant drop.
> Indeed, when no offloading is enabled, the Tx path in Virtio
> does not access the virtio header before your patch, as the header is memset to zero at device init time.
> With your patch, it gets memset to zero at every transmit in the hot
> path.
Right. On the virtio side that is true, but on the device side, we have to access the header anyway.
And accessing two descriptors (with the address resolution and memory fetch which comes with it)
is a costy operation compared to a single one.
In the case indirect descriptors are used, this is 1 desc access instead or 3.
And in the case chained descriptors are used, this doubles the number of packets that you can put in your queue.
Those are the results in my PHY -> VM (testpmd) -> PHY setup
Traffic is flowing bidirectionally. Numbers are for lossless-rates.
When chained buffers are used for dpdk's TX: 2x2.13Mpps
When indirect descriptors are used for dpdk's TX: 2x2.38Mpps
When shallow buffers are used for dpdk's TX (with this patch): 2x2.42Mpps
I must also note that qemu 2.5 does not seem to deal with VERSION_1 and ANY_LAYOUT correctly.
The patch I am proposing here works for qemu 2.7, but with qemu 2.5, testpmd still behaves as if ANY_LAYOUT (or VERSION_1) was not available. This is not catastrophic. But just note that you will not see performance in some cases with qemu 2.5.
Cheers
- Pierre
>
> With offloading enabled, it does makes sense though, as the header will
> be accessed.
>
> This patch is for v17.02 anyway, and we may provide a way to enable and
> disable features at Virtio PMD init time by this release.
>
> Thanks,
> Maxime
>
>>
>> Signed-off-by: Pierre Pfister <ppfister@cisco.com>
>> ---
>> drivers/net/virtio/virtio_rxtx.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
>> index 724517e..2fe0338 100644
>> --- a/drivers/net/virtio/virtio_rxtx.c
>> +++ b/drivers/net/virtio/virtio_rxtx.c
>> @@ -925,7 +925,8 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
>> }
>>
>> /* optimize ring usage */
>> - if (vtpci_with_feature(hw, VIRTIO_F_ANY_LAYOUT) &&
>> + if ((vtpci_with_feature(hw, VIRTIO_F_ANY_LAYOUT) ||
>> + vtpci_with_feature(hw, VIRTIO_F_VERSION_1)) &&
>> rte_mbuf_refcnt_read(txm) == 1 &&
>> RTE_MBUF_DIRECT(txm) &&
>> txm->nb_segs == 1 &&
>> --
>> 2.7.4 (Apple Git-66)
>>
^ permalink raw reply
* Re: [lkp] [x86/copy_user] adb402cd14: will-it-scale.per_process_ops -12.7% regression
From: Borislav Petkov @ 2016-11-09 12:42 UTC (permalink / raw)
To: kernel test robot
Cc: Ingo Molnar, Andy Lutomirski, Brian Gerst, Denys Vlasenko,
H. Peter Anvin, Josh Poimboeuf, Linus Torvalds, Peter Zijlstra,
Thomas Gleixner, LKML, tipbuild, lkp, Mel Gorman
In-Reply-To: <20161107025038.GE21529@yexl-desktop>
On Mon, Nov 07, 2016 at 10:50:38AM +0800, kernel test robot wrote:
>
> Greeting,
>
> FYI, we noticed a -12.7% regression of will-it-scale.per_process_ops due to commit:
>
>
> commit adb402cd1461eef6e1a21db4532a3b9e6a6be853 ("x86/copy_user: Unify the code by removing the 64-bit asm _copy_*_user() variants")
> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/asm
>
> in testcase: will-it-scale
> on test machine: 8 threads Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz with 4G memory
> with following parameters:
>
> test: poll1
> cpufreq_governor: performance
...
> # Lock Debugging (spinlocks, mutexes, etc...)
> #
> # CONFIG_DEBUG_RT_MUTEXES is not set
> # CONFIG_DEBUG_SPINLOCK is not set
> # CONFIG_DEBUG_MUTEXES is not set
> # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
> # CONFIG_DEBUG_LOCK_ALLOC is not set
> # CONFIG_PROVE_LOCKING is not set
> # CONFIG_LOCK_STAT is not set
> CONFIG_DEBUG_ATOMIC_SLEEP=y
^^^^^^^^^^^^^^^^^^^^^^^^^
So Mel says that this might be the culprit for the observed
change in perf. Can you please rerun your test without that
CONFIG_DEBUG_ATOMIC_SLEEP thing?
Thanks.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply
* [PATCH v2 4/4] printk/sound: Handle more message headers
From: Petr Mladek @ 2016-11-09 12:41 UTC (permalink / raw)
To: Linus Torvalds
Cc: Joe Perches, Andrew Morton, Sergey Senozhatsky, Steven Rostedt,
Jason Wessel, Jaroslav Kysela, Takashi Iwai, Chris Mason,
Josef Bacik, David Sterba, linux-kernel, Petr Mladek
In-Reply-To: <1478695291-12169-1-git-send-email-pmladek@suse.com>
The commit 4bcc595ccd80decb4245096e ("printk: reinstate KERN_CONT for
printing continuation lines") allows to define more message headers
for a single message. The motivation is that continuous lines might
get mixed. Therefore it make sense to define the right log level
for every piece of a cont line.
This patch allows to copy only the real message level. We should
ignore KERN_CONT because <filename:line> is added for each message.
By other words, we want to know where each piece of the line comes
from.
Signed-off-by: Petr Mladek <pmladek@suse.com>
---
sound/core/misc.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/sound/core/misc.c b/sound/core/misc.c
index f2e8226c88fb..45f03b1d4102 100644
--- a/sound/core/misc.c
+++ b/sound/core/misc.c
@@ -71,6 +71,7 @@ void __snd_printk(unsigned int level, const char *path, int line,
int kern_level;
struct va_format vaf;
char verbose_fmt[] = KERN_DEFAULT "ALSA %s:%d %pV";
+ bool level_found = false;
#endif
#ifdef CONFIG_SND_DEBUG
@@ -83,15 +84,22 @@ void __snd_printk(unsigned int level, const char *path, int line,
vaf.fmt = format;
vaf.va = &args;
- kern_level = printk_get_level(format);
- if (kern_level) {
- const char *end_of_header = printk_skip_level(format);
- memcpy(verbose_fmt, format, end_of_header - format);
+ while ((kern_level = printk_get_level(vaf.fmt)) != 0) {
+ const char *end_of_header = printk_skip_level(vaf.fmt);
+
+ /* Ignore KERN_CONT. We print filename:line for each piece. */
+ if (kern_level >= '0' || kern_level <= '7') {
+ memcpy(verbose_fmt, vaf.fmt, end_of_header - vaf.fmt);
+ level_found = true;
+ }
+
vaf.fmt = end_of_header;
- } else if (level)
+ }
+
+ if (!level_found && level)
memcpy(verbose_fmt, KERN_DEBUG, sizeof(KERN_DEBUG) - 1);
- printk(verbose_fmt, sanity_file_name(path), line, &vaf);
+ printk(verbose_fmt, sanity_file_name(path), line, &vaf);
#else
vprintk(format, args);
#endif
--
1.8.5.6
^ permalink raw reply related
* Re: [x86/copy_user] adb402cd14: will-it-scale.per_process_ops -12.7% regression
From: Borislav Petkov @ 2016-11-09 12:42 UTC (permalink / raw)
To: lkp
In-Reply-To: <20161107025038.GE21529@yexl-desktop>
[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]
On Mon, Nov 07, 2016 at 10:50:38AM +0800, kernel test robot wrote:
>
> Greeting,
>
> FYI, we noticed a -12.7% regression of will-it-scale.per_process_ops due to commit:
>
>
> commit adb402cd1461eef6e1a21db4532a3b9e6a6be853 ("x86/copy_user: Unify the code by removing the 64-bit asm _copy_*_user() variants")
> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/asm
>
> in testcase: will-it-scale
> on test machine: 8 threads Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz with 4G memory
> with following parameters:
>
> test: poll1
> cpufreq_governor: performance
...
> # Lock Debugging (spinlocks, mutexes, etc...)
> #
> # CONFIG_DEBUG_RT_MUTEXES is not set
> # CONFIG_DEBUG_SPINLOCK is not set
> # CONFIG_DEBUG_MUTEXES is not set
> # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
> # CONFIG_DEBUG_LOCK_ALLOC is not set
> # CONFIG_PROVE_LOCKING is not set
> # CONFIG_LOCK_STAT is not set
> CONFIG_DEBUG_ATOMIC_SLEEP=y
^^^^^^^^^^^^^^^^^^^^^^^^^
So Mel says that this might be the culprit for the observed
change in perf. Can you please rerun your test without that
CONFIG_DEBUG_ATOMIC_SLEEP thing?
Thanks.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply
* [PATCH v2 2/4] printk/kdb: Handle more message headers
From: Petr Mladek @ 2016-11-09 12:41 UTC (permalink / raw)
To: Linus Torvalds
Cc: Joe Perches, Andrew Morton, Sergey Senozhatsky, Steven Rostedt,
Jason Wessel, Jaroslav Kysela, Takashi Iwai, Chris Mason,
Josef Bacik, David Sterba, linux-kernel, Petr Mladek
In-Reply-To: <1478695291-12169-1-git-send-email-pmladek@suse.com>
The commit 4bcc595ccd80decb4245096e ("printk: reinstate KERN_CONT for
printing continuation lines") allows to define more message headers
for a single message. The motivation is that continuous lines might
get mixed. Therefore it make sense to define the right log level
for every piece of a cont line.
This patch introduces printk_skip_headers() that will skip all
headers and uses it in the kdb code instead of printk_skip_level().
This approach helps to fix other printk_skip_level() users
independently.
Signed-off-by: Petr Mladek <pmladek@suse.com>
---
include/linux/printk.h | 8 ++++++++
kernel/debug/kdb/kdb_io.c | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index eac1af8502bb..a0859e169bc3 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -31,6 +31,14 @@ static inline const char *printk_skip_level(const char *buffer)
return buffer;
}
+static inline const char *printk_skip_headers(const char *buffer)
+{
+ while (printk_get_level(buffer))
+ buffer = printk_skip_level(buffer);
+
+ return buffer;
+}
+
#define CONSOLE_EXT_LOG_MAX 8192
/* printk's without a loglevel use this.. */
diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c
index fc1ef736253c..98c9011eac78 100644
--- a/kernel/debug/kdb/kdb_io.c
+++ b/kernel/debug/kdb/kdb_io.c
@@ -697,7 +697,7 @@ int vkdb_printf(enum kdb_msgsrc src, const char *fmt, va_list ap)
* Write to all consoles.
*/
retlen = strlen(kdb_buffer);
- cp = (char *) printk_skip_level(kdb_buffer);
+ cp = (char *) printk_skip_headers(kdb_buffer);
if (!dbg_kdb_mode && kgdb_connected) {
gdbstub_msg_write(cp, retlen - (cp - kdb_buffer));
} else {
--
1.8.5.6
^ permalink raw reply related
* [PATCH v2 1/4] printk/NMI: Handle continuous lines and missing newline
From: Petr Mladek @ 2016-11-09 12:41 UTC (permalink / raw)
To: Linus Torvalds
Cc: Joe Perches, Andrew Morton, Sergey Senozhatsky, Steven Rostedt,
Jason Wessel, Jaroslav Kysela, Takashi Iwai, Chris Mason,
Josef Bacik, David Sterba, linux-kernel, Petr Mladek
In-Reply-To: <1478695291-12169-1-git-send-email-pmladek@suse.com>
The commit 4bcc595ccd80decb4245 ("printk: reinstate KERN_CONT for printing
continuation lines") added back KERN_CONT message header. As a result
it might appear in the middle of the line when the parts are squashed
via the temporary NMI buffer.
A reasonable solution seems to be to split the text in the NNI temporary
not only by newlines but also by the message headers.
Another solution would be to filter out KERN_CONT when writing to
the temporary buffer. But this would complicate the lockless handling.
Also it would not solve problems with a missing newline that was there
even before the KERN_CONT stuff.
This patch moves the temporary buffer handling into separate function.
I played with it and it seems that using the char pointers make the
code easier to read.
Also it prints the final newline as a continuous line.
Finally, it moves handling of the s->len overflow into the paranoid check.
And allows to recover from the disaster.
Signed-off-by: Petr Mladek <pmladek@suse.com>
---
kernel/printk/nmi.c | 78 ++++++++++++++++++++++++++++++++++-------------------
1 file changed, 50 insertions(+), 28 deletions(-)
diff --git a/kernel/printk/nmi.c b/kernel/printk/nmi.c
index 16bab471c7e2..26cd42d459d3 100644
--- a/kernel/printk/nmi.c
+++ b/kernel/printk/nmi.c
@@ -113,16 +113,51 @@ static void printk_nmi_flush_line(const char *text, int len)
}
-/*
- * printk one line from the temporary buffer from @start index until
- * and including the @end index.
- */
-static void printk_nmi_flush_seq_line(struct nmi_seq_buf *s,
- int start, int end)
+/* printk part of the temporary buffer line by line */
+static int printk_nmi_flush_buffer(const char *start, size_t len)
{
- const char *buf = s->buffer + start;
+ const char *c, *end;
+ bool header;
+
+ c = start;
+ end = start + len;
+ header = true;
+
+ /* Print line by line. */
+ while (c < end) {
+ if (*c == '\n') {
+ printk_nmi_flush_line(start, c - start + 1);
+ start = ++c;
+ header = true;
+ continue;
+ }
+
+ /* Handle continuous lines or missing new line. */
+ if ((c + 1 < end) && printk_get_level(c)) {
+ if (header) {
+ c = printk_skip_level(c);
+ continue;
+ }
+
+ printk_nmi_flush_line(start, c - start);
+ start = c++;
+ header = true;
+ continue;
+ }
+
+ header = false;
+ c++;
+ }
- printk_nmi_flush_line(buf, (end - start) + 1);
+ /* Check if there was a partial line. Ignore pure header. */
+ if (start < end && !header) {
+ static const char newline[] = KERN_CONT "\n";
+
+ printk_nmi_flush_line(start, end - start);
+ printk_nmi_flush_line(newline, strlen(newline));
+ }
+
+ return len;
}
/*
@@ -135,8 +170,8 @@ static void __printk_nmi_flush(struct irq_work *work)
__RAW_SPIN_LOCK_INITIALIZER(read_lock);
struct nmi_seq_buf *s = container_of(work, struct nmi_seq_buf, work);
unsigned long flags;
- size_t len, size;
- int i, last_i;
+ size_t len;
+ int i;
/*
* The lock has two functions. First, one reader has to flush all
@@ -154,12 +189,14 @@ static void __printk_nmi_flush(struct irq_work *work)
/*
* This is just a paranoid check that nobody has manipulated
* the buffer an unexpected way. If we printed something then
- * @len must only increase.
+ * @len must only increase. Also it should never overflow the
+ * buffer size.
*/
- if (i && i >= len) {
+ if ((i && i >= len) || len > sizeof(s->buffer)) {
const char *msg = "printk_nmi_flush: internal error\n";
printk_nmi_flush_line(msg, strlen(msg));
+ len = 0;
}
if (!len)
@@ -167,22 +204,7 @@ static void __printk_nmi_flush(struct irq_work *work)
/* Make sure that data has been written up to the @len */
smp_rmb();
-
- size = min(len, sizeof(s->buffer));
- last_i = i;
-
- /* Print line by line. */
- for (; i < size; i++) {
- if (s->buffer[i] == '\n') {
- printk_nmi_flush_seq_line(s, last_i, i);
- last_i = i + 1;
- }
- }
- /* Check if there was a partial line. */
- if (last_i < size) {
- printk_nmi_flush_seq_line(s, last_i, size - 1);
- printk_nmi_flush_line("\n", strlen("\n"));
- }
+ i += printk_nmi_flush_buffer(s->buffer + i, len - i);
/*
* Check that nothing has got added in the meantime and truncate
--
1.8.5.6
^ permalink raw reply related
* [PATCH v2 0/4] printk: Fixes and hardening related to KERN_CONT
From: Petr Mladek @ 2016-11-09 12:41 UTC (permalink / raw)
To: Linus Torvalds
Cc: Joe Perches, Andrew Morton, Sergey Senozhatsky, Steven Rostedt,
Jason Wessel, Jaroslav Kysela, Takashi Iwai, Chris Mason,
Josef Bacik, David Sterba, linux-kernel, Petr Mladek
The first patch fixes a messed output of continuous lines
when printing backtraces for all CPUs via NMI.
The other patches fix problems that I noticed when working
on the first patch.
I have incorporated the feedback and did much more testing.
Åll patches have changed so I did not add the taken Reviews
and Acks.
Changes against v1:
+ used const char in printk_nmi_flush_buffer()
+ print the final newline with KERN_CONT in
printk_nmi_flush_buffer()
+ used printk_skip_level() instead of the hardcoded '2'
in all patches.
+ define PRINTK_MAX_SINGLE_HEADER_LEN to avoid hardcoding
the buffer size; it simplified the code in btrfs_printk()
+ ignore KERN_CONT in __snd_printk(); the lines were hard
to read because of the added stuff like <filename:line>
for each piece.
Petr Mladek (4):
printk/NMI: Handle continuous lines and missing newline
printk/kdb: Handle more message headers
printk/btrfs: Handle more message headers
printk/sound: Handle more message headers
fs/btrfs/super.c | 26 +++++++++-------
include/linux/printk.h | 10 ++++++
kernel/debug/kdb/kdb_io.c | 2 +-
kernel/printk/nmi.c | 78 ++++++++++++++++++++++++++++++-----------------
sound/core/misc.c | 20 ++++++++----
5 files changed, 90 insertions(+), 46 deletions(-)
--
1.8.5.6
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.