Skip to content
Snippets Groups Projects
  1. Sep 21, 2017
  2. Sep 20, 2017
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging · b62b7ed0
      Peter Maydell authored
      
      These patches fix regressions in 2.10
      
      # gpg: Signature made Wed 20 Sep 2017 07:51:07 BST
      # gpg:                using DSA key 0x02FC3AEB0101DBC2
      # gpg: Good signature from "Greg Kurz <groug@kaod.org>"
      # gpg:                 aka "Greg Kurz <groug@free.fr>"
      # gpg:                 aka "Greg Kurz <gkurz@linux.vnet.ibm.com>"
      # gpg:                 aka "Gregory Kurz (Groug) <groug@free.fr>"
      # gpg:                 aka "[jpeg image of size 3330]"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 2BD4 3B44 535E C0A7 9894  DBA2 02FC 3AEB 0101 DBC2
      
      * remotes/gkurz/tags/for-upstream:
        9pfs: check the size of transport buffer before marshaling
        9pfs: fix name_to_path assertion in v9fs_complete_rename()
        9pfs: fix readdir() for 9p2000.u
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      b62b7ed0
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging · d3f5433c
      Peter Maydell authored
      
      Machine/CPU/NUMA queue, 2017-09-19
      
      # gpg: Signature made Tue 19 Sep 2017 21:17:01 BST
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * remotes/ehabkost/tags/machine-next-pull-request:
        MAINTAINERS: Update git URLs for my trees
        hw/acpi-build: Fix SRAT memory building in case of node 0 without RAM
        NUMA: Replace MAX_NODES with nb_numa_nodes in for loop
        numa: cpu: calculate/set default node-ids after all -numa CLI options are parsed
        arm: drop intermediate cpu_model -> cpu type parsing and use cpu type directly
        pc: use generic cpu_model parsing
        vl.c: convert cpu_model to cpu type and set of global properties before machine_init()
        cpu: make cpu_generic_init() abort QEMU on error
        qom: cpus: split cpu_generic_init() on feature parsing and cpu creation parts
        hostmem-file: Add "discard-data" option
        osdep: Define QEMU_MADV_REMOVE
        vl: Clean up user-creatable objects when exiting
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      d3f5433c
    • Jan Dakinevich's avatar
      9pfs: check the size of transport buffer before marshaling · 772a7369
      Jan Dakinevich authored
      
      v9fs_do_readdir_with_stat() should check for a maximum buffer size
      before an attempt to marshal gathered data. Otherwise, buffers assumed
      as misconfigured and the transport would be broken.
      
      The patch brings v9fs_do_readdir_with_stat() in conformity with
      v9fs_do_readdir() behavior.
      
      Signed-off-by: default avatarJan Dakinevich <jan.dakinevich@gmail.com>
      [groug, regression caused my commit 8d37de41 # 2.10]
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      772a7369
    • Jan Dakinevich's avatar
      9pfs: fix name_to_path assertion in v9fs_complete_rename() · 4d8bc733
      Jan Dakinevich authored
      
      The third parameter of v9fs_co_name_to_path() must not contain `/'
      character.
      
      The issue is most likely related to 9p2000.u protocol only.
      
      Signed-off-by: default avatarJan Dakinevich <jan.dakinevich@gmail.com>
      [groug, regression caused by commit f57f5878 # 2.10]
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      4d8bc733
    • Jan Dakinevich's avatar
      9pfs: fix readdir() for 9p2000.u · 6069537f
      Jan Dakinevich authored
      
      If the client is using 9p2000.u, the following occurs:
      
      $ cd ${virtfs_shared_dir}
      $ mkdir -p a/b/c
      $ ls a/b
      ls: cannot access 'a/b/a': No such file or directory
      ls: cannot access 'a/b/b': No such file or directory
      a  b  c
      
      instead of the expected:
      
      $ ls a/b
      c
      
      This is a regression introduced by commit f57f5878;
      local_name_to_path() now resolves ".." and "." in paths,
      and v9fs_do_readdir_with_stat()->stat_to_v9stat() then
      copies the basename of the resulting path to the response.
      With the example above, this means that "." and ".." are
      turned into "b" and "a" respectively...
      
      stat_to_v9stat() currently assumes it is passed a full
      canonicalized path and uses it to do two different things:
      1) to pass it to v9fs_co_readlink() in case the file is a symbolic
         link
      2) to set the name field of the V9fsStat structure to the basename
         part of the given path
      
      It only has two users: v9fs_stat() and v9fs_do_readdir_with_stat().
      
      v9fs_stat() really needs 1) and 2) to be performed since it starts
      with the full canonicalized path stored in the fid. It is different
      for v9fs_do_readdir_with_stat() though because the name we want to
      put into the V9fsStat structure is the d_name field of the dirent
      actually (ie, we want to keep the "." and ".." special names). So,
      we only need 1) in this case.
      
      This patch hence adds a basename argument to stat_to_v9stat(), to
      be used to set the name field of the V9fsStat structure, and moves
      the basename logic to v9fs_stat().
      
      Signed-off-by: default avatarJan Dakinevich <jan.dakinevich@gmail.com>
      (groug, renamed old name argument to path and updated changelog)
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      6069537f
  3. Sep 19, 2017
    • Eduardo Habkost's avatar
      MAINTAINERS: Update git URLs for my trees · e3d038b8
      Eduardo Habkost authored
      
      List the branches where I queue patches for Machine Core, NUMA,
      Memory Backends, and X86.  Update the NUMA section to list the
      "machine-next" branch instead of "numa".
      
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170901153928.17058-1-ehabkost@redhat.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      e3d038b8
    • Eduardo Habkost's avatar
      hw/acpi-build: Fix SRAT memory building in case of node 0 without RAM · 4926403c
      Eduardo Habkost authored
      
      Currently, Using the fisrt node without memory on the machine makes
      QEMU unhappy. With this example command line:
        ... \
        -m 1024M,slots=4,maxmem=32G \
        -numa node,nodeid=0 \
        -numa node,mem=1024M,nodeid=1 \
        -numa node,nodeid=2 \
        -numa node,nodeid=3 \
      Guest reports "No NUMA configuration found" and the NUMA topology is
      wrong.
      
      This is because when QEMU builds ACPI SRAT, it regards node 0 as the
      default node to deal with the memory hole(640K-1M). this means the
      node0 must have some memory(>1M), but, actually it can have no
      memory.
      
      Fix this problem by cut out the 640K hole in the same way the PCI
      4G hole does.
      
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: default avatarDou Liyang <douly.fnst@cn.fujitsu.com>
      Message-Id: <1504231805-30957-2-git-send-email-douly.fnst@cn.fujitsu.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      4926403c
    • Dou Liyang's avatar
      NUMA: Replace MAX_NODES with nb_numa_nodes in for loop · f51878ba
      Dou Liyang authored
      
      In QEMU, the number of the NUMA nodes is determined by parse_numa_opts().
      Then, QEMU uses it for iteration, for example:
        for (i = 0; i < nb_numa_nodes; i++)
      
      However, in memory_region_allocate_system_memory(), it uses MAX_NODES
      not nb_numa_nodes.
      
      So, replace MAX_NODES with nb_numa_nodes to keep code consistency and
      reduce the loop times.
      
      Signed-off-by: default avatarDou Liyang <douly.fnst@cn.fujitsu.com>
      Message-Id: <1503387936-3483-1-git-send-email-douly.fnst@cn.fujitsu.com>
      Reviewed-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      f51878ba
    • Igor Mammedov's avatar
      numa: cpu: calculate/set default node-ids after all -numa CLI options are parsed · 79e07936
      Igor Mammedov authored
      
      Calculating default node-ids for CPUs in possible_cpu_arch_ids()
      is rather fragile since defaults calculation uses nb_numa_nodes but
      callback might be potentially called early before all -numa CLI
      options are parsed, which would lead to cpus assigned only upto
      nb_numa_nodes at the time possible_cpu_arch_ids() is called.
      
      Issue was introduced by
      (7c88e65d numa: mirror cpu to node mapping in MachineState::possible_cpus)
      and for example CLI:
        -smp 4 -numa node,cpus=0 -numa node
      would set props.node-id in possible_cpus array for every non
      explicitly mapped CPU to the first node.
      
      Issue is not visible to guest nor to mgmt interface due to
        1) implictly mapped cpus are forced to the first node in
           case of partial mapping
        2) in case of default mapping possible_cpu_arch_ids() is
           called after all -numa options are parsed (resulting
           in correct mapping).
      
      However it's fragile to rely on late execution of
      possible_cpu_arch_ids(), therefore add machine specific
      callback that returns node-id for CPU and use it to calculate/
      set defaults at machine_numa_finish_init() time when all -numa
      options are parsed.
      
      Reported-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
      Message-Id: <1496314408-163972-1-git-send-email-imammedo@redhat.com>
      Reviewed-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      79e07936
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170919-v2' into staging · c5170027
      Peter Maydell authored
      
      Assorted s390x patches:
      - introduce virtio-gpu-ccw, with virtio-gpu endian fixes
      - lots of cleanup in the s390x code
      - make device_add work for s390x cpus
      - enable seccomp on s390x
      - an ivshmem endian fix
      - set the reserved DHCP client architecture id for netboot
      - fixes in the css and pci support
      
      # gpg: Signature made Tue 19 Sep 2017 17:39:45 BST
      # gpg:                using RSA key 0xDECF6B93C6F02FAF
      # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
      # gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
      # gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
      # gpg:                 aka "Cornelia Huck <cohuck@redhat.com>"
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * remotes/cohuck/tags/s390x-20170919-v2: (38 commits)
        MAINTAINERS/s390x: add terminal3270.c
        virtio-ccw: Create a virtio gpu device for the ccw bus
        virtio-gpu: Handle endian conversion
        s390x/ccw: create s390 phb for compat reasons as well
        configure: Allow --enable-seccomp on s390x, too
        virtio-ccw: remove stale comments on endianness
        s390x: allow CPU hotplug in random core-id order
        s390x: generate sclp cpu information from possible_cpus
        s390x: get rid of cpu_s390x_create()
        s390x: get rid of cpu_states and use possible_cpus instead
        s390x: implement query-hotpluggable-cpus
        s390x: CPU hot unplug via device_del cannot work for now
        s390x: allow cpu hotplug via device_add
        s390x: print CPU definitions in sorted order
        target/s390x: rename next_cpu_id to next_core_id
        target/s390x: use "core-id" for cpu number/address/id handling
        target/s390x: set cpu->id for linux user when realizing
        s390x: allow only 1 CPU with TCG
        target/s390x: use program_interrupt() in per_check_exception()
        target/s390x: use trigger_pgm_exception() in s390_cpu_handle_mmu_fault()
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      c5170027
Loading