[PATCH v3 2/2] qga: Don't daemonize before channel is initialized

2025-01-07 Thread Michal Privoznik
gs.gentoo.org/810628 Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- qga/main.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/qga/main.c b/qga/main.c index 68ea7f275a..35f061b5ea 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1430,7 +1430

[PATCH v3 1/2] qga: Invert logic on return value in main()

2025-01-07 Thread Michal Privoznik
ess value in that one specific case. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- qga/main.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qga/main.c b/qga/main.c index 4a695235f0..68ea7f275a 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1579,7 +1579,7 @@

[PATCH v3 0/2] qga: Open channel before going daemon

2025-01-07 Thread Michal Privoznik
v3 of: https://lists.nongnu.org/archive/html/qemu-devel/2024-12/msg01073.html diff to v2: - Patch 1/4 from v2 was merged already, - Patch 4/4 from v2 is now dropped because it's no longed applicable (run_agent_once() and subsequently can return two different values). Michal Privozn

[PATCH v2 4/4] qga: Make run_agent() and run_agent_once() return no value

2024-12-05 Thread Michal Privoznik
After previous commits, run_agent_once() can't return anything else but EXIT_SUCCESS. Transitionally, run_agent() can't return anything else but EXIT_SUCCESS too. There's not much value in having these function return an integer. Make them return void. Signed-off-by: Michal Privozn

[PATCH v2 2/4] qga: Invert logic on return value in main()

2024-12-05 Thread Michal Privoznik
ess value in that one specific case. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- qga/main.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qga/main.c b/qga/main.c index 4a695235f0..68ea7f275a 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1579,7 +1579,7 @@

[PATCH v2 3/4] qga: Don't daemonize before channel is initialized

2024-12-05 Thread Michal Privoznik
gs.gentoo.org/810628 Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- qga/main.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/qga/main.c b/qga/main.c index 68ea7f275a..35f061b5ea 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1430,7 +1430

[PATCH v2 0/4] qga: Open channel before going daemon

2024-12-05 Thread Michal Privoznik
v2 of: https://lists.nongnu.org/archive/html/qemu-devel/2024-11/msg00460.html diff to v1: - In 2/4 fixed one path where EXIT_FAILURE would be returned, - Reworked 3/4 so that channel initialization is kept in run_agent_once(). Michal Privoznik (4): qga: Don't access global variab

[PATCH v2 1/4] qga: Don't access global variable in run_agent_once()

2024-12-05 Thread Michal Privoznik
with the function argument. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko Reviewed-by: Konstantin Kostiuk --- qga/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index 50186760bf..4a695235f0 100644 --- a/qga/main.c +++ b/qga/m

[PATCH 3/4] qga: Don't daemonize before channel is initialized

2024-11-04 Thread Michal Privoznik
gs.gentoo.org/810628 Signed-off-by: Michal Privoznik --- qga/main.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/qga/main.c b/qga/main.c index c003aacbe0..6240845f39 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1430,7 +1430,6 @@ static GASta

[PATCH 0/4] qga: Open channel before going daemon

2024-11-04 Thread Michal Privoznik
See 3/4 for in depth explanation. Michal Privoznik (4): qga: Don't access global variable in run_agent_once() qga: Invert logic on return value in main() qga: Don't daemonize before channel is initialized qga: Make run_agent() and run_agent_once() return no value qga/m

[PATCH 1/4] qga: Don't access global variable in run_agent_once()

