Xen 2016/10/21
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJYCnIKAAoJEIlPj0hw4a6QdwIP/3zrx7HyGDcM6YfiJx7GBvBZ dYp9QpG4Nm2gHFRixU/bH5QkBfJHMO6IBAoPG5W5M8d6M5PrDL62LBbHic/jglQu f2heiqpg75ZhAGvsNHUd6YuMTlZPh+xyMNUu/gstFqEnxv2hyPGAlegT5DpH7F8Y vZ6PkFoP3+2fRRyB45nI7gnq8xRDKIx0TsQeWFlrEL8bVBmflepW+NRfDpGlrgvn wPwS9h5DiJFUbOwL7E3TVVALP36RSdLZVcfs/CP4+o5Senrq7JFCF+IpPMrLfdBd ijguCc9c0wGMhupuvbuffxH2pgrKREXUtuAmWtYsB1dVJeKGTmfDYJ/WqpQKcfxS wvwnJOGTuNxdWrIty82/h/qNn95Zu3oRPO9wn77XDS+dq/CylbtNiiOL5E/SAgPq PGYkbr0n8rI5ZG++ggSNe7LZ+jmrUD9zyaZEKI4qgHKKt5/5VDp0ZygxxEhLbsGA QHCraNQ1O167NMLKVKflf03z/FTTV24cnYIBkgUO7EdQ7v8eGoIFV2BN1Ii7WsIF CVDEwDS1Kvvfvww25iqcRIxcrm4HouhoalLp1NHpRVtWsqrc/kXWDcIVSQnv2hQY koPPzU12nBXApJP2omj3THO6iwzcPs1zUTeR7xUV56KyN7m0zmr9DGD3TXr60qQ6 xHVX1afkzcAPCWix9nUL =2ogs -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20161021-tag' into staging Xen 2016/10/21 # gpg: Signature made Fri 21 Oct 2016 20:52:42 BST # gpg: using RSA key 0x894F8F4870E1AE90 # gpg: Good signature from "Stefano Stabellini <sstabellini@kernel.org>" # gpg: aka "Stefano Stabellini <stefano.stabellini@eu.citrix.com>" # Primary key fingerprint: D04E 33AB A51F 67BA 07D3 0AEA 894F 8F48 70E1 AE90 * remotes/sstabellini/tags/xen-20161021-tag: xen_platform: SUSE xenlinux unplug for emulated PCI xen_platform: unplug also SCSI disks xen-usb: do not reference PAGE_SIZE Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
4387f5671f
|
@ -114,6 +114,10 @@ static void unplug_disks(PCIBus *b, PCIDevice *d, void *o)
|
||||||
PCI_CLASS_STORAGE_IDE
|
PCI_CLASS_STORAGE_IDE
|
||||||
&& strcmp(d->name, "xen-pci-passthrough") != 0) {
|
&& strcmp(d->name, "xen-pci-passthrough") != 0) {
|
||||||
pci_piix3_xen_ide_unplug(DEVICE(d));
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,13 +311,38 @@ static void xen_platform_ioport_writeb(void *opaque, hwaddr addr,
|
||||||
uint64_t val, unsigned int size)
|
uint64_t val, unsigned int size)
|
||||||
{
|
{
|
||||||
PCIXenPlatformState *s = opaque;
|
PCIXenPlatformState *s = opaque;
|
||||||
|
PCIDevice *pci_dev = PCI_DEVICE(s);
|
||||||
|
|
||||||
switch (addr) {
|
switch (addr) {
|
||||||
case 0: /* Platform flags */
|
case 0: /* Platform flags */
|
||||||
platform_fixed_ioport_writeb(opaque, 0, (uint32_t)val);
|
platform_fixed_ioport_writeb(opaque, 0, (uint32_t)val);
|
||||||
break;
|
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:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -160,7 +160,7 @@ static int usbback_gnttab_map(struct usbback_req *usbback_req)
|
||||||
|
|
||||||
for (i = 0; i < nr_segs; i++) {
|
for (i = 0; i < nr_segs; i++) {
|
||||||
if ((unsigned)usbback_req->req.seg[i].offset +
|
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");
|
xen_be_printf(xendev, 0, "segment crosses page boundary\n");
|
||||||
return -EINVAL;
|
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++) {
|
for (i = 0; i < usbback_req->nr_buffer_segs; i++) {
|
||||||
seg = usbback_req->req.seg + 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);
|
qemu_iovec_add(&usbback_req->packet.iov, addr, seg->length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue