* [Qemu-devel] [PULL 0/3] tags/xen-20161021-tag @ 2016-10-21 20:06 Stefano Stabellini 2016-10-21 20:06 ` [Qemu-devel] [PULL 1/3] xen-usb: do not reference PAGE_SIZE Stefano Stabellini 2016-10-24 10:03 ` [Qemu-devel] [PULL 0/3] tags/xen-20161021-tag Peter Maydell 0 siblings, 2 replies; 5+ messages in thread From: Stefano Stabellini @ 2016-10-21 20:06 UTC (permalink / raw) To: peter.maydell; +Cc: sstabellini, qemu-devel, xen-devel, anthony.perard The following changes since commit b49e452fe994f8fbcd22bf5a87b79a2355481318: Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20160921' into staging (2016-10-21 13:49:58 +0100) are available in the git repository at: git://xenbits.xen.org/people/sstabellini/qemu-dm.git tags/xen-20161021-tag for you to fetch changes up to 35132016dc1c27de2b1354b161df6cc22f3ac5bf: xen_platform: SUSE xenlinux unplug for emulated PCI (2016-10-21 12:11:38 -0700) ---------------------------------------------------------------- Xen 2016/10/21 ---------------------------------------------------------------- Olaf Hering (2): xen_platform: unplug also SCSI disks xen_platform: SUSE xenlinux unplug for emulated PCI Stefano Stabellini (1): xen-usb: do not reference PAGE_SIZE hw/i386/xen/xen_platform.c | 31 ++++++++++++++++++++++++++++++- hw/usb/xen-usb.c | 4 ++-- 2 files changed, 32 insertions(+), 3 deletions(-) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 1/3] xen-usb: do not reference PAGE_SIZE 2016-10-21 20:06 [Qemu-devel] [PULL 0/3] tags/xen-20161021-tag Stefano Stabellini @ 2016-10-21 20:06 ` Stefano Stabellini 2016-10-21 20:06 ` [Qemu-devel] [PULL 2/3] xen_platform: unplug also SCSI disks Stefano Stabellini 2016-10-21 20:06 ` [Qemu-devel] [PULL 3/3] xen_platform: SUSE xenlinux unplug for emulated PCI Stefano Stabellini 2016-10-24 10:03 ` [Qemu-devel] [PULL 0/3] tags/xen-20161021-tag Peter Maydell 1 sibling, 2 replies; 5+ messages in thread From: Stefano Stabellini @ 2016-10-21 20:06 UTC (permalink / raw) To: peter.maydell; +Cc: sstabellini, qemu-devel, xen-devel, anthony.perard PAGE_SIZE is undefined on ARM64. Use XC_PAGE_SIZE instead, which is always 4096 even when page granularity is 64K. For this to actually work with 64K pages, more changes are required. Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Juergen Gross <jgross@suse.com> Release-acked-by: Wei Liu <wei.liu2@citrix.com> --- hw/usb/xen-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index 174d715..de2ebd6 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -160,7 +160,7 @@ static int usbback_gnttab_map(struct usbback_req *usbback_req) for (i = 0; i < nr_segs; i++) { if ((unsigned)usbback_req->req.seg[i].offset + - (unsigned)usbback_req->req.seg[i].length > PAGE_SIZE) { + (unsigned)usbback_req->req.seg[i].length > XC_PAGE_SIZE) { xen_be_printf(xendev, 0, "segment crosses page boundary\n"); return -EINVAL; } @@ -183,7 +183,7 @@ static int usbback_gnttab_map(struct usbback_req *usbback_req) for (i = 0; i < usbback_req->nr_buffer_segs; i++) { seg = usbback_req->req.seg + i; - addr = usbback_req->buffer + i * PAGE_SIZE + seg->offset; + addr = usbback_req->buffer + i * XC_PAGE_SIZE + seg->offset; qemu_iovec_add(&usbback_req->packet.iov, addr, seg->length); } } -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 2/3] xen_platform: unplug also SCSI disks 2016-10-21 20:06 ` [Qemu-devel] [PULL 1/3] xen-usb: do not reference PAGE_SIZE Stefano Stabellini @ 2016-10-21 20:06 ` Stefano Stabellini 2016-10-21 20:06 ` [Qemu-devel] [PULL 3/3] xen_platform: SUSE xenlinux unplug for emulated PCI Stefano Stabellini 1 sibling, 0 replies; 5+ messages in thread From: Stefano Stabellini @ 2016-10-21 20:06 UTC (permalink / raw) To: peter.maydell Cc: sstabellini, qemu-devel, xen-devel, anthony.perard, Olaf Hering From: Olaf Hering <olaf@aepfle.de> Using 'vdev=sd[a-o]' will create an emulated LSI controller, which can be used by the emulated BIOS to boot from disk. If the HVM domU has also PV driver the disk may appear twice in the guest. To avoid this an unplug of the emulated hardware is needed, similar to what is done for IDE and NIC drivers already. Since the SCSI controller provides only disks the entire controller can be unplugged at once. Impact of the change for classic and pvops based guest kernels: vdev=sda:disk0 before: pvops: disk0=pv xvda + emulated sda classic: disk0=pv sda + emulated sdq after: pvops: disk0=pv xvda classic: disk0=pv sda vdev=hda:disk0, vdev=sda:disk1 before: pvops: disk0=pv xvda disk1=emulated sda classic: disk0=pv hda disk1=pv sda + emulated sdq after: pvops: disk0=pv xvda disk1=not accessible by blkfront, index hda==index sda classic: disk0=pv hda disk1=pv sda vdev=hda:disk0, vdev=sda:disk1, vdev=sdb:disk2 before: pvops: disk0=pv xvda disk1=emulated sda disk2=pv xvdb + emulated sdb classic: disk0=pv hda disk1=pv sda + emulated sdq disk2=pv sdb + emulated sdr after: pvops: disk0=pv xvda disk1=not accessible by blkfront, index hda==index sda disk2=pv xvdb classic: disk0=pv hda disk1=pv sda disk2=pv sda Signed-off-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> --- hw/i386/xen/xen_platform.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index f85635c..91d8a7a 100644 --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -114,6 +114,10 @@ static void unplug_disks(PCIBus *b, PCIDevice *d, void *o) PCI_CLASS_STORAGE_IDE && strcmp(d->name, "xen-pci-passthrough") != 0) { pci_piix3_xen_ide_unplug(DEVICE(d)); + } else if (pci_get_word(d->config + PCI_CLASS_DEVICE) == + PCI_CLASS_STORAGE_SCSI + && strcmp(d->name, "xen-pci-passthrough") != 0) { + object_unparent(OBJECT(d)); } } -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PULL 3/3] xen_platform: SUSE xenlinux unplug for emulated PCI 2016-10-21 20:06 ` [Qemu-devel] [PULL 1/3] xen-usb: do not reference PAGE_SIZE Stefano Stabellini 2016-10-21 20:06 ` [Qemu-devel] [PULL 2/3] xen_platform: unplug also SCSI disks Stefano Stabellini @ 2016-10-21 20:06 ` Stefano Stabellini 1 sibling, 0 replies; 5+ messages in thread From: Stefano Stabellini @ 2016-10-21 20:06 UTC (permalink / raw) To: peter.maydell Cc: sstabellini, qemu-devel, xen-devel, anthony.perard, Olaf Hering From: Olaf Hering <olaf@aepfle.de> Implement SUSE specific unplug protocol for emulated PCI devices in PVonHVM guests. Its a simple 'outl(1, (ioaddr + 4));'. This protocol was implemented and used since Xen 3.0.4. It is used in all SUSE/SLES/openSUSE releases up to SLES11SP3 and openSUSE 12.3. In addition old (pre-2011) VMDP versions are handled as well. Signed-off-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> --- hw/i386/xen/xen_platform.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index 91d8a7a..2e1e543 100644 --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -311,13 +311,38 @@ static void xen_platform_ioport_writeb(void *opaque, hwaddr addr, uint64_t val, unsigned int size) { PCIXenPlatformState *s = opaque; + PCIDevice *pci_dev = PCI_DEVICE(s); switch (addr) { case 0: /* Platform flags */ platform_fixed_ioport_writeb(opaque, 0, (uint32_t)val); break; + case 4: + if (val == 1) { + /* + * SUSE unplug for Xenlinux + * xen-kmp used this since xen-3.0.4, instead the official protocol + * from xen-3.3+ It did an unconditional "outl(1, (ioaddr + 4));" + * Pre VMDP 1.7 used 4 and 8 depending on how VMDP was configured. + * If VMDP was to control both disk and LAN it would use 4. + * If it controlled just disk or just LAN, it would use 8 below. + */ + pci_unplug_disks(pci_dev->bus); + pci_unplug_nics(pci_dev->bus); + } + break; case 8: - log_writeb(s, (uint32_t)val); + switch (val) { + case 1: + pci_unplug_disks(pci_dev->bus); + break; + case 2: + pci_unplug_nics(pci_dev->bus); + break; + default: + log_writeb(s, (uint32_t)val); + break; + } break; default: break; -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PULL 0/3] tags/xen-20161021-tag 2016-10-21 20:06 [Qemu-devel] [PULL 0/3] tags/xen-20161021-tag Stefano Stabellini 2016-10-21 20:06 ` [Qemu-devel] [PULL 1/3] xen-usb: do not reference PAGE_SIZE Stefano Stabellini @ 2016-10-24 10:03 ` Peter Maydell 1 sibling, 0 replies; 5+ messages in thread From: Peter Maydell @ 2016-10-24 10:03 UTC (permalink / raw) To: Stefano Stabellini; +Cc: QEMU Developers, xen-devel, Anthony PERARD On 21 October 2016 at 21:06, Stefano Stabellini <sstabellini@kernel.org> wrote: > The following changes since commit b49e452fe994f8fbcd22bf5a87b79a2355481318: > > Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20160921' into staging (2016-10-21 13:49:58 +0100) > > are available in the git repository at: > > > git://xenbits.xen.org/people/sstabellini/qemu-dm.git tags/xen-20161021-tag > > for you to fetch changes up to 35132016dc1c27de2b1354b161df6cc22f3ac5bf: > > xen_platform: SUSE xenlinux unplug for emulated PCI (2016-10-21 12:11:38 -0700) > > ---------------------------------------------------------------- > Xen 2016/10/21 > > ---------------------------------------------------------------- > Olaf Hering (2): > xen_platform: unplug also SCSI disks > xen_platform: SUSE xenlinux unplug for emulated PCI > > Stefano Stabellini (1): > xen-usb: do not reference PAGE_SIZE Applied, thanks. -- PMM ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-24 10:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-21 20:06 [Qemu-devel] [PULL 0/3] tags/xen-20161021-tag Stefano Stabellini 2016-10-21 20:06 ` [Qemu-devel] [PULL 1/3] xen-usb: do not reference PAGE_SIZE Stefano Stabellini 2016-10-21 20:06 ` [Qemu-devel] [PULL 2/3] xen_platform: unplug also SCSI disks Stefano Stabellini 2016-10-21 20:06 ` [Qemu-devel] [PULL 3/3] xen_platform: SUSE xenlinux unplug for emulated PCI Stefano Stabellini 2016-10-24 10:03 ` [Qemu-devel] [PULL 0/3] tags/xen-20161021-tag Peter Maydell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).