[PULL 00/12] Misc, mostly meson patches for 2021-06-23

Paolo Bonzini posted 12 patches 2 years, 10 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210623121424.1259496-1-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
accel/kvm/kvm-all.c                   |   4 +-
authz/meson.build                     |   2 +-
configure                             | 326 +++-------------------------------
crypto/meson.build                    |  41 ++---
hw/usb/meson.build                    |   6 +-
meson.build                           | 151 +++++++++++-----
meson_options.txt                     |  14 ++
target/i386/cpu.c                     |   2 +-
target/i386/cpu.h                     |   1 +
target/i386/kvm/kvm.c                 |  12 +-
tests/unit/crypto-tls-psk-helpers.c   |   6 -
tests/unit/crypto-tls-psk-helpers.h   |   4 -
tests/unit/crypto-tls-x509-helpers.c  |   4 -
tests/unit/crypto-tls-x509-helpers.h  |  11 +-
tests/unit/meson.build                |  10 +-
tests/unit/pkix_asn1_tab.c            |   3 -
tests/unit/test-crypto-tlscredsx509.c |  12 --
tests/unit/test-crypto-tlssession.c   |  12 --
tests/unit/test-io-channel-tls.c      |  12 --
19 files changed, 177 insertions(+), 456 deletions(-)
[PULL 00/12] Misc, mostly meson patches for 2021-06-23
Posted by Paolo Bonzini 2 years, 10 months ago
The following changes since commit b22726abdfa54592d6ad88f65b0297c0e8b363e2:

  Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-06-22 16:07:53 +0100)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 0f38448da7ab61a23fc35f57276a7272d6e4d984:

  KVM: Fix dirty ring mmap incorrect size due to renaming accident (2021-06-23 12:20:59 +0200)

----------------------------------------------------------------
* Some Meson test conversions
* KVM dirty page ring buffer fix
* KVM TSC scaling support

----------------------------------------------------------------
Paolo Bonzini (11):
      target/i386: kvm: add support for TSC scaling
      meson: drop unused CONFIG_GCRYPT_HMAC
      configure: drop unused variables for xts
      meson: remove preadv from summary
      tests: remove QCRYPTO_HAVE_TLS_TEST_SUPPORT
      configure, meson: convert crypto detection to meson
      configure, meson: convert libtasn1 detection to meson
      configure, meson: convert pam detection to meson
      configure, meson: convert libusb detection to meson
      configure, meson: convert libcacard detection to meson
      configure, meson: convert libusbredir detection to meson

Peter Xu (1):
      KVM: Fix dirty ring mmap incorrect size due to renaming accident

 accel/kvm/kvm-all.c                   |   4 +-
 authz/meson.build                     |   2 +-
 configure                             | 326 +++-------------------------------
 crypto/meson.build                    |  41 ++---
 hw/usb/meson.build                    |   6 +-
 meson.build                           | 151 +++++++++++-----
 meson_options.txt                     |  14 ++
 target/i386/cpu.c                     |   2 +-
 target/i386/cpu.h                     |   1 +
 target/i386/kvm/kvm.c                 |  12 +-
 tests/unit/crypto-tls-psk-helpers.c   |   6 -
 tests/unit/crypto-tls-psk-helpers.h   |   4 -
 tests/unit/crypto-tls-x509-helpers.c  |   4 -
 tests/unit/crypto-tls-x509-helpers.h  |  11 +-
 tests/unit/meson.build                |  10 +-
 tests/unit/pkix_asn1_tab.c            |   3 -
 tests/unit/test-crypto-tlscredsx509.c |  12 --
 tests/unit/test-crypto-tlssession.c   |  12 --
 tests/unit/test-io-channel-tls.c      |  12 --
 19 files changed, 177 insertions(+), 456 deletions(-)
-- 
2.31.1


Re: [PULL 00/12] Misc, mostly meson patches for 2021-06-23
Posted by Peter Maydell 2 years, 10 months ago
On Wed, 23 Jun 2021 at 13:16, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit b22726abdfa54592d6ad88f65b0297c0e8b363e2:
>
>   Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-06-22 16:07:53 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 0f38448da7ab61a23fc35f57276a7272d6e4d984:
>
>   KVM: Fix dirty ring mmap incorrect size due to renaming accident (2021-06-23 12:20:59 +0200)
>
> ----------------------------------------------------------------
> * Some Meson test conversions
> * KVM dirty page ring buffer fix
> * KVM TSC scaling support
>

