1. 14 9月, 2012 1 次提交
  2. 17 9月, 2012 1 次提交
  3. 11 9月, 2012 1 次提交
  4. 07 9月, 2012 1 次提交
  5. 06 9月, 2012 2 次提交
    • K
      xen/pciback: Fix proper FLR steps. · 80ba77df
      Konrad Rzeszutek Wilk 提交于
      When we do FLR and save PCI config we did it in the wrong order.
      The end result was that if a PCI device was unbind from
      its driver, then binded to xen-pciback, and then back to its
      driver we would get:
      
      > lspci -s 04:00.0
      04:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
      13:42:12 # 4 :~/
      > echo "0000:04:00.0" > /sys/bus/pci/drivers/pciback/unbind
      > modprobe e1000e
      e1000e: Intel(R) PRO/1000 Network Driver - 2.0.0-k
      e1000e: Copyright(c) 1999 - 2012 Intel Corporation.
      e1000e 0000:04:00.0: Disabling ASPM L0s L1
      e1000e 0000:04:00.0: enabling device (0000 -> 0002)
      xen: registering gsi 48 triggering 0 polarity 1
      Already setup the GSI :48
      e1000e 0000:04:00.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
      e1000e: probe of 0000:04:00.0 failed with error -2
      
      This fixes it by first saving the PCI configuration space, then
      doing the FLR.
      Reported-by: NRen, Yongjie <yongjie.ren@intel.com>
      Reported-and-Tested-by: NTobias Geiger <tobias.geiger@vido.info>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      CC: stable@vger.kernel.org
      80ba77df
    • A
      xen/privcmd: add PRIVCMD_MMAPBATCH_V2 ioctl · ceb90fa0
      Andres Lagar-Cavilla 提交于
      PRIVCMD_MMAPBATCH_V2 extends PRIVCMD_MMAPBATCH with an additional
      field for reporting the error code for every frame that could not be
      mapped.  libxc prefers PRIVCMD_MMAPBATCH_V2 over PRIVCMD_MMAPBATCH.
      
      Also expand PRIVCMD_MMAPBATCH to return appropriate error-encoding top nibble
      in the mfn array.
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NAndres Lagar-Cavilla <andres@lagarcavilla.org>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      ceb90fa0
  6. 05 9月, 2012 1 次提交
  7. 23 8月, 2012 5 次提交
  8. 22 8月, 2012 2 次提交
  9. 17 8月, 2012 1 次提交
  10. 20 7月, 2012 8 次提交
    • O
      xen PVonHVM: move shared_info to MMIO before kexec · 00e37bdb
      Olaf Hering 提交于
      Currently kexec in a PVonHVM guest fails with a triple fault because the
      new kernel overwrites the shared info page. The exact failure depends on
      the size of the kernel image. This patch moves the pfn from RAM into
      MMIO space before the kexec boot.
      
      The pfn containing the shared_info is located somewhere in RAM. This
      will cause trouble if the current kernel is doing a kexec boot into a
      new kernel. The new kernel (and its startup code) can not know where the
      pfn is, so it can not reserve the page. The hypervisor will continue to
      update the pfn, and as a result memory corruption occours in the new
      kernel.
      
      One way to work around this issue is to allocate a page in the
      xen-platform pci device's BAR memory range. But pci init is done very
      late and the shared_info page is already in use very early to read the
      pvclock. So moving the pfn from RAM to MMIO is racy because some code
      paths on other vcpus could access the pfn during the small   window when
      the old pfn is moved to the new pfn. There is even a  small window were
      the old pfn is not backed by a mfn, and during that time all reads
      return -1.
      
      Because it is not known upfront where the MMIO region is located it can
      not be used right from the start in xen_hvm_init_shared_info.
      
      To minimise trouble the move of the pfn is done shortly before kexec.
      This does not eliminate the race because all vcpus are still online when
      the syscore_ops will be called. But hopefully there is no work pending
      at this point in time. Also the syscore_op is run last which reduces the
      risk further.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      00e37bdb
    • O
      xen: enable platform-pci only in a Xen guest · 38ad4f4b
      Olaf Hering 提交于
      While debugging kexec issues in a PVonHVM guest I modified
      xen_hvm_platform() to return false to disable all PV drivers. This
      caused a crash in platform_pci_init() because it expects certain data
      structures to be initialized properly.
      
      To avoid such a crash make sure the driver is initialized only if
      running in a Xen guest.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      38ad4f4b
    • O
      xen/pv-on-hvm kexec: shutdown watches from old kernel · 254d1a3f
      Olaf Hering 提交于
      Add xs_reset_watches function to shutdown watches from old kernel after
      kexec boot.  The old kernel does not unregister all watches in the
      shutdown path.  They are still active, the double registration can not
      be detected by the new kernel.  When the watches fire, unexpected events
      will arrive and the xenwatch thread will crash (jumps to NULL).  An
      orderly reboot of a hvm guest will destroy the entire guest with all its
      resources (including the watches) before it is rebuilt from scratch, so
      the missing unregister is not an issue in that case.
      
      With this change the xenstored is instructed to wipe all active watches
      for the guest.  However, a patch for xenstored is required so that it
      accepts the XS_RESET_WATCHES request from a client (see changeset
      23839:42a45baf037d in xen-unstable.hg). Without the patch for xenstored
      the registration of watches will fail and some features of a PVonHVM
      guest are not available. The guest is still able to boot, but repeated
      kexec boots will fail.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      254d1a3f
    • K
      xen/acpi: Fix potential memory leak. · 17f9b896
      Konrad Rzeszutek Wilk 提交于
      Coverity points out that we do not free in one case the
      pr_backup - and sure enough we forgot.
      
      Found by Coverity (CID 401970)
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      17f9b896
    • L
      xen/mce: add .poll method for mcelog device driver · a867e5d6
      Liu, Jinsong 提交于
      If a driver leaves its poll method NULL, the device is assumed to
      be both readable and writable without blocking.
      
      This patch add .poll method to xen mcelog device driver, so that
      when mcelog use system calls like ppoll or select, it would be
      blocked when no data available, and avoid spinning at CPU.
      Reported-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NLiu, Jinsong <jinsong.liu@intel.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      a867e5d6
    • L
      xen/mce: schedule a workqueue to avoid sleep in atomic context · 1b2a0551
      Liu, Jinsong 提交于
      copy_to_user might sleep and print a stack trace if it is executed
      in an atomic spinlock context. Like this:
      
      (XEN) CMCI: send CMCI to DOM0 through virq
      BUG: sleeping function called from invalid context at /home/konradinux/kernel.h:199
      in_atomic(): 1, irqs_disabled(): 0, pid: 4581, name: mcelog
      Pid: 4581, comm: mcelog Tainted: G           O 3.5.0-rc1upstream-00003-g149000b-dirty #1
       [<ffffffff8109ad9a>] __might_sleep+0xda/0x100
       [<ffffffff81329b0b>] xen_mce_chrdev_read+0xab/0x140
       [<ffffffff81148945>] vfs_read+0xc5/0x190
       [<ffffffff81148b0c>] sys_read+0x4c/0x90
       [<ffffffff815bd039>] system_call_fastpath+0x16
      
      This patch schedule a workqueue for IRQ handler to poll the data,
      and use mutex instead of spinlock, so copy_to_user sleep in atomic
      context would not occur.
      Reported-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Suggested-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NLiu, Jinsong <jinsong.liu@intel.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      1b2a0551
    • L
      xen/pcpu: Xen physical cpus online/offline sys interface · f65c9bb3
      Liu, Jinsong 提交于
      This patch provide Xen physical cpus online/offline sys interface.
      User can use it for their own purpose, like power saving:
      by offlining some cpus when light workload it save power greatly.
      
      Its basic workflow is, user online/offline cpu via sys interface,
      then hypercall xen to implement, after done xen inject virq back to dom0,
      and then dom0 sync cpu status.
      Signed-off-by: NJiang, Yunhong <yunhong.jiang@intel.com>
      Signed-off-by: NLiu, Jinsong <jinsong.liu@intel.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      f65c9bb3
    • L
      xen/mce: Add mcelog support for Xen platform · cef12ee5
      Liu, Jinsong 提交于
      When MCA error occurs, it would be handled by Xen hypervisor first,
      and then the error information would be sent to initial domain for logging.
      
      This patch gets error information from Xen hypervisor and convert
      Xen format error into Linux format mcelog. This logic is basically
      self-contained, not touching other kernel components.
      
      By using tools like mcelog tool users could read specific error information,
      like what they did under native Linux.
      
      To test follow directions outlined in Documentation/acpi/apei/einj.txt
      Acked-and-tested-by: NBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: NKe, Liping <liping.ke@intel.com>
      Signed-off-by: NJiang, Yunhong <yunhong.jiang@intel.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NLiu, Jinsong <jinsong.liu@intel.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      cef12ee5
  11. 12 6月, 2012 1 次提交
  12. 30 5月, 2012 2 次提交
  13. 22 5月, 2012 1 次提交
  14. 21 5月, 2012 2 次提交
  15. 18 5月, 2012 1 次提交
  16. 15 5月, 2012 1 次提交
  17. 08 5月, 2012 3 次提交
  18. 27 4月, 2012 2 次提交
  19. 20 4月, 2012 2 次提交
    • K
      xen/resume: Fix compile warnings. · 186bab1c
      Konrad Rzeszutek Wilk 提交于
      linux/drivers/xen/manage.c: In function 'do_suspend':
      linux/drivers/xen/manage.c:160:5: warning: 'si.cancelled' may be used uninitialized in this function
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      186bab1c
    • K
      xen/xenbus: Add quirk to deal with misconfigured backends. · 3066616c
      Konrad Rzeszutek Wilk 提交于
      A rather annoying and common case is when booting a PVonHVM guest
      and exposing the PV KBD and PV VFB - as broken toolstacks don't
      always initialize the backends correctly.
      
      Normally The HVM guest is using the VGA driver and the emulated
      keyboard for this (though upstream version of QEMU implements
      PV KBD, but still uses a VGA driver). We provide a very basic
      two-stage wait mechanism - where we wait for 30 seconds for all
      devices, and then for 270 for all them except the two mentioned.
      
      That allows us to wait for the essential devices, like network
      or disk for the full 6 minutes.
      
      To trigger this, put this in your guest config:
      
      vfb = [ 'vnc=1, vnclisten=0.0.0.0 ,vncunused=1']
      
      instead of this:
      vnc=1
      vnclisten="0.0.0.0"
      
      CC: stable@kernel.org
      Acked-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      [v3: Split delay in non-essential (30 seconds) and essential
       devices per Ian and Stefano suggestion]
      [v4: Added comments per Stefano suggestion]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      3066616c
  20. 18 4月, 2012 2 次提交