Bug 1915198

Summary: Rebase mingw-qemu-ga-win to qemu 5.2
Product: Red Hat Enterprise Linux 8 Reporter: Basil Salman <bsalman>
Component: virtio-winAssignee: Virtualization Maintenance <virt-maint>
virtio-win sub component: qemu-ga-win QA Contact: dehanmeng <demeng>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ailan, demeng, lijin, lizhu, lmiksik, mdean, yvugenfi
Version: 8.4Keywords: Rebase, Triaged
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1935250 (view as bug list) Environment:
Last Closed: 2021-05-18 16:25:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1928649    
Bug Blocks: 1909073, 1919535, 1920874, 1929144, 1935250    

Description Basil Salman 2021-01-12 08:53:44 UTC
Description of problem:


Currently mingw-qemu-ga-win is based on qemu 3.1, there are many patches upstream, some of them were backported to work with qemu 3.1 but as there has been many changes and qemu is being built using meson, rebasing to qemu 5.2 would be easier to maintain.

Comment 1 dehanmeng 2021-02-05 02:07:18 UTC
set ITR to rhel840 and ITM16 according to discussion with basil in mail. 
thanks

Comment 6 Basil Salman 2021-02-24 22:35:24 UTC
Hi Dehan,

Scratch build with changes:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35146591
can this build be verified ?

Thanks in advance,
Basil

Comment 7 dehanmeng 2021-02-25 00:58:48 UTC
(In reply to Basil Salman from comment #6)
> Hi Dehan,
> 
> Scratch build with changes:
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35146591
> can this build be verified ?
> 
> Thanks in advance,
> Basil

Hi Basil,
Okay, sure, Will use this new build to check and update result asap. thanks for your effort, Basil.

BR
Dehan

Comment 12 Basil Salman 2021-03-06 19:56:31 UTC
Build that resolves this bug:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35297151

Comment 14 dehanmeng 2021-03-08 09:48:11 UTC
Since related issues have been verified and resolved, this bug is directly regarded as verified.

Comment 15 dehanmeng 2021-03-08 11:58:28 UTC
Hit a new issue out, that it might be a serious problem after I contacted with Basil. 
These two commands "guest-fstrim" and "guest-exec" have the same problem as following.
step to reproduce :
1. bootup guest with:
/usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox on  \
    -machine q35 \
    -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
    -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0  \
    -nodefaults \
    -monitor stdio \
    -m 4096  \
    -device virtio-vga,id=video0 \
    -smp 24,maxcpus=24,cores=12,threads=1,dies=1,sockets=2  \
    -cpu 'Skylake-Server',hv_stimer,hv_synic,hv_vpindex,hv_relaxed,hv_spinlocks=0xfff,hv_vapic,hv_time,hv_frequencies,hv_runtime,hv_tlbflush,hv_reenlightenment,hv_stimer_direct,hv_ipi,+kvm_pv_unhalt \
    -chardev socket,path=/tmp/avocado_adfijf889/monitor-qmpmonitor1-20210105-032815-BLpNoZnG,id=qmp_id_qmpmonitor1,nowait,server  \
    -mon chardev=qmp_id_qmpmonitor1,mode=control \
    -chardev socket,path=/tmp/avocado_adfijf889/monitor-catch_monitor-20210105-032815-BLpNoZnG,id=qmp_id_catch_monitor,nowait,server  \
    -mon chardev=qmp_id_catch_monitor,mode=control \
    -device pvpanic,ioport=0x505,id=idXAAXfN \
    -chardev socket,path=/tmp/avocado_adfijf889/serial-serial0-20210105-032815-BLpNoZnG,id=chardev_serial0,nowait,server \
    -device isa-serial,id=serial0,chardev=chardev_serial0 \
    -chardev socket,path=/tmp/avocado_adfijf889/serial-org.qemu.guest_agent.0-20210105-032815-BLpNoZnG,id=chardev_org.qemu.guest_agent.0,nowait,server \
    -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
    -device virtio-serial-pci,id=virtio_serial_pci0,bus=pcie-root-port-1,addr=0x0 \
    -device virtserialport,id=org.qemu.guest_agent.0,name=org.qemu.guest_agent.0,chardev=chardev_org.qemu.guest_agent.0,bus=virtio_serial_pci0.0,nr=1  \
    -chardev socket,id=seabioslog_id_20210105-032815-BLpNoZnG,path=/tmp/avocado_adfijf889/seabios-20210105-032815-BLpNoZnG,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20210105-032815-BLpNoZnG,iobase=0x402 \
    -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
    -device qemu-xhci,id=usb1,bus=pcie-root-port-2,addr=0x0 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-3,addr=0x0 \
    -blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=win10-64-virtio-scsi.qcow2,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \
    -device scsi-hd,id=image1,drive=drive_image1,write-cache=on \
    -blockdev node-name=file_image2,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=data.qcow2,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_image2,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image2 \
    -device scsi-hd,id=image2,drive=drive_image2,write-cache=on \
    -device pcie-root-port,id=pcie-root-port-4,port=0x4,addr=0x1.0x4,bus=pcie.0,chassis=5 \
    -device virtio-net-pci,mac=9a:53:3e:06:b0:47,id=idKpQvyY,netdev=idpFCo1s,bus=pcie-root-port-4,addr=0x0  \
    -netdev tap,id=idpFCo1s,vhost=on \
    -blockdev node-name=file_cd1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/iso/windows/winutils.iso,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_cd1,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_cd1 \
    -device scsi-cd,id=cd1,drive=drive_cd1,write-cache=on \
    -blockdev node-name=file_virtio,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-196.iso,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_virtio,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_virtio \
    -device scsi-cd,id=virtio,drive=drive_virtio,write-cache=on  \
    -blockdev node-name=file_virtio2,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-195.iso,cache.direct=on,cache.no-flush=off \
    -blockdev node-name=drive_virtio2,driver=raw,read-only=on,cache.direct=on,cache.no-flush=off,file=file_virtio2 \
    -device scsi-cd,id=virtio2,drive=drive_virtio2,write-cache=on  \
    -device pcie-root-port,id=pcie-root-port-5,port=0x5,addr=0x1.0x5,bus=pcie.0,chassis=6 \
-device virtio-gpu-pci,id=video1,bus=pcie-root-port-5,addr=0x0 \
    -device pcie-root-port,id=pcie-root-port-6,port=0x6,addr=0x1.0x6,bus=pcie.0,chassis=7 \
-device virtio-gpu-pci,id=video2,bus=pcie-root-port-6,addr=0x0 \
    -vnc :8  \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot menu=off,order=cdn,once=c,strict=off \
    -enable-kvm \
2. connect guest via qga and send commands:
[root@dell-per440-03 verify_bz_rebase]# nc -U /tmp/avocado_adfijf889/serial-org.qemu.guest_agent.0-20210105-032815-BLpNoZnG
{"execute":"guest-ping"}
{"return": {}}

How reproduce:
100%

pkgs:
qemu-kvm-block-curl-5.2.0-8.module+el8.4.0+10093+e085f1eb.x86_64
kernel-4.18.0-291.el8.x86_64
seabios-1.14.0-1.module+el8.4.0+8855+a9e237a9.x86_64
qemu-guest-agent-5.2.0-8.module+el8.4.0+10093+e085f1eb.x86_64
qemu-ga-win-102.0.0-1.el8.noarch.rpm

Actual result:
{"execute":"guest-fstrim"}	
{"return": {"paths": [{"path": "C:\\", "error": "Failed to read from child pipe (EOF)"}, {"path": "D:\\", "error": "Failed to read from child pipe (EOF)"}, {"path": "S:\\", "error": "Failed to read from child pipe (EOF)"}]}}
{"execute": "guest-exec", "arguments": {"path": "PING", "arg": [ "www.redhat.com" ],"capture-output": true}}
{"error": {"class": "GenericError", "desc": "Guest agent command failed, error was 'Failed to read from child pipe (EOF)'"}

Expected result:
{"execute":"guest-fstrim"}
{"return": {"paths": [{"path": "C:\\"}, {"path": "D:\\"}, {"path": "S:\\"}]}}
{"execute": "guest-exec", "arguments": {"path": "PING", "arg": [ "www.redhat.com" ],"capture-output": true}}
{"return": {"pid": 3044}}

Addition info:
previous version of qemu-ga-win didn't hit this issue.

Comment 20 errata-xmlrpc 2021-05-18 16:25:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virtio-win bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:1959