Re: [PATCH v3 0/5] qga: Implement shutdown/network-get-interfaces on Solaris

2022-04-30 Thread Andrew Deason
On Tue, 26 Apr 2022 14:55:21 -0500 Andrew Deason wrote: > This implements the guest agent commands guest-network-get-interfaces and > guest-shutdown on Solaris. The implementation for these on Solaris is very > similar as on Linux, since both platforms have a similar getifaddr

[PATCH v3 5/5] qga/commands-posix: 'guest-shutdown' for Solaris

2022-04-26 Thread Andrew Deason
c under an #ifdef CONFIG_SOLARIS, so the 'guest-shutdown' command works properly on Solaris. Signed-off-by: Andrew Deason Reviewed-by: Marc-André Lureau --- Changes since v1: - new in v2 qga/commands-posix.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(

[PATCH v3 2/5] qga/commands-posix: Fix iface hw address detection

2022-04-26 Thread Andrew Deason
re address for each interface, and don't return an error if we fail to get it. Instead, just don't include the 'hardware-address' field in the result if we can't get the hardware address. Signed-off-by: Andrew Deason Reviewed-by: Michal Privoznik --- qga/commands-p

[PATCH v3 4/5] qga/commands-posix: Log all net stats failures

2022-04-26 Thread Andrew Deason
guest_get_network_stats can silently fail in a couple of ways. Add debug messages to these cases, so we're never completely silent on failure. Signed-off-by: Andrew Deason Reviewed-by: Marc-André Lureau --- Changes since v1: - new in v2 qga/commands-posix.c | 6 +- 1 file chang

[PATCH v3 3/5] qga/commands-posix: Fix listing ifaces for Solaris

2022-04-26 Thread Andrew Deason
de it under #ifdef CONFIG_LINUX. On non-Linux, we just won't provide network interface stats. Signed-off-by: Andrew Deason Reviewed-by: Michal Privoznik --- qga/commands-posix.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/comman

[PATCH v3 1/5] qga/commands-posix: Use getifaddrs when available

2022-04-26 Thread Andrew Deason
them, so a future commit can change the code in place. Signed-off-by: Andrew Deason Reviewed-by: Michal Privoznik --- meson.build | 1 + qga/commands-posix.c | 474 ++- 2 files changed, 246 insertions(+), 229 deletions(-) diff --git a

[PATCH v3 0/5] qga: Implement shutdown/network-get-interfaces on Solaris

2022-04-26 Thread Andrew Deason
pdating to newer master Changes since v1: - Add debug messages for failing to get network iface stats - Add implementation for 'guest-shutdown' Andrew Deason (5): qga/commands-posix: Use getifaddrs when available qga/commands-posix: Fix iface hw address detection qga/commands-posix: Fi

[PATCH v2 2/5] qga/commands-posix: Fix iface hw address detection

2022-04-13 Thread Andrew Deason
re address for each interface, and don't return an error if we fail to get it. Instead, just don't include the 'hardware-address' field in the result if we can't get the hardware address. Signed-off-by: Andrew Deason Reviewed-by: Michal Privoznik --- qga/commands-p

[PATCH v2 3/5] qga/commands-posix: Fix listing ifaces for Solaris

2022-04-13 Thread Andrew Deason
de it under #ifdef CONFIG_LINUX. On non-Linux, we just won't provide network interface stats. Signed-off-by: Andrew Deason Reviewed-by: Michal Privoznik --- qga/commands-posix.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/comman

[PATCH v2 5/5] qga/commands-posix: 'guest-shutdown' for Solaris

2022-04-13 Thread Andrew Deason
c under an #ifdef CONFIG_SOLARIS, so the 'guest-shutdown' command works properly on Solaris. Signed-off-by: Andrew Deason --- Changes since v1: - new in v2 qga/commands-posix.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/qga/commands-po

[PATCH v2 0/5] qga: Implement shutdown/network-get-interfaces on Solaris

2022-04-13 Thread Andrew Deason
or failing to get network iface stats - Add implementation for 'guest-shutdown' Andrew Deason (5): qga/commands-posix: Use getifaddrs when available qga/commands-posix: Fix iface hw address detection qga/commands-posix: Fix listing ifaces for Solaris qga/commands-posix: Log all net

[PATCH v2 4/5] qga/commands-posix: Log all net stats failures

2022-04-13 Thread Andrew Deason
guest_get_network_stats can silently fail in a couple of ways. Add debug messages to these cases, so we're never completely silent on failure. Signed-off-by: Andrew Deason --- Changes since v1: - new in v2 qga/commands-posix.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[PATCH v2 1/5] qga/commands-posix: Use getifaddrs when available

2022-04-13 Thread Andrew Deason
them, so a future commit can change the code in place. Signed-off-by: Andrew Deason Reviewed-by: Michal Privoznik --- meson.build | 1 + qga/commands-posix.c | 474 ++- 2 files changed, 246 insertions(+), 229 deletions(-) diff --git a

Re: [PATCH 3/3] qga/commands-posix: Fix listing ifaces for Solaris