2024-11-04 Thread Michal Privoznik
with the function argument. Signed-off-by: Michal Privoznik --- qga/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index 50186760bf..4a695235f0 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1519,7 +1519,7 @@ static int run_agent_once(GASta

[PATCH 2/4] qga: Invert logic on return value in main()

2024-11-04 Thread Michal Privoznik
ess value in that one specific case. Signed-off-by: Michal Privoznik --- qga/main.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qga/main.c b/qga/main.c index 4a695235f0..c003aacbe0 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1579,7 +1579,7 @@ static void stop_ag

[PATCH 4/4] qga: Make run_agent() and run_agent_once() return no value

2024-11-04 Thread Michal Privoznik
After previous commits, run_agent_once() can't return anything else but EXIT_SUCCESS. Transitionally, run_agent() can't return anything else but EXIT_SUCCESS too. There's not much value in having these function return an integer. Make them return void. Signed-off-by: Michal Priv

[PATCH v2] audio/pw: Report more accurate error when connecting to PipeWire fails

2024-09-18 Thread Michal Privoznik
l which is then moved to that path and also its error message is adjusted slightly. 1: https://docs.pipewire.org/group__pw__core.html#ga5994e3a54e4ec718094ca02a1234815b Signed-off-by: Michal Privoznik --- v2 of: https://mail.gnu.org/archive/html/qemu-devel/2024-09/msg03485.html diff to v1:

[PATCH] audio/pw: Report more accurate error when connecting to PipeWire fails

2024-09-18 Thread Michal Privoznik
l which is then moved to that path and also its error message is adjusted slightly. 1: https://docs.pipewire.org/group__pw__core.html#ga5994e3a54e4ec718094ca02a1234815b Signed-off-by: Michal Privoznik Signed-off-by: Michal Privoznik --- audio/pwaudio.c | 8 1 file changed, 4 insert

[PATCH 1/2] i386/sev: Fix error message in sev_get_capabilities()

2024-06-24 Thread Michal Privoznik
When a custom path is provided to sev-guest object and opening the path fails an error message is reported. But the error message still mentions DEFAULT_SEV_DEVICE ("/dev/sev") instead of the custom path. Fixes: 16dcf200dc951c1cde3e5b442457db5f690b8cf0 Signed-off-by: Michal Privoznik -

[PATCH 0/2] i386/sev: Two trivial improvements to sev_get_capabilities()

2024-06-24 Thread Michal Privoznik
I've noticed that recent QEMU + libvirt (current HEADs, roughly) behave a bit different than expected. The problem is in recent change to 'query-sev-capabilities' command (well, sev_get_capabilities() in fact) which libvirt uses (see patch 2/2). The first one is trivial. Mich

[PATCH 2/2] i386/sev: Fallback to the default SEV device if none provided in sev_get_capabilities()

2024-06-24 Thread Michal Privoznik
e default path ("/dev/sev") provides the same data as user provided one. So fall back to it. Fixes: 16dcf200dc951c1cde3e5b442457db5f690b8cf0 Signed-off-by: Michal Privoznik --- target/i386/sev.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i

[PATCH v4 3/5] osdep: Make qemu_madvise() return ENOSYS on unsupported OSes

2024-06-05 Thread Michal Privoznik
Not every OS is capable of madvise() or posix_madvise() even. In that case, errno should be set to ENOSYS as it reflects the cause better. Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand --- util/osdep.c | 2 +- 1 file changed, 1 insertion

[PATCH v4 0/5] backends/hostmem: Report more errors on failures

2024-06-05 Thread Michal Privoznik
ng David's Reviewed-by line. - The last patch was tested by Mario, so I've included his Tested-by line. Thanks! Michal Privoznik (5): meson: Don't even detect posix_madvise() on Darwin osdep: Make qemu_madvise() to set errno in all cases osdep: Make qemu_madvise() return E

[PATCH v4 4/5] backends/hostmem: Report error on qemu_madvise() failures

2024-06-05 Thread Michal Privoznik
If user sets .merge or .dump attributes qemu_madvise() is called with corresponding advice. But it is never checked for failure which may mislead users into thinking the attribute is set correctly. Report an appropriate error. Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé

[PATCH v4 5/5] backends/hostmem: Report error when memory size is unaligned

2024-06-05 Thread Michal Privoznik
ust be multiple of 2 MiB Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé Tested-by: Mario Casquero --- backends/hostmem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/backends/hostmem.c b/backends/hostmem.c index 012a8c190f..4d6c69fe4d 100644 --- a/bac

[PATCH v4 1/5] meson: Don't even detect posix_madvise() on Darwin

2024-06-05 Thread Michal Privoznik
3/bsd/man/man2/madvise.2.auto.html Signed-off-by: Michal Privoznik --- meson.build | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 6386607144..49962cce88 100644 --- a/meson.build +++ b/meson.build @@ -2552,10 +25

[PATCH v4 2/5] osdep: Make qemu_madvise() to set errno in all cases

2024-06-05 Thread Michal Privoznik
negative value on error, just like other error paths do. Signed-off-by: Michal Privoznik Reviewed-by: David Hildenbrand --- util/osdep.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/osdep.c b/util/osdep.c index e996c4744a..e42f4e8121 100644 --- a/util/osdep.c +++ b

[PATCH v3 0/4] backends/hostmem: Report more errors on failures

2024-05-31 Thread Michal Privoznik
v3 of: diff to v2: - In 1/4 I've reworked setting errno because of how posix_madvise() behaves on Darwin, - In 4/4 I'm now using size_to_str() to print the page size, oh, and the error message now contains the backend name too. Michal Privoznik (4): osdep: Make qemu_madvise() to

[PATCH v3 4/4] backends/hostmem: Report error when memory size is unaligned

2024-05-31 Thread Michal Privoznik
ust be multiple of 2 MiB Signed-off-by: Michal Privoznik --- backends/hostmem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/backends/hostmem.c b/backends/hostmem.c index 012a8c190f..4d6c69fe4d 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -20,6 +20,7 @@ #include &

[PATCH v3 2/4] osdep: Make qemu_madvise() return ENOSYS on unsupported OSes

2024-05-31 Thread Michal Privoznik
Not every OS is capable of madvise() or posix_madvise() even. In that case, errno should be set to ENOSYS as it reflects the cause better. Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand --- util/osdep.c | 2 +- 1 file changed, 1 insertion

[PATCH v3 1/4] osdep: Make qemu_madvise() to set errno in all cases

2024-05-31 Thread Michal Privoznik
negative value on error, just like other error paths do. Signed-off-by: Michal Privoznik --- util/osdep.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/util/osdep.c b/util/osdep.c index e996c4744a..1345238a5c 100644 --- a/util/osdep.c +++ b/util/osdep.c @@ -57,7

[PATCH v3 3/4] backends/hostmem: Report error on qemu_madvise() failures

2024-05-31 Thread Michal Privoznik
If user sets .merge or .dump attributes qemu_madvise() is called with corresponding advice. But it is never checked for failure which may mislead users into thinking the attribute is set correctly. Report an appropriate error. Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé

[PATCH v2 2/4] osdep: Make qemu_madvise() return ENOSYS on unsupported OSes

2024-05-31 Thread Michal Privoznik
Not every OS is capable of madvise() or posix_madvise() even. In that case, errno should be set to ENOSYS as it reflects the cause better. This also mimic what madvise()/posix_madvise() would return if kernel lacks corresponding syscall (e.g. due to configuration). Signed-off-by: Michal Privoznik

[PATCH v2 0/4] backends/hostmem: Report more errors on failures

2024-05-31 Thread Michal Privoznik
v2 of: https://lists.gnu.org/archive/html/qemu-devel/2024-05/msg05659.html diff to v1: - patch 2/4 is new - Errors are reported instead of warnings on failed qemu_madvise() - Instead of rounding up value passed to qemu_madvise()/mbind() an error is reported Michal Privoznik (4): osdep: Make

[PATCH v2 4/4] backends/hostmem: Report error when memory size is unaligned

2024-05-31 Thread Michal Privoznik
with. And even though an error is reported, the root cause it not very clear: qemu-system-x86_64: Couldn't set property 'dump' on 'memory-backend-file': Invalid argument After this commit: qemu-system-x86_64: backend memory size must be multiple of 0x20 S

[PATCH v2 3/4] backends/hostmem: Report error on qemu_madvise() failures

2024-05-31 Thread Michal Privoznik
If user sets .merge or .dump attributes qemu_madvise() is called with corresponding advice. But it is never checked for failure which may mislead users into thinking the attribute is set correctly. Report an appropriate error. Signed-off-by: Michal Privoznik --- backends/hostmem.c | 36

[PATCH v2 1/4] osdep: Make qemu_madvise() to set errno in all cases

2024-05-31 Thread Michal Privoznik
negative value on error, just like other error paths do. Signed-off-by: Michal Privoznik Reviewed-by: David Hildenbrand --- util/osdep.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/osdep.c b/util/osdep.c index e996c4744a..e42f4e8121 100644 --- a/util/osdep.c +++ b

[PATCH 1/3] osdep: Make qemu_madvise() to set errno in all cases

2024-05-28 Thread Michal Privoznik
negative value on error, just like other error paths do. Signed-off-by: Michal Privoznik --- util/osdep.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/osdep.c b/util/osdep.c index e996c4744a..e42f4e8121 100644 --- a/util/osdep.c +++ b/util/osdep.c @@ -57,7 +57,12 @@ int

[PATCH 0/3] backends/hostmem: Round up memory size for qemu_madvise() and mbind()

2024-05-28 Thread Michal Privoznik
mu_madvise() failure - Size is rounded up in case of live change of corresponding attributes too Michal Privoznik (3): osdep: Make qemu_madvise() to set errno in all cases backends/hostmem: Warn on qemu_madvise() failures backends/hostmem: Round up memory size for qemu_madvise() and mbind()

[PATCH 2/3] backends/hostmem: Warn on qemu_madvise() failures

2024-05-28 Thread Michal Privoznik
warning at least. Signed-off-by: Michal Privoznik --- backends/hostmem.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index eb9682b4a8..1a6fd1c714 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -

[PATCH 3/3] backends/hostmem: Round up memory size for qemu_madvise() and mbind()

2024-05-28 Thread Michal Privoznik
tiple of underlying pagesize (2MiB) which triggers a check inside of mbind(), since we can't really set policy just to a fraction of a page. As qemu_madvise() has the same expectation, round size passed to underlying pagesize. Signed-off-by: Michal Privoznik --- backends/hostmem.c | 11 +++

[PATCH] hostmem: Round up memory size for qemu_madvise() in host_memory_backend_memory_complete()

2023-11-27 Thread Michal Privoznik
r multiple of underlying pagesize (2MiB) which triggers a check inside of madvise(), since we can't really set a madvise() policy just to a fraction of a page. Signed-off-by: Michal Privoznik --- backends/hostmem.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/

[PATCH] configure: check for $download value properly

2023-06-07 Thread Michal Privoznik
bled Drop the '-f' to check for the actual value of the variable. Fixes: 2019cabfee0 Signed-off-by: Michal Privoznik --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 8765b88e12..8a638dd82a 100755 --- a/configure +++ b/config

[PATCH v3] meson: Avoid implicit declaration of functions

2023-05-30 Thread Michal Privoznik
x27;cc.has_function()' or whether STATX_* macros exist via 'cc.has_header_symbol()'. 1: https://wiki.gentoo.org/wiki/Modern_C_porting Resolves: https://bugs.gentoo.org/898810 Signed-off-by: Michal Privoznik --- v3 of https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg07210.html

[PATCH v2] meson: Avoid implicit declaration of functions

2023-05-29 Thread Michal Privoznik
warning: implicit declaration of function 'malloc_trim' [-Wimplicit-function-declaration] We can check whether given function exists via 'cc.has_function()' or whether STATX_* macros exist via 'cc.has_header_symbol()'. Resolves: https://bugs.gentoo.org/898810 Sig

[PATCH] meson: Avoid implicit declaration of functions

2023-05-29 Thread Michal Privoznik
eclaration of function 'malloc_trim' [-Wimplicit-function-declaration] We can check whether given function exists via 'cc.has_function()' firstly. Resolves: https://bugs.gentoo.org/898810 Signed-off-by: Michal Privoznik --- meson.build | 15 +-- 1 file changed

[PATCH v2] hostmem: Honor multiple preferred nodes if possible

2022-12-15 Thread Michal Privoznik
ich accepts multiple preferred NUMA nodes instead. Then, numa_has_preferred_many() API was introduced to numactl (v2.0.15~26) allowing applications to query kernel support. Wiring this all together, we can pass MPOL_PREFERRED_MANY to the mbind() call instead and stop ignoring multiple nodes, silently. S

[PATCH] hostmem: Honour multiple preferred nodes if possible

2022-12-09 Thread Michal Privoznik
introduced to numactl (v2.0.15~26) allowing applications to query kernel support. Wiring this all together, we can pass MPOL_PREFERRED_MANY to the mbind() call instead and stop ignoring multiple nodes, silently. Signed-off-by: Michal Privoznik --- backends/host

[PATCH v2] seccomp: Get actual errno value from failed seccomp functions

2022-10-26 Thread Michal Privoznik
() fails, because generic -ECANCELED says nothing. Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé --- v2 of: https://lists.gnu.org/archive/html/qemu-devel/2022-10/msg04509.html diff to v1: - added comment when setting SYSRAWRC attribute per Philippe's sugge

[PATCH] seccomp: Get actual errno value from failed seccomp functions

2022-10-25 Thread Michal Privoznik
() fails, because generic -ECANCELED says nothing. Signed-off-by: Michal Privoznik --- meson.build| 9 + softmmu/qemu-seccomp.c | 9 + 2 files changed, 18 insertions(+) diff --git a/meson.build b/meson.build index b686dfef75..5f114c89d9 100644 --- a/meson.build +++ b

[PATCH v3] configure: Avoid using strings binary

2022-10-14 Thread Michal Privoznik
eady doing: comparing __BYTE_ORDER__ against values for little/big endiandness. Bug: https://bugs.gentoo.org/876933 Signed-off-by: Michal Privoznik --- v3 of: https://lists.gnu.org/archive/html/qemu-devel/2022-10/msg02149.html diff to v2: - Check whether __BYTE_ORDER__ is defined prior comparing i

[PATCH v2] configure: Avoid using strings binary

2022-10-13 Thread Michal Privoznik
eady doing: comparing __BYTE_ORDER__ against values for little/big endiandness. Bug: https://bugs.gentoo.org/876933 Signed-off-by: Michal Privoznik --- v2 of: https://lists.gnu.org/archive/html/qemu-devel/2022-10/msg02054.html diff to v1: - Fixed reversed logic - Ditched custom compiler macros i

[PATCH] configure: Avoid using strings binary

2022-10-13 Thread Michal Privoznik
e can rely on macros they declare. Bug: https://bugs.gentoo.org/876933 Signed-off-by: Michal Privoznik --- configure | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 45ee6f4eb3..91e04635cb 100755 --- a/confi

[PATCH] util: NUMA aware memory preallocation

2022-05-09 Thread Michal Privoznik
ryBackend object down to where preallocation threads are created and set their affinity according to the attribute. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2074000 Signed-off-by: Michal Privoznik --- backends/hostmem.c | 6 ++-- hw/virtio/virtio-mem.c | 2 +- include/qemu/osdep

[PATCH] qmp: Stabilize preconfig

2021-10-25 Thread Michal Privoznik
The -preconfig option and exit-preconfig command are around for quite some time now. However, they are still marked as unstable. This is suboptimal because it may block some upper layer in consuming it. In this specific case - Libvirt avoids using experimental features. Signed-off-by: Michal

[PATCH 0/2] Two chardev with fdset fixes

2021-08-17 Thread Michal Privoznik
future me from figuring it out again. NB, I'm not fully convinced that EBADFD is the best value, but anything is better than EACCESS. Michal Privoznik (2): chardev: Propagate error from logfile opening monitor: Report EBADFD if fdset contains invalid FD chardev/char.c | 7 ++- mon

[PATCH 1/2] chardev: Propagate error from logfile opening

2021-08-17 Thread Michal Privoznik
hing complex is happening behind the curtains. But the problem becomes more prominent when passing an "/dev/fdset/XXX" path since much more needs to be done. The fix is to use qemu_create() which passes @errp further down. Signed-off-by: Michal Privoznik --- chardev/char.c | 7 +

[PATCH 2/2] monitor: Report EBADFD if fdset contains invalid FD

2021-08-17 Thread Michal Privoznik
em is that there was no FD within given fdset that was in expected access mode. Therefore, let's set errno to EBADFD, which gives us somewhat better error messages: Could not dup FD for /dev/fdset/3 flags 441: File descriptor in bad state Signed-off-by: Michal Privoznik --- monitor/misc.c

[PATCH 2/2] numa: Parse initiator= attribute before cpus= attribute

2021-07-07 Thread Michal Privoznik
,bandwidth=208896K \ -numa hmat-cache,node-id=0,size=10K,level=1,associativity=direct,policy=write-back,line=8 \ -numa hmat-cache,node-id=1,size=10K,level=1,associativity=direct,policy=write-back,line=8 \ Signed-off-by: Michal Privoznik --- hw/core/numa.c | 45 +++

[PATCH 1/2] numa: Report expected initiator

2021-07-07 Thread Michal Privoznik
nt because an error is being reported). Report both values in the error message. Signed-off-by: Michal Privoznik --- hw/core/machine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index 57c18f909a..6f59fb0b7f 100644 --- a/hw/core/machi

[PATCH 0/2] numa: Parse initiator= attribute before cpus= attribute

2021-07-07 Thread Michal Privoznik
See 2/2 for explanation. The first patch is just cosmetics. Michal Privoznik (2): numa: Report expected initiator numa: Parse initiator= attribute before cpus= attribute hw/core/machine.c | 3 ++- hw/core/numa.c| 45 +++-- 2 files changed, 25

Re: firmware selection for SEV-ES

2021-04-23 Thread Michal Privoznik
On 4/22/21 4:13 PM, Laszlo Ersek wrote: On 04/21/21 13:51, Pavel Hrdina wrote: On Wed, Apr 21, 2021 at 11:54:24AM +0200, Laszlo Ersek wrote: Hi Brijesh, Tom, in QEMU's "docs/interop/firmware.json", the @FirmwareFeature enumeration has a constant called @amd-sev. We should introduce an @amd-sev

Re: [PATCH RESEND] hostmem: Don't report pmem attribute if unsupported

2021-02-16 Thread Michal Privoznik
On 2/17/21 12:07 AM, John Snow wrote: On 2/16/21 5:23 PM, Eduardo Habkost wrote: On Tue, Jan 26, 2021 at 08:48:25AM +0100, Michal Privoznik wrote: When management applications (like Libvirt) want to check whether memory-backend-file.pmem is supported they can list object properties using 

