summaryrefslogtreecommitdiffstats
path: root/include/hw/xen
Commit message (Collapse)AuthorAgeFilesLines
* xen: fix usage of xc_domain_create in domain builderRoger Pau Monne2015-11-131-0/+16
| | | | | | | | | | | | | Due to the addition of HVMlite and the requirement to always provide a valid xc_domain_configuration_t, xc_domain_create now always takes an arch domain config, which can be NULL in order to mimic previous behaviour. Add a small stub called xen_domain_create that encapsulates the correct call to xc_domain_create depending on the libxc version detected. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Merge remote-tracking branch 'remotes/sstabellini/tags/xen-2015-09-10-tag' ↵Peter Maydell2015-09-101-1/+33
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging xen-2015-09-10 # gpg: Signature made Thu 10 Sep 2015 17:52:08 BST using RSA key ID 70E1AE90 # gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>" * remotes/sstabellini/tags/xen-2015-09-10-tag: (29 commits) xen/pt: Don't slurp wholesale the PCI configuration registers xen/pt: Check for return values for xen_host_pci_[get|set] in init xen/pt: Move bulk of xen_pt_unregister_device in its own routine. xen/pt: Make xen_pt_unregister_device idempotent xen/pt: Log xen_host_pci_get/set errors in MSI code. xen/pt: Log xen_host_pci_get in two init functions xen/pt: Remove XenPTReg->data field. xen/pt: Check if reg->init function sets the 'data' past the reg->size xen/pt: Sync up the dev.config and data values. xen/pt: Use xen_host_pci_get_[byte|word] instead of dev.config xen/pt: Use XEN_PT_LOG properly to guard against compiler warnings. xen/pt/msi: Add the register value when printing logging and error messages xen: use errno instead of rc for xc_domain_add_to_physmap xen/pt: xen_host_pci_config_read returns -errno, not -1 on failure xen/pt: Make xen_pt_msi_set_enable static xen/pt: Update comments with proper function name. xen/HVM: atomically access pointers in bufioreq handling xen-hvm: When using xc_domain_add_to_physmap also include errno when reporting xen, gfx passthrough: add opregion mapping xen, gfx passthrough: register host bridge specific to passthrough ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * xen: use errno instead of rc for xc_domain_add_to_physmapKonrad Rzeszutek Wilk2015-09-101-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Xen 4.6 commit cd2f100f0f61b3f333d52d1737dd73f02daee592 "libxc: Fix do_memory_op to return negative value on errors" made the libxc API less odd-ball: On errors, return value is -1 and error code is in errno. On success the return value is either 0 or an positive value. Since we could be running with an old toolstack in which the Exx value is in rc or the newer, we add an wrapper around the xc_domain_add_to_physmap (called xen_xc_domain_add_to_physmap) which will always return the EXX. Xen 4.6 did not change the libxc functions mentioned (same parameters) so we piggyback on the fact that Xen 4.6 has a new function: commit 504ed2053362381ac01b98db9313454488b7db40 "tools/libxc: Expose new hypercall xc_reserved_device_memory_map" and check for that. Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Suggested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * xen/HVM: atomically access pointers in bufioreq handlingJan Beulich2015-09-101-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The number of slots per page being 511 (i.e. not a power of two) means that the (32-bit) read and write indexes going beyond 2^32 will likely disturb operation. The hypervisor side gets I/O req server creation extended so we can indicate that we're using suitable atomic accesses where needed, allowing it to atomically canonicalize both pointers when both have gone through at least one cycle. The Xen side counterpart (which is not a functional prereq to this change, albeit a build one) went in already (commit b7007bc6f9). Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* | pc: Remove redundant arguments from xen_hvm_init()Eduardo Habkost2015-09-101-2/+2
|/ | | | | | | | | | Remove arguments that can be found in PCMachineState. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Fix the compatibility typedef of ioservid_t to match the Xen headersPaul Durrant2015-07-081-1/+1
| | | | | | | | | | | | There is a mismatch between the definition of ioservid_t in xen_common.h and the definition in the Xen public headers. This patch corrects the definition in xen_common.h. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Tested-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 1436275958-25174-1-git-send-email-paul.durrant@citrix.com Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* xen: Remove xen_cmos_set_s3_resume()Thomas Huth2015-03-101-1/+0
| | | | | | | | The function is not used anymore, and thus can be deleted. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* fix QEMU build on Xen/ARMStefano Stabellini2015-01-261-4/+9
| | | | | | | | | | | xen_get_vmport_regs_pfn should take a xen_pfn_t argument, not an unsigned long argument (in fact xen_pfn_t is defined as uint64_t on ARM). Also use xc_hvm_param_get instead of the deprecated xc_get_hvm_param. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Don Slutz <dslutz@verizon.com>
* Xen: Use the ioreq-server API when availablePaul Durrant2015-01-201-0/+223
| | | | | | | | | | | | | | | | The ioreq-server API added to Xen 4.5 offers better security than the existing Xen/QEMU interface because the shared pages that are used to pass emulation request/results back and forth are removed from the guest's memory space before any requests are serviced. This prevents the guest from mapping these pages (they are in a well known location) and attempting to attack QEMU by synthesizing its own request structures. Hence, this patch modifies configure to detect whether the API is available, and adds the necessary code to use the API if it is. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen-hvm.c: Add support for Xen access to vmportDon Slutz2014-10-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | This adds synchronisation of the 6 vcpu registers (only 32bits of them) that vmport.c needs between Xen and QEMU. This is to avoid a 2nd and 3rd exchange between QEMU and Xen to fetch and put these 6 vcpu registers used by the code in vmport.c and vmmouse.c The registers are passed in the new shared page provided by HVM_PARAM_VMPORT_REGS_PFN. Add new array to XenIOState that allows selection of current_cpu by vcpu id. Now pass XenIOState to handle_ioreq(). Add new routines regs_to_cpu(), regs_from_cpu(), and handle_vmport_ioreq(). Signed-off-by: Don Slutz <dslutz@verizon.com> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* accel: Move Xen registration code to xen-common.cEduardo Habkost2014-10-041-1/+0
| | | | | | | | | | | | | | | | Note that this has an user-visible side-effect: instead of reporting "Xen is not supported for this target", QEMU binaries not supporting Xen will report "xen accelerator does not exist". As xen_available() always return 1 when CONFIG_XEN is enabled, we don't need to set AccelClass.available anymore. xen_enabled() is not being removed yet, but only because vl.c is still using it. This also allows us to make xen_init() static. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* xen_backend: introduce xenstore_read_uint64 and xenstore_read_fe_uint64Stefano Stabellini2014-07-071-0/+2
| | | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
* xen-hvm: Fix xen_hvm_init() to adjust pc memory layoutDon Slutz2014-06-231-1/+2
| | | | | | | | | This is just below_4g_mem_size and above_4g_mem_size which is used later in QEMU. Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Don Slutz <dslutz@verizon.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* xen_disk: add discard supportOlaf Hering2014-05-071-0/+7
| | | | | | | | | | | | | Implement discard support for xen_disk. It makes use of the existing discard code in qemu. The discard support is enabled unconditionally. The tool stack may provide a property "discard-enable" in the backend node to optionally disable discard support. This is helpful in case the backing file was intentionally created non-sparse to avoid fragmentation. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* machine: Replace QEMUMachine by MachineClass in accelerator configurationMarcel Apfelbaum2014-05-051-1/+1
| | | | | | | This minimizes QEMUMachine usage, as part of machine QOM-ification. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* Revert "KVM: Split QEMUMachine typedef into separate header"Andreas Färber2014-03-131-1/+0
| | | | | | | | This reverts commit 9c06a1f79f959fffd09bfb7efc3d76051a6cd2da. The new header sysemu/qemumachine.h is undesired. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* kvm: Add a new machine option kvm-typeAneesh Kumar K.V2014-03-051-1/+1
| | | | | | | | | | | | Targets like ppc64 support different types of KVM, one which use hypervisor mode and the other which doesn't. Add a new machine option kvm-type that helps in selecting the respective ones We also add a new QEMUMachine callback get_vm_type that helps in mapping the string representation of kvm type specified. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> [agraf: spelling fixes, use error_report(), use qemumachine.h] Signed-off-by: Alexander Graf <agraf@suse.de>
* KVM: Split QEMUMachine typedef into separate headerAlexander Graf2014-03-051-0/+1
| | | | | | | | | | | | | | | | Older gcc versions (such as the one in SLES11) get confused when you declare a typedef on the same struct twice. To work around that limitation, let's extract the QEMUMachine typedef into a separate header file that is guarded by preprocessor duplicate include checks. This fixes the following type of compile errors for me: In file included from vl.c:125: include/hw/xen/xen.h:39: error: redefinition of typedef "QEMUMachine" include/sysemu/kvm.h:155: error: previous declaration of "QEMUMachine" was here Signed-off-by: Alexander Graf <agraf@suse.de>
* pc: Initializing ram_memory under Xen.Anthony PERARD2013-09-091-3/+1
| | | | | | | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> CC: qemu-stable@nongnu.org
* xen: remove xen_vcpu_initStefano Stabellini2013-06-031-1/+0
| | | | | | | | | | | | | No need for xen_vcpu_init anymore: - the RTC emulator doesn't have any periodic timers continuously running even in absence of guest interactions anymore; - qemu_dummy_start_vcpu takes care of disabling TCG for us, so we don't need to do it manually here. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
* xen: simplify xen_enabledStefano Stabellini2013-06-031-4/+0
| | | | | | | | No need for preprocessor conditionals in xen_enabled: xen_allowed is always defined. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> CC: qemu-stable@nongnu.org
* configure: CONFIG_NO_XEN is duplicatedPaolo Bonzini2013-04-181-1/+1
| | | | | | | | | | We already define it in Makefile.target. But we need to avoid a curious double negation in order to eliminate it. Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* hw: move headers to include/Paolo Bonzini2013-04-083-0/+331
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud