1. 22 3月, 2013 2 次提交
    • J
      xen-pciback: notify hypervisor about devices intended to be assigned to guests · 909b3fdb
      Jan Beulich 提交于
      For MSI-X capable devices the hypervisor wants to write protect the
      MSI-X table and PBA, yet it can't assume that resources have been
      assigned to their final values at device enumeration time. Thus have
      pciback do that notification, as having the device controlled by it is
      a prerequisite to assigning the device to guests anyway.
      
      This is the kernel part of hypervisor side commit 4245d33 ("x86/MSI:
      add mechanism to fully protect MSI-X table from PV guest accesses") on
      the master branch of git://xenbits.xen.org/xen.git.
      
      CC: stable@vger.kernel.org
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      909b3fdb
    • K
      xen/acpi-processor: Don't dereference struct acpi_processor on all CPUs. · 949dd8c1
      Konrad Rzeszutek Wilk 提交于
      With git commit c705c78c
      "acpi: Export the acpi_processor_get_performance_info" we are now
      using a different mechanism to access the P-states.
      
      The acpi_processor per-cpu structure is set and filtered by the
      core ACPI code which shrinks the per_cpu contents to only online CPUs.
      In the past we would call acpi_processor_register_performance()
      which would have not tried to dereference offline cpus.
      
      With the new patch and the fact that the loop we take is for
      for_all_possible_cpus we end up crashing on some machines.
      We could modify the loop to be for online_cpus - but all the other
      loops in the code use possible_cpus (for a good reason) - so lets
      leave it as so and just check if per_cpu(processor) is NULL.
      
      With this patch we will bypass the !online but possible CPUs.
      This fixes:
      
      IP: [<ffffffffa00d13b5>] xen_acpi_processor_init+0x1b6/0xe01 [xen_acpi_processor]
      PGD 4126e6067 PUD 4126e3067 PMD 0
      Oops: 0002 [#1] SMP
      Pid: 432, comm: modprobe Not tainted 3.9.0-rc3+ #28 To be filled by O.E.M. To be filled by O.E.M./M5A97
      RIP: e030:[<ffffffffa00d13b5>]  [<ffffffffa00d13b5>] xen_acpi_processor_init+0x1b6/0xe01 [xen_acpi_processor]
      RSP: e02b:ffff88040c8a3ce8  EFLAGS: 00010282
      .. snip..
      Call Trace:
       [<ffffffffa00d11ff>] ? read_acpi_id+0x12b/0x12b [xen_acpi_processor]
       [<ffffffff8100215a>] do_one_initcall+0x12a/0x180
       [<ffffffff810c42c3>] load_module+0x1cd3/0x2870
       [<ffffffff81319b70>] ? ddebug_proc_open+0xc0/0xc0
       [<ffffffff810c4f37>] sys_init_module+0xd7/0x120
       [<ffffffff8166ce19>] system_call_fastpath+0x16/0x1b
      
      on some machines.
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      949dd8c1
  2. 12 3月, 2013 1 次提交
  3. 06 3月, 2013 2 次提交
    • K
      acpi: Export the acpi_processor_get_performance_info · c705c78c
      Konrad Rzeszutek Wilk 提交于
      The git commit d5aaffa9
      (cpufreq: handle cpufreq being disabled for all exported function)
      tightens the cpufreq API by returning errors when disable_cpufreq()
      had been called.
      
      The problem we are hitting is that the module xen-acpi-processor which
      uses the ACPI's functions: acpi_processor_register_performance,
      acpi_processor_preregister_performance, and acpi_processor_notify_smm
      fails at acpi_processor_register_performance with -22.
      
      Note that earlier during bootup in arch/x86/xen/setup.c there is also
      an call to cpufreq's API: disable_cpufreq().
      
      This is b/c we want the Linux kernel to parse the ACPI data, but leave
      the cpufreq decisions to the hypervisor.
      
      In v3.9 all the checks that d5aaffa9
      added are now hit and the calls to cpufreq_register_notifier will now
      fail. This means that acpi_processor_ppc_init ends up printing:
      
      "Warning: Processor Platform Limit not supported"
      
      and the acpi_processor_ppc_status is not set.
      
      The repercussions of that is that the call to
      acpi_processor_register_performance fails right away at:
      
      	if (!(acpi_processor_ppc_status & PPC_REGISTERED))
      
      and we don't progress any further on parsing and extracting the _P*
      objects.
      
      The only reason the Xen code called that function was b/c it was
      exported and the only way to gather the P-states. But we can also
      just make acpi_processor_get_performance_info be exported and not
      use acpi_processor_register_performance. This patch does so.
      Acked-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      c705c78c
    • K
      xen/pciback: Don't disable a PCI device that is already disabled. · bdc5c181
      Konrad Rzeszutek Wilk 提交于
      While shuting down a HVM guest with pci devices passed through we
      get this:
      
      pciback 0000:04:00.0: restoring config space at offset 0x4 (was 0x100000, writing 0x100002)
      ------------[ cut here ]------------
      WARNING: at drivers/pci/pci.c:1397 pci_disable_device+0x88/0xa0()
      Hardware name: MS-7640
      Device pciback
      disabling already-disabled device
      Modules linked in:
      Pid: 53, comm: xenwatch Not tainted 3.9.0-rc1-20130304a+ #1
      Call Trace:
       [<ffffffff8106994a>] warn_slowpath_common+0x7a/0xc0
       [<ffffffff81069a31>] warn_slowpath_fmt+0x41/0x50
       [<ffffffff813cf288>] pci_disable_device+0x88/0xa0
       [<ffffffff814554a7>] xen_pcibk_reset_device+0x37/0xd0
       [<ffffffff81454b6f>] ? pcistub_put_pci_dev+0x6f/0x120
       [<ffffffff81454b8d>] pcistub_put_pci_dev+0x8d/0x120
       [<ffffffff814582a9>] __xen_pcibk_release_devices+0x59/0xa0
      
      This fixes the bug.
      
      CC: stable@vger.kernel.org
      Reported-and-Tested-by: NSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      bdc5c181
  4. 01 3月, 2013 1 次提交
  5. 25 2月, 2013 2 次提交
  6. 20 2月, 2013 10 次提交
  7. 14 2月, 2013 1 次提交
  8. 13 2月, 2013 1 次提交
  9. 06 2月, 2013 2 次提交
  10. 30 1月, 2013 1 次提交
    • Y
      x86: Don't panic if can not alloc buffer for swiotlb · ac2cbab2
      Yinghai Lu 提交于
      Normal boot path on system with iommu support:
      swiotlb buffer will be allocated early at first and then try to initialize
      iommu, if iommu for intel or AMD could setup properly, swiotlb buffer
      will be freed.
      
      The early allocating is with bootmem, and could panic when we try to use
      kdump with buffer above 4G only, or with memmap to limit mem under 4G.
      for example: memmap=4095M$1M to remove memory under 4G.
      
      According to Eric, add _nopanic version and no_iotlb_memory to fail
      map single later if swiotlb is still needed.
      
      -v2: don't pass nopanic, and use -ENOMEM return value according to Eric.
           panic early instead of using swiotlb_full to panic...according to Eric/Konrad.
      -v3: make swiotlb_init to be notpanic, but will affect:
           arm64, ia64, powerpc, tile, unicore32, x86.
      -v4: cleanup swiotlb_init by removing swiotlb_init_with_default_size.
      Suggested-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Link: http://lkml.kernel.org/r/1359058816-7615-36-git-send-email-yinghai@kernel.orgReviewed-and-tested-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
      Cc: linux-mips@linux-mips.org
      Cc: xen-devel@lists.xensource.com
      Cc: virtualization@lists.linux-foundation.org
      Cc: Shuah Khan <shuahkhan@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      ac2cbab2
  11. 26 1月, 2013 1 次提交
  12. 16 1月, 2013 7 次提交
  13. 12 1月, 2013 1 次提交
  14. 04 1月, 2013 1 次提交
    • G
      Drivers: xen: remove __dev* attributes. · 345a5255
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, and __devinitdata from these
      drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Jan Beulich <jbeulich@suse.com>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      345a5255
  15. 29 11月, 2012 6 次提交
  16. 27 11月, 2012 1 次提交
    • L
      xen/acpi: ACPI PAD driver · 92e3229d
      Liu, Jinsong 提交于
      PAD is acpi Processor Aggregator Device which provides a control point
      that enables the platform to perform specific processor configuration
      and control that applies to all processors in the platform.
      
      This patch is to implement Xen acpi pad logic. When running under Xen
      virt platform, native pad driver would not work. Instead Xen pad driver,
      a self-contained and thin logic level, would take over acpi pad logic.
      
      When acpi pad notify OSPM, xen pad logic intercept and parse _PUR object
      to get the expected idle cpu number, and then hypercall to hypervisor.
      Xen hypervisor would then do the rest work, say, core parking, to idle
      specific number of cpus on its own policy.
      Signed-off-by: NJan Beulich <JBeulich@suse.com>
      Signed-off-by: NLiu Jinsong <jinsong.liu@intel.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      92e3229d