Re: [PATCH RESEND] hostmem: Don't report pmem attribute if unsupported

2021-02-15 Thread Michal Privoznik
On 1/26/21 8:48 AM, Michal Privoznik wrote: When management applications (like Libvirt) want to check whether memory-backend-file.pmem is supported they can list object properties using 'qom-list-properties'. However, 'pmem' is declared always (and thus reported always) and

Re: [PATCH v3] machine: add missing doc for memory-backend option

2021-02-04 Thread Michal Privoznik
On 1/21/21 5:15 PM, Igor Mammedov wrote: > Ping, please? Is there anything I can help with to get this merged? Libvirt's migration is broken without this patch [1] and thus I'd like to have this merged sooner rather than later. 1: There's a libvirt patch required but depends on this one. Tha

Re: [PATCH v3] machine: add missing doc for memory-backend option

2021-01-27 Thread Michal Privoznik
On 1/27/21 6:56 PM, Daniel P. Berrangé wrote: On Wed, Jan 27, 2021 at 04:35:22PM +0100, Igor Mammedov wrote: On Wed, 27 Jan 2021 15:24:26 +0100 Michal Privoznik wrote: On 1/27/21 11:54 AM, Daniel P. Berrangé wrote: On Wed, Jan 27, 2021 at 10:45:11AM +, Daniel P. Berrangé wrote: On Thu

