1. 27 4月, 2013 2 次提交
    • S
      kvm: add device control API · 852b6d57
      Scott Wood 提交于
      Currently, devices that are emulated inside KVM are configured in a
      hardcoded manner based on an assumption that any given architecture
      only has one way to do it.  If there's any need to access device state,
      it is done through inflexible one-purpose-only IOCTLs (e.g.
      KVM_GET/SET_LAPIC).  Defining new IOCTLs for every little thing is
      cumbersome and depletes a limited numberspace.
      
      This API provides a mechanism to instantiate a device of a certain
      type, returning an ID that can be used to set/get attributes of the
      device.  Attributes may include configuration parameters (e.g.
      register base address), device state, operational commands, etc.  It
      is similar to the ONE_REG API, except that it acts on devices rather
      than vcpus.
      
      Both device types and individual attributes can be tested without having
      to create the device or get/set the attribute, without the need for
      separately managing enumerated capabilities.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      852b6d57
    • A
      KVM: Drop __KVM_HAVE_IOAPIC condition on irq routing · 948a902c
      Alexander Graf 提交于
      We have a capability enquire system that allows user space to ask kvm
      whether a feature is available.
      
      The point behind this system is that we can have different kernel
      configurations with different capabilities and user space can adjust
      accordingly.
      
      Because features can always be non existent, we can drop any #ifdefs
      on CAP defines that could be used generically, like the irq routing
      bits. These can be easily reused for non-IOAPIC systems as well.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      948a902c
  2. 14 3月, 2013 3 次提交
    • D
      UAPI: fix endianness conditionals in linux/raid/md_p.h · ca044f9a
      David Howells 提交于
      In the UAPI header files, __BIG_ENDIAN and __LITTLE_ENDIAN must be
      compared against __BYTE_ORDER in preprocessor conditionals where these are
      exposed to userspace (that is they're not inside __KERNEL__ conditionals).
      
      However, in the main kernel the norm is to check for
      "defined(__XXX_ENDIAN)" rather than comparing against __BYTE_ORDER and
      this has incorrectly leaked into the userspace headers.
      
      The definition of struct mdp_superblock_s in linux/raid/md_p.h is wrong in
      this way.  Note that userspace will likely interpret the ordering of the
      fields incorrectly as the big-endian variant on a little-endian machines -
      depending on header inclusion order.
      
      [!!!] NOTE [!!!]  This patch may adversely change the userspace API.  It might
      be better to fix the ordering of events_hi, events_lo, cp_events_hi and
      cp_events_lo in struct mdp_superblock_s / typedef mdp_super_t.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ca044f9a
    • D
      UAPI: fix endianness conditionals in linux/acct.h · 29ba06b9
      David Howells 提交于
      In the UAPI header files, __BIG_ENDIAN and __LITTLE_ENDIAN must be
      compared against __BYTE_ORDER in preprocessor conditionals where these are
      exposed to userspace (that is they're not inside __KERNEL__ conditionals).
      
      However, in the main kernel the norm is to check for
      "defined(__XXX_ENDIAN)" rather than comparing against __BYTE_ORDER and
      this has incorrectly leaked into the userspace headers.
      
      The definition of ACCT_BYTEORDER in linux/acct.h is wrong in this way.
      Note that userspace will likely interpret this incorrectly as the
      big-endian variant on little-endian machines - depending on header
      inclusion order.
      
      [!!!] NOTE [!!!]  This patch may adversely change the userspace API.  It might
      be better to fix the value of ACCT_BYTEORDER.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      29ba06b9
    • D
      UAPI: fix endianness conditionals in linux/aio_abi.h · 51b154ed
      David Howells 提交于
      In the UAPI header files, __BIG_ENDIAN and __LITTLE_ENDIAN must be
      compared against __BYTE_ORDER in preprocessor conditionals where these are
      exposed to userspace (that is they're not inside __KERNEL__ conditionals).
      
      However, in the main kernel the norm is to check for
      "defined(__XXX_ENDIAN)" rather than comparing against __BYTE_ORDER and
      this has incorrectly leaked into the userspace headers.
      
      The definition of PADDED() in linux/aio_abi.h is wrong in this way.  Note
      that userspace will likely interpret this and thus the order of fields in
      struct iocb incorrectly as the little-endian variant on big-endian
      machines - depending on header inclusion order.
      
      [!!!] NOTE [!!!]  This patch may adversely change the userspace API.  It might
      be better to fix the ordering of aio_key and aio_reserved1 in struct iocb.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NBenjamin LaHaise <bcrl@kvack.org>
      Acked-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      51b154ed
  3. 12 3月, 2013 1 次提交
  4. 06 3月, 2013 1 次提交
  5. 03 3月, 2013 1 次提交
    • J
      metag: ptrace · bc3966bf
      James Hogan 提交于
      The ptrace interface for metag provides access to some core register
      sets using the PTRACE_GETREGSET and PTRACE_SETREGSET operations. The
      details of the internal context structures is abstracted into user API
      structures to both ease use and allow flexibility to change the internal
      context layouts. Copyin and copyout functions for these register sets
      are exposed to allow signal handling code to use them to copy to and
      from the signal context.
      
      struct user_gp_regs (NT_PRSTATUS) provides access to the core general
      purpose register context.
      
      struct user_cb_regs (NT_METAG_CBUF) provides access to the TXCATCH*
      registers which contains information abuot a memory fault, unaligned
      access error or watchpoint. This can be modified to alter the way the
      fault is replayed on resume ("catch replay"), or to prevent the replay
      taking place.
      
      struct user_rp_state (NT_METAG_RPIPE) provides access to the state of
      the Meta read pipeline which can be used to hide memory latencies in
      hand optimised data loops.
      
      Extended DSP register state, DSP RAM, and hardware breakpoint registers
      aren't yet exposed through ptrace.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      bc3966bf
  6. 02 3月, 2013 2 次提交
    • M
      dm ioctl: allow message to return data · a2606241
      Mikulas Patocka 提交于
      This patch introduces enhanced message support that allows the
      device-mapper core to recognise messages that are common to all devices,
      and for messages to return data to userspace.
      
      Core messages are processed by the function "message_for_md".  If the
      device mapper doesn't support the message, it is passed to the target
      driver.
      
      If the message returns data, the kernel sets the flag
      DM_MESSAGE_OUT_FLAG.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      a2606241
    • M
      dm ioctl: optimize functions without variable params · 02cde50b
      Mikulas Patocka 提交于
      Device-mapper ioctls receive and send data in a buffer supplied
      by userspace.  The buffer has two parts.  The first part contains
      a 'struct dm_ioctl' and has a fixed size.  The second part depends
      on the ioctl and has a variable size.
      
      This patch recognises the specific ioctls that do not use the variable
      part of the buffer and skips allocating memory for it.
      
      In particular, when a device is suspended and a resume ioctl is sent,
      this now avoid memory allocation completely.
      
      The variable "struct dm_ioctl tmp" is moved from the function
      copy_params to its caller ctl_ioctl and renamed to param_kernel.
      It is used directly when the ioctl function doesn't need any arguments.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      02cde50b
  7. 28 2月, 2013 5 次提交
    • A
      nbd: support FLUSH requests · 75f187ab
      Alex Bligh 提交于
      Currently, the NBD device does not accept flush requests from the Linux
      block layer.  If the NBD server opened the target with neither O_SYNC nor
      O_DSYNC, however, the device will be effectively backed by a writeback
      cache.  Without issuing flushes properly, operation of the NBD device will
      not be safe against power losses.
      
      The NBD protocol has support for both a cache flush command and a FUA
      command flag; the server will also pass a flag to note its support for
      these features.  This patch adds support for the cache flush command and
      flag.  In the kernel, we receive the flags via the NBD_SET_FLAGS ioctl,
      and map NBD_FLAG_SEND_FLUSH to the argument of blk_queue_flush.  When the
      flag is active the block layer will send REQ_FLUSH requests, which we
      translate to NBD_CMD_FLUSH commands.
      
      FUA support is not included in this patch because all free software
      servers implement it with a full fdatasync; thus it has no advantage over
      supporting flush only.  Because I [Paolo] cannot really benchmark it in a
      realistic scenario, I cannot tell if it is a good idea or not.  It is also
      not clear if it is valid for an NBD server to support FUA but not flush.
      The Linux block layer gives a warning for this combination, the NBD
      protocol documentation says nothing about it.
      
      The patch also fixes a small problem in the handling of flags: nbd->flags
      must be cleared at the end of NBD_DO_IT, but the driver was not doing
      that.  The bug manifests itself as follows.  Suppose you two different
      client/server pairs to start the NBD device.  Suppose also that the first
      client supports NBD_SET_FLAGS, and the first server sends
      NBD_FLAG_SEND_FLUSH; the second pair instead does neither of these two
      things.  Before this patch, the second invocation of NBD_DO_IT will use a
      stale value of nbd->flags, and the second server will issue an error every
      time it receives an NBD_CMD_FLUSH command.
      
      This bug is pre-existing, but it becomes much more important after this
      patch; flush failures make the device pretty much unusable, unlike
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAlex Bligh <alex@alex.org.uk>
      Acked-by: NPaul Clements <Paul.Clements@steeleye.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      75f187ab
    • R
      ipmi: remove superfluous kernel/userspace explanation · 59fb1b9f
      Robert P. J. Day 提交于
      Given the obvious distinction between kernel and userspace supported
      by uapi/, it seems unnecessary to comment on that.
      Signed-off-by: NRobert P. J. Day <rpjday@crashcourse.ca>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      59fb1b9f
    • O
      fat: mark fs as dirty on mount and clean on umount · b88a1058
      Oleksij Rempel 提交于
      There is no documented methods to mark FAT as dirty.  Unofficially MS
      started to use reserved Byte in boot sector for this purpose, at least
      since Win 2000.  With Win 7 user is warned if fs is dirty and asked to
      clean it.
      
      Different versions of Win, handle it in different ways, but always have
      same meaning:
      
      - Win 2000 and XP, set it on write operations and
        remove it after operation was finnished
      - Win 7, set dirty flag on first write and remove it on umount.
      
      We will do it as follows:
      
      - set dirty flag on mount. If fs was initially dirty, warn user,
        remember it and do not do any changes to boot sector.
      - clean it on umount. If fs was initially dirty, leave it dirty.
      - do not do any thing if fs mounted read-only.
      - TODO: leave fs dirty if we found some error after mount.
      Signed-off-by: NOleksij Rempel <bug-track@fisher-privat.net>
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b88a1058
    • O
      fat: add extended fileds to struct fat_boot_sector · 6b46419b
      Oleksij Rempel 提交于
      Later we will need "state" field to check if volume was cleanly unmounted.
      Signed-off-by: NOleksij Rempel <bug-track@fisher-privat.net>
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6b46419b
    • V
      hfsplus: add osx.* prefix for handling namespace of Mac OS X extended attributes · 5841ca09
      Vyacheslav Dubeyko 提交于
      hfsplus: reworked support of extended attributes.
      
      Current mainline implementation of hfsplus file system driver treats as
      extended attributes only two fields (fdType and fdCreator) of user_info
      field in file description record (struct hfsplus_cat_file).  It is
      possible to get or set only these two fields as extended attributes.
      But HFS+ treats as com.apple.FinderInfo extended attribute an union of
      user_info and finder_info fields as for file (struct hfsplus_cat_file)
      as for folder (struct hfsplus_cat_folder).  Moreover, current mainline
      implementation of hfsplus file system driver doesn't support special
      metadata file - attributes tree.
      
      Mac OS X 10.4 and later support extended attributes by making use of the
      HFS+ filesystem Attributes file B*-tree feature which allows for named
      forks.  Mac OS X supports only inline extended attributes, limiting
      their size to 3802 bytes.  Any regular file may have a list of extended
      attributes.  HFS+ supports an arbitrary number of named forks.  Each
      attribute is denoted by a name and the associated data.  The name is a
      null-terminated Unicode string.  It is possible to list, to get, to set,
      and to remove extended attributes from files or directories.
      
      It exists some peculiarity during getting of extended attributes list by
      means of getfattr utility.  The getfattr utility expects prefix "user."
      before any extended attribute's name.  So, it ignores any names that
      don't contained such prefix.  Such behavior of getfattr utility results
      in unexpected empty output of extended attributes list even in the case
      when file (or folder) contains extended attributes.  It needs to use
      empty string as regular expression pattern for names matching (getfattr
      --match="").
      
      For support of extended attributes in HFS+:
      1. It was added necessary on-disk layout declarations related to Attributes
         tree into hfsplus_raw.h file.
      2. It was added attributes.c file with implementation of functionality of
         manipulation by records in Attributes tree.
      3. It was reworked hfsplus_listxattr, hfsplus_getxattr, hfsplus_setxattr
         functions in ioctl.c. Moreover, it was added hfsplus_removexattr method.
      
      This patch:
      
      Add osx.* prefix for handling namespace of Mac OS X extended attributes.
      
      [akpm@linux-foundation.org: checkpatch fixes]
      Signed-off-by: NVyacheslav Dubeyko <slava@dubeyko.com>
      Reported-by: NHin-Tak Leung <htl10@users.sourceforge.net>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5841ca09
  8. 22 2月, 2013 2 次提交
  9. 21 2月, 2013 4 次提交
  10. 20 2月, 2013 1 次提交
  11. 19 2月, 2013 2 次提交
  12. 15 2月, 2013 5 次提交
    • J
      nl80211: renumber NL80211_FEATURE_FULL_AP_CLIENT_STATE · 932dd97c
      Johannes Berg 提交于
      Adding the flag to mac80211 already without testing was
      clearly a mistake, one that we now pay for by having to
      reserve bit 13 forever. The problem is cfg80211 doesn't
      allow capability/rate changes for station entries that
      were added unassociated, so the station entries cannot
      be set up properly when marked associated.
      
      Change the NL80211_FEATURE_FULL_AP_CLIENT_STATE value
      to make it clear to userspace implementations that all
      current kernels don't actually support it, even though
      the previous bit is set, and of course also remove the
      flag from mac80211 until we test and fix the issues.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      932dd97c
    • J
      cfg80211: Pass station (extended) capability info to kernel · 9d62a986
      Jouni Malinen 提交于
      The information of the peer's capabilities and extended capabilities are
      required for the driver to perform TDLS Peer UAPSD operations and off
      channel operations. This information of the peer is passed from user space
      using NL80211_CMD_SET_STATION command. This commit enhances
      the function nl80211_set_station to pass the capability information of
      the peer to the driver.
      
      Similarly, there may be need for capability information for other modes,
      so allow this to be provided with both add_station and change_station.
      Signed-off-by: NJouni Malinen <jouni@qca.qualcomm.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9d62a986
    • J
      cfg80211: advertise extended capabilities to userspace · a50df0c4
      Johannes Berg 提交于
      In many cases, userspace may need to know which of the
      802.11 extended capabilities ("Extended Capabilities
      element") are implemented in the driver or device, to
      include them e.g. in beacons, assoc request/response
      or other frames. Add a new nl80211 attribute to hold
      the extended capabilities bitmap for this.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a50df0c4
    • J
      nl80211: advertise HT/VHT channel limitations · 50640f16
      Johannes Berg 提交于
      When drivers or regulatory have limitations on
      40, 80 or 160 MHz channels, advertise these to
      userspace via nl80211. Also add a new feature
      flag to let userspace know this is supported.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      50640f16
    • S
      nl80211/cfg80211: add radar detection command/event · 04f39047
      Simon Wunderlich 提交于
      Add new NL80211_CMD_RADAR_DETECT, which starts the Channel
      Availability Check (CAC). This command will also notify the
      usermode about events (CAC finished, CAC aborted, radar
      detected, NOP finished).
      Once radar detection has started it should continuously
      monitor for radars as long as the channel is active.
      
      This patch enables DFS for AP mode in nl80211/cfg80211.
      
      Based on original patch by Victor Goldenshtein <victorg@ti.com>
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      [remove WIPHY_FLAG_HAS_RADAR_DETECT again -- my mistake]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      04f39047
  13. 14 2月, 2013 7 次提交
  14. 13 2月, 2013 2 次提交
  15. 12 2月, 2013 2 次提交