On Mon, 11 Oct 2021, Michael S. Tsirkin wrote:
On Mon, Oct 11, 2021 at 03:51:01PM +0200, BALATON Zoltan wrote:
... but given we did not previously do the read, maybe we should keep
it that way at least for the time being.
How do you know there was no read before this write? Did you check it? I've
only added a printf in the write method and saw the value was swapped but
did not check if there was a read before that. There are no traces in these
methods so maybe I would not see it unless adding a printf there too.
All I am saying is that qemu did not convert a write into
a read+write.
OK confirmed that by disabling pm_io_space_update() in hw/isa/vt82c686.c
so the via-pm region is never mapped and then modifying the log messages
for invalid accesses (patch sent separately) I get:
~ # poweroff
Sent SIGKILL to all processes
Requesting system poweroff
pci_cfg_write vt82c686b-usb-uhci 12:3 @0xc0 <- 0x8f00
pci_cfg_write vt82c686b-usb-uhci 12:2 @0xc0 <- 0x8f00
[ 16.498465] reboot: Power down
Invalid write at addr 0xFE000F05, size 1, region '(null)', reason: rejected
Invalid write at addr 0xF05, size 1, region '(null)', reason: rejected
So the guest only tries to write one byte but not sure if the read
generated within memory.c would show up in these logs. I suspect if you
fixed that you'd get all sorts of problems with other device models so the
less likely to break anything fix would be to go back to native endian for
acpi but I wait for what you come up with. I'd like this to be fixed one
way or another for 6.2 and fixing endianness would probably be enough for
that.
Regards,
BALATON Zoltan