Commit d8e3b729 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging



pc, acpi, virtio

Most notably this includes virtio 1 patches
Still not all devices converted, and not fully spec compliant,
so disabled by default.

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Thu Jun 11 12:53:08 2015 BST using RSA key ID D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"

* remotes/mst/tags/for_upstream: (42 commits)
  i386/acpi-build: fix PXB workarounds for unsupported BIOSes
  i386/acpi-build: more traditional _UID and _HID for PXB root buses
  vhost-scsi: move qdev properties into vhost-scsi.c
  virtio-9p-device: move qdev properties into virtio-9p-device.c
  virtio-serial-bus: move qdev properties into virtio-serial-bus.c
  virtio-rng: move qdev properties into virtio-rng.c
  virtio-scsi: move qdev properties into virtio-scsi.c
  virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES
  virtio-net: move qdev properties into virtio-net.c
  virtio-input: emulated devices [pci]
  virtio-input: core code & base class [pci]
  pci: add PCI_CLASS_INPUT_*
  virtio-pci: fill VirtIOPCIRegions early.
  virtio-pci: drop identical virtio_pci_cap
  virtio-pci: move cap type to VirtIOPCIRegion
  virtio-pci: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map
  virtio-pci: add virtio_pci_modern_region_map()
  virtio-pci: add virtio_pci_modern_regions_init()
  virtio-pci: add struct VirtIOPCIRegion for virtio-1 regions
  virtio-balloon: switch to virtio_add_feature
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents afa25c4b 4ebc736e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -140,7 +140,8 @@ out:
/* virtio-9p device */

static Property virtio_9p_properties[] = {
    DEFINE_VIRTIO_9P_PROPERTIES(V9fsState, fsconf),
    DEFINE_PROP_STRING("mount_tag", V9fsState, fsconf.tag),
    DEFINE_PROP_STRING("fsdev", V9fsState, fsconf.fsdev_id),
    DEFINE_PROP_END_OF_LIST(),
};

+0 −4
Original line number Diff line number Diff line
@@ -391,8 +391,4 @@ extern int v9fs_name_to_path(V9fsState *s, V9fsPath *dirpath,
#define VIRTIO_9P(obj) \
        OBJECT_CHECK(V9fsState, (obj), TYPE_VIRTIO_9P)

#define DEFINE_VIRTIO_9P_PROPERTIES(_state, _field)             \
        DEFINE_PROP_STRING("mount_tag", _state, _field.tag),    \
        DEFINE_PROP_STRING("fsdev", _state, _field.fsdev_id)

#endif
+2 −1
Original line number Diff line number Diff line
@@ -1083,7 +1083,8 @@ static void virtio_serial_device_unrealize(DeviceState *dev, Error **errp)
}

static Property virtio_serial_properties[] = {
    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOSerial, serial),
    DEFINE_PROP_UINT32("max_ports", VirtIOSerial, serial.max_virtserial_ports,
                                                  31),
    DEFINE_PROP_END_OF_LIST(),
};

