All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Kouya Shimura <kouya@jp.fujitsu.com>,
	xen-devel@lists.xensource.com
Subject: [PATCH 3/3] ioemu: remove power state transition and xc_deassign_device().
Date: Wed, 22 Apr 2009 11:20:45 +0900	[thread overview]
Message-ID: <20090422111735.32AD.27C06F64@necst.nec.co.jp> (raw)
In-Reply-To: <20090422105816.32A4.27C06F64@necst.nec.co.jp>

This patch adds two changes to ioemu.
  - Modify ioemu not to call xc_deassign_device()
  - Remove power state transition of real device when ioemu initialise
    PMCSR.

Thanks,
--
Yuji Shimada


Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>

diff --git a/hw/pass-through.c b/hw/pass-through.c
index 710acbf..65e7634 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -2465,29 +2465,6 @@ static uint32_t pt_pmcsr_reg_init(struct pt_dev *ptdev,
         ptdev->pm_state->no_soft_reset = (*(uint8_t *)(d->config + real_offset)
             & (uint8_t)PCI_PM_CTRL_NO_SOFT_RESET);
 
-    /* wake up real physical device */
-    switch ( pci_read_word(ptdev->pci_dev, real_offset) 
-             & PCI_PM_CTRL_STATE_MASK )
-    {
-    case 0:
-        break;
-    case 1:
-        PT_LOG("Power state transition D1 -> D0active\n");
-        pci_write_word(ptdev->pci_dev, real_offset, 0);
-        break;
-    case 2:
-        PT_LOG("Power state transition D2 -> D0active\n");
-        pci_write_word(ptdev->pci_dev, real_offset, 0);
-        usleep(200);
-        break;
-    case 3:
-        PT_LOG("Power state transition D3hot -> D0active\n");
-        pci_write_word(ptdev->pci_dev, real_offset, 0);
-        usleep(10 * 1000);
-        pt_init_pci_config(ptdev);
-        break;
-    }
-
     return reg->init_val;
 }
 
@@ -3963,13 +3940,6 @@ static int unregister_real_device(int slot)
     /* unregister real device's MMIO/PIO BARs */
     pt_unregister_regions(assigned_device);
 
-    /* deassign the dev to dom0 */
-    bdf |= (pci_dev->bus  & 0xff) << 16;
-    bdf |= (pci_dev->dev  & 0x1f) << 11;
-    bdf |= (pci_dev->func & 0x1f) << 8;
-    if ( (rc = xc_deassign_device(xc_handle, domid, bdf)) != 0)
-        PT_LOG("Error: Revoking the device failed! rc=%d\n", rc);
-
     /* mark this slot as free */
     php_dev->valid = 0;
     php_dev->pt_dev = NULL;

      parent reply	other threads:[~2009-04-22  2:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22  2:11 [PATCH 0/3] save/restore PCI configuration space in pciback Yuji Shimada
2009-04-22  2:18 ` [PATCH 1/3] " Yuji Shimada
2009-04-22  2:20 ` [PATCH 2/3] remove saving/restoring method in Xend Yuji Shimada
2009-04-22  2:50   ` Masaki Kanno
2009-04-22  8:18     ` [PATCH 2/3 v2] " Yuji Shimada
2009-04-22 10:38   ` [PATCH 2/3] " Ian Pratt
2009-04-23  2:57     ` Yuji Shimada
2009-04-23  7:22       ` Keir Fraser
2009-04-23  8:27         ` Yuji Shimada
2009-04-23  9:01           ` Keir Fraser
2009-04-24  8:38             ` Yuji Shimada
2009-04-24  8:40             ` [PATCH 0/2] modify the order of resetting/deassigning device Yuji Shimada
2009-04-24  8:43               ` [PATCH 1/2] " Yuji Shimada
2009-04-24  8:43               ` [PATCH 2/2] ioemu: don't call xc_deassign_device() Yuji Shimada
2009-04-28  6:02                 ` Yuji Shimada
2009-04-22  2:20 ` Yuji Shimada [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090422111735.32AD.27C06F64@necst.nec.co.jp \
    --to=shimada-yxb@necst.nec.co.jp \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=kouya@jp.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.