Re: [PATCH v3] machine: add missing doc for memory-backend option

2021-01-27 Thread Michal Privoznik
On 1/27/21 4:35 PM, Igor Mammedov wrote: On Wed, 27 Jan 2021 15:24:26 +0100 Michal Privoznik wrote: On 1/27/21 11:54 AM, Daniel P. Berrangé wrote: On Wed, Jan 27, 2021 at 10:45:11AM +, Daniel P. Berrangé wrote: On Thu, Jan 21, 2021 at 11:15:04AM -0500, Igor Mammedov wrote: How does

Re: [PATCH v3] machine: add missing doc for memory-backend option

2021-01-27 Thread Michal Privoznik
On 1/27/21 11:54 AM, Daniel P. Berrangé wrote: On Wed, Jan 27, 2021 at 10:45:11AM +, Daniel P. Berrangé wrote: On Thu, Jan 21, 2021 at 11:15:04AM -0500, Igor Mammedov wrote: How does a mgmt app know which machine types need to use this option ? The machine type names are opaque strings,

Re: [PATCH v3] machine: add missing doc for memory-backend option

2021-01-27 Thread Michal Privoznik
- add doc that x-use-canonical-path-for-ramblock-id is considered stable, (Peter Krempa ) v3: - s/x-use-canonical-path-for-ramblock-id=on/x-use-canonical-path-for-ramblock-id=off/ (Michal Privoznik ) - add to commit message why x- prefix is preserved - drop clause about x-us

