- May 04, 2017
-
-
Marc-André Lureau authored
The list is now empty, the chardev cleanup is taken care of by the unref of the root container. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Add a /chardevs container object to hold the list of chardevs. (Note: QTAILQ chardevs is going away in the following commits) Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
The function simply alias and hides the real event function. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
- Apr 27, 2017
-
-
Vinzenz Feenstra authored
A command that will list all currently logged in users, and the time since when they are logged in. Examples: virsh # qemu-agent-command F25 '{ "execute": "guest-get-users" }' {"return":[{"login-time":1490622289.903835,"user":"root"}]} virsh # qemu-agent-command Win2k12r2 '{ "execute": "guest-get-users" }' {"return":[{"login-time":1490351044.670552,"domain":"LADIDA", "user":"Administrator"}]} Signed-off-by:
Vinzenz Feenstra <vfeenstr@redhat.com> * make g_hash_table_contains compat func inline to avoid unused warnings Signed-off-by:
Michael Roth <mdroth@linux.vnet.ibm.com>
-
- Apr 26, 2017
-
-
Cédric Le Goater authored
OpenPOWER systems expect to be notified with such an event before a shutdown or a reboot. An OEM SEL message is sent with specific identifiers and a user data containing the request : OFF or REBOOT. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
Skiboot, the firmware for the PowerNV platform, expects the BMC to provide some specific IPMI sensors. These sensors are exposed in the device tree and their values are updated by the firmware at boot time. Sensors of interest are : "FW Boot Progress" "Boot Count" As such a device is defined on the command line, we can only detect its presence at reset time. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Benjamin Herrenschmidt authored
It adds the Naples chip which supports proper LPC interrupts via the LPC controller rather than via an external CPLD. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> [clg: - updated for qemu-2.9 - ported on latest PowerNV patchset - moved the IRQ handler in pnv_lpc.c - introduced pnv_lpc_isa_irq_create() to create the ISA IRQs ] Signed-off-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
xics_system_init() does not need 'nr_servers' anymore as it is only used to define the 'interrupt-controller' node in the device tree. So let's just compute the value when calling spapr_dt_xics(). This also gives us an opportunity to simplify the xics_system_init() routine and introduce a specific spapr_ics_create() helper to create the sPAPR ICS object. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
It will be used to fill the message buffer with custom events expected by some systems. Typically, an Open PowerNV platform guest is notified with an OEM SEL message before a shutdown or a reboot. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Acked-by:
Corey Minyard <cminyard@mvista.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
This patch exposes a new IPMI routine to query a sdr entry from the sdr table maintained by the IPMI BMC simulator. The API is very similar to the internal sdr_find_entry() routine and should be used the same way to query one or all sdrs. A typical use would be to loop on the sdrs to build nodes of a device tree. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Acked-by:
Corey Minyard <cminyard@mvista.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Benjamin Herrenschmidt authored
The OCC is an on-chip microcontroller based on a ppc405 core used for various power management tasks. It comes with a pile of additional hardware sitting on the PIB (aka XSCOM bus). At this point we don't emulate it (nor plan to do so). However there is one facility which is provided by the surrounding hardware that we do need, which is the interrupt generation facility. OPAL uses it to send itself interrupts under some circumstances and there are other uses around the corner. So this implement just enough to support this. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> [clg: - updated for qemu-2.9 - changed the XSCOM interface to fit new model - QOMified the model ] Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
The Processor Service Interface (PSI) Controller is one of the engines of the "Bridge" unit which connects the different interfaces to the Power Processor. This adds just enough of the PSI bridge to handle various on-chip and the one external interrupt. The rest of PSI has to do with the link to the IBM FSP service processor which we don't plan to emulate (not used on OpenPower machines). The ics_get() and ics_resend() handlers of the XICSFabric interface of the PowerNV machine are now defined to handle the Interrupt Control Source of PSI. The InterruptStatsProvider interface is also modified to dump the new ICS. Originally from Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
This provides to a PowerNV chip (POWER8) access to the Interrupt Management area, which contains the registers of the Interrupt Control Presenters of each thread. These are used to accept, return, forward interrupts in the system. This area is modeled with a per-chip container memory region holding all the ICP registers. Each thread of a chip is then associated with its ICP registers using a memory subregion indexed by its PIR number in the overall region. The device tree is populated accordingly. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
Some controllers (ICP, PSI) have a base register address which is calculated using the chip id. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
This provides a new ICPState object for the PowerNV machine (POWER8). Access to the Interrupt Management area is done though a memory region. It contains the registers of the Interrupt Control Presenters of each thread which are used to accept, return, forward interrupts in the system. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
It will be used by derived classes in PowerNV for customization. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
Today, all the ICPs are created before the CPUs, stored in an array under the sPAPR machine and linked to the CPU when the core threads are realized. This modeling brings some complexity when a lookup in the array is required and it can be simplified by allocating the ICPs when the CPUs are. This is the purpose of this proposal which introduces a new 'icp_type' field under the machine and creates the ICP objects of the right type (KVM or not) before the PowerPCCPU object are. This change allows more cleanups : the removal of the icps array under the sPAPR machine and the removal of the xics_get_cpu_index_by_dt_id() helper. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
Today, the ICPState array of the sPAPR machine is indexed with 'cpu_index' of the CPUState. This numbering of CPUs is internal to QEMU and the guest only knows about what is exposed in the device tree, that is the 'cpu_dt_id'. This is why sPAPR uses the helper xics_get_cpu_index_by_dt_id() to do the mapping in a couple of places. To provide a more generic XICS layer, we need to abstract the IRQ 'server' number and remove any assumption made on its nature. It should not be used as a 'cpu_index' for lookups like xics_cpu_setup() and xics_cpu_destroy() do. To reach that goal, we choose to introduce a generic 'intc' backlink under PowerPCCPU, and let the machine core init routine do the ICPState lookup. The resulting object is passed on to xics_cpu_setup() which does the store under PowerPCCPU. The IRQ 'server' number in XICS is now generic. sPAPR uses 'cpu_dt_id' and PowerNV will use 'PIR' number. This also has the benefit of simplifying the sPAPR hcall routines which do not need to do any ICPState lookups anymore. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Sam Bobroff authored
For a little while around 4.9, Linux kernels that saw the radix bit in ibm,pa-features would attempt to set up the MMU as if they were a hypervisor, even if they were a guest, which would cause them to crash. Work around this by detecting pre-ISA 3.0 guests by their lack of that bit in option vector 1, and then removing the radix bit from ibm,pa-features. Note: This now requires regeneration of that node after CAS negotiation. Signed-off-by:
Sam Bobroff <sam.bobroff@au1.ibm.com> [dwg: Fix style nits] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Sam Bobroff authored
Add the new node, /chosen/ibm,arch-vec-5-platform-support to the device tree. This allows the guest to determine which modes are supported by the hypervisor. Update the option vector processing in h_client_architecture_support() to handle the new MMU bits. This allows guests to request hash or radix mode and QEMU to create the guest's HPT at this time if it is necessary but hasn't yet been done. QEMU will terminate the guest if it requests an unavailable mode, as required by the architecture. Extend the ibm,pa-features node with the new ISA 3.0 values and set the radix bit if KVM supports radix mode. This probably won't be used directly by guests to determine the availability of radix mode (that is indicated by the new node added above) but the architecture requires that it be set when the hardware supports it. If QEMU is using KVM, and KVM is capable of running in radix mode, guests can be run in real-mode without allocating a HPT (because KVM will use a minimal RPT). So in this case, we avoid creating the HPT at reset time and later (during CAS) create it if it is necessary. ISA 3.0 guests will now begin to call h_register_process_table(), which has been added previously. Signed-off-by:
Sam Bobroff <sam.bobroff@au1.ibm.com> [dwg: Strip some unneeded prefix from error messages] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Suraj Jitindar Singh authored
The H_REGISTER_PROCESS_TABLE H_CALL is used by a guest to indicate to the hypervisor where in memory its process table is and how translation should be performed using this process table. Provide the implementation of this H_CALL for a guest. We first check for invalid flags, then parse the flags to determine the operation, and then check the other parameters for valid values based on the operation (register new table/deregister table/maintain registration). The process table is then stored in the appropriate location and registered with the hypervisor (if running under KVM), and the LPCR_[UPRT/GTSE] bits are updated as required. Signed-off-by:
Suraj Jitindar Singh <sjitindarsingh@gmail.com> Signed-off-by:
Sam Bobroff <sam.bobroff@au1.ibm.com> [dwg: Correct missing prototype and uninitialized variable] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Suraj Jitindar Singh authored
The use of the new in memory tables introduced in ISAv3.00 for translation, also referred to as process tables, requires the introduction of 3 new H-CALLs; H_REGISTER_PROCESS_TABLE, H_CLEAN_SLB, and H_INVALIDATE_PID. Add shells for each of these and register them as the hypercall handlers. Currently they all log an unimplemented hypercall and return H_FUNCTION. Signed-off-by:
Suraj Jitindar Singh <sjitindarsingh@gmail.com> [dwg: Fix style nits] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Sam Bobroff authored
Use the new ioctl, KVM_PPC_GET_RMMU_INFO, to fetch radix MMU information from KVM and present the page encodings in the device tree under ibm,processor-radix-AP-encodings. This provides page size information to the guest which is necessary for it to use radix mode. Signed-off-by:
Sam Bobroff <sam.bobroff@au1.ibm.com> [dwg: Compile fix for 32-bit targets, style nit fix] Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Cédric Le Goater authored
Also use an 'sPAPRRTCState' attribute under the sPAPR machine to hold the RTC object. Overall, these changes remove an unnecessary and implicit dependency on SysBus. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- Apr 25, 2017
-
-
Stefano Stabellini authored
Signed-off-by:
Stefano Stabellini <stefano@aporeto.com> Reviewed-by:
Greg Kurz <groug@kaod.org> CC: anthony.perard@citrix.com CC: jgross@suse.com CC: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> CC: Greg Kurz <groug@kaod.org>
-
Cédric Le Goater authored
NC-SI (Network Controller Sideband Interface) enables a BMC to manage a set of NICs on a system. This model takes the simplest approach and reverses the NC-SI packets to pretend a NIC is present and exercise the Linux driver. The NCSI header file <ncsi-pkt.h> comes from mainline Linux and was untabified. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Cédric Le Goater authored
There is a second NIC but we do not use it for the moment. We use the 'aspeed' property to tune the definition of the end of ring buffer bit for the Aspeed SoCs. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Cédric Le Goater authored
The Aspeed SoCs have a different definition of the end of the ring buffer bit. Add a property to specify which set of bits should be used by the NIC. Signed-off-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Apr 24, 2017
-
-
Jeff Cody authored
Introduce check function for setting read_only flags. Will return < 0 on error, with appropriate Error value set. Does not alter any flags. Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: e2bba34ac3bc76a0c42adc390413f358ae0566e8.1491597120.git.jcody@redhat.com
-
Jeff Cody authored
A few block drivers will set the BDS read_only flag from their .bdrv_open() function. This means the bs->read_only flag could be set after we enable copy_on_read, as the BDRV_O_COPY_ON_READ flag check occurs prior to the call to bdrv->bdrv_open(). This adds an error return to bdrv_set_read_only(), and an error will be return if we try to set the BDS to read_only while copy_on_read is enabled. This patch also changes the behavior of vvfat. Before, vvfat could override the drive 'readonly' flag with its own, internal 'rw' flag. For instance, this -drive parameter would result in a writable image: "-drive format=vvfat,dir=/tmp/vvfat,rw,if=virtio,readonly=on" This is not correct. Now, attempting to use the above -drive parameter will result in an error (i.e., 'rw' is incompatible with 'readonly=on'). Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: 0c5b4c1cc2c651471b131f21376dfd5ea24d2196.1491597120.git.jcody@redhat.com
-
Jeff Cody authored
We have a helper wrapper for checking for the BDS read_only flag, add a helper wrapper to set the read_only flag as well. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: 9b18972d05f5fa2ac16c014f0af98d680553048d.1491597120.git.jcody@redhat.com
-
BALATON Zoltan authored
Only the display controller part is created automatically on PCI Signed-off-by:
BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Tested-by:
Aurelien Jarno <aurelien@aurel32.net> Message-id: 647d292c6f5abba8b2a614687229949b5dcb864e.1492787889.git.balaton@eik.bme.hu Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
BALATON Zoltan authored
Adding vmstate saving is not in this patch because the state structure will be changed in further patches, then another patch will add vmstate descriptor after those changes. Signed-off-by:
BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Tested-by:
Aurelien Jarno <aurelien@aurel32.net> Message-id: a32b7fc981a20205f96d530d8e958f12ace1104c.1492787889.git.balaton@eik.bme.hu Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Gerd Hoffmann authored
So the default resolution is configurable. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20170421092214.8176-1-kraxel@redhat.com
-
Gerd Hoffmann authored
This patch adds support for getting and using a local copy of the dirty bitmap. memory_region_snapshot_and_clear_dirty() will create a snapshot of the dirty bitmap for the specified range, clear the dirty bitmap and return the copy. The returned bitmap can be a bit larger than requested, the range is expanded so the code can copy unsigned longs from the bitmap and avoid atomic bit update operations. memory_region_snapshot_get_dirty() will return the dirty status of pages, pretty much like memory_region_get_dirty(), but using the copy returned by memory_region_copy_and_clear_dirty(). Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170421091632.30900-3-kraxel@redhat.com Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Gerd Hoffmann authored
Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170421091632.30900-2-kraxel@redhat.com Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Fam Zheng authored
Signed-off-by:
Fam Zheng <famz@redhat.com> Message-Id: <20170421122710.15373-12-famz@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Fam Zheng authored
Signed-off-by:
Fam Zheng <famz@redhat.com> Message-Id: <20170421122710.15373-9-famz@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Fam Zheng authored
Move opaque to 2nd instead of the 2nd to last, so that compilers help check with the conversion. Signed-off-by:
Fam Zheng <famz@redhat.com> Message-Id: <20170421122710.15373-7-famz@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> [Commit message typo corrected] Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Fam Zheng authored
Signed-off-by:
Fam Zheng <famz@redhat.com> Message-Id: <20170421122710.15373-6-famz@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-