qemu-e2k/include/hw
Hyeonggon Yoo f7509f462c hw/cxl/device: read from register values in mdev_reg_read()
In the current mdev_reg_read() implementation, it consistently returns
that the Media Status is Ready (01b). This was fine until commit
25a52959f9 ("hw/cxl: Add support for device sanitation") because the
media was presumed to be ready.

However, as per the CXL 3.0 spec "8.2.9.8.5.1 Sanitize (Opcode 4400h)",
during sanitation, the Media State should be set to Disabled (11b). The
mentioned commit correctly sets it to Disabled, but mdev_reg_read()
still returns Media Status as Ready.

To address this, update mdev_reg_read() to read register values instead
of returning dummy values.

Note that __toggle_media() managed to not only write something
that no one read, it did it to the wrong register storage and
so changed the reported mailbox size which was definitely not
the intent. That gets fixed as a side effect of allocating
separate state storage for this register.

Fixes: commit 25a52959f9 ("hw/cxl: Add support for device sanitation")
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240126120132.24248-7-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-02-14 06:09:32 -05:00
..
acpi
adc
arm hw/arm: Connect SPI Controller to BCM2835 2024-02-02 13:51:59 +00:00
audio m68k: Clean up includes 2024-01-30 21:20:20 +03:00
block hw/block/fdc-isa: Implement relocation and enabling/disabling for TYPE_ISA_FDC 2024-02-14 06:09:32 -05:00
char hw/char/parallel-isa: Implement relocation and enabling/disabling for TYPE_ISA_PARALLEL 2024-02-14 06:09:32 -05:00
core include/hw/core: Add mmu_index to CPUClass 2024-02-03 08:52:25 +10:00
cpu
cris hw/net/etraxfs-eth: use qemu_configure_nic_device() 2024-02-02 16:23:47 +00:00
cxl hw/cxl/device: read from register values in mdev_reg_read() 2024-02-14 06:09:32 -05:00
display
dma
firmware smbios: function to set default processor family 2024-02-09 20:43:14 +10:00
fsi hw/fsi: Aspeed APB2OPB & On-chip peripheral bus 2024-02-01 08:33:18 +01:00
gpio
hyperv
i2c
i386 hw/i386/x86: Fix PIC interrupt handling if APIC is globally disabled 2024-02-14 06:09:32 -05:00
ide
input
intc hw/arm/armv7m: Make 'hw/intc/armv7m_nvic.h' a target agnostic header 2024-01-26 11:30:49 +00:00
ipack
ipmi
isa
loongarch hw/loongarch/virt: Set iocsr address space per-board rather than percpu 2024-01-11 19:22:47 +08:00
m68k m68k: Clean up includes 2024-01-30 21:20:20 +03:00
mem include: Clean up includes 2024-01-30 21:20:20 +03:00
mips
misc hw/misc/xlnx-versal-crl: Include generic 'cpu-qom.h' instead of 'cpu.h' 2024-01-26 11:30:48 +00:00
net target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
nubus
nvram acpi: Clean up includes 2024-01-30 21:20:20 +03:00
openrisc
pci hw/pci: remove pci_nic_init_nofail() 2024-02-02 16:23:48 +00:00
pci-bridge
pci-host hw/pci-host/gpex: Define properties for MMIO ranges 2024-01-10 18:47:47 +10:00
ppc include: Clean up includes 2024-01-30 21:20:20 +03:00
rdma
remote
riscv hw/riscv/virt: Update GPEX MMIO related properties 2024-01-10 18:47:47 +10:00
rtc
rx
s390x s390x/pci: drive ISM reset from subsystem reset 2024-01-19 11:38:32 +01:00
scsi scsi: Don't ignore most usb-storage properties 2024-02-07 15:25:13 +01:00
sd
sensor
sh4
southbridge
sparc
ssi hw/ssi: Implement BCM2835 SPI Controller 2024-02-02 13:51:59 +00:00
timer
tricore
usb
vfio vfio/iommufd: Introduce a VFIOIOMMU iommufd QOM interface 2024-01-05 21:25:20 +01:00
virtio hw/virtio: derive vhost-user-input from vhost-user-base 2024-02-14 06:09:32 -05:00
watchdog
xen hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs 2024-02-02 16:23:47 +00:00
xtensa
boards.h
clock.h
elf_ops.h hw/elf_ops: Ignore loadable segments with zero size 2024-01-19 12:28:59 +01:00
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h
loader-fit.h
loader.h
nmi.h
or-irq.h
pcmcia.h
platform-bus.h
ptimer.h
qdev-clock.h
qdev-core.h oslib-posix: initialize backend memory objects in parallel 2024-02-06 08:15:22 +01:00
qdev-dma.h
qdev-properties-system.h
qdev-properties.h
register.h
registerfields.h
resettable.h
stream.h
sysbus.h
usb.h
vmstate-if.h