[PATCH RESEND] hostmem: Don't report pmem attribute if unsupported

2021-01-25 Thread Michal Privoznik
uilt without libpmem (and thus can not guarantee write persistence). This is suboptimal since we have ability to declare attributes at compile time. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1915216 Signed-off-by: Michal Privoznik Reviewed-by: Daniel Henrique Barboza Tested-by: Dan

[PATCH] hostmem: Don't report pmem attribute if unsupported

2021-01-19 Thread Michal Privoznik
uilt without libpmem (and thus can not guarantee write persistence). This is suboptimal since we have ability to declare attributes at compile time. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1915216 Signed-off-by: Michal Privoznik --- backends/hostmem-file.c | 13 - 1 file c

Re: [PATCH v2] machine: add missing doc for memory-backend option

2021-01-15 Thread Michal Privoznik
On 1/15/21 12:46 AM, Igor Mammedov wrote: Add documentation for '-machine memory-backend' CLI option and how to use it. And document that x-use-canonical-path-for-ramblock-id, is considered to be stable to make sure it won't go away by accident. Signed-off-by: Igor Mammedov --- v2: - add doc

Re: [PATCH] machine: add missing doc for memory-backend option

2021-01-11 Thread Michal Privoznik
/hostmem.c | 8 qemu-options.hx| 25 - 2 files changed, 32 insertions(+), 1 deletion(-) Reviewed-by: Michal Privoznik Michal

Re: [PATCH 0/2] qemu-ga: add ssh-{add,remove}-authorized-keys

2020-10-14 Thread Michal Privoznik
qga/qapi-schema.json | 32 5 files changed, 476 insertions(+), 1 deletion(-) create mode 100644 qga/commands-posix-ssh.c Reviewed-by: Michal Privoznik Michal

Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24

2020-10-07 Thread Michal Privoznik
On 10/2/20 8:24 PM, Eduardo Habkost wrote: On Fri, Oct 02, 2020 at 06:27:35PM +0200, Paolo Bonzini wrote: On 02/10/20 17:58, Michal Prívozník wrote: cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit Sorry for noticing this earlier, but is this known? The build starts failing

Re: [PATCH v2] cphp: remove deprecated cpu-add command(s)

2020-09-14 Thread Michal Privoznik
st.c | 100 tests/qtest/test-hmp.c | 1 - 13 files changed, 21 insertions(+), 211 deletions(-) Thanks to Peter Libvirt uses device_add instead cpu_add whenever possible. Hence this is okay from Libvirt's POV. Reviewed-by: Michal Privoznik Michal

Re: [PATCH v2 0/2] qmp: Expose MachineClass::default_ram_id

2020-07-28 Thread Michal Privoznik
On 7/27/20 8:41 PM, Eduardo Habkost wrote: Hi Michal, It looks like this has fallen through the cracks, my apologies. I'm queueing this for 5.2. I assume this is the latest version, correct? Yes. No worries, I forgot about it too :-) If I remembered, I would have pinged. Michal

Re: [PATCH v3 0/2] qga: Ditch g_get_host_name()

2020-07-10 Thread Michal Privoznik
On 6/22/20 8:19 PM, Michal Privoznik wrote: v3 of: https://lists.nongnu.org/archive/html/qemu-devel/2020-06/msg06913.html diff to v2: - don't leak @hostname in util/oslib-posix.c:qemu_get_host_name() - document why we are allocating one byte more than needed - switch to g_new0() from g_ma

[PATCH v3 0/2] qga: Ditch g_get_host_name()

2020-06-22 Thread Michal Privoznik
v3 of: https://lists.nongnu.org/archive/html/qemu-devel/2020-06/msg06913.html diff to v2: - don't leak @hostname in util/oslib-posix.c:qemu_get_host_name() - document why we are allocating one byte more than needed - switch to g_new0() from g_malloc0(). Michal Privoznik (2): util: Intr

[PATCH v3 2/2] qga: Use qemu_get_host_name() instead of g_get_host_name()

