Re: [PATCH] hw/xen/xen_pt: fix uninitialized variable

2023-01-27 Thread Stefano Stabellini
On Fri, 27 Jan 2023, Marek Marczykowski-Górecki wrote: > xen_pt_config_reg_init() reads only that many bytes as the size of the > register that is being initialized. It uses > xen_host_pci_get_{byte,word,long} and casts its last argument to > expected pointer type. This means for smaller registers

[PATCH] hw/xen/xen_pt: fix uninitialized variable

2023-01-26 Thread Marek Marczykowski-Górecki
xen_pt_config_reg_init() reads only that many bytes as the size of the register that is being initialized. It uses xen_host_pci_get_{byte,word,long} and casts its last argument to expected pointer type. This means for smaller registers higher bits of 'val' are not initialized. Then, the function fa