+6 −7
Original line number Diff line number Diff line
@@ -833,7 +833,7 @@ static Aml *build_crs(PCIHostState *host,
             * Work-around for old bioses
             * that do not support multiple root buses
             */
            if (range_base || range_base > range_limit) {
            if (range_base && range_base <= range_limit) {
                aml_append(crs,
                           aml_word_io(AML_MIN_FIXED, AML_MAX_FIXED,
                                       AML_POS_DECODE, AML_ENTIRE_RANGE,
@@ -854,7 +854,7 @@ static Aml *build_crs(PCIHostState *host,
             * Work-around for old bioses
             * that do not support multiple root buses
             */
            if (range_base || range_base > range_limit) {
            if (range_base && range_base <= range_limit) {
                aml_append(crs,
                           aml_dword_memory(AML_POS_DECODE, AML_MIN_FIXED,
                                            AML_MAX_FIXED, AML_NON_CACHEABLE,
@@ -876,7 +876,7 @@ static Aml *build_crs(PCIHostState *host,
             * Work-around for old bioses
             * that do not support multiple root buses
             */
            if (range_base || range_base > range_limit) {
            if (range_base && range_base <= range_limit) {
                aml_append(crs,
                           aml_dword_memory(AML_POS_DECODE, AML_MIN_FIXED,
                                            AML_MAX_FIXED, AML_NON_CACHEABLE,
@@ -945,9 +945,8 @@ build_ssdt(GArray *table_data, GArray *linker,

            scope = aml_scope("\\_SB");
            dev = aml_device("PC%.02X", bus_num);
            aml_append(dev,
                       aml_name_decl("_UID", aml_string("PC%.02X", bus_num)));
            aml_append(dev, aml_name_decl("_HID", aml_string("PNP0A03")));
            aml_append(dev, aml_name_decl("_UID", aml_int(bus_num)));
            aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0A03")));
            aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num)));

            if (numa_node != NUMA_NODE_UNASSIGNED) {
+8 −6
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ static const int kernel_feature_bits[] = {
    VIRTIO_RING_F_INDIRECT_DESC,
    VIRTIO_RING_F_EVENT_IDX,
    VIRTIO_NET_F_MRG_RXBUF,
    VIRTIO_F_VERSION_1,
    VHOST_INVALID_FEATURE_BIT
};

@@ -62,6 +63,7 @@ static const int user_feature_bits[] = {
    VIRTIO_RING_F_EVENT_IDX,

    VIRTIO_F_ANY_LAYOUT,
    VIRTIO_F_VERSION_1,
    VIRTIO_NET_F_CSUM,
    VIRTIO_NET_F_GUEST_CSUM,
    VIRTIO_NET_F_GSO,
@@ -107,13 +109,13 @@ static const int *vhost_net_get_feature_bits(struct vhost_net *net)
    return feature_bits;
}

unsigned vhost_net_get_features(struct vhost_net *net, unsigned features)
uint64_t vhost_net_get_features(struct vhost_net *net, uint64_t features)
{
    return vhost_get_features(&net->dev, vhost_net_get_feature_bits(net),
            features);
}

void vhost_net_ack_features(struct vhost_net *net, unsigned features)
void vhost_net_ack_features(struct vhost_net *net, uint64_t features)
{
    net->dev.acked_features = net->dev.backend_features;
    vhost_ack_features(&net->dev, vhost_net_get_feature_bits(net), features);
@@ -147,7 +149,7 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options)
            goto fail;
        }
        net->dev.backend_features = qemu_has_vnet_hdr(options->net_backend)
            ? 0 : (1 << VHOST_NET_F_VIRTIO_NET_HDR);
            ? 0 : (1ULL << VHOST_NET_F_VIRTIO_NET_HDR);
        net->backend = r;
    } else {
        net->dev.backend_features = 0;
@@ -167,7 +169,7 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options)
    if (backend_kernel) {
        if (!qemu_has_vnet_hdr_len(options->net_backend,
                               sizeof(struct virtio_net_hdr_mrg_rxbuf))) {
            net->dev.features &= ~(1 << VIRTIO_NET_F_MRG_RXBUF);
            net->dev.features &= ~(1ULL << VIRTIO_NET_F_MRG_RXBUF);
        }
        if (~net->dev.features & net->dev.backend_features) {
            fprintf(stderr, "vhost lacks feature mask %" PRIu64
@@ -431,11 +433,11 @@ void vhost_net_cleanup(struct vhost_net *net)
{
}

unsigned vhost_net_get_features(struct vhost_net *net, unsigned features)
uint64_t vhost_net_get_features(struct vhost_net *net, uint64_t features)
{
    return features;
}
void vhost_net_ack_features(struct vhost_net *net, unsigned features)
void vhost_net_ack_features(struct vhost_net *net, uint64_t features)
{
}

Loading