1. 21 9月, 2017 31 次提交
  2. 20 9月, 2017 9 次提交
    • J
      9pfs: check the size of transport buffer before marshaling · 772a7369
      Jan Dakinevich 提交于
      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: NJan Dakinevich <jan.dakinevich@gmail.com>
      [groug, regression caused my commit 8d37de41 # 2.10]
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      772a7369
    • J
      9pfs: fix name_to_path assertion in v9fs_complete_rename() · 4d8bc733
      Jan Dakinevich 提交于
      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: NJan Dakinevich <jan.dakinevich@gmail.com>
      [groug, regression caused by commit f57f5878 # 2.10]
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      4d8bc733
    • J
      9pfs: fix readdir() for 9p2000.u · 6069537f
      Jan Dakinevich 提交于
      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: NJan Dakinevich <jan.dakinevich@gmail.com>
      (groug, renamed old name argument to path and updated changelog)
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      6069537f
    • E
      MAINTAINERS: Update git URLs for my trees · e3d038b8
      Eduardo Habkost 提交于
      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: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <20170901153928.17058-1-ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      e3d038b8
    • E
      hw/acpi-build: Fix SRAT memory building in case of node 0 without RAM · 4926403c
      Eduardo Habkost 提交于
      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: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NDou Liyang <douly.fnst@cn.fujitsu.com>
      Message-Id: <1504231805-30957-2-git-send-email-douly.fnst@cn.fujitsu.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      4926403c
    • D
      NUMA: Replace MAX_NODES with nb_numa_nodes in for loop · f51878ba
      Dou Liyang 提交于
      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: NDou Liyang <douly.fnst@cn.fujitsu.com>
      Message-Id: <1503387936-3483-1-git-send-email-douly.fnst@cn.fujitsu.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      f51878ba
    • I
      numa: cpu: calculate/set default node-ids after all -numa CLI options are parsed · 79e07936
      Igor Mammedov 提交于
      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: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <1496314408-163972-1-git-send-email-imammedo@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      79e07936
    • P
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170919-v2' into staging · c5170027
      Peter Maydell 提交于
      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: NPeter Maydell <peter.maydell@linaro.org>
      c5170027
    • C
      MAINTAINERS/s390x: add terminal3270.c · 9d1c4449
      Christian Borntraeger 提交于
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Message-Id: <20170918130455.144262-1-borntraeger@de.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      9d1c4449