- May 28, 2022
-
-
Marc-André Lureau authored
Use more conventional variables to set the location of pre-built DLL/bin. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-15-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Sadly, wixl doesn't have 'elif'. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-14-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
No clear reason to make guesses here. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-13-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
No need to setup an environment or to check if the variable is undefined manually. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-12-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Change build_fs_mount_list() to return bool, in accordance with the guidance under = Rules = in include/qapi/error.h Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Suggested-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220525144140.591926-10-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
qemu_open_old() uses qemu_open_internal() which handles special "/dev/fdset/" path for monitor fd sets, set CLOEXEC, and uses Error reporting (and some O_DIRECT special error casing). The monitor fdset handling is unnecessary for qga, use qga_open_cloexec() instead. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220525144140.591926-9-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Allow for a single point of error reporting, and further refactoring. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220525144140.591926-8-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
The function takes care of setting CLOEXEC. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220525144140.591926-7-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
QGA calls qemu_open_old() in various places. Calling qemu_open() instead isn't a great alternative, as it has special "/dev/fdset" handling and depends on QEMU internal monitor data structures. Instead, provide a simple helper for QGA needs, with Error* support. The following patches will make use of it. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220525144140.591926-6-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
There is a bit too much nesting in the function, this can be simplified a bit to improve readability. This also helps with the following error handling changes. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220525144140.591926-5-marcandre.lureau@redhat.com>
-
- May 25, 2022
-
-
Konstantin Kostiuk authored
Bus type spaces (Indicates a storage spaces bus) is not supported, so return it as unknown. Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220524154344.869638-2-kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
Konstantin Kostiuk authored
Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220523191644.823726-2-kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
luzhipeng authored
Add a new 'guest-get-diskstats' command for report disk io statistics for Linux guests. This can be useful for getting io flow or handling IO fault, no need to enter guests. Signed-off-by:
luzhipeng <luzhipeng@cestc.cn> Message-Id: <20220520021935.676-1-luzhipeng@cestc.cn> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com>
-
- May 16, 2022
-
-
Markus Armbruster authored
"Since X.Y" is not recognized as a tagged section, and therefore not formatted as such in generated documentation. Fix by adding the required colon. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20220422132807.1704411-1-armbru@redhat.com> Reviewed-by:
Andrea Bolognani <abologna@redhat.com>
-
- May 14, 2022
-
-
Konstantin Kostiuk authored
volume_name_wchar is allocated by 'void* operator new [](long long unsigned int) Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220512154909.331481-1-kkostiuk@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Konstantin Kostiuk authored
Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220512154906.331399-1-kkostiuk@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 07, 2022
-
-
Konstantin Kostiuk authored
Signed-off-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220428181541.300619-1-kkostiuk@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 04, 2022
-
-
Zhenwei Pi authored
After assigning a NVMe/SCSI controller to guest by VFIO, we lose everything on the host side. A guest uses these devices exclusively, we usually don't care the actions on these devices. But there is a low probability that hitting physical hardware warning, we need a chance to get the basic smart log info. Introduce disk smart, and implement NVMe smart on linux. Thanks to Keith and Marc-André. CC: Keith Busch <kbusch@kernel.org> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20220420022610.418052-3-pizhenwei@bytedance.com>
-
Zhenwei Pi authored
Assigning a NVMe disk by VFIO or emulating a NVMe controller by QEMU, a NVMe disk get exposed in guest side. Support NVMe disk bus type and implement posix version. Test PCI passthrough case: ~#virsh qemu-agent-command buster '{"execute":"guest-get-disks"}' | jq ... { "name": "/dev/nvme0n1", "dependencies": [], "partition": false, "address": { "serial": "SAMSUNG MZQL23T8HCLS-00A07_S64HNE0N500076", "bus-type": "nvme", "bus": 0, "unit": 0, "pci-controller": { "bus": 0, "slot": 22, "domain": 0, "function": 0 }, "dev": "/dev/nvme0n1", "target": 0 } ... Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
zhenwei pi <pizhenwei@bytedance.com> Message-Id: <20220420022610.418052-2-pizhenwei@bytedance.com>
-
Andrew Deason authored
On Solaris, instead of the -P, -H, and -r flags, we need to provide the target init state to the 'shutdown' command: state 5 is poweroff, 0 is halt, and 6 is reboot. We also need to pass -g0 to avoid the default 60-second delay, and -y to avoid a confirmation prompt. Implement this logic under an #ifdef CONFIG_SOLARIS, so the 'guest-shutdown' command works properly on Solaris. Signed-off-by:
Andrew Deason <adeason@sinenomine.net> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220426195526.7699-6-adeason@sinenomine.net>
-
Andrew Deason authored
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 <adeason@sinenomine.net> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220426195526.7699-5-adeason@sinenomine.net>
-
Andrew Deason authored
The code for guest-network-get-interfaces needs a couple of small adjustments for Solaris: - The results from SIOCGIFHWADDR are documented as being in ifr_addr, not ifr_hwaddr (ifr_hwaddr doesn't exist on Solaris). - The implementation of guest_get_network_stats is Linux-specific, so hide it under #ifdef CONFIG_LINUX. On non-Linux, we just won't provide network interface stats. Signed-off-by:
Andrew Deason <adeason@sinenomine.net> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Message-Id: <20220426195526.7699-4-adeason@sinenomine.net>
-
Andrew Deason authored
Since its introduction in commit 3424fc9f ("qemu-ga: add guest-network-get-interfaces command"), guest-network-get-interfaces seems to check if a given interface has a hardware address by checking 'ifa->ifa_flags & SIOCGIFHWADDR'. But ifa_flags is a field for IFF_* flags (IFF_UP, IFF_LOOPBACK, etc), and comparing it to an ioctl like SIOCGIFHWADDR doesn't make sense. On Linux, this isn't a big deal, since SIOCGIFHWADDR has so many bits set (0x8927), 'ifa->ifa_flags & SIOCGIFHWADDR' will usually have a nonzero result for any 'normal'-looking interfaces: anything with IFF_UP (0x1) or IFF_BROADCAST (0x2) set, as well as several less-common flags. This means we'll try to get the hardware address for most/all interfaces, even those that don't really have one (like the loopback device). For those interfaces, Linux just returns a hardware address of all zeroes. On Solaris, however, trying to get the hardware address for a loopback device returns an EADDRNOTAVAIL error. This causes us to return an error and the entire guest-network-get-interfaces call fails. Change this logic to always try to get the hardware 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 <adeason@sinenomine.net> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Message-Id: <20220426195526.7699-3-adeason@sinenomine.net>
-
Andrew Deason authored
Currently, commands-posix.c assumes that getifaddrs() is only available on Linux, and so the related guest agent command guest-network-get-interfaces is only implemented for #ifdef __linux__. This function does exist on other platforms, though, such as Solaris. So, add a meson check for getifaddrs(), and move the code for guest-network-get-interfaces to be built whenever getifaddrs() is available. The implementation for guest-network-get-interfaces still has some Linux-specific code, which is not fixed in this commit. This commit moves the relevant big chunks of code around without changing them, so a future commit can change the code in place. Signed-off-by:
Andrew Deason <adeason@sinenomine.net> Reviewed-by:
Michal Privoznik <mprivozn@redhat.com> Message-Id: <20220426195526.7699-2-adeason@sinenomine.net>
-
- May 03, 2022
-
-
Marc-André Lureau authored
The qemu_*block() functions are meant to be be used with sockets (the win32 implementation expects SOCKET) Over time, those functions where used with Win32 SOCKET or file-descriptors interchangeably. But for portability, they must only be used with socket-like file-descriptors. FDs can use g_unix_set_fd_nonblocking() instead. Rename the functions with "socket" in the name to prevent bad usages. This is effectively reverting commit f9e8cacc ("oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()"). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Marc-André Lureau authored
The call is POSIX-specific. Use the dedicated GLib API. (this is a preliminary patch before renaming qemu_set_nonblock()) Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Marc-André Lureau authored
Suggested-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- Apr 28, 2022
-
-
Paolo Bonzini authored
The .wxs file uses $(var.Mingw_bin) while configure/meson have always used Mingw_dlls. Fix them to match what was probably intended. Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Apr 21, 2022
-
-
Marc-André Lureau authored
The old code is kind of wrong. Say it's 1649309843.000001 seconds past the epoch. Prints "1649309843.1". 9us later, it prints "1649309843.10". Should really use %06lu for the microseconds part. Use GDateTime instead, as suggested by Daniel. Suggested-by:
Markus Armbruster <armbru@redhat.com> Suggested-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Marc-André Lureau authored
Since the introduction of guest-exec in/out/err redirections in commit a1853dca ("qga: guest-exec simple stdin/stdout/stderr redirection"), some execution state variables are handled with atomic ops. However, there are no threads involved in this code (and glib sources are dispatched in the same thread), and no other obvious reason to use them. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-40-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Simplify the function to only return the directory path. Callers are adjusted to use the GLib function to build paths, g_build_filename(). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-39-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
The function is specific to qemu-ga, no need to share it in QEMU. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220420132624.2439741-32-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
The latter simply requires glib.h, while the former is not in the Windows API (but provided by mingw header & CRT) Also simplify the expression for 1/10s. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-12-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Suggested-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Warner Losh <imp@bsdimp.com> Message-Id: <20220420132624.2439741-7-marcandre.lureau@redhat.com>
-
- Apr 06, 2022
-
-
Marc-André Lureau authored
The header has been part of MinGW-w64 since the introduction of the project (2007). While on MinGW(32), the legacy project, it was imported in 2014 from w32api-3.17 (commit e4803e0da2). According to build-platform.rst and our CI coverage, we only support building with MinGW-w64 (from Debian/Fedora). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20220401085106.2167374-1-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-33-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Environment is implicitly inherited from the current process "environ" variable for execl() or g_spawn_sync(), no need to be explicit about it. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220323155743.1585078-31-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
According to GLib API: g_get_current_time has been deprecated since version 2.62 and should not be used in newly-written code. GTimeVal is not year-2038-safe. Use g_get_real_time() instead. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-13-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
GLib g_get_real_time() is an alternative to gettimeofday() which allows to simplify our code. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Laurent Vivier <laurent@vivier.eu> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20220307070401.171986-4-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Apr 05, 2022
-
-
Helge Konetzka authored
This fixes: qga/vss-win32/install.cpp:49:24: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *msg = NULL, *nul = strchr(text, '('); ^ ~~~~~~~~~~~~~~~~~ Signed-off-by:
Helge Konetzka <hk@zapateado.de> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <39400817-3dc9-516d-9096-bc1f68862531@zapateado.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-