From patchwork Mon Jul 15 11:11:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 2827412 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F0F859F967 for ; Mon, 15 Jul 2013 11:18:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA9D820155 for ; Mon, 15 Jul 2013 11:18:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01B002010C for ; Mon, 15 Jul 2013 11:18:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755604Ab3GOLSf (ORCPT ); Mon, 15 Jul 2013 07:18:35 -0400 Received: from ch1ehsobe003.messaging.microsoft.com ([216.32.181.183]:46779 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755505Ab3GOLSe (ORCPT ); Mon, 15 Jul 2013 07:18:34 -0400 Received: from mail129-ch1-R.bigfish.com (10.43.68.228) by CH1EHSOBE003.bigfish.com (10.43.70.53) with Microsoft SMTP Server id 14.1.225.22; Mon, 15 Jul 2013 11:18:33 +0000 Received: from mail129-ch1 (localhost [127.0.0.1]) by mail129-ch1-R.bigfish.com (Postfix) with ESMTP id 04E3840193; Mon, 15 Jul 2013 11:18:33 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 3 X-BigFish: VS3(zzzz1f42h1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082kzz8275bhz2dh2a8h668h839he5bhf0ah107ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1dfeh1dffh1e1dh1e23h1155h) Received: from mail129-ch1 (localhost.localdomain [127.0.0.1]) by mail129-ch1 (MessageSwitch) id 1373887111256316_12682; Mon, 15 Jul 2013 11:18:31 +0000 (UTC) Received: from CH1EHSMHS038.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.244]) by mail129-ch1.bigfish.com (Postfix) with ESMTP id 396EF3A0047; Mon, 15 Jul 2013 11:18:31 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS038.bigfish.com (10.43.69.247) with Microsoft SMTP Server (TLS) id 14.16.227.3; Mon, 15 Jul 2013 11:18:30 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.3.136.1; Mon, 15 Jul 2013 11:17:33 +0000 Received: from freescale.com ([10.232.15.72]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with SMTP id r6FBIPpA020677; Mon, 15 Jul 2013 04:18:26 -0700 Received: by freescale.com (sSMTP sendmail emulation); Mon, 15 Jul 2013 16:41:37 +0530 From: Bharat Bhushan To: , , , , CC: Bharat Bhushan , Bharat Bhushan Subject: [PATCH 3/5] booke: define reset and shutdown hcalls Date: Mon, 15 Jul 2013 16:41:17 +0530 Message-ID: <1373886679-19581-4-git-send-email-Bharat.Bhushan@freescale.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1373886679-19581-1-git-send-email-Bharat.Bhushan@freescale.com> References: <1373886679-19581-1-git-send-email-Bharat.Bhushan@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP KVM_HC_VM_RESET: Requests that the virtual machine be reset. KVM_HC_VM_SHUTDOWN: Requests that the virtual machine be powered-off/halted. These hcalls are handled by guest userspace. Signed-off-by: Bharat Bhushan --- Documentation/virtual/kvm/hypercalls.txt | 16 ++++++++++++++++ include/uapi/linux/kvm_para.h | 3 ++- 2 files changed, 18 insertions(+), 1 deletions(-) diff --git a/Documentation/virtual/kvm/hypercalls.txt b/Documentation/virtual/kvm/hypercalls.txt index ea113b5..58acdc1 100644 --- a/Documentation/virtual/kvm/hypercalls.txt +++ b/Documentation/virtual/kvm/hypercalls.txt @@ -64,3 +64,19 @@ Purpose: To enable communication between the hypervisor and guest there is a shared page that contains parts of supervisor visible register state. The guest can map this shared page to access its supervisor register through memory using this hypercall. + +5. KVM_HC_VM_RESET +------------------------ +Architecture: PPC +Status: active +Purpose: Requests that the virtual machine be reset. The hcall takes no +arguments. If successful the hcall does not return. If an error occurs it +returns EV_INTERNAL. + +6. KVM_HC_VM_SHUTDOWN +------------------------ +Architecture: PPC +Status: active +Purpose: Requests that the virtual machine be powered-off/halted. +The hcall takes no arguments. If successful the hcall does not return. +If an error occurs it returns EV_INTERNAL. diff --git a/include/uapi/linux/kvm_para.h b/include/uapi/linux/kvm_para.h index cea2c5c..218882d 100644 --- a/include/uapi/linux/kvm_para.h +++ b/include/uapi/linux/kvm_para.h @@ -19,7 +19,8 @@ #define KVM_HC_MMU_OP 2 #define KVM_HC_FEATURES 3 #define KVM_HC_PPC_MAP_MAGIC_PAGE 4 - +#define KVM_HC_VM_RESET 5 +#define KVM_HC_VM_SHUTDOWN 6 /* * hypercalls use architecture specific */