- Apr 26, 2017
-
-
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>
-
Suraj Jitindar Singh authored
The ibm,processor-radix-AP-encodings device tree property of the cpu node is used to specify the radix mode supported page sizes of the processor to the guest os. Contained in the top 3 bits of the msb is the actual page size (AP) encoding associated with the corresponding radix mode supported page size. Add this property for a TCG guest, note the TCG code is capable of translating any format so just add the 4 default page sizes. The ibm,processor-radix-AP-encodings device tree property is defined as: One to n cells in ascending order of radix mode supported page sizes encoded as BE ints (32bit on ppc) in the form: 0bxxxyyyyyyyyyyyyyyyyyyyyyyyyyyyyy - 0bxxx -> AP encoding - 0byyyyyyyyyyyyyyyyyyyyyyyyyyyyy -> supported page size encoded as a shift Signed-off-by:
Suraj Jitindar Singh <sjitindarsingh@gmail.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Alexey Kardashevskiy authored
Signed-off-by:
Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Alexey Kardashevskiy authored
If a page size used by QEMU is not enabled in the PHB IOMMU page mask, in-kernel acceleration of TCE handling won't be enabled and performance might be slower than expected. This prints a warning if system page size is not enabled. This should print a warning if huge pages are enabled but sphb.pgsz still uses the default value of 4K|64K. Signed-off-by:
Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Alexey Kardashevskiy authored
This enables in-kernel handling of H_PUT_TCE_INDIRECT and H_STUFF_TCE hypercalls. The host kernel support is there since v4.6, in particular d3695aa4f452 ("KVM: PPC: Add support for multiple-TCE hcalls"). H_PUT_TCE is already accelerated and does not need any special enablement. Signed-off-by:
Alexey Kardashevskiy <aik@ozlabs.ru> 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>
-
Sam Bobroff authored
In the next patch, spapr_fixup_cpu_dt() will need to call spapr_populate_pa_features() so move it's definition up without making any other changes. Signed-off-by:
Sam Bobroff <sam.bobroff@au1.ibm.com> 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
Query and cache the value of two new KVM capabilities that indicate KVM's support for new radix and hash modes of the MMU. Signed-off-by:
Sam Bobroff <sam.bobroff@au1.ibm.com> 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>
-
Alexey Kardashevskiy authored
KVM_CAP_SPAPR_TCE capability allows creating TCE tables in KVM which allows having in-kernel acceleration for H_PUT_TCE_xxx hypercalls. However it only supports 32bit DMA windows at zero bus offset. There is a new KVM_CAP_SPAPR_TCE_64 capability which supports 64bit window size, variable page size and bus offset. This makes use of the new capability. The kernel headers are already updated as the kernel support went in to v4.6. Signed-off-by:
Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Thomas Huth authored
The devices that are derived from TYPE_PNV_CHIP currently show up as "uncategorized" devices in the help text of "-device ?". Since they obviously are related to the CPU, let's put them into the CPU category instead. Signed-off-by:
Thomas Huth <thuth@redhat.com> 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>
-
David Gibson authored
Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
Sam Bobroff authored
On Power8 hosts it is currently theoretically possible for QEMU/KVM-HV guests to receive a ibm,pa-features property indicating that HTM support is available when it is not. The situation would occur if the platform firmware of a Power8 host cleared the HTM bit of the ibm,pa-features property. QEMU would query KVM for the availability of HTM, which will return no support, but workaround code in kvm_arch_init_vcpu() would then re-enable it because KVM_HV is in use and the processor is P8. This patch adjusts the workaround in kvm_arch_init_vcpu() so that it does not enable HTM (in the above case) unless the host kernel indicates to the QEMU process, via the auxiliary vector, that userspace can use HTM (via the HWCAP2 bit KVM_FEATURE2_HTM). The reason to use the value from the auxiliary vector is that it is set based only on what the host kernel found in the ibm,pa-features HTM bit at boot time. Signed-off-by:
Sam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au>
-
- Apr 25, 2017
-
-
Peter Maydell authored
Patch queue for s390 - 2017-04-25 Two simple fixes this time around: - fix BQL for s390 virtio target - Fix SIGP emulation # gpg: Signature made Tue 25 Apr 2017 12:40:38 BST # gpg: using RSA key 0x2B33791E03FEDC60 # gpg: Good signature from "Alexander Graf <agraf@suse.de>" # gpg: aka "Alexander Graf <alex@csgraf.de>" # Primary key fingerprint: 7F2A 4C87 F94C 5EFE DBC3 75DC 1631 30DA 5B24 530A # Subkey fingerprint: 54D3 364F A6C3 60FF AF81 EB53 2B33 791E 03FE DC60 * remotes/agraf/tags/signed-s390-for-upstream: s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL target-s390x: Mask the SIGP order_code to 8bit. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Maydell authored
# gpg: Signature made Tue 25 Apr 2017 12:22:03 BST # gpg: using RSA key 0xEF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasowang/tags/net-pull-request: COLO-compare: Optimize tcp compare trace event COLO-compare: Optimize tcp compare for option field slirp: add a fake NC-SI backend aspeed: add a FTGMAC100 nic net/ftgmac100: add a 'aspeed' property net: add FTGMAC100 support hw/net: add MII definitions colo-compare: Fix old packet check bug. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Aurelien Jarno authored
s390_virtio_hypercall can trigger IO events and interrupts, most notably when using virtio-ccw devices. Reviewed-by:
Alexander Graf <agraf@suse.de> Signed-off-by:
Aurelien Jarno <aurelien@aurel32.net> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Fixes: 278f5e98 ("s390x/misc_helper.c: wrap IO instructions in BQL") Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Philipp Kern authored
According to "CPU Signaling and Response", "Signal-Processor Orders", the order field is bit position 56-63. Without this, the Linux guest kernel is sometimes unable to stop emulation and enters an infinite loop of "XXX unknown sigp: 0xffffffff00000005". Signed-off-by:
Philipp Kern <phil@philkern.de> Reviewed-by:
Thomas Huth <thuth@tuxfamily.org> [agraf: add comment according to email] Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Brendan Shanks authored
macOS 10.12 deprecated/replaced many AppKit constants to make naming more consistent. Use the new constants, and #define them to the old constants when compiling against a pre-10.12 SDK. Signed-off-by:
Brendan Shanks <brendan@bslabs.net> Message-id: 20170425062952.99149-1-brendan@bslabs.net Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Zhang Chen authored
Optimize two trace events as one, adjust print format make it easy to read. rename trace_colo_compare_pkt_info_src/dst to trace_colo_compare_tcp_info. Signed-off-by:
Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Zhang Chen authored
In this patch we support packet that have tcp options field. Add tcp options field check, If the packet have options field we just skip it and compare tcp payload, Avoid unnecessary checkpoint, optimize performance. Signed-off-by:
Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
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>
-
Krzysztof Kozlowski authored
Exynos4210 has four SD/MMC controllers supporting: - SD Standard Host Specification Version 2.0, - MMC Specification Version 4.3, - SDIO Card Specification Version 2.0, - DMA and ADMA. Add emulation of SDHCI devices which allows accessing storage through SD cards. Differences from real hardware: - Devices are shipped with eMMC memory, not SD card. - The Exynos4210 SDHCI has few more registers, e.g. for controlling the clocks, additional status (0x80, 0x84, 0x8c). These are not implemented. Testing on smdkc210 machine with "-drive file=FILE,if=sd,bus=0,index=2". Signed-off-by:
Krzysztof Kozlowski <krzk@kernel.org> Message-id: 20170422190709.8676-1-krzk@kernel.org Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Peter Maydell authored
# gpg: Signature made Mon 24 Apr 2017 20:18:05 BST # gpg: using RSA key 0xBDBE7B27C0DE3057 # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>" # gpg: aka "Jeffrey Cody <jeff@codyprime.org>" # gpg: aka "Jeffrey Cody <codyprime@gmail.com>" # Primary key fingerprint: 9957 4B4D 3474 90E7 9D98 D624 BDBE 7B27 C0DE 3057 * remotes/cody/tags/block-pull-request: qemu-iotests: _cleanup_qemu must be called on exit block/rbd: Add support for reopen() block/rbd - update variable names to more apt names block: use bdrv_can_set_read_only() during reopen block: introduce bdrv_can_set_read_only() block: code movement block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only block: do not set BDS read_only if copy_on_read enabled block: add bdrv_set_read_only() helper function qemu-iotests: exclude vxhs from image creation via protocol block/vxhs.c: Add qemu-iotests for new block device type "vxhs" block/vxhs.c: Add support for a new block device type called "vxhs" Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Apr 24, 2017
-
-
Jeff Cody authored
For the tests that use the common.qemu functions for running a QEMU process, _cleanup_qemu must be called in the exit function. If it is not, if the qemu process aborts, then not all of the droppings are cleaned up (e.g. pidfile, fifos). This updates those tests that did not have a cleanup in qemu-iotests. (I swapped spaces for tabs in test 102 as well) Reported-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Jeff Cody <jcody@redhat.com> Message-id: d59c2f6ad6c1da8b9b3c7f357c94a7122ccfc55a.1492544096.git.jcody@redhat.com
-
Jeff Cody authored
This adds support for reopen in rbd, for changing between r/w and r/o. Note, that this is only a flag change, but we will block a change from r/o to r/w if we are using an RBD internal snapshot. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: d4e87539167ec6527d44c97b164eabcccf96e4f3.1491597120.git.jcody@redhat.com
-
Jeff Cody authored
Update 'clientname' to be 'user', which tracks better with both the QAPI and rados variable naming. Update 'name' to be 'image_name', as it indicates the rbd image. Naming it 'image' would have been ideal, but we are using that for the rados_image_t value returned by rbd_open(). Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: b7ec1fb2e1cf36f9b6911631447a5b0422590b7d.1491597120.git.jcody@redhat.com
-
Jeff Cody authored
Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: 00aed7ffdd7be4b9ed9ce1007d50028a72b34ebe.1491597120.git.jcody@redhat.com
-
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
Move bdrv_is_read_only() up with its friends. Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Signed-off-by:
Jeff Cody <jcody@redhat.com> Message-id: 73b2399459760c32506f9407efb9dddb3a2789de.1491597120.git.jcody@redhat.com
-
Jeff Cody authored
The BDRV_O_ALLOW_RDWR flag allows / prohibits the changing of the BDS 'read_only' state, but there are a few places where it is ignored. In the bdrv_set_read_only() helper, make sure to honor the flag. Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
John Snow <jsnow@redhat.com> Message-id: be2e5fb2d285cbece2b6d06bed54a6f56520d251.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
-
Jeff Cody authored
The protocol VXHS does not support image creation. Some tests expect to be able to create images through the protocol. Exclude VXHS from these tests. Signed-off-by:
Jeff Cody <jcody@redhat.com>
-
Ashish Mittal authored
These changes use a vxhs test server that is a part of the following repository: https://github.com/VeritasHyperScale/libqnio.git Signed-off-by:
Ashish Mittal <Ashish.Mittal@veritas.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Jeff Cody <jcody@redhat.com> Signed-off-by:
Jeff Cody <jcody@redhat.com> Message-id: 1491277689-24949-3-git-send-email-Ashish.Mittal@veritas.com
-