- Apr 05, 2017
-
-
Paolo Bonzini authored
This behavior is not indicated in the datasheet and can confuse the OS. The TCO can trap NMIs from SERR# or IOCHK# and convert them to SMIs; but any other TCO event is either delivered as an SMI or completely disabled. Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 22, 2017
-
-
Laszlo Ersek authored
A system with multiple VMGENID devices is undefined in the VMGENID spec by omission. Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Ben Warren <ben@skyportsystems.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Laszlo Ersek authored
The WRITE_POINTER linker/loader command that underlies VMGENID depends on commit baf2d5bf ("fw-cfg: support writeable blobs", 2017-01-12), which in turn depends on fw_cfg DMA. DMA for fw_cfg is enabled in 2.5+ machine types only (see commit e6915b5f, "fw_cfg: unbreak migration compatibility for 2.4 and earlier machines", 2016-02-18). Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Ben Warren <ben@skyportsystems.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Ben Warren <ben@skyportsystems.com <mailto:ben@skyportsystems.com>> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
- Mar 15, 2017
-
-
Ben Warren authored
This was crashing due to NULL-pointer dereference QMP Test case: ============== (QEMU) query-vm-generation-id {"error": {"class": "GenericError", "desc": "VM Generation ID device not found"}} HMP Test case: ============== virsh # qemu-monitor-command --hmp 3 info vm-generation-id VM Generation ID device not found Signed-off-by:
Ben Warren <ben@skyportsystems.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- Mar 02, 2017
-
-
Igor Mammedov authored
Add commands to query Virtual Machine Generation ID counter. QMP command example: { "execute": "query-vm-generation-id" } HMP command example: info vm-generation-id Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Ben Warren <ben@skyportsystems.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Tested-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Ben Warren authored
This implements the VM Generation ID feature by passing a 128-bit GUID to the guest via a fw_cfg blob. Any time the GUID changes, an ACPI notify event is sent to the guest The user interface is a simple device with one parameter: - guid (string, must be "auto" or in UUID format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) Signed-off-by:
Ben Warren <ben@skyportsystems.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Tested-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Ben Warren authored
This allows them to be centrally initialized and destroyed The "AcpiBuildTables.vmgenid" array will be used to construct the "etc/vmgenid_guid" fw_cfg blob. Its contents will be linked into fw_cfg after being built on the pc_machine_done() -> acpi_setup() -> acpi_build() call path, and dropped without use on the subsequent, guest triggered, acpi_build_update() -> acpi_build() call path. Signed-off-by:
Ben Warren <ben@skyportsystems.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Ben Warren authored
This is similar to the existing 'add pointer' functionality, but instead of instructing the guest (BIOS or UEFI) to patch memory, it instructs the guest to write the pointer back to QEMU via a writeable fw_cfg file. Signed-off-by:
Ben Warren <ben@skyportsystems.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com> Tested-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Mar 01, 2017
-
-
Marc-André Lureau authored
Apparently, none of the bus owner give a reference to the hotplug handler property, do not unref it on bus release. Furthermore, a bus is allowed to be its own hotplug handler, which can be seen in qbus_set_bus_hotplug_handler() function. However, in this case, the reference can't be given to the property, or this will create a cyclic dependency and the bus will never be free. Each bus owner should manage the lifecycle of the hotplug handler. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Igor Mammedov authored
PCI hotplug for bridges was introduced only since 2.0 however acpi_set_bsel()->object_property_add_uint32_ptr(bus, ACPI_PCIHP_PROP_BSEL) didn't take in account that for legacy mode (1.7) when PCI hotplug for bridges is unavailable and ACPI_PCIHP_PROP_BSEL property the only bus "PCI.0' has been created earlier at acpi_pcihp_init() time. We managed to live with it only because of error rised by adding a duplicate property in acpi_set_bsel() has been ignored which resulted in useless leaking of just allocated (int)bus_bsel. Issue affects only 1.7 machine type as ACPI tables supported by QEMU were introduced at that time, but there wasn't PCI hotplug for bridges till the next release (2.0). Fix it by removing duplicate ACPI_PCIHP_PROP_BSEL intialization in acpi_pcihp_init() and doing it only in one place acpi_set_pci_info(). PS: do not ignore error returned by object_property_add_uint32_ptr() and abort QEMU since it's programming error which should be fixed instead of being ignored. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reported-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1470211497-116801-1-git-send-email-imammedo@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> [ Marc-André - Remove now unused ACPI_PCIHP_LEGACY_SIZE ] Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
- Feb 28, 2017
-
-
Igor Pavlikevich authored
TCO timer does not actually stop Signed-off-by:
Igor Pavlikevich <ipavlikevich@gmail.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- Feb 22, 2017
-
-
Igor Mammedov authored
so it could be reused for SPAPR cores as well Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- Jan 23, 2017
-
-
Igor Mammedov authored
make sure that external callers won't try to modify possible_cpus and owner of possible_cpus can access it directly when it modifies it. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Message-Id: <1484759609-264075-5-git-send-email-imammedo@redhat.com> Reviewed-by:
Eduardo Habkost <ehabkost@redhat.com> Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com>
-
- Jan 16, 2017
-
-
Paolo Bonzini authored
Copy the mechanism of hw/smbios/smbios-stub.c to implement an ACPI-stub instead, so that -acpitable can be later extended to ARM. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
No need to include them in libqemustub.a, since only system emulators need them. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jan 10, 2017
-
-
Igor Mammedov authored
Move DIMM devices from global _SB scope to a new \_SB.MHPC container along with common methods used by DIMMs: MCRS, MRST, MPXM, MOST, MEJ00, MSCN, MTFY this reduces AML size on 12 * #slots bytes, i.e. up to 3072 bytes for 265 slots. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com>
-
Igor Mammedov authored
That reduces DSDT by 910 bytes when memory hotplug isn't enabled. While doing so drop intermediate variables/arguments passing around ACPI_MEMORY_HOTPLUG_IO_LEN and making it local to memory_hotplug.c, hardcoding it there as it can't change. Also don't pass around ACPI_MEMORY_HOTPLUG_BASE through intermediate variables/arguments where it's not needed. Instead initialize in module static variable when MMIO region is mapped and use that within memory_hotplug.c whenever it's required. That way MMIO base specified only at one place and AML with MMIO would always use the same value. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com>
-
Igor Mammedov authored
Move defines used locally only by memory_hotplug.c into it from header files. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com>
-
Igor Mammedov authored
>From this patch all the memory hotplug related AML bits are consolidated in one place within DSTD. Follow up patches will utilize that to simplify memory hotplug related C/AML code. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com>
-
Igor Mammedov authored
It consolidates memory hotplug AML in one place within DSDT Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Igor Mammedov authored
since static and dynamic parts of memory MHPD device are now in the same table (DSDT), there is no point keeping them scattered across the table, so consolidate it in one place. There aren't any functional change, only AML text movement from externally refferenced MHPD scope directly into MHPD device declaration. Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com>
-
Igor Mammedov authored
Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com>
-
Igor Mammedov authored
Signed-off-by:
Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com>
-
- Nov 15, 2016
-
-
Xiao Guangrong authored
and use it to replace the raw number Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
to make the code more clearer Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
Rename it to nvdimm_dsm_handle_reserved_root_method Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
fixed the English issue and code-style issue Suggested-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
and use these codes to refine the code Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
Rename it to nvdimm_plug() Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
inline buf_size to refine the code a bit Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
Its behavior has been changed as the nvdimm device which is being realized also will be handled in this function, so rename it to reflect the fact Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
To make the code more clearer, we 1) check ram_slots first, and build ssdt & nfit only when it is available 2) use nvdimm_get_plugged_device_list() to check if there is nvdimm device plugged Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
as they use completely different way to handle hotplug event Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
as there is a global lock to protect vm-exit handlers and QMP/monitor, this lock can be dropped Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
Xiao Guangrong authored
as nvdimm acpi is okay to build fit when the nvdimm device has not been 'realized' Suggested-by:
Igor Mammedov <imammedo@redhat.com> Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Igor Mammedov <imammedo@redhat.com>
-
- Nov 01, 2016
-
-
Haozhong Zhang authored
Commit 35c5a52d "acpi: do not use TARGET_PAGE_SIZE" changed struct NvdimmDsmIn from a variable-size structure to a fixed-size structure of 4096 bytes. It forgot to adjust an assert in nvdimm_dsm_set_label_data(..., NvdimmDsmIn *in, ...): assert(sizeof(*in) + sizeof(*set_label_data) + set_label_data->length <= 4096); which could crash QEMU when guest writes NVDIMM labels. Fix it by replacing sizeof(*in) by offsetof(NvdimmDsmIn, arg3). Signed-off-by:
Haozhong Zhang <haozhong.zhang@intel.com> Reported-by:
Dan Williams <dan.j.williams@intel.com> Tested-by:
Dan Williams <dan.j.williams@intel.com> Reviewed-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Corey Minyard authored
The initialization was missed before, resulting in some bad data in the smbus case. Signed-off-by:
Corey Minyard <cminyard@mvista.com> Cc: qemu-stable@nongnu.org Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Xiao Guangrong authored
_GPE.E04 is dedicated for nvdimm device hotplug Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Xiao Guangrong authored
_FIT is required for hotplug support, guest will inquire the updated device info from it if a hotplug event is received As FIT buffer is not completely mapped into guest address space, so a new function, Read FIT whose UUID is UUID 648B9CF2-CDA1-4312-8AD9-49C4AF32BD62, handle 0x10000, function index is 0x1, is reserved by QEMU to read the piece of FIT buffer. The buffer is concatenated before _FIT return Refer to docs/specs/acpi-nvdimm.txt for detailed design Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Xiao Guangrong authored
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:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-