• X
    nvdimm acpi: introduce fit buffer · 75b0713e
    Xiao Guangrong 提交于
    The buffer is used to save the FIT info for all the presented nvdimm
    devices which is updated after the nvdimm device is plugged or
    unplugged. In the later patch, it will be used to construct NVDIMM
    ACPI _FIT method which reflects the presented nvdimm devices after
    nvdimm hotplug
    
    As FIT buffer can not completely mapped into guest address space,
    OSPM will exit to QEMU multiple times, however, there is the race
    condition - FIT may be changed during these multiple exits, so that
    some rules are introduced:
    1) the user should hold the @lock to access the buffer and
    2) mark @dirty whenever the buffer is updated.
    
    @dirty is cleared for the first time OSPM gets fit buffer, if
    dirty is detected in the later access, OSPM will restart the
    access
    
    As fit should be updated after nvdimm device is successfully realized
    so that a new hotplug callback, post_hotplug, is introduced
    Signed-off-by: NXiao Guangrong <guangrong.xiao@linux.intel.com>
    Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
    75b0713e
pc.c 71.2 KB