2020-06-22 Thread Michal Privoznik
st is set up (e.g. on the first boot, or before DHCP) we will report old, invalid hostname. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1845127 Signed-off-by: Michal Privoznik --- qga/commands.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git

[PATCH v3 1/2] util: Introduce qemu_get_host_name()

2020-06-22 Thread Michal Privoznik
This function offers operating system agnostic way to fetch host name. It is implemented for both POSIX-like and Windows systems. Signed-off-by: Michal Privoznik --- include/qemu/osdep.h | 10 ++ util/oslib-posix.c | 35 +++ util/oslib-win32.c | 13

Re: [PATCH v2 1/2] util: Introduce qemu_get_host_name()

2020-06-22 Thread Michal Privoznik
On 6/22/20 7:38 PM, Daniel P. Berrangé wrote: On Mon, Jun 22, 2020 at 07:26:44PM +0200, Michal Privoznik wrote: This function offers operating system agnostic way to fetch host name. It is implemented for both POSIX-like and Windows systems. Signed-off-by: Michal Privoznik --- include/qemu

[PATCH v2 2/2] qga: Use qemu_get_host_name() instead of g_get_host_name()

2020-06-22 Thread Michal Privoznik
st is set up (e.g. on the first boot, or before DHCP) we will report old, invalid hostname. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1845127 Signed-off-by: Michal Privoznik --- qga/commands.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git

[PATCH v2 1/2] util: Introduce qemu_get_host_name()

2020-06-22 Thread Michal Privoznik
This function offers operating system agnostic way to fetch host name. It is implemented for both POSIX-like and Windows systems. Signed-off-by: Michal Privoznik --- include/qemu/osdep.h | 10 ++ util/oslib-posix.c | 32 util/oslib-win32.c | 13

[PATCH v2 0/2] qga: Ditch g_get_host_name()

2020-06-22 Thread Michal Privoznik
v2 of: https://lists.nongnu.org/archive/html/qemu-devel/2020-06/msg04457.html diff to v1: - Move implementation out from qga/ to util/oslib-* Michal Privoznik (2): util: Introduce qemu_get_host_name() qga: Use qemu_get_host_name() instead of g_get_host_name() include/qemu/osdep.h | 10

Re: [PATCH] qga: Use gethostname() instead of g_get_host_name()

2020-06-22 Thread Michal Privoznik
On 6/22/20 12:14 PM, Philippe Mathieu-Daudé wrote: Hi Michal, On 6/16/20 10:34 AM, Michal Privoznik wrote: Problem with g_get_host_name() is that on the first call it saves the hostname into a global variable and from then on, every subsequent call returns the saved hostname. Even if the

Re: [PATCH] qga: Use gethostname() instead of g_get_host_name()

2020-06-22 Thread Michal Privoznik
On 6/19/20 11:54 PM, Richard Henderson wrote: On 6/16/20 1:34 AM, Michal Privoznik wrote: +#ifndef G_OS_WIN32 Nit: positive tests are easier to reason with and extend than negative tests. I would reverse these two blocks and use a positive test for windows. Also, CONFIG_WIN32 is what we use

[PATCH] qga: Use gethostname() instead of g_get_host_name()

