- Oct 29, 2012
-
-
Michael S. Tsirkin authored
Avoid mangling iovec manually: use safe iov_* functions. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
We know offset is 0, assert that. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Now that we know host hdr length, we don't need to duplicate the logic in receive_hdr: caller can figure out the offset itself. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Avoid magling iov manually: use safe iov operations for processing packets incoming to guest. This also removes the requirement for virtio header to fit the first s/g entry exactly. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Avoid tweaking iovec during receive. This removes the need to copy the vector. Note: we currently have an evil cast in work_around_broken_dhclient and unfortunately this patch does not fix it - just pushes the evil cast to another place. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Add API to copy part of iovec safely. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Tracking these in device state instead of re-calculating on each packet. No functional changes. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Baron authored
Let's use PCIExpressHost with QOM. Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Acked-by:
Andreas Färber <afaerber@suse.de> Signed-off-by:
Jason Baron <jbaron@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Baron authored
This allows q35 to pass/set the size of the pcie window in its update routine. Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Jason Baron <jbaron@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jan Kiszka authored
[jbaron@redhat.com: add PCI_CLASS_SERIAL_SMBUS definition] Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Jason Baron <jbaron@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
Introduce pci_swizzle_map_irq_fn() for interrupt pin swizzle which is standardized. PCI bridge swizzle is common logic, by introducing this function duplicated swizzle logic will be avoided later. [jbaron@redhat.com: drop opaque argument] Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Jason Baron <jbaron@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
Adds pci id constants which will be used by q35. Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Jason Baron <jbaron@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
pci capability must be in PCI space. It can't lay in PCIe extended config space. Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Jason Baron <jbaron@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
PCI spec (see e.g. 6.7 Capabilities List in spec rev 3.0) requires that each capability is DWORD aligned. Ensure this when allocating space by rounding size up to 4. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Enable KVM PV EOI by default. You can still disable it with -kvm_pv_eoi cpu flag. To avoid breaking cross-version migration, enable only for qemu 1.3 (or in the future, newer) machine type. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Alex Williamson authored
Rather than assert, simply return PCI_INTX_DISABLED when we don't have a pci_route_irq_fn. PIIX already returns DISABLED for an invalid pin, so users already deal with this state. Users of this interface should only be acting on an ENABLED or INVERTED return value (though we really have no support for INVERTED). Also complain loudly when we hit this so we don't forget it's missing. Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Acked-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Alex Williamson authored
pci-assign only uses a subset of the flexibility msi_get_message() provides, but it's still worthwhile to use it. Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Alex Williamson authored
vfio-pci and pci-assign both do this on their own for setting up direct MSI injection through KVM. Provide a helper function for this in MSI code. Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Alex Williamson authored
Replace open coded version Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Alex Williamson authored
Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
git://repo.or.cz/qemu/agrafAurelien Jarno authored
* 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: (22 commits) PPC: pseries: Remove hack for PIO window PPC: e500: Map PIO space into core memory region xen_platform: convert PIO to new memory api read/write vmport: convert PIO to new memory api read/write serial: convert PIO to new memory api read/write rtl8139: convert PIO to new memory api read/write pckbd: convert PIO to new memory api read/write pc port92: convert PIO to new memory api read/write mc146818rtc: convert PIO to new memory api read/write m48t59: convert PIO to new memory api read/write i8254: convert PIO to new memory api read/write es1370: convert PIO to new memory api read/write virtio-pci: convert PIO to new memory api read/write ac97: convert PIO to new memory api read/write pseries: Implement qemu initiated shutdowns using EPOW events target-ppc: Rework storage of VPA registration state pseries: Don't allow duplicate registration of hcalls or RTAS calls Add USB option in machine options e500: Fix serial initialization PPC: 440: Emulate DCBR0 ...
-
git://repo.or.cz/qemu/qmp-unstableAurelien Jarno authored
* 'queue/qmp' of git://repo.or.cz/qemu/qmp-unstable: migration: go to paused state after finishing incoming migration with -S qmp: handle stop/cont in INMIGRATE state hmp: fix info cpus for sparc targets
-
Alexander Graf authored
Now that all users of old_portio are gone, we can remove the hack that enabled us to support them. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
On PPC, we don't have PIO. So usually PIO space behind a PCI bridge is accessible via MMIO. Do this mapping explicitly by mapping the PIO space of our PCI bus into a memory region that lives in memory space. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
Signed-off-by:
Alexander Graf <agraf@suse.de>
-
David Gibson authored
At present, using 'system_powerdown' from the monitor or otherwise instructing qemu to (cleanly) shut down a pseries guest will not work, because we did not have a method of signalling the shutdown request to the guest. PAPR does include a usable mechanism for this, though it is rather more involved than the equivalent on x86. This involves sending an EPOW (Environmental and POwer Warning) event through the PAPR event and error logging mechanism, which also has a number of other functions. This patch implements just enough of the event/error logging functionality to be able to send a shutdown event to the guest. At least with modern guest kernels and a userspace that is up and running, this means that system_powerdown from the qemu monitor should now work correctly on pseries guests. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
David Gibson authored
With PAPR guests, hypercalls allow registration of the Virtual Processor Area (VPA), SLB shadow and dispatch trace log (DTL), each of which allow for certain communication between the guest and hypervisor. Currently, we store the addresses of the three areas and the size of the dtl in CPUPPCState. The SLB shadow and DTL are variable sized, with the size being retrieved from within the registered memory area at the hypercall time. This size can later be overwritten with other information, however, so we need to save the size as of registration time. We already do this for the DTL, but not for the SLB shadow, so this patch fixes that. In addition, we change the storage of the VPA information to use fixed size integer types which will make life easier for syncing this data with KVM, which we will need in future. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
David Gibson authored
Currently the pseries machine code allows a callback to be registered for a hypercall number twice, as long as it's the same callback the second time. We don't test for duplicate registrations of RTAS callbacks at all so it will effectively be last registratiojn wins. This was originally done because it was awkward to ensure that the registration happened exactly once, but the code has since been restructured so that's no longer the case. Duplicate registration of a hypercall or RTAS call could well suggest a duplicate initialization which could cause other problems, so this patch makes duplicate registrations a bug, to prevent the old behaviour from hiding other bugs. Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Li Zhang authored
When -usb option is used, global varible usb_enabled is set. And all the plaform will create one USB controller according to this variable. In fact, global varibles make code hard to read. So this patch is to remove global variable usb_enabled and add USB option in machine options. All the plaforms will get USB option value from machine options. USB option of machine options will be set either by: * -usb * -machine type=pseries,usb=on Both these ways can work now. They both set USB option in machine options. In the future, the first way will be removed. Signed-off-by:
Li Zhang <zhlcindy@linux.vnet.ibm.com> Acked-by:
Alexander Graf <agraf@suse.de> Signed-off-by:
Alexander Graf <agraf@suse.de>
-