This generates a new warning on one of my boxes:

[...]
Has header "sasl/sasl.h" : YES (cached)
Library sasl2 found: YES
Has header "security/pam_appl.h" : YES
Library pam found: YES
../meson.build:926: WARNING: could not link libpam, disabling

-- PMM

Re: [PULL 00/12] Misc, mostly meson patches for 2021-06-23
Posted by Paolo Bonzini 2 years, 10 months ago
On 24/06/21 21:09, Peter Maydell wrote:
> This generates a new warning on one of my boxes:
> 
> [...]
> Has header "sasl/sasl.h" : YES (cached)
> Library sasl2 found: YES
> Has header "security/pam_appl.h" : YES
> Library pam found: YES
> ../meson.build:926: WARNING: could not link libpam, disabling

This is probably too old a libpam, or something like that.  What distro 
is it, and could you please attach the resulting meson-logs/meson-log.txt?

Thanks,

Paolo


Re: [PULL 00/12] Misc, mostly meson patches for 2021-06-23
Posted by Peter Maydell 2 years, 10 months ago
On Thu, 24 Jun 2021 at 22:05, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 24/06/21 21:09, Peter Maydell wrote:
> > This generates a new warning on one of my boxes:
> >
> > [...]
> > Has header "sasl/sasl.h" : YES (cached)
> > Library sasl2 found: YES
> > Has header "security/pam_appl.h" : YES
> > Library pam found: YES
> > ../meson.build:926: WARNING: could not link libpam, disabling
>
> This is probably too old a libpam, or something like that.  What distro
> is it, and could you please attach the resulting meson-logs/meson-log.txt?

I saw this on Ubuntu 18.04.5 LTS and also on Debian bullseye; I've uploaded
the full meson-log.txt for the Ubuntu box to
https://people.linaro.org/~peter.maydell/meson-log.txt
but the important part seems to be:

Running compile:
Working directory:
/home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39
Command line:  cc
/home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39/testfile.c
-o /home/peter.maydell/qemu-netbsd/build/
meson-private/tmp97iric39/output.exe -pipe -D_FILE_OFFSET_BITS=64 -O0
-std=gnu99 -Wl,--start-group -lpam -Wl,--end-group

Code:

   #include <security/pam_appl.h>
   int main(void) {
     const char *service_name = "qemu";
     const char *user = "frank";
     const struct pam_conv pam_conv = { 0 };
     pam_handle_t *pamh = NULL;
     pam_start(service_name, user, &pam_conv, &pamh);
     return 0;
   }
Compiler stdout:

Compiler stderr:
 /home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39/testfile.c:
In function 'main':
/home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39/testfile.c:7:27:
error: 'NULL' undeclared (first use in this function)
      pam_handle_t *pamh = NULL;
                           ^~~~
/home/peter.maydell/qemu-netbsd/build/meson-private/tmp97iric39/testfile.c:7:27:
note: each undeclared identifier is reported only onc
e for each function it appears in

../meson.build:926: WARNING: could not link libpam, disabling


Looks like a missing #include <stddef.h> in the test code, rather
than anything specifically libpam related.


More generally, I think if meson probes for some library
and can't find it, the correct response is that it should
just print "Library libpam found: NO", not a "WARNING".
"You don't have an optional library, we'll skip that optional
feature" is a normal situation.

thanks
-- PMM

Re: [PULL 00/12] Misc, mostly meson patches for 2021-06-23
Posted by Paolo Bonzini 2 years, 10 months ago
On 25/06/21 10:09, Peter Maydell wrote:
> Looks like a missing #include <stddef.h> in the test code, rather
> than anything specifically libpam related.

Yes, indeed.

> More generally, I think if meson probes for some library
> and can't find it, the correct response is that it should
> just print "Library libpam found: NO", not a "WARNING".
> "You don't have an optional library, we'll skip that optional
> feature" is a normal situation.

The "NO" is present in the final summary; having the library but then 
failing to compile something is a relatively common case when you cannot 
filter by version using pkg-config.  But indeed we can downgrade those 
warnings to message().

Paolo