2020-06-16 Thread Michal Privoznik
st is set up (e.g. on the first boot, or before DHCP) we will report old, invalid hostname. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1845127 Signed-off-by: Michal Privoznik --- qga/commands.c | 56 ++ 1 file changed, 52 insertions(

Re: [PATCH v2 1/2] qemu-options.hx: Mark all hmat-cache attributes required

2020-06-16 Thread Michal Privoznik
On 6/15/20 10:00 AM, Markus Armbruster wrote: Cc: the people involved in commit c412a48d4d "numa: Extend CLI to provide memory side cache information". Michal Privoznik writes: The documentation to `-numa hmat-cache` says that @node-id, @size and @level are the only required attri

Re: [PATCH v2 2/2] qemu-options.hx: Document hmat-lb and hmat-cache order

2020-06-15 Thread Michal Privoznik
On 6/15/20 10:02 AM, Markus Armbruster wrote: Michal Privoznik writes: To simplify internal implementation the hmat-cache parsing code expects hmat-lb to be already parsed. This means, that hmat-lb arguments must come before hmat-cache. Document this restriction so that management

Re: [PATCH 3/3] numa: Initialize node initiator with respect to .has_cpu

2020-06-11 Thread Michal Privoznik
On 6/5/20 3:52 AM, Tao Xu wrote: On 6/3/20 5:16 PM, Michal Privoznik wrote: On 6/2/20 10:00 AM, Tao Xu wrote: On 6/1/2020 4:10 PM, Michal Privoznik wrote: On 5/29/20 5:09 PM, Igor Mammedov wrote: On Fri, 29 May 2020 15:33:48 +0200 Michal Privoznik wrote: The initiator attribute of a NUMA

[PATCH v2 2/2] qemu-options.hx: Document hmat-lb and hmat-cache order

2020-06-10 Thread Michal Privoznik
To simplify internal implementation the hmat-cache parsing code expects hmat-lb to be already parsed. This means, that hmat-lb arguments must come before hmat-cache. Document this restriction so that management applications can follow it. Signed-off-by: Michal Privoznik --- qemu-options.hx | 3

[PATCH v2 1/2] qemu-options.hx: Mark all hmat-cache attributes required

2020-06-10 Thread Michal Privoznik
associativity missing. According to QAPI all attributes are required. Make the docs reflect that. Signed-off-by: Michal Privoznik --- qemu-options.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 93bde2bbc8..b1a399079a 100644 --- a

[PATCH v2 0/2] A pair of HMAT docs fixes

2020-06-10 Thread Michal Privoznik
Technically, this is a v2 of: https://lists.nongnu.org/archive/html/qemu-devel/2020-05/msg08316.html But as it turned out during the review of v1, we don't need to change the code rather than documentation. Michal Privoznik (2): qemu-options.hx: Mark all hmat-cache attributes required

Re: [PATCH] numa: forbid '-numa node, mem' for 5.1 and newer machine types

2020-06-04 Thread Michal Privoznik
w/i386/pc_q35.c | 1 + hw/ppc/spapr.c | 2 +- qemu-options.hx| 9 + 8 files changed, 15 insertions(+), 24 deletions(-) This works with libvirt perfectly. Reviewed-by: Michal Privoznik Michal

Re: [PATCH 3/3] numa: Initialize node initiator with respect to .has_cpu

2020-06-03 Thread Michal Privoznik
On 6/2/20 10:00 AM, Tao Xu wrote: On 6/1/2020 4:10 PM, Michal Privoznik wrote: On 5/29/20 5:09 PM, Igor Mammedov wrote: On Fri, 29 May 2020 15:33:48 +0200 Michal Privoznik wrote: The initiator attribute of a NUMA node is documented as the 'NUMA node that has best performance to given

Re: [PATCH 0/3] Couple of HMAT fixes

2020-06-01 Thread Michal Privoznik
On 5/29/20 3:33 PM, Michal Privoznik wrote: I've started working on libvirt side of this feature. WIP patches can be found here: https://github.com/zippy2/libvirt/commits/hmat I've gotten to a point where libvirt generates cmd line but QEMU refuses it. Problem is that I was looking

Re: [PATCH 3/3] numa: Initialize node initiator with respect to .has_cpu

2020-06-01 Thread Michal Privoznik
On 5/29/20 5:09 PM, Igor Mammedov wrote: On Fri, 29 May 2020 15:33:48 +0200 Michal Privoznik wrote: The initiator attribute of a NUMA node is documented as the 'NUMA node that has best performance to given NUMA node'. If a NUMA node has at least one CPU there can hardly be a diff

Re: [PATCH 3/3] numa: Initialize node initiator with respect to .has_cpu

2020-05-29 Thread Michal Privoznik
On 5/29/20 5:09 PM, Igor Mammedov wrote: On Fri, 29 May 2020 15:33:48 +0200 Michal Privoznik wrote: The initiator attribute of a NUMA node is documented as the 'NUMA node that has best performance to given NUMA node'. If a NUMA node has at least one CPU there can hardly be a diff

Re: [PATCH 2/3] numa: Allow HMAT cache to be defined before HMAT latency/bandwidth

2020-05-29 Thread Michal Privoznik
On 5/29/20 4:59 PM, Igor Mammedov wrote: On Fri, 29 May 2020 15:33:47 +0200 Michal Privoznik wrote: Currently, when defining a HMAT cache for a NUMA node (in parse_numa_hmat_cache()) there is this check that forces users to define HMAT latency/bandwidth first. There is no real need for this

[PATCH 1/3] qapi: Make @associativity, @policy and @line of NumaHmatCacheOptions optional

2020-05-29 Thread Michal Privoznik
associativity missing. Signed-off-by: Michal Privoznik --- qapi/machine.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index ff7b5032e3..952784f8ba 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -723,9 +723,9 @@ '

[PATCH 2/3] numa: Allow HMAT cache to be defined before HMAT latency/bandwidth

2020-05-29 Thread Michal Privoznik
ACPI table is constructed. Signed-off-by: Michal Privoznik --- hw/core/numa.c | 8 1 file changed, 8 deletions(-) diff --git a/hw/core/numa.c b/hw/core/numa.c index 316bc50d75..338453461c 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -384,7 +384,6 @@ void parse_numa_hmat_cache

[PATCH 3/3] numa: Initialize node initiator with respect to .has_cpu

2020-05-29 Thread Michal Privoznik
flect this fact when initializing the attribute. Signed-off-by: Michal Privoznik --- hw/core/numa.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/core/numa.c b/hw/core/numa.c index 338453461c..1c9bc761cc 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c

  1   2   3   4   >