2022-03-28 Thread Andrew Deason
On Mon, 21 Mar 2022 10:14:57 +0100 Michal Prívozník wrote: > On 3/20/22 22:38, Andrew Deason wrote: > > The code for guest-network-get-interfaces needs a couple of small > > adjustments for Solaris: > > > > - The results from SIOCGIFHWADDR are documented as b

Re: [PATCH] softmmu/physmem: Use qemu_madvise

2022-03-22 Thread Andrew Deason
On Tue, 22 Mar 2022 17:58:19 + "Dr. David Alan Gilbert" wrote: > * Andrew Deason (adea...@sinenomine.net) wrote: > > On Tue, 22 Mar 2022 16:53:05 + > > "Dr. David Alan Gilbert" wrote: > > > > > * Andrew Deason (adea...@sinenomine.net)

Re: [PATCH] softmmu/physmem: Use qemu_madvise

2022-03-22 Thread Andrew Deason
On Tue, 22 Mar 2022 16:53:05 + "Dr. David Alan Gilbert" wrote: > * Andrew Deason (adea...@sinenomine.net) wrote: > > On Wed, 16 Mar 2022 10:41:41 +0100 > > David Hildenbrand wrote: > > > > > On 16.03.22 10:37, Dr. David Alan Gilbert wrote: > >

Re: [PATCH] softmmu/physmem: Use qemu_madvise

2022-03-22 Thread Andrew Deason
On Wed, 16 Mar 2022 10:41:41 +0100 David Hildenbrand wrote: > On 16.03.22 10:37, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > >> On Wed, 16 Mar 2022 at 07:53, David Hildenbrand wrote: > >>> > >>> On 16.03.22 05

[PATCH] io: Limit readv/writev to IOV_MAX

2022-03-20 Thread Andrew Deason
for file operations, and EMSGSIZE for sockets. To fix this, make qio_channel_readv_full and qio_channel_writev_full only use the first IOV_MAX iovs passed in, and we'll return the number of bytes actually processed like always. Signed-off-by: Andrew Deason --- These aren't the only t

[PATCH 2/3] qga/commands-posix: Fix iface hw address detection

2022-03-20 Thread Andrew Deason
re address for each interface, and don't return an error if we fail to get it. Instead, just don't include the 'hardware-address' field in the result if we can't get the hardware address. Signed-off-by: Andrew Deason --- As implemented, this commit results in a behavior dif

[PATCH 1/3] qga/commands-posix: Use getifaddrs when available

2022-03-20 Thread Andrew Deason
them, so a future commit can change the code in place. Signed-off-by: Andrew Deason --- meson.build | 1 + qga/commands-posix.c | 474 ++- 2 files changed, 246 insertions(+), 229 deletions(-) diff --git a/meson.build b/meson.build index

[PATCH 0/3] qga: Implement guest-network-get-interfaces for Solaris

2022-03-20 Thread Andrew Deason
This implements the guest agent guest-network-get-interfaces command on Solaris. Solaris provides a getifaddrs() that's very similar to the Linux one, so the implementation is mostly the same. Andrew Deason (3): qga/commands-posix: Use getifaddrs when available qga/commands-posix: Fix

[PATCH 3/3] qga/commands-posix: Fix listing ifaces for Solaris

2022-03-20 Thread Andrew Deason
de it under #ifdef CONFIG_LINUX. On non-Linux, we just won't provide network interface stats. Signed-off-by: Andrew Deason --- qga/commands-posix.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index bd0d67f674..

Re: [PATCH] softmmu/physmem: Use qemu_madvise

2022-03-16 Thread Andrew Deason
On Wed, 16 Mar 2022 10:41:41 +0100 David Hildenbrand wrote: > On 16.03.22 10:37, Dr. David Alan Gilbert wrote: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > >> On Wed, 16 Mar 2022 at 07:53, David Hildenbrand wrote: > >>> > >>> On 16.03.22 05

[PATCH] softmmu/physmem: Use qemu_madvise

2022-03-15 Thread Andrew Deason
instead of ENOSYS, and a slightly different error message), but this is now more consistent with other callers that use qemu_madvise. Signed-off-by: Andrew Deason --- Looking at the history of commits that touch this madvise() call, it doesn't _look_ like there's any reason to be directl

[PATCH v3 2/3] hw/i386/acpi-build: Avoid 'sun' identifier

2022-03-15 Thread Andrew Deason
On Solaris, 'sun' is #define'd to 1, which causes errors if a variable is named 'sun'. Slightly change the name of the var for the Slot User Number so we can build on Solaris. Reviewed-by: Ani Sinha Signed-off-by: Andrew Deason --- hw/i386/acpi-build.c | 4 ++-- 1 f

[PATCH v3 3/3] util/osdep: Remove some early cruft

2022-03-15 Thread Andrew Deason
"util: Clean up includes"). Remove this cruft. Reviewed-by: Peter Maydell Signed-off-by: Andrew Deason --- util/osdep.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/util/osdep.c b/util/osdep.c index 1825399bcf..394804d32e 100644 --- a/util/osdep.c +++ b/util/osdep.c @@

