* Re: [PATCH v2 0/5] Add virtio transport for AF_VSOCK
From: David Miller @ 2015-12-03 20:06 UTC (permalink / raw)
To: stefanha
Cc: kvm, mst, netdev, virtualization, mbenjamin, christoffer.dall,
matt.ma
In-Reply-To: <1449038643-25971-1-git-send-email-stefanha@redhat.com>
From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Wed, 2 Dec 2015 14:43:58 +0800
> This patch series adds a virtio transport for AF_VSOCK (net/vmw_vsock/).
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next 3/3] vhost_net: basic polling support
From: Jason Wang @ 2015-12-04 2:24 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <20151202143522-mutt-send-email-mst@redhat.com>
On 12/02/2015 08:36 PM, Michael S. Tsirkin wrote:
> On Wed, Dec 02, 2015 at 01:04:03PM +0800, Jason Wang wrote:
>>
>> On 12/01/2015 10:43 PM, Michael S. Tsirkin wrote:
>>> On Tue, Dec 01, 2015 at 01:17:49PM +0800, Jason Wang wrote:
>>>> On 11/30/2015 06:44 PM, Michael S. Tsirkin wrote:
>>>>> On Wed, Nov 25, 2015 at 03:11:29PM +0800, Jason Wang wrote:
>>>>>>> This patch tries to poll for new added tx buffer or socket receive
>>>>>>> queue for a while at the end of tx/rx processing. The maximum time
>>>>>>> spent on polling were specified through a new kind of vring ioctl.
>>>>>>>
>>>>>>> Signed-off-by: Jason Wang <jasowang@redhat.com>
>>>>> One further enhancement would be to actually poll
>>>>> the underlying device. This should be reasonably
>>>>> straight-forward with macvtap (especially in the
>>>>> passthrough mode).
>>>>>
>>>>>
>>>> Yes, it is. I have some patches to do this by replacing
>>>> skb_queue_empty() with sk_busy_loop() but for tap.
>>> We probably don't want to do this unconditionally, though.
>>>
>>>> Tests does not show
>>>> any improvement but some regression.
>>> Did you add code to call sk_mark_napi_id on tap then?
>>> sk_busy_loop won't do anything useful without.
>> Yes I did. Probably something wrong elsewhere.
> Is this for guest-to-guest?
Nope. Like you said below, since it requires NAPI so it was external
host to guest.
> the patch to do napi
> for tap is still not upstream due to minor performance
> regression. Want me to repost it?
Sure, I've played this a little bit in the past too.
>
>>>> Maybe it's better to test macvtap.
>>> Same thing ...
>>>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v2 0/5] Add virtio transport for AF_VSOCK
From: Michael S. Tsirkin @ 2015-12-04 7:45 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: kvm, netdev, virtualization, Matt Benjamin, Christoffer Dall,
matt.ma
In-Reply-To: <1449038643-25971-1-git-send-email-stefanha@redhat.com>
On Wed, Dec 02, 2015 at 02:43:58PM +0800, Stefan Hajnoczi wrote:
> v2:
> * Rebased onto Linux v4.4-rc2
> * vhost: Refuse to assign reserved CIDs
> * vhost: Refuse guest CID if already in use
> * vhost: Only accept correctly addressed packets (no spoofing!)
> * vhost: Support flexible rx/tx descriptor layout
> * vhost: Add missing total_tx_buf decrement
> * virtio_transport: Fix total_tx_buf accounting
> * virtio_transport: Add virtio_transport global mutex to prevent races
> * common: Notify other side of SOCK_STREAM disconnect (fixes shutdown
> semantics)
> * common: Avoid recursive mutex_lock(tx_lock) for write_space (fixes deadlock)
> * common: Define VIRTIO_VSOCK_TYPE_STREAM/DGRAM hardware interface constants
> * common: Define VIRTIO_VSOCK_SHUTDOWN_RCV/SEND hardware interface constants
> * common: Fix peer_buf_alloc inheritance on child socket
>
> This patch series adds a virtio transport for AF_VSOCK (net/vmw_vsock/).
> AF_VSOCK is designed for communication between virtual machines and
> hypervisors. It is currently only implemented for VMware's VMCI transport.
>
> This series implements the proposed virtio-vsock device specification from
> here:
> http://comments.gmane.org/gmane.comp.emulators.virtio.devel/855
>
> Most of the work was done by Asias He and Gerd Hoffmann a while back. I have
> picked up the series again.
>
> The QEMU userspace changes are here:
> https://github.com/stefanha/qemu/commits/vsock
>
> Why virtio-vsock?
> -----------------
> Guest<->host communication is currently done over the virtio-serial device.
> This makes it hard to port sockets API-based applications and is limited to
> static ports.
>
> virtio-vsock uses the sockets API so that applications can rely on familiar
> SOCK_STREAM and SOCK_DGRAM semantics. Applications on the host can easily
> connect to guest agents because the sockets API allows multiple connections to
> a listen socket (unlike virtio-serial). This simplifies the guest<->host
> communication and eliminates the need for extra processes on the host to
> arbitrate virtio-serial ports.
>
> Overview
> --------
> This series adds 3 pieces:
>
> 1. virtio_transport_common.ko - core virtio vsock code that uses vsock.ko
>
> 2. virtio_transport.ko - guest driver
>
> 3. drivers/vhost/vsock.ko - host driver
>
> Howto
> -----
> The following kernel options are needed:
> CONFIG_VSOCKETS=y
> CONFIG_VIRTIO_VSOCKETS=y
> CONFIG_VIRTIO_VSOCKETS_COMMON=y
> CONFIG_VHOST_VSOCK=m
>
> Launch QEMU as follows:
> # qemu ... -device vhost-vsock-pci,id=vhost-vsock-pci0,guest-cid=3
>
> Guest and host can communicate via AF_VSOCK sockets. The host's CID (address)
> is 2 and the guest is automatically assigned a CID (use VMADDR_CID_ANY (-1) to
> bind to it).
>
> Status
> ------
> There are a few design changes I'd like to make to the virtio-vsock device:
>
> 1. The 3-way handshake isn't necessary over a reliable transport (virtqueue).
> Spoofing packets is also impossible so the security aspects of the 3-way
> handshake (including syn cookie) add nothing. The next version will have a
> single operation to establish a connection.
It's hard to discuss without seeing the details, but we do need to
slow down guests that are flooding host with socket creation requests.
The handshake is a simple way for hypervisor to defer
such requests until it has resources without
breaking things.
> 2. Credit-based flow control doesn't work for SOCK_DGRAM since multiple clients
> can transmit to the same listen socket. There is no way for the clients to
> coordinate buffer space with each other fairly. The next version will drop
> credit-based flow control for SOCK_DGRAM and only rely on best-effort
> delivery. SOCK_STREAM still has guaranteed delivery.
I suspect in the end we will need a measure of fairness even
if you drop packets. And recovering from packet loss is
hard enough that not many applications do it correctly.
I suggest disabling SOCK_DGRAM for now.
> 3. In the next version only the host will be able to establish connections
> (i.e. to connect to a guest agent). This is for security reasons since
> there is currently no ability to provide host services only to certain
> guests. This also matches how AF_VSOCK works on modern VMware hypervisors.
I see David merged this one already, but above planned changes are
userspace and hypervisor/guest visible.
Once this is upstream and userspace/guests start relying on it,
we'll be stuck supporting this version in addition to
whatever we really want, with no easy way to even test it.
Might it not be better to defer enabling this upstream until the interface is
finalized?
> Asias He (5):
> VSOCK: Introduce vsock_find_unbound_socket and
> vsock_bind_dgram_generic
> VSOCK: Introduce virtio-vsock-common.ko
> VSOCK: Introduce virtio-vsock.ko
> VSOCK: Introduce vhost-vsock.ko
> VSOCK: Add Makefile and Kconfig
>
> drivers/vhost/Kconfig | 4 +
> drivers/vhost/Kconfig.vsock | 7 +
> drivers/vhost/Makefile | 4 +
> drivers/vhost/vsock.c | 631 +++++++++++++++
> drivers/vhost/vsock.h | 4 +
> include/linux/virtio_vsock.h | 209 +++++
> include/net/af_vsock.h | 2 +
> include/uapi/linux/virtio_ids.h | 1 +
> include/uapi/linux/virtio_vsock.h | 89 +++
> net/vmw_vsock/Kconfig | 18 +
> net/vmw_vsock/Makefile | 2 +
> net/vmw_vsock/af_vsock.c | 70 ++
> net/vmw_vsock/virtio_transport.c | 466 +++++++++++
> net/vmw_vsock/virtio_transport_common.c | 1272 +++++++++++++++++++++++++++++++
> 14 files changed, 2779 insertions(+)
> create mode 100644 drivers/vhost/Kconfig.vsock
> create mode 100644 drivers/vhost/vsock.c
> create mode 100644 drivers/vhost/vsock.h
> create mode 100644 include/linux/virtio_vsock.h
> create mode 100644 include/uapi/linux/virtio_vsock.h
> create mode 100644 net/vmw_vsock/virtio_transport.c
> create mode 100644 net/vmw_vsock/virtio_transport_common.c
>
> --
> 2.5.0
^ permalink raw reply
* [PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
From: Petr Mladek @ 2015-12-04 13:37 UTC (permalink / raw)
To: Rusty Russell, Michael S. Tsirkin
Cc: Petr Mladek, Jiri Kosina, linux-kernel, virtualization, Tejun Heo,
Jeff Epler
It has been long since I have sent v3 of the balloon conversion from
a kthread to a workqueue. I have gained some more experience with
the APIs in the meantime. I hope that you would like the outcome.
I have added one more patch that fixes a separate problem with
restoring the balloon after the system freeze. I have found this
when testing the conversion.
Changes against v3:
+ rebased on 4.4-rc3
+ call cancel_work_synch() when removing the balloon
+ do not queue the work from fill_balloon() and leak_balloon()
because they are called also independently from the workqueue,
e.g. remove_common(), virtballoon_oom_notify(). Re-queue
the work from the work function when necessary.
Changes against v2:
+ Use system_freezable_wq instead of an allocated one
and move INIT_WORK() higher in virtballoon_probe().
+ Fix typos in the commit message.
Changes against v1:
+ More elegant detection of the pending work in fill_balloon() and
leak_balloon(). It still needs to keep the original requested number
of pages but it does not add any extra boolean variable.
+ Remove WQ_MEM_RECLAIM workqueue parameter. If I get it correctly,
this is possible because the code manipulates memory but it is not
used in the memory reclaim path.
+ initialize the work item before allocation the workqueue
JFYI, the discussion about the previous version can be found at
http://thread.gmane.org/gmane.linux.kernel.virtualization/23701
Petr Mladek (2):
virtio_balloon: Restore the entire balloon after the system freeze
virtio_balloon: Use a workqueue instead of "vballoon" kthread
drivers/virtio/virtio_balloon.c | 93 ++++++++++++++++-------------------------
1 file changed, 35 insertions(+), 58 deletions(-)
--
1.8.5.6
^ permalink raw reply
* [PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
From: Petr Mladek @ 2015-12-04 13:37 UTC (permalink / raw)
To: Rusty Russell, Michael S. Tsirkin
Cc: Petr Mladek, Jiri Kosina, linux-kernel, virtualization, Tejun Heo,
Jeff Epler
In-Reply-To: <1449236271-10133-1-git-send-email-pmladek@suse.com>
fill_balloon() and leak_balloon() manipulate only a limited number
of pages in one call. This is the reason why remove_common() calls
leak_balloon() in a while cycle.
remove_common() is called also when the system is being frozen.
But fill_balloon() is called only once when the system is being
restored. It means that most of the balloon stays leaked after
the system freeze and restore.
This patch adds the missing while cycle also into virtballoon_restore().
Also it makes fill_balloon() to return the number of really modified
pages. Note that leak_balloon() already did this.
Signed-off-by: Petr Mladek <pmladek@suse.com>
---
drivers/virtio/virtio_balloon.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 7efc32945810..d73a86db2490 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -135,9 +135,10 @@ static void set_page_pfns(u32 pfns[], struct page *page)
pfns[i] = page_to_balloon_pfn(page) + i;
}
-static void fill_balloon(struct virtio_balloon *vb, size_t num)
+static unsigned fill_balloon(struct virtio_balloon *vb, size_t num)
{
struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info;
+ unsigned num_allocated_pages;
/* We can only do one array worth at a time. */
num = min(num, ARRAY_SIZE(vb->pfns));
@@ -162,10 +163,13 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num)
adjust_managed_page_count(page, -1);
}
+ num_allocated_pages = vb->num_pfns;
/* Did we get any? */
if (vb->num_pfns != 0)
tell_host(vb, vb->inflate_vq);
mutex_unlock(&vb->balloon_lock);
+
+ return num_allocated_pages;
}
static void release_pages_balloon(struct virtio_balloon *vb)
@@ -581,6 +585,7 @@ static int virtballoon_freeze(struct virtio_device *vdev)
static int virtballoon_restore(struct virtio_device *vdev)
{
struct virtio_balloon *vb = vdev->priv;
+ s64 diff;
int ret;
ret = init_vqs(vdev->priv);
@@ -589,7 +594,9 @@ static int virtballoon_restore(struct virtio_device *vdev)
virtio_device_ready(vdev);
- fill_balloon(vb, towards_target(vb));
+ diff = towards_target(vb);
+ while (diff > 0)
+ diff -= fill_balloon(vb, diff);
update_balloon_size(vb);
return 0;
}
--
1.8.5.6
^ permalink raw reply related
* [PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
From: Petr Mladek @ 2015-12-04 13:37 UTC (permalink / raw)
To: Rusty Russell, Michael S. Tsirkin
Cc: Jiri Kosina, linux-kernel, Petr Mladek, virtualization, Tejun Heo,
Jeff Epler
In-Reply-To: <1449236271-10133-1-git-send-email-pmladek@suse.com>
From: Petr Mladek <pmladek@suse.cz>
This patch moves the deferred work from the "vballoon" kthread into a
system freezable workqueue.
We do not need to maintain and run a dedicated kthread. Also the event
driven workqueues API makes the logic much easier. Especially, we do
not longer need an own wait queue, wait function, and freeze point.
The conversion is pretty straightforward. One cycle of the main loop
is put into a work. The work is queued instead of waking the kthread.
fill_balloon() and leak_balloon() have a limit for the amount of modified
pages. The work re-queues itself when necessary.
My initial idea was to use a dedicated workqueue. Michael S. Tsirkin
suggested using a system one. Tejun Heo confirmed that the system
workqueue has a pretty high concurrency level (256) by default.
Therefore we need not be afraid of too long blocking.
Signed-off-by: Petr Mladek <pmladek@suse.cz>
---
drivers/virtio/virtio_balloon.c | 82 +++++++++++++----------------------------
1 file changed, 26 insertions(+), 56 deletions(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index d73a86db2490..960e54b1d0c1 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -22,8 +22,7 @@
#include <linux/virtio.h>
#include <linux/virtio_balloon.h>
#include <linux/swap.h>
-#include <linux/kthread.h>
-#include <linux/freezer.h>
+#include <linux/workqueue.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/module.h>
@@ -49,11 +48,8 @@ struct virtio_balloon {
struct virtio_device *vdev;
struct virtqueue *inflate_vq, *deflate_vq, *stats_vq;
- /* Where the ballooning thread waits for config to change. */
- wait_queue_head_t config_change;
-
- /* The thread servicing the balloon. */
- struct task_struct *thread;
+ /* The balloon servicing is delegated to a freezable workqueue. */
+ struct work_struct wq_work;
/* Waiting for host to ack the pages we released. */
wait_queue_head_t acked;
@@ -255,14 +251,15 @@ static void update_balloon_stats(struct virtio_balloon *vb)
* with a single buffer. From that point forward, all conversations consist of
* a hypervisor request (a call to this function) which directs us to refill
* the virtqueue with a fresh stats buffer. Since stats collection can sleep,
- * we notify our kthread which does the actual work via stats_handle_request().
+ * we delegate the job to a freezable workqueue that will do the actual work via
+ * stats_handle_request().
*/
static void stats_request(struct virtqueue *vq)
{
struct virtio_balloon *vb = vq->vdev->priv;
vb->need_stats_update = 1;
- wake_up(&vb->config_change);
+ queue_work(system_freezable_wq, &vb->wq_work);
}
static void stats_handle_request(struct virtio_balloon *vb)
@@ -286,7 +283,7 @@ static void virtballoon_changed(struct virtio_device *vdev)
{
struct virtio_balloon *vb = vdev->priv;
- wake_up(&vb->config_change);
+ queue_work(system_freezable_wq, &vb->wq_work);
}
static inline s64 towards_target(struct virtio_balloon *vb)
@@ -349,43 +346,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
return NOTIFY_OK;
}
-static int balloon(void *_vballoon)
+static void balloon(struct work_struct *work)
{
- struct virtio_balloon *vb = _vballoon;
- DEFINE_WAIT_FUNC(wait, woken_wake_function);
-
- set_freezable();
- while (!kthread_should_stop()) {
- s64 diff;
-
- try_to_freeze();
-
- add_wait_queue(&vb->config_change, &wait);
- for (;;) {
- if ((diff = towards_target(vb)) != 0 ||
- vb->need_stats_update ||
- kthread_should_stop() ||
- freezing(current))
- break;
- wait_woken(&wait, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
- }
- remove_wait_queue(&vb->config_change, &wait);
+ struct virtio_balloon *vb;
+ s64 diff;
- if (vb->need_stats_update)
- stats_handle_request(vb);
- if (diff > 0)
- fill_balloon(vb, diff);
- else if (diff < 0)
- leak_balloon(vb, -diff);
- update_balloon_size(vb);
+ vb = container_of(work, struct virtio_balloon, wq_work);
+ diff = towards_target(vb);
- /*
- * For large balloon changes, we could spend a lot of time
- * and always have work to do. Be nice if preempt disabled.
- */
- cond_resched();
- }
- return 0;
+ if (vb->need_stats_update)
+ stats_handle_request(vb);
+
+ if (diff > 0)
+ diff -= fill_balloon(vb, diff);
+ else if (diff < 0)
+ diff += leak_balloon(vb, -diff);
+ update_balloon_size(vb);
+
+ if (diff)
+ queue_work(system_freezable_wq, work);
}
static int init_vqs(struct virtio_balloon *vb)
@@ -503,9 +482,9 @@ static int virtballoon_probe(struct virtio_device *vdev)
goto out;
}
+ INIT_WORK(&vb->wq_work, balloon);
vb->num_pages = 0;
mutex_init(&vb->balloon_lock);
- init_waitqueue_head(&vb->config_change);
init_waitqueue_head(&vb->acked);
vb->vdev = vdev;
vb->need_stats_update = 0;
@@ -527,16 +506,8 @@ static int virtballoon_probe(struct virtio_device *vdev)
virtio_device_ready(vdev);
- vb->thread = kthread_run(balloon, vb, "vballoon");
- if (IS_ERR(vb->thread)) {
- err = PTR_ERR(vb->thread);
- goto out_del_vqs;
- }
-
return 0;
-out_del_vqs:
- unregister_oom_notifier(&vb->nb);
out_oom_notify:
vdev->config->del_vqs(vdev);
out_free_vb:
@@ -563,7 +534,7 @@ static void virtballoon_remove(struct virtio_device *vdev)
struct virtio_balloon *vb = vdev->priv;
unregister_oom_notifier(&vb->nb);
- kthread_stop(vb->thread);
+ cancel_work_sync(&vb->wq_work);
remove_common(vb);
kfree(vb);
}
@@ -574,10 +545,9 @@ static int virtballoon_freeze(struct virtio_device *vdev)
struct virtio_balloon *vb = vdev->priv;
/*
- * The kthread is already frozen by the PM core before this
+ * The workqueue is already frozen by the PM core before this
* function is called.
*/
-
remove_common(vb);
return 0;
}
--
1.8.5.6
^ permalink raw reply related
* IEEE TCSC Award for Excellence in Scalable Computing -- Call for Nominations
From: Ioan Raicu @ 2015-12-04 16:37 UTC (permalink / raw)
To: publicity, virtualization, micro_publicity, performance,
sigplan-l
[-- Attachment #1.1: Type: text/plain, Size: 4332 bytes --]
-------------------------------------------------------------------------------------------------------------------
2016 IEEE TCSC Award for Excellence in Scalable Computing
Call for Nominations
-------------------------------------------------------------------------------------------------------------------
The IEEE TCSC Award for Excellence in Scalable Computing is awarded for
significant
and sustained contributions to the scalable computing community through
the IEEE
Technical Committee on Scalable Computing (TCSC), coupled with an
outstanding record
of high quality and high impact research. The award consists of a plaque
and an
honorarium of $1000.
The past recipients of the IEEE TCSC award of excellence are: Jack
Dongarra (University
of Tennessee, USA) in 2008, Rajkumar Buyya (University of Melbourne,
Australia) in 2009,
William Gropp (University of Illinois at Urbana-Champaign, USA) in 2010,
Professor Albert
Zomaya (University of Sydney, Australia) in 2011, David Abramson (Monash
University,
Australia) in 2012, Marc Snir (Argonne National Laboratory, USA) in
2013, Yves Robert
(UMR CNRS, ENS Lyon, INRIA, France) in 2014, and Ian Foster (University
of Chicago
and Argonne National Laboratory, USA) in 2015.
Further details about the award can be found at the IEEE TCSC website:
https://www.ieeetcsc.org/awards/award_for_excellence
Nominations: A candidate may be nominated by colleagues/TCSC members
or may nominate him/her-self. An individual can nominate at most one
candidate for this award. The candidate must be an IEEE, IEEE CS, and
TCSC member in good standing. Nomination must be submitted via email
to tcsc-awards@rutgers.edu <mailto:tcsc-awards@rutgers.edu>. A
nomination application (as a single
PDF file) should contain the following details:
1. Professional Employment Affiliations: List the nominee's current
professional affiliations and titles.
2. Citation: Give a brief citation (thirty words or less) precisely
stating the most salient reason(s) why the nominee is qualified
for the award.
3. Technical Contributions: Describe the nominee's technical
achievements as well as significance and impact. (Max 2 page
length)
4. TCSC Contribution: Describe the candidate’s service and specific
contributions to TCSC and its community activities. (Max 2 page
length)
5. Endorsers: Each nomination must be supported by letter from three
at least endorsers. An endorser can endorse only one candidate for
this award. The endorsers will be required to comment on the
nominee's technical contributions as well as service to the TCSC
and its community. The endorsement letters should be included in
the nomination package.
Important Dates:
Nomination Deadline: February 01, 2016
Result Notification: March 01, 2016
Award Selection Note: The award will presented at the 16th IEEE/ACM
International Symposium
on Cluster, Cloud and Grid Computing (CCGrid 2016)to be held in
Cartagena, Columbia from
May 16 to 19, 2016. The winner should be available to receive the award
in person and present
a keynote talk at the CCGrid 2016 conference. For more information about
the conference
please see https://ccgrid2016.uniandes.edu.co.
Award Selection Committee: The award selection committee will consist of
past winners,
leaders in the field, as well as members of the TCSC Executive Committee.
The selection committee for 2016 is composed of:
Barbara Chapman, Stony Brook University, USA
Ian Foster, University of Chicago/Argonne National Laboratory, USA
Satoshi Matsuoka, Tokyo Institute of Technology, Japan
Padma Raghavan, Pennsylvania State University, USA
Yves Robert, UMR CNRS, ENS Lyon, INRIA, France
Albert Zomaya, University of Sydney, Australia
Chairs:
Manish Parashar, Rutgers, The State University of New Jersey, USA
(Email: parashar at rutgers dot edu)
Beniamino Di Martino, Second University of Naples, Italy
(Email: beniamino.dimartino at unina dot it)
--
Ioan Raicu, Ph.D.
Assistant Professor
Computer Science, Illinois Institute of Technology
Guest Research Faculty
Math & Computer Science, Argonne National Laboratory
http://www.cs.iit.edu/~iraicu/
http://datasys.cs.iit.edu/
[-- Attachment #1.2: Type: text/html, Size: 7594 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply
* Re: [PATCH] tools/virtio: fix byteswap logic
From: Venkatesh Srinivas via Virtualization @ 2015-12-04 19:37 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: vsrinivas, linux-kernel, virtualization
In-Reply-To: <1448872410-11553-1-git-send-email-mst@redhat.com>
On Mon, Nov 30, 2015 at 10:33:34AM +0200, Michael S. Tsirkin wrote:
> commit cf561f0d2eb74574ad9985a2feab134267a9d298 ("virtio: introduce
> virtio_is_little_endian() helper") changed byteswap logic to
> skip feature bit checks for LE platforms, but didn't
> update tools/virtio, so vring_bench started failing.
>
> Update the copy under tools/virtio/ (TODO: find a way to avoid this code
> duplication).
>
> Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> tools/virtio/linux/virtio_config.h | 20 +++++++++++++-------
> 1 file changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/tools/virtio/linux/virtio_config.h b/tools/virtio/linux/virtio_config.h
> index 806d683..57a6964 100644
> --- a/tools/virtio/linux/virtio_config.h
> +++ b/tools/virtio/linux/virtio_config.h
> @@ -40,33 +40,39 @@ static inline void __virtio_clear_bit(struct virtio_device *vdev,
> #define virtio_has_feature(dev, feature) \
> (__virtio_test_bit((dev), feature))
>
> +static inline bool virtio_is_little_endian(struct virtio_device *vdev)
> +{
> + return virtio_has_feature(vdev, VIRTIO_F_VERSION_1) ||
> + virtio_legacy_is_little_endian();
> +}
> +
> +/* Memory accessors */
> static inline u16 virtio16_to_cpu(struct virtio_device *vdev, __virtio16 val)
> {
> - return __virtio16_to_cpu(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val);
> + return __virtio16_to_cpu(virtio_is_little_endian(vdev), val);
> }
>
> static inline __virtio16 cpu_to_virtio16(struct virtio_device *vdev, u16 val)
> {
> - return __cpu_to_virtio16(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val);
> + return __cpu_to_virtio16(virtio_is_little_endian(vdev), val);
> }
>
> static inline u32 virtio32_to_cpu(struct virtio_device *vdev, __virtio32 val)
> {
> - return __virtio32_to_cpu(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val);
> + return __virtio32_to_cpu(virtio_is_little_endian(vdev), val);
> }
>
> static inline __virtio32 cpu_to_virtio32(struct virtio_device *vdev, u32 val)
> {
> - return __cpu_to_virtio32(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val);
> + return __cpu_to_virtio32(virtio_is_little_endian(vdev), val);
> }
>
> static inline u64 virtio64_to_cpu(struct virtio_device *vdev, __virtio64 val)
> {
> - return __virtio64_to_cpu(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val);
> + return __virtio64_to_cpu(virtio_is_little_endian(vdev), val);
> }
>
> static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
> {
> - return __cpu_to_virtio64(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val);
> + return __cpu_to_virtio64(virtio_is_little_endian(vdev), val);
> }
Tested patch with vring-bench. (I did something similar when reviving it).
Tested-by: Venkatesh Srinivas <venkateshs@google.com>
-- vs;
^ permalink raw reply
* Re: [PATCH v2] vhost: replace % with & on data path
From: Venkatesh Srinivas via Virtualization @ 2015-12-04 20:19 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: netdev, linux-kernel, kvm, virtualization
In-Reply-To: <1448874894-18398-1-git-send-email-mst@redhat.com>
On Mon, Nov 30, 2015 at 11:15:23AM +0200, Michael S. Tsirkin wrote:
> We know vring num is a power of 2, so use &
> to mask the high bits.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
The generated code switches from DIV -> masking, source is clearer as well.
Tested-by: Venkatesh Srinivas <venkateshs@google.com>
-- vs;
^ permalink raw reply
* Re: [PATCH 1/6] x86: Add VMWare Host Communication Macros
From: Sinclair Yeh @ 2015-12-04 22:33 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Xavier Deguillard, x86, linux-kernel, virtualization, Ingo Molnar,
Thomas Gleixner, Alok Kataria
In-Reply-To: <565E23E7.5090800@zytor.com>
Thanks Peter.
On Tue, Dec 01, 2015 at 02:49:11PM -0800, H. Peter Anvin wrote:
> On 12/01/15 14:18, Sinclair Yeh wrote:
> > These macros will be used by multiple VMWare modules for handling
> > host communication.
>
> > + __asm__ __volatile__ ("inl %%dx" : \
>
> This is odd at best; the standard assembly form of this instruction is:
>
> inl (%dx),%eax
Ok, I'm not sure why this worked and compiled before. Fixed.
>
> Also, we don't need the underscored forms of asm and volatile for kernel
> code.
>
> > + __asm__ __volatile__ ("movq %13, %%rbp;" \
> > + "cld; rep outsb; " \
> > + "movq %%rbp, %6" : \
>
> cld shouldn't be necessary here, DF=0 is part of the normal ABI environment.
>
> You also don't save/restore %rbp here, but you do below? Seems very odd.
Good catch. Fixed.
>
> It might be better do so something like:
>
> +#define VMW_PORT_HB_OUT(in1, in2, port_num, magic, \
> + eax, ebx, ecx, edx, si, di, bp) \
> +({ \
> + __asm__ __volatile__ ("xchgq %6, %%rbp;" \
> + "cld; rep outsb; " \
> + "xchgq %%rbp, %6" : \
> + "=a"(eax), \
> + "=b"(ebx), \
> + "=c"(ecx), \
> + "=d"(edx), \
> + "+S"(si), \
> + "+D"(di), \
> + "+r"(bp) : \
> + "a"(magic), \
> + "b"(in1), \
> + "c"(in2), \
> + "d"(port_num) : \
> + "memory", "cc"); \
> +})
This is great. Changed.
Updated patch set incoming.
Sinclair
^ permalink raw reply
* [PATCH 1/6] x86: Add VMWare Host Communication Macros
From: Sinclair Yeh @ 2015-12-04 23:19 UTC (permalink / raw)
To: x86
Cc: Sinclair Yeh, Xavier Deguillard, Greg Kroah-Hartman, linux-kernel,
virtualization, Ingo Molnar, H. Peter Anvin, Thomas Gleixner,
Alok Kataria
In-Reply-To: <1449271183-1746-1-git-send-email-syeh@vmware.com>
These macros will be used by multiple VMWare modules for handling
host communication.
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alok N Kataria <akataria@vmware.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alok Kataria <akataria@vmware.com>
Cc: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Cc: Xavier Deguillard <xdeguillard@vmware.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
v2:
* Keeping only the minimal common platform defines
* added vmware_platform() check function
v3:
* Added new field to handle different hypervisor magic values
v4:
* Make it so that "cmd" is always the first parameter for both
High-Bandwidh and non-High-Bandwidth version of the macro
* Addressed comments from H. Peter Anvin on the assembly code
---
arch/x86/include/asm/vmware.h | 126 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 126 insertions(+)
create mode 100644 arch/x86/include/asm/vmware.h
diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h
new file mode 100644
index 0000000..ad359e0
--- /dev/null
+++ b/arch/x86/include/asm/vmware.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2015, VMware, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
+ * NON INFRINGEMENT. See the GNU General Public License for more
+ * details.
+ *
+ * Based on code from vmware.c and vmmouse.c.
+ * Author:
+ * Sinclair Yeh <syeh@vmware.com>
+ */
+#ifndef _ASM_X86_VMWARE_H
+#define _ASM_X86_VMWARE_H
+
+
+/**
+ * Hypervisor-specific bi-directional communication channel. Should never
+ * execute on bare metal hardware. The caller must make sure to check for
+ * supported hypervisor before using these macros.
+ *
+ * The last two parameters are both input and output and must be initialized.
+ *
+ * @cmd: [IN] Message Cmd
+ * @in1: [IN] Message Len
+ * @port_num: [IN] port number + [channel id]
+ * @magic: [IN] hypervisor magic value
+ * @eax: [OUT] value of EAX register
+ * @ebx: [OUT] e.g. status from an HB message status command
+ * @ecx: [OUT] e.g. status from a non-HB message status command
+ * @edx: [OUT] e.g. channel id
+ * @si: [INOUT] set to 0 if not used
+ * @di: [INOUT] set to 0 if not used
+ */
+#define VMW_PORT(cmd, in1, port_num, magic, eax, ebx, ecx, edx, si, di) \
+({ \
+ asm volatile ("inl %%dx, %%eax;" : \
+ "=a"(eax), \
+ "=b"(ebx), \
+ "=c"(ecx), \
+ "=d"(edx), \
+ "=S"(si), \
+ "=D"(di) : \
+ "a"(magic), \
+ "b"(in1), \
+ "c"(cmd), \
+ "d"(port_num), \
+ "S"(si), \
+ "D"(di) : \
+ "memory"); \
+})
+
+
+/**
+ * Hypervisor-specific bi-directional communication channel. Should never
+ * execute on bare metal hardware. The caller must make sure to check for
+ * supported hypervisor before using these macros.
+ *
+ * The last 3 parameters are both input and output and must be initialized.
+ *
+ * @cmd: [IN] Message Cmd
+ * @in1: [IN] Message Len
+ * @port_num: [IN] port number + [channel id]
+ * @magic: [IN] hypervisor magic value
+ * @eax: [OUT] value of EAX register
+ * @ebx: [OUT] e.g. status from an HB message status command
+ * @ecx: [OUT] e.g. status from a non-HB message status command
+ * @edx: [OUT] e.g. channel id
+ * @si: [INOUT] set to 0 if not used
+ * @di: [INOUT] set to 0 if not used
+ * @bp: [INOUT] set to 0 if not used
+ */
+#define VMW_PORT_HB_OUT(cmd, in1, port_num, magic, \
+ eax, ebx, ecx, edx, si, di, bp) \
+({ \
+ asm volatile ("push %%rbp;" \
+ "xchgq %6, %%rbp;" \
+ "rep outsb;" \
+ "xchgq %%rbp, %6;" \
+ "pop %%rbp;" : \
+ "=a"(eax), \
+ "=b"(ebx), \
+ "=c"(ecx), \
+ "=d"(edx), \
+ "+S"(si), \
+ "+D"(di), \
+ "+r"(bp) : \
+ "a"(magic), \
+ "b"(cmd), \
+ "c"(in1), \
+ "d"(port_num) : \
+ "memory", "cc"); \
+})
+
+
+#define VMW_PORT_HB_IN(cmd, in1, port_num, magic, \
+ eax, ebx, ecx, edx, si, di, bp) \
+({ \
+ asm volatile ("push %%rbp;" \
+ "xchgq %6, %%rbp;" \
+ "rep insb;" \
+ "xchgq %%rbp, %6;" \
+ "pop %%rbp" : \
+ "=a"(eax), \
+ "=b"(ebx), \
+ "=c"(ecx), \
+ "=d"(edx), \
+ "+S"(si), \
+ "+D"(di), \
+ "+r"(bp) : \
+ "a"(magic), \
+ "b"(cmd), \
+ "c"(in1), \
+ "d"(port_num) : \
+ "memory", "cc"); \
+})
+
+
+#endif
+
--
1.9.1
^ permalink raw reply related
* [PATCH 2/6] x86: Update vmware.c to use the common VMW_PORT macros
From: Sinclair Yeh @ 2015-12-04 23:19 UTC (permalink / raw)
To: x86
Cc: Sinclair Yeh, pv-drivers, Greg Kroah-Hartman, linux-kernel,
virtualization, Ingo Molnar, H. Peter Anvin, Thomas Gleixner
In-Reply-To: <1449271183-1746-1-git-send-email-syeh@vmware.com>
Updated the VMWARE_PORT macro to use the new VMW_PORT
macro. Doing this instead of replacing all existing
instances of VMWARE_PORT to minimize code change.
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alok N Kataria <akataria@vmware.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: pv-drivers@vmware.com
Cc: virtualization@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
v2:
Instead of replacing all existing instances of VMWARE_PORT
with VMW_PORT, update VMWARE_PORT to use the new VMW_PORT.
v3:
Using updated VMWARE_PORT() macro, which needs hypervisor magic in the
parameter
v4:
Swapped the first and second parameters because VMW_PORT has
changed.
---
arch/x86/kernel/cpu/vmware.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 628a059..67c429d 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -26,6 +26,7 @@
#include <asm/div64.h>
#include <asm/x86_init.h>
#include <asm/hypervisor.h>
+#include <asm/vmware.h>
#define CPUID_VMWARE_INFO_LEAF 0x40000000
#define VMWARE_HYPERVISOR_MAGIC 0x564D5868
@@ -37,13 +38,14 @@
#define VMWARE_PORT_CMD_LEGACY_X2APIC 3
#define VMWARE_PORT_CMD_VCPU_RESERVED 31
-#define VMWARE_PORT(cmd, eax, ebx, ecx, edx) \
- __asm__("inl (%%dx)" : \
- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : \
- "0"(VMWARE_HYPERVISOR_MAGIC), \
- "1"(VMWARE_PORT_CMD_##cmd), \
- "2"(VMWARE_HYPERVISOR_PORT), "3"(UINT_MAX) : \
- "memory");
+#define VMWARE_PORT(cmd, eax, ebx, ecx, edx) \
+({ \
+ unsigned long __si = 0, __di = 0; \
+ VMW_PORT(VMWARE_PORT_CMD_##cmd, UINT_MAX, VMWARE_HYPERVISOR_PORT, \
+ VMWARE_HYPERVISOR_MAGIC, \
+ eax, ebx, ecx, edx, __si, __di); \
+})
+
static inline int __vmware_platform(void)
{
--
1.9.1
^ permalink raw reply related
* [PATCH 3/6] Input: Update vmmouse.c to use the common VMW_PORT macros
From: Sinclair Yeh @ 2015-12-04 23:19 UTC (permalink / raw)
To: x86
Cc: Arnd Bergmann, Sinclair Yeh, pv-drivers, Greg Kroah-Hartman,
Dmitry Torokhov, linux-kernel, virtualization,
linux-graphics-maintainer, linux-input
In-Reply-To: <1449271183-1746-1-git-send-email-syeh@vmware.com>
Updated the VMMOUSE macro to use the new VMW_PORT macro. Doing
this instead of replacing all existing instances of VMWMOUSE
to minimize code change.
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alok N Kataria <akataria@vmware.com>
Cc: pv-drivers@vmware.com
Cc: linux-graphics-maintainer@vmware.com
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Cc: linux-input@vger.kernel.org
---
v2:
Instead of replacing existing VMMOUSE defines, only modify enough
to use the new VMW_PORT define.
v3:
Use updated VMWARE_PORT() which requires hypervisor magic as an added
parameter
v4:
Swapped parameters 1 and 2 when calling VMW_PORT because the macro
has been updated
---
drivers/input/mouse/vmmouse.c | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/drivers/input/mouse/vmmouse.c b/drivers/input/mouse/vmmouse.c
index e272f06..ddb152c 100644
--- a/drivers/input/mouse/vmmouse.c
+++ b/drivers/input/mouse/vmmouse.c
@@ -19,6 +19,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <asm/hypervisor.h>
+#include <asm/vmware.h>
#include "psmouse.h"
#include "vmmouse.h"
@@ -84,21 +85,12 @@ struct vmmouse_data {
* implementing the vmmouse protocol. Should never execute on
* bare metal hardware.
*/
-#define VMMOUSE_CMD(cmd, in1, out1, out2, out3, out4) \
-({ \
- unsigned long __dummy1, __dummy2; \
- __asm__ __volatile__ ("inl %%dx" : \
- "=a"(out1), \
- "=b"(out2), \
- "=c"(out3), \
- "=d"(out4), \
- "=S"(__dummy1), \
- "=D"(__dummy2) : \
- "a"(VMMOUSE_PROTO_MAGIC), \
- "b"(in1), \
- "c"(VMMOUSE_PROTO_CMD_##cmd), \
- "d"(VMMOUSE_PROTO_PORT) : \
- "memory"); \
+#define VMMOUSE_CMD(cmd, in1, out1, out2, out3, out4) \
+({ \
+ unsigned long __dummy1 = 0, __dummy2 = 0; \
+ VMW_PORT(VMMOUSE_PROTO_CMD_##cmd, in1, VMMOUSE_PROTO_PORT, \
+ VMMOUSE_PROTO_MAGIC, \
+ out1, out2, out3, out4, __dummy1, __dummy2); \
})
/**
--
1.9.1
^ permalink raw reply related
* [PATCH 4/6] Input: Remove vmmouse port reservation
From: Sinclair Yeh @ 2015-12-04 23:19 UTC (permalink / raw)
To: x86
Cc: Sinclair Yeh, pv-drivers, Greg Kroah-Hartman, linux-kernel,
virtualization, linux-graphics-maintainer
In-Reply-To: <1449271183-1746-1-git-send-email-syeh@vmware.com>
This port is used by quite a few guest-to-host communication
capabilities, e.g. getting configuration, logging, etc. Currently
multiple kernel modules, and one or more priviledged guest user
mode app, e.g. open-vm-tools, use this port without reservation.
It was determined that no reservation is required when accessing
the port in this manner.
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Cc: pv-drivers@vmware.com
Cc: linux-graphics-maintainer@vmware.com
Cc: virtualization@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/input/mouse/vmmouse.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/input/mouse/vmmouse.c b/drivers/input/mouse/vmmouse.c
index ddb152c..e881c87 100644
--- a/drivers/input/mouse/vmmouse.c
+++ b/drivers/input/mouse/vmmouse.c
@@ -347,16 +347,10 @@ int vmmouse_detect(struct psmouse *psmouse, bool set_properties)
return -ENXIO;
}
- if (!request_region(VMMOUSE_PROTO_PORT, 4, "vmmouse")) {
- psmouse_dbg(psmouse, "VMMouse port in use.\n");
- return -EBUSY;
- }
-
/* Check if the device is present */
response = ~VMMOUSE_PROTO_MAGIC;
VMMOUSE_CMD(GETVERSION, 0, version, response, dummy1, dummy2);
if (response != VMMOUSE_PROTO_MAGIC || version == 0xffffffffU) {
- release_region(VMMOUSE_PROTO_PORT, 4);
return -ENXIO;
}
@@ -366,8 +360,6 @@ int vmmouse_detect(struct psmouse *psmouse, bool set_properties)
psmouse->model = version;
}
- release_region(VMMOUSE_PROTO_PORT, 4);
-
return 0;
}
@@ -386,7 +378,6 @@ static void vmmouse_disconnect(struct psmouse *psmouse)
psmouse_reset(psmouse);
input_unregister_device(priv->abs_dev);
kfree(priv);
- release_region(VMMOUSE_PROTO_PORT, 4);
}
/**
@@ -430,15 +421,10 @@ int vmmouse_init(struct psmouse *psmouse)
struct input_dev *rel_dev = psmouse->dev, *abs_dev;
int error;
- if (!request_region(VMMOUSE_PROTO_PORT, 4, "vmmouse")) {
- psmouse_dbg(psmouse, "VMMouse port in use.\n");
- return -EBUSY;
- }
-
psmouse_reset(psmouse);
error = vmmouse_enable(psmouse);
if (error)
- goto release_region;
+ return error;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
abs_dev = input_allocate_device();
@@ -493,8 +479,5 @@ init_fail:
kfree(priv);
psmouse->private = NULL;
-release_region:
- release_region(VMMOUSE_PROTO_PORT, 4);
-
return error;
}
--
1.9.1
^ permalink raw reply related
* [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
From: Sinclair Yeh @ 2015-12-04 23:19 UTC (permalink / raw)
To: x86
Cc: Sinclair Yeh, pv-drivers, Greg Kroah-Hartman, linux-kernel,
virtualization, Xavier Deguillard
In-Reply-To: <1449271183-1746-1-git-send-email-syeh@vmware.com>
Updated VMWARE_BALLOON_CMD to use the common VMW_PORT macro.
Doing this rather than replacing all instances of VMWARE_BALLOON_CMD
to minimize code change.
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alok N Kataria <akataria@vmware.com>
Cc: pv-drivers@vmware.com
Cc: Xavier Deguillard <xdeguillard@vmware.com>
Cc: linux-kernel@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
v1
Swapped parameters 1 and 2 to VMW_PORT because the macro has been
updated
---
drivers/misc/vmw_balloon.c | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
index ffb5634..f8f60ca 100644
--- a/drivers/misc/vmw_balloon.c
+++ b/drivers/misc/vmw_balloon.c
@@ -43,6 +43,7 @@
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <asm/hypervisor.h>
+#include <asm/vmware.h>
MODULE_AUTHOR("VMware, Inc.");
MODULE_DESCRIPTION("VMware Memory Control (Balloon) Driver");
@@ -142,23 +143,17 @@ enum vmwballoon_capabilities {
#define VMW_BALLOON_SUCCESS_WITH_CAPABILITIES (0x03000000)
-#define VMWARE_BALLOON_CMD(cmd, data, result) \
-({ \
- unsigned long __status, __dummy1, __dummy2; \
- __asm__ __volatile__ ("inl %%dx" : \
- "=a"(__status), \
- "=c"(__dummy1), \
- "=d"(__dummy2), \
- "=b"(result) : \
- "0"(VMW_BALLOON_HV_MAGIC), \
- "1"(VMW_BALLOON_CMD_##cmd), \
- "2"(VMW_BALLOON_HV_PORT), \
- "3"(data) : \
- "memory"); \
- if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \
- result = __dummy1; \
- result &= -1UL; \
- __status & -1UL; \
+#define VMWARE_BALLOON_CMD(cmd, data, result) \
+({ \
+ unsigned long __status, __dummy1, __dummy2; \
+ unsigned long __si = 0, __di = 0; \
+ VMW_PORT(VMW_BALLOON_CMD_##cmd, data, VMW_BALLOON_HV_PORT, \
+ VMW_BALLOON_HV_MAGIC, \
+ __status, result, __dummy1, __dummy2, __si, __di);\
+ if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \
+ result = __dummy1; \
+ result &= -1UL; \
+ __status & -1UL; \
})
#ifdef CONFIG_DEBUG_FS
--
1.9.1
^ permalink raw reply related
* [PATCH] VSOCK: fix returnvar.cocci warnings
From: Julia Lawall @ 2015-12-06 5:56 UTC (permalink / raw)
Cc: Stefan Hajnoczi, kvm, Michael S. Tsirkin, netdev, virtualization,
kbuild-all, Matt Benjamin, Asias He, Christoffer Dall, matt.ma
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
CC: Asias He <asias@redhat.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
vsock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -56,8 +56,7 @@ struct vhost_vsock {
static u32 vhost_transport_get_local_cid(void)
{
- u32 cid = VHOST_VSOCK_DEFAULT_HOST_CID;
- return cid;
+ return VHOST_VSOCK_DEFAULT_HOST_CID;
}
static struct vhost_vsock *vhost_vsock_get(u32 guest_cid)
^ permalink raw reply
* Re: [PATCH] VSOCK: fix returnvar.cocci warnings
From: Stefan Hajnoczi @ 2015-12-07 1:50 UTC (permalink / raw)
To: Julia Lawall
Cc: kvm, Michael S. Tsirkin, netdev, virtualization, kbuild-all,
Matt Benjamin, Asias He, Christoffer Dall, matt.ma
In-Reply-To: <alpine.DEB.2.02.1512060654580.2030@localhost6.localdomain6>
[-- Attachment #1.1: Type: text/plain, Size: 819 bytes --]
On Sun, Dec 06, 2015 at 06:56:23AM +0100, Julia Lawall wrote:
> Remove unneeded variable used to store return value.
>
> Generated by: scripts/coccinelle/misc/returnvar.cocci
>
> CC: Asias He <asias@redhat.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
>
> ---
>
> vsock.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- a/drivers/vhost/vsock.c
> +++ b/drivers/vhost/vsock.c
> @@ -56,8 +56,7 @@ struct vhost_vsock {
>
> static u32 vhost_transport_get_local_cid(void)
> {
> - u32 cid = VHOST_VSOCK_DEFAULT_HOST_CID;
> - return cid;
> + return VHOST_VSOCK_DEFAULT_HOST_CID;
> }
>
> static struct vhost_vsock *vhost_vsock_get(u32 guest_cid)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply
* Re: [PATCH] VSOCK: fix returnvar.cocci warnings
From: David Miller @ 2015-12-07 3:38 UTC (permalink / raw)
To: julia.lawall
Cc: stefanha, kvm, mst, netdev, virtualization, kbuild-all, mbenjamin,
asias, christoffer.dall, matt.ma
In-Reply-To: <alpine.DEB.2.02.1512060654580.2030@localhost6.localdomain6>
From: Julia Lawall <julia.lawall@lip6.fr>
Date: Sun, 6 Dec 2015 06:56:23 +0100 (CET)
> Remove unneeded variable used to store return value.
>
> Generated by: scripts/coccinelle/misc/returnvar.cocci
>
> CC: Asias He <asias@redhat.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH] virtio: Do not drop __GFP_HIGH in alloc_indirect
From: Mel Gorman @ 2015-12-07 11:29 UTC (permalink / raw)
To: Michal Hocko
Cc: Michal Hocko, Michael S. Tsirkin, Huang, Ying, Will Deacon, LKML,
virtualization
In-Reply-To: <1448980369-27130-1-git-send-email-mhocko@kernel.org>
On Tue, Dec 01, 2015 at 03:32:49PM +0100, Michal Hocko wrote:
> From: Michal Hocko <mhocko@suse.com>
>
> b92b1b89a33c ("virtio: force vring descriptors to be allocated from
> lowmem") tried to exclude highmem pages for descriptors so it cleared
> __GFP_HIGHMEM from a given gfp mask. The patch also cleared __GFP_HIGH
> which doesn't make much sense for this fix because __GFP_HIGH only
> controls access to memory reserves and it doesn't have any influence
> on the zone selection. Some of the call paths use GFP_ATOMIC and
> dropping __GFP_HIGH will reduce their changes for success because the
> lack of access to memory reserves.
>
> Signed-off-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Mel Gorman <mgorman@techsingularity.net>
It also has been tested by Ying Huang and found to have fixed a page
allocation failure problem in 4.4-rc3 in the Intel 0-day testing
infrastructure.
--
Mel Gorman
SUSE Labs
^ permalink raw reply
* [PATCH RFC 0/3] Xen on Virtio
From: Stefano Stabellini @ 2015-12-07 16:19 UTC (permalink / raw)
To: mst; +Cc: xen-devel, Stefano Stabellini, linux-kernel, virtualization
Hi all,
this patch series introduces support for running Linux on top of Xen
inside a virtual machine with virtio devices (nested virt scenario).
The problem is that Linux virtio drivers use virt_to_phys to get the
guest pseudo-physical addresses to pass to the backend, which doesn't
work as expected on Xen.
Switching the virtio drivers to the dma APIs (dma_alloc_coherent,
dma_map/unmap_single and dma_map/unmap_sg) would solve the problem, as
Xen support in Linux provides an implementation of the dma API which
takes care of the additional address conversions. However using the dma
API would increase the complexity of the non-Xen case too. We would also
need to keep track of the physical or virtual address in addition to the
dma address for each vring_desc to be able to free the memory in
detach_buf (see patch #3).
Instead this series adds few obvious checks to perform address
translations in a couple of key places, without changing non-Xen code
paths. You are welcome to suggest improvements or alternative
implementations.
Thanks,
Stefano
Stefano Stabellini (3):
xen: export xen_phys_to_bus, xen_bus_to_phys and xen_virt_to_bus
xen/virtio: allocate a contiguous region to be use as virtio queue
xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu
drivers/virtio/virtio_pci_legacy.c | 19 +++++++++++++++----
drivers/virtio/virtio_ring.c | 9 +++++----
drivers/xen/swiotlb-xen.c | 31 -------------------------------
include/linux/virtio_config.h | 14 ++++++++++++++
include/xen/swiotlb-xen.h | 32 ++++++++++++++++++++++++++++++++
5 files changed, 66 insertions(+), 39 deletions(-)
^ permalink raw reply
* [PATCH RFC 1/3] xen: export xen_phys_to_bus, xen_bus_to_phys and xen_virt_to_bus
From: Stefano Stabellini @ 2015-12-07 16:19 UTC (permalink / raw)
To: mst
Cc: Stefano Stabellini, konrad.wilk, linux-kernel, virtualization,
david.vrabel, xen-devel, boris.ostrovsky
In-Reply-To: <alpine.DEB.2.02.1512071555590.24652@kaball.uk.xensource.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: konrad.wilk@oracle.com
CC: boris.ostrovsky@oracle.com
CC: david.vrabel@citrix.com
---
drivers/xen/swiotlb-xen.c | 31 -------------------------------
include/xen/swiotlb-xen.h | 32 ++++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 79bc493..56014d5 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -75,37 +75,6 @@ static unsigned long xen_io_tlb_nslabs;
static u64 start_dma_addr;
-/*
- * Both of these functions should avoid PFN_PHYS because phys_addr_t
- * can be 32bit when dma_addr_t is 64bit leading to a loss in
- * information if the shift is done before casting to 64bit.
- */
-static inline dma_addr_t xen_phys_to_bus(phys_addr_t paddr)
-{
- unsigned long bfn = pfn_to_bfn(PFN_DOWN(paddr));
- dma_addr_t dma = (dma_addr_t)bfn << PAGE_SHIFT;
-
- dma |= paddr & ~PAGE_MASK;
-
- return dma;
-}
-
-static inline phys_addr_t xen_bus_to_phys(dma_addr_t baddr)
-{
- unsigned long pfn = bfn_to_pfn(PFN_DOWN(baddr));
- dma_addr_t dma = (dma_addr_t)pfn << PAGE_SHIFT;
- phys_addr_t paddr = dma;
-
- paddr |= baddr & ~PAGE_MASK;
-
- return paddr;
-}
-
-static inline dma_addr_t xen_virt_to_bus(void *address)
-{
- return xen_phys_to_bus(virt_to_phys(address));
-}
-
static int check_pages_physically_contiguous(unsigned long pfn,
unsigned int offset,
size_t length)
diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h
index 8b2eb93..d55aee8 100644
--- a/include/xen/swiotlb-xen.h
+++ b/include/xen/swiotlb-xen.h
@@ -3,9 +3,41 @@
#include <linux/dma-direction.h>
#include <linux/swiotlb.h>
+#include <asm/xen/page.h>
extern int xen_swiotlb_init(int verbose, bool early);
+/*
+ * Both of these functions should avoid PFN_PHYS because phys_addr_t
+ * can be 32bit when dma_addr_t is 64bit leading to a loss in
+ * information if the shift is done before casting to 64bit.
+ */
+static inline dma_addr_t xen_phys_to_bus(phys_addr_t paddr)
+{
+ unsigned long bfn = pfn_to_bfn(PFN_DOWN(paddr));
+ dma_addr_t dma = (dma_addr_t)bfn << PAGE_SHIFT;
+
+ dma |= paddr & ~PAGE_MASK;
+
+ return dma;
+}
+
+static inline phys_addr_t xen_bus_to_phys(dma_addr_t baddr)
+{
+ unsigned long pfn = bfn_to_pfn(PFN_DOWN(baddr));
+ dma_addr_t dma = (dma_addr_t)pfn << PAGE_SHIFT;
+ phys_addr_t paddr = dma;
+
+ paddr |= baddr & ~PAGE_MASK;
+
+ return paddr;
+}
+
+static inline dma_addr_t xen_virt_to_bus(void *address)
+{
+ return xen_phys_to_bus(virt_to_phys(address));
+}
+
extern void
*xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
dma_addr_t *dma_handle, gfp_t flags,
--
1.7.10.4
^ permalink raw reply related
* [PATCH RFC 2/3] xen/virtio: allocate a contiguous region to be use as virtio queue
From: Stefano Stabellini @ 2015-12-07 16:19 UTC (permalink / raw)
To: mst; +Cc: xen-devel, Stefano Stabellini, linux-kernel, virtualization
In-Reply-To: <alpine.DEB.2.02.1512071555590.24652@kaball.uk.xensource.com>
When running on Xen inside as virtual machine (nested virt scenario),
memory allocated by alloc_pages_exact might not actually be contiguous.
Call xen_swiotlb_alloc_coherent instead, which is going to take care of
making the buffer contiguous in machine memory.
No changes in behavior for the non-Xen case.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
Alternatively we could call dma_alloc_coherent in all cases, but that
would make the non-Xen code path more complex.
---
drivers/virtio/virtio_pci_legacy.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c
index 48bc979..27359ac 100644
--- a/drivers/virtio/virtio_pci_legacy.c
+++ b/drivers/virtio/virtio_pci_legacy.c
@@ -18,6 +18,8 @@
*/
#include "virtio_pci_common.h"
+#include <xen/xen.h>
+#include <xen/swiotlb-xen.h>
/* virtio config->get_features() implementation */
static u64 vp_get_features(struct virtio_device *vdev)
@@ -122,6 +124,7 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
unsigned long size;
u16 num;
int err;
+ dma_addr_t dma_addr;
/* Select the queue we're interested in */
iowrite16(index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_SEL);
@@ -135,12 +138,20 @@ static struct virtqueue *setup_vq(struct virtio_pci_device *vp_dev,
info->msix_vector = msix_vec;
size = PAGE_ALIGN(vring_size(num, VIRTIO_PCI_VRING_ALIGN));
- info->queue = alloc_pages_exact(size, GFP_KERNEL|__GFP_ZERO);
+ /* activate the queue */
+ if (xen_domain()) {
+ info->queue = xen_swiotlb_alloc_coherent(NULL,
+ size,
+ &dma_addr,
+ GFP_KERNEL|__GFP_ZERO,
+ NULL);
+ } else {
+ info->queue = alloc_pages_exact(size, GFP_KERNEL|__GFP_ZERO);
+ dma_addr = virt_to_phys(info->queue);
+ }
if (info->queue == NULL)
return ERR_PTR(-ENOMEM);
-
- /* activate the queue */
- iowrite32(virt_to_phys(info->queue) >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
+ iowrite32(dma_addr >> VIRTIO_PCI_QUEUE_ADDR_SHIFT,
vp_dev->ioaddr + VIRTIO_PCI_QUEUE_PFN);
/* create the vring */
--
1.7.10.4
^ permalink raw reply related
* [PATCH RFC 3/3] xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu
From: Stefano Stabellini @ 2015-12-07 16:19 UTC (permalink / raw)
To: mst; +Cc: xen-devel, Stefano Stabellini, linux-kernel, virtualization
In-Reply-To: <alpine.DEB.2.02.1512071555590.24652@kaball.uk.xensource.com>
When running on Xen inside as virtual machine (nested virt scenario),
addresses need to be translated from phys to machine to get the actual
guest pseudo-physical address.
Introduce a new pair of functions, cpu_to_virtio_addr and
virtio_addr_to_cpu, which call the appriopriate __virtio64_to_cpu and
__cpu_to_virtio64 functions after doing the phys_to_bus and bus_to_phys
translations for Xen.
No changes in behavior for the non-Xen case.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
I realize that this patch is not very nice, but at least it is easy to
understand. I welcome any suggestions on how to improve it.
I considered introducing regular dma API calls, like
dma_map/unmap_single and dma_map/unmap_sg. However they would make the
non-Xen code path more complex than it is today. We would also need to
keep track of the physical or virtual address in addition to the dma
address for each vring_desc to be able to free the memory in detach_buf.
---
drivers/virtio/virtio_ring.c | 9 +++++----
include/linux/virtio_config.h | 14 ++++++++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 096b857..34a1d42 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -16,6 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <linux/dma-mapping.h>
#include <linux/virtio.h>
#include <linux/virtio_ring.h>
#include <linux/virtio_config.h>
@@ -172,7 +173,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
if (desc) {
/* Use a single buffer which doesn't continue */
vq->vring.desc[head].flags = cpu_to_virtio16(_vq->vdev, VRING_DESC_F_INDIRECT);
- vq->vring.desc[head].addr = cpu_to_virtio64(_vq->vdev, virt_to_phys(desc));
+ vq->vring.desc[head].addr = cpu_to_virtio_addr(_vq->vdev, virt_to_phys(desc));
/* avoid kmemleak false positive (hidden by virt_to_phys) */
kmemleak_ignore(desc);
vq->vring.desc[head].len = cpu_to_virtio32(_vq->vdev, total_sg * sizeof(struct vring_desc));
@@ -206,7 +207,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
for (n = 0; n < out_sgs; n++) {
for (sg = sgs[n]; sg; sg = sg_next(sg)) {
desc[i].flags = cpu_to_virtio16(_vq->vdev, VRING_DESC_F_NEXT);
- desc[i].addr = cpu_to_virtio64(_vq->vdev, sg_phys(sg));
+ desc[i].addr = cpu_to_virtio_addr(_vq->vdev, sg_phys(sg));
desc[i].len = cpu_to_virtio32(_vq->vdev, sg->length);
prev = i;
i = virtio16_to_cpu(_vq->vdev, desc[i].next);
@@ -215,7 +216,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
for (; n < (out_sgs + in_sgs); n++) {
for (sg = sgs[n]; sg; sg = sg_next(sg)) {
desc[i].flags = cpu_to_virtio16(_vq->vdev, VRING_DESC_F_NEXT | VRING_DESC_F_WRITE);
- desc[i].addr = cpu_to_virtio64(_vq->vdev, sg_phys(sg));
+ desc[i].addr = cpu_to_virtio_addr(_vq->vdev, sg_phys(sg));
desc[i].len = cpu_to_virtio32(_vq->vdev, sg->length);
prev = i;
i = virtio16_to_cpu(_vq->vdev, desc[i].next);
@@ -433,7 +434,7 @@ static void detach_buf(struct vring_virtqueue *vq, unsigned int head)
/* Free the indirect table */
if (vq->vring.desc[i].flags & cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_INDIRECT))
- kfree(phys_to_virt(virtio64_to_cpu(vq->vq.vdev, vq->vring.desc[i].addr)));
+ kfree(phys_to_virt(virtio_addr_to_cpu(vq->vq.vdev, vq->vring.desc[i].addr)));
while (vq->vring.desc[i].flags & cpu_to_virtio16(vq->vq.vdev, VRING_DESC_F_NEXT)) {
i = virtio16_to_cpu(vq->vq.vdev, vq->vring.desc[i].next);
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index e5ce8ab..861803f 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -6,6 +6,8 @@
#include <linux/virtio.h>
#include <linux/virtio_byteorder.h>
#include <uapi/linux/virtio_config.h>
+#include <xen/xen.h>
+#include <xen/swiotlb-xen.h>
/**
* virtio_config_ops - operations for configuring a virtio device
@@ -237,11 +239,23 @@ static inline u64 virtio64_to_cpu(struct virtio_device *vdev, __virtio64 val)
return __virtio64_to_cpu(virtio_is_little_endian(vdev), val);
}
+static inline u64 virtio_addr_to_cpu(struct virtio_device *vdev, __virtio64 val)
+{
+ val = xen_pv_domain() ? xen_bus_to_phys(val) : val;
+ return __virtio64_to_cpu(virtio_is_little_endian(vdev), val);
+}
+
static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
{
return __cpu_to_virtio64(virtio_is_little_endian(vdev), val);
}
+static inline __virtio64 cpu_to_virtio_addr(struct virtio_device *vdev, u64 val)
+{
+ val = xen_pv_domain() ? xen_phys_to_bus(val) : val;
+ return __cpu_to_virtio64(virtio_is_little_endian(vdev), val);
+}
+
/* Config space accessors. */
#define virtio_cread(vdev, structname, member, ptr) \
do { \
--
1.7.10.4
^ permalink raw reply related
* [PULL] vhost: cleanups and fixes
From: Michael S. Tsirkin @ 2015-12-07 17:07 UTC (permalink / raw)
To: Linus Torvalds
Cc: mhocko, kvm, mst, netdev, will.deacon, linux-kernel, stable,
virtualization, luto, s-anna
The following changes since commit 527e9316f8ec44bd53d90fb9f611fa7ffff52bb9:
Linux 4.4-rc4 (2015-12-06 15:43:12 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
for you to fetch changes up to f277ec42f38f406ed073569b24b04f1c291fec0f:
virtio_ring: shadow available ring flags & index (2015-12-07 17:28:11 +0200)
----------------------------------------------------------------
virtio: fixes on top of 4.4-rc4
This includes some fixes and cleanups in virtio and vhost code. Most notably,
shadowing the index fixes the excessive cacheline bouncing observed on AMD
platforms.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
----------------------------------------------------------------
Michael S. Tsirkin (5):
virtio-net: Stop doing DMA from the stack
vhost: relax log address alignment
tools/virtio: move list macro stubs
tools/virtio: fix byteswap logic
vhost: replace % with & on data path
Michal Hocko (1):
virtio: Do not drop __GFP_HIGH in alloc_indirect
Suman Anna (1):
virtio: fix memory leak of virtio ida cache layers
Venkatesh Srinivas (1):
virtio_ring: shadow available ring flags & index
tools/virtio/linux/kernel.h | 6 +++++
tools/virtio/linux/virtio.h | 6 -----
tools/virtio/linux/virtio_config.h | 20 ++++++++++------
drivers/net/virtio_net.c | 34 +++++++++++++++------------
drivers/vhost/vhost.c | 8 +++----
drivers/virtio/virtio.c | 1 +
drivers/virtio/virtio_ring.c | 48 +++++++++++++++++++++++++++-----------
7 files changed, 78 insertions(+), 45 deletions(-)
^ permalink raw reply
* [PATCH 0/6] VSOCK: revert virtio-vsock until device spec is finalized
From: Stefan Hajnoczi @ 2015-12-08 11:57 UTC (permalink / raw)
To: netdev
Cc: Stefan Hajnoczi, kvm, Michael S. Tsirkin, virtualization,
Matt Benjamin, David S. Miller, Christoffer Dall, matt.ma
The virtio-vsock device specification is not finalized yet. Michael Tsirkin
voiced concerned about merging this code when the hardware interface (and
possibly the userspace interface) could still change.
Please revert for now.
I am working to finalize the virtio-vsock device specification and at that
point the interfaces will be stable.
Stefan Hajnoczi (6):
Revert "VSOCK: fix returnvar.cocci warnings"
Revert "VSOCK: Add Makefile and Kconfig"
Revert "VSOCK: Introduce vhost-vsock.ko"
Revert "VSOCK: Introduce virtio-vsock.ko"
Revert "VSOCK: Introduce virtio-vsock-common.ko"
Revert "VSOCK: Introduce vsock_find_unbound_socket and
vsock_bind_dgram_generic"
drivers/vhost/Kconfig | 4 -
drivers/vhost/Kconfig.vsock | 7 -
drivers/vhost/Makefile | 4 -
drivers/vhost/vsock.c | 630 ---------------
drivers/vhost/vsock.h | 4 -
include/linux/virtio_vsock.h | 209 -----
include/net/af_vsock.h | 2 -
include/uapi/linux/virtio_ids.h | 1 -
include/uapi/linux/virtio_vsock.h | 89 ---
net/vmw_vsock/Kconfig | 18 -
net/vmw_vsock/Makefile | 2 -
net/vmw_vsock/af_vsock.c | 70 --
net/vmw_vsock/virtio_transport.c | 466 -----------
net/vmw_vsock/virtio_transport_common.c | 1272 -------------------------------
14 files changed, 2778 deletions(-)
delete mode 100644 drivers/vhost/Kconfig.vsock
delete mode 100644 drivers/vhost/vsock.c
delete mode 100644 drivers/vhost/vsock.h
delete mode 100644 include/linux/virtio_vsock.h
delete mode 100644 include/uapi/linux/virtio_vsock.h
delete mode 100644 net/vmw_vsock/virtio_transport.c
delete mode 100644 net/vmw_vsock/virtio_transport_common.c
--
2.5.0
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox