* [PATCH v1 19/34] tests/tcg: use CONFIG_LINUX_USER, not CONFIG_LINUX
From: Alex Bennée @ 2022-01-05 13:49 UTC (permalink / raw)
To: qemu-devel
Cc: fam, Eduardo Habkost, berrange, Richard Henderson, f4bug,
stefanha, crosa, pbonzini, Alex Bennée, aurelien
In-Reply-To: <20220105135009.1584676-1-alex.bennee@linaro.org>
From: Paolo Bonzini <pbonzini@redhat.com>
The two more or less overlap, because CONFIG_LINUX is a requirement for Linux
user-mode emulation. However, CONFIG_LINUX is technically a host symbol
that applies even to system emulation. Defining CONFIG_LINUX_USER, and
CONFIG_BSD_USER for eventual future use, is cleaner.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211210084836.25202-1-pbonzini@redhat.com>
---
tests/tcg/configure.sh | 8 +++++++-
tests/tcg/multiarch/Makefile.target | 2 +-
tests/tcg/x86_64/Makefile.target | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 8eb4287c84..309335a2bd 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -225,8 +225,14 @@ for target in $target_list; do
echo "TARGET_NAME=$arch" >> $config_target_mak
echo "target=$target" >> $config_target_mak
case $target in
- *-linux-user | *-bsd-user)
+ *-linux-user)
echo "CONFIG_USER_ONLY=y" >> $config_target_mak
+ echo "CONFIG_LINUX_USER=y" >> $config_target_mak
+ echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak
+ ;;
+ *-bsd-user)
+ echo "CONFIG_USER_ONLY=y" >> $config_target_mak
+ echo "CONFIG_BSD_USER=y" >> $config_target_mak
echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak
;;
*-softmmu)
diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target
index a83efb4a9d..dec401e67f 100644
--- a/tests/tcg/multiarch/Makefile.target
+++ b/tests/tcg/multiarch/Makefile.target
@@ -10,7 +10,7 @@ MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
# Set search path for all sources
VPATH += $(MULTIARCH_SRC)
MULTIARCH_SRCS = $(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
-ifneq ($(CONFIG_LINUX),)
+ifneq ($(CONFIG_LINUX_USER),)
VPATH += $(MULTIARCH_SRC)/linux
MULTIARCH_SRCS += $(notdir $(wildcard $(MULTIARCH_SRC)/linux/*.c))
endif
diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.target
index d7a7385583..4a8a464c57 100644
--- a/tests/tcg/x86_64/Makefile.target
+++ b/tests/tcg/x86_64/Makefile.target
@@ -8,7 +8,7 @@
include $(SRC_PATH)/tests/tcg/i386/Makefile.target
-ifneq ($(CONFIG_LINUX),)
+ifneq ($(CONFIG_LINUX_USER),)
X86_64_TESTS += vsyscall
TESTS=$(MULTIARCH_TESTS) $(X86_64_TESTS) test-x86_64
else
--
2.30.2
^ permalink raw reply related
* Re: [PATCH 2/8] dt-bindings: nvmem: add transformation bindings
From: Rob Herring @ 2022-01-05 14:20 UTC (permalink / raw)
To: Michael Walle
Cc: MTD Maling List, devicetree, linux-kernel@vger.kernel.org,
linux-arm-kernel, netdev, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Srinivas Kandagatla, Shawn Guo, Li Yang,
Frank Rowand, David S . Miller, Jakub Kicinski, Ansuel Smith,
Andrew Lunn
In-Reply-To: <084b306b7c49ce8085dd867663945d29@walle.cc>
On Wed, Jan 5, 2022 at 2:25 AM Michael Walle <michael@walle.cc> wrote:
>
> Am 2022-01-04 16:03, schrieb Rob Herring:
> > On Tue, Dec 28, 2021 at 03:25:43PM +0100, Michael Walle wrote:
> >> Just add a simple list of the supported devices which need a nvmem
> >> transformations.
> >>
> >> Also, since the compatible string is prepended to the actual nvmem
> >> compatible string, we need to match using "contains" instead of an
> >> exact
> >> match.
> >>
> >> Signed-off-by: Michael Walle <michael@walle.cc>
> >> ---
> >> .../devicetree/bindings/mtd/mtd.yaml | 7 +--
> >> .../bindings/nvmem/nvmem-transformations.yaml | 46
> >> +++++++++++++++++++
> >> 2 files changed, 50 insertions(+), 3 deletions(-)
> >> create mode 100644
> >> Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >>
> >> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> b/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> index 376b679cfc70..0291e439b6a6 100644
> >> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> @@ -33,9 +33,10 @@ patternProperties:
> >>
> >> properties:
> >> compatible:
> >> - enum:
> >> - - user-otp
> >> - - factory-otp
> >> + contains:
> >> + enum:
> >> + - user-otp
> >> + - factory-otp
> >
> > If the addition is only compatible strings, then I would just add them
> > here. Otherwise this needs to be structured a bit differently. More on
> > that below.
>
> I wanted to avoid having these compatible strings "cluttered" all around
> the various files. Esp. having a specific compatible string in a generic
> mtd.yaml. But if everyone is fine with that, I'll just move it here.
>
> >>
> >> required:
> >> - compatible
> >> diff --git
> >> a/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >> b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >> new file mode 100644
> >> index 000000000000..8c8d85fd6d27
> >> --- /dev/null
> >> +++
> >> b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >> @@ -0,0 +1,46 @@
> >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/nvmem/nvmem-transformations.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: NVMEM transformations Device Tree Bindings
> >> +
> >> +maintainers:
> >> + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> >> +
> >> +description: |
> >> + This is a list NVMEM devices which need transformations.
> >> +
> >> +properties:
> >> + compatible:
> >> + oneOf:
> >> + - items:
> >> + - enum:
> >> + - kontron,sl28-vpd
> >> + - const: user-otp
> >> + - const: user-otp
> >
> > This will be applied to any node containing 'user-otp'. You need a
> > custom 'select' to avoid that.
>
> Out of curiosity, you mean something like:
>
> select:
> compatible:
> contains:
> enum:
> - kontron,sl28-vpd
Yes, that's correct.
Rob
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 2/8] dt-bindings: nvmem: add transformation bindings
From: Rob Herring @ 2022-01-05 14:20 UTC (permalink / raw)
To: Michael Walle
Cc: MTD Maling List, devicetree, linux-kernel@vger.kernel.org,
linux-arm-kernel, netdev, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Srinivas Kandagatla, Shawn Guo, Li Yang,
Frank Rowand, David S . Miller, Jakub Kicinski, Ansuel Smith,
Andrew Lunn
In-Reply-To: <084b306b7c49ce8085dd867663945d29@walle.cc>
On Wed, Jan 5, 2022 at 2:25 AM Michael Walle <michael@walle.cc> wrote:
>
> Am 2022-01-04 16:03, schrieb Rob Herring:
> > On Tue, Dec 28, 2021 at 03:25:43PM +0100, Michael Walle wrote:
> >> Just add a simple list of the supported devices which need a nvmem
> >> transformations.
> >>
> >> Also, since the compatible string is prepended to the actual nvmem
> >> compatible string, we need to match using "contains" instead of an
> >> exact
> >> match.
> >>
> >> Signed-off-by: Michael Walle <michael@walle.cc>
> >> ---
> >> .../devicetree/bindings/mtd/mtd.yaml | 7 +--
> >> .../bindings/nvmem/nvmem-transformations.yaml | 46
> >> +++++++++++++++++++
> >> 2 files changed, 50 insertions(+), 3 deletions(-)
> >> create mode 100644
> >> Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >>
> >> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> b/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> index 376b679cfc70..0291e439b6a6 100644
> >> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> @@ -33,9 +33,10 @@ patternProperties:
> >>
> >> properties:
> >> compatible:
> >> - enum:
> >> - - user-otp
> >> - - factory-otp
> >> + contains:
> >> + enum:
> >> + - user-otp
> >> + - factory-otp
> >
> > If the addition is only compatible strings, then I would just add them
> > here. Otherwise this needs to be structured a bit differently. More on
> > that below.
>
> I wanted to avoid having these compatible strings "cluttered" all around
> the various files. Esp. having a specific compatible string in a generic
> mtd.yaml. But if everyone is fine with that, I'll just move it here.
>
> >>
> >> required:
> >> - compatible
> >> diff --git
> >> a/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >> b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >> new file mode 100644
> >> index 000000000000..8c8d85fd6d27
> >> --- /dev/null
> >> +++
> >> b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >> @@ -0,0 +1,46 @@
> >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/nvmem/nvmem-transformations.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: NVMEM transformations Device Tree Bindings
> >> +
> >> +maintainers:
> >> + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> >> +
> >> +description: |
> >> + This is a list NVMEM devices which need transformations.
> >> +
> >> +properties:
> >> + compatible:
> >> + oneOf:
> >> + - items:
> >> + - enum:
> >> + - kontron,sl28-vpd
> >> + - const: user-otp
> >> + - const: user-otp
> >
> > This will be applied to any node containing 'user-otp'. You need a
> > custom 'select' to avoid that.
>
> Out of curiosity, you mean something like:
>
> select:
> compatible:
> contains:
> enum:
> - kontron,sl28-vpd
Yes, that's correct.
Rob
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply
* Re: New repository request for platform specific Bridge IC code
From: Kumar Thangavel @ 2022-01-05 14:23 UTC (permalink / raw)
To: Ed Tanous; +Cc: OpenBMC Maillist, velumanit, patrickw3, Amithash Prasad
In-Reply-To: <CACWQX80YTyuMYozJgpLx36X_7sbwdp2O+BGCdxJQXyMPA+VjxQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3127 bytes --]
On Wed, Jan 5, 2022 at 1:20 AM Ed Tanous <ed@tanous.net> wrote:
> On Mon, Jan 3, 2022 at 11:55 PM Kumar Thangavel
> <kumarthangavel.hcl@gmail.com> wrote:
> >
> > Hi All,
> >
> > In our system, Bridge IC will act as a bridge between host and
> BMC. All the IPMI commands from the host are routed to Bridge IC and Bridge
> IC will forward those commands to BMC. Similarly, BMC will route IPMI
> commands to Bridge IC and it's forward to host.
> >
> > We wanted to put this platform specific Bridge IC related code and ipmb
> commands handling code. So, we need a new repository to add these codes or
> suggestions to add these codes in any other existing repository.
> >
> > Could you please provide your suggestions on this.
>
> There aren't a lot of details here, so it's kind of hard to make
> concrete suggestions given how short the above description is.
> Can you please put some more details in, background, links, ect
Please find the link below for the yosemiteV2 Design specification.
https://www.opencompute.org/documents/facebook-multi-node-server-platform-yosemite-v2-design-specification
Our platform is a Multi-node server platform that hosts four Open Compute
Platform (OCP) compliant One Socket (1S) server cards.
Bridge IC is connected to the BMC on each 1S server through a dedicated I2
C bus as the management interface between a 1S server and the BMC.
Those server cards are connected to BMC via bridgeIC. All the ipmb
commands from hosts are routed via bridge IC to BMC.
This bridge IC controls the ipmb communication. This is handling all the
OEM commands and that are platform specific.
We need to handle the ipmb commands for firmware update of bios/cpld and
bridge IC etc
and for some other features related to bridge IC.
Since this is a platform specific feature, we request a new repository to
have this code.
Going forward, We have Yosemite V3 and other platforms as well. We may use
this new repository for our other platforms.
> Some questions off the top of my head:
>
> 1. How does this differ from MCU sensor in the dbus-sensors repo,
> which also manages a "bridge" IC?
MCU sensors are different. bridge IC does not manage the MCU sensor.
These are oem commands. This is not linked with BMC.
> IPMBSensor also implements IPMB, how will code be reused in this new
> repository?
>
IPMB standard commands can be in IPMBSensor. Only oem commands are
handling in this
new repository.
> 2. Who is going to be the maintainer of this repository? Ideally it
> would be someone that has been a maintainer before, or someone that
> can mentor in how to be a maintainer.
>
Patrick Williams can be one of the maintainers.
3. How is this code going to be configured?
4. Where is the design doc for this new feature? How is it going to
> work, what features are going to be exposed? What new interfaces will
> be needed?
>
We need to decide to have a new repository for this feature or any other
suggestions/opinions from the community.
Will make the design document for this feature and explain all these
information in detail
>
> >
> > Thanks,
> > Kumar.
>
[-- Attachment #2: Type: text/html, Size: 5505 bytes --]
^ permalink raw reply
* [PATCH v1 24/34] docs/devel: more documentation on the use of suffixes
From: Alex Bennée @ 2022-01-05 13:49 UTC (permalink / raw)
To: qemu-devel
Cc: fam, berrange, Philippe Mathieu-Daudé, f4bug, stefanha,
crosa, pbonzini, Alex Bennée, aurelien
In-Reply-To: <20220105135009.1584676-1-alex.bennee@linaro.org>
Using _qemu is a little confusing. Let's use _compat for these sorts
of things. We should also mention _impl which is another common suffix
in the code base.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211217171902.2668674-1-alex.bennee@linaro.org>
---
v2
- use Paolo's suggested wording for _impl
---
docs/devel/style.rst | 6 ++++++
include/glib-compat.h | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/docs/devel/style.rst b/docs/devel/style.rst
index 4f770002a7..793a8d4280 100644
--- a/docs/devel/style.rst
+++ b/docs/devel/style.rst
@@ -151,6 +151,12 @@ If there are two versions of a function to be called with or without a
lock held, the function that expects the lock to be already held
usually uses the suffix ``_locked``.
+If a function is a shim designed to deal with compatibility
+workarounds we use the suffix ``_compat``. These are generally not
+called directly and aliased to the plain function name via the
+pre-processor. Another common suffix is ``_impl``; it is used for the
+concrete implementation of a function that will not be called
+directly, but rather through a macro or an inline function.
Block structure
===============
diff --git a/include/glib-compat.h b/include/glib-compat.h
index 8d01a8c01f..3113a7d2af 100644
--- a/include/glib-compat.h
+++ b/include/glib-compat.h
@@ -46,9 +46,9 @@
* int g_foo(const char *wibble)
*
* We must define a static inline function with the same signature that does
- * what we need, but with a "_qemu" suffix e.g.
+ * what we need, but with a "_compat" suffix e.g.
*
- * static inline void g_foo_qemu(const char *wibble)
+ * static inline void g_foo_compat(const char *wibble)
* {
* #if GLIB_CHECK_VERSION(X, Y, 0)
* g_foo(wibble)
@@ -61,7 +61,7 @@
* ensuring this wrapper function impl doesn't trigger the compiler warning
* about using too new glib APIs. Finally we can do
*
- * #define g_foo(a) g_foo_qemu(a)
+ * #define g_foo(a) g_foo_compat(a)
*
* So now the code elsewhere in QEMU, which *does* have the
* -Wdeprecated-declarations warning active, can call g_foo(...) as normal,
--
2.30.2
^ permalink raw reply related
* Re: [PATCH] iio: gyro: bmg160: Fix error handling in bmg160_core_probe
From: Andy Shevchenko @ 2022-01-05 13:54 UTC (permalink / raw)
To: Miaoqian Lin
Cc: Jonathan Cameron, Lars-Peter Clausen, Linus Walleij,
Alexandru Ardelean, Stephan Gerhold, Gwendal Grignou,
Adriana Reus, linux-iio, linux-kernel
In-Reply-To: <20220105125633.21989-1-linmq006@gmail.com>
On Wed, Jan 05, 2022 at 12:56:30PM +0000, Miaoqian Lin wrote:
> The pm_runtime_enable will increase power disable depth.
> If the probe fails, we should use pm_runtime_disable() to balance
> pm_runtime_enable(). In the PM Runtime docs:
> Drivers in ->remove() callback should undo the runtime PM changes done
> in ->probe(). Usually this means calling pm_runtime_disable(),
> pm_runtime_dont_use_autosuspend() etc.
> We should do this in error handling.
Looking into culprit commit, can you fix all of them, please?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH 2/8] dt-bindings: nvmem: add transformation bindings
From: Rob Herring @ 2022-01-05 14:20 UTC (permalink / raw)
To: Michael Walle
Cc: MTD Maling List, devicetree, linux-kernel@vger.kernel.org,
linux-arm-kernel, netdev, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Srinivas Kandagatla, Shawn Guo, Li Yang,
Frank Rowand, David S . Miller, Jakub Kicinski, Ansuel Smith,
Andrew Lunn
In-Reply-To: <084b306b7c49ce8085dd867663945d29@walle.cc>
On Wed, Jan 5, 2022 at 2:25 AM Michael Walle <michael@walle.cc> wrote:
>
> Am 2022-01-04 16:03, schrieb Rob Herring:
> > On Tue, Dec 28, 2021 at 03:25:43PM +0100, Michael Walle wrote:
> >> Just add a simple list of the supported devices which need a nvmem
> >> transformations.
> >>
> >> Also, since the compatible string is prepended to the actual nvmem
> >> compatible string, we need to match using "contains" instead of an
> >> exact
> >> match.
> >>
> >> Signed-off-by: Michael Walle <michael@walle.cc>
> >> ---
> >> .../devicetree/bindings/mtd/mtd.yaml | 7 +--
> >> .../bindings/nvmem/nvmem-transformations.yaml | 46
> >> +++++++++++++++++++
> >> 2 files changed, 50 insertions(+), 3 deletions(-)
> >> create mode 100644
> >> Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >>
> >> diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> b/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> index 376b679cfc70..0291e439b6a6 100644
> >> --- a/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
> >> @@ -33,9 +33,10 @@ patternProperties:
> >>
> >> properties:
> >> compatible:
> >> - enum:
> >> - - user-otp
> >> - - factory-otp
> >> + contains:
> >> + enum:
> >> + - user-otp
> >> + - factory-otp
> >
> > If the addition is only compatible strings, then I would just add them
> > here. Otherwise this needs to be structured a bit differently. More on
> > that below.
>
> I wanted to avoid having these compatible strings "cluttered" all around
> the various files. Esp. having a specific compatible string in a generic
> mtd.yaml. But if everyone is fine with that, I'll just move it here.
>
> >>
> >> required:
> >> - compatible
> >> diff --git
> >> a/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >> b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >> new file mode 100644
> >> index 000000000000..8c8d85fd6d27
> >> --- /dev/null
> >> +++
> >> b/Documentation/devicetree/bindings/nvmem/nvmem-transformations.yaml
> >> @@ -0,0 +1,46 @@
> >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/nvmem/nvmem-transformations.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: NVMEM transformations Device Tree Bindings
> >> +
> >> +maintainers:
> >> + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> >> +
> >> +description: |
> >> + This is a list NVMEM devices which need transformations.
> >> +
> >> +properties:
> >> + compatible:
> >> + oneOf:
> >> + - items:
> >> + - enum:
> >> + - kontron,sl28-vpd
> >> + - const: user-otp
> >> + - const: user-otp
> >
> > This will be applied to any node containing 'user-otp'. You need a
> > custom 'select' to avoid that.
>
> Out of curiosity, you mean something like:
>
> select:
> compatible:
> contains:
> enum:
> - kontron,sl28-vpd
Yes, that's correct.
Rob
^ permalink raw reply
* Re: [PATCH 1/4] rtnl: Add l_rtnl_route_set_gateway
From: Andrew Zaborowski @ 2022-01-05 14:20 UTC (permalink / raw)
To: ell
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
Hi Denis,
On Mon, 3 Jan 2022 at 19:54, Denis Kenzior <denkenz(a)gmail.com> wrote:
> On 1/3/22 08:18, Andrew Zaborowski wrote:
> > Allow creating prefix routes for off-link prefixes, i.e. ones that
> > should be routed through a gateway.
> > ---
> > ell/ell.sym | 1 +
> > ell/rtnl.c | 16 ++++++++++++++++
> > ell/rtnl.h | 1 +
> > 3 files changed, 18 insertions(+)
> >
>
> <snip>
>
> >
> > +LIB_EXPORT bool l_rtnl_route_set_gateway(struct l_rtnl_route *rt,
> > + const char *address)
> > +{
> > + if (unlikely(!rt))
> > + return false;
> > +
> > + switch (rt->family) {
> > + case AF_INET:
> > + return inet_pton(AF_INET, address, &rt->gw.in_addr) == 1;
> > + case AF_INET6:
> > + return inet_pton(AF_INET6, address, &rt->gw.in6_addr) == 1;
> > + default:
> > + return false;
> > + }
> > +}
> > +
>
> Since we already have l_rtnl_route_new_gateway, would this make more sense as a
> dedicated constructor? Something like l_rtnl_route_new_static?
Ok.
Best regards
^ permalink raw reply
* Re: [PATCH] iio: gyro: bmg160: Fix error handling in bmg160_core_probe
From: Andy Shevchenko @ 2022-01-05 13:52 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Miaoqian Lin, Jonathan Cameron, Lars-Peter Clausen, Linus Walleij,
Alexandru Ardelean, Stephan Gerhold, Gwendal Grignou,
Adriana Reus, linux-iio, linux-kernel
In-Reply-To: <20220105130743.00001661@Huawei.com>
On Wed, Jan 05, 2022 at 01:07:43PM +0000, Jonathan Cameron wrote:
> On Wed, 5 Jan 2022 12:56:30 +0000
> Miaoqian Lin <linmq006@gmail.com> wrote:
>
> > The pm_runtime_enable will increase power disable depth.
> > If the probe fails, we should use pm_runtime_disable() to balance
> > pm_runtime_enable(). In the PM Runtime docs:
> > Drivers in ->remove() callback should undo the runtime PM changes done
> > in ->probe(). Usually this means calling pm_runtime_disable(),
> > pm_runtime_dont_use_autosuspend() etc.
> > We should do this in error handling.
> >
> > Fixes: 7d0ead5 ("iio: Reconcile operation order between iio_register/unregister and pm functions")
>
> Hi Miaoqian,
>
> Please check this fixes tag against the format it should have.
I usually advise people to put the following in the ~/.gitconfig:
[core]
abbrev = 12
[alias]
one = show -s --pretty='format:%h (\"%s\")'
c = show -s --pretty='format:https://git.kernel.org/torvalds/c/%h'
`git one ...` will give a right thing.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* [PATCH v1 18/34] tests/docker: auto-generate alpine.docker with lcitool
From: Alex Bennée @ 2022-01-05 13:49 UTC (permalink / raw)
To: qemu-devel
Cc: fam, Thomas Huth, berrange, Beraldo Leal, Alex Bennée, f4bug,
Wainer dos Santos Moschetta, stefanha, crosa, pbonzini,
Philippe Mathieu-Daudé, aurelien
In-Reply-To: <20220105135009.1584676-1-alex.bennee@linaro.org>
From: Daniel P. Berrangé <berrange@redhat.com>
This commit is best examined using the "-b" option to diff.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211215141949.3512719-19-berrange@redhat.com>
---
tests/docker/dockerfiles/alpine.docker | 225 +++++++++++++------------
tests/lcitool/refresh | 1 +
2 files changed, 120 insertions(+), 106 deletions(-)
diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker
index 0ac30c8014..97c7a88d1f 100644
--- a/tests/docker/dockerfiles/alpine.docker
+++ b/tests/docker/dockerfiles/alpine.docker
@@ -1,109 +1,122 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+# $ lcitool dockerfile alpine-edge qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
-FROM alpine:edge
+FROM docker.io/library/alpine:edge
-RUN apk update
-RUN apk upgrade
+RUN apk update && \
+ apk upgrade && \
+ apk add \
+ alsa-lib-dev \
+ attr-dev \
+ bash \
+ bc \
+ bzip2 \
+ bzip2-dev \
+ ca-certificates \
+ capstone-dev \
+ ccache \
+ cdrkit \
+ ceph-dev \
+ clang \
+ ctags \
+ curl-dev \
+ cyrus-sasl-dev \
+ dbus \
+ diffutils \
+ dtc-dev \
+ eudev-dev \
+ findutils \
+ g++ \
+ gcc \
+ gcovr \
+ gettext \
+ git \
+ glib-dev \
+ glib-static \
+ gnutls-dev \
+ gtk+3.0-dev \
+ libaio-dev \
+ libbpf-dev \
+ libcap-ng-dev \
+ libdrm-dev \
+ libepoxy-dev \
+ libffi-dev \
+ libgcrypt-dev \
+ libjpeg-turbo-dev \
+ libnfs-dev \
+ libpng-dev \
+ libseccomp-dev \
+ libselinux-dev \
+ libslirp-dev \
+ libssh-dev \
+ libtasn1-dev \
+ liburing-dev \
+ libusb-dev \
+ libxml2-dev \
+ linux-pam-dev \
+ llvm11 \
+ lttng-ust-dev \
+ lzo-dev \
+ make \
+ mesa-dev \
+ meson \
+ multipath-tools \
+ ncurses-dev \
+ ndctl-dev \
+ net-tools \
+ nettle-dev \
+ nmap-ncat \
+ numactl-dev \
+ openssh-client \
+ pcre-dev \
+ perl \
+ perl-test-harness \
+ pixman-dev \
+ pkgconf \
+ pulseaudio-dev \
+ py3-numpy \
+ py3-pillow \
+ py3-pip \
+ py3-sphinx \
+ py3-sphinx_rtd_theme \
+ py3-virtualenv \
+ py3-yaml \
+ python3 \
+ rpm2cpio \
+ samurai \
+ sdl2-dev \
+ sdl2_image-dev \
+ sed \
+ snappy-dev \
+ sparse \
+ spice-dev \
+ spice-protocol \
+ tar \
+ tesseract-ocr \
+ texinfo \
+ usbredir-dev \
+ util-linux \
+ vde2-dev \
+ virglrenderer-dev \
+ vte3-dev \
+ which \
+ xen-dev \
+ xfsprogs-dev \
+ zlib-dev \
+ zlib-static \
+ zstd-dev && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
-# Please keep this list sorted alphabetically
-ENV PACKAGES \
- alsa-lib-dev \
- attr-dev \
- bash \
- bc \
- bzip2 \
- bzip2-dev \
- ca-certificates \
- capstone-dev \
- ccache \
- cdrkit \
- ceph-dev \
- clang \
- ctags \
- curl-dev \
- cyrus-sasl-dev \
- dbus \
- diffutils \
- dtc-dev \
- eudev-dev \
- findutils \
- g++ \
- gcc \
- gcovr \
- gettext \
- git \
- glib-dev \
- glib-static \
- gnutls-dev \
- gtk+3.0-dev \
- libaio-dev \
- libbpf-dev \
- libcap-ng-dev \
- libdrm-dev \
- libepoxy-dev \
- libffi-dev \
- libgcrypt-dev \
- libjpeg-turbo-dev \
- libnfs-dev \
- libpng-dev \
- libseccomp-dev \
- libselinux-dev \
- libslirp-dev \
- libssh-dev \
- libtasn1-dev \
- liburing-dev \
- libusb-dev \
- libxml2-dev \
- linux-pam-dev \
- llvm11 \
- lttng-ust-dev \
- lzo-dev \
- make \
- mesa-dev \
- meson \
- multipath-tools \
- ncurses-dev \
- ndctl-dev \
- net-tools \
- nettle-dev \
- nmap-ncat \
- numactl-dev \
- openssh-client \
- pcre-dev \
- perl \
- perl-test-harness \
- pixman-dev \
- pkgconf \
- pulseaudio-dev \
- py3-numpy \
- py3-pillow \
- py3-pip \
- py3-sphinx \
- py3-sphinx_rtd_theme \
- py3-virtualenv \
- py3-yaml \
- python3 \
- rpm2cpio \
- samurai \
- sdl2-dev \
- sdl2_image-dev \
- sed \
- snappy-dev \
- sparse \
- spice-dev \
- spice-protocol \
- tar \
- tesseract-ocr \
- texinfo \
- usbredir-dev \
- util-linux \
- vde2-dev \
- virglrenderer-dev \
- vte3-dev \
- which \
- xen-dev \
- xfsprogs-dev \
- zlib-dev \
- zlib-static \
- zstd-dev
-
-RUN apk add $PACKAGES
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index b8cf0a7386..033120e223 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -84,6 +84,7 @@ try:
generate_dockerfile("ubuntu2004", "ubuntu-2004",
trailer="".join(ubuntu2004_tsanhack))
generate_dockerfile("opensuse-leap", "opensuse-leap-152")
+ generate_dockerfile("alpine", "alpine-edge")
generate_cirrus("freebsd-12")
generate_cirrus("freebsd-13")
--
2.30.2
^ permalink raw reply related
* [PATCH]powerpc/xmon: Dump XIVE information for online-only processors.
From: Sachin Sant @ 2022-01-05 14:17 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Sachin Sant, clg
dxa command in XMON debugger iterates through all possible processors.
As a result, empty lines are printed even for processors which are not
online.
CPU 47:pp=00 CPPR=ff IPI=0x0040002f PQ=-- EQ idx=699 T=0 00000000 00000000
CPU 48:
CPU 49:
Restrict XIVE information(dxa) to be displayed for online processors only.
Signed-off-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
---
diff -Naurp a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
--- a/arch/powerpc/xmon/xmon.c 2022-01-05 08:52:59.480118166 -0500
+++ b/arch/powerpc/xmon/xmon.c 2022-01-05 08:56:18.469589555 -0500
@@ -2817,12 +2817,12 @@ static void dump_all_xives(void)
{
int cpu;
- if (num_possible_cpus() == 0) {
+ if (num_online_cpus() == 0) {
printf("No possible cpus, use 'dx #' to dump individual cpus\n");
return;
}
- for_each_possible_cpu(cpu)
+ for_each_online_cpu(cpu)
dump_one_xive(cpu);
}
^ permalink raw reply
* [PATCH v1 04/34] ui: avoid warnings about directdb on Alpine / musl libc
From: Alex Bennée @ 2022-01-05 13:49 UTC (permalink / raw)
To: qemu-devel
Cc: fam, berrange, Alex Bennée, f4bug, Gerd Hoffmann, stefanha,
crosa, pbonzini, Philippe Mathieu-Daudé, aurelien
In-Reply-To: <20220105135009.1584676-1-alex.bennee@linaro.org>
From: Daniel P. Berrangé <berrange@redhat.com>
On Alpine, SDL is built with directfb support and this triggers warnings
during QEMU build
In file included from /usr/include/directfb/direct/thread.h:38,
from /usr/include/directfb/direct/debug.h:43,
from /usr/include/directfb/direct/interface.h:36,
from /usr/include/directfb/directfb.h:49,
from /usr/include/SDL2/SDL_syswm.h:80,
from /builds/berrange/qemu/include/ui/sdl2.h:8,
from ../ui/sdl2-gl.c:31:
/usr/include/directfb/direct/os/waitqueue.h:41:25: error: redundant redeclaration of 'direct_waitqueue_init' [-Werror=redundant-decls]
41 | DirectResult DIRECT_API direct_waitqueue_init ( DirectWaitQueue *queue );
| ^~~~~~~~~~~~~~~~~~~~~
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211215141949.3512719-5-berrange@redhat.com>
---
include/ui/sdl2.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h
index 71bcf7ebda..8fb7e08262 100644
--- a/include/ui/sdl2.h
+++ b/include/ui/sdl2.h
@@ -5,7 +5,18 @@
#undef WIN32_LEAN_AND_MEAN
#include <SDL.h>
+
+/* with Alpine / muslc SDL headers pull in directfb headers
+ * which in turn trigger warning about redundant decls for
+ * direct_waitqueue_deinit.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
+
#include <SDL_syswm.h>
+
+#pragma GCC diagnostic pop
+
#ifdef CONFIG_SDL_IMAGE
# include <SDL_image.h>
#endif
--
2.30.2
^ permalink raw reply related
* [PATCH v1 10/34] tests/docker: auto-generate ubuntu1804.docker with lcitool
From: Alex Bennée @ 2022-01-05 13:49 UTC (permalink / raw)
To: qemu-devel
Cc: fam, Thomas Huth, berrange, Beraldo Leal, Alex Bennée, f4bug,
Wainer dos Santos Moschetta, stefanha, crosa, pbonzini,
Philippe Mathieu-Daudé, aurelien
In-Reply-To: <20220105135009.1584676-1-alex.bennee@linaro.org>
From: Daniel P. Berrangé <berrange@redhat.com>
This commit is best examined using the "-b" option to diff.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211215141949.3512719-11-berrange@redhat.com>
---
tests/docker/dockerfiles/ubuntu1804.docker | 255 ++++++++++++---------
tests/lcitool/refresh | 7 +
2 files changed, 149 insertions(+), 113 deletions(-)
diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index 450fd06d0d..0ffa3c4d4b 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -1,117 +1,146 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+# $ lcitool dockerfile ubuntu-1804 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
+
FROM docker.io/library/ubuntu:18.04
-ENV PACKAGES \
- bc \
- bsdmainutils \
- bzip2 \
- ca-certificates \
- ccache \
- clang \
- dbus \
- debianutils \
- diffutils \
- exuberant-ctags \
- findutils \
- g++ \
- gcc \
- gcovr \
- genisoimage \
- gettext \
- git \
- glusterfs-common \
- hostname \
- libaio-dev \
- libasan5 \
- libasound2-dev \
- libattr1-dev \
- libbrlapi-dev \
- libbz2-dev \
- libc6-dev \
- libcacard-dev \
- libcap-ng-dev \
- libcapstone-dev \
- libcurl4-gnutls-dev \
- libdaxctl-dev \
- libdrm-dev \
- libepoxy-dev \
- libfdt-dev \
- libffi-dev \
- libgbm-dev \
- libgcrypt20-dev \
- libglib2.0-dev \
- libgnutls28-dev \
- libgtk-3-dev \
- libibverbs-dev \
- libiscsi-dev \
- libjemalloc-dev \
- libjpeg-turbo8-dev \
- liblttng-ust-dev \
- liblzo2-dev \
- libncursesw5-dev \
- libnfs-dev \
- libnuma-dev \
- libpam0g-dev \
- libpixman-1-dev \
- libpmem-dev \
- libpng-dev \
- libpulse-dev \
- librbd-dev \
- librdmacm-dev \
- libsasl2-dev \
- libsdl2-dev \
- libsdl2-image-dev \
- libseccomp-dev \
- libselinux-dev \
- libsnappy-dev \
- libspice-protocol-dev \
- libspice-server-dev \
- libssh-dev \
- libsystemd-dev \
- libtasn1-6-dev \
- libtest-harness-perl \
- libubsan1 \
- libudev-dev \
- libusb-1.0-0-dev \
- libusbredirhost-dev \
- libvdeplug-dev \
- libvirglrenderer-dev \
- libvte-2.91-dev \
- libxen-dev \
- libxml2-dev \
- libzstd-dev \
- llvm \
- locales \
- make \
- multipath-tools \
- netcat-openbsd \
- nettle-dev \
- ninja-build \
- openssh-client \
- perl-base \
- pkgconf \
- python3 \
- python3-numpy \
- python3-opencv \
- python3-pillow \
- python3-pip \
- python3-setuptools \
- python3-sphinx \
- python3-sphinx-rtd-theme \
- python3-venv \
- python3-wheel \
- python3-yaml \
- rpm2cpio \
- sed \
- sparse \
- systemtap-sdt-dev \
- tar \
- tesseract-ocr \
- tesseract-ocr-eng \
- texinfo \
- xfslibs-dev \
- zlib1g-dev
-RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
-RUN dpkg -l $PACKAGES | sort > /packages.txt
+RUN export DEBIAN_FRONTEND=noninteractive && \
+ apt-get update && \
+ apt-get install -y eatmydata && \
+ eatmydata apt-get dist-upgrade -y && \
+ eatmydata apt-get install --no-install-recommends -y \
+ bash \
+ bc \
+ bsdmainutils \
+ bzip2 \
+ ca-certificates \
+ ccache \
+ clang \
+ dbus \
+ debianutils \
+ diffutils \
+ exuberant-ctags \
+ findutils \
+ g++ \
+ gcc \
+ gcovr \
+ genisoimage \
+ gettext \
+ git \
+ glusterfs-common \
+ hostname \
+ libaio-dev \
+ libasan5 \
+ libasound2-dev \
+ libattr1-dev \
+ libbrlapi-dev \
+ libbz2-dev \
+ libc6-dev \
+ libcacard-dev \
+ libcap-ng-dev \
+ libcapstone-dev \
+ libcurl4-gnutls-dev \
+ libdaxctl-dev \
+ libdrm-dev \
+ libepoxy-dev \
+ libfdt-dev \
+ libffi-dev \
+ libgbm-dev \
+ libgcrypt20-dev \
+ libglib2.0-dev \
+ libgnutls28-dev \
+ libgtk-3-dev \
+ libibverbs-dev \
+ libiscsi-dev \
+ libjemalloc-dev \
+ libjpeg-turbo8-dev \
+ liblttng-ust-dev \
+ liblzo2-dev \
+ libncursesw5-dev \
+ libnfs-dev \
+ libnuma-dev \
+ libpam0g-dev \
+ libpcre2-dev \
+ libpixman-1-dev \
+ libpmem-dev \
+ libpng-dev \
+ libpulse-dev \
+ librbd-dev \
+ librdmacm-dev \
+ libsasl2-dev \
+ libsdl2-dev \
+ libsdl2-image-dev \
+ libseccomp-dev \
+ libselinux1-dev \
+ libsnappy-dev \
+ libspice-protocol-dev \
+ libspice-server-dev \
+ libssh-dev \
+ libsystemd-dev \
+ libtasn1-6-dev \
+ libtest-harness-perl \
+ libubsan1 \
+ libudev-dev \
+ libusb-1.0-0-dev \
+ libusbredirhost-dev \
+ libvdeplug-dev \
+ libvirglrenderer-dev \
+ libvte-2.91-dev \
+ libxen-dev \
+ libxml2-dev \
+ libzstd-dev \
+ llvm \
+ locales \
+ make \
+ multipath-tools \
+ netcat-openbsd \
+ nettle-dev \
+ ninja-build \
+ openssh-client \
+ perl-base \
+ pkgconf \
+ python3 \
+ python3-numpy \
+ python3-opencv \
+ python3-pillow \
+ python3-pip \
+ python3-setuptools \
+ python3-sphinx \
+ python3-sphinx-rtd-theme \
+ python3-venv \
+ python3-wheel \
+ python3-yaml \
+ rpm2cpio \
+ sed \
+ sparse \
+ systemtap-sdt-dev \
+ tar \
+ tesseract-ocr \
+ tesseract-ocr-eng \
+ texinfo \
+ xfslibs-dev \
+ zlib1g-dev && \
+ eatmydata apt-get autoremove -y && \
+ eatmydata apt-get autoclean -y && \
+ sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
+ dpkg-reconfigure locales && \
+ dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+
+RUN pip3 install \
+ meson==0.56.0
+
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
# https://bugs.launchpad.net/qemu/+bug/1838763
ENV QEMU_CONFIGURE_OPTS --disable-libssh
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index d79d2b8c06..1e30674d67 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -60,9 +60,16 @@ def generate_dockerfile(host, target, cross=None, trailer=None):
cmd.extend([target, "qemu"])
generate(filename, cmd, trailer)
+ubuntu1804_skipssh = [
+ "# https://bugs.launchpad.net/qemu/+bug/1838763\n",
+ "ENV QEMU_CONFIGURE_OPTS --disable-libssh\n"
+]
+
try:
generate_dockerfile("centos8", "centos-8")
generate_dockerfile("fedora", "fedora-35")
+ generate_dockerfile("ubuntu1804", "ubuntu-1804",
+ trailer="".join(ubuntu1804_skipssh))
sys.exit(0)
except Exception as ex:
--
2.30.2
^ permalink raw reply related
* [PATCH v1 25/34] linux-user/elfload: add extra logging for hole finding
From: Alex Bennée @ 2022-01-05 13:50 UTC (permalink / raw)
To: qemu-devel
Cc: fam, berrange, f4bug, Laurent Vivier, stefanha, crosa, pbonzini,
Alex Bennée, aurelien
In-Reply-To: <20220105135009.1584676-1-alex.bennee@linaro.org>
The various approaches to finding memory holes are quite complicated
to follow especially at a distance. Improve the logging so we can see
exactly what method found the space for the guest memory.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
linux-user/elfload.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 767f54c76d..238979b8b6 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -2221,6 +2221,9 @@ static void pgb_have_guest_base(const char *image_name, abi_ulong guest_loaddr,
if (test != addr) {
pgb_fail_in_use(image_name);
}
+ qemu_log_mask(CPU_LOG_PAGE,
+ "%s: base @ %p for " TARGET_ABI_FMT_ld " bytes\n",
+ __func__, addr, guest_hiaddr - guest_loaddr);
}
/**
@@ -2263,6 +2266,9 @@ static uintptr_t pgd_find_hole_fallback(uintptr_t guest_size, uintptr_t brk,
if (mmap_start != MAP_FAILED) {
munmap(mmap_start, guest_size);
if (mmap_start == (void *) align_start) {
+ qemu_log_mask(CPU_LOG_PAGE,
+ "%s: base @ %p for %" PRIdPTR" bytes\n",
+ __func__, mmap_start + offset, guest_size);
return (uintptr_t) mmap_start + offset;
}
}
@@ -2342,6 +2348,12 @@ static uintptr_t pgb_find_hole(uintptr_t guest_loaddr, uintptr_t guest_size,
}
free_self_maps(maps);
+ if (ret != -1) {
+ qemu_log_mask(CPU_LOG_PAGE, "%s: base @ %" PRIxPTR
+ " for %" PRIdPTR " bytes\n",
+ __func__, ret, guest_size);
+ }
+
return ret;
}
@@ -2391,6 +2403,9 @@ static void pgb_static(const char *image_name, abi_ulong orig_loaddr,
}
guest_base = addr;
+
+ qemu_log_mask(CPU_LOG_PAGE, "%s: base @ %"PRIxPTR" for %" PRIdPTR" bytes\n",
+ __func__, addr, hiaddr - loaddr);
}
static void pgb_dynamic(const char *image_name, long align)
@@ -2447,6 +2462,9 @@ static void pgb_reserved_va(const char *image_name, abi_ulong guest_loaddr,
"using -R option)", reserved_va, test, strerror(errno));
exit(EXIT_FAILURE);
}
+
+ qemu_log_mask(CPU_LOG_PAGE, "%s: base @ %p for %ld bytes\n",
+ __func__, addr, reserved_va);
}
void probe_guest_base(const char *image_name, abi_ulong guest_loaddr,
--
2.30.2
^ permalink raw reply related
* Re: [PATCH 19/26] x86/tdx: Make pages shared in ioremap()
From: Tom Lendacky @ 2022-01-05 14:16 UTC (permalink / raw)
To: Dave Hansen, Kirill A. Shutemov
Cc: Borislav Petkov, Kirill A. Shutemov, tglx, mingo, luto, peterz,
sathyanarayanan.kuppuswamy, aarcange, ak, dan.j.williams, david,
hpa, jgross, jmattson, joro, jpoimboe, knsathya, pbonzini, sdeep,
seanjc, tony.luck, vkuznets, wanpengli, x86, linux-kernel
In-Reply-To: <50dfa0db-fcd1-3c54-d982-237d2c9df431@intel.com>
On 1/4/22 6:43 PM, Dave Hansen wrote:
> On 1/4/22 4:31 PM, Kirill A. Shutemov wrote:
>> On Tue, Jan 04, 2022 at 12:36:06PM -0800, Dave Hansen wrote:
>>> @@ -57,7 +58,6 @@ typedef struct { unsigned long iopte; }
>>> typedef struct { unsigned long pmd; } pmd_t;
>>> typedef struct { unsigned long pgd; } pgd_t;
>>> typedef struct { unsigned long ctxd; } ctxd_t;
>>> -typedef struct { unsigned long pgprot; } pgprot_t;
>>> typedef struct { unsigned long iopgprot; } iopgprot_t;
>>>
>>> #define pte_val(x) ((x).pte)
>>> @@ -85,7 +85,6 @@ typedef unsigned long iopte_t;
>>> typedef unsigned long pmd_t;
>>> typedef unsigned long pgd_t;
>>> typedef unsigned long ctxd_t;
>>> -typedef unsigned long pgprot_t;
>>> typedef unsigned long iopgprot_t;
>>>
>>> #define pte_val(x) (x)
>>
>> Any arch that use STRICT_MM_TYPECHECKS hacks will get broken if compiled
>> without the define (as sparc by default).
>
> My read of STRICT_MM_TYPECHECKS was that "typedef unsigned long
> pgprot_t" produces better code, but "typedef struct { unsigned long
> pgprot; } pgprot_t;" produces better type checking.
>
> I just compiled these patches on sparc with no issues.
>
> ...
>> Is it the way to go we want?
>
> I _think_ this was all a result of some review feedback from Tom
> Lendacky about where the encryption-modifying pgprot helpers got placed
> in the code. I don't feel strongly about it, but I'm not quite sure
> that this is worth the trouble.
>
> I'd be curious what Tom thinks now that he's gotten a peek at what it's
> going to take to address his concerns.
I have vague memories of pgprot_t and what a pain it could be, which is
why my feedback suggested putting it in cc_platform.c, but said there
might be issues :)
I'm fine with it living somewhere else, just thought it would be nice to
have everything consolidated, if possible.
Thanks,
Tom
>
^ permalink raw reply
* Re: [RFC PATCH 1/3] mm/memcg: Protect per-CPU counter by disabling preemption on PREEMPT_RT
From: Michal Koutný @ 2022-01-05 14:16 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: cgroups, linux-mm, Johannes Weiner, Michal Hocko,
Vladimir Davydov, Andrew Morton, Thomas Gleixner, Waiman Long,
Peter Zijlstra
In-Reply-To: <20211222114111.2206248-2-bigeasy@linutronix.de>
On Wed, Dec 22, 2021 at 12:41:09PM +0100, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> The sections with disabled preemption must exclude
> memcg_check_events() so that spinlock_t locks can still be acquired
> (for instance in eventfd_signal()).
The resulting construct in uncharge_batch() raises eybrows. If you can decouple
per-cpu updates from memcg_check_events() on PREEMPT_RT, why not tackle
it the same way on !PREEMPT_RT too (and have just one variant of the
block)?
(Actually, it doesn't seem to me that memcg_check_events() can be
extracted like this from the preempt disabled block since
mem_cgroup_event_ratelimit() relies on similar RMW pattern.
Things would be simpler if PREEMPT_RT didn't allow the threshold event
handlers (akin to Michal Hocko's suggestion of rejecting soft limit).)
Thanks,
Michal
^ permalink raw reply
* Re: [RFC PATCH 1/3] mm/memcg: Protect per-CPU counter by disabling preemption on PREEMPT_RT
From: Michal Koutný @ 2022-01-05 14:16 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
Johannes Weiner, Michal Hocko, Vladimir Davydov, Andrew Morton,
Thomas Gleixner, Waiman Long, Peter Zijlstra
In-Reply-To: <20211222114111.2206248-2-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
On Wed, Dec 22, 2021 at 12:41:09PM +0100, Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> wrote:
> The sections with disabled preemption must exclude
> memcg_check_events() so that spinlock_t locks can still be acquired
> (for instance in eventfd_signal()).
The resulting construct in uncharge_batch() raises eybrows. If you can decouple
per-cpu updates from memcg_check_events() on PREEMPT_RT, why not tackle
it the same way on !PREEMPT_RT too (and have just one variant of the
block)?
(Actually, it doesn't seem to me that memcg_check_events() can be
extracted like this from the preempt disabled block since
mem_cgroup_event_ratelimit() relies on similar RMW pattern.
Things would be simpler if PREEMPT_RT didn't allow the threshold event
handlers (akin to Michal Hocko's suggestion of rejecting soft limit).)
Thanks,
Michal
^ permalink raw reply
* Re: [PATCH] phy: ti: Add missing pm_runtime_disable() in probe function
From: kernel test robot @ 2022-01-05 14:16 UTC (permalink / raw)
To: kbuild-all
In-Reply-To: <20220105090225.20507-1-linmq006@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5137 bytes --]
Hi Miaoqian,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc8 next-20220105]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Miaoqian-Lin/phy-ti-Add-missing-pm_runtime_disable-in-probe-function/20220105-170334
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c9e6606c7fe92b50a02ce51dda82586ebdf99b48
config: riscv-randconfig-r013-20220105 (https://download.01.org/0day-ci/archive/20220105/202201052240.Rjl0xRWG-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/dc404b65a54364bb2937baba85bb37960c514167
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Miaoqian-Lin/phy-ti-Add-missing-pm_runtime_disable-in-probe-function/20220105-170334
git checkout dc404b65a54364bb2937baba85bb37960c514167
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/phy/ti/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/phy/ti/phy-am654-serdes.c:841:1: warning: unused label 'err_pm_disable' [-Wunused-label]
err_pm_disable:
^~~~~~~~~~~~~~~
1 warning generated.
vim +/err_pm_disable +841 drivers/phy/ti/phy-am654-serdes.c
751
752 static int serdes_am654_probe(struct platform_device *pdev)
753 {
754 struct phy_provider *phy_provider;
755 struct device *dev = &pdev->dev;
756 struct device_node *node = dev->of_node;
757 struct clk_onecell_data *clk_data;
758 struct serdes_am654 *am654_phy;
759 struct mux_control *control;
760 const char *clock_name;
761 struct regmap *regmap;
762 void __iomem *base;
763 struct phy *phy;
764 int ret;
765 int i;
766
767 am654_phy = devm_kzalloc(dev, sizeof(*am654_phy), GFP_KERNEL);
768 if (!am654_phy)
769 return -ENOMEM;
770
771 base = devm_platform_ioremap_resource(pdev, 0);
772 if (IS_ERR(base))
773 return PTR_ERR(base);
774
775 regmap = devm_regmap_init_mmio(dev, base, &serdes_am654_regmap_config);
776 if (IS_ERR(regmap)) {
777 dev_err(dev, "Failed to initialize regmap\n");
778 return PTR_ERR(regmap);
779 }
780
781 control = devm_mux_control_get(dev, NULL);
782 if (IS_ERR(control))
783 return PTR_ERR(control);
784
785 am654_phy->dev = dev;
786 am654_phy->of_node = node;
787 am654_phy->regmap = regmap;
788 am654_phy->control = control;
789 am654_phy->type = PHY_NONE;
790
791 ret = serdes_am654_regfield_init(am654_phy);
792 if (ret) {
793 dev_err(dev, "Failed to initialize regfields\n");
794 return ret;
795 }
796
797 platform_set_drvdata(pdev, am654_phy);
798
799 for (i = 0; i < SERDES_NUM_CLOCKS; i++) {
800 ret = of_property_read_string_index(node, "clock-output-names",
801 i, &clock_name);
802 if (ret) {
803 dev_err(dev, "Failed to get clock name\n");
804 return ret;
805 }
806
807 ret = serdes_am654_clk_register(am654_phy, clock_name, i);
808 if (ret) {
809 dev_err(dev, "Failed to initialize clock %s\n",
810 clock_name);
811 return ret;
812 }
813 }
814
815 clk_data = &am654_phy->clk_data;
816 clk_data->clks = am654_phy->clks;
817 clk_data->clk_num = SERDES_NUM_CLOCKS;
818 ret = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
819 if (ret)
820 return ret;
821
822 pm_runtime_enable(dev);
823
824 phy = devm_phy_create(dev, NULL, &ops);
825 if (IS_ERR(phy)) {
826 ret = PTR_ERR(phy);
827 goto clk_err;
828 }
829
830 phy_set_drvdata(phy, am654_phy);
831 phy_provider = devm_of_phy_provider_register(dev, serdes_am654_xlate);
832 if (IS_ERR(phy_provider)) {
833 ret = PTR_ERR(phy_provider);
834 goto clk_err;
835 }
836
837 return 0;
838
839 clk_err:
840 of_clk_del_provider(node);
> 841 err_pm_disable:
842 pm_runtime_disable(dev);
843 return ret;
844 }
845
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply
* Re: [PATCH] PCI: iproc: Set all 24 bits of PCI class code
From: kernel test robot @ 2022-01-05 14:16 UTC (permalink / raw)
To: kbuild-all
In-Reply-To: <20220105093552.27542-1-pali@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 5176 bytes --]
Hi "Pali,
I love your patch! Yet something to improve:
[auto build test ERROR on helgaas-pci/next]
[also build test ERROR on v5.16-rc8 next-20220105]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Pali-Roh-r/PCI-iproc-Set-all-24-bits-of-PCI-class-code/20220105-173704
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: arm-randconfig-c002-20220105 (https://download.01.org/0day-ci/archive/20220105/202201052225.XMsg2fG3-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/8ef1acfb84c08a0331930f9a60884fdd6d7c5e88
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pali-Roh-r/PCI-iproc-Set-all-24-bits-of-PCI-class-code/20220105-173704
git checkout 8ef1acfb84c08a0331930f9a60884fdd6d7c5e88
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/pci/controller/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/pci/controller/pcie-iproc.c: In function 'iproc_pcie_check_link':
>> drivers/pci/controller/pcie-iproc.c:798:18: error: 'PCI_CLASS_BRIDGE_PCI_NORMAL' undeclared (first use in this function); did you mean 'PCI_CLASS_BRIDGE_PCMCIA'?
798 | class |= PCI_CLASS_BRIDGE_PCI_NORMAL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| PCI_CLASS_BRIDGE_PCMCIA
drivers/pci/controller/pcie-iproc.c:798:18: note: each undeclared identifier is reported only once for each function it appears in
vim +798 drivers/pci/controller/pcie-iproc.c
765
766 static int iproc_pcie_check_link(struct iproc_pcie *pcie)
767 {
768 struct device *dev = pcie->dev;
769 u32 hdr_type, link_ctrl, link_status, class, val;
770 bool link_is_active = false;
771
772 /*
773 * PAXC connects to emulated endpoint devices directly and does not
774 * have a Serdes. Therefore skip the link detection logic here.
775 */
776 if (pcie->ep_is_internal)
777 return 0;
778
779 val = iproc_pcie_read_reg(pcie, IPROC_PCIE_LINK_STATUS);
780 if (!(val & PCIE_PHYLINKUP) || !(val & PCIE_DL_ACTIVE)) {
781 dev_err(dev, "PHY or data link is INACTIVE!\n");
782 return -ENODEV;
783 }
784
785 /* make sure we are not in EP mode */
786 iproc_pci_raw_config_read32(pcie, 0, PCI_HEADER_TYPE, 1, &hdr_type);
787 if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE) {
788 dev_err(dev, "in EP mode, hdr=%#02x\n", hdr_type);
789 return -EFAULT;
790 }
791
792 /* force class to PCI_CLASS_BRIDGE_PCI_NORMAL (0x060400) */
793 #define PCI_BRIDGE_CTRL_REG_OFFSET 0x43c
794 #define PCI_BRIDGE_CTRL_REG_CLASS_MASK 0xffffff
795 iproc_pci_raw_config_read32(pcie, 0, PCI_BRIDGE_CTRL_REG_OFFSET,
796 4, &class);
797 class &= ~PCI_BRIDGE_CTRL_REG_CLASS_MASK;
> 798 class |= PCI_CLASS_BRIDGE_PCI_NORMAL;
799 iproc_pci_raw_config_write32(pcie, 0, PCI_BRIDGE_CTRL_REG_OFFSET,
800 4, class);
801
802 /* check link status to see if link is active */
803 iproc_pci_raw_config_read32(pcie, 0, IPROC_PCI_EXP_CAP + PCI_EXP_LNKSTA,
804 2, &link_status);
805 if (link_status & PCI_EXP_LNKSTA_NLW)
806 link_is_active = true;
807
808 if (!link_is_active) {
809 /* try GEN 1 link speed */
810 #define PCI_TARGET_LINK_SPEED_MASK 0xf
811 #define PCI_TARGET_LINK_SPEED_GEN2 0x2
812 #define PCI_TARGET_LINK_SPEED_GEN1 0x1
813 iproc_pci_raw_config_read32(pcie, 0,
814 IPROC_PCI_EXP_CAP + PCI_EXP_LNKCTL2,
815 4, &link_ctrl);
816 if ((link_ctrl & PCI_TARGET_LINK_SPEED_MASK) ==
817 PCI_TARGET_LINK_SPEED_GEN2) {
818 link_ctrl &= ~PCI_TARGET_LINK_SPEED_MASK;
819 link_ctrl |= PCI_TARGET_LINK_SPEED_GEN1;
820 iproc_pci_raw_config_write32(pcie, 0,
821 IPROC_PCI_EXP_CAP + PCI_EXP_LNKCTL2,
822 4, link_ctrl);
823 msleep(100);
824
825 iproc_pci_raw_config_read32(pcie, 0,
826 IPROC_PCI_EXP_CAP + PCI_EXP_LNKSTA,
827 2, &link_status);
828 if (link_status & PCI_EXP_LNKSTA_NLW)
829 link_is_active = true;
830 }
831 }
832
833 dev_info(dev, "link: %s\n", link_is_active ? "UP" : "DOWN");
834
835 return link_is_active ? 0 : -ENODEV;
836 }
837
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply
* [PATCH v1 14/34] .gitlab-ci.d/cirrus: auto-generate variables with lcitool
From: Alex Bennée @ 2022-01-05 13:49 UTC (permalink / raw)
To: qemu-devel
Cc: fam, Thomas Huth, berrange, Beraldo Leal, Alex Bennée, f4bug,
Wainer dos Santos Moschetta, stefanha, crosa, pbonzini,
Philippe Mathieu-Daudé, aurelien
In-Reply-To: <20220105135009.1584676-1-alex.bennee@linaro.org>
From: Daniel P. Berrangé <berrange@redhat.com>
The current Cirrus CI variables files were previously generated by using
lcitool. This change wires them up to the refresh script to make that
link explicit.
This changes the package list because libvirt-ci now knows about the
mapping for dtc on FreeBSD and macOS platforms.
The variables are also now emit in sorted order for stability across
runs.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20211215141949.3512719-15-berrange@redhat.com>
---
.gitlab-ci.d/cirrus/freebsd-12.vars | 11 +++++++----
.gitlab-ci.d/cirrus/freebsd-13.vars | 11 +++++++----
.gitlab-ci.d/cirrus/macos-11.vars | 11 ++++++-----
tests/lcitool/refresh | 10 ++++++++++
4 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/freebsd-12.vars
index 2099b21354..9c52266811 100644
--- a/.gitlab-ci.d/cirrus/freebsd-12.vars
+++ b/.gitlab-ci.d/cirrus/freebsd-12.vars
@@ -2,12 +2,15 @@
#
# $ lcitool variables freebsd-12 qemu
#
-# https://gitlab.com/libvirt/libvirt-ci/-/commit/c7e275ab27ac0dcd09da290817b9adeea1fd1eb1
+# https://gitlab.com/libvirt/libvirt-ci
-PACKAGING_COMMAND='pkg'
CCACHE='/usr/local/bin/ccache'
+CPAN_PKGS=''
+CROSS_PKGS=''
MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
-PYTHON='/usr/local/bin/python3'
+PACKAGING_COMMAND='pkg'
PIP3='/usr/local/bin/pip-3.8'
-PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PYPI_PKGS=''
+PYTHON='/usr/local/bin/python3'
diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/freebsd-13.vars
index 323fe806d5..7b44dba324 100644
--- a/.gitlab-ci.d/cirrus/freebsd-13.vars
+++ b/.gitlab-ci.d/cirrus/freebsd-13.vars
@@ -2,12 +2,15 @@
#
# $ lcitool variables freebsd-13 qemu
#
-# https://gitlab.com/libvirt/libvirt-ci/-/commit/c7e275ab27ac0dcd09da290817b9adeea1fd1eb1
+# https://gitlab.com/libvirt/libvirt-ci
-PACKAGING_COMMAND='pkg'
CCACHE='/usr/local/bin/ccache'
+CPAN_PKGS=''
+CROSS_PKGS=''
MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
-PYTHON='/usr/local/bin/python3'
+PACKAGING_COMMAND='pkg'
PIP3='/usr/local/bin/pip-3.8'
-PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils dtc gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PYPI_PKGS=''
+PYTHON='/usr/local/bin/python3'
diff --git a/.gitlab-ci.d/cirrus/macos-11.vars b/.gitlab-ci.d/cirrus/macos-11.vars
index cbec8a44a3..613d1373c2 100644
--- a/.gitlab-ci.d/cirrus/macos-11.vars
+++ b/.gitlab-ci.d/cirrus/macos-11.vars
@@ -2,14 +2,15 @@
#
# $ lcitool variables macos-11 qemu
#
-# https://gitlab.com/libvirt/libvirt-ci/-/commit/c7e275ab27ac0dcd09da290817b9adeea1fd1eb1
+# https://gitlab.com/libvirt/libvirt-ci
-PACKAGING_COMMAND='brew'
CCACHE='/usr/local/bin/ccache'
+CPAN_PKGS='Test::Harness'
+CROSS_PKGS=''
MAKE='/usr/local/bin/gmake'
NINJA='/usr/local/bin/ninja'
-PYTHON='/usr/local/bin/python3'
+PACKAGING_COMMAND='brew'
PIP3='/usr/local/bin/pip3'
-PKGS='bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb libxml2 llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd'
+PKGS='bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils dtc gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb libxml2 llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd'
PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv'
-CPAN_PKGS='Test::Harness'
+PYTHON='/usr/local/bin/python3'
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index b8a69cee59..b8cf0a7386 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -60,6 +60,11 @@ def generate_dockerfile(host, target, cross=None, trailer=None):
cmd.extend([target, "qemu"])
generate(filename, cmd, trailer)
+def generate_cirrus(target, trailer=None):
+ filename = Path(src_dir, ".gitlab-ci.d", "cirrus", target + ".vars")
+ cmd = [lcitool_path, "variables", target, "qemu"]
+ generate(filename, cmd, trailer)
+
ubuntu1804_skipssh = [
"# https://bugs.launchpad.net/qemu/+bug/1838763\n",
"ENV QEMU_CONFIGURE_OPTS --disable-libssh\n"
@@ -79,6 +84,11 @@ try:
generate_dockerfile("ubuntu2004", "ubuntu-2004",
trailer="".join(ubuntu2004_tsanhack))
generate_dockerfile("opensuse-leap", "opensuse-leap-152")
+
+ generate_cirrus("freebsd-12")
+ generate_cirrus("freebsd-13")
+ generate_cirrus("macos-11")
+
sys.exit(0)
except Exception as ex:
print(str(ex), file=sys.stderr)
--
2.30.2
^ permalink raw reply related
* Re: [PATCH RFT] net: asix: add proper error handling of usb read errors
From: Oleksij Rempel @ 2022-01-05 14:15 UTC (permalink / raw)
To: Pavel Skripkin
Cc: davem, kuba, linux, andrew, oneukum, robert.foss, freddy,
linux-usb, netdev, linux-kernel, syzbot+6ca9f7867b77c2d316ac
In-Reply-To: <20220105131952.15693-1-paskripkin@gmail.com>
On Wed, Jan 05, 2022 at 04:19:52PM +0300, Pavel Skripkin wrote:
> Syzbot once again hit uninit value in asix driver. The problem still the
> same -- asix_read_cmd() reads less bytes, than was requested by caller.
>
> Since all read requests are performed via asix_read_cmd() let's catch
> usb related error there and add __must_check notation to be sure all
> callers actually check return value.
>
> So, this patch adds sanity check inside asix_read_cmd(), that simply
> checks if bytes read are not less, than was requested and adds missing
> error handling of asix_read_cmd() all across the driver code.
>
> Fixes: d9fe64e51114 ("net: asix: Add in_pm parameter")
> Reported-and-tested-by: syzbot+6ca9f7867b77c2d316ac@syzkaller.appspotmail.com
> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Thank you!
> ---
> drivers/net/usb/asix.h | 4 ++--
> drivers/net/usb/asix_common.c | 19 +++++++++++++------
> drivers/net/usb/asix_devices.c | 21 ++++++++++++++++++---
> 3 files changed, 33 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/usb/asix.h b/drivers/net/usb/asix.h
> index 2a1e31defe71..4334aafab59a 100644
> --- a/drivers/net/usb/asix.h
> +++ b/drivers/net/usb/asix.h
> @@ -192,8 +192,8 @@ extern const struct driver_info ax88172a_info;
> /* ASIX specific flags */
> #define FLAG_EEPROM_MAC (1UL << 0) /* init device MAC from eeprom */
>
> -int asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
> - u16 size, void *data, int in_pm);
> +int __must_check asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
> + u16 size, void *data, int in_pm);
>
> int asix_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
> u16 size, void *data, int in_pm);
> diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
> index 71682970be58..524805285019 100644
> --- a/drivers/net/usb/asix_common.c
> +++ b/drivers/net/usb/asix_common.c
> @@ -11,8 +11,8 @@
>
> #define AX_HOST_EN_RETRIES 30
>
> -int asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
> - u16 size, void *data, int in_pm)
> +int __must_check asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
> + u16 size, void *data, int in_pm)
> {
> int ret;
> int (*fn)(struct usbnet *, u8, u8, u16, u16, void *, u16);
> @@ -27,9 +27,12 @@ int asix_read_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
> ret = fn(dev, cmd, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
> value, index, data, size);
>
> - if (unlikely(ret < 0))
> + if (unlikely(ret < size)) {
> + ret = ret < 0 ? ret : -ENODATA;
> +
> netdev_warn(dev->net, "Failed to read reg index 0x%04x: %d\n",
> index, ret);
> + }
>
> return ret;
> }
> @@ -79,7 +82,7 @@ static int asix_check_host_enable(struct usbnet *dev, int in_pm)
> 0, 0, 1, &smsr, in_pm);
> if (ret == -ENODEV)
> break;
> - else if (ret < sizeof(smsr))
> + else if (ret < 0)
> continue;
> else if (smsr & AX_HOST_EN)
> break;
> @@ -579,8 +582,12 @@ int asix_mdio_read_nopm(struct net_device *netdev, int phy_id, int loc)
> return ret;
> }
>
> - asix_read_cmd(dev, AX_CMD_READ_MII_REG, phy_id,
> - (__u16)loc, 2, &res, 1);
> + ret = asix_read_cmd(dev, AX_CMD_READ_MII_REG, phy_id,
> + (__u16)loc, 2, &res, 1);
> + if (ret < 0) {
> + mutex_unlock(&dev->phy_mutex);
> + return ret;
> + }
> asix_set_hw_mii(dev, 1);
> mutex_unlock(&dev->phy_mutex);
>
> diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
> index 4514d35ef4c4..6b2fbdf4e0fd 100644
> --- a/drivers/net/usb/asix_devices.c
> +++ b/drivers/net/usb/asix_devices.c
> @@ -755,7 +755,12 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
> priv->phy_addr = ret;
> priv->embd_phy = ((priv->phy_addr & 0x1f) == 0x10);
>
> - asix_read_cmd(dev, AX_CMD_STATMNGSTS_REG, 0, 0, 1, &chipcode, 0);
> + ret = asix_read_cmd(dev, AX_CMD_STATMNGSTS_REG, 0, 0, 1, &chipcode, 0);
> + if (ret < 0) {
> + netdev_dbg(dev->net, "Failed to read STATMNGSTS_REG: %d\n", ret);
> + return ret;
> + }
> +
> chipcode &= AX_CHIPCODE_MASK;
>
> ret = (chipcode == AX_AX88772_CHIPCODE) ? ax88772_hw_reset(dev, 0) :
> @@ -920,11 +925,21 @@ static int ax88178_reset(struct usbnet *dev)
> int gpio0 = 0;
> u32 phyid;
>
> - asix_read_cmd(dev, AX_CMD_READ_GPIOS, 0, 0, 1, &status, 0);
> + ret = asix_read_cmd(dev, AX_CMD_READ_GPIOS, 0, 0, 1, &status, 0);
> + if (ret < 0) {
> + netdev_dbg(dev->net, "Failed to read GPIOS: %d\n", ret);
> + return ret;
> + }
> +
> netdev_dbg(dev->net, "GPIO Status: 0x%04x\n", status);
>
> asix_write_cmd(dev, AX_CMD_WRITE_ENABLE, 0, 0, 0, NULL, 0);
> - asix_read_cmd(dev, AX_CMD_READ_EEPROM, 0x0017, 0, 2, &eeprom, 0);
> + ret = asix_read_cmd(dev, AX_CMD_READ_EEPROM, 0x0017, 0, 2, &eeprom, 0);
> + if (ret < 0) {
> + netdev_dbg(dev->net, "Failed to read EEPROM: %d\n", ret);
> + return ret;
> + }
> +
> asix_write_cmd(dev, AX_CMD_WRITE_DISABLE, 0, 0, 0, NULL, 0);
>
> netdev_dbg(dev->net, "EEPROM index 0x17 is 0x%04x\n", eeprom);
> --
> 2.34.1
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* Re: [PATCH V4 10/20] xfsprogs: Introduce XFS_DIFLAG2_NREXT64 and associated helpers
From: Chandan Babu R @ 2022-01-05 14:15 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs, david
In-Reply-To: <20220105010824.GA656707@magnolia>
On 05 Jan 2022 at 06:38, Darrick J. Wong wrote:
> On Tue, Dec 14, 2021 at 02:18:01PM +0530, Chandan Babu R wrote:
>> This commit adds the new per-inode flag XFS_DIFLAG2_NREXT64 to indicate that
>> an inode supports 64-bit extent counters. This flag is also enabled by default
>> on newly created inodes when the corresponding filesystem has large extent
>> counter feature bit (i.e. XFS_FEAT_NREXT64) set.
>>
>> Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
>> ---
>> db/inode.c | 3 +++
>> include/xfs_inode.h | 5 +++++
>> libxfs/xfs_format.h | 10 +++++++++-
>> libxfs/xfs_ialloc.c | 2 ++
>> 4 files changed, 19 insertions(+), 1 deletion(-)
>>
>> diff --git a/db/inode.c b/db/inode.c
>> index 9afa6426..b1f92d36 100644
>> --- a/db/inode.c
>> +++ b/db/inode.c
>> @@ -178,6 +178,9 @@ const field_t inode_v3_flds[] = {
>> { "bigtime", FLDT_UINT1,
>> OI(COFF(flags2) + bitsz(uint64_t) - XFS_DIFLAG2_BIGTIME_BIT - 1), C1,
>> 0, TYP_NONE },
>> + { "nrext64", FLDT_UINT1,
>> + OI(COFF(flags2) + bitsz(uint64_t) - XFS_DIFLAG2_NREXT64_BIT-1), C1,
>
> Nit: spaces around the '-' operator.
>
Ok. I will fix that.
> --D
>
>> + 0, TYP_NONE },
>> { NULL }
>> };
>>
>> diff --git a/include/xfs_inode.h b/include/xfs_inode.h
>> index 08a62d83..79a5c526 100644
>> --- a/include/xfs_inode.h
>> +++ b/include/xfs_inode.h
>> @@ -164,6 +164,11 @@ static inline bool xfs_inode_has_bigtime(struct xfs_inode *ip)
>> return ip->i_diflags2 & XFS_DIFLAG2_BIGTIME;
>> }
>>
>> +static inline bool xfs_inode_has_nrext64(struct xfs_inode *ip)
>> +{
>> + return ip->i_diflags2 & XFS_DIFLAG2_NREXT64;
>> +}
>> +
>> typedef struct cred {
>> uid_t cr_uid;
>> gid_t cr_gid;
>> diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h
>> index 23ecbc7d..58186f2b 100644
>> --- a/libxfs/xfs_format.h
>> +++ b/libxfs/xfs_format.h
>> @@ -1180,15 +1180,17 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev)
>> #define XFS_DIFLAG2_REFLINK_BIT 1 /* file's blocks may be shared */
>> #define XFS_DIFLAG2_COWEXTSIZE_BIT 2 /* copy on write extent size hint */
>> #define XFS_DIFLAG2_BIGTIME_BIT 3 /* big timestamps */
>> +#define XFS_DIFLAG2_NREXT64_BIT 4 /* 64-bit extent counter enabled */
>>
>> #define XFS_DIFLAG2_DAX (1 << XFS_DIFLAG2_DAX_BIT)
>> #define XFS_DIFLAG2_REFLINK (1 << XFS_DIFLAG2_REFLINK_BIT)
>> #define XFS_DIFLAG2_COWEXTSIZE (1 << XFS_DIFLAG2_COWEXTSIZE_BIT)
>> #define XFS_DIFLAG2_BIGTIME (1 << XFS_DIFLAG2_BIGTIME_BIT)
>> +#define XFS_DIFLAG2_NREXT64 (1 << XFS_DIFLAG2_NREXT64_BIT)
>>
>> #define XFS_DIFLAG2_ANY \
>> (XFS_DIFLAG2_DAX | XFS_DIFLAG2_REFLINK | XFS_DIFLAG2_COWEXTSIZE | \
>> - XFS_DIFLAG2_BIGTIME)
>> + XFS_DIFLAG2_BIGTIME | XFS_DIFLAG2_NREXT64)
>>
>> static inline bool xfs_dinode_has_bigtime(const struct xfs_dinode *dip)
>> {
>> @@ -1196,6 +1198,12 @@ static inline bool xfs_dinode_has_bigtime(const struct xfs_dinode *dip)
>> (dip->di_flags2 & cpu_to_be64(XFS_DIFLAG2_BIGTIME));
>> }
>>
>> +static inline bool xfs_dinode_has_nrext64(const struct xfs_dinode *dip)
>> +{
>> + return dip->di_version >= 3 &&
>> + (dip->di_flags2 & cpu_to_be64(XFS_DIFLAG2_NREXT64));
>> +}
>> +
>> /*
>> * Inode number format:
>> * low inopblog bits - offset in block
>> diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c
>> index 570349b8..77501317 100644
>> --- a/libxfs/xfs_ialloc.c
>> +++ b/libxfs/xfs_ialloc.c
>> @@ -2770,6 +2770,8 @@ xfs_ialloc_setup_geometry(
>> igeo->new_diflags2 = 0;
>> if (xfs_sb_version_hasbigtime(&mp->m_sb))
>> igeo->new_diflags2 |= XFS_DIFLAG2_BIGTIME;
>> + if (xfs_sb_version_hasnrext64(&mp->m_sb))
>> + igeo->new_diflags2 |= XFS_DIFLAG2_NREXT64;
>>
>> /* Compute inode btree geometry. */
>> igeo->agino_log = sbp->sb_inopblog + sbp->sb_agblklog;
>> --
>> 2.30.2
>>
--
chandan
^ permalink raw reply
* Re: [PATCH dt + pci 1/2] dt-bindings: Add 'slot-power-limit-milliwatt' PCIe port property
From: Marek Behún @ 2022-01-05 14:14 UTC (permalink / raw)
To: Rob Herring; +Cc: devicetree, linux-pci, Bjorn Helgaas, Pali Rohár
In-Reply-To: <YY6HYM4T+A+tm85P@robh.at.kernel.org>
On Fri, 12 Nov 2021 09:25:20 -0600
Rob Herring <robh@kernel.org> wrote:
> On Sun, Oct 31, 2021 at 04:07:05PM +0100, Marek Behún wrote:
> > From: Pali Rohár <pali@kernel.org>
> >
> > This property specifies slot power limit in mW unit. It is a form-factor
> > and board specific value and must be initialized by hardware.
> >
> > Some PCIe controllers delegate this work to software to allow hardware
> > flexibility and therefore this property basically specifies what should
> > host bridge program into PCIe Slot Capabilities registers.
> >
> > The property needs to be specified in mW unit instead of the special format
> > defined by Slot Capabilities (which encodes scaling factor or different
> > unit). Host drivers should convert the value from mW to needed format.
> >
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> > Signed-off-by: Marek Behún <kabel@kernel.org>
> > ---
> > Documentation/devicetree/bindings/pci/pci.txt | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
> > index 6a8f2874a24d..7296d599c5ac 100644
> > --- a/Documentation/devicetree/bindings/pci/pci.txt
> > +++ b/Documentation/devicetree/bindings/pci/pci.txt
> > @@ -32,6 +32,12 @@ driver implementation may support the following properties:
> > root port to downstream device and host bridge drivers can do programming
> > which depends on CLKREQ signal existence. For example, programming root port
> > not to advertise ASPM L1 Sub-States support if there is no CLKREQ signal.
> > +- slot-power-limit-miliwatt:
>
> Typo.
>
> But we shouldn't be adding to pci.txt. This needs to go in the
> schema[1]. Patch to devicetree-spec list or GH PR is fine.
Hello Rob,
Pali's PR draft https://github.com/devicetree-org/dt-schema/pull/64
looks like it's going to take some time to work out.
In the meantime, is it possible to somehow get the
slot-power-limit-milliwatt property merged into pci.txt so that we can start
putting it into existing device-trees?
Or would it break dt_bindings_check if it isn't put into dt-schema's
pci-bus.yaml?
Or should we simply put it into current version of pci-bus.yaml and
work out the split proposed by Pali's PR afterwards?
Marek
^ permalink raw reply
* [PATCH yocto-autobuilder2 v2] Run oe-selftest-armhost jobs on the Arm workers only
From: Ross Burton @ 2022-01-05 14:14 UTC (permalink / raw)
To: yocto
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
config.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/config.py b/config.py
index ea042c6..6da8d58 100644
--- a/config.py
+++ b/config.py
@@ -112,6 +112,8 @@ builders_others = [
"bringup",
"qemuarm-armhost",
"check-layer-nightly",
+ "oe-selftest-arm",
+ "oe-selftest-armhost",
"auh"
]
@@ -172,6 +174,7 @@ builder_to_workers = {
"oe-selftest-fedora": workers_fedora,
"oe-selftest-opensuse": workers_opensuse,
"oe-selftest-centos": workers_centos,
+ "oe-selftest-armhost": workers_arm,
"reproducible-ubuntu": workers_ubuntu,
"reproducible-debian": workers_debian,
"reproducible-fedora": workers_fedora,
--
2.25.1
^ permalink raw reply related
* Re: slow snd_rawmidi_drain() for VirMidi devcies
From: Takashi Iwai @ 2022-01-05 14:13 UTC (permalink / raw)
To: Stefan Sauer; +Cc: alsa-devel
In-Reply-To: <CAJ4JBRMKsrJ54ee0gPwRTeScghA4SB8m2iOWybQA=6584ejG-g@mail.gmail.com>
On Wed, 05 Jan 2022 14:39:05 +0100,
Stefan Sauer wrote:
>
> - 28,78% 0,00% rawmidi_alsa [snd_rawmidi] [k]
> snd_rawmidi_drain_output
> - snd_rawmidi_drain_output
> - 26,59% msleep
> schedule_timeout
> schedule
> + __schedule
> + 2,13% schedule_timeout
>
> Seems to be because of:
> https://github.com/torvalds/linux/blob/master/sound/core/rawmidi.c#L244
> if (substream->ops->drain)
> substream->ops->drain(substream);
> else
> msleep(50);
>
> It see what fileops have no drain impl:
> https://github.com/torvalds/linux/blob/master/sound/core/rawmidi.c#L1708
> and I see
> https://github.com/torvalds/linux/blob/master/sound/core/seq/seq_virmidi.c#L329
> that define no drain op. Not which ones are actually used here :/
>
> The docs confirm teh 50 ms wait though:
> https://github.com/torvalds/linux/blob/master/Documentation/sound/kernel-api/writing-an-alsa-driver.rst#drain-callback
>
> would it make sense to have a dummy drain function for the seq_virmidi output
> ops?
Yes, a proper drain implementation is definitely better.
I guess just calling flush_work(&vmidi->output_work) there would
suffice.
thanks,
Takashi
>
> Stefan
>
> Am Di., 4. Jan. 2022 um 16:54 Uhr schrieb Takashi Iwai <tiwai@suse.de>:
>
> On Sat, 01 Jan 2022 12:49:13 +0100,
> Stefan Sauer wrote:
> >
> > hi,
> >
> > I've tried to link BitwigStudio to the webapp cables.gl over virmidi.
> > Unfortunately Bitwig Studio only supports rawmidi. What I discovered is
> > that there is a strange slowness when sending data to virmidi caused
> > by snd_rawmidi_drain().
> >
> > I've posted two tiny, self-contained c apps to:
> > https://gist.github.com/ensonic/c7588b87fa6c1fa94a8f753b1e0aa394
> > See some examples below. 2 observations:
> > * snd_rawmidi_type() is *not* reporting virmidi as VIRTUAL
> > * snd_rawmidi_drain() takes about 60ms! on virtual vs. less that 0.1 ms
> on
> > usb midi (I checked all my hw midi and the worst was avg=1ms on physical
> > midi image unitor8)
> >
> > When comparing the implementations:
> >
> https://github.com/alsa-project/alsa-lib/blob/master/src/rawmidi/rawmidi_virt.c#L173
> >
> https://github.com/alsa-project/alsa-lib/blob/master/src/rawmidi/rawmidi_hw.c#L164
> > I see that the hw one results in an IOCTL which I can see when striking
> the
> > code and I wonder if this is the root cause? Why is rawmidi_virt.c not
> used
> > for virmidi?
> > >From poking at snd_rawmidi_open_conf() I have not yet figured where
> this is
> > decided ....
> >
> > Stefan
> >
> > > amidi -l
> > Dir Device Name
> > IO hw:0,0,0 Scarlett 18i20 USB MIDI 1
> > IO hw:3,0,0 nanoKEY2 nanoKEY2 _ KEYBOARD
> > IO hw:5,0,0 nanoKONTROL nanoKONTROL _ SLIDE
> > IO hw:10,0 Virtual Raw MIDI (16 subdevices)
> > IO hw:11,0 Virtual Raw MIDI (16 subdevices)
> >
> > # using direct i/o to virmidi - all good
> > > ./rawmidi_oss /dev/midi11 0
> > Using device '/dev/midi11' without draining
> > write took min= 0.0015 ms, avg= 0.0016 ms, max= 0.0110 ms
> > > ./rawmidi_oss /dev/midi11 1
> > Using device '/dev/midi11' with draining
> > write took min= 0.0015 ms, avg= 0.0017 ms, max= 0.0101 ms
> > drain took min= 0.0001 ms, avg= 0.0001 ms, max= 0.0008 ms
> >
> > # using snd_rawmidi to virmidi - slow drain operations
> > > ./rawmidi_alsa hw:11,0 0
> > Using device 'hw:11,0' without draining
> > SND_RAWMIDI_TYPE_HW
> > write took min= 0.0010 ms, avg= 0.0011 ms, max= 0.0056 ms
> > > ./rawmidi_alsa hw:11,0 1
> > Using device 'hw:11,0' with draining
> > SND_RAWMIDI_TYPE_HW
> > write took min= 0.0016 ms, avg= 0.0040 ms, max= 0.0077 ms
> > drain took min= 55.9951 ms, avg= 60.4330 ms, max= 64.0653 ms
> >
> > # using snd_rawmidi to usb hw - all good
> > > ./rawmidi_alsa hw:3,0 0
> > Using device 'hw:3,0' without draining
> > SND_RAWMIDI_TYPE_HW
> > write took min= 0.0012 ms, avg= 0.0015 ms, max= 0.0121 ms
> > > ./rawmidi_alsa hw:3,0 1
> > Using device 'hw:3,0' with draining
> > SND_RAWMIDI_TYPE_HW
> > write took min= 0.0024 ms, avg= 0.0032 ms, max= 0.0110 ms
> > drain took min= 0.0293 ms, avg= 0.0636 ms, max= 0.2277 ms
>
> This kind of thing needs profiling. You can try perf or whatever
> available, and identify which call takes long. My wild guess is
> something about snd_seq_sync_output_queue(), maybe poll syscall takes
> unexpected long.
>
> thanks,
>
> Takashi
>
>
^ 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.