[PATCH v3 1/3] util/osdep: Avoid madvise proto on modern Solaris

2022-03-15 Thread Andrew Deason
to handle platform-specific header quirks. The 'missing_madvise_proto' meson check contains an obviously wrong prototype for madvise. So if that code compiles and links, we must be missing the actual prototype for madvise. Signed-off-by: Andrew Deason --- Changes since v2: -

[PATCH v3 0/3] Fixes for building on Solaris 11.4.42 CBE

2022-03-15 Thread Andrew Deason
- Change the CONFIG_MADVISE checks to not be platform-specific - Add the last commit removing util/osdep.c cruft Andrew Deason (3): util/osdep: Avoid madvise proto on modern Solaris hw/i386/acpi-build: Avoid 'sun' identifier util/osdep: Remove some early cruft hw/i386/acpi

Re: [PATCH v2 1/3] util/osdep: Avoid madvise proto on modern Solaris

2022-03-15 Thread Andrew Deason
oss-platform code you noted before, in softmmu/physmem.c, and that does cause the same build error if the prototype is missing. (I'm going to add another commit to make that use the wrapper in the next patchset.) I assume that's not a concern unless I hear otherwise; just pointing it out. And all other comments will be addressed; thanks. -- Andrew Deason adea...@sinenomine.net

[PATCH v2 2/3] hw/i386/acpi-build: Avoid 'sun' identifier

2022-03-14 Thread Andrew Deason
On Solaris, 'sun' is #define'd to 1, which causes errors if a variable is named 'sun'. Slightly change the name of the var for the Slot User Number so we can build on Solaris. Signed-off-by: Andrew Deason --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions

Re: [PATCH v2 1/3] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
On Mon, 14 Mar 2022 21:20:23 -0500 Andrew Deason wrote: > #ifdef CONFIG_SOLARIS > #include > +#endif > + > +#ifdef HAVE_MADVISE_MISSING_PROTOTYPE Oh goodness, that's not the right name is it. I'll wait a little bit to see if there are any other comments, but clear

[PATCH v2 3/3] util/osdep: Remove some early cruft

2022-03-14 Thread Andrew Deason
"util: Clean up includes"). Remove this cruft. Signed-off-by: Andrew Deason --- util/osdep.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/util/osdep.c b/util/osdep.c index 560ce9111a..ed932a0c7c 100644 --- a/util/osdep.c +++ b/util/osdep.c @@ -17,26 +17,20 @@ * IMPLIED, INC

[PATCH v2 1/3] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
e for madvise. So if that code compiles and links, we must be missing the actual prototype for madvise. Signed-off-by: Andrew Deason --- To be clear, I'm okay with removing the prototype workaround unconditionally; I'm just not sure if there's enough consensus on doing that. The &q

[PATCH v2 0/3] Fixes for building on Solaris 11.4.42 CBE

2022-03-14 Thread Andrew Deason
ted (briefly), but the rest of the build wasn't hard to get working. With this, the guest agent runs fine using isa-serial. Changes since v1: - Change the CONFIG_MADVISE checks to not be platform-specific - Add the last commit removing util/osdep.c cruft Andrew Deason (3): util/osdep: Av

Re: [PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
ing at the mman.h header, not actually testing a build), because we specify -D__EXTENSIONS__. Illumos and Solaris 10 look like they would need the workaround. So practically speaking for this patchset, it seems more like a question of Illumos support. -- Andrew Deason adea...@sinenomine.net

Re: [PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
On Mon, 14 Mar 2022 16:36:00 + Peter Maydell wrote: > On Mon, 14 Mar 2022 at 16:12, Andrew Deason wrote: > > #ifdef CONFIG_SOLARIS > > #include > > +#ifndef HAVE_MADVISE_PROTO > > /* See MySQL bug #7156 (http://bugs.mysql.com/bug.php?id=7156) for > >

[PATCH 0/2] Fixes for building on Solaris 11.4.42 CBE

2022-03-14 Thread Andrew Deason
ted (briefly), but the rest of the build wasn't hard to get working. With this, the guest agent runs fine using isa-serial. Andrew Deason (2): util/osdep: Avoid madvise proto on modern Solaris hw/i386/acpi-build: Avoid 'sun' identifier hw/i386/acpi-build.c | 4 ++-- meson.bui

[PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
, int); Which conflicts with the prototype in util/osdeps.c. Instead of always declaring this prototype, check if madvise() is already declared, so we don't need to declare it ourselves. Signed-off-by: Andrew Deason --- I'm not sure if a test is needed for this at all; that is, how much q

[PATCH 2/2] hw/i386/acpi-build: Avoid 'sun' identifier

2022-03-14 Thread Andrew Deason
On Solaris, 'sun' is #define'd to 1, which causes errors if a variable is named 'sun'. Slightly change the name of the var for the Slot User Number so we can build on Solaris. Signed-off-by: Andrew Deason --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions