[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/3] hw/xen/xen_pt: Save back data only for declared regis
|
From: |
Anthony PERARD |
|
Subject: |
Re: [PATCH v3 1/3] hw/xen/xen_pt: Save back data only for declared registers |
|
Date: |
Wed, 28 Aug 2024 16:38:09 +0000 |
On Mon, May 06, 2024 at 02:33:20AM +0200, Marek Marczykowski-Górecki wrote:
> Call pci_default_write_config() only after resolving any handlers from
> XenPTRegInfo structures, and only with a value updated with those
> handlers. This is important for two reasons:
> 1. XenPTRegInfo has ro_mask which needs to be enforced - Xen-specific
> hooks do that on their own (especially xen_pt_*_reg_write()).
> 2. Not setting value early allows hooks to see the old value too.
>
> If it would be only about the first point, setting PCIDevice.wmask would
> probably be sufficient, but given the second point, change those
> writes.
>
> Relevant handlers already save data back to the emulated registers
> space, call the pci_default_write_config() only for its side effects.
>
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> ---
> v3:
> - use emulated register value for pci_default_write_config() call, not
> the one for writting back to the hardware
> - greatly simplify the patch by calling pci_default_write_config() on
> the whole value
> v2:
> - rewrite commit message, previous one was very misleading
> - fix loop saving register values
> - fix int overflow when calculating write mask
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v3 1/3] hw/xen/xen_pt: Save back data only for declared registers,
Anthony PERARD <=