1. 31 7月, 2013 1 次提交
  2. 18 6月, 2013 1 次提交
  3. 07 6月, 2013 1 次提交
  4. 24 5月, 2013 1 次提交
  5. 23 4月, 2013 2 次提交
    • W
      xen-netback: coalesce slots in TX path and fix regressions · 2810e5b9
      Wei Liu 提交于
      This patch tries to coalesce tx requests when constructing grant copy
      structures. It enables netback to deal with situation when frontend's
      MAX_SKB_FRAGS is larger than backend's MAX_SKB_FRAGS.
      
      With the help of coalescing, this patch tries to address two regressions
      avoid reopening the security hole in XSA-39.
      
      Regression 1. The reduction of the number of supported ring entries (slots)
      per packet (from 18 to 17). This regression has been around for some time but
      remains unnoticed until XSA-39 security fix. This is fixed by coalescing
      slots.
      
      Regression 2. The XSA-39 security fix turning "too many frags" errors from
      just dropping the packet to a fatal error and disabling the VIF. This is fixed
      by coalescing slots (handling 18 slots when backend's MAX_SKB_FRAGS is 17)
      which rules out false positive (using 18 slots is legit) and dropping packets
      using 19 to `max_skb_slots` slots.
      
      To avoid reopening security hole in XSA-39, frontend sending packet using more
      than max_skb_slots is considered malicious.
      
      The behavior of netback for packet is thus:
      
          1-18            slots: valid
         19-max_skb_slots slots: drop and respond with an error
         max_skb_slots+   slots: fatal error
      
      max_skb_slots is configurable by admin, default value is 20.
      
      Also change variable name from "frags" to "slots" in netbk_count_requests.
      
      Please note that RX path still has dependency on MAX_SKB_FRAGS. This will be
      fixed with separate patch.
      Signed-off-by: NWei Liu <wei.liu2@citrix.com>
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2810e5b9
    • W
      xen-netfront: reduce gso_max_size to account for max TCP header · 9ecd1a75
      Wei Liu 提交于
      The maximum packet including header that can be handled by netfront / netback
      wire format is 65535. Reduce gso_max_size accordingly.
      
      Drop skb and print warning when skb->len > 65535. This can 1) save the effort
      to send malformed packet to netback, 2) help spotting misconfiguration of
      netfront in the future.
      Signed-off-by: NWei Liu <wei.liu2@citrix.com>
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9ecd1a75
  6. 19 4月, 2013 1 次提交
    • R
      xen-block: implement indirect descriptors · 402b27f9
      Roger Pau Monne 提交于
      Indirect descriptors introduce a new block operation
      (BLKIF_OP_INDIRECT) that passes grant references instead of segments
      in the request. This grant references are filled with arrays of
      blkif_request_segment_aligned, this way we can send more segments in a
      request.
      
      The proposed implementation sets the maximum number of indirect grefs
      (frames filled with blkif_request_segment_aligned) to 256 in the
      backend and 32 in the frontend. The value in the frontend has been
      chosen experimentally, and the backend value has been set to a sane
      value that allows expanding the maximum number of indirect descriptors
      in the frontend if needed.
      
      The migration code has changed from the previous implementation, in
      which we simply remapped the segments on the shared ring. Now the
      maximum number of segments allowed in a request can change depending
      on the backend, so we have to requeue all the requests in the ring and
      in the queue and split the bios in them if they are bigger than the
      new maximum number of segments.
      
      [v2: Fixed minor comments by Konrad.
      [v1: Added padding to make the indirect request 64bit aligned.
       Added some BUGs, comments; fixed number of indirect pages in
       blkif_get_x86_{32/64}_req. Added description about the indirect operation
       in blkif.h]
      Signed-off-by: NRoger Pau Monné <roger.pau@citrix.com>
      [v3: Fixed spaces and tabs mix ups]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      402b27f9
  7. 22 3月, 2013 1 次提交
  8. 12 3月, 2013 1 次提交
    • D
      xen/blkback: correctly respond to unknown, non-native requests · 0e367ae4
      David Vrabel 提交于
      If the frontend is using a non-native protocol (e.g., a 64-bit
      frontend with a 32-bit backend) and it sent an unrecognized request,
      the request was not translated and the response would have the
      incorrect ID.  This may cause the frontend driver to behave
      incorrectly or crash.
      
      Since the ID field in the request is always in the same place,
      regardless of the request type we can get the correct ID and make a
      valid response (which will report BLKIF_RSP_EOPNOTSUPP).
      
      This bug affected 64-bit SLES 11 guests when using a 32-bit backend.
      This guest does a BLKIF_OP_RESERVED_1 (BLKIF_OP_PACKET in the SLES
      source) and would crash in blkif_int() as the ID in the response would
      be invalid.
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      0e367ae4
  9. 20 2月, 2013 4 次提交
  10. 18 12月, 2012 1 次提交
  11. 29 11月, 2012 2 次提交
  12. 27 11月, 2012 2 次提交
    • K
      xen/acpi: Fix compile error by missing decleration for xen_domain. · 0dfa5b5d
      Konrad Rzeszutek Wilk 提交于
      Commit 92e3229d
      ("xen/acpi: ACPI PAD driver") adds a new function but forgets to
      use the right header. Without it, we get:
      
      In file included from drivers/xen/features.c:15:0:
      include/xen/interface/version.h: In function ‘xen_running_on_version_or_later’:
      include/xen/interface/version.h:72:2: error: implicit declaration of function ‘xen_domain’ [-Werror=implicit-function-declaration]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      0dfa5b5d
    • 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
  13. 20 10月, 2012 2 次提交
  14. 04 10月, 2012 1 次提交
    • O
      xen pv-on-hvm: add pfn_is_ram helper for kdump · 34b6f01a
      Olaf Hering 提交于
      Register pfn_is_ram helper speed up reading /proc/vmcore in the kdump
      kernel. See commit message of 997c136f ("fs/proc/vmcore.c: add hook
      to read_from_oldmem() to check for non-ram pages") for details.
      
      It makes use of a new hvmop HVMOP_get_mem_type which was introduced in
      xen 4.2 (23298:26413986e6e0) and backported to 4.1.1.
      
      The new function is currently only enabled for reading /proc/vmcore.
      Later it will be used also for the kexec kernel. Since that requires
      more changes in the generic kernel make it static for the time being.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      34b6f01a
  15. 03 10月, 2012 1 次提交
  16. 24 9月, 2012 2 次提交
  17. 19 9月, 2012 1 次提交
  18. 14 9月, 2012 1 次提交
  19. 23 8月, 2012 2 次提交
  20. 22 8月, 2012 2 次提交
  21. 09 8月, 2012 2 次提交
  22. 14 9月, 2012 1 次提交
  23. 20 7月, 2012 3 次提交
  24. 21 3月, 2012 1 次提交
    • S
      xen: support pirq_eoi_map · 9846ff10
      Stefano Stabellini 提交于
      The pirq_eoi_map is a bitmap offered by Xen to check which pirqs need to
      be EOI'd without having to issue an hypercall every time.
      We use PHYSDEVOP_pirq_eoi_gmfn_v2 to map the bitmap, then if we
      succeed we use pirq_eoi_map to check whether pirqs need eoi.
      
      Changes in v3:
      
      - explicitly use PHYSDEVOP_pirq_eoi_gmfn_v2 rather than
      PHYSDEVOP_pirq_eoi_gmfn;
      
      - introduce pirq_check_eoi_map, a function to check if a pirq needs an
      eoi using the map;
      
      -rename pirq_needs_eoi into pirq_needs_eoi_flag;
      
      - introduce a function pointer called pirq_needs_eoi that is going to be
      set to the right implementation depending on the availability of
      PHYSDEVOP_pirq_eoi_gmfn_v2.
      Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      9846ff10
  25. 15 3月, 2012 1 次提交
    • K
      xen/acpi-processor: C and P-state driver that uploads said data to hypervisor. · 59a56802
      Konrad Rzeszutek Wilk 提交于
      This driver solves three problems:
       1). Parse and upload ACPI0007 (or PROCESSOR_TYPE) information to the
           hypervisor - aka P-states (cpufreq data).
       2). Upload the the Cx state information (cpuidle data).
       3). Inhibit CPU frequency scaling drivers from loading.
      
      The reason for wanting to solve 1) and 2) is such that the Xen hypervisor
      is the only one that knows the CPU usage of different guests and can
      make the proper decision of when to put CPUs and packages in proper states.
      Unfortunately the hypervisor has no support to parse ACPI DSDT tables, hence it
      needs help from the initial domain to provide this information. The reason
      for 3) is that we do not want the initial domain to change P-states while the
      hypervisor is doing it as well - it causes rather some funny cases of P-states
      transitions.
      
      For this to work, the driver parses the Power Management data and uploads said
      information to the Xen hypervisor. It also calls acpi_processor_notify_smm()
      to inhibit the other CPU frequency scaling drivers from being loaded.
      
      Everything revolves around the 'struct acpi_processor' structure which
      gets updated during the bootup cycle in different stages. At the startup, when
      the ACPI parser starts, the C-state information is processed (processor_idle)
      and saved in said structure as 'power' element. Later on, the CPU frequency
      scaling driver (powernow-k8 or acpi_cpufreq), would call the the
      acpi_processor_* (processor_perflib functions) to parse P-states information
      and populate in the said structure the 'performance' element.
      
      Since we do not want the CPU frequency scaling drivers from loading
      we have to call the acpi_processor_* functions to parse the P-states and
      call "acpi_processor_notify_smm" to stop them from loading.
      
      There is also one oddity in this driver which is that under Xen, the
      physical online CPU count can be different from the virtual online CPU count.
      Meaning that the macros 'for_[online|possible]_cpu' would process only
      up to virtual online CPU count. We on the other hand want to process
      the full amount of physical CPUs. For that, the driver checks if the ACPI IDs
      count is different from the APIC ID count - which can happen if the user
      choose to use dom0_max_vcpu argument. In such a case a backup of the PM
      structure is used and uploaded to the hypervisor.
      
      [v1-v2: Initial RFC implementations that were posted]
      [v3: Changed the name to passthru suggested by Pasi Kärkkäinen <pasik@iki.fi>]
      [v4: Added vCPU != pCPU support - aka dom0_max_vcpus support]
      [v5: Cleaned up the driver, fix bug under Athlon XP]
      [v6: Changed the driver to a CPU frequency governor]
      [v7: Jan Beulich <jbeulich@suse.com> suggestion to make it a cpufreq scaling driver
           made me rework it as driver that inhibits cpufreq scaling driver]
      [v8: Per Jan's review comments, fixed up the driver]
      [v9: Allow to continue even if acpi_processor_preregister_perf.. fails]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      59a56802
  26. 14 3月, 2012 1 次提交
  27. 11 3月, 2012 1 次提交
    • K
      xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it. · 73c154c6
      Konrad Rzeszutek Wilk 提交于
      For the hypervisor to take advantage of the MWAIT support it needs
      to extract from the ACPI _CST the register address. But the
      hypervisor does not have the support to parse DSDT so it relies on
      the initial domain (dom0) to parse the ACPI Power Management information
      and push it up to the hypervisor. The pushing of the data is done
      by the processor_harveset_xen module which parses the information that
      the ACPI parser has graciously exposed in 'struct acpi_processor'.
      
      For the ACPI parser to also expose the Cx states for MWAIT, we need
      to expose the MWAIT capability (leaf 1). Furthermore we also need to
      expose the MWAIT_LEAF capability (leaf 5) for cstate.c to properly
      function.
      
      The hypervisor could expose these flags when it traps the XEN_EMULATE_PREFIX
      operations, but it can't do it since it needs to be backwards compatible.
      Instead we choose to use the native CPUID to figure out if the MWAIT
      capability exists and use the XEN_SET_PDC query hypercall to figure out
      if the hypervisor wants us to expose the MWAIT_LEAF capability or not.
      
      Note: The XEN_SET_PDC query was implemented in c/s 23783:
      "ACPI: add _PDC input override mechanism".
      
      With this in place, instead of
       C3 ACPI IOPORT 415
      we get now
       C3:ACPI FFH INTEL MWAIT 0x20
      
      Note: The cpu_idle which would be calling the mwait variants for idling
      never gets set b/c we set the default pm_idle to be the hypercall variant.
      Acked-by: NJan Beulich <JBeulich@suse.com>
      [v2: Fix missing header file include and #ifdef]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      73c154c6