在 2018/11/15 下午8:12, Andrea Bolognani 写道:
On Thu, 2018-11-15 at 10:17 +, Daniel P. Berrangé wrote:
On Tue, Nov 13, 2018 at 03:35:43PM +0100, Andrea Bolognani wrote:
Dan, do you have any remaining concerns about the XML syntax, or can
I go ahead and push?
Honestly, I still don't much
在 2018/11/13 下午10:35, Andrea Bolognani 写道:
On Thu, 2018-11-08 at 19:00 +0800, Yi Min Zhao wrote:
Abstract
The PCI representation in QEMU has been extended for S390
allowing configuration of zPCI attributes like uid (user-defined
identifier) and fid (PCI function identifier
在 2018/11/13 下午10:29, Andrea Bolognani 写道:
On Thu, 2018-11-08 at 19:00 +0800, Yi Min Zhao wrote:
This patch adds new functions for reservation, assignment and release
to handle the uid/fid. If the uid/fid is defined in the domain XML,
they will be reserved directly in the collecting phase
hashtable, and reserve them. For the hotplug case there
might not be a zPCI definition. So allocate and reserve uid/fid the
case. Assign if needed and reserve uid/fid for the defined case.
Signed-off-by: Yi Min Zhao
Reviewed-by: Bjoern Walk
Reviewed-by: Boris Fiuczynski
---
src/conf/device_conf.c
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
docs/news.xml | 11 +++
1 file changed, 11 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 9d98c34df2..4549c0a46f 100644
Add new functions to generate zPCI command string and append it to
QEMU command line. And the related tests are added.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
Update 'Device address' section to describe 'zpci' element and
its two attributes 'uid' and 'fid'.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
docs/formatdomain.html.in | 10 +-
1
This patch introduces new XML parser/formatter functions. Uid is
16-bit and non-zero. Fid is 32-bit. They are the two attributes of zpci
which is introduced as PCI address element. Zpci element is parsed and
formatted along with PCI address. And add the related test cases.
Signed-off-by: Yi Min
Add zPCI definitions in preparation of extending the PCI address
with parameters uid (user-defined identifier) and fid (PCI function
identifier).
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed
irstly.
2. Spare some checks for zpci device.
3. Add vsock and controller support.
4. Add uin32 type schema.
5. Rename zpciuid and zpcifid to zpci_uid and zpci_fid.
6. Always return multibus support on S390.
Yi Min Zhao (14):
conf: Add definitions for 'uid' and 'fid' PCI address attributes
-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_domain.c| 36 +++
.../hostdev-vfio-zpci-wrong-arch.xml | 34 ++
tests/qemuxml2argvtest.c | 2 ++
3 files changed, 72
introduce our own callbacks for the two
hashtables. In this way, uid/fid is saved in hash key and hash value
could be any non-NULL pointer due to no operation on hash value. That is
also the reason why we don't introduce hash value free callback.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris
The pci-root depends on zpci capability. So autogenerate pci-root if
zpci exists.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 1 +
1 file
QEMU on s390 supports PCI multibus since forever.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_capabilities.c | 4
1 file changed, 4 insertions
In order to add zPCI child element for PCI address, we update
virDomainDeviceInfoFormat() to format device info by helper function
virXMLFormatElement(). Then we could simply format zPCI address into
child buffer later.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed
-pci
virtio-rng-pci
virtio-input-host-pci
virtio-keyboard-pci
virtio-mouse-pci
virtio-tablet-pci
vfio-pci
SCSIVhost device
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea
. Currently only zPCI extension address is introduced to deal
with 'uid' and 'fid' on the S390 platform.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/conf/device_conf.h | 4 +
src/conf/domain_addr.h | 5 ++
src
Let's introduce zPCI capability.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h
在 2018/11/5 下午9:22, Andrea Bolognani 写道:
On Fri, 2018-10-19 at 11:40 +0800, Yi Min Zhao wrote:
[...]
@@ -3925,7 +3925,15 @@
(since 0.9.7, requires QEMU
0.13). multifunction defaults to 'off',
but should be set to 'on' for function 0 of a slot
Kindly ping.
@Jan, could you please take a look?
@Andrea, I have updated the code as your comments on previous version.
在 2018/10/19 上午11:40, Yi Min Zhao 写道:
Abstract
The PCI representation in QEMU has been extended for S390
allowing configuration of zPCI attributes like uid (user
在 2018/10/19 下午3:54, Andrea Bolognani 写道:
On Fri, 2018-10-19 at 11:29 +0800, Yi Min Zhao wrote:
在 2018/10/18 下午11:44, Andrea Bolognani 写道:
There's still the question of whether Dan is now okay with the XML
structure as currently implemented; assuming that's the case, it
would be great
Update 'Device address' section to describe 'zpci' element and
its two attributes 'uid' and 'fid'.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
docs/formatdomain.html.in | 10 +-
1
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
docs/news.xml | 11 +++
1 file changed, 11 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index dc08c96352..6c2e0f27f1 100644
This patch introduces new XML parser/formatter functions. Uid is
16-bit and non-zero. Fid is 32-bit. They are the two attributes of zpci
which is introduced as PCI address element. Zpci element is parsed and
formatted along with PCI address. And add the related test cases.
Signed-off-by: Yi Min
In order to add zPCI child element for PCI address, we update
virDomainDeviceInfoFormat() to format device info by helper function
virXMLFormatElement(). Then we could simply format zPCI address into
child buffer later.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
---
src/conf
. Currently only zPCI extension address is introduced to deal
with 'uid' and 'fid' on the S390 platform.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/conf/device_conf.h | 4 +
src/conf/domain_addr.h | 5 ++
src
Add new functions to generate zPCI command string and append it to
QEMU command line. And the related tests are added.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
在 2018/10/18 下午11:44, Andrea Bolognani 写道:
On Thu, 2018-10-18 at 15:13 +0800, Yi Min Zhao wrote:
在 2018/10/17 下午10:30, Andrea Bolognani 写道:
On Tue, 2018-10-16 at 11:28 +0800, Yi Min Zhao wrote:
I think this would make things complex. If either PCI address or
zPCI address exists, we have
introduce our own callbacks for the two
hashtables. In this way, uid/fid is saved in hash key and hash value
could be any non-NULL pointer due to no operation on hash value. That is
also the reason why we don't introduce hash value free callback.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris
The pci-root depends on zpci capability. So autogenerate pci-root if
zpci exists.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 1 +
1 file
QEMU on s390 supports PCI multibus since forever.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_capabilities.c | 4
1 file changed, 4 insertions
-pci
virtio-rng-pci
virtio-input-host-pci
virtio-keyboard-pci
virtio-mouse-pci
virtio-tablet-pci
vfio-pci
SCSIVhost device
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea
-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_domain.c| 36 +++
.../hostdev-vfio-zpci-wrong-arch.xml | 34 ++
tests/qemuxml2argvtest.c | 2 ++
3 files changed, 72
nd merge testcases into corresponding commits that
introduce the functionalities firstly.
2. Spare some checks for zpci device.
3. Add vsock and controller support.
4. Add uin32 type schema.
5. Rename zpciuid and zpcifid to zpci_uid and zpci_fid.
6. Always return multibus support on S390.
Yi Min
hashtable, and reserve them. For the hotplug case there
might not be a zPCI definition. So allocate and reserve uid/fid the
case. Assign if needed and reserve uid/fid for the defined case.
Signed-off-by: Yi Min Zhao
Reviewed-by: Bjoern Walk
Reviewed-by: Boris Fiuczynski
---
src/conf/device_conf.c
Let's introduce zPCI capability.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h
Add zPCI definitions in preparation of extending the PCI address
with parameters uid (user-defined identifier) and fid (PCI function
identifier).
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed
在 2018/10/17 下午10:30, Andrea Bolognani 写道:
On Tue, 2018-10-16 at 11:28 +0800, Yi Min Zhao wrote:
在 2018/10/11 下午10:50, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
# conf/device_conf.h
+virDeviceInfoPCIAddressExtensionIsPresent
在 2018/10/16 下午11:38, Andrea Bolognani 写道:
On Tue, 2018-10-16 at 11:12 +0800, Yi Min Zhao wrote:
在 2018/10/11 下午7:45, Andrea Bolognani 写道:
You can move virZPCIDeviceAddressIsValid() to util/virpci and
export it too, to be consistent with virPCIDeviceAddress*().
It has been moved to util
在 2018/10/11 下午7:45, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
This patch introduces new XML parser/formatter functions. Uid is
16-bit and non-zero. Fid is 32-bit. They are the two attributes of zpci
which is introduced as PCI address element. Zpci element
在 2018/10/11 下午10:50, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
# conf/device_conf.h
+virDeviceInfoPCIAddressExtensionIsPresent;
+virDeviceInfoPCIAddressExtensionIsWanted;
virDeviceInfoPCIAddressIsPresent;
virDeviceInfoPCIAddressIsWanted
在 2018/10/15 下午2:59, Andrea Bolognani 写道:
On Mon, 2018-10-15 at 09:31 +0800, Yi Min Zhao wrote:
在 2018/10/11 下午9:08, Andrea Bolognani 写道:
Forgot to mention: it would be really nice if you added a negative
test case showing that using zPCI addresses on eg. x86 will result
in a validation
在 2018/10/12 下午11:04, Daniel P. Berrangé 写道:
On Fri, Sep 28, 2018 at 04:46:13PM +0800, Yi Min Zhao wrote:
Abstract
The PCI representation in QEMU has recently been extended for S390
allowing configuration of zPCI attributes like uid (user-defined
identifier) and fid (PCI function
在 2018/10/12 下午10:57, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
[...]
@@ -1381,7 +1469,8 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
goto cleanup;
}
-if (qemuDomainIsS390CCW(vm->def) &&
+if (net
在 2018/10/12 下午10:44, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
[...]
@@ -3089,6 +3146,10 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd,
goto cleanup;
if (devstr) {
+if (qemuCommandAddExtDevice(cmd
在 2018/10/12 下午11:03, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
[...]
@@ -3925,7 +3925,14 @@
(since 0.9.7, requires QEMU
0.13). multifunction defaults to 'off',
but should be set to 'on' for function 0 of a slot
在 2018/10/11 下午9:08, Andrea Bolognani 写道:
On Thu, 2018-10-11 at 14:44 +0200, Andrea Bolognani wrote:
[...]
With the above addressed,
Reviewed-by: Andrea Bolognani
Forgot to mention: it would be really nice if you added a negative
test case showing that using zPCI addresses on eg. x86
在 2018/10/11 下午6:31, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
[...]
+static void
+virDomainPCIAddressSetExtensionFree(virDomainPCIAddressSetPtr addrs)
+{
+if (!addrs || !addrs->zpciIds)
+return;
+
+virHashFree(addrs->zpciIds
在 2018/10/14 下午8:47, Andrea Bolognani 写道:
On Fri, 2018-10-12 at 16:04 +0100, Daniel P. Berrangé wrote:
On Fri, Sep 28, 2018 at 04:46:13PM +0800, Yi Min Zhao wrote:
[...]
I'm not sure if this was discussed in earlier versions, but to me
在 2018/10/12 下午11:05, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
[...]
+
+
+ qemu: Added support for PCI device passthrough on S390
Talking about "device passthrough" is not accurate, because the new
feature can be used fo
在 2018/10/11 下午8:44, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
[...]
+static int
+qemuDomainDeviceDefValidateAddress(const virDomainDeviceDef *dev,
+ virQEMUCapsPtr qemuCaps)
+{
+virDomainDeviceInfoPtr info
在 2018/10/11 下午4:49, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
[...]
@@ -166,6 +166,10 @@ struct _virDomainDeviceInfo {
* assignment, never saved and never reported.
*/
int pciConnectFlags; /* enum virDomainPCIConnectFlags
在 2018/10/11 下午3:17, Andrea Bolognani 写道:
On Fri, 2018-09-28 at 16:46 +0800, Yi Min Zhao wrote:
[...]
struct _virPCIDeviceAddress {
unsigned int domain;
unsigned int bus;
unsigned int slot;
unsigned int function;
int multi; /* virTristateSwitch
, and reserve it. For hotplug case, there might be or not zPCI
definition. So allocate and reserve uid/fid for undefined case. Assign
if needed and reserve uid/fid for defined case. Whether using zPCI
address refers to extension flags in PCIDeviceAddress.
Signed-off-by: Yi Min Zhao
---
src/conf/device_conf.c
-pci
virtio-rng-pci
virtio-input-host-pci
virtio-keyboard-pci
virtio-mouse-pci
virtio-tablet-pci
vfio-pci
SCSIVhost device
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
---
src/qemu/qemu_hotplug.c | 162
Update 'Device address' section to describe 'zpci' element and
its two attributes 'uid' and 'fid'.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
---
docs/formatdomain.html.in | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
---
docs/news.xml | 11 +++
1 file changed, 11 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 3ed6ff8aeb..9600c97102 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -44,6 +44,17
. Currently only zPCI extension address is introduced to deal
with 'uid' and 'fid' on the S390 platform.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/conf/device_conf.h | 4 +
src/conf/domain_addr.h | 5 ++
src
troller support.
4. Add uin32 type schema.
5. Rename zpciuid and zpcifid to zpci_uid and zpci_fid.
6. Always return multibus support on S390.
Yi Min Zhao (13):
conf: Add definitions for 'uid' and 'fid' PCI address attributes
qemu: Introduce zPCI capability
conf: Introduce a new PCI address
Add new functions to generate zPCI command string and append it to
QEMU command line. And the related tests are added.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
---
src/qemu/qemu_command.c | 102
address.
Signed-off-by: Yi Min Zhao
---
src/qemu/qemu_domain.c | 38 ++
1 file changed, 38 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index fa9113e542..94a14c582b 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
Add zPCI definitions in preparation of extending the PCI address
with parameters uid (user-defined identifier) and fid (PCI function
identifier).
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
---
cfg.mk| 1 +
src
QEMU on s390 supports PCI multibus since forever.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_capabilities.c | 4
1 file changed, 4 insertions
This patch introduces new XML parser/formatter functions. Uid is
16-bit and non-zero. Fid is 32-bit. They are the two attributes of zpci
which is introduced as PCI address element. Zpci element is parsed and
formatted along with PCI address. And add the related test cases.
Signed-off-by: Yi Min
Let's introduce zPCI capability.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h
The pci-root depends on zpci capability. So autogenerate pci-root if
zpci exists.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 1 +
1 file
introduce our own callbacks for the two
hashtables. In this way, uid/fid is saved in hash key and hash value
could be any non-NULL pointer due to no operation on hash value. That is
also the reason why we don't introduce hash value free callback.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris
在 2018/9/25 下午4:02, Andrea Bolognani 写道:
On Tue, 2018-09-25 at 13:15 +0800, Yi Min Zhao wrote:
From the high level point of view, code outside of conf/ should,
for the most part, not need to concern itself with zPCI at all: it
would eg. ask for a PCI address to be allocated
在 2018/9/20 下午4:28, Andrea Bolognani 写道:
On Wed, 2018-09-19 at 16:59 +0800, Yi Min Zhao wrote:
在 2018/9/13 下午9:58, Andrea Bolognani 写道:
I realize now that virPCIDeviceAddressIsValid() and
virPCIDeviceAddressIsEmpty() are *not* in util/virpci, though I
swear that I posted patches moving them
在 2018/9/13 下午9:58, Andrea Bolognani 写道:
On Thu, 2018-09-13 at 17:58 +0800, Yi Min Zhao wrote:
在 2018/9/11 下午8:05, Andrea Bolognani 写道:
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote:
[...]
+bool
+virZPCIDeviceAddressIsEmpty(const virZPCIDeviceAddress *addr)
+{
+return !(addr->
在 2018/9/18 下午4:59, Andrea Bolognani 写道:
On Tue, 2018-09-18 at 13:51 +0800, Yi Min Zhao wrote:
+int
+virDomainPCIAddressExtensionReserveNextAddr(virDomainPCIAddressSetPtr addrs,
+virPCIDeviceAddressPtr dev
在 2018/9/17 下午8:40, Andrea Bolognani 写道:
qemuDomainObjEnterMonitor(driver, vm);
-ret = qemuMonitorAddDevice(priv->mon, devstr);
+
+if (qemuDomainAttachExtensionDevice(priv->mon, >info) < 0) {
+ignore_value(qemuDomainObjExitMonitor(driver, vm));
+goto cleanup;
在 2018/9/17 下午8:33, Andrea Bolognani 写道:
On Mon, 2018-09-17 at 13:51 +0800, Yi Min Zhao wrote:
在 2018/9/11 下午10:31, Andrea Bolognani 写道:
+{
+if (!virZPCIDeviceAddressIsEmpty(>addr.pci.zpci))
+return qemuAppendZPCIDevStr(cmd, dev);
+
+return 0;
I'd rather
在 2018/9/17 下午8:05, Andrea Bolognani 写道:
On Mon, 2018-09-17 at 13:43 +0800, Yi Min Zhao wrote:
在 2018/9/11 下午9:59, Andrea Bolognani 写道:
+static void
+virDomainZPCIAddressReleaseUid(virHashTablePtr set,
+ virZPCIDeviceAddressPtr addr
在 2018/9/11 下午11:21, Andrea Bolognani 写道:
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote:
[...]
+static int
+qemuDomainAttachExtensionDevice(qemuMonitorPtr mon,
+virDomainDeviceInfoPtr info)
+{
+if (!virZPCIDeviceAddressIsEmpty(>addr.pci.z
在 2018/9/11 下午10:31, Andrea Bolognani 写道:
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote:
[...]
+char *
+qemuBuildZPCIDevStr(virDomainDeviceInfoPtr dev)
+{
+virBuffer buf = VIR_BUFFER_INITIALIZER;
+
+virBufferAddLit(, "zpci");
+virBufferAsprintf(, &quo
在 2018/9/11 下午9:59, Andrea Bolognani 写道:
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote:
[...]
If the user
define zPCI extension address but zPCI capability doesn't exist, an
error will be reported.
You're (no longer) checking for the capability here, so the commit
message should
在 2018/9/13 下午7:47, Andrea Bolognani 写道:
Just remove the full stop, like
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"%s",
_("This QEMU binary doesn't support zPCI"));
AhGot it.
--
Yi Min
--
libvir-list mailing list
libvir-list@redhat.com
在 2018/9/11 下午8:44, Andrea Bolognani 写道:
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote:
We should ensure that the Qemu should support zPCI when zPCI address is
s/Qemu/QEMU/
Sure.
[...]
+static int
+qemuDomainZPCIAddressDefValidate(virDomainDeviceDef *dev
在 2018/9/11 下午8:05, Andrea Bolognani 写道:
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote:
[...]
+static int
+virZPCIDeviceAddressIsValid(virZPCIDeviceAddressPtr zpci)
This is a predicate, so it should return a bool.
OK.
[...]
+virReportError(VIR_ERR_XML_ERROR
在 2018/9/13 下午4:23, Andrea Bolognani 写道:
On Thu, 2018-09-13 at 15:58 +0800, Yi Min Zhao wrote:
在 2018/9/12 下午6:37, Andrea Bolognani 写道:
Too bad fid can go all the way to UINT32_MAX, otherwise we could
have just stored them in the pointer after offsetting them by one
and thus worked around
在 2018/9/12 下午6:37, Andrea Bolognani 写道:
On Wed, 2018-09-12 at 16:34 +0800, Yi Min Zhao wrote:
在 2018/9/12 下午3:35, Yi Min Zhao 写道:
This makes sense and seems to work just fine; however, you are
allocating and releasing a bunch of small integers, which seems
a bit wasteful.
vircgroup
在 2018/9/12 下午6:37, Andrea Bolognani 写道:
On Wed, 2018-09-12 at 16:34 +0800, Yi Min Zhao wrote:
在 2018/9/12 下午3:35, Yi Min Zhao 写道:
This makes sense and seems to work just fine; however, you are
allocating and releasing a bunch of small integers, which seems
a bit wasteful.
vircgroup
在 2018/9/12 下午3:35, Yi Min Zhao 写道:
+static void *
+virZPCIAddrCopy(const void *name)
+{
+ unsigned int *copy;
+
+ if (VIR_ALLOC(copy) < 0)
+ return NULL;
+
+ *copy = *((unsigned int *)name);
+ return (void *)copy;
+}
+
+
+static void
+virZPCIAddrKeyFree(void *n
在 2018/9/11 下午7:34, Andrea Bolognani 写道:
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote:
This patch provides a caching mechanism for the device address
extensions uid and fid on S390. For efficient sparse address allocation,
we introduce two hash tables for uid/fid which hold
在 2018/9/11 下午4:37, Andrea Bolognani 写道:
On Tue, 2018-09-04 at 16:39 +0800, Yi Min Zhao wrote:
[...]
@@ -164,6 +164,7 @@ struct _virDomainDeviceInfo {
* assignment, never saved and never reported.
*/
int pciConnectFlags; /* enum virDomainPCIConnectFlags */
+int
-pci
virtio-rng-pci
virtio-input-host-pci
virtio-keyboard-pci
virtio-mouse-pci
virtio-tablet-pci
vfio-pci
SCSIVhost device
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
---
src/qemu
We should ensure that the Qemu should support zPCI when zPCI address is
defined in XML. Otherwise the error should be reported. So this patch
introduces the validation of zPCI address definition for
qemuDomainDeviceDefValidate().
Signed-off-by: Yi Min Zhao
---
src/qemu/qemu_domain.c | 26
QEMU on s390 supports PCI multibus since forever.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_capabilities.c | 4
1 file changed, 4 insertions
The pci-root depends on zpci capability. So autogenerate pci-root if
zpci exists.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_domain.c | 1 +
1 file
This patch introduces a new attribute PCI address extension flag
to deal with the extension PCI attributes such as 'uid' and 'fid'
on the S390 platform.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/conf/device_conf.h
Let's introduce zPCI capability.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h
lways return multibus support on S390.
Yi Min Zhao (13):
conf: Add definitions for 'uid' and 'fid' PCI address attributes
qemu: Introduce zPCI capability
conf: Introduce a new PCI address extension flag
qemu: Enable PCI multi bus for S390 guests
qemu: Auto add pci-root for s390/s390x g
Update 'Device address' section to describe the 'uid' and 'fid'
attributes.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Ján Tomko
Reviewed-by: Andrea Bolognani
---
docs/formatdomain.html.in | 9 -
1 file changed, 8 insertions
Add new functions to generate zPCI command string and append it to
QEMU command line. And the related tests are added.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
---
src/qemu/qemu_command.c
Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Ján Tomko
---
src/conf/device_conf.c | 7 ++
src/conf/device_conf.h | 1 +
src/conf/domain_addr.c | 242 +
src/conf/domain_addr.h | 15 +++
src/libvirt_private.syms
introduce our own callbacks for the two
hashtables. In this way, uid/fid is saved in hash key and hash value
could be any non-NULL pointer due to no operation on hash value. That is
also the reason why we don't introduce hash value free callback.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Ján Tomko
---
docs/news.xml | 10 ++
1 file changed, 10 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 9a17b2f612..fc54a3b6ff 100644
--- a/docs/news.xml
+++ b/docs
Add zPCI definitions in preparation of extending the PCI address
with parameters uid (user-defined identifier) and fid (PCI function
identifier).
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris Fiuczynski
Reviewed-by: Stefan Zimmermann
Reviewed-by: Bjoern Walk
Reviewed-by: Ján Tomko
This patch introduces new XML parser/formatter functions. Uid is
16-bit and non-zero. Fid is 32-bit. They are added as two new
attributes of PCI address, and parsed/formatted along with PCI
address parser/formatter. The related test is also added.
Signed-off-by: Yi Min Zhao
Reviewed-by: Boris
1 - 100 of 211 